@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/schibsted-grotesk/schibsted-grotesk-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/schibsted-grotesk/schibsted-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/schibsted-grotesk/schibsted-grotesk-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/schibsted-grotesk/schibsted-grotesk-latin-700-normal.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #FFFFFF;
  --fg: #0C0C0E;
  --muted: #5E5E66;
  --red: #E5322D;
  --line: rgba(12, 12, 14, 0.14);
  --line-soft: rgba(12, 12, 14, 0.08);
  --surface: rgba(12, 12, 14, 0.035);
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(72px, 10vw, 136px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0C0E;
    --fg: #FFFFFF;
    --muted: #8E8E96;
    --line: rgba(255, 255, 255, 0.18);
    --line-soft: rgba(255, 255, 255, 0.10);
    --surface: rgba(255, 255, 255, 0.05);
  }
}
:root[data-theme="dark"] {
  --bg: #0C0C0E;
  --fg: #FFFFFF;
  --muted: #8E8E96;
  --line: rgba(255, 255, 255, 0.18);
  --line-soft: rgba(255, 255, 255, 0.10);
  --surface: rgba(255, 255, 255, 0.05);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 16px;
  text-decoration: none;
}

/* ---------- header ---------- */

.site-head { border-bottom: 1px solid var(--line-soft); }
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding-block: 16px;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand .lockup { display: block; width: 122px; height: auto; color: var(--fg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 34px);
  flex-wrap: wrap;
  font-size: 0.9375rem;
  font-weight: 500;
}
.site-nav a { text-decoration: none; color: var(--muted); padding-block: 4px; }
.site-nav a:hover { color: var(--fg); }
.site-nav a.is-docs { color: var(--fg); }
.site-nav a.is-docs:hover { color: var(--red); }

/* The migration button, in the header of every page. It carries the brand's
   primary button treatment rather than a red one of its own: solid ink on
   white, red on hover, which is what .btn-primary already does. Time
   limited, and comes off with the homepage section it points at. */
.site-nav a.is-migrate {
  padding: 9px 16px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}
.site-nav a.is-migrate:hover { background: var(--red); color: #FFFFFF; }

/* ---------- type ---------- */

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.06;
  text-wrap: balance;
}
h1 { font-size: clamp(2.0625rem, 5.4vw, 3.875rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.875rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.02em; line-height: 1.2; }

p { margin: 0; }
.lead {
  font-size: clamp(1.125rem, 1.9vw, 1.4375rem);
  line-height: 1.45;
  letter-spacing: -0.012em;
}
.body-text { font-size: clamp(1rem, 1.35vw, 1.125rem); color: var(--muted); }
.body-text a { color: var(--fg); text-decoration-color: var(--line); text-underline-offset: 3px; }
.body-text a:hover { color: var(--red); text-decoration-color: currentColor; }

.eyebrow {
  margin: 0 0 clamp(18px, 2.4vw, 30px);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

section { padding-block: var(--section); }

/* ---------- hero ---------- */

.hero { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(48px, 6vw, 80px); }
.hero-copy { max-width: 56ch; }
.hero h1 { margin-bottom: clamp(20px, 2.6vw, 34px); }
.hero .lead { margin-bottom: clamp(18px, 2vw, 26px); }
.hero .body-text { max-width: 60ch; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(28px, 3.4vw, 44px);
}
.btn {
  display: inline-block;
  padding: 14px 26px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--red); }
.btn-secondary { border-color: var(--line); color: var(--fg); }
.btn-secondary:hover { border-color: var(--red); color: var(--red); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(48px, 6vw, 84px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line-soft);
}
.stat-value {
  display: block;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--red);
}
.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--muted);
  max-width: 24ch;
}

