/* 10cric — Rummy & Skill-Game Editorial Hub
   Sandstone Matchday palette + Manrope / Noto Sans Devanagari.
   Light-dominant, asymmetric editorial layout. */

:root {
  --primary: #B64B28;
  --primary-ink: #7a2f17;
  --accent: #0B6E69;
  --accent-ink: #074d49;
  --background: #FFF8F2;
  --surface: #FFFFFF;
  --surface-2: #FCE8D7;
  --surface-3: #F6E2CC;
  --ink: #312019;
  --ink-soft: #4d3a2e;
  --muted: #745D50;
  --muted-2: #8e7867;
  --border: #EBCDBA;
  --border-strong: #c79a73;
  --rule: #d9b691;
  --gold: #b08538;
  --warning: #8a3a18;
  --shadow-soft: 0 1px 0 rgba(124, 76, 38, 0.08), 0 12px 28px -18px rgba(124, 76, 38, 0.22);
  --radius: 6px;
  --radius-lg: 12px;
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --serif-h: 'Manrope', 'Inter', system-ui, sans-serif;
  --body: 'Manrope', 'Inter', system-ui, sans-serif;
  --devanagari: 'Noto Sans Devanagari', 'Manrope', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--background);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary); }
button { font-family: inherit; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 28px 0; }

/* Layout primitives */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.row { display: grid; gap: 24px; }
.row.two { grid-template-columns: 1fr; }
.row.three { grid-template-columns: 1fr; }
.row.split-7-5 { grid-template-columns: 1fr; }
.row.split-6-6 { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .row.two { grid-template-columns: 1.4fr 1fr; }
  .row.three { grid-template-columns: repeat(3, 1fr); }
  .row.split-7-5 { grid-template-columns: 7fr 5fr; }
  .row.split-6-6 { grid-template-columns: 1fr 1fr; }
}
.eyebrow { font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary); }
h1, h2, h3, h4 { font-family: var(--serif-h); color: var(--ink); margin: 0 0 12px; line-height: 1.18; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -0.015em; }
h2 { font-size: clamp(26px, 3vw, 34px); margin-top: 0; }
h3 { font-size: 21px; }
h4 { font-size: 17px; }
p { margin: 0 0 14px; color: var(--ink-soft); }
small { color: var(--muted); }
strong { color: var(--ink); }
.lede { font-size: clamp(17px, 2vw, 19px); line-height: 1.55; color: var(--ink-soft); max-width: 60ch; }

