/* StableOhm — the decentralized reserve currency of Robinhood Chain.
 *
 * The page sits ON a live WebGL ground rather than on a flat colour: a fixed canvas carries a
 * drifting green mist and the omega, and everything here is arranged to stay legible over it.
 * That means surfaces are translucent and blurred rather than opaque, and every panel keeps a
 * hairline that catches the light behind it.
 *
 * Display is a tight Swiss grotesque; running text is an old-style serif, because a document
 * about a treasury should read like one. Sizing is fluid: clamp() carries the type and the
 * spacing, and the only media queries left are where the layout genuinely changes shape. */

:root {
  --void:      #040A08;
  --ink:       #EAF6F0;
  --dim:       #93B2A4;
  --faint:     #6B8C7E;
  --green:     #14C07A;
  --green-lit: #6FEFB4;
  --warn:      #E8B24A;

  --glass:     rgba(9, 24, 19, .62);
  --glass-hi:  rgba(14, 34, 27, .78);
  --rule:      rgba(150, 240, 200, .14);
  --rule-soft: rgba(150, 240, 200, .07);

  --display: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
  --body: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --data: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  --shell: 1160px;
  --measure: 66ch;
  --pad: clamp(18px, 5vw, 32px);
  --gap: clamp(52px, 9vw, 96px);
  --tap: 44px;
  --r: 10px;
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(16px, 1vw + 13.4px, 17.5px);
  line-height: 1.68;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* The live ground. Fixed, behind everything, mounted once for the whole session. */
#atmos {
  position: fixed; inset: 0; z-index: -2;
  width: 100%; height: 100%; display: block;
}
/* A dark wash so long text never has to fight the mist directly underneath it. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 34%, rgba(4,10,8,.30) 0%, rgba(4,10,8,.72) 58%, rgba(4,10,8,.90) 100%),
    linear-gradient(180deg, rgba(4,10,8,.22) 0%, rgba(4,10,8,.60) 48%, rgba(4,10,8,.90) 100%);
}

.wrap { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: var(--pad); }
/* Grids may use the whole shell; running text never exceeds a readable measure. */
section > p, section > .lead, .pagehead .standfirst, .note, .formula, .pullquote { max-width: var(--measure); }
section > h2 { max-width: 22ch; }

/* ── top bar ───────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "mark wallet" "tabs tabs";
  align-items: center;
  gap: 6px var(--pad);
  padding: 10px var(--pad) 0;
  background: rgba(4, 10, 8, .72);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--rule-soft);
}
.mark {
  grid-area: mark; display: inline-flex; align-items: center; gap: 10px;
  min-height: var(--tap); color: var(--ink); text-decoration: none;
}
.mark span { font-family: var(--display); font-weight: 700; font-size: 16.5px; letter-spacing: -.022em; }
.mark svg { flex: none; filter: drop-shadow(0 0 10px rgba(20, 192, 122, .55)); }
.wallet { grid-area: wallet; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.tabs {
  grid-area: tabs; display: flex; gap: 2px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: inline-flex; align-items: center;
  min-height: 42px; padding: 0 13px;
  font-family: var(--data); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--green-lit); border-bottom-color: var(--green); }

@media (min-width: 760px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "mark tabs wallet";
    padding-block: 8px;
  }
  .tabs { margin-inline: 0; padding-inline: 0; justify-content: center; }
}

.chainpill {
  font-family: var(--data); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 10px;
  white-space: nowrap; background: var(--glass);
}
.chainpill.warn { color: var(--warn); border-color: rgba(232, 178, 74, .45); }

/* ── controls ──────────────────────────────────────────────────────── */
.btn {
  min-height: var(--tap); padding: 0 18px;
  font-family: var(--data); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); background: var(--glass);
  border: 1px solid var(--rule); border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--green); color: var(--green-lit); }
.btn:disabled { color: var(--faint); cursor: not-allowed; }
.btn:focus-visible, .tabs a:focus-visible, .mark:focus-visible,
a:focus-visible, input:focus-visible {
  outline: 2px solid var(--green-lit); outline-offset: 3px; border-radius: 6px;
}

.field {
  width: 100%; min-height: var(--tap); padding: 0 14px;
  font-family: var(--data); font-size: 17px;      /* 16px+ or iOS zooms on focus */
  font-variant-numeric: tabular-nums;
  color: var(--ink); background: rgba(4, 12, 9, .7);
  border: 1px solid var(--rule); border-radius: var(--r);
}
.fieldrow { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }

