/* =========================================================
   QuantSEC — design tokens
   ========================================================= */
:root {
  --orange: #FF5000;
  --orange-600: #E04600;
  --amber: #FDB515;
  --black: #000000;
  --ink: #16181B;
  --bone: #ECECE8;
  --bone-2: #F6F6F3;
  --white: #FFFFFF;
  --steel: #8B8E94;
  --line: #D4D4CF;
  --line-dark: #2C2F34;
  --text: #121314;
  --text-muted: #55585E;
  --text-inv-muted: #A3A6AC;

  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1376px;
  --r-s: 6px;
  --r-m: 12px;
  --sec: clamp(4.5rem, 9vw, 8rem);
  --sec-s: clamp(3.5rem, 6vw, 5.5rem);

  --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 19'%3E%3Cpath d='M15.3 9.03 11.4 4.98l1.05-1.05L18 9.78l-5.55 5.7-1.05-1.05 3.9-3.9H0v-1.5h15.3Z'/%3E%3C/svg%3E");
  --i-diag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M6.8 1 3.4.9V0l4.9.1.1 4.9h-.9V1.6L.9 8.2.2 7.6Z'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 19'%3E%3Cpath d='M14.25 7.9 9.5 12.67 4.75 7.9l1.1-1.1L9.5 10.45l3.64-3.64Z'/%3E%3C/svg%3E");
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; }
p, ul, ol { margin: 0; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--orange); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--orange); color: #fff; padding: .6rem 1rem; border-radius: var(--r-s);
}
.skip:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type scale */
.h-jumbo { font-size: clamp(3rem, 8vw, 6.5rem); letter-spacing: -0.045em; line-height: .96; }
.h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); letter-spacing: -0.035em; line-height: 1; }
.h2, h2 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.03em; }
.h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.h5 { font-size: 1.375rem; }
.h6 { font-size: 1.125rem; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; max-width: 40ch; }
.measure { max-width: 62ch; }
.muted { color: var(--text-muted); }
.bg-black .muted, .bg-ink .muted, .hero .muted, .page-hero .muted, .tile .muted { color: var(--text-inv-muted); }
.mono { font-family: var(--mono); }

.label { display: inline-block; font-size: .875rem; font-weight: 500; color: var(--orange); }
.label::before { content: "[\00a0"; }
.label::after { content: "\00a0]"; }

/* Icons drawn with CSS masks so HTML stays clean */
.i { display: inline-block; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat; }
.i--diag { width: 9px; height: 9px; -webkit-mask-image: var(--i-diag); mask-image: var(--i-diag); }
.i--chev { width: 19px; height: 19px; -webkit-mask-image: var(--i-chev); mask-image: var(--i-chev); transition: transform .2s; }
.i--left { transform: rotate(180deg); }

/* =========================================================
   Layout
   ========================================================= */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; row-gap: 2rem; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.start-8 { grid-column: 8 / span 5; }
.stack-s { display: grid; gap: 1rem; align-content: start; justify-items: start; }
.stack-m { display: grid; gap: 1.5rem; align-content: start; justify-items: start; }
@media (max-width: 991px) {
  .span-7, .span-6, .span-5, .start-8 { grid-column: 1 / -1; }
}

