/* Layout: one 52rem column; prose held to a ~66-character measure; terminals and diagrams use the full column. */
:root {
  --ink: #ecdcbc;      /* headings, strong text */
  --body: #d6c6a8;     /* body text */
  --muted: #a8977c;    /* notes, captions */
  --gold: #c8aa70;     /* accents */
  --link: #d9bc85;
  --line: #8d7753;     /* diagram strokes */
  --rule: #33291a;     /* borders */
  --panel: #0e0b06;    /* terminals, diagrams */
  --panel-2: #16110a;
  --display: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --text: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 40rem;
}

.main.project { align-items: stretch; justify-content: flex-start; padding: clamp(1.4rem, 4vw, 3.2rem) 0 2.4rem; }
.project-body { width: min(100%, 52rem); margin: 0 auto; min-width: 0; }
.project h1 { margin: 0; text-align: left; text-wrap: balance; }
.project h2 { margin: 3.4rem 0 0; color: var(--ink); font-family: var(--display); font-size: clamp(1.45rem, 2.4vw, 1.8rem); font-weight: 400; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.project h3 { margin: 1.8rem 0 0; color: var(--ink); font-size: 1.02rem; font-weight: 600; letter-spacing: .005em; text-wrap: balance; }
.project .lede { margin: .7rem 0 0; color: var(--gold); font-family: var(--display); font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-style: italic; max-width: var(--measure); }
.project p, .project li, .project td, .project th, .project dd { color: var(--body); font-size: 1rem; line-height: 1.62; }
.project p, .project ul, .project ol.steps, .project dl, .project .callout { max-width: var(--measure); }
.project p { margin: 1rem 0 0; text-wrap: pretty; }
.project ul { margin: 1rem 0 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
.project ul li::marker { color: var(--line); }
.project ol.steps { margin: 1.2rem 0 0; padding-left: 1.6rem; display: grid; gap: .9rem; }
.project ol.steps li::marker { color: var(--gold); font-family: var(--display); }
.project li strong, .project p strong, .project dd strong { color: var(--ink); font-weight: 600; }
.project a { color: var(--link); text-decoration-color: #6f5b3a; text-decoration-thickness: 1px; text-underline-offset: .22em; }
.project a:hover { color: #fff0d4; text-decoration-color: currentColor; }
.project a:focus-visible, .subnav a:focus-visible, .wordmark a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; color: #fff0d4; }
.project .note { margin: .9rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.project code { font-family: var(--mono); font-size: .88em; color: var(--ink); }

/* The hero: words on the left, the dog on the right, lit from behind (stacks on a phone). */
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.6rem); align-items: center; padding-block: .6rem 1.4rem; }
.hero > div { min-width: 0; }
.hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.2rem); }
.hero .kicker { margin: 0 0 .9rem; color: var(--gold); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; }
.hero .headline { margin: .9rem 0 0; color: var(--ink); font-family: var(--display); font-size: clamp(1.5rem, 2.7vw, 2.15rem); line-height: 1.2; letter-spacing: -.012em; text-wrap: balance; }
.hero .subhead { margin: 1.1rem 0 0; color: var(--body); font-size: 1.06rem; line-height: 1.62; }
.hero .facts { margin: 1rem 0 0; color: var(--muted); font-size: .88rem; }
.hero figure { margin: 0; line-height: 0; position: relative; isolation: isolate; }
.hero figure::before { content: ""; position: absolute; inset: 4% 0 10%; z-index: -1; background: radial-gradient(closest-side, rgba(200, 170, 112, .2), rgba(200, 170, 112, 0)); }
.hero img { width: 100%; max-width: 100%; height: auto; display: block; }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; } .hero figure { max-width: 12rem; margin: 0 auto; order: -1; } }