/* ─── Site header / mega menu ─── */
.site-header {
  position: sticky; top: 0; z-index: 250;
  background: rgba(255, 248, 242, 0.94);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header.is-stuck { box-shadow: 0 1px 0 rgba(124, 76, 38, 0.05); }
.header-inner {
  display: flex; align-items: center; gap: 24px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 12px var(--gutter);
}
.brand-mark {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.brand-mark .logo {
  width: 36px; height: 36px; border-radius: 4px;
  background: var(--ink); color: #FFE6CB;
  display: grid; place-items: center;
  font-family: var(--serif-h); font-weight: 800;
  font-size: 17px; letter-spacing: -0.04em;
}
.brand-mark .name {
  font-family: var(--serif-h); font-weight: 800;
  font-size: 19px; letter-spacing: -0.01em;
}
.brand-mark .tag {
  display: block; font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}
@media (max-width: 720px) { .brand-mark .tag { display: none; } }

.main-nav {
  display: none;
  align-items: center; gap: 4px;
  margin-left: 8px; flex: 1;
}
.main-nav a {
  text-decoration: none; color: var(--ink-soft);
  padding: 10px 12px; border-radius: var(--radius);
  font-size: 14.5px; font-weight: 600;
  letter-spacing: 0.01em;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--primary); background: var(--surface-2);
}
.main-nav a.cta-ghost {
  border: 1px solid var(--border-strong);
  color: var(--ink);
  margin-left: 4px;
}
.main-nav a.cta-solid {
  background: var(--primary); color: #FFE9D9;
}
.main-nav a.cta-solid:hover { background: var(--primary-ink); color: #FFE9D9; }
@media (min-width: 980px) { .main-nav { display: flex; } }

.header-right { display: none; gap: 8px; align-items: center; margin-left: auto; }
@media (min-width: 980px) { .header-right { display: flex; } }
.btn-ghost {
  border: 1px solid var(--border-strong);
  background: transparent; color: var(--ink);
  padding: 9px 14px; border-radius: var(--radius);
  font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-primary {
  background: var(--primary); color: #FFE9D9;
  border: 1px solid var(--primary);
  padding: 9px 16px; border-radius: var(--radius);
  font-weight: 700; font-size: 14px; cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover { background: var(--primary-ink); border-color: var(--primary-ink); color: #FFE9D9; }

.hamburger {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 42px; height: 42px;
  margin-left: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer; position: relative; z-index: 300;
}
.hamburger[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); }
.hamburger span,
.hamburger span::before,
.hamburger span::after {
  display: block; width: 18px; height: 2px;
  background: var(--ink); border-radius: 2px;
  position: relative;
  transition: transform 0.18s, opacity 0.18s;
}
.hamburger span::before, .hamburger span::after { content: ''; position: absolute; left: 0; }
.hamburger span::before { top: -6px; }
.hamburger span::after { top: 6px; }
.hamburger[aria-expanded="true"] span { background: transparent; }
.hamburger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); background: #FFE9D9; }
.hamburger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); background: #FFE9D9; }
@media (min-width: 980px) { .hamburger { display: none; } }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  background: var(--background);
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 36px -16px rgba(124, 76, 38, 0.32);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  z-index: 220;
  padding: 84px 22px 28px;
  overflow-y: auto;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer[aria-hidden="true"] { visibility: hidden; }
.drawer-nav a {
  display: block; padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 600;
  text-decoration: none; color: var(--ink);
}
.drawer-nav a.cta { color: var(--primary); }
.scrim {
  position: fixed; inset: 0;
  background: rgba(49, 32, 25, 0.42);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 210;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }
body.is-locked { overflow: hidden; }

/* ─── Cover / hero ─── */
.cover {
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(1100px 460px at 8% -20%, rgba(252, 232, 215, 0.9), transparent 70%),
    radial-gradient(900px 320px at 100% 0%, rgba(11, 110, 105, 0.07), transparent 60%),
    var(--background);
}
.cover-grid {
  display: grid; gap: 28px;
  grid-template-columns: minmax(0, 1fr);
  padding: 36px 0 44px;
}
@media (min-width: 900px) {
  .cover-grid { grid-template-columns: 7fr minmax(0, 5fr); gap: 44px; padding: 56px 0 64px; }
}
.cover-field {
  position: relative; border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden; min-height: 360px;
}
.cover-field img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 16/11; }
.cover-field .caption {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(255, 248, 242, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.cover-ledger {
  display: flex; flex-direction: column; gap: 14px;
}
.cover-ledger .ed-date {
  font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.cover-ledger h1 { font-size: clamp(30px, 4vw, 44px); }
.cover-ledger .lede { color: var(--ink-soft); }
.cover-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.cover-actions .btn-primary,
.cover-actions .btn-ghost { padding: 12px 18px; font-size: 15px; }
.cover-meta {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--rule);
}
.cover-meta dt { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.cover-meta dd { font-size: 14px; color: var(--ink); font-weight: 600; margin: 0; }

/* ─── Compliance / scope strip ─── */
.boundary-strip {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.boundary-strip .wrap {
  display: grid; gap: 18px;
  padding-top: 18px; padding-bottom: 18px;
  grid-template-columns: 1fr;
  font-size: 14.5px;
}
@media (min-width: 900px) { .boundary-strip .wrap { grid-template-columns: 1fr 1fr 1fr; } }
.boundary-cell { display: flex; gap: 10px; align-items: flex-start; }
.boundary-cell .pip {
  flex: none; width: 28px; height: 28px; border-radius: 4px;
  background: var(--ink); color: #FFE9D9;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.boundary-cell .text small { display: block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 2px; }

/* ─── Section shells ─── */
section.band { padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--rule); }
section.band.tight { padding: 32px 0; }
section.band.tone-paper { background: var(--background); }
section.band.tone-cream { background: var(--surface-2); }
section.band.tone-white { background: var(--surface); }
section.band.tone-rule { background: linear-gradient(180deg, var(--background), var(--surface-2) 60%, var(--background)); }
.section-head { display: grid; gap: 8px; margin-bottom: 26px; max-width: 720px; }
.section-head h2 { margin-bottom: 4px; }
.section-head .kicker { display: flex; gap: 12px; align-items: baseline; color: var(--muted); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.section-head .kicker .num {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--ink); color: #FFE9D9;
  font-weight: 800; font-size: 13px; letter-spacing: 0;
}
.section-head .lede { max-width: 64ch; }

/* Ledger spreads (signature device) */
.ledger {
  display: grid; gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
}
@media (min-width: 900px) { .ledger { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; padding: 28px; } }
.ledger-art { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.ledger-art img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.ledger-art .callouts { position: absolute; inset: 0; pointer-events: none; }
.ledger-art .callout {
  position: absolute; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #FFE9D9;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
  border: 2px solid #FFE9D9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.ledger-body { display: flex; flex-direction: column; gap: 12px; }
.ledger-body .label { font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); font-weight: 700; }
.ledger-body h3 { margin: 0; }
.ledger-body p { margin: 0; }
.ledger-list { display: grid; gap: 10px; margin-top: 4px; }
.ledger-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; list-style: none; padding: 0; }
.ledger-list .n {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: 4px; background: var(--ink); color: #FFE9D9;
  font-size: 12px; font-weight: 800;
}
.ledger-list .t { font-size: 14.5px; color: var(--ink-soft); }
.ledger-list .t strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.verify-line {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  border-top: 1px dashed var(--rule);
  margin-top: 8px; padding-top: 12px;
  font-size: 12.5px; color: var(--muted);
}
.verify-line strong { color: var(--accent-ink); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; font-size: 11.5px; }

/* Tabbed comparison */
.tabs { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.tabs input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.tabs .tablist {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.tabs .tablist label {
  text-align: center; padding: 14px 10px; cursor: pointer;
  font-weight: 700; font-size: 14px; color: var(--ink-soft);
  border-right: 1px solid var(--border);
}
.tabs .tablist label:last-child { border-right: 0; }
.tabs input[type="radio"]:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
.tabs input[type="radio"]:checked + label {
  background: var(--ink); color: #FFE9D9;
}
.tabs .panels { padding: 22px; }
.tabs .panel { display: none; }
.tabs #tab-points:checked ~ .panels #panel-points,
.tabs #tab-deals:checked ~ .panels #panel-deals,
.tabs #tab-pool:checked ~ .panels #panel-pool { display: block; }
.tab-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .tab-grid { grid-template-columns: 1.1fr 1fr; } }
.tab-grid table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tab-grid th, .tab-grid td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tab-grid th { background: var(--surface-2); font-weight: 700; color: var(--ink); }
.tab-grid td:first-child { font-weight: 600; }
.tab-grid .meta-list { display: grid; gap: 8px; }
.tab-grid .meta-list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; list-style: none; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.tab-grid .meta-list .k { font-weight: 600; color: var(--ink); }
.tab-grid .meta-list .v { color: var(--muted); font-size: 13.5px; }

/* Hand timeline */
.timeline { display: grid; gap: 0; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.timeline-step { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.timeline-step:last-child { border-bottom: 0; }
.timeline-step .step-no {
  width: 44px; height: 44px; border-radius: 4px;
  background: var(--ink); color: #FFE9D9;
  display: grid; place-items: center;
  font-family: var(--serif-h); font-weight: 800; font-size: 17px;
}
.timeline-step .step-body h4 { margin: 0 0 4px; }
.timeline-step .step-body p { margin: 0; }
.timeline-step .decision {
  margin-top: 10px; padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(11, 110, 105, 0.06);
  font-size: 13.5px;
}
.timeline-step .decision strong { color: var(--accent-ink); display: block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
@media (max-width: 600px) { .timeline-step { grid-template-columns: 1fr; gap: 8px; } }

/* Scoring worksheet */
.worksheet {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
}
@media (max-width: 899px) { .worksheet { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 900px) { .worksheet { grid-template-columns: 1.1fr minmax(0, 1fr); } }
.worksheet { min-width: 0; }
.worksheet > * { min-width: 0; max-width: 100%; }
.worksheet > div,
.worksheet > table { overflow-x: auto; }
.worksheet > table { display: block; }
.worksheet img { width: 100%; height: 100%; border: 1px solid var(--border); border-radius: var(--radius); aspect-ratio: 5/4; object-fit: cover; }
.worksheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.worksheet th, .worksheet td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.worksheet th { background: var(--surface-2); font-weight: 700; }
.worksheet tfoot td { font-weight: 700; background: var(--surface-3); }
.worksheet .lede-sm { font-size: 14px; color: var(--muted); }

/* Strategy desk (limits) */
.desk {
  display: grid; gap: 18px; grid-template-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
@media (min-width: 800px) { .desk { grid-template-columns: 1fr 1fr; } }
.desk .col { padding: 22px; }
.desk .col.boundary { background: var(--surface-3); border-right: 0; }
@media (min-width: 800px) { .desk .col.boundary { border-right: 1px solid var(--border); } }
.desk h4 { margin-top: 0; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.desk ul { margin: 0; padding-left: 0; display: grid; gap: 8px; }
.desk ul li { list-style: none; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); font-size: 14px; }
.desk .col.boundary ul li { background: var(--surface); border-color: var(--border-strong); }
.desk .col.boundary ul li::before { content: '✕'; color: var(--primary); font-weight: 800; margin-right: 6px; }
.desk .col.allow ul li::before { content: '✓'; color: var(--accent); font-weight: 800; margin-right: 6px; }

/* Review grid */
.review-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .review-grid { grid-template-columns: repeat(2, 1fr); } }
.review-grid article {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  border: 1px solid var(--border); background: var(--surface);
  padding: 18px; border-radius: var(--radius-lg);
}
.review-grid article .score {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--serif-h); font-weight: 800; color: var(--primary);
  font-size: 22px;
}
.review-grid article .score small { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.review-grid article h4 { margin: 0; }
.review-grid article p { margin: 0; font-size: 14px; }
.review-grid article .bar {
  height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden;
}
.review-grid article .bar span { display: block; height: 100%; background: var(--accent); }

/* Verification checklist */
.check-rail { display: grid; gap: 14px; }
.check-rail ol { list-style: none; margin: 0; padding: 0; counter-reset: c; display: grid; gap: 12px; }
.check-rail li {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-lg); padding: 14px 16px;
  counter-increment: c;
}
.check-rail li::before {
  content: counter(c, decimal-leading-zero);
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 4px;
  background: var(--ink); color: #FFE9D9;
  font-family: var(--serif-h); font-weight: 800; font-size: 14px;
}
.check-rail li .text strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.check-rail li .text small { display: block; color: var(--muted); font-size: 13px; }
.check-rail li .pill {
  align-self: center;
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px;
  background: rgba(11, 110, 105, 0.10); color: var(--accent-ink); font-weight: 700;
}

/* Contextual first-party route */
.route {
  display: grid; gap: 18px; grid-template-columns: 1fr;
  border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: var(--radius-lg); overflow: hidden;
}
@media (min-width: 800px) { .route { grid-template-columns: 1.4fr 1fr; } }
.route .copy { padding: 24px; }
.route .copy h3 { margin: 0 0 8px; }
.route .copy p { margin: 0; }
.route .panel { background: var(--ink); color: #FFE9D9; padding: 24px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.route .panel small { color: rgba(255, 233, 217, 0.72); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.route .panel a {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #FFE9D9;
  padding: 14px 20px; border-radius: var(--radius);
  font-weight: 800; font-size: 16px;
  text-decoration: none;
}
.route .panel a:hover { background: var(--primary-ink); }
.route .panel .small-link { font-size: 12px; color: rgba(255, 233, 217, 0.7); text-decoration: underline; }
.route .panel .small-link a { color: #FFD7B5; padding: 0; background: transparent; }

/* Control map */
.controls-map { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .controls-map { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .controls-map { grid-template-columns: repeat(4, 1fr); } }
.control-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.control-card .icon {
  width: 40px; height: 40px; border-radius: 4px;
  background: var(--surface-2); color: var(--primary);
  display: grid; place-items: center;
  font-family: var(--serif-h); font-weight: 800; font-size: 18px;
}
.control-card h4 { margin: 0; font-size: 15px; }
.control-card p { margin: 0; font-size: 13.5px; }
.control-card .tagline {
  font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 700;
}

/* Dated feed (news register) */
.feed { display: grid; gap: 0; border-top: 1px solid var(--border); }
.feed-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); align-items: start; }
.feed-row time { color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.feed-row h4 { margin: 0 0 4px; }
.feed-row p { margin: 0; font-size: 14px; }
.feed-row .topic {
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--primary); padding: 4px 8px; border-radius: 4px;
  background: var(--surface-2);
  align-self: start;
}
@media (max-width: 640px) {
  .feed-row { grid-template-columns: 1fr; }
}

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-lg); padding: 16px 18px;
}
.faq summary {
  font-weight: 700; font-size: 16px; color: var(--ink); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; color: var(--primary); line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details > p { margin: 12px 0 0; }

/* Colophon */
.colophon { display: grid; gap: 18px; grid-template-columns: 1fr; font-size: 13.5px; color: var(--ink-soft); }
@media (min-width: 800px) { .colophon { grid-template-columns: 1.2fr 1fr; } }
.colophon .item h4 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin-bottom: 6px; }

/* Hubs strip */
.hubs-strip { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .hubs-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .hubs-strip { grid-template-columns: repeat(3, 1fr); } }
.hub-card {
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-lg); padding: 18px;
  text-decoration: none; color: inherit;
}
.hub-card:hover { border-color: var(--border-strong); }
.hub-card .top { display: flex; gap: 12px; align-items: center; }
.hub-card .ic {
  width: 44px; height: 44px; border-radius: 4px; background: var(--surface-2);
  display: grid; place-items: center; color: var(--primary);
  font-family: var(--serif-h); font-weight: 800; font-size: 18px;
}
.hub-card .lede-mini { color: var(--muted); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.hub-card h3 { margin: 0; font-size: 18px; color: var(--ink); }
.hub-card p { margin: 0; font-size: 14px; }
.hub-card .more {
  font-size: 13px; color: var(--primary); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* Tables of contents / TOC */
.toc { display: grid; gap: 6px; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: t; display: grid; gap: 6px; }
.toc li { counter-increment: t; display: grid; grid-template-columns: 28px 1fr; gap: 8px; font-size: 14px; }
.toc li::before {
  content: counter(t, decimal-leading-zero);
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  background: var(--surface-2); border-radius: 4px;
  color: var(--primary); font-weight: 800; font-size: 12px;
}

/* Footer */
.site-footer {
  background: var(--ink); color: #D7C7B4;
  padding: 56px 0 36px; margin-top: 0;
}
.site-footer a { color: #FFE9D9; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid {
  display: grid; gap: 28px; grid-template-columns: 1fr;
  font-size: 14.5px;
}
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid h4 { color: #FFE9D9; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-bottom {
  border-top: 1px solid #4d3a2e;
  margin-top: 36px; padding-top: 22px;
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
  font-size: 12.5px;
}
@media (min-width: 800px) { .footer-bottom { grid-template-columns: 1fr auto; align-items: center; } }
.footer-bottom .legal { color: #a59180; }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px;
  z-index: 240;
  background: var(--ink);
  border-radius: 10px;
  padding: 12px;
  display: none;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.45);
  border: 1px solid #4d3a2e;
}
@media (max-width: 899px) { .sticky-cta { display: flex; } }
.sticky-cta .label {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #FFD7B5; font-weight: 700;
}
.sticky-cta .small { font-size: 11.5px; color: #C7A88A; }
.sticky-cta a {
  flex: 1 1 auto;
  background: var(--primary); color: #FFE9D9;
  text-align: center; text-decoration: none;
  padding: 12px 14px; border-radius: 6px;
  font-weight: 800; font-size: 15px; letter-spacing: 0.04em;
}
.sticky-cta a:hover { background: var(--primary-ink); }
.sticky-cta .close {
  flex: none; width: 36px; height: 36px;
  background: transparent; border: 1px solid #6b4f3a; color: #FFD7B5;
  border-radius: 6px; cursor: pointer;
}
body.has-sticky-cta { padding-bottom: 96px; }
@media (min-width: 900px) { body.has-sticky-cta { padding-bottom: 0; } }

/* Article shell */
.article-hero { padding: 40px 0 24px; border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.article-hero .wrap { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .article-hero .wrap { grid-template-columns: 1.4fr minmax(0, 1fr); align-items: center; } }
.article-hero img { width: 100%; height: 100%; border: 1px solid var(--border); border-radius: var(--radius-lg); aspect-ratio: 16/10; object-fit: cover; }
.article-hero .crumbs { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.article-hero .crumbs a { color: var(--primary); }
.article-hero h1 { font-size: clamp(28px, 4vw, 42px); }
.article-hero .byline { font-size: 13px; color: var(--muted); margin-top: 10px; }
.article-body { padding: 32px 0 48px; }
.article-body .wrap { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .article-body .wrap { grid-template-columns: minmax(0, 1fr) 280px; } }
.article-body main { min-width: 0; }
.article-body main h2 { margin-top: 28px; font-size: 24px; }
.article-body main h3 { margin-top: 22px; }
.article-body main figure { margin: 18px 0; }
.article-body main figure img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.article-body main figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.article-body aside { font-size: 14px; }
.article-body aside .sticky-side { position: sticky; top: 80px; display: grid; gap: 16px; }
.article-body aside .aside-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.article-body aside .aside-card h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.article-body aside .aside-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.article-body aside .aside-card li { font-size: 14px; }

/* Lists inside articles */
.steps { counter-reset: st; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps > li {
  counter-increment: st;
  display: grid; grid-template-columns: 40px 1fr; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.steps > li::before {
  content: counter(st);
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 4px; background: var(--ink); color: #FFE9D9;
  font-family: var(--serif-h); font-weight: 800;
}

/* Highlight cards */
.note { border-left: 4px solid var(--accent); background: rgba(11, 110, 105, 0.05); padding: 14px 16px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 14.5px; color: var(--ink); }
.note strong { color: var(--accent-ink); }

/* Buttons used in body */
.action-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Responsive helpers */
@media (max-width: 480px) {
  .feed-row { grid-template-columns: 1fr; }
  .tabs .tablist { grid-template-columns: 1fr; }
  .tabs .tablist label { border-right: 0; border-bottom: 1px solid var(--border); }
  .tab-grid { grid-template-columns: 1fr; }
  .cover-field { min-height: 240px; }
  .worksheet { grid-template-columns: minmax(0, 1fr); }
  .ledger { grid-template-columns: minmax(0, 1fr); }
  .cover-grid { grid-template-columns: minmax(0, 1fr); }
  .article-hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .article-body .wrap { grid-template-columns: minmax(0, 1fr); }
}

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: #FFE9D9;
  padding: 10px 14px; border-radius: 4px; z-index: 1000;
}
.skip:focus { left: 12px; }

/* 404 / 500 */
.error-shell { min-height: 100dvh; display: grid; place-items: center; padding: 40px; text-align: center; }
.error-shell h1 { font-size: 64px; margin: 0 0 12px; }
.error-shell p { max-width: 60ch; margin: 0 auto 16px; }

/* Print style */
@media print {
  .site-header, .site-footer, .sticky-cta, .hamburger, .scrim, .mobile-drawer { display: none !important; }
  body { background: white; color: black; }
  a { color: black; }
}