.section { padding: var(--sec) 0; }
.section--tight { padding: var(--sec-s) 0; }
.bg-bone { background: var(--bone); }
.bg-white { background: var(--white); }
.bg-black { background: var(--black); color: #fff; }
.bg-ink { background: var(--ink); color: #fff; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.section-head .stack-s { max-width: 760px; }

/* =========================================================
   Buttons & links
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.3rem; border-radius: var(--r-s); border: 1px solid transparent;
  font: 500 1rem/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-600); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: #fff; color: #000; border-color: #fff; }
.bg-bone .btn--ghost:hover, .bg-white .btn--ghost:hover { background: #000; color: #fff; border-color: #000; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.link-arrow {
  position: relative; display: inline-flex; align-items: center; gap: .5rem;
  color: var(--orange); font-weight: 500; text-decoration: none;
}
.link-arrow::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: currentColor; transition: width .25s ease;
}
.link-arrow:hover::after, a:hover > .link-arrow::after, a:focus-visible > .link-arrow::after { width: 100%; }

/* =========================================================
   Contract address bar (top of every page)
   ========================================================= */
.ca-bar { background: var(--orange); color: #fff; font-size: .875rem; }
.ca-bar .container {
  display: flex; align-items: center; justify-content: center; gap: .5rem .9rem;
  flex-wrap: wrap; min-height: 40px; padding-block: .45rem; text-align: center;
}
.ca-bar__label { font-weight: 600; }
.ca-bar__addr {
  font-family: var(--mono); font-size: .8125rem; background: rgba(0, 0, 0, .2);
  padding: .2rem .55rem; border-radius: 4px; overflow-wrap: anywhere;
}
.copy-btn {
  font: 600 .8125rem var(--font); background: #fff; color: #000; border: 0;
  border-radius: 4px; padding: .3rem .7rem; cursor: pointer;
}
.copy-btn:hover { background: #000; color: #fff; }

/* =========================================================
   Navigation
   ========================================================= */
.nav { position: sticky; top: 0; z-index: 60; background: #000; color: #fff; border-bottom: 1px solid var(--line-dark); }
.nav > .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 600; font-size: 1.3rem; letter-spacing: -0.03em; }
.brand svg { width: 34px; height: 34px; }
.brand__sec { color: var(--orange); }
.nav__menu { display: flex; align-items: center; gap: 2.25rem; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  display: inline-flex; align-items: center; gap: .25rem; padding: .5rem 0;
  background: none; border: 0; color: inherit; font: 500 .9375rem var(--font);
  text-decoration: none; cursor: pointer;
}
.nav__link:hover, .nav__link[aria-current="page"], .nav__link[aria-expanded="true"] { color: var(--orange); }
.nav__link[aria-expanded="true"] .i--chev { transform: rotate(180deg); }
.nav__dd { position: relative; }
.nav__panel {
  position: absolute; top: calc(100% + 21px); left: -1.75rem; width: min(640px, 80vw);
  display: none; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem;
  background: #000; border: 1px solid var(--line-dark); border-top: 2px solid var(--orange);
  padding: 2rem 1.75rem; border-radius: 0 0 var(--r-m) var(--r-m);
}
.nav__dd.is-open .nav__panel { display: grid; }
.nav__col { display: grid; gap: 1.25rem; align-content: start; }
.nav__item { display: block; text-decoration: none; }
.nav__item strong { display: block; font-weight: 500; font-size: 1.0625rem; }
.nav__item span { display: block; margin-top: .2rem; color: var(--text-inv-muted); font-size: .875rem; line-height: 1.45; }
.nav__item:hover strong { color: var(--orange); }
.nav__actions { display: flex; gap: .6rem; }
.nav__actions .btn { padding: .6rem 1rem; font-size: .9375rem; }
.nav__toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-dark); border-radius: var(--r-s);
  background: transparent; color: #fff; cursor: pointer; place-items: center;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s;
}
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; }
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1100px) and (min-width: 992px) {
  .nav__links { gap: 1.4rem; }
  .nav__menu { gap: 1.5rem; }
}
@media (max-width: 991px) {
  .nav__toggle { display: grid; }
  .nav__menu {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; top: var(--menu-top, 112px);
    flex-direction: column; align-items: stretch; gap: 0; overflow-y: auto;
    background: #000; padding: .5rem var(--pad) 2rem;
  }
  .nav.is-open .nav__menu { display: flex; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { width: 100%; justify-content: space-between; padding: 1.1rem 0; font-size: 1.25rem; border-bottom: 1px solid var(--line-dark); }
  .nav__panel { position: static; width: auto; grid-template-columns: 1fr; border: 0; padding: 1.25rem 0 1.5rem; border-radius: 0; }
  .nav__actions { flex-direction: column; margin-top: 1.75rem; }
  .nav__actions .btn { padding: 1rem; font-size: 1rem; }
}

/* =========================================================
   Home hero with live lattice
   ========================================================= */
.hero {
  position: relative; background: #000; color: #fff; overflow: hidden;
  min-height: min(86vh, 860px); display: flex; align-items: flex-end;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, #000 0%, rgba(0,0,0,.88) 28%, rgba(0,0,0,.2) 62%, rgba(0,0,0,0) 80%),
    linear-gradient(0deg, #000 0%, rgba(0,0,0,0) 35%);
}
.hero > .container { position: relative; z-index: 2; padding-block: clamp(6rem, 13vw, 10rem) clamp(2.5rem, 5vw, 4rem); }
.hero__copy { max-width: 780px; display: grid; gap: 1.75rem; justify-items: start; }
.hero__copy .lead { color: #D6D7DA; max-width: 46ch; }
.hero__foot {
  margin-top: clamp(3rem, 7vw, 5.5rem); padding-top: 1.25rem; border-top: 1px solid var(--line-dark);
  display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; font-size: .875rem; color: var(--text-inv-muted);
}
.hero__foot p { max-width: 60ch; }
.hero__foot strong { color: #fff; font-weight: 500; }
@media (max-width: 767px) {
  .hero::before { background: linear-gradient(0deg, #000 10%, rgba(0,0,0,.75) 60%, rgba(0,0,0,.35) 100%); }
}

.pill {
  display: inline-flex; align-items: center; gap: .65rem; max-width: 100%;
  padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, .05); font-size: .875rem; text-decoration: none;
  transition: border-color .2s;
}
.pill:hover { border-color: var(--orange); }
.pill .i { color: var(--orange); }

/* Inner page hero */
.page-hero { position: relative; background: #000; color: #fff; overflow: hidden; }
.page-hero__art {
  position: absolute; top: 0; right: 0; bottom: 0; width: 58%; color: #3a3d42;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}
.page-hero__art svg { width: 100%; height: 100%; }
.page-hero > .container { position: relative; z-index: 2; padding-block: clamp(5rem, 11vw, 8.5rem) clamp(3.5rem, 7vw, 5.5rem); }
.page-hero__copy { max-width: 760px; display: grid; gap: 1.5rem; justify-items: start; }
.page-hero__copy .lead { color: #D6D7DA; max-width: 50ch; }
@media (max-width: 767px) { .page-hero__art { width: 100%; opacity: .45; } }

/* Sub navigation (in-page anchors) */
.subnav { position: sticky; top: 72px; z-index: 40; background: var(--bone); border-bottom: 1px solid var(--line); }
.subnav .container { display: flex; gap: 2rem; overflow-x: auto; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav a { padding: 1rem 0; white-space: nowrap; text-decoration: none; font-weight: 500; font-size: .9375rem; color: var(--text-muted); border-bottom: 2px solid transparent; }
.subnav a:hover, .subnav a.is-active { color: var(--text); border-bottom-color: var(--orange); }

/* =========================================================
   Cards, rails
   ========================================================= */
.rail-btns { display: flex; gap: .5rem; }
.rail-btn {
  width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid currentColor; border-radius: var(--r-s); background: transparent; color: inherit;
  transition: background-color .2s, color .2s;
}
.rail-btn:hover:not(:disabled) { background: var(--orange); border-color: var(--orange); color: #fff; }
.rail-btn:disabled { opacity: .3; cursor: default; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2rem) / 2.6);
  gap: 1rem; margin-top: 3rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail--3 { grid-auto-columns: calc((100% - 2rem) / 3.2); }
@media (max-width: 991px) { .rail, .rail--3 { grid-auto-columns: calc((100% - 1rem) / 1.6); } }
@media (max-width: 600px) { .rail, .rail--3 { grid-auto-columns: 84%; } }

.card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 1.25rem;
  background: #fff; color: var(--text); border-radius: var(--r-m); padding: 1.25rem 1.25rem 1.75rem;
  text-decoration: none;
}
.card::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  background: var(--orange); transition: width .35s ease;
}
a.card:hover::after, a.card:focus-visible::after { width: 100%; }
.card h3 { font-size: 1.375rem; }
.card p { color: var(--text-muted); }
.card .link-arrow { margin-top: auto; }
.art { background: #000; color: #4a4d53; border-radius: var(--r-s); overflow: hidden; }
.art svg { width: 100%; height: 100%; }
.card .art { aspect-ratio: 16 / 10; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3rem; }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 991px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .card-grid, .card-grid--2 { grid-template-columns: 1fr; } }

/* Dark feature cards (use-case style) */
.feature {
  display: flex; flex-direction: column; background: #000; color: #fff; border-radius: var(--r-m);
  overflow: hidden; text-decoration: none; border: 1px solid #000; transition: border-color .2s;
}
.feature:hover { border-color: var(--orange); }
.feature .art { aspect-ratio: 16 / 9; border-radius: 0; }
.feature__body { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem 1.5rem 1.75rem; flex: 1; }
.feature__body p { color: var(--text-inv-muted); }
.feature .link-arrow { margin-top: auto; }

/* =========================================================
   Pillars (hover/tab swap)
   ========================================================= */
.pillars { display: grid; grid-template-columns: 5fr 7fr; gap: 1rem; margin-top: 3rem; }
.pillar-list { display: grid; gap: 1rem; }
.pillar {
  display: grid; gap: .5rem; text-align: left; padding: 1.75rem; cursor: pointer;
  background: transparent; color: inherit; font: inherit;
  border: 1px solid var(--line); border-radius: var(--r-m); transition: background-color .2s, border-color .2s;
}
.pillar p { color: var(--text-muted); }
.pillar[aria-selected="true"] { background: #fff; border-color: #fff; }
.pillar[aria-selected="true"] h3 { color: var(--orange); }
.pillar-stage { position: relative; min-height: 440px; background: #000; color: #4a4d53; border-radius: var(--r-m); overflow: hidden; }
.pillar-panel { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; display: flex; flex-direction: column; }
.pillar-panel.is-active { opacity: 1; }
.pillar-panel svg { flex: 1; width: 100%; min-height: 0; }
.pillar-panel p { padding: 0 1.75rem 1.5rem; color: var(--text-inv-muted); font-size: .9375rem; max-width: 60ch; }
@media (max-width: 991px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar-stage { min-height: 300px; order: -1; }
}

/* =========================================================
   Bento tiles
   ========================================================= */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(250px, auto); gap: 1rem; margin-top: 3rem; }
.tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
  background: #000; color: #fff; border-radius: var(--r-m); padding: 1.75rem;
}
.tile--wide { grid-column: span 2; }
.tile--tall { grid-row: span 2; }
.tile--orange { background: var(--orange); }
.tile--orange .muted { color: rgba(255,255,255,.85); }
.tile--art { padding: 0; color: #4a4d53; }
.tile--art svg { width: 100%; height: 100%; }
.tile__num { font-size: clamp(2.75rem, 5vw, 4.5rem); line-height: 1; letter-spacing: -0.045em; font-weight: 500; }
.tile p { font-size: .9375rem; max-width: 42ch; }
.tile__tag { font-size: .8125rem; color: var(--text-inv-muted); }
.tile--orange .tile__tag { color: rgba(255,255,255,.85); }
@media (max-width: 991px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: minmax(200px, auto); }
  .tile--wide { grid-column: auto; } .tile--tall { grid-row: auto; }
}

/* =========================================================
   Tabs (browse content)
   ========================================================= */
.tabs { position: relative; display: flex; gap: 2rem; border-bottom: 1px solid var(--line-dark); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 1rem 0; background: none; border: 0; cursor: pointer; white-space: nowrap;
  color: var(--text-inv-muted); font: 500 1.0625rem var(--font);
}
.tab:hover, .tab[aria-selected="true"] { color: #fff; }
.tabs__bar { position: absolute; bottom: 0; left: 0; height: 2px; width: 0; background: var(--orange); transition: left .3s ease, width .3s ease; }
.tabpanel { padding-top: 3rem; }
.tabpanel[hidden] { display: none; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
@media (max-width: 991px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }
.post {
  display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem; min-height: 280px;
  padding: 1.75rem; border: 1px solid var(--line-dark); border-radius: var(--r-m); background: var(--ink);
  color: #fff; text-decoration: none; transition: border-color .2s;
}
.post:hover { border-color: var(--orange); }
.post h3 { font-size: 1.375rem; line-height: 1.2; }
.post__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .875rem; color: var(--text-inv-muted); }
.post__foot .link-arrow { color: #fff; }

.status { display: inline-flex; align-items: center; gap: .45rem; font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--steel); }
.status--active::before { background: var(--orange); }
.status--draft::before { background: var(--amber); }

/* =========================================================
   Software: layer stack, tables, steps
   ========================================================= */
.layers { display: grid; gap: .6rem; margin-top: 3rem; }
.layer {
  display: grid; grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem 2rem; align-items: start;
  padding: 1.75rem; background: #fff; border-radius: var(--r-m); border-left: 4px solid var(--line);
}
.layer:first-child { border-left-color: var(--orange); }
.layer__n { font-family: var(--mono); font-size: .875rem; color: var(--orange); padding-top: .3rem; }
.layer h3 { font-size: 1.375rem; margin-bottom: .5rem; }
.layer p { color: var(--text-muted); }
@media (max-width: 860px) { .layer { grid-template-columns: 1fr; gap: .75rem; } }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font-size: .8125rem; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bone-2); }
.bg-black .chip, .bg-ink .chip { border-color: var(--line-dark); background: transparent; color: #D6D7DA; }

.ticks { list-style: none; padding: 0; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.5rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--orange); transform: rotate(45deg); }

.table-wrap { margin-top: 3rem; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .9375rem; }
th, td { padding: 1rem 1.25rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--bone-2); font-weight: 600; font-size: .875rem; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 500; }
.bg-black .table-wrap { background: var(--ink); border-color: var(--line-dark); }
.bg-black th, .bg-black td { border-color: var(--line-dark); }
.bg-black thead th { background: #000; color: var(--text-inv-muted); }

.steps { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 1.5rem; margin-top: 3rem; counter-reset: step; }
.step { border-top: 2px solid var(--line); padding-top: 1.25rem; counter-increment: step; display: grid; gap: .5rem; align-content: start; }
.step::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: .875rem; color: var(--orange); margin-bottom: .5rem; }
.step h3 { font-size: 1.125rem; }
.step p { font-size: .9375rem; color: var(--text-muted); }
.bg-black .step, .bg-ink .step { border-top-color: var(--line-dark); }
.bg-black .step p, .bg-ink .step p { color: var(--text-inv-muted); }
@media (max-width: 991px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Research notes list */
.notes { margin-top: 3rem; border-top: 1px solid var(--line); }
.note {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr) 10rem 8rem; gap: 1.5rem; align-items: baseline;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line);
}
.note__id { font-family: var(--mono); font-size: .875rem; color: var(--text-muted); }
.note h3 { font-size: 1.1875rem; line-height: 1.3; }
.note p { color: var(--text-muted); font-size: .9375rem; margin-top: .35rem; }
.note__area { font-size: .875rem; color: var(--text-muted); }
@media (max-width: 860px) { .note { grid-template-columns: 1fr; gap: .4rem; } }

/* =========================================================
   Roadmap
   ========================================================= */
.scale { margin-top: 3.5rem; position: relative; height: 92px; }
.scale__axis { position: absolute; left: 0; right: 0; top: 30px; height: 2px; background: var(--line-dark); }
.scale__fill { position: absolute; left: 0; top: 30px; height: 2px; width: 100%; background: linear-gradient(90deg, var(--orange), var(--amber)); }
.scale__mark { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; gap: .5rem; text-decoration: none; color: #fff; }
.scale__mark:last-child { transform: translateX(-100%); justify-items: end; }
.scale__dot { width: 14px; height: 14px; margin-top: 24px; border-radius: 50%; background: #000; border: 2px solid var(--orange); }
.scale__mark:hover .scale__dot { background: var(--orange); }
.scale__mark span { font-size: .875rem; color: var(--text-inv-muted); white-space: nowrap; }
.scale__mark strong { font-weight: 500; font-size: 1.0625rem; white-space: nowrap; }

.horizon { display: grid; grid-template-columns: 4fr 8fr; gap: 2rem 3rem; padding-block: clamp(3.5rem, 7vw, 5.5rem); border-top: 1px solid var(--line); scroll-margin-top: 130px; }
.horizon:first-of-type { border-top: 0; }
.horizon__head { display: grid; gap: 1rem; align-content: start; }
.horizon__year { font-size: clamp(5rem, 12vw, 10rem); line-height: .82; letter-spacing: -0.06em; font-weight: 500; }
.horizon__year sup { font-size: .22em; letter-spacing: -0.01em; vertical-align: top; margin-left: .2em; color: var(--orange); }
.horizon__head h3 { font-size: 1.75rem; }
.horizon__head p { color: var(--text-muted); }
.horizon__body { display: grid; gap: 1.5rem; }
.tracks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.track { background: #fff; border-radius: var(--r-m); padding: 1.5rem; }
.track h4 { font-size: 1.0625rem; margin-bottom: 1rem; }
.track ul { padding-left: 1.1rem; display: grid; gap: .55rem; color: var(--text-muted); font-size: .9375rem; }
.gate { border-left: 3px solid var(--orange); padding: .25rem 0 .25rem 1.25rem; }
.gate strong { font-weight: 600; }
@media (max-width: 991px) { .horizon { grid-template-columns: 1fr; } .tracks { grid-template-columns: 1fr; } }

.cycle-wrap { display: grid; grid-template-columns: 6fr 6fr; gap: 3rem; align-items: center; }
.cycle { width: 100%; max-width: 520px; justify-self: center; }
.cycle text { font-family: var(--font); fill: #fff; font-size: 15px; font-weight: 500; }
.cycle .sub { fill: var(--text-inv-muted); font-size: 12px; font-weight: 400; }
@media (max-width: 991px) { .cycle-wrap { grid-template-columns: 1fr; } }

/* =========================================================
   Token page
   ========================================================= */
.ca-panel { background: #000; color: #fff; border-radius: var(--r-m); padding: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1.25rem; border: 1px solid var(--line-dark); }
.ca-panel__row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.ca-panel code { font-size: clamp(.9rem, 1.8vw, 1.25rem); background: var(--ink); border: 1px solid var(--line-dark); border-radius: var(--r-s); padding: .75rem 1rem; overflow-wrap: anywhere; flex: 1 1 360px; }
.ca-panel .copy-btn { padding: .85rem 1.2rem; font-size: .9375rem; background: var(--orange); color: #fff; }
.ca-panel .copy-btn:hover { background: var(--orange-600); }
.ca-panel .copy-btn[hidden] { display: none; }
.ca-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.ca-links a, .ca-links span {
  display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border: 1px solid var(--line-dark);
  border-radius: var(--r-s); text-decoration: none; font-size: .875rem;
}
.ca-links a:hover { border-color: var(--orange); color: var(--orange); }
.ca-links span { color: #5f6268; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .75rem 2rem; margin-top: 2rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-weight: 500; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: .2rem; } .kv dd { margin-bottom: .8rem; } }

.notice { border: 1px solid var(--line); border-left: 4px solid var(--orange); background: #fff; border-radius: var(--r-s); padding: 1.25rem 1.5rem; }

/* =========================================================
   Pre-footer & footer
   ========================================================= */
.prefooter { position: relative; overflow: hidden; background: #000; color: #fff; }
.prefooter__art { position: absolute; inset: 0; color: #24272b; }
.prefooter__art svg { width: 100%; height: 100%; }
.prefooter::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 85% 110%, rgba(255,80,0,.35), transparent 55%); pointer-events: none; }
.prefooter > .container { position: relative; z-index: 2; padding-block: var(--sec); }
.prefooter__copy { max-width: 820px; display: grid; gap: 1.5rem; justify-items: start; }
.prefooter__copy p { color: #D6D7DA; max-width: 52ch; }

.footer { background: #000; color: #fff; border-top: 1px solid var(--line-dark); }
.footer__top { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 2.5rem 2rem; padding-block: 4.5rem 3.5rem; }
.footer__brand { display: grid; gap: 1.25rem; align-content: start; justify-items: start; }
.footer__brand p { color: var(--text-inv-muted); max-width: 36ch; }
.footer h2 { font-size: .9375rem; font-weight: 500; letter-spacing: 0; color: var(--text-inv-muted); margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; display: grid; gap: .65rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--orange); }
.footer__social { display: flex; gap: .5rem; }
.footer__social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-dark); border-radius: var(--r-s); }
.footer__social a:hover { border-color: var(--orange); }
.footer__social svg { width: 18px; height: 18px; }
.footer__legal { border-top: 1px solid var(--line-dark); padding-block: 1.75rem; display: grid; gap: 1rem; font-size: .8125rem; color: #80838a; }
.footer__legal p { max-width: 110ch; }
.footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--text-inv-muted); font-size: .875rem; }
@media (max-width: 991px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* =========================================================
   Utilities & late additions
   ========================================================= */
[id] { scroll-margin-top: 140px; }
.steps--6 { --n: 6; }
.cycle .big { font-size: 28px; letter-spacing: -0.02em; }
.scale__mark--1 { left: 10%; }
.scale__mark--2 { left: 20%; }
.scale__mark--5 { left: 50%; }
.scale__mark--10 { left: 100%; }
@media (max-width: 700px) {
  .scale { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .scale__axis, .scale__fill { display: none; }
  .scale__mark, .scale__mark:last-child { position: static; transform: none; justify-items: start; grid-template-columns: auto 1fr; align-items: center;
    border: 1px solid var(--line-dark); border-radius: var(--r-s); padding: .9rem 1rem; gap: .25rem .75rem; }
  .scale__mark .scale__dot { grid-row: span 2; margin: 0; order: -1; }
}
.error-page { min-height: 70vh; display: flex; align-items: center; }
.bento { grid-auto-flow: dense; }
.art, .tile--art, .pillar-stage { color: #5a5e65; }
.scale { height: 96px; }
.scale__axis, .scale__fill { top: 40px; }
.scale__dot { margin-top: 0; }
@media (max-width: 700px) { .scale { height: auto; } }
@media (hover: none) { .hide-touch { display: none; } }
