/* =========================================================================
   Downfield — site styles
   Design system: ink + paper + one accent. Serif display, grotesk body.
   The company name "Downfield" appears in markup; the visual identity is
   driven by the tokens below so a rename is a small, contained change.
   ========================================================================= */

:root {
  --ink:        #15120d;   /* near-black, warm */
  --ink-soft:   #3a352c;
  --paper:      #f4efe3;   /* warm off-white */
  --paper-2:    #ece4d3;   /* panel */
  --paper-3:    #e2d8c2;   /* deeper panel / borders */
  --accent:     #c0552a;   /* burnt sienna — Texas + Roman granite */
  --accent-ink: #9a4220;
  --field:      #2f5d4f;   /* muted field green, used sparingly */
  --line:       rgba(21, 18, 13, 0.14);
  --line-soft:  rgba(21, 18, 13, 0.08);

  --maxw: 1080px;
  --gap: clamp(1rem, 4vw, 2.5rem);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shadow: 0 1px 2px rgba(21,18,13,.06), 0 8px 30px rgba(21,18,13,.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent-ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* visible keyboard focus everywhere (custom controls strip the default ring) */
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gap); }

/* ---- yard-line tick divider ---------------------------------------------- */
.yardline {
  height: 14px;
  background-image: repeating-linear-gradient(
    to right,
    var(--line) 0, var(--line) 1.5px,
    transparent 1.5px, transparent 28px
  );
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  opacity: .8;
}

/* ===== NAV ================================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif);
         font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand .tick { width: 10px; height: 22px; background: var(--accent); border-radius: 1px;
               box-shadow: 14px 0 0 -3px var(--field); }
.nav-links { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent-ink); }
.nav-links .lock { opacity: .6; font-size: .8em; margin-right: .2em; }
.nav-links .divider { width: 1px; height: 20px; background: var(--line); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
              width: 42px; height: 38px; cursor: pointer; color: var(--ink); font-size: 1.1rem; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gap) 1rem; box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .18s ease;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links .divider { display: none; }
}

/* ===== HERO =============================================================== */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.kicker { font-family: var(--sans); font-weight: 600; font-size: .8rem; letter-spacing: .14em;
          text-transform: uppercase; color: var(--accent-ink); margin: 0 0 1.2rem; }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); margin: 0 0 1.2rem; max-width: 16ch; }
.hero .lede { font-size: clamp(1.1rem, 1.4vw, 1.35rem); color: var(--ink-soft); max-width: 60ch; margin: 0 0 2rem; }
.hero .accent-word { color: var(--accent); font-style: italic; }

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.5rem; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px;
       font-weight: 600; font-size: .98rem; text-decoration: none; border: 1px solid transparent; transition: .15s; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent-ink); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

.signature {
  border-left: 3px solid var(--accent); padding: .4rem 0 .4rem 1.4rem;
  font-family: var(--serif); font-size: clamp(1.15rem, 1.6vw, 1.5rem); font-style: italic;
  color: var(--ink); max-width: 50ch; line-height: 1.4;
}
.signature .last { color: var(--accent); font-style: normal; font-weight: 600; }

/* ===== SECTIONS ========================================================== */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-label { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
                 color: var(--accent-ink); margin: 0 0 .8rem; }
