/* ==========================================================================
   Xpiry — xpiry.net
   Single stylesheet. No frameworks, no build step.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  color-scheme: light;

  --ink:        #0e1417;
  --ink-2:      #47535d;
  --ink-3:      #66727c;
  --ink-inv:    #ffffff;

  --bg:         #ffffff;
  --surface:    #f6f8f9;
  --surface-2:  #eef2f3;
  --border:     #e2e8ea;
  --border-2:   #d3dcdf;

  --brand:      #0a7a6b;
  --brand-600:  #086757;
  --brand-500:  #12a594;
  --brand-300:  #33d3c3;
  --brand-tint: #e9faf7;

  --red:        #d64545;
  --amber:      #c98a00;
  --green:      #2e9e5b;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(14, 20, 23, .05), 0 1px 3px rgba(14, 20, 23, .04);
  --shadow-md: 0 2px 4px rgba(14, 20, 23, .04), 0 8px 24px -8px rgba(14, 20, 23, .12);
  --shadow-lg: 0 24px 60px -20px rgba(14, 20, 23, .24), 0 8px 24px -12px rgba(14, 20, 23, .12);

  --page: 1120px;
  --gut: 24px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

[data-theme="dark"] {
  color-scheme: dark;

  --ink:        #eef3f4;
  --ink-2:      #a8b5bc;
  --ink-3:      #85939c;
  --ink-inv:    #06100f;

  --bg:         #0c1113;
  --surface:    #12191b;
  --surface-2:  #182124;
  --border:     #232f33;
  --border-2:   #2f3d42;

  --brand:      #3ddac7;
  --brand-600:  #55e2d1;
  --brand-500:  #2ec9b6;
  --brand-300:  #1c8d80;
  --brand-tint: #0f2724;

  --red:        #f4756f;
  --amber:      #e7b23c;
  --green:      #4cc27c;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7), 0 8px 24px -12px rgba(0, 0, 0, .5);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--brand-300); color: #06100f; }

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--ink-inv);
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

/* --- Layout --------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.section { padding-block: clamp(64px, 9vw, 116px); }
.section--tint { background: var(--surface); border-block: 1px solid var(--border); }
.section--flush-top { padding-top: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--brand-300);
  border-radius: 2px;
}

/* --- Type ----------------------------------------------------------------- */
h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -.022em;
  font-weight: 680;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 5.4vw, 3.9rem); letter-spacing: -.032em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -.028em; }
h3 { font-size: 1.09rem; letter-spacing: -.012em; line-height: 1.35; }

.lede {
  font-size: clamp(1.06rem, 1.7vw, 1.2rem);
  color: var(--ink-2);
  max-width: 62ch;
  text-wrap: pretty;
}
.section-head { max-width: 66ch; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { color: var(--ink-2); margin-top: 14px; font-size: 1.05rem; }
.center { text-align: center; margin-inline: auto; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: .98rem;
  font-weight: 620;
  letter-spacing: -.006em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s ease, background-color .16s ease,
              border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--ink);
  color: var(--ink-inv);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: #000; }
[data-theme="dark"] .btn--primary { background: var(--brand); color: #06100f; }
[data-theme="dark"] .btn--primary:hover { background: var(--brand-600); }

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

.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-600); }
[data-theme="dark"] .btn--brand { color: #06100f; }

.btn--lg { padding: 15px 26px; font-size: 1.02rem; }
.btn svg { flex: none; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--border); }
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--bg); } }

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -.03em;
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: .95rem;
  font-weight: 520;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 620; }

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

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--border-2); background: var(--surface); }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-grid; }

  .nav-panel {
    display: none;
    padding: 8px 0 20px;
    border-top: 1px solid var(--border);
  }
  .nav-panel[data-open="true"] { display: block; }
  .nav-panel ul { list-style: none; padding: 0; margin: 0; }
  .nav-panel a {
    display: block;
    padding: 13px 4px;
    font-size: 1.02rem;
    font-weight: 560;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
  }
  .nav-panel .btn { width: 100%; margin-top: 18px; }
}
@media (min-width: 881px) { .nav-panel { display: none !important; } }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(52px, 8vw, 96px) clamp(56px, 8vw, 104px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 40% 30% -20%;
  background: radial-gradient(48% 48% at 50% 50%, var(--brand-tint), transparent 70%);
  pointer-events: none;
}
.hero > .wrap { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  font-size: .84rem;
  font-weight: 560;
  color: var(--ink-2);
  margin-bottom: 26px;
}
.pill b { color: var(--ink); font-weight: 640; }
.pill .dot {
  width: 20px; height: 20px;
  border-radius: var(--r-pill);
  background: var(--brand-tint);
  color: var(--brand);
  display: grid;
  place-items: center;
}