.cta-row { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; }
.project .cta { display: inline-block; color: #120d05; background: var(--gold); font-size: .98rem; font-weight: 600; letter-spacing: .01em; text-decoration: none; padding: .62rem 1.15rem; border-radius: 3px; }
.project .cta:hover { background: #e2c58c; color: #120d05; }
.project .cta:focus-visible { color: #120d05; }
.project .cta.quiet { color: var(--link); background: none; border: 1px solid #5e4c30; font-weight: 500; }
.project .cta.quiet:hover { color: #fff0d4; border-color: currentColor; }

/* Diagrams: inline SVG in a figure, with the meaning also in the caption text. */
.diagram { margin: 1.5rem 0 0; padding: clamp(.8rem, 2vw, 1.2rem); background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { margin: .9rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.5; max-width: var(--measure); }
.diagram svg text { font-family: var(--text); }

/* A terminal block, for real commands and real output only. */
.term { margin: 1.2rem 0 0; background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; min-width: 0; }
.term .bar { padding: .5rem .9rem; border-bottom: 1px solid var(--rule); background: var(--panel-2); color: var(--muted); font-size: .76rem; letter-spacing: .03em; }
.term pre { margin: 0; padding: .95rem 1rem; overflow-x: auto; color: var(--body); font-family: var(--mono); font-size: .84rem; line-height: 1.65; tab-size: 2; }
.term pre.wrap { white-space: pre-wrap; }
.term .c { color: var(--muted); }   /* a comment */
.term .p { color: var(--gold); }    /* the prompt */
.term .o { color: var(--ink); }     /* output */

/* Cards: short points side by side, set off by a gold rule rather than a box. */
.cards { margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); gap: 1.6rem 1.8rem; }
.card { padding: .9rem 0 0; border-top: 1px solid var(--line); min-width: 0; }
.card h3 { margin: 0; font-size: 1rem; }
.card p { margin: .45rem 0 0; font-size: .95rem; line-height: 1.55; }
.card .more { display: inline-block; margin-top: .6rem; font-size: .9rem; }

/* Is / isn't, and other two-column comparisons: two framed panels, the first one lit. */
.split { margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.split > div { padding: 1.1rem 1.2rem; border: 1px solid var(--rule); border-radius: 4px; min-width: 0; }
.split > div:first-child { border-color: #5e4c30; background: var(--panel-2); }
.split h3 { margin: 0; font-family: var(--display); font-size: 1.15rem; font-weight: 400; }
.split ul { max-width: none; }

.callout { margin: 1.5rem 0 0; padding: 1rem 1.25rem; border-left: 2px solid var(--gold); background: var(--panel-2); }
.callout p:first-child { margin-top: 0; }

.project table { width: 100%; margin: 1.1rem 0 0; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.project th { color: var(--ink); font-weight: 600; text-align: left; border-bottom: 1px solid #4d3f28; padding: .55rem .8rem .55rem 0; font-size: .9rem; vertical-align: top; }
.project td { border-bottom: 1px solid #241c10; padding: .55rem .8rem .55rem 0; font-size: .95rem; vertical-align: top; }
.project tbody th { width: 11rem; color: var(--muted); font-weight: 500; }
.table-wrap { overflow-x: auto; }

.faq dt { margin: 0; padding-top: 1.4rem; border-top: 1px solid var(--rule); color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 1.18rem; line-height: 1.3; }
.faq dt:first-of-type { border-top: 0; padding-top: .4rem; }
.faq dd { margin: .5rem 0 1.4rem; }

/* Page links: wrap on a wide screen, one swipeable row on a phone. */
.subnav { margin: 0 0 1.8rem; display: flex; flex-wrap: wrap; gap: .45rem 1.15rem; font-size: .86rem; letter-spacing: .01em; }
.subnav a { color: var(--muted); text-decoration: none; padding-bottom: .15rem; border-bottom: 1px solid transparent; white-space: nowrap; }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.subnav a:hover { color: #fff0d4; border-bottom-color: var(--line); }
@media (max-width: 720px) {
  .subnav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
}

.next { margin: 3rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--rule); font-size: .95rem; }
.project-footer { display: block; }
.project-footer p { margin: 0 0 .6rem; color: var(--muted); font-size: .8rem; line-height: 1.5; max-width: 52rem; }
.wordmark a { text-decoration: none; }

@media (max-width: 720px) {
  .diagram { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .diagram svg { min-width: 640px; }
  .diagram figcaption { position: sticky; left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