/* ── hero ──────────────────────────────────────────────────────────── */
.hero { position: relative; }
/* Read from the left, like the rest of the page. The mark sits behind as a watermark on the
   shell's own axis, so it never has to be dodged and nothing needs centring to agree with it. */
.hero-in {
  padding-block: clamp(96px, 18vh, 190px) clamp(52px, 8vw, 96px);
  position: relative; z-index: 1;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--data); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--green-lit); margin: 0 0 26px;
  padding: 7px 13px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(10px);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px var(--green);
}
h1 {
  font-family: var(--display); font-weight: 700;
  max-width: 17ch;
  font-size: clamp(34px, 5.6vw, 76px);
  line-height: 1.0; letter-spacing: -.04em;
  text-wrap: balance; margin: 0;
  overflow-wrap: break-word;
  text-shadow: 0 2px 40px rgba(4, 10, 8, .85);
}
h1 em { font-style: normal; color: var(--green-lit); }
.standfirst {
  font-size: clamp(17px, .7vw + 14px, 22px); line-height: 1.55; color: var(--dim);
  margin: 26px 0 0; max-width: 44ch;
}

.herocta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.page { padding-top: clamp(40px, 8vw, 72px); }
.pagehead { margin-bottom: clamp(36px, 7vw, 60px); }
.pagehead h1 { max-width: 20ch; }
.pagehead h1 { font-size: clamp(30px, 6.4vw, 50px); }
.pagehead .standfirst { max-width: 32em; }

/* ── surfaces ──────────────────────────────────────────────────────── */
.card, .instrument, .note, .notlive, .tablewrap, .formula, .stats {
  background: var(--glass);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  backdrop-filter: blur(14px) saturate(1.15);
}

.instrument { overflow: hidden; }
.pad { padding: clamp(18px, 4vw, 26px); }

/* ── stat band ─────────────────────────────────────────────────────── */
.stats {
  display: grid; gap: 1px; margin: 22px 0 0; overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--rule);
}
.stat { display: flex; flex-direction: column; gap: 4px; padding: 17px 18px; background: var(--glass-hi); }
.stat-label { font-family: var(--data); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.stat-val {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(20px, 4.4vw, 26px); letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.stat-note { font-family: var(--data); font-size: 10px; color: var(--faint); }

/* ── pillars ───────────────────────────────────────────────────────── */
.pillars { display: grid; gap: 14px; margin-top: 26px; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }
.pillar { padding: clamp(20px, 4vw, 26px); position: relative; overflow: hidden; }
.pillar::before {
  content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent); opacity: .5;
}
.pillar h3 { margin: 0 0 8px; }
.pillar p { margin: 0; font-size: 15.5px; color: var(--dim); line-height: 1.6; }
.pillar .glyph {
  display: inline-flex; margin-bottom: 14px;
  width: 34px; height: 34px; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--rule); background: rgba(20, 192, 122, .09);
  font-family: var(--data); font-size: 14px; color: var(--green-lit);
}

/* ── steps ─────────────────────────────────────────────────────────── */
.steps { display: grid; gap: 1px; margin-top: 26px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px clamp(18px, 4vw, 24px); background: var(--glass-hi); align-items: start; }
.step-n {
  font-family: var(--data); font-size: 11px; letter-spacing: .1em; color: var(--green-lit);
  border: 1px solid var(--rule); border-radius: 999px; padding: 5px 10px; white-space: nowrap;
}
.step h3 { margin: 0 0 5px; font-size: 15.5px; }
.step p { margin: 0; font-size: 15.5px; color: var(--dim); line-height: 1.58; }

/* ── prose ─────────────────────────────────────────────────────────── */
section { margin-top: var(--gap); }
.chapmark { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.chapmark .glyph { display: flex; flex: none; }
.chapnum { font-family: var(--data); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--green-lit); }

h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(24px, 4.8vw, 35px);
  letter-spacing: -.032em; line-height: 1.12; text-wrap: balance; margin: 0 0 18px;
}
h3 { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.008em; margin: 30px 0 10px; }
p { margin: 0 0 18px; }
p.lead { font-size: clamp(17px, 1.3vw + 13px, 19.5px); color: var(--dim); }
.hint { font-family: var(--data); font-size: 11.5px; color: var(--faint); margin: 12px 0 0; }
strong { font-weight: 600; color: var(--ink); }