section > .container > h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin: 0 0 1.2rem; max-width: 22ch; }
.prose { max-width: 64ch; }
.prose p { margin: 0 0 1.1rem; color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.lead-quote { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-style: italic;
              line-height: 1.32; color: var(--ink); margin: 0 0 1.6rem; max-width: 26ch; }

.alt { background: var(--paper-2); }

/* three beats */
.beats { display: grid; gap: 1.2rem; grid-template-columns: repeat(3, 1fr); margin-top: 2rem; }
.beat { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
.alt .beat { background: var(--paper); }
.beat .n { font-family: var(--serif); font-size: 2.2rem; color: var(--accent); line-height: 1; margin-bottom: .6rem; }
.beat h3 { font-size: 1.15rem; margin: 0 0 .5rem; }
.beat p { margin: 0; font-size: .98rem; color: var(--ink-soft); }
@media (max-width: 760px) { .beats { grid-template-columns: 1fr; } }

/* tiers */
.tiers { display: grid; gap: 1.2rem; grid-template-columns: repeat(2, 1fr); margin-top: 2rem; }
.tier { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem; display: flex; flex-direction: column; }
.tier-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.tier h3 { font-size: 1.3rem; margin: 0; }
.tier .price { font-family: var(--sans); font-weight: 700; font-size: .95rem; color: var(--accent-ink); white-space: nowrap; }
.tier .meta { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); opacity: .8; margin-bottom: .8rem; }
.tier p { margin: 0 0 .8rem; color: var(--ink-soft); font-size: .98rem; }
.tier .note { margin-top: auto; font-size: .9rem; color: var(--ink); background: var(--paper-2); border-radius: 10px; padding: .7rem .9rem; }
@media (max-width: 760px) { .tiers { grid-template-columns: 1fr; } }

/* feature list */
.feature-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 1rem; }
.feature-list li { padding-left: 1.6rem; position: relative; color: var(--ink-soft); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px;
                           background: var(--accent); border-radius: 2px; transform: rotate(45deg); }
.feature-list strong { color: var(--ink); }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.stat { text-align: left; }
.stat .num { font-family: var(--serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: var(--accent); line-height: 1; }
.stat .cap { font-size: .9rem; color: var(--ink-soft); margin-top: .35rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; } }

