/* yourstackdoesthat.com — one stylesheet, no external assets. CC0. */

:root {
  --paper: #f5f2ea;
  --ink: #1b1a17;
  --muted: #625d54;
  --rule: #d8d1c2;
  --accent: #a33b2b;
  --accent-ink: #ffffff;
  --soft: #ebe6d9;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 38rem;
  --wide: 52rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171614;
    --ink: #ece7db;
    --muted: #a7a093;
    --rule: #37332d;
    --accent: #e26a55;
    --accent-ink: #171614;
    --soft: #22201c;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 112.5%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (min-width: 40rem) {
  body { padding: 0 2rem 6rem; }
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: .5rem 1rem;
}
.skip:focus { left: 1rem; z-index: 10; }

/* ---------- header ---------- */

.site-head {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.25rem 0 .75rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.brand { margin: 0; font-size: 1.05rem; font-style: italic; }
.brand a { text-decoration: none; }

.site-head nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .1rem 1rem;
  font-family: var(--sans); font-size: .78rem; letter-spacing: .01em;
}
.site-head nav a { text-decoration: none; color: var(--muted); }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--ink); }
.site-head nav a[aria-current] { border-bottom: 2px solid var(--accent); }

/* ---------- main ---------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: 2.5rem;
}

main.wide { max-width: var(--wide); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 2.2em 0 .5em;
}
h1 { font-size: 2.1rem; margin-top: 0; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
h1 + p, h2 + p, h3 + p { margin-top: 0; }

p, ul, ol, dl { margin: 0 0 1.1em; }
li { margin-bottom: .35em; }

em { font-style: italic; }
strong { font-weight: 600; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

blockquote {
  margin: 1.5rem 0; padding: 0 0 0 1rem;
  border-left: 3px solid var(--accent);
  font-size: 1.1rem; line-height: 1.4;
}

code, pre {
  font-family: var(--mono); font-size: .85em;
  background: var(--soft); border-radius: 3px;
}
code { padding: .1em .3em; }
pre {
  padding: .9rem 1rem; overflow-x: auto; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
pre code { background: none; padding: 0; }

.label {
  font-family: var(--sans); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
}

.lede { font-size: 1.2rem; line-height: 1.45; }
.small, .meta { font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.sep { opacity: .5; padding: 0 .15em; }

.kicker {
  font-family: var(--sans); font-size: .75rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin: 0 0 .75rem;
}

/* ---------- home ---------- */

.slogan {
  font-size: clamp(2.9rem, 12.5vw, 7.5rem);
  line-height: .95;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 1.5rem 0 1.5rem;
  max-width: 100%;
}
.slogan em { font-style: italic; color: var(--accent); }
.slogan .dot { color: var(--accent); }

.hook {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  line-height: 1.25;
  font-style: italic;
  margin: 2.5rem 0 .5rem;
}
.hook + p { color: var(--muted); }