a { color: var(--green-lit); text-decoration: none; border-bottom: 1px solid rgba(111, 239, 180, .28); }
a:hover { border-bottom-color: var(--green-lit); }

code, .mono { font-family: var(--data); font-size: .86em; overflow-wrap: break-word; }
code { background: rgba(20, 192, 122, .10); border: 1px solid var(--rule-soft); padding: 1.5px 6px; border-radius: 5px; color: var(--green-lit); }

.formula {
  font-family: var(--data); font-size: clamp(12px, 2.6vw, 14px); line-height: 2;
  border-left: 2px solid var(--green);
  padding: 18px clamp(15px, 3.5vw, 22px); margin: 24px 0;
  overflow-x: auto; white-space: pre; -webkit-overflow-scrolling: touch;
  color: var(--ink);
}
.formula .gh { color: var(--faint); }

.pullquote {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(20px, 4vw, 29px); line-height: 1.22; letter-spacing: -.028em;
  text-wrap: balance; margin: 34px 0; padding-left: 22px;
  border-left: 2px solid var(--green); color: var(--ink);
}

ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
ul li { position: relative; padding-left: 26px; margin-bottom: 11px; }
ul li::before {
  content: "Ω"; position: absolute; left: 0; top: 0;
  font-family: var(--data); font-size: 12px; color: var(--green); opacity: .8;
}

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; }
table { border-collapse: collapse; width: 100%; font-family: var(--data); font-size: 12.5px; }
th, td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
th {
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 400;
  color: var(--dim); background: rgba(4, 12, 9, .55); border-bottom: 1px solid var(--rule); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
td.key { white-space: nowrap; color: var(--dim); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
td.desc { font-family: var(--body); font-size: 14.5px; line-height: 1.5; color: var(--dim); min-width: 15em; }

@media (max-width: 660px) {
  th, td { padding: 10px 12px; }
  td.desc { min-width: 0; font-size: 13.5px; }
  td.key, td.num { white-space: normal; overflow-wrap: anywhere; }
  table { font-size: 11.5px; }
}

.note { padding: 18px clamp(16px, 3.5vw, 22px); margin: 24px 0; font-size: clamp(15px, 1.2vw + 12px, 16px); color: var(--dim); }
.note b { color: var(--ink); font-weight: 600; }

.notlive { display: flex; gap: 13px; align-items: flex-start; padding: 18px 20px; margin: 0 0 4px; }
.notlive .dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 9px;
  background: var(--warn); box-shadow: 0 0 0 4px rgba(232, 178, 74, .13);
}
.notlive b { font-family: var(--display); font-size: 14px; letter-spacing: -.01em; color: var(--ink); }
.notlive p { margin: 4px 0 0; font-size: 15px; color: var(--dim); }

.quote { padding: clamp(17px, 4vw, 24px); border-top: 1px solid var(--rule-soft); }
.q-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.q-row:last-of-type { border-bottom: 0; }
.q-key { font-family: var(--data); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.q-val { font-family: var(--data); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.q-val.heavy { color: var(--green-lit); }
.q-note { font-family: var(--body); font-size: 15px; color: var(--dim); margin: 15px 0 0; }
.cell-label { display: block; font-family: var(--data); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: var(--tap); padding: 0 22px;
  font-family: var(--data); font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--void); background: var(--green-lit);
  border: 1px solid var(--green-lit); border-radius: 999px; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 6px 26px rgba(20, 192, 122, .26);
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 34px rgba(20, 192, 122, .36); border-bottom-color: var(--green-lit); }
.cta--ghost { color: var(--ink); background: var(--glass); border-color: var(--rule); box-shadow: none; }
.cta--ghost:hover { border-color: var(--green); color: var(--green-lit); box-shadow: none; }

footer.bottombar {
  max-width: var(--shell); margin: var(--gap) auto 0;
  padding: 18px var(--pad) calc(46px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule-soft);
  display: flex; justify-content: space-between; align-items: center; gap: 6px 18px; flex-wrap: wrap;
  font-family: var(--data); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint);
}
.bottombar > span, .bottombar a { display: inline-flex; align-items: center; min-height: 34px; }
.bottombar a { color: var(--faint); border: 0; }
.bottombar a:hover { color: var(--green-lit); }