.hero h1 { margin-bottom: 22px; }
.hero h1 em {
  font-style: normal;
  color: var(--brand);
  position: relative;
  white-space: nowrap;
}
.hero .lede { margin-bottom: 32px; }
.hero .btn-row { margin-bottom: 26px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
  font-size: .9rem;
  color: var(--ink-3);
}
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta svg { color: var(--brand); flex: none; }

/* --- Phone mockup --------------------------------------------------------- */
.mock {
  position: relative;
  width: min(330px, 100%);
  margin-inline: auto;
}
.phone {
  position: relative;
  border-radius: 42px;
  padding: 11px;
  background: linear-gradient(168deg, #2b3439, #10171a 62%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.phone-screen {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 9 / 18.6;
  display: flex;
  flex-direction: column;
}
[data-theme="dark"] .phone {
  background: linear-gradient(168deg, #3a464c, #1b2225 62%);
}

.phone-notch {
  position: absolute;
  top: 9px; left: 50%;
  transform: translateX(-50%);
  width: 9px; height: 9px;
  border-radius: var(--r-pill);
  background: #0b1012;
  z-index: 3;
}

.app-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 30px 18px 12px;
}
.app-bar h4 { font-size: 1.06rem; letter-spacing: -.02em; }
.app-bar span { font-size: .68rem; color: var(--ink-3); }
.app-chip {
  font-size: .64rem;
  font-weight: 650;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: var(--brand-tint);
  color: var(--brand);
}

.app-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 14px 14px;
  overflow: hidden;
}
.app-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.app-item .swatch {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 15px;
  background: var(--surface-2);
}
.app-item .body { min-width: 0; flex: 1; }
.app-item .name {
  font-size: .78rem;
  font-weight: 620;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-item .sub { font-size: .66rem; color: var(--ink-3); line-height: 1.4; }
.app-item .tag {
  flex: none;
  font-size: .62rem;
  font-weight: 680;
  padding: 3px 8px;
  border-radius: var(--r-pill);
}
.tag--red   { background: rgba(214, 69, 69, .12);  color: var(--red); }
.tag--amber { background: rgba(201, 138, 0, .14);  color: var(--amber); }
.tag--green { background: rgba(46, 158, 91, .13);  color: var(--green); }

.app-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 10px 8px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-3);
}
.app-tabbar span { width: 18px; height: 18px; display: block; }
.app-tabbar span:first-child { color: var(--brand); }

.notif {
  position: absolute;
  left: -8%;
  bottom: 12%;
  width: min(272px, 92%);
  display: flex;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  animation: float-in .7s cubic-bezier(.2, .8, .2, 1) both;
}
.notif img { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.notif .t { font-size: .78rem; font-weight: 640; letter-spacing: -.01em; }
.notif .d { font-size: .72rem; color: var(--ink-2); }
.notif .w { font-size: .64rem; color: var(--ink-3); margin-top: 3px; }

@keyframes float-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .notif { animation: none; } }
@media (max-width: 480px) { .notif { left: 0; width: 100%; } }

/* --- Feature cards -------------------------------------------------------- */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}
.card {
  padding: 26px 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-2);
}
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: .96rem; }

.card-icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
}