.fold {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* ---------- definition lists ---------- */

dl.plain dt { font-weight: 600; margin-top: .8em; }
dl.plain dd { margin: 0 0 .4em; }

/* ---------- Does entries ---------- */

.toc {
  list-style: none; padding: 0; margin: 0 0 2rem;
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
  font-family: var(--sans); font-size: .85rem;
}
.toc .count { color: var(--muted); font-size: .75em; margin-left: .15em; }

section.domain { margin-top: 3rem; }
section.domain > h2 {
  border-bottom: 1px solid var(--rule);
  padding-bottom: .3rem;
  margin-bottom: 1.5rem;
}

article.does {
  margin: 0 0 2.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}
article.does:target { border-left-color: var(--accent); }
article.does h3 { margin: 0 0 .2rem; font-size: 1.2rem; }
article.does h3 a { text-decoration: none; }
article.does h3 a:hover { text-decoration: underline; }
article.does .meta { margin: 0 0 .8rem; }
article.does dl { margin: 0; }
article.does dt {
  font-family: var(--sans); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-top: .7em;
}
article.does dt:nth-of-type(3) { color: var(--accent); }
article.does dd { margin: .1em 0 0; }
article.does dd p { margin: 0 0 .5em; }
article.does .setup { margin: .8em 0 0; font-size: .92rem; }

/* ---------- ledger ---------- */

ol.ledger { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.ledger-line {
  padding: 1rem 0 1rem 1rem;
  border-left: 2px solid var(--rule);
  margin-bottom: 1.25rem;
}
.ledger-line:target { border-left-color: var(--accent); }
.ledger-line .meta { margin: 0 0 .5rem; }
.ledger-line .result {
  font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: .08em; font-size: .7rem;
}
.ledger-line.kept .result { color: var(--muted); }
.ledger-line dl { margin: 0; }
.ledger-line dt {
  font-family: var(--sans); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-top: .5em;
}
.ledger-line dd { margin: .1em 0 0; }
.ledger-line dd p { margin: 0 0 .4em; }

/* ---------- Stack Test ---------- */

.test { margin: 2rem 0; padding: 0; list-style: none; counter-reset: q; }
.test > li {
  counter-increment: q;
  padding: 1rem 0 1rem 2.6rem; position: relative;
  border-top: 1px solid var(--rule);
}
.test > li::before {
  content: counter(q, decimal-leading-zero);
  position: absolute; left: 0; top: 1.15rem;
  font-family: var(--sans); font-size: .75rem; color: var(--accent); letter-spacing: .05em;
}
.test .q { font-size: 1.15rem; margin: 0 0 .4rem; }
.test .why { margin: 0 0 .6rem; color: var(--muted); font-size: .95rem; }
.test .choice { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-family: var(--sans); font-size: .9rem; }
form .test .choice label { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.test .choice input { margin: 0; }
.verdict {
  margin: 2rem 0; padding: 1.25rem 1.25rem;
  background: var(--soft); border-left: 3px solid var(--accent);
}
.verdict p { margin: 0 0 .5em; }
.verdict .out { font-size: 1.35rem; line-height: 1.3; }

/* ---------- forms ---------- */

form { margin: 1.5rem 0 2.5rem; }
form fieldset { border: 1px solid var(--rule); padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
form legend { font-family: var(--sans); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 .4rem; }
form label { display: block; font-family: var(--sans); font-size: .85rem; margin: 1rem 0 .3rem; }
form label:first-of-type { margin-top: .25rem; }
form input[type="text"], form input[type="url"], form textarea, form select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: .55rem .65rem;
}
form textarea { min-height: 5.5rem; resize: vertical; }
form .hint { font-family: var(--sans); font-size: .78rem; color: var(--muted); margin: .25rem 0 0; }
form button {
  font: inherit; font-family: var(--sans); font-size: .9rem;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 3px;
  padding: .65rem 1.1rem; cursor: pointer; margin-top: 1rem;
}
form button:hover { background: var(--accent); color: var(--accent-ink); }
.hp { position: absolute; left: -9999px; }

/* ---------- reading ---------- */

ul.reading { list-style: none; padding: 0; }
ul.reading li { margin-bottom: 1.4rem; padding-left: 1rem; border-left: 2px solid var(--rule); }
ul.reading .title { font-size: 1.15rem; margin: 0; }
ul.reading .title a { text-decoration: none; }
ul.reading .title a:hover { text-decoration: underline; }
ul.reading p { margin: .1em 0; }

/* ---------- tables ---------- */

.tablewrap { overflow-x: auto; margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .5rem .6rem .5rem 0; border-top: 1px solid var(--rule); }
th { font-family: var(--sans); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-top: 0; }

/* ---------- footer ---------- */

.site-foot {
  max-width: var(--wide);
  margin: 4rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans); font-size: .78rem; color: var(--muted);
}
.site-foot p { margin: 0 0 .5em; max-width: 60ch; }

/* ---------- misc ---------- */

.two { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .two { grid-template-columns: 1fr 1fr; } }

.not { color: var(--muted); }

@media print {
  .site-head nav, .site-foot p:nth-child(2) { display: none; }
  html { font-size: 11pt; background: #fff; color: #000; }
}
