/* ==========================================================================
   Chokla corporate brand stylesheet (chokla.biz)

   Enterprise register: hairline rules, squared corners, restrained motion,
   generous whitespace, and brand green used as an accent rather than a
   surface. Tokens trace back to the product palette in
   chokla-mobile/src/styles/colors.ts, #4EC983 is the single accent truth.
   ========================================================================== */

:root {
  /* Brand */
  --brand:            #4EC983;
  --brand-light:      #67D999;
  --brand-dark:       #3BA86D;
  --brand-deep:       #168A4B;   /* accent text / primary action */
  --brand-deeper:     #0F6B39;
  --brand-wash:       #F1FAF5;

  /* Corporate dark, used for the contrast band and the footer */
  --corp:             #0C1A13;
  --corp-2:           #12251B;

  /* Surfaces, cool neutrals, not tinted green */
  --canvas:           #FFFFFF;
  --surface:          #F7F8F8;
  --surface-2:        #FFFFFF;
  --surface-3:        #F1F3F2;

  /* Content */
  --ink:              #10201A;
  --ink-2:            #40514A;
  --ink-3:            #6B7A73;
  --ink-inv:          #FFFFFF;

  /* Rules */
  --rule:             #E3E7E5;
  --rule-2:           #CDD4D1;

  --shadow-sm: 0 1px 2px rgba(16, 32, 26, .06);
  --shadow-md: 0 6px 24px rgba(16, 32, 26, .08);
  --shadow-lg: 0 24px 60px rgba(16, 32, 26, .14);

  --r-xs: 3px;
  --r:    5px;
  --r-lg: 8px;

  --maxw: 1240px;
  --gutter: clamp(20px, 4.5vw, 56px);

  /* Display serif for headings gives the page the register of a corporate
     report rather than a product landing page. Body stays in the system sans
     for legibility at small sizes and in the legal documents. */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                  Georgia, "Times New Roman", serif;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(.4, 0, .2, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --brand-wash:       #12291D;

  --canvas:           #0B120E;
  --surface:          #101813;
  --surface-2:        #131C17;
  --surface-3:        #18231C;

  --corp:             #060B08;
  --corp-2:           #0D1711;

  --ink:              #EDF2EF;
  --ink-2:            #AEBCB5;
  --ink-3:            #7F8F88;

  --rule:             #23302A;
  --rule-2:           #35443C;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
html[data-theme="dark"] a { color: var(--brand-light); }

:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
html[data-theme="dark"] :focus-visible { outline-color: var(--brand); }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 2000;
  background: var(--brand-deep); color: #fff;
  padding: 10px 18px; border-radius: var(--r); font-weight: 600; font-size: .9rem;
}
.skip-link:focus { left: 12px; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%; max-width: var(--maxw);
  margin-inline: auto; padding-inline: var(--gutter);
}
.section { padding-block: clamp(56px, 7vw, 96px); }
.section--tint { background: var(--surface); }
.section--rule { border-top: 1px solid var(--rule); }

/* ---------- Type ---------- */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.012em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 3.1vw, 2.6rem); line-height: 1.14; }
h2 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); }
h3, h4 { font-weight: 600; line-height: 1.35; letter-spacing: -.008em; }
h3 { font-size: 1.02rem; }
h4 { font-size: .93rem; }

p { text-wrap: pretty; }
.lede { font-size: clamp(.98rem, 1.1vw, 1.05rem); color: var(--ink-2); line-height: 1.68; max-width: 68ch; }
.muted { color: var(--ink-3); }
.small { font-size: .84rem; }

/* Section eyebrow, a numbered rule, not a pill. Reads as a document. */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 14px; margin-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}
.eyebrow b { color: var(--brand-deep); font-weight: 600; }
html[data-theme="dark"] .eyebrow b { color: var(--brand); }

