/* OffRouter design system. One dark theme, one accent (the mint of the mark),
   one radius rule: panels 14px, inputs 10px, buttons and chips full pill. */
@font-face { font-family: Unbounded; src: url(/assets/fonts/unbounded.woff2) format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Funnel Sans'; src: url(/assets/fonts/funnel-sans.woff2) format('woff2'); font-weight: 300 800; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/assets/fonts/geist-mono.woff2) format('woff2'); font-weight: 400 500; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #070909;
  --bg-2: #0b0e0e;
  --panel: #101414;
  --panel-2: #151a1a;
  --line: rgba(223, 245, 234, 0.09);
  --line-2: rgba(223, 245, 234, 0.17);
  --text: #e8f0ec;
  --muted: #93a09b;
  --faint: #67726e;
  --mint: #c4ecd9;
  --mint-ink: #07130d;
  --warn: #e7c57f;
  --err: #f29a9a;
  --r: 14px;
  --r-in: 10px;
  --display: Unbounded, 'Funnel Sans', ui-sans-serif, system-ui, sans-serif;
  --sans: 'Funnel Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1240px;
  --gut: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* layers: nav 20, modal 40 */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
/* Unbounded is wide: headlines run smaller and lighter than a normal grotesque would. */
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.03em; line-height: 1.12; }
h1 { font-size: clamp(2rem, 3.9vw, 3.3rem); }
h2 { font-size: clamp(1.55rem, 2.7vw, 2.3rem); }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
code, pre, .mono { font-family: var(--mono); font-size: 0.875em; }
::selection { background: var(--mint); color: var(--mint-ink); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - var(--gut) * 2, var(--wrap)); margin-inline: auto; }
.lede { color: var(--muted); font-size: 1.125rem; line-height: 1.6; max-width: 56ch; text-wrap: pretty; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mint { color: var(--mint); }
.tabular { font-variant-numeric: tabular-nums; }
.kicker { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mint); }
.link { color: var(--mint); text-underline-offset: 4px; }
.link:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 500; font-size: 0.95rem; white-space: nowrap; cursor: pointer; transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, opacity 0.2s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--mint); color: var(--mint-ink); }
.btn-primary:hover { background: #dcf6e9; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--mint); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 0.875rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-danger { border-color: rgba(242, 154, 154, 0.35); color: var(--err); background: transparent; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(7, 9, 9, 0.72); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav-bar { display: flex; align-items: center; gap: 36px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; font-size: 0.95rem; }
.brand img { width: 30px; height: 30px; mix-blend-mode: screen; }
.nav-links { display: flex; gap: 28px; margin-right: auto; }
.nav-links a { color: var(--muted); font-size: 0.925rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.icon-btn:hover { color: var(--text); border-color: var(--mint); }
.nav-bar .icon-btn + .icon-btn, .nav-bar .icon-btn + .btn { margin-left: -24px; }
.nav-burger { display: none; }
.nav-drawer { display: grid; gap: 4px; padding: 8px 0 20px; }
.nav-drawer a { padding: 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
@media (max-width: 860px) {
  .nav-links, .nav-cta, .nav-bar .icon-btn { display: none; }
  .nav-burger { display: inline-flex; margin-left: auto; }
}

/* ---------- sections ---------- */
.sec { padding: clamp(72px, 10vw, 136px) 0; }
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 720px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.frame { position: relative; overflow: hidden; border-radius: var(--r); background: var(--panel); }
.frame::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1px solid var(--line-2); pointer-events: none; }
.frame > img, .frame > video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- hero ---------- */
/* The street fills the hero. Under the copy it dissolves into blur and shade,
   so the type always sits on a calm surface and the still man stays sharp. */
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: min(calc(100dvh - 68px), 860px); }
.hero-bg, .hero-bg > * { position: absolute; inset: 0; }
.hero-bg { z-index: -1; }
.hero-bg img, .hero-bg video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; filter: saturate(0.85) contrast(1.05); }
/* On wide screens the picture is enlarged from its left edge, which moves the man clear of the copy. */
@media (min-width: 901px) { .hero-bg img, .hero-bg video { transform: scale(1.32); transform-origin: 8% 46%; } }
.hero-blur { backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 24%, transparent 58%); mask-image: linear-gradient(90deg, #000 0%, #000 24%, transparent 58%); }
.hero-shade { background: linear-gradient(90deg, rgba(7, 9, 9, 0.82) 0%, rgba(7, 9, 9, 0.5) 34%, rgba(7, 9, 9, 0) 66%), linear-gradient(180deg, rgba(7, 9, 9, 0.55) 0%, rgba(7, 9, 9, 0) 22%, rgba(7, 9, 9, 0) 52%, var(--bg) 100%); }
.hero-inner { padding: clamp(96px, 14vw, 200px) 0 clamp(28px, 4vw, 44px); }
.hero-copy { display: grid; gap: 24px; justify-items: start; max-width: 560px; }
.hero-copy .lede { color: #c3cec9; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero .btn-ghost { background: rgba(7, 9, 9, 0.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero .rails { margin-top: clamp(48px, 7vw, 96px); border-top-color: var(--line-2); }
@media (max-width: 900px) {
  /* Narrow screens: the picture on top, blur and shade rising from the bottom. */
  .hero { min-height: min(calc(100dvh - 68px), 760px); }
  .hero-blur { -webkit-mask-image: linear-gradient(0deg, #000 0%, #000 38%, transparent 68%); mask-image: linear-gradient(0deg, #000 0%, #000 38%, transparent 68%); }
  .hero-shade { background: linear-gradient(0deg, var(--bg) 0%, rgba(7, 9, 9, 0.72) 42%, rgba(7, 9, 9, 0) 72%); }
  .hero-inner { padding-top: 46dvh; }
}
@media (prefers-reduced-transparency: reduce) {
  .hero-blur { display: none; }
  .hero-shade { background: linear-gradient(90deg, rgba(7, 9, 9, 0.94) 0%, rgba(7, 9, 9, 0.8) 45%, rgba(7, 9, 9, 0.2) 100%); }
}

/* three networks, under the hero */
.rails { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.rails > div { padding: 26px 0 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: start; }
/* Each network's own mark in one silver, on a tile of one size, so three
   different brands sit in the page's palette and line up. */
.rail-mark { grid-row: span 2; margin-top: 3px; width: 36px; height: 36px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: #0f1414; }
.rail-mark { border: 1px solid var(--line-2); }
.rail-mark img { width: auto; height: 20px; }
.rail-mark img[src$='base.svg'] { height: 15px; border-radius: 2px; }
/* Arc's mark ships as white on a navy tile: crush the navy to black, drop it with screen, dim the white to silver. */
.rail-mark img.arc { width: 100%; height: 100%; filter: grayscale(1) contrast(4) brightness(0.8); mix-blend-mode: screen; }
.rails > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.rails b { font-weight: 500; font-size: 1.05rem; }
.rails > div > span:not(.rail-mark) { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 700px) {
  .rails { grid-template-columns: 1fr; }
  .rails > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 22px; }
}

/* ---------- "what private means" ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split .frame { aspect-ratio: 4 / 5; }
.split .frame img { filter: saturate(0.8) contrast(1.05); }
.claims { display: grid; gap: 34px; margin-top: 44px; }
.claims > div { display: grid; gap: 8px; padding-left: 22px; border-left: 1px solid var(--line-2); }
.claims p { color: var(--muted); max-width: 52ch; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split .frame { aspect-ratio: 16 / 11; }
}

/* ---------- models ---------- */
.model-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.model { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 22px 24px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: border-color 0.3s, transform 0.4s var(--ease); }
.model:hover { border-color: var(--line-2); transform: translateY(-2px); }
.model-icon { width: 42px; height: 42px; border-radius: 999px; background: #e9efec; display: grid; place-items: center; overflow: hidden; color: var(--mint-ink); font-weight: 600; }
.model-icon.dark { background: #1c2222; }
.model-icon img { width: 24px; height: 24px; object-fit: contain; }
.model-id { font-family: var(--mono); font-size: 0.95rem; }
.model-sub { color: var(--muted); font-size: 0.85rem; }
.model-price { text-align: right; font-size: 0.85rem; color: var(--muted); }
.model-price b { display: block; color: var(--text); font-weight: 500; font-family: var(--mono); }
.skeleton { height: 88px; border-radius: var(--r); background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: shimmer 1.6s linear infinite; } }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 40px 24px; border-radius: var(--r); border: 1px dashed var(--line-2); color: var(--muted); text-align: center; }
@media (max-width: 800px) { .model-grid { grid-template-columns: 1fr; } }

/* ---------- code ---------- */
.usage { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.steps { display: grid; gap: 30px; counter-reset: step; }
.steps > div { display: grid; gap: 6px; }
.steps p { color: var(--muted); }
.code { border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line-2); overflow: hidden; min-width: 0; }
.code-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.code-tabs button { height: 32px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.code-tabs button[aria-selected='true'] { background: var(--panel-2); color: var(--text); }
.code-tabs .copy { margin-left: auto; color: var(--mint); }
pre { margin: 0; padding: 22px 24px; overflow-x: auto; line-height: 1.7; color: #cfdad5; tab-size: 2; }
pre .c { color: var(--faint); }
pre .s { color: var(--mint); }
:not(pre) > code { padding: 2px 6px; border-radius: 6px; background: var(--panel-2); color: #d6e2dc; }
@media (max-width: 900px) { .usage { grid-template-columns: 1fr; } }

/* ---------- networks bento ---------- */
.bento { display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.cell { position: relative; overflow: hidden; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); padding: 28px; display: grid; gap: 10px; align-content: end; min-height: 220px; }
.cell p { color: var(--muted); font-size: 0.95rem; }
.cell .big { font: 400 1.45rem/1.1 var(--display); letter-spacing: -0.03em; }
.cell-photo { grid-row: span 2; min-height: 460px; border: 0; }
.cell-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.75) brightness(0.8); }
.cell-photo::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(7, 9, 9, 0.05) 30%, rgba(7, 9, 9, 0.9) 100%); }
.cell-photo > *:not(img) { position: relative; z-index: 2; }
.cell-photo p { color: #c9d4cf; }
.cell-wide { grid-column: span 2; background: linear-gradient(120deg, rgba(196, 236, 217, 0.1), rgba(196, 236, 217, 0) 60%), var(--panel); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .cell-photo { grid-row: auto; min-height: 320px; }
  .cell-wide { grid-column: auto; }
}

/* ---------- closing ---------- */
.closing { position: relative; overflow: hidden; border-radius: var(--r); min-height: 460px; display: grid; align-content: end; padding: clamp(28px, 5vw, 56px); }
.closing img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.closing::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(7, 9, 9, 0) 35%, rgba(7, 9, 9, 0.88) 100%); }
.closing > div { position: relative; z-index: 2; display: grid; gap: 22px; justify-items: start; }
.closing h2 { max-width: 16ch; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 104px); padding: 44px 0 56px; color: var(--muted); font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 32px; }
.footer h4 { color: var(--text); font-weight: 500; font-size: 0.9rem; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a:hover { color: var(--text); }
.footer-base { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; color: var(--faint); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- inner pages ---------- */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); display: grid; gap: 16px; }
.page-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 40px; }
.figure { padding: 22px 24px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 6px; }
.figure span { color: var(--muted); font-size: 0.85rem; }
.figure b { font: 600 1.9rem/1.1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.panel { border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); padding: 24px; }
.panel + .panel { margin-top: 14px; }
.panel h3 { margin-bottom: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-weight: 400; color: var(--faint); padding: 0 12px 10px 0; white-space: nowrap; }
.table td { padding: 12px 12px 12px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.table-scroll { overflow-x: auto; }
.bar { display: inline-block; height: 6px; min-width: 2px; border-radius: 999px; background: var(--mint); vertical-align: middle; margin-right: 10px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.chip.on { border-color: rgba(196, 236, 217, 0.5); color: var(--mint); }

/* forms */
.field { display: grid; gap: 8px; }
.field label { font-size: 0.875rem; color: var(--text); }
.field small { color: var(--muted); font-size: 0.8rem; }
.input { height: 46px; padding: 0 14px; border-radius: var(--r-in); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); width: 100%; }
.input:focus { border-color: var(--mint); outline: none; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line-2); gap: 2px; }
.segmented button { height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-size: 0.85rem; cursor: pointer; }
.segmented button.active { background: var(--mint); color: var(--mint-ink); }
.notice { padding: 14px 16px; border-radius: var(--r-in); border: 1px solid var(--line-2); background: var(--bg-2); font-size: 0.9rem; color: var(--muted); }
.notice.err { border-color: rgba(242, 154, 154, 0.4); color: var(--err); }
.notice.ok { border-color: rgba(196, 236, 217, 0.4); color: var(--mint); }
.secret { font-family: var(--mono); font-size: 0.85rem; word-break: break-all; padding: 14px 16px; border-radius: var(--r-in); background: var(--bg-2); border: 1px solid rgba(196, 236, 217, 0.4); color: var(--mint); }
.signin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.signin .frame { aspect-ratio: 5 / 4; }
@media (max-width: 860px) { .signin { grid-template-columns: 1fr; } }

/* the contract address pill on the token page */
.ca { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; padding: 8px 10px 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); font-size: 0.9rem; max-width: 100%; justify-self: start; }
.ca-label { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.14em; color: var(--mint); }
.ca-address { color: var(--text); word-break: break-all; font-size: 0.85rem; }
.ca .muted { padding-right: 8px; }
@media (max-width: 600px) { .ca { border-radius: var(--r); padding: 12px 14px; } }