/* Measured-figures band, directly under the homepage hero. */
.metrics { border-top: 1px solid var(--line-soft); padding-block: clamp(36px, 4.5vw, 60px); }
.metrics .stats {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 2.6vw, 36px);
}
@media (min-width: 860px) {
  .metrics .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.metrics .stat-value { font-size: clamp(1.5rem, 2.8vw, 2.125rem); }
.metrics .stat-label { max-width: 28ch; }
.metrics .footnote { margin-top: clamp(28px, 3vw, 40px); }

/* ---------- predicate card ---------- */

.predicate { padding-top: 0; }
.card { border: 1px solid var(--line); background: var(--surface); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 600;
}
.card-head .tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.card pre {
  margin: 0;
  padding: clamp(20px, 3.4vw, 34px) clamp(18px, 3vw, 28px);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.8125rem, 1.5vw, 1rem);
  line-height: 1.75;
  letter-spacing: -0.01em;
}
.card-foot {
  padding: 14px clamp(18px, 3vw, 28px);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- the red band, the mark's crossbar as a page graphic ---------- */

.band { height: clamp(10px, 1.6vw, 18px); background: var(--red); }

/* ---------- measured ---------- */

.measured h2 { max-width: 20ch; margin-bottom: clamp(18px, 2vw, 26px); }
.measured .body-text { max-width: 62ch; }

.bigstats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(44px, 5.5vw, 76px);
}
.bigstat-value {
  display: block;
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--red);
}
.bigstat-text {
  margin-top: 16px;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 42ch;
}

.table-wrap {
  margin-top: clamp(48px, 6vw, 80px);
  overflow-x: auto;
  border-top: 1px solid var(--line);
}
table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: clamp(0.875rem, 1.3vw, 1rem);
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: 15px 18px 15px 0;
  text-align: right;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
th:first-child, td:first-child { text-align: left; white-space: normal; }
thead th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 18px;
  padding-bottom: 14px;
}
tbody th { font-weight: 400; }
tbody tr.is-zkfol { font-weight: 600; }
tbody tr.is-zkfol th { font-weight: 600; color: var(--red); }
tbody tr.is-zkfol td, tbody tr.is-zkfol th { border-bottom-color: var(--line); }

.footnote {
  margin-top: 22px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 78ch;
}

/* ---------- modulus ---------- */

.modulus { border-top: 1px solid var(--line-soft); }
.modulus h2 { max-width: 18ch; margin-bottom: clamp(20px, 2.4vw, 30px); }
.modulus .body-text { max-width: 64ch; }

/* ---------- by construction ---------- */

.construction { border-top: 1px solid var(--line-soft); }
.construction h2 { max-width: 22ch; margin-bottom: clamp(20px, 2.4vw, 30px); }
.construction .intro { max-width: 64ch; }

.props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(32px, 4vw, 56px);
  margin-top: clamp(52px, 6vw, 84px);
  padding: 0;
  list-style: none;
}
.props li { padding-top: 24px; border-top: 2px solid var(--red); }
.prop-num {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.props h3 { margin: 14px 0 12px; }
.props p { font-size: 1rem; line-height: 1.6; color: var(--muted); }

/* ---------- privacy ---------- */

.privacy { border-top: 1px solid var(--line-soft); }
.privacy-note {
  border-left: 2px solid var(--red);
  padding-left: clamp(20px, 3vw, 32px);
  max-width: 58ch;
}
.privacy-note p {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.45;
  letter-spacing: -0.012em;
}

/* ---------- worked example ---------- */

.example { border-top: 1px solid var(--line-soft); }
.example .statement {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.22;
  max-width: 26ch;
  text-wrap: balance;
}
.example .follow { margin-top: clamp(24px, 3vw, 36px); max-width: 56ch; }

/* ---------- review ---------- */

.review { border-top: 1px solid var(--line-soft); }
.review h2 { max-width: 18ch; margin-bottom: clamp(22px, 2.6vw, 32px); }
.review .body-text { max-width: 68ch; }
.review .body-text + .body-text { margin-top: 1.25em; }

/* ---------- call to action ---------- */

.cta { border-top: 1px solid var(--line-soft); padding-bottom: clamp(72px, 9vw, 120px); }
.cta h2 { margin-bottom: 18px; }
.cta .body-text { max-width: 48ch; }

/* ---------- footer ---------- */

.site-foot { border-top: 1px solid var(--line-soft); }
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding-block: 32px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.site-foot a { text-decoration: none; color: var(--muted); }
.site-foot a:hover { color: var(--fg); }

@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a, .site-foot a, .body-text a {
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  }
}
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 72px); align-items: center; }
.hero-mark { display: none; width: clamp(180px, 20vw, 272px); height: auto; color: var(--fg); justify-self: end; }
@media (min-width: 900px) {
  .hero-top { grid-template-columns: minmax(0, 1fr) auto; }
  .hero-mark { display: block; }
}
.foot-brand { display: inline-flex; align-items: center; gap: 12px; margin: 0; }
.foot-mark { width: 18px; height: auto; color: var(--fg); flex: none; }