.section-head { max-width: 70ch; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { margin-top: 14px; }
.section-head p + p { margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .9rem; font-weight: 600; letter-spacing: -.005em;
  padding: 11px 22px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn--primary { background: var(--brand-deep); color: #fff; border-color: var(--brand-deep); }
.btn--primary:hover { background: var(--brand-deeper); border-color: var(--brand-deeper); }
html[data-theme="dark"] .btn--primary { background: var(--brand); border-color: var(--brand); color: #08160E; }
html[data-theme="dark"] .btn--primary:hover { background: var(--brand-light); border-color: var(--brand-light); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn--ghost:hover { border-color: var(--ink-3); background: var(--surface-3); }

.btn--sm { padding: 8px 16px; font-size: .84rem; }

/* Inline text link with an arrow, the enterprise "learn more" affordance. */
.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .88rem; font-weight: 600; color: var(--brand-deep);
}
html[data-theme="dark"] .link-arrow { color: var(--brand); }
.link-arrow::after {
  content: "→"; transition: transform .15s var(--ease); font-weight: 400;
}
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Utility bar ---------- */
.utility {
  background: var(--corp);
  color: rgba(255, 255, 255, .72);
  font-size: .78rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.utility .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 38px; flex-wrap: wrap;
}
.utility a { color: rgba(255, 255, 255, .82); }
.utility a:hover { color: #fff; }
.utility-legal { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 640px) { .utility-entity { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav { display: flex; align-items: center; gap: 18px; height: 66px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 640; font-size: 1.06rem; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none !important;
  margin-right: auto;
}
.brand img { width: 26px; height: auto; }
.brand-divider {
  width: 1px; height: 20px; background: var(--rule-2); margin-inline: 4px;
}
.brand-sub {
  font-family: var(--mono);
  font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  color: var(--ink-2); font-size: .87rem; font-weight: 500; white-space: nowrap;
  padding: 8px 12px; border-radius: var(--r-xs);
  text-decoration: none !important;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--surface-3); }
.nav-links a[aria-current="page"] { color: var(--brand-deep); }
html[data-theme="dark"] .nav-links a[aria-current="page"] { color: var(--brand); }

.nav-tools { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: var(--r); border: 1px solid var(--rule);
  background: var(--surface-2); color: var(--ink-2); cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.icon-btn:hover { border-color: var(--rule-2); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .i-sun { display: none; }
html[data-theme="dark"] .icon-btn .i-sun { display: block; }
html[data-theme="dark"] .icon-btn .i-moon { display: none; }

.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-links {
    position: fixed; inset: 66px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 18px;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav-links[data-open="true"] { display: flex; }
  .nav-links a { padding: 13px 4px; font-size: .96rem; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav-toggle { display: grid; }
  .nav .btn--primary { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(52px, 7vw, 92px) clamp(44px, 5vw, 68px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--brand-deep); }
html[data-theme="dark"] .hero h1 em { color: var(--brand); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Key-facts panel, replaces the decorative art with something a reviewer uses. */
.factpanel {
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brand-deep);
  background: var(--surface-2);
  border-radius: var(--r);
}
html[data-theme="dark"] .factpanel { border-top-color: var(--brand); }
.factpanel h2 {
  font-family: var(--mono);
  font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 16px 20px; border-bottom: 1px solid var(--rule);
}
.factpanel dl { margin: 0; }
.factpanel > dl > div { display: grid; gap: 3px; padding: 13px 20px; border-bottom: 1px solid var(--rule); }
.factpanel > dl > div:last-child { border-bottom: 0; }
.factpanel dt { font-size: .76rem; color: var(--ink-3); letter-spacing: .01em; }
.factpanel dd { font-size: .93rem; font-weight: 550; color: var(--ink); }

/* ---------- Metrics strip ---------- */
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.metrics > div { padding: 26px clamp(18px, 2.4vw, 32px); border-right: 1px solid var(--rule); }
.metrics > div:last-child { border-right: 0; }
@media (max-width: 760px) {
  .metrics > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .metrics > div:last-child { border-bottom: 0; }
}
.metrics dt {
  font-family: var(--mono);
  font-size: .68rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px;
}
.metrics dd { font-size: 1.16rem; font-weight: 600; letter-spacing: -.015em; color: var(--ink); line-height: 1.35; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 0; }
.grid--3, .grid--2 {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 940px) { .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface-2);
  padding: clamp(24px, 2.6vw, 34px);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background-color .15s var(--ease);
}
.grid--3 .card:nth-child(3n), .grid--2 .card:nth-child(2n) { border-right: 0; }
.grid > .card:last-child { border-bottom: 0; }
@media (max-width: 940px) {
  .grid--3 .card { border-right: 0; }
  .grid--3 .card:last-child { border-bottom: 0; }
}
@media (max-width: 720px) {
  .grid--2 .card { border-right: 0; }
  .grid--2 .card:last-child { border-bottom: 0; }
}
/* Rows beyond the first in a 3-up still need their bottom rule removed. */
.grid--3 .card:nth-last-child(-n+3):nth-child(3n+1),
.grid--3 .card:nth-last-child(-n+3):nth-child(3n+1) ~ .card { border-bottom: 0; }
@media (max-width: 940px) {
  .grid--3 .card:nth-last-child(-n+3):nth-child(3n+1) ~ .card { border-bottom: 1px solid var(--rule); }
  .grid--3 .card:last-child { border-bottom: 0; }
}
.card:hover { background: var(--surface); }
.card h3 { margin-bottom: 9px; }
.card p { color: var(--ink-2); font-size: .93rem; }

.card-icon { color: var(--brand-deep); margin-bottom: 16px; }
html[data-theme="dark"] .card-icon { color: var(--brand); }
.card-icon svg { width: 22px; height: 22px; }

.card-num {
  font-family: var(--mono);
  font-size: .7rem; font-weight: 600; letter-spacing: .13em;
  color: var(--ink-3); margin-bottom: 12px;
}
.card-num b { color: var(--brand-deep); font-weight: 600; }
html[data-theme="dark"] .card-num b { color: var(--brand); }

/* ---------- Capability register ----------
   A dense, scannable list of platform domains. Reads as a schedule in a
   corporate filing rather than a feature grid. */
.capabilities { border-top: 1px solid var(--rule); }
.capability {
  display: grid;
  grid-template-columns: 44px minmax(180px, 260px) minmax(0, 1fr);
  gap: 6px 28px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 780px) {
  .capability { grid-template-columns: 44px minmax(0, 1fr); }
  .capability p { grid-column: 2; }
}
.capability .idx {
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  color: var(--ink-3); padding-top: 2px;
}
.capability h3 { color: var(--ink); }
.capability p { color: var(--ink-2); font-size: .92rem; margin: 0; }

/* ---------- Controls list (compliance / assurance) ---------- */
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
@media (max-width: 820px) { .controls { grid-template-columns: 1fr; } }
.control { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.control h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.control h3::before {
  content: ""; flex: none;
  width: 6px; height: 6px; border-radius: 1px;
  background: var(--brand-deep);
  transform: translateY(-1px);
}
html[data-theme="dark"] .control h3::before { background: var(--brand); }
.control p { font-size: .9rem; color: var(--ink-2); }

/* ---------- Pull quote / statement ---------- */
.statement {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--ink);
  border-left: 2px solid var(--brand-deep);
  padding-left: clamp(20px, 3vw, 34px);
  max-width: 60ch;
}
html[data-theme="dark"] .statement { border-left-color: var(--brand); }
.band .statement { color: #fff; border-left-color: var(--brand); }

/* ---------- Contrast band ---------- */
.band { background: var(--corp); color: #fff; padding-block: clamp(56px, 7vw, 92px); }
.band h2 { color: #fff; }
.band .eyebrow { color: rgba(255, 255, 255, .55); border-bottom-color: rgba(255, 255, 255, .14); }
.band .eyebrow b { color: var(--brand); }
.band .lede { color: rgba(255, 255, 255, .74); }
.band .control { border-bottom-color: rgba(255, 255, 255, .14); }
.band .control h3 { color: #fff; }
.band .control p { color: rgba(255, 255, 255, .74); }
.band .capability { border-bottom-color: rgba(255, 255, 255, .14); }
.band .capability h3 { color: #fff; }
.band .capability p { color: rgba(255, 255, 255, .74); }
.band .capability .idx { color: rgba(255, 255, 255, .45); }
.band .steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .14);
}
@media (max-width: 860px) { .band .steps { grid-template-columns: 1fr; } }
.band .steps > div {
  padding: 30px 30px 30px 0;
  border-right: 1px solid rgba(255, 255, 255, .14);
}
.band .steps > div:last-child { border-right: 0; }
@media (max-width: 860px) {
  .band .steps > div { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .14); padding-right: 0; }
  .band .steps > div:last-child { border-bottom: 0; }
}
.band .steps h3 { color: #fff; margin-bottom: 9px; }
.band .steps p { color: rgba(255, 255, 255, .68); font-size: .93rem; }
.band .card-num { color: rgba(255, 255, 255, .45); }
.band .card-num b { color: var(--brand); }

/* ---------- Corporate identity register ---------- */
.identity {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2);
}
.identity > div {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: 8px 32px;
  padding: 15px clamp(18px, 2.4vw, 28px);
  border-bottom: 1px solid var(--rule);
}
.identity > div:last-child { border-bottom: 0; }
.identity > div:nth-child(odd) { background: color-mix(in srgb, var(--surface) 60%, transparent); }
@media (max-width: 680px) { .identity > div { grid-template-columns: 1fr; gap: 4px; } }
.identity dt { font-size: .86rem; color: var(--ink-3); }
.identity dd { font-size: .94rem; font-weight: 550; color: var(--ink); }

/* Unfilled registry value, flagged until the D&B record is confirmed. */
.pending {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .78rem; font-weight: 600;
  color: #8A5A05; background: #FDF6E3;
  border: 1px dashed #D9A93B; border-radius: var(--r-xs);
  padding: 2px 8px;
}
html[data-theme="dark"] .pending { color: #E9C46A; background: #2A2110; border-color: #7A5F1C; }

/* ---------- Legal / document pages ---------- */
.doc-hero {
  padding-block: clamp(40px, 5vw, 64px) clamp(26px, 3vw, 38px);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.doc-meta {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: .83rem; color: var(--ink-3);
}
.doc-meta b {
  font-family: var(--mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  display: block; margin-bottom: 3px;
}
.doc-meta span { color: var(--ink-2); }

.doc-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
  padding-block: clamp(36px, 4.5vw, 60px);
}
@media (max-width: 940px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } }

.toc {
  position: sticky; top: 92px; min-width: 0;
  border-left: 1px solid var(--rule);
  padding-left: 20px;
}
@media (max-width: 940px) {
  .toc { position: static; border-left: 0; padding-left: 0; border: 1px solid var(--rule); border-radius: var(--r); padding: 18px 20px; }
}
.toc h2 {
  font-family: var(--mono);
  font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 12px;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px; padding: 5px 0;
  font-size: .86rem; color: var(--ink-2);
  text-decoration: none !important;
  transition: color .15s var(--ease);
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono); font-size: .74rem; color: var(--ink-3);
  flex: none; padding-top: 1px;
}
.toc a:hover, .toc a[aria-current="true"] { color: var(--brand-deep); }
.toc a[aria-current="true"] { font-weight: 600; }
.toc a[aria-current="true"]::before { color: var(--brand-deep); }
html[data-theme="dark"] .toc a:hover,
html[data-theme="dark"] .toc a[aria-current="true"],
html[data-theme="dark"] .toc a[aria-current="true"]::before { color: var(--brand); }

.prose { max-width: 76ch; min-width: 0; }
.prose > section { scroll-margin-top: 108px; }
.prose > section + section { margin-top: 42px; padding-top: 42px; border-top: 1px solid var(--rule); }
.prose h2 { font-size: clamp(1.18rem, 1.9vw, 1.42rem); margin-bottom: 14px; }
.prose h3 { font-size: 1rem; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: .96rem; }
.prose p + p, .prose ul + p, .prose ol + p, .prose .table-scroll + p { margin-top: 13px; }
.prose ul, .prose ol { margin: 13px 0 0; padding-left: 20px; }
.prose li + li { margin-top: 7px; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 600; }

.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brand-deep);
  background: var(--brand-wash);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 16px 20px;
  margin-top: 18px;
}
html[data-theme="dark"] .callout { border-left-color: var(--brand); }
.callout p { color: var(--ink-2); font-size: .92rem; }
.callout strong { color: var(--ink); }

.table-scroll { overflow-x: auto; margin-top: 16px; border: 1px solid var(--rule); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .89rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th {
  background: var(--surface-3); color: var(--ink);
  font-family: var(--mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
}
tbody th[scope="row"] { color: var(--ink); font-weight: 600; width: 34%; }
td { color: var(--ink-2); }
tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--corp); color: rgba(255, 255, 255, .68); padding-block: clamp(48px, 5vw, 68px) 28px; }
.site-footer .brand { color: #fff; }
.footer-grid {
  display: grid;
  /* auto-fit with a 140px minimum overflows a 414px viewport once the 230px
     first column and the gaps are counted, so stack below that width. */
  grid-template-columns: minmax(230px, 1.5fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: 36px 32px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid > * { min-width: 0; }
.footer-grid a, .footer-grid button.linklike { overflow-wrap: anywhere; }
.footer-grid h4 {
  font-family: var(--mono);
  font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .45); margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li + li { margin-top: 9px; }
.footer-grid a, .footer-grid button.linklike {
  font-size: .88rem; color: rgba(255, 255, 255, .72);
  text-decoration: none !important;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; text-align: left;
  transition: color .15s var(--ease);
}
.footer-grid a:hover, .footer-grid button.linklike:hover { color: #fff; }
.footer-about p { font-size: .88rem; color: rgba(255, 255, 255, .6); margin-top: 14px; max-width: 40ch; }
.footer-about strong { color: rgba(255, 255, 255, .85); font-weight: 600; }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  justify-content: space-between; align-items: center;
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .82rem; color: rgba(255, 255, 255, .5);
}
.footer-bottom a { color: rgba(255, 255, 255, .72); }

/* ---------- Consent banner + preference centre ---------- */
.consent {
  position: fixed; left: 50%; bottom: 0;
  transform: translate(-50%, 100%);
  width: min(1240px, 100vw);
  z-index: 1200;
  background: var(--surface-2);
  border-top: 3px solid var(--brand-deep);
  box-shadow: var(--shadow-lg);
  padding: 22px var(--gutter);
  transition: transform .3s var(--ease);
}
html[data-theme="dark"] .consent { border-top-color: var(--brand); }
.consent[data-open="true"] { transform: translate(-50%, 0); }
.consent-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px; align-items: center;
  max-width: var(--maxw); margin-inline: auto;
}
@media (max-width: 860px) { .consent-inner { grid-template-columns: 1fr; } }
.consent h2 { font-size: .98rem; margin-bottom: 6px; }
.consent p { font-size: .86rem; color: var(--ink-2); max-width: 78ch; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }

dialog.sheet {
  width: min(600px, calc(100vw - 24px));
  max-height: min(86vh, 780px);
  padding: 0;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-lg);
  background: var(--surface-2); color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
dialog.sheet::backdrop { background: rgba(8, 16, 12, .6); }
.sheet-head { padding: 22px 26px 18px; border-bottom: 1px solid var(--rule); }
.sheet-head h2 { font-size: 1.1rem; }
.sheet-head p { font-size: .88rem; color: var(--ink-2); margin-top: 6px; }
.sheet-body { padding: 4px 26px 18px; overflow-y: auto; max-height: 50vh; }
.sheet-foot {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
  padding: 16px 26px; border-top: 1px solid var(--rule); background: var(--surface);
}

.pref {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; align-items: start;
  padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.pref:last-of-type { border-bottom: 0; }
.pref h3 { font-size: .95rem; }
.pref p { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-2); margin-top: 2px; }

/* Accessible switch built on a real checkbox */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0; background: var(--rule-2);
  border-radius: 999px; transition: background-color .15s var(--ease); pointer-events: none;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  box-shadow: var(--shadow-sm); transition: transform .15s var(--ease);
}
.switch input:checked + span { background: var(--brand-deep); }
html[data-theme="dark"] .switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { opacity: .5; }
.switch input:focus-visible + span { outline: 2px solid var(--brand-deep); outline-offset: 2px; }

.consent-state {
  font-family: var(--mono); font-size: .74rem; line-height: 1.5;
  color: var(--ink-3); margin-top: 14px;
}

/* ---------- Reveal on scroll, subtle fade only ---------- */
.reveal { opacity: 0; }
.reveal.is-in { opacity: 1; transition: opacity .45s var(--ease); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; } }

/* ---------- Print (legal docs get printed and filed) ---------- */
@media print {
  .site-header, .site-footer, .utility, .consent, .toc, dialog { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .doc-layout { grid-template-columns: 1fr; }
  .prose { max-width: none; }
  .prose > section { break-inside: avoid; }
  a::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #555; }
}
