/* public/assets/outline.css — homepage: hero + 2-column Q-tree / answer view.
 *
 * Aesthetic: a workshop handout on warm paper.
 * Layout: hero spans full width; below it, sticky left tree + scrolling
 * right answer pane. On mobile, stack everything.
 */

/* ---------- page surface ------------------------------------------------ */
body { background: #F4ECCB; }
main { max-width: none; padding: 0; }

/* Constrain the global site header to the same width as the page body
 * so its row of nav + search visually aligns with the hero below. */
body > header.site {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-bottom: none;
}
/* Same width for the global site footer, and drop the separator line
 * (the homepage has no horizontal rules between sections). */
body > footer.site {
  border-top: none;
}

.home {
  max-width: 1180px;
  margin: 1rem auto 4rem;
  padding: 0 1.5rem;
  color: var(--ink, #1a1a1a);
  font-family: var(--font-body);
  line-height: 1.55;
}

/* ---------- hero ------------------------------------------------------- */
.hero {
  padding: 1.5rem 0 2.5rem;
  margin-bottom: 2.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 560px);
  gap: 3rem;
  align-items: start;
}
.hero-body { min-width: 0; }
.hero h1 {
  font-family: var(--font-display);
  font-size: 2.3rem;
  line-height: 1.12;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.015em;
}
.hero-sub {
  font-size: 1.1rem;
  font-style: italic;
  color: #4a3f2b;
  margin: 0 0 1.1rem;
}
.hero-desc {
  font-size: 1.02rem;
  color: #2b2517;
  margin: 0;
  max-width: 62ch;
}

/* Cluster of three Post-it notes on the hero's right.
 * Layout: 2-column grid; first two stacked on the left (nudged left),
 * the third pinned to the top-right and raised so it sits "on top". */
.sticky-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.4rem 1rem;
  padding-top: 1.5rem;   /* room for the raised note 3 */
  position: relative;
}
.sticky-note {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.35;
  font-weight: 300;
  color: var(--ink-warm, #2A2418);
  padding: 1.3rem 1.3rem 1.4rem;
  margin: 0;
  position: relative;
  border-radius: 1px;
  background: var(--note, #FFF59A);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 3px 6px rgba(40, 30, 0, 0.16),
    0 12px 18px -10px rgba(40, 30, 0, 0.14);
}
.sticky-note::before {
  /* Strip of "tape" at the top */
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.sticky-note-link {
  color: inherit;
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-style: inherit;
  font-weight: 500;
}
.sticky-note-link:hover { text-decoration-style: solid; }
/* Note 1 — red, top-left, nudged left */
.sticky-note--1 {
  grid-column: 1; grid-row: 1;
  background: #F4A89B;
  transform: rotate(-1.6deg) translateX(-10px);
}
/* Note 2 — yellow, bottom-left, nudged left */
.sticky-note--2 {
  grid-column: 1; grid-row: 2;
  background: var(--note, #FFF59A);
  transform: rotate( 1.4deg) translateX(-6px);
}
/* Note 3 — green, top-right, nudged right + raised "on top" */
.sticky-note--3 {
  grid-column: 2; grid-row: 1;
  background: #BFE0A8;
  transform: rotate( 2.4deg) translate(12px, -22px);
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .sticky-stack {
    grid-template-columns: 1fr 1fr;
    padding-top: 1.5rem;
  }
}
@media (max-width: 520px) {
  .sticky-stack {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .sticky-note--1 { grid-column: 1; grid-row: 1; transform: rotate(-1.4deg); }
  .sticky-note--2 { grid-column: 1; grid-row: 2; transform: rotate( 1.2deg); }
  .sticky-note--3 { grid-column: 1; grid-row: 3; transform: rotate(-0.8deg); }
}

/* ---------- tabs ------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 1.6rem;
  margin: 1.6rem 0 1.8rem;
}
.tabs .tab {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #6b6b6b);
  padding: 0.5rem 0 0.8rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.tabs .tab:hover {
  color: var(--ink, #1a1a1a);
  border-bottom-color: rgba(42, 36, 24, 0.25);
}
.tabs .tab.is-active {
  color: var(--ink, #1a1a1a);
  font-weight: 700;
  border-bottom-color: var(--ink-warm, #2A2418);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---------- Methodology tab ------------------------------------------ */
.method {
  /* spans the full .home width — no max-width here */
}
.method-head {
  margin: 0 0 1.6rem;
  max-width: 700px;  /* keep title block readable */
}
.method-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.method-intro {
  margin: 0 0 2.4rem;
  display: grid;
  grid-template-columns: minmax(0, 700px) 280px;
  justify-content: space-between;
  gap: 3rem;
  align-items: start;
}
.method-intro-text { min-width: 0; }
.method-intro-text p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: #2b2517;
  line-height: 1.65;
}
.method-intro-text p:last-child { margin-bottom: 0; }

.method-intro-side {
  position: sticky;
  top: 1rem;
}
.method-intro-side .qa-links {
  margin: 0;
}

@media (max-width: 820px) {
  .method-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
  }
  .method-intro-side { position: static; }
}
.method-step {
  margin: 2.4rem 0 0;
  padding-top: 1.6rem;
}
.method-step + .method-step {
  /* Subtle gap-only separator, no rule, so it still feels stepped. */
  margin-top: 2.8rem;
}
.method-step-head {
  margin: 0 0 1rem;
}
.method-step-grid {
  display: grid;
  grid-template-columns: minmax(0, 700px) 280px;
  justify-content: space-between;
  gap: 3rem;
  align-items: start;
}
.method-step-text { min-width: 0; }
.method-step-side {
  position: sticky;
  top: 1rem;
}
.method-step-side .qa-links { margin: 0; }
@media (max-width: 820px) {
  .method-step-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }
  .method-step-side { position: static; }
}
.step-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-warm, #2A2418);
  margin: 0 0 0.3rem;
}
.step-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.method-step p {
  margin: 0 0 0.9rem;
  font-size: 1.02rem;
  color: #2b2517;
  line-height: 1.65;
}
.method-ext {
  margin: 0.4rem 0 1rem !important;
  font-size: 0.95rem !important;
}
.ext-link {
  color: var(--ink-warm, #2A2418);
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.ext-link:hover { color: var(--ink, #1a1a1a); text-decoration-style: solid; }

/* ---------- Knowledge Base tab (nested taxonomy tree) ----------------- */
.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.2rem 3rem;
  align-items: start;
}
.kb-section { min-width: 0; }
.kb-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
  color: var(--ink-warm, #2A2418);
  letter-spacing: -0.005em;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule, #C9C2A8);
}

/* Tree itself: unornamented nested lists, indented via padding-left so the
 * vertical guide rules align cleanly under each parent. */
.kb-tree,
.kb-children {
  list-style: none;
  padding: 0;
  margin: 0;
}
.kb-children {
  padding-left: 0.9rem;
  margin: 0.15rem 0 0.35rem;
  border-left: 1px dotted var(--rule, #C9C2A8);
}
.kb-node {
  margin: 0.2rem 0;
  line-height: 1.45;
  font-size: 0.95rem;
}
.kb-link {
  color: var(--ink, #1a1a1a);
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.kb-link:hover {
  color: var(--ink-warm, #2A2418);
  text-decoration-style: solid;
}
.kb-section-title .kb-link {
  /* Headings own their own underline (the section rule below); don't
   * double-stamp a dotted under-line on top of it. */
  text-decoration: none;
}
.kb-section-title .kb-link:hover {
  text-decoration: underline solid currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.kb-label {
  /* Non-clickable structural node — looks like a small label, not a link. */
  color: var(--muted, #6b6b6b);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* Depth tweaks: deeper nodes get progressively quieter typography. */
.kb-d1 { font-size: 0.95rem; }
.kb-d2 { font-size: 0.9rem; }
.kb-d3 { font-size: 0.86rem; }
.kb-d3 .kb-link { color: var(--ink-warm, #2A2418); }

/* ---------- Tools tab ------------------------------------------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.4rem 1.4rem 1.5rem;
  background: rgba(255, 250, 230, 0.75);
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink, #1a1a1a);
  transition: background 0.12s ease, transform 0.12s ease;
}
.tool-card:hover {
  background: rgba(255, 244, 195, 0.95);
  transform: translateY(-1px);
}
.tool-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink-warm, #2A2418);
  letter-spacing: -0.005em;
}
.tool-card-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #2b2517;
  line-height: 1.5;
}
.tool-card-cta {
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--ink-warm, #2A2418);
  font-weight: 600;
}

/* ---------- 2-column layout (FAQ tab) --------------------------------- */
.qa-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

/* ---------- left: question tree --------------------------------------- */
.q-tree {
  position: sticky;
  top: 1rem;
  align-self: start;
  font-size: 0.95rem;
}
.q-tree .branch + .branch { margin-top: 1.4rem; }
.branch-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--ink-warm, #2A2418);
  letter-spacing: -0.005em;
}
.q-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: q;
}
.q-list li {
  counter-increment: q;
  margin: 0.3rem 0;
  padding-left: 1.6rem;
  position: relative;
}
.q-list li::before {
  content: counter(q) ".";
  position: absolute;
  left: 0;
  top: 0.18em;
  color: var(--muted, #6b6b6b);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}
.q-link {
  color: var(--ink, #1a1a1a);
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  display: inline;
}
.q-link:hover { color: var(--ink-warm, #2A2418); }
.q-link.is-active {
  color: var(--ink-warm, #2A2418);
  font-weight: 600;
  text-decoration-style: solid;
}

/* ---------- right: answer view --------------------------------------- */
.qa-view {
  min-height: 380px;
}
.qa-q, .qa-a, .qa-full {
  max-width: 70ch;
}
.qa-links { max-width: 70ch; }

/* All Q/A cards exist in the DOM (good for no-JS & SEO).
 * CSS shows only the :target one; with no target, the first is the default. */
.qa { display: none; }
.qa:target { display: block; }
.qa-view:not(:has(.qa:target)) .qa.is-default { display: block; }

.qa-branch {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #6b6b6b);
  margin: 0 0 0.5rem;
}
.qa-q {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 1rem;
  letter-spacing: -0.005em;
}
.qa-q-link {
  color: inherit;
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.qa-q-link:hover { color: var(--ink-warm, #2A2418); }
.qa-full {
  margin: -0.6rem 0 1.2rem;
  font-size: 0.92rem;
}
.full-link {
  color: var(--ink-warm, #2A2418);
  text-decoration: underline solid currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.full-link:hover { color: var(--ink, #1a1a1a); }
.qa-a {
  font-size: 1.05rem;
  color: #2b2517;
  margin: 0 0 1.4rem;
  line-height: 1.65;
}
.qa-a p {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  color: #2b2517;
  line-height: 1.65;
}
.qa-a p:last-child { margin-bottom: 0; }
.qa-a strong { color: var(--ink, #1a1a1a); }
.qa-a a.wikilink {
  color: var(--link, #1d4ed8);
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.qa-a a.wikilink:hover {
  color: var(--ink-warm, #2A2418);
  text-decoration-style: solid;
}

/* "Read more" article links */
.qa-links {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 250, 230, 0.7);
  border-radius: 2px;
}
.qa-links-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted, #6b6b6b);
  margin: 0 0 0.55rem;
}
.qa-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
}
.qa-links li { margin: 0; }
.art-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--link, #1d4ed8);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  padding-bottom: 1px;
  cursor: pointer;
}
.art-link:hover { color: var(--ink-warm, #2A2418); border-bottom-style: solid; }
.art-link .meta {
  color: var(--muted, #6b6b6b);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.art-link.broken {
  color: var(--link-broken, #a01b1b);
  border-bottom: none;
  font-size: 0.86rem;
  cursor: not-allowed;
}

/* ---------- "Are you ready?" block ------------------------------------ */
.ready {
  margin: 2.4rem 0 1rem;
  padding: 1.6rem 1.5rem 1.8rem;
  background: rgba(247, 217, 82, 0.13);
  border-radius: 2px;
}
.ready-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.ready-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.ready-card {
  padding: 0 0.4rem;
}
.ready-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  letter-spacing: -0.005em;
  color: var(--ink-warm, #2A2418);
}
.ready-card-text {
  margin: 0;
  color: #2b2517;
  font-size: 0.96rem;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .ready-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* ---------- footer sections ------------------------------------------ */
.footer-section {
  margin: 3.5rem 0 1rem;
  padding: 2.2rem 0 0;
}
.footer-section + .footer-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
}
.fs-heading {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-warm, #2A2418);
  margin: 0 0 1.4rem;
}
.fs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2.5rem;
  align-items: start;
}
.fs-answer {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink, #1a1a1a);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.fs-comment {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: #2b2517;
  line-height: 1.6;
  max-width: 50ch;
}
.fs-comment a {
  color: var(--ink-warm, #2A2418);
  text-decoration: underline solid currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.fs-comment a:hover { color: var(--ink, #1a1a1a); }
@media (max-width: 720px) {
  .fs-grid { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* ---------- foot ------------------------------------------------------ */
.home-foot {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  color: var(--muted, #6b6b6b);
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
}

/* ---------- responsive ------------------------------------------------ */
@media (max-width: 820px) {
  .qa-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .q-tree {
    position: static;
    padding: 1rem 0;
  }
  .hero h1 { font-size: 1.85rem; }
  .qa-q { font-size: 1.3rem; }
}

/* ---------- article preview sidebar (slide-in) ----------------------- */
.article-sidebar {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(560px, 92vw);
  background: #fdfaf0;
  box-shadow: -8px 0 24px rgba(0,0,0,0.18);
  z-index: 100;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.24s ease-out;
  padding: 2.2rem 1.8rem 3rem;
  font-family: var(--font-display);
}
.article-sidebar.show { transform: translateX(0); }
.article-sidebar .close {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--muted, #6b6b6b);
  cursor: pointer;
}
.article-sidebar .close:hover { color: var(--ink, #1a1a1a); }
.article-sidebar .sidebar-meta {
  font-size: 0.82rem;
  color: var(--muted, #6b6b6b);
  margin: 0 0 0.6rem;
}
.article-sidebar .sidebar-meta a { color: inherit; text-decoration: underline dotted currentColor; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-sidebar .sidebar-title {
  font-size: 1.5rem;
  margin: 0 0 1rem;
  letter-spacing: -0.005em;
}
.article-sidebar .sidebar-fullink {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--link, #1d4ed8);
  text-decoration: underline solid currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-sidebar .loading { color: var(--muted, #6b6b6b); font-style: italic; }
.article-sidebar .err     { color: var(--link-broken, #a01b1b); }

.article-scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 12, 0.35);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.24s ease-out;
}
.article-scrim.show { opacity: 1; }

/* ---------- Strategy checker (inline on Strategy-checker tab) -------- */

.check-tool {
  /* Span the full .home width — no narrow column, consistent with the
   * other tab panels (FAQ, Framework, Knowledge Base). */
  margin: 0 0 2rem;
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--ink);
}
.check-tool-inline { margin-top: 0; }

/* Two-column layout: explanatory text on the left, form on the right.
 * Text column is intentionally narrower so the textarea has room to
 * breathe. Collapses to a single column under 820px so the form remains
 * usable on tablets and phones. */
.check-layout {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 2rem 3rem;
  align-items: start;
  margin-bottom: 1.8rem;
}
@media (max-width: 820px) {
  .check-layout {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
}

.check-hero { margin: 0; min-width: 0; }
.check-hero h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 0.9rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.check-hero .lead {
  font-size: 0.98rem;
  margin: 0 0 0.8rem;
}
.check-hero .hero-fine {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

.check-error {
  background: #fde9e9;
  border-left: 3px solid var(--link-broken);
  color: #6a1414;
  padding: 0.8rem 1rem;
  margin: 0 0 1.4rem;
  font-size: 0.95rem;
}

.check-form {
  margin: 0 0 2rem;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1.2rem 1.2rem 1rem;
}
.check-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-warm);
  display: block;
  margin: 0 0 0.45rem;
}
.check-form textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.8rem 0.9rem;
  resize: vertical;
}
.check-form textarea:focus {
  outline: 2px solid var(--ink-warm);
  outline-offset: -1px;
}
.check-form-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}
.check-submit {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: background 120ms;
}
.check-submit:hover { background: var(--ink-warm); border-color: var(--ink-warm); }
.check-submit:disabled { opacity: 0.6; cursor: progress; }
.check-form-fine { font-size: 0.82rem; color: var(--muted); font-style: italic; }

/* The report sits below the two-column layout. With the new 2-col card
 * layout (meta on left, assessment on right) we widen the report itself. */
.check-report {
  margin-top: 1rem;
  max-width: 1080px;
}
.check-report-header {
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
  margin-bottom: 1.6rem;
}
.check-report-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin-bottom: 1.2rem;
}
.check-report-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.005em;
}
.check-summary {
  margin: 0 0 1.8rem;
  max-width: 72ch;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.check-summary p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink);
}
.check-summary p:first-child {
  font-size: 1.08rem;
  color: var(--ink);
}
/* Big shiny tally cards */
.check-tally {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: stretch;
}
.check-tally li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0.95rem 1.5rem 0.85rem;
  min-width: 118px;
  border-radius: 4px;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03), inset 0 1px 0 rgba(255,255,255,0.5);
}
.check-tally .t-count {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.check-tally .t-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.45rem;
  opacity: 0.85;
}
.check-tally .t-solid {
  background: linear-gradient(180deg, #e7f5ec 0%, #d4ecd9 100%);
  border-color: #b6d9bf;
  color: #1f5e2e;
}
.check-tally .t-partial {
  background: linear-gradient(180deg, #fdf3d6 0%, #fbeed0 100%);
  border-color: #e6c97a;
  color: #7a5a05;
}
.check-tally .t-missing {
  background: linear-gradient(180deg, #fbe1e1 0%, #f5d6d6 100%);
  border-color: #e3a8a8;
  color: #6a1414;
}
.check-tally .t-total {
  background: transparent;
  border: 1px dashed var(--rule);
  box-shadow: none;
  color: var(--muted);
}
.check-tally .t-of {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.check-tally .t-total-count {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Status tabs (filter by Solid / Partial / Missing) */
.check-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.6rem;
}
.check-status-tab {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  color: var(--ink-warm);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.check-status-tab:hover:not(:disabled) {
  background: var(--paper);
  color: var(--ink);
}
.check-status-tab .check-status-tab-label {
  font-weight: 600;
  letter-spacing: 0.03em;
}
.check-status-tab .check-status-tab-count {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.05);
  line-height: 1;
}
.check-status-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.check-status-tab.t-solid.is-active {
  background: #d4ecd9;
  border-color: #b6d9bf;
  color: #1f5e2e;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.check-status-tab.t-solid.is-active .check-status-tab-count { background: rgba(31,94,46,0.12); }
.check-status-tab.t-partial.is-active {
  background: #fbeed0;
  border-color: #e6c97a;
  color: #7a5a05;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.check-status-tab.t-partial.is-active .check-status-tab-count { background: rgba(122,90,5,0.12); }
.check-status-tab.t-missing.is-active {
  background: #f5d6d6;
  border-color: #e3a8a8;
  color: #6a1414;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.check-status-tab.t-missing.is-active .check-status-tab-count { background: rgba(106,20,20,0.12); }
.check-status-tab.is-active:not(.t-solid):not(.t-partial):not(.t-missing) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.check-status-tab.is-active:not(.t-solid):not(.t-partial):not(.t-missing) .check-status-tab-count {
  background: rgba(255,255,255,0.18);
  color: var(--paper);
}

/* Hide cards filtered out by status tab — class beats display:grid on .check-group */
.check-group.is-filtered-out { display: none !important; }

.check-groups {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.check-group {
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-left-width: 4px;
  border-radius: 2px;
  padding: 1.1rem 1.2rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.4rem;
}
.check-group.check-status-solid   { border-left-color: #1f7a3a; }
.check-group.check-status-partial { border-left-color: #c89a14; }
.check-group.check-status-missing { border-left-color: var(--link-broken); }

.check-group-left  { min-width: 0; }
.check-group-right { min-width: 0; border-left: 1px dotted var(--rule); padding-left: 1.4rem; }

.check-group-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0 0 0.5rem;
}
.check-group-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.check-group-name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0 0 0.5rem;
  color: var(--ink);
  line-height: 1.3;
}
.check-group-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem 0.14rem;
  border-radius: 2px;
  white-space: nowrap;
}
.check-status-solid   .check-group-status { background: #d4ecd9; color: #1f5e2e; }
.check-status-partial .check-group-status { background: #fbeed0; color: #7a5a05; }
.check-status-missing .check-group-status { background: #f5d6d6; color: #6a1414; }

.check-group-attr {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.check-group-attr .check-attr-author { color: var(--ink-warm); }
.check-group-attr .check-attr-sep    { opacity: 0.5; }
.check-group-attr .check-attr-link {
  color: var(--ink-warm);
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.check-group-attr .check-attr-link:hover { color: var(--ink); text-decoration-style: solid; }

.check-group-principle {
  font-style: italic;
  color: var(--ink-warm);
  margin: 0 0 0.8rem;
  font-size: 0.94rem;
  line-height: 1.55;
}
.check-group-block { margin: 0 0 0.9rem; }
.check-group-block + .check-group-block { margin-top: 0; }
.check-group-right > .check-group-block:last-child { margin-bottom: 0; }
.check-block-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-warm);
  margin: 0 0 0.15rem;
}
.check-block-body {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.55;
}
.check-block-fix .check-block-body {
  background: rgba(255, 245, 154, 0.35);
  padding: 0.55rem 0.75rem;
  border-radius: 2px;
}
.check-group-refs {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0.8rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px dotted var(--rule);
}
.check-group-refs a {
  color: var(--ink);
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.check-group-refs a:hover { color: var(--ink-warm); text-decoration-style: solid; }

@media (max-width: 900px) {
  .check-group { grid-template-columns: 1fr; gap: 1rem; }
  .check-group-right {
    border-left: 0;
    padding-left: 0;
    border-top: 1px dotted var(--rule);
    padding-top: 1rem;
  }
}
@media (max-width: 720px) {
  .check-hero h2 { font-size: 1.4rem; }
  .check-group-head { flex-wrap: wrap; }
  .check-tally li { min-width: 92px; padding: 0.7rem 1rem 0.6rem; }
  .check-tally .t-count, .check-tally .t-total-count { font-size: 2rem; }
  .check-status-tabs { gap: 0.35rem; }
  .check-status-tab { font-size: 0.84rem; padding: 0.55rem 0.85rem; }
}

/* PDF / print button */
.check-pdf-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 0.55rem 0.95rem;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  align-self: center;
}
.check-pdf-btn:hover { background: var(--ink-warm); }
.check-pdf-btn::before {
  content: "↓ ";
  font-weight: 700;
}

/* Print-only blocks: hidden on screen, visible in PDF / print. */
.print-only { display: none; }

/* -------- Print rules -------- */
@media print {
  @page { margin: 14mm 12mm; }

  html, body {
    background: #fff !important;
    color: #111 !important;
  }
  body { font-size: 10.5pt; }

  /* Hide everything via visibility, then reveal only the report.
   * visibility (rather than display:none) preserves layout context so
   * the report doesn't get repositioned by a re-flowed page. */
  body * { visibility: hidden !important; }
  .check-report, .check-report * { visibility: visible !important; }

  /* Float the report to the top-left of the printable page. */
  .check-report {
    position: absolute !important;
    top: 0; left: 0; right: 0;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Things inside the report that should still be hidden when printed. */
  .check-status-tabs,
  .check-report-header-row,
  .check-report-header h3,
  .check-tally,
  .check-pdf-btn { display: none !important; visibility: hidden !important; }
  .check-report-header {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Print masthead */
  .print-only { display: block; }
  .print-masthead {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1.5pt solid #111;
    padding-bottom: 6pt;
    margin-bottom: 14pt;
  }
  .print-eyebrow {
    font-family: var(--font-mono);
    font-size: 8pt;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #555;
    margin: 0 0 4pt;
  }
  .print-title {
    font-family: var(--font-display);
    font-size: 22pt;
    margin: 0;
    letter-spacing: -0.01em;
  }
  .print-meta {
    font-family: var(--font-mono);
    font-size: 9pt;
    color: #444;
    margin: 0 0 3pt;
    text-align: right;
  }
  .print-tally span { font-weight: 700; }

  .print-strategy {
    margin: 0 0 14pt;
    padding: 8pt 10pt;
    background: #f6f4ef !important;
    border-left: 2pt solid #999;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-strategy h2 {
    font-family: var(--font-mono);
    font-size: 8.5pt;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
    margin: 0 0 4pt;
  }
  .print-strategy pre {
    margin: 0;
    font-family: var(--font-serif, Georgia, serif);
    font-size: 9.5pt;
    line-height: 1.45;
    white-space: pre-wrap;
    color: #222;
  }

  /* Summary */
  .check-summary {
    margin: 0 0 14pt !important;
    max-width: none !important;
  }
  .check-summary p {
    font-size: 11pt !important;
    line-height: 1.5 !important;
    margin: 0 0 6pt !important;
  }
  .check-summary p:first-child { font-size: 11pt !important; font-weight: 500; }

  /* Cards: stack into single column for clean page breaks */
  .check-groups {
    gap: 8pt !important;
    display: block !important;
  }
  .check-group {
    display: block !important;
    background: #fff !important;
    border: 0.5pt solid #ccc !important;
    border-left: 2.5pt solid #888 !important;
    border-radius: 0 !important;
    padding: 8pt 10pt !important;
    margin: 0 0 6pt !important;
    page-break-inside: avoid;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .check-group.check-status-solid   { border-left-color: #1f7a3a !important; }
  .check-group.check-status-partial { border-left-color: #c89a14 !important; }
  .check-group.check-status-missing { border-left-color: #a82121 !important; }

  .check-group-left, .check-group-right { min-width: 0; }
  .check-group-right {
    border-left: 0 !important;
    padding-left: 0 !important;
    margin-top: 4pt;
  }
  .check-group-head { gap: 6pt !important; margin: 0 0 3pt !important; }
  .check-group-num { font-size: 8.5pt !important; }
  .check-group-status {
    font-size: 7.5pt !important;
    padding: 1pt 4pt !important;
  }
  .check-status-solid   .check-group-status { background: #d4ecd9 !important; color: #1f5e2e !important; }
  .check-status-partial .check-group-status { background: #fbeed0 !important; color: #7a5a05 !important; }
  .check-status-missing .check-group-status { background: #f5d6d6 !important; color: #6a1414 !important; }

  .check-group-name { font-size: 12pt !important; margin: 0 0 3pt !important; }
  .check-group-attr { font-size: 8.5pt !important; margin: 0 0 4pt !important; }
  .check-group-principle {
    font-size: 9.5pt !important;
    line-height: 1.45 !important;
    margin: 0 0 5pt !important;
  }
  .check-group-block { margin: 0 0 5pt !important; }
  .check-block-label { font-size: 8pt !important; margin: 0 0 1pt !important; }
  .check-block-body {
    font-size: 10pt !important;
    line-height: 1.45 !important;
    margin: 0 !important;
  }
  .check-block-fix .check-block-body {
    background: #fff7d0 !important;
    padding: 4pt 6pt !important;
  }
  .check-group-refs {
    font-size: 8.5pt !important;
    margin: 4pt 0 0 !important;
    padding-top: 4pt !important;
    border-top: 0.5pt dotted #aaa !important;
  }

  /* Suppress URL hints next to links in print */
  a { color: #111 !important; text-decoration: none !important; }
}

/* On-screen "is-printing" class (used as a brief pre-print hook). */
.is-printing .article-sidebar,
.is-printing .article-scrim { display: none !important; }

/* ------- PDF capture mode -------
 * html2pdf renders the report element with current screen styles. While the
 * `is-pdfing` class is applied we slim the report into a single column and
 * hide controls that don't belong in a static document. */
body.is-pdfing {
  background: #fff;
}
body.is-pdfing .check-report {
  max-width: 720px !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.is-pdfing .check-pdf-btn,
body.is-pdfing .check-status-tabs,
body.is-pdfing .article-sidebar,
body.is-pdfing .article-scrim { display: none !important; }
body.is-pdfing .check-report-header { border-top: 0 !important; padding-top: 0 !important; }

/* Reveal the print-only masthead inside the PDF as well. */
body.is-pdfing .print-only { display: block !important; }
body.is-pdfing .print-masthead { display: flex !important; }

/* Single-column cards inside PDF; respect page breaks. */
body.is-pdfing .check-group {
  display: block !important;
  background: #fff !important;
  page-break-inside: avoid;
  break-inside: avoid;
}
body.is-pdfing .check-group-right {
  border-left: 0 !important;
  padding-left: 0 !important;
  margin-top: 0.6rem;
  border-top: 1px dotted var(--rule);
  padding-top: 0.6rem;
}
body.is-pdfing .check-tally li { min-width: 96px; padding: 0.7rem 1rem 0.6rem; }
body.is-pdfing .check-tally .t-count,
body.is-pdfing .check-tally .t-total-count { font-size: 2rem; }
