/* The light board paper (MAR-170, direction D): the start page's ground, shared with the pages that follow it (the
   blog, its posts and the search pages). Cream and paper fields with the store screenshots' faint checker, dark ink,
   one blue, and the dark app shown as objects on them. Loaded after /site.css; the start page adds /landing.css. */

:root {
  color-scheme: light;
  --cream: #F8EBCF; --paper: #FAF2E3; --ink-dark: #0F1319; --ink-brown: #3A3226; --ink-brown-2: #5A4E3E;
  --sq-light: #EDD6AB; --sq-dark: #5C4029; --hl-from: #D9B75E; --hl-to: #8C6A2C; --frame: #2E2118; --blue-edge: #17398F;
  --shadow-warm: 0 34px 80px rgb(60 40 20 / .26);
  --link-on-paper: #1D4FD8;
  /* Design language v2 (MAR-132, 2026-11-18): six type steps in Archivo, each clearly apart, and the space between
     sections and chapters. /how-to-stop-hanging-pieces/ uses them first; the other paper pages follow. */
  --t-display: clamp(44px, 5.6vw, 72px); --t-section: clamp(30px, 3.4vw, 40px); --t-chapter: clamp(24px, 2.4vw, 28px);
  --t-prompt: clamp(20px, 1.9vw, 22px); --t-body: 18px; --t-label: 14px;
  --t-gap: clamp(96px, 11vw, 160px); --t-chapter-gap: clamp(72px, 8vw, 96px);
  /* The book's two rules (MAR-188): the 3 px ink rule above a section, the hairline between rows. */
  --hairline-c: rgb(58 50 38 / .18); --rule: 3px solid var(--ink-dark); --hairline: 1px solid var(--hairline-c); --card-r: 22px;
}
@media (max-width: 520px) { :root { --t-body: 17px; } }
body { background: var(--paper); color: var(--ink-dark); }

/* Fields. The checker stays put while the page moves over it (fixed), so it runs on unbroken from field to field. */
.field { position: relative; overflow: clip; }
.field::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .018;
  background: conic-gradient(currentColor 25%, transparent 0 50%, currentColor 0 75%, transparent 0) 0 0 / 320px 320px fixed; }
.field > * { position: relative; }
.cream { background: var(--cream); }
.paper { background: var(--paper); }
.paper::before { opacity: .014; }
.blue { background: var(--blue); color: #fff; }
.blue::before { opacity: .03; }

.pill.blue { box-shadow: 0 2px 0 var(--blue-edge); }

/* The bar on the paper. */
.bar nav a:not(.pill) { color: #4A4033; }
.bar nav a:not(.pill):hover { color: var(--ink-dark); text-decoration: underline; text-underline-offset: 4px; }

/* The footer stays the app's dark, with the name at full width. */
footer { background: var(--canvas); color: var(--ink); }

/* ---------- Pages that follow the start page (body.light) ----------
   Their text and surfaces were written against the site's dark tokens. Inside the page those tokens turn to the
   paper's ink and tints; the app's own pieces (.app) and the sticky dock keep the dark ones, as in the app. */
.light::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .014;
  background: conic-gradient(currentColor 25%, transparent 0 50%, currentColor 0 75%, transparent 0) 0 0 / 320px 320px; }
.light main, .light .bar {
  --canvas: var(--paper); --ink: var(--ink-dark); --ink-2: var(--ink-brown-2); --ink-3: #7A6D59;
  --raised: rgb(58 50 38 / .08); --raised-2: rgb(58 50 38 / .16); --deep: rgb(58 50 38 / .05); --link: var(--link-on-paper);
}
.light .app, .light .dock-in {
  --canvas: #0F1319; --ink: #F5F7FA; --ink-2: #A8B2C0; --ink-3: #8E9AAB;
  --raised: #212836; --raised-2: #2A313D; --deep: #171C24; --link: #7FA5FF;
  color: var(--ink);
}
.light .blue, .light .hcard, .light .end-h, .light .w3 .us { --link: #fff; }
/* Accent words in a heading, as the start page's. */
.tint { color: var(--blue); }
.blue .tint { color: var(--cream); }

/* Blog and posts: the column on the paper. */
.light .page .lead { color: var(--ink-brown); }
.light .page ul.posts li > img { border-color: transparent; box-shadow: 0 14px 34px rgb(60 40 20 / .18); }
.light .page ul.brief .f:not(.top), .light .page .viz .f:not(.top), .light .page .viz.range .band { background: #B7A88E; }

/* The start page's footer on every light page: the name at full width, the same spacing. The page fills the
   window, so on a short page the footer still sits at the bottom. */
body.light { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
body.light > main { flex: 1 0 auto; width: 100%; }
body.light footer { padding: 90px 0 110px; }
body.light footer .big { width: min(980px, 100%); }
@media (max-width: 900px) { body.light footer { padding: 70px 0 90px; } }

/* ---------- The content templates (MAR-186 §3, "Shared templates"; picked 2026-11-18) ----------
   Answer pages and habit pages, in the book column of /how-to-stop-hanging-pieces/ (its page.css). Tokens only. */
/* The breadcrumb above a habit page's h1: Common chess mistakes › <Habit>. */
.crumb { font-size: var(--t-label); font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.crumb a { color: var(--link); text-decoration: none; }
.crumb a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-h .crumb + h1 { margin-top: 18px; }
/* A habit page's "The question that catches it": the cue, word for word, under the ink rule. */
.cue { margin-top: 36px; padding: 18px 0 20px; border-top: var(--rule); border-bottom: var(--hairline); }
/* Small capitals in blue use the paper's link blue: --blue is 3.8:1 on cream at 14 px, --link passes AA. */
.cue .lbl, .short .lbl { font-size: var(--t-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
.cue .q { margin-top: 8px; font-size: var(--t-chapter); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
/* An answer page's "Short answer" panel: the answer in 2–3 sentences, in place of the plain lead. */
.short { margin-top: 36px; padding: 24px 28px 26px; border-radius: var(--card-r); background: var(--cream); box-shadow: inset 0 0 0 1px var(--hairline-c); }
.short .ans { margin-top: 8px; font-size: var(--t-prompt); line-height: 1.45; font-weight: 600; color: var(--ink-dark); }
.short p + p { margin-top: 10px; }
@media (max-width: 520px) { .short { padding: 20px 20px 22px; } }
/* A table on the paper: the ink rule above the header, hairlines between rows. An illustrative one says so in .tally-note. */
.tally { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: var(--t-body); }
.tally th { padding: 10px 0; text-align: left; font-size: var(--t-label); font-weight: 700; letter-spacing: .02em; color: var(--ink-2); border-top: var(--rule); border-bottom: var(--hairline); }
.tally td { padding: 12px 0; border-bottom: var(--hairline); }
.tally td:last-child, .tally th:last-child { text-align: right; }
.tally .marks { letter-spacing: .2em; font-weight: 700; color: var(--blue); }
.tally-note { margin-top: 10px; font-size: var(--t-label); font-weight: 600; color: var(--ink-2); }
/* A link inside the book's running text: the link blue, like the contents line. */
.book .body a, .book .aside a, .book .howto a { color: var(--link); text-underline-offset: 4px; }