/* The contract address line, its own row at the foot of every page. */
.foot-contract {
  flex-basis: 100%;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.875rem;
}
.foot-contract code { font-size: 1em; word-break: break-all; }
.site-foot .foot-contract a { color: var(--fg); }
.site-foot .foot-contract a:hover { color: var(--red); }

/* Narrow screens: put the label on its own line so the address starts one,
   and drop it a step so all 42 characters fit without breaking. A contract
   address split across two lines is harder to check by eye. */
@media (max-width: 519px) {
  .foot-contract { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
  .foot-contract code { font-size: 0.8125rem; }
}

/* ---------- inner pages ---------- */

.page-hero { padding-top: clamp(48px, 7vw, 92px); padding-bottom: clamp(32px, 4vw, 56px); }
.page-hero h1 { max-width: 20ch; margin-bottom: clamp(18px, 2.2vw, 28px); }
.page-hero .lead { max-width: 62ch; color: var(--muted); }

.block { border-top: 1px solid var(--line-soft); padding-block: clamp(56px, 8vw, 112px); }
.block h2 { max-width: 24ch; margin-bottom: clamp(16px, 2vw, 24px); }
.block .body-text { max-width: 68ch; }
.block .body-text + .body-text { margin-top: 1.25em; }
.block .table-wrap + .body-text { margin-top: 22px; }

.ratios { margin-top: 24px; font-size: clamp(1rem, 1.3vw, 1.0625rem); font-weight: 600; letter-spacing: -0.01em; }
.ratios span { color: var(--red); }

.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(28px, 3.5vw, 48px); margin: clamp(40px, 5vw, 68px) 0 0; padding: 0; list-style: none; }
.defs li { padding-top: 20px; border-top: 2px solid var(--red); }
.defs h3 { margin: 0 0 10px; }
.defs p { font-size: 1rem; line-height: 1.6; color: var(--muted); }

.limits { display: grid; gap: clamp(30px, 3.4vw, 44px); margin: clamp(36px, 4.5vw, 64px) 0 0; padding: 0; list-style: none; }
.limits li { padding-left: clamp(18px, 2.4vw, 30px); border-left: 2px solid var(--red); max-width: 66ch; }
.limits h3 { margin: 0 0 10px; font-size: clamp(1.125rem, 1.7vw, 1.3125rem); }
.limits p { font-size: 1rem; line-height: 1.6; color: var(--muted); }
.limits p + p { margin-top: 0.9em; }

table.compact { min-width: 360px; }
table.compact td, table.compact th { white-space: normal; }

.paper { margin-top: clamp(32px, 4vw, 52px); padding-top: clamp(24px, 3vw, 34px); border-top: 2px solid var(--red); max-width: 70ch; }
.paper a.eyebrow-link { display: inline-block; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; color: var(--red); text-decoration: none; margin-bottom: 10px; }
.paper a.eyebrow-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.paper h3 { margin: 0 0 8px; }
.paper .byline { font-size: 0.9375rem; color: var(--muted); margin-bottom: 18px; }

code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.9em; }
.site-nav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--red); }