/* demo cards */
.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(3, 1fr); margin-top: 2rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem; }
.alt .card { background: var(--paper-2); }
.card h3 { font-size: 1.08rem; margin: 0 0 .2rem; }
.card .tag { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.card p { font-size: .94rem; color: var(--ink-soft); margin: .5rem 0 0; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* closing band */
.close-band { background: var(--ink); color: var(--paper); }
.close-band h2 { color: var(--paper); }
.close-band .signature { color: var(--paper); border-color: var(--accent); }
.close-band .signature .last { color: #f0a06f; }
.close-band a.btn-ghost { color: var(--paper); border-color: rgba(244,239,227,.3); }
.close-band a.btn-ghost:hover { border-color: var(--accent); color: #f0a06f; }
.close-band .muted { color: rgba(244,239,227,.65); }

/* ===== INTERNAL pages ===================================================== */
.internal-banner {
  background: var(--field); color: #eef6f2; text-align: center;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  padding: .5rem 1rem;
}
.badge-internal { display: inline-block; background: var(--field); color: #fff; font-size: .72rem;
                  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
                  padding: .25rem .6rem; border-radius: 6px; vertical-align: middle; margin-left: .6rem; }

.doc { max-width: 760px; }
.doc h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 2.4rem 0 1rem; }
.doc h3 { font-size: 1.25rem; margin: 1.8rem 0 .6rem; }
.doc p { color: var(--ink-soft); margin: 0 0 1rem; }
.doc ul { color: var(--ink-soft); padding-left: 1.2rem; }
.doc li { margin-bottom: .5rem; }
.doc strong { color: var(--ink); }

.status-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); margin: 1.5rem 0; }
.status { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; background: var(--paper-2); }
.status .h { font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .5rem; }
.status.done .h { color: var(--field); }
.status.wip  .h { color: var(--accent-ink); }
.status.todo .h { color: #8a2f2f; }
.status ul { margin: 0; padding-left: 1.1rem; font-size: .92rem; }
@media (max-width: 800px) { .status-grid { grid-template-columns: 1fr; } }

.checklist { list-style: none; padding: 0; margin: 1.2rem 0; }
.checklist li { padding: .6rem 0 .6rem 2rem; position: relative; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
.checklist li::before { content: "☐"; position: absolute; left: 0; top: .55rem; color: var(--ink-soft); font-size: 1.1rem; }
.checklist li.done { color: var(--ink-soft); }
.checklist li.done::before { content: "☑"; color: var(--field); }
.checklist li.gate::before { content: "⛔"; }

.pill { display: inline-block; background: var(--paper-3); border-radius: 999px; padding: .2rem .7rem;
        font-size: .8rem; font-weight: 600; color: var(--ink); margin: .2rem .3rem .2rem 0; }
.pill.lead { background: var(--accent); color: #fff; }

/* ===== FOOTER ============================================================= */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; font-size: .9rem; color: var(--ink-soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.confidential { font-size: .8rem; color: var(--ink-soft); opacity: .8; }

/* ===== INTERACTIVE BOARD (votes / checklist / notes) ===================== */
.board-status { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin: 1.2rem 0 1.5rem; font-size: .92rem; color: var(--ink-soft); }
.sync-badge { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem; border-radius: 999px; font-weight: 600; font-size: .8rem; }
.sync-badge.on  { background: #e3efe9; color: var(--field); }
.sync-badge.off { background: var(--paper-3); color: var(--ink-soft); }
.sync-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.you-are b { color: var(--ink); }
.identify { display: inline-flex; gap: .5rem; align-items: center; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .4rem .3rem .9rem; }
.identify input { font: inherit; font-size: .9rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); width: 9rem; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; border-radius: 999px; border: 1px solid transparent; background: var(--ink); color: var(--paper); font-weight: 600; cursor: pointer; }
.btn-sm:hover { background: var(--accent-ink); }

.vote-grid { display: grid; gap: .8rem; margin: 1rem 0 .5rem; }
.vote-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); flex-wrap: wrap; }
.vote-row.lead { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.vote-row .vname { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; flex: 1; min-width: 150px; }
.vote-row .vtag { font-family: var(--sans); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; margin-left: .3rem; opacity: .7; }
.tally { min-width: 60px; }
.avatars { display: flex; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--field); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--paper); margin-left: -8px; }
.avatar:first-child { margin-left: 0; }
.avatar.veto { background: #8a2f2f; }
.vote-actions { display: flex; gap: .4rem; }
.vote-btn { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--ink); transition: .12s; }
.vote-btn:hover { border-color: var(--accent); color: var(--accent); }
.vote-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.vote-btn.veto:hover { border-color: #8a2f2f; color: #8a2f2f; }
.vote-btn.veto.active { background: #8a2f2f; color: #fff; border-color: #8a2f2f; }

/* checklist becomes clickable */
.checklist li[data-id] { cursor: pointer; user-select: none; transition: color .12s; }
.checklist li[data-id]:hover { color: var(--ink); }
.checklist li[data-id]:hover::before { color: var(--accent); }
.check-by { font-size: .76rem; color: var(--field); font-weight: 600; margin-left: .6rem; white-space: nowrap; }

/* notes thread */
.notes { margin-top: 1.5rem; }
.note-item { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem; margin-bottom: .7rem; color: var(--ink); }
.note-item .meta { font-size: .78rem; color: var(--ink-soft); margin-bottom: .25rem; }
.note-item .meta b { color: var(--accent-ink); }
.muted-note { color: var(--ink-soft); font-size: .92rem; font-style: italic; }
.note-form { display: flex; gap: .6rem; margin-top: .9rem; align-items: flex-start; }
.note-form textarea { flex: 1; font: inherit; font-size: .95rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); resize: vertical; min-height: 46px; }

/* ===== WORKED EXAMPLE (public) — document register, not an app ============ */
.demo { margin-top: 2rem; }

/* the source file, shown like a working document */
.memo { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.memo-bar { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem;
            padding: .65rem 1rem; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.memo-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; color: var(--ink); font-weight: 600; }
.memo-sub { font-size: .76rem; color: var(--ink-soft); letter-spacing: .02em; }
.memo-table-wrap { overflow-x: auto; }
.memo-table { width: 100%; border-collapse: collapse; font-size: .85rem;
              font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.memo-table th { text-align: left; font-family: var(--sans); font-weight: 700; font-size: .68rem; letter-spacing: .06em;
                 text-transform: uppercase; color: var(--ink-soft); padding: .5rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.memo-table td { padding: .42rem .9rem; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft);
                 white-space: nowrap; }
.memo-table td:nth-child(3) { font-variant-numeric: tabular-nums; color: var(--ink); }
.memo-table tr:last-child td { border-bottom: none; }
/* a cell a careful reader must reconcile — marked, not shouted */
.memo-table td.bad { color: var(--accent-ink); position: relative; }
.memo-table td.bad::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .28rem; height: 0;
                            border-bottom: 1.5px dotted var(--accent); opacity: .8; }
/* a removed row — the verbatim duplicate, struck through so the dedupe is visible */
.memo-table tr.struck td { color: var(--ink-soft); opacity: .5; text-decoration: line-through; }
.memo-table tr.struck td:last-child { font-style: italic; text-decoration: none; opacity: .7; }
.memo-note { margin: 0; padding: .55rem .9rem; font-size: .78rem; color: var(--ink-soft); background: var(--paper-2);
             border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: .5rem; }
.memo-key { width: 18px; flex: none; border-bottom: 1.5px dotted var(--accent); transform: translateY(-3px); }

/* concept switcher — a quiet segmented control */
.seg { display: inline-flex; gap: .25rem; margin: 1.4rem 0 1rem; padding: .25rem; background: var(--paper-2);
       border: 1px solid var(--line); border-radius: 999px; flex-wrap: wrap; }
.seg-btn { font: inherit; font-size: .88rem; font-weight: 600; padding: .4rem 1rem; border-radius: 999px;
           border: none; background: transparent; color: var(--ink-soft); cursor: pointer; transition: .12s; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }

.concept { border: 1px solid var(--line); border-radius: 12px; padding: clamp(1.1rem, 3vw, 1.8rem); background: var(--paper); }

/* Lens 1 — the finding, with the ledger that built it */
.finding-head { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.25;
                color: var(--ink); margin: 0 0 .8rem; max-width: 36ch; }
.finding-head b { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.finding-context { color: var(--ink-soft); margin: 0 0 1rem; max-width: 60ch; }
.finding-context b { color: var(--ink); }
.chronic { margin: 0 0 1.1rem; padding: .85rem 1.1rem; background: var(--paper-2); border-left: 3px solid var(--accent);
           border-radius: 0 8px 8px 0; color: var(--ink); font-size: .96rem; max-width: 58ch; }
.chronic em { font-style: italic; color: var(--accent-ink); }
.recon-toggle { border-top: 1px solid var(--line-soft); padding-top: .8rem; }
.recon-toggle > summary { cursor: pointer; font-size: .8rem; font-weight: 700; letter-spacing: .05em;
                          text-transform: uppercase; color: var(--accent-ink); list-style: none; }
.recon-toggle > summary::-webkit-details-marker { display: none; }
.recon-toggle > summary::before { content: "▸ "; }
.recon-toggle[open] > summary::before { content: "▾ "; }
.ledger { margin: .9rem 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem;
          background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; max-width: 52ch; }
.ledger-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .9rem;
              border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
.ledger-row .n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-row.total { border-bottom: none; border-top: 1px solid var(--line); background: var(--paper);
                    color: var(--ink); font-weight: 700; }
.ledger-row.total .n { color: var(--accent-ink); }
.held-head { margin: 1.1rem 0 .4rem; font-size: .82rem; font-weight: 700; color: var(--ink); }
.held { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; max-width: 60ch; }
.held li { position: relative; padding-left: 1.2rem; font-size: .9rem; color: var(--ink-soft); }
.held li::before { content: "⚑"; position: absolute; left: 0; color: var(--accent-ink); font-size: .82em; top: .05em; }

/* Lens 2 — the question is the product */
.q-intro { margin: 0 0 1rem; color: var(--ink-soft); max-width: 60ch; }
.qchips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.1rem; }
.qchip { font: inherit; font-size: .9rem; font-weight: 500; text-align: left; padding: .5rem .9rem; border-radius: 10px;
         border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); cursor: pointer; transition: .12s; }
.qchip:hover { border-color: var(--accent); color: var(--ink); }
.qchip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.qanswer { font-family: var(--serif); font-size: clamp(1.05rem, 1.9vw, 1.28rem); line-height: 1.42; color: var(--ink);
           border-top: 1px solid var(--line-soft); padding-top: 1rem; max-width: 60ch; }
.qanswer b { color: var(--accent-ink); }

.demo-foot { font-size: .78rem; color: var(--ink-soft); opacity: .85; margin: 1rem 0 0; max-width: 64ch; }

/* ===== PLANNING / LOGISTICS board (internal) ============================= */
.plan-add { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.5rem; }
.plan-add input[type="text"] { flex: 1; min-width: 220px; font: inherit; font-size: .95rem; padding: .6rem .9rem;
            border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.plan-add select { font: inherit; font-size: .9rem; padding: .6rem .7rem; border: 1px solid var(--line);
            border-radius: 10px; background: var(--paper); color: var(--ink); }
.plan-add .btn-sm { padding: .6rem 1.3rem; }

.plan-board { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); align-items: start; }
.plan-col { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: .9rem; min-height: 120px; }
.plan-col[data-col="done"] { background: #e9f1ec; }
.plan-col-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700;
                 font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
                 padding: .1rem .3rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .8rem; }
.plan-col[data-col="doing"] .plan-col-head { color: var(--accent-ink); }
.plan-col[data-col="done"] .plan-col-head { color: var(--field); }
.plan-count { background: var(--paper-3); color: var(--ink); border-radius: 999px; min-width: 22px; text-align: center;
              padding: .05rem .45rem; font-size: .78rem; }
.plan-cards { display: grid; gap: .7rem; }
.plan-empty { margin: 0; padding: .6rem .3rem; font-size: .86rem; font-style: italic; color: var(--ink-soft); opacity: .7; }

.plan-card { background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: .8rem .9rem; box-shadow: var(--shadow); }
.plan-card.editing { border-color: var(--accent); }
.plan-cat { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
            color: var(--accent-ink); background: rgba(192,85,42,.10); border-radius: 5px; padding: .15rem .45rem; margin-bottom: .45rem; }
.plan-text { color: var(--ink); font-size: .95rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.plan-meta { font-size: .74rem; color: var(--ink-soft); margin-top: .5rem; }
.plan-actions { display: flex; gap: .3rem; margin-top: .6rem; }
.plan-mini { font: inherit; font-size: .78rem; font-weight: 600; line-height: 1; padding: .35rem .55rem; border-radius: 7px;
             border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-soft); cursor: pointer; transition: .12s; }
.plan-mini:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.plan-mini:disabled { opacity: .35; cursor: default; }
.plan-mini.danger:hover { border-color: #8a2f2f; color: #8a2f2f; }

.plan-edit { margin-top: .7rem; }
.plan-edit textarea { width: 100%; font: inherit; font-size: .92rem; padding: .5rem .6rem; border: 1px solid var(--line);
            border-radius: 8px; background: var(--paper); resize: vertical; min-height: 60px; }
.plan-edit-row { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
.plan-edit-row .grow { flex: 1; }
.plan-catsel { font: inherit; font-size: .82rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.btn-sm.ghost { background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); }
.btn-sm.ghost:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 760px) {
  .plan-board { grid-template-columns: 1fr; }
}

/* utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.hide { display: none; }

/* respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
                           transition-duration: .001ms !important; }
}