/* roadmap: three phases down the page, the label on the left and its items on the right */
.road { display: grid; }
.road-phase { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); padding: 40px 0; border-top: 1px solid var(--line); }
.road-phase:first-child { border-top: 0; padding-top: 8px; }
.road-mark { position: sticky; top: 96px; align-self: start; }
.road-mark .chip { height: 30px; padding: 0 14px; font-size: 0.8rem; }
.road-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 40px; }
.road-items > div { display: grid; gap: 8px; align-content: start; }
.road-items p { color: var(--muted); max-width: 46ch; }
@media (max-width: 860px) {
  .road-phase { grid-template-columns: 1fr; padding: 30px 0; }
  .road-mark { position: static; }
  .road-items { grid-template-columns: 1fr; }
}

/* $OFFROUTER tiers */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tier { padding: 26px; border-radius: var(--r); background: linear-gradient(160deg, rgba(196, 236, 217, 0.08), rgba(196, 236, 217, 0) 60%), var(--panel); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.tier-figure { font: 600 2.4rem/1 var(--sans); letter-spacing: -0.03em; margin-top: 10px; }
.tier p { color: var(--muted); font-size: 0.9rem; }
.tier .rule { margin: 12px 0 6px; }
.tier-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.tier-row b { color: var(--text); font-weight: 500; text-align: right; }
.holder { display: grid; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.holder-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meter { height: 6px; border-radius: 999px; background: var(--mint); min-width: 2px; }

/* whitepaper: a reading column with a section list, and flowcharts built from boxes and arrows */
.paper { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.paper-nav { position: sticky; top: 92px; display: grid; gap: 2px; font-size: 0.9rem; }
.paper-nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); }
.paper-nav a:hover, .paper-nav a.active { color: var(--text); background: var(--panel); }
.paper .prose { max-width: 860px; }
.paper .prose section { padding: 8px 0 64px; }
.paper .prose p { max-width: 68ch; }
.chart { margin: 26px 0 8px; padding: 26px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.prose .chart + p { margin-top: 24px; }
.chart figcaption { margin-top: 18px; color: var(--muted); font-size: 0.875rem; max-width: 70ch; }
.lane { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.flow + .lane { margin-top: 26px; }
.flow { display: flex; align-items: stretch; }
.node { flex: 1 1 0; min-width: 0; padding: 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); display: grid; gap: 6px; align-content: start; }
.node b { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.node span { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.node.you { border-color: rgba(196, 236, 217, 0.55); }
.node.sealed { border: 1px dashed rgba(196, 236, 217, 0.7); background: linear-gradient(160deg, rgba(196, 236, 217, 0.1), rgba(196, 236, 217, 0) 70%), var(--panel); }
.node.open { background: transparent; border-style: dotted; }
.node em { font-style: normal; font: 500 0.68rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint); }
/* An arrow between two boxes: a labelled line with a head, pointing right, or down on narrow screens. */
.arrow { flex: 0 0 76px; position: relative; display: grid; place-items: center; text-align: center; font-size: 0.72rem; line-height: 1.25; color: var(--muted); padding: 0 6px 26px; }
.arrow::before { content: ''; position: absolute; left: 8px; right: 12px; bottom: 50%; margin-bottom: -13px; border-top: 1px solid var(--line-2); }
.arrow::after { content: ''; position: absolute; right: 8px; bottom: 50%; margin-bottom: -17px; width: 7px; height: 7px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted); transform: rotate(45deg); }
.arrow.back::after { right: auto; left: 8px; transform: rotate(-135deg); }
.arrow.back::before { left: 12px; right: 8px; }
.sees { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sees th { text-align: left; font-weight: 400; color: var(--faint); padding: 0 12px 10px 0; }
.sees td { padding: 12px 12px 12px 0; border-top: 1px solid var(--line); }
.sees .yes { color: var(--text); }
.sees .no { color: var(--mint); }
.sees .part { color: var(--warn); }
@media (max-width: 860px) {
  .paper { grid-template-columns: 1fr; }
  .paper-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .paper-nav a { white-space: nowrap; }
  .chart { padding: 18px; }
  .flow { flex-direction: column; }
  .arrow { flex: 0 0 54px; padding: 0 0 0 34px; text-align: left; place-items: center start; }
  .arrow::before { left: 16px; right: auto; top: 6px; bottom: 10px; margin: 0; border-top: 0; border-left: 1px solid var(--line-2); }
  .arrow::after, .arrow.back::after { left: 12px; right: auto; bottom: 8px; margin: 0; transform: rotate(135deg); }
  .arrow.back::after { bottom: auto; top: 6px; transform: rotate(-45deg); }
}

/* app: login scene and shell. The app has no site nav or footer. */
.login { position: relative; isolation: isolate; min-height: 100dvh; display: grid; align-items: center; padding: 24px; overflow: hidden; }
.login-bg, .login-bg > * { position: absolute; inset: 0; }
.login-bg { z-index: -1; }
.login-bg img, .login-bg video { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; filter: saturate(0.8) contrast(1.05); }
.login-bg .shade { background: linear-gradient(90deg, rgba(7, 9, 9, 0.86) 0%, rgba(7, 9, 9, 0.45) 55%, rgba(7, 9, 9, 0.2) 100%); }
.login-card { width: min(100%, 440px); margin-left: clamp(0px, 6vw, 96px); padding: 36px; display: grid; gap: 22px; justify-items: start; border-radius: 22px; border: 1px solid var(--line-2); background: rgba(12, 16, 16, 0.55); backdrop-filter: blur(28px) saturate(140%); -webkit-backdrop-filter: blur(28px) saturate(140%); box-shadow: inset 0 1px 0 rgba(223, 245, 234, 0.08), 0 30px 80px rgba(0, 0, 0, 0.45); }
.login-card h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.login-card p { color: #c3cec9; }
.login-card .btn { width: 100%; height: 50px; }
.login-card .notice { width: 100%; }
.login-foot { color: var(--muted); font-size: 0.85rem; }
@media (prefers-reduced-transparency: reduce) { .login-card { background: var(--panel); backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (max-width: 700px) { .login { align-items: end; padding: 16px; } .login-card { margin-left: 0; padding: 26px; } .login-bg .shade { background: linear-gradient(0deg, rgba(7, 9, 9, 0.9) 0%, rgba(7, 9, 9, 0.3) 70%); } }

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 22px 16px; border-right: 1px solid var(--line); background: var(--bg-2); }
.side .brand { padding: 4px 10px 22px; }
.side-link { display: flex; align-items: center; height: 42px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 0.95rem; text-align: left; cursor: pointer; width: 100%; transition: background 0.2s, color 0.2s; }
.side-link:hover { color: var(--text); background: var(--panel); }
.side-link.active { color: var(--text); background: var(--panel-2); }
.side-sep { margin: 10px 14px; border: 0; border-top: 1px solid var(--line); }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.side-foot small { color: var(--muted); }
.view { padding: clamp(24px, 4vw, 48px); max-width: 1120px; width: 100%; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 4px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .side .brand { padding: 0 8px 0 4px; }
  .side .brand span, .side-sep, .side-foot small, .side-foot .mono { display: none; }
  .side-link { width: auto; white-space: nowrap; height: 36px; }
  .side-foot { margin: 0 0 0 auto; padding: 0; border: 0; background: none; }
}

.side-label { padding: 16px 14px 6px; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.side-scroll { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.side-row { display: flex; gap: 8px; }
.docs-view { padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 72px); }
.docs-view .page-head { padding-top: 0; }
@media (max-width: 860px) { .side-label, .side-row { display: none; } .side-scroll { flex-direction: row; overflow-x: auto; } }

/* live demo: a composer, the streamed answer, and a trace of what happened to the call */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.demo .panel + .panel { margin-top: 14px; }
.demo textarea.input { height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.answer { min-height: 120px; white-space: pre-wrap; line-height: 1.65; color: #d6e2dc; }
.answer:empty::before { content: 'The answer streams here, straight from the enclave.'; color: var(--faint); }
.trace { display: grid; gap: 0; font-size: 0.85rem; }
.trace-row { display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.trace-row:first-child { border-top: 0; padding-top: 0; }
.trace-time { font-family: var(--mono); color: var(--faint); font-size: 0.78rem; padding-top: 2px; }
.trace-hop { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint); }
.trace-row b { display: block; font-weight: 500; color: var(--text); margin: 5px 0 2px; }
.trace-row span, .trace-row code { color: var(--muted); word-break: break-word; }
.trace-row.ok .trace-hop { color: var(--mint); }
.trace-row.warn .trace-hop { color: var(--warn); }
.trace-empty { color: var(--faint); font-size: 0.9rem; }
.raw { max-height: 260px; overflow: auto; margin-top: 12px; padding: 14px 16px; border-radius: var(--r-in); background: var(--bg-2); border: 1px solid var(--line); font: 0.76rem/1.6 var(--mono); color: #b9c5c0; white-space: pre-wrap; word-break: break-all; }
.kept { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kept h4 { font-size: 0.8rem; font-weight: 500; color: var(--faint); margin-bottom: 8px; }
.kept ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9rem; }
.kept .no li { color: var(--mint); }
@media (max-width: 1000px) { .demo { grid-template-columns: 1fr; } }

/* dashboard */
.dash-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.dash-head h1 { font-size: 1.7rem; }
.dash { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 14px; margin-bottom: 14px; }
.dash .panel + .panel { margin-top: 0; }
.balance { display: grid; gap: 18px; align-content: start; }
.balance-figure { font: 600 3rem/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.balance-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 0.9rem; }
.balance-meta b { color: var(--text); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button, .pick { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-size: 0.9rem; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.chips button:hover, .pick:hover { border-color: var(--mint); }
.chips button.active, .pick.active { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.chips .input { width: 110px; height: 38px; border-radius: 999px; }
.wallet-rows { display: grid; gap: 2px; }
.wallet-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; text-align: left; cursor: pointer; }
.wallet-row:first-child { border-top: 0; }
.wallet-row[disabled] { cursor: default; opacity: 0.55; }
.wallet-row small { color: var(--muted); font-size: 0.8rem; grid-column: 1; }
.wallet-row b { grid-row: span 2; font: 500 1.1rem var(--mono); }
.wallet-row.active span:first-child::after { content: 'Paying from here'; margin-left: 10px; font-size: 0.72rem; color: var(--mint); border: 1px solid rgba(196, 236, 217, 0.5); border-radius: 999px; padding: 2px 8px; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 120px; }
.bars div { background: var(--mint); border-radius: 4px 4px 0 0; min-height: 2px; opacity: 0.85; }
.bars div[data-empty] { background: var(--line-2); }
.bar-labels { display: flex; justify-content: space-between; color: var(--faint); font-size: 0.75rem; margin-top: 8px; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }

/* docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.docs-nav { position: sticky; top: 92px; display: grid; gap: 2px; font-size: 0.9rem; }
.docs-nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); }
.docs-nav a:hover, .docs-nav a.active { color: var(--text); background: var(--panel); }
.prose { max-width: 760px; min-width: 0; }
.prose section { padding: 8px 0 56px; }
.prose h2 { font-size: 1.45rem; margin-bottom: 18px; }
.prose h3 { margin: 30px 0 10px; }
.prose p, .prose li { color: #b9c5c0; }
.prose p + p, .prose p + .code, .prose .code + p, .prose ul + p, .prose p + ul, .prose .table-scroll + p, .prose p + .table-scroll { margin-top: 14px; }
.prose ul { padding-left: 20px; display: grid; gap: 6px; margin: 0; }
.prose .code { margin-top: 14px; }
@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .docs-nav a { white-space: nowrap; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