.more-link { margin-top: clamp(28px, 3.4vw, 44px); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.more-link a { color: var(--fg); text-decoration-color: var(--line); text-underline-offset: 4px; }
.more-link a:hover { color: var(--red); text-decoration-color: currentColor; }
.smallprint { margin-top: clamp(28px, 3vw, 40px); font-size: 0.875rem; line-height: 1.6; color: var(--muted); max-width: 72ch; }

/* Four-item grids sit 2 x 2 rather than 3 then 1. */
@media (min-width: 700px) {
  .props.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A footnote ends a block. Anything in a larger size that follows needs air,
   otherwise the size change reads as a mistake. */
.footnote + .body-text,
.footnote + .more-link,
.footnote + h3 { margin-top: clamp(30px, 3.4vw, 44px); }

/* A reserved notice, used where something is not published yet. */
.notice { margin-top: clamp(32px, 4vw, 48px); border: 1px solid var(--line); border-left: 3px solid var(--red); background: var(--surface); padding: clamp(20px, 3vw, 30px); max-width: 64ch; }
.notice-label { margin: 0 0 10px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.notice-body { margin: 0; font-size: clamp(1rem, 1.4vw, 1.125rem); line-height: 1.5; }

/* The contract address on token.html. Shown as plain selectable text
   rather than a link, so it can be copied without the risk of following
   something by accident; the Etherscan button next to it is the link. */
.address {
  margin-top: clamp(20px, 2.4vw, 28px);
  font-size: clamp(0.75rem, 3.3vw, 1.3125rem);
  color: var(--fg);
  word-break: break-all;
}
.address code { font-size: 1em; }

/* ---------- mobile navigation ----------
   CSS only, so the site still ships no JavaScript. The checkbox is the
   control and stays focusable; the label is what you see and press. */

.nav-toggle { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.nav-burger { display: none; }
.burger-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 959px) {
  .site-head .wrap { min-height: 64px; gap: 16px; }

  .nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -11px;
    color: var(--fg);
    cursor: pointer;
  }
  .nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--red); outline-offset: -4px; }

  .burger-bars { position: relative; }
  .burger-bars,
  .burger-bars::before,
  .burger-bars::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
  }
  .burger-bars::before,
  .burger-bars::after { content: ""; position: absolute; left: 0; }
  .burger-bars::before { top: -7px; }
  .burger-bars::after { top: 7px; }

  .nav-toggle:checked + .nav-burger .burger-bars { background: transparent; }
  .nav-toggle:checked + .nav-burger .burger-bars::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked + .nav-burger .burger-bars::after { top: 0; transform: rotate(-45deg); }

  .site-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: 8px;
    border-top: 1px solid var(--line-soft);
    font-size: 1.0625rem;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }

  .site-nav a {
    padding-block: 15px;
    color: var(--fg);
    border-bottom: 1px solid var(--line-soft);
  }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a[aria-current="page"] { box-shadow: none; color: var(--red); }

  /* In the burger menu the migration button is a full width block at the
     foot of the list, so it still reads as the one action on the page. */
  .site-nav a.is-migrate {
    margin-top: 14px;
    padding: 15px 16px;
    text-align: center;
    border-bottom: 0;
    background: var(--fg);
    color: var(--bg);
  }
}

@media (max-width: 959px) and (prefers-reduced-motion: no-preference) {
  .burger-bars,
  .burger-bars::before,
  .burger-bars::after {
    transition: top 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
  }
}


/* Above the burger but below full width, tighten the inline nav so the six
   items, the migration button among them, stay on one line rather than
   wrapping. Measured across the range: at 960 the six fit with about 24px to spare,
   and full width spacing returns at 1100, where it fits with about 20px. */
@media (min-width: 960px) and (max-width: 1099px) {
  .site-head .wrap { gap: 16px; }
  .site-nav { font-size: 0.875rem; gap: clamp(12px, 1.5vw, 24px); }
  .site-nav a.is-migrate { padding-inline: 12px; }
}