.extras {
  margin-top: 22px;
  padding: 22px 24px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.extras strong { font-size: .95rem; font-weight: 640; margin-right: 4px; }
.extras span {
  font-size: .88rem;
  color: var(--ink-2);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

/* --- Steps ---------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 26px;
  border-top: 2px solid var(--border);
}
.step::after {
  content: "";
  position: absolute;
  top: -2px; left: 0;
  width: 34px; height: 2px;
  background: var(--brand);
}
.step .num {
  counter-increment: step;
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--brand);
  margin-bottom: 10px;
}
.step .num::before { content: "0" counter(step); }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: .96rem; }

/* --- Use cases ------------------------------------------------------------ */
.cases {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.case {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  transition: border-color .2s ease, background-color .2s ease;
}
.case:hover { border-color: var(--brand-300); background: var(--brand-tint); }
.case .glyph { font-size: 22px; line-height: 1; margin-bottom: 14px; }
.case h3 { font-size: 1rem; margin-bottom: 6px; }
.case p { font-size: .9rem; color: var(--ink-2); }

/* --- Backup split --------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.checks { list-style: none; padding: 0; display: grid; gap: 14px; margin-top: 26px; }
.checks li { display: flex; align-items: flex-start; gap: 12px; font-size: .99rem; color: var(--ink-2); }
.checks svg { flex: none; margin-top: 5px; color: var(--brand); }
.checks b { color: var(--ink); font-weight: 620; }

.drive-panel {
  position: relative;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: var(--shadow-md);
}
.drive-panel .drive-mark { margin-bottom: 24px; }
.drive-flow { display: grid; gap: 12px; }
.drive-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: .92rem;
}
.drive-row .k { font-weight: 620; }
.drive-row .v { margin-left: auto; color: var(--ink-3); font-size: .84rem; }
.drive-note {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: .86rem;
  color: var(--ink-3);
}
.scope {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .84em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
}

/* --- CTA ------------------------------------------------------------------ */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 6vw, 72px);
  border-radius: var(--r-xl);
  background: var(--ink);
  color: #fff;
  text-align: center;
}
[data-theme="dark"] .cta-band { background: var(--surface-2); border: 1px solid var(--border); }
.cta-band::after {
  content: "";
  position: absolute;
  inset: auto -10% -80% 30%;
  height: 130%;
  background: radial-gradient(45% 45% at 50% 50%, rgba(51, 211, 195, .22), transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin-bottom: 16px; }
.cta-band p { color: rgba(255, 255, 255, .74); max-width: 52ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 30px; }
.cta-band .btn--primary { background: #fff; color: #0e1417; }
.cta-band .btn--primary:hover { background: #eef3f4; }
.cta-band .btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
}
.cta-band .btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .55); }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: clamp(48px, 6vw, 72px) 32px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

.footer-about p { color: var(--ink-2); font-size: .94rem; max-width: 34ch; margin-top: 14px; }
.footer-col h4 {
  font-size: .78rem;
  font-weight: 680;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.footer-col a {
  font-size: .94rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: .86rem;
  color: var(--ink-3);
}
.footer-bottom nav { display: flex; gap: 20px; margin-left: auto; }
.footer-bottom a { color: var(--ink-3); text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }

/* --- Legal pages ---------------------------------------------------------- */
.legal-hero {
  padding-block: clamp(44px, 6vw, 76px) clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.legal-hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 16px; }
.legal-hero p { color: var(--ink-2); max-width: 68ch; }
.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-size: .84rem;
  color: var(--ink-2);
}
.updated b { color: var(--ink); font-weight: 620; }

.legal-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding-block: clamp(40px, 5vw, 64px);
}
@media (max-width: 900px) { .legal-layout { grid-template-columns: 1fr; } }

.toc {
  position: sticky;
  top: 92px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
@media (max-width: 900px) {
  .toc { position: static; }
  /* a 23-item table of contents should not push the policy a full screen down */
  .toc ol { max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; }
}
.toc h2 {
  font-size: .78rem;
  font-weight: 680;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 3px;
  counter-reset: toc;
  font-size: .89rem;
}
.toc a {
  display: block;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.toc a::before {
  counter-increment: toc;
  content: counter(toc) ". ";
  color: var(--ink-3);
}
.toc a:hover { color: var(--ink); background: var(--surface-2); }

.prose { max-width: 74ch; font-size: 1.02rem; padding-bottom: 8px; }
.prose > section { scroll-margin-top: 92px; }
.prose > section + section { margin-top: 46px; }
.prose h2 {
  font-size: 1.42rem;
  letter-spacing: -.022em;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.prose h3 { font-size: 1.04rem; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { margin: 14px 0; padding-left: 22px; display: grid; gap: 9px; }
.prose li::marker { color: var(--brand); }
.prose li ul { margin: 8px 0 0; }
.prose strong { color: var(--ink); font-weight: 620; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  word-break: break-word;
}
.prose .callout {
  padding: 20px 22px;
  margin: 22px 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-md);
  background: var(--surface);
}
.prose .callout p { font-size: .97rem; }
.prose .callout > :first-child { margin-top: 0; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: .93rem;
}
.table-scroll { overflow-x: auto; }
.data-table th, .data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--ink-2);
}
.data-table th {
  font-size: .78rem;
  font-weight: 680;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface);
  white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: 0; }

/* --- Reveal (progressive enhancement) ------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Print ---------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .toc, .btn-row, .skip-link { display: none !important; }
  .legal-layout { grid-template-columns: 1fr; }
  body { font-size: 11pt; color: #000; }
  .prose a { color: #000; }
}
