:root {
  --paper: #F4F7F5;
  --card: #FFFFFF;
  --ink: #17232B;
  --muted: #51636B;
  --teal: #0E6F72;
  --teal-d: #0A5457;
  --amber: #F0A202;
  --amber-soft: #FCEBC0;
  --mist: #D9E3E0;
  --mist-2: #E8EFEC;
  --head: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 46rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-d); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--mist);
}
.bar-in {
  max-width: 72rem; margin: 0 auto; padding: .7rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  font-family: var(--head); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .55rem; white-space: nowrap;
}
.brand i { display: inline-flex; align-items: flex-end; gap: 2px; height: 1.15rem; }
.brand i b { display: block; width: 4px; background: var(--teal); border-radius: 1px; }
.brand i b:nth-child(1) { height: 45%; }
.brand i b:nth-child(2) { height: 70%; }
.brand i b:nth-child(3) { height: 100%; background: var(--amber); }
.nav { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-family: var(--head); font-size: .95rem; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: .45rem .75rem; border-radius: 999px; white-space: nowrap;
  transition: background-color .18s, color .18s;
}
.nav a:hover { background: var(--mist-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* ---------- hero ---------- */
.hero { max-width: 72rem; margin: 0 auto; padding: 3rem 1rem 2.25rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.hero.has-visual { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; }
.hero h1 {
  font-family: var(--head); font-weight: 700; font-size: clamp(2.05rem, 4.4vw, 3.35rem);
  line-height: 1.06; letter-spacing: -.025em; margin: 0 0 1.1rem; max-width: 20ch; text-wrap: balance;
}
.hero.has-visual h1 { max-width: 17ch; }
.lede { font-size: 1.15rem; max-width: 40rem; margin: 0 0 1.4rem; color: #26353E; }
.stamp { font-family: var(--head); font-size: .88rem; color: var(--muted); margin: 0; }

.takeaways {
  background: var(--card); border: 1px solid var(--mist); border-radius: 10px;
  padding: 1.1rem 1.25rem 1.2rem; max-width: 40rem; margin: 0 0 1.25rem;
}
.takeaways h2 { font-family: var(--head); font-size: 1.05rem; margin: 0 0 .6rem; font-weight: 700; }
.takeaways ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.takeaways li { font-size: 1rem; line-height: 1.5; padding-left: 1.1rem; position: relative; }
.takeaways li::before { content: ""; position: absolute; left: 0; top: .55em; width: .5rem; height: .5rem; border-radius: 2px; background: var(--amber); }
.takeaways strong { font-family: var(--head); font-weight: 600; }

/* auction visual: the one orchestrated motion moment */
.auction {
  margin: 0; background: var(--ink); color: #E8F0EE; border-radius: 14px;
  padding: 1.2rem 1.25rem 1rem; box-shadow: 0 18px 40px -22px rgba(23, 35, 43, .65);
}
.a-head { font-family: var(--head); font-size: .98rem; font-weight: 600; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.a-head span:last-child { font-weight: 400; color: #9DB3AE; font-size: .88rem; }
.bid { display: grid; grid-template-columns: 5.2rem 1fr; align-items: center; gap: .7rem; margin: .55rem 0; font-family: var(--head); font-size: .88rem; color: #B7C9C5; }
.track { height: 1.05rem; background: rgba(255, 255, 255, .07); border-radius: 3px; overflow: hidden; }
.fill { display: block; height: 100%; width: var(--w); background: #4BA3A0; border-radius: 3px; transform-origin: left; }
.a-foot { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: 1.1rem; min-height: 2.2rem; }
.verdict { font-family: var(--head); font-size: .95rem; font-weight: 600; color: var(--amber); }
.replay {
  font-family: var(--head); font-size: .85rem; font-weight: 600; color: #E8F0EE; background: transparent;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: .35rem .85rem; cursor: pointer;
  transition: background-color .18s, border-color .18s;
}
.replay:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }
.auction figcaption { font-family: var(--head); font-size: .78rem; color: #8DA5A0; margin-top: .8rem; line-height: 1.4; }

.auction.play .fill { transform: scaleX(0); animation: grow .85s cubic-bezier(.2, .75, .2, 1) forwards; animation-delay: calc(.35s + var(--i) * .14s); }
.auction.play .fill.win { animation: grow .85s cubic-bezier(.2, .75, .2, 1) forwards, claim .4s ease forwards; animation-delay: calc(.35s + var(--i) * .14s), 1.75s; }
.auction.play .verdict { opacity: 0; animation: show .4s ease forwards; animation-delay: 2.05s; }
.bid.win-row .who { transition: color .3s; }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes claim { to { background: var(--amber); } }
@keyframes show { to { opacity: 1; } }
.auction:not(.play) .fill.win { background: var(--amber); }

/* ---------- page grid ---------- */
.page { max-width: 72rem; margin: 0 auto; padding: 1rem 1rem 4rem; display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.rail { position: sticky; top: 5.2rem; font-family: var(--head); font-size: .92rem; }
.rail p { margin: 0 0 .6rem; font-weight: 700; color: var(--ink); font-size: .95rem; }
.rail ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--mist); }
.rail a { display: block; padding: .38rem 0 .38rem .85rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; transition: color .18s, border-color .18s; }
.rail a:hover { color: var(--ink); }
.rail a.on { color: var(--ink); font-weight: 600; border-left-color: var(--amber); }
.toc-m { display: none; background: var(--card); border: 1px solid var(--mist); border-radius: 10px; margin: 0 0 1.5rem; font-family: var(--head); }
.toc-m summary { padding: .75rem 1rem; font-weight: 600; cursor: pointer; }
.toc-m ol { margin: 0; padding: 0 1rem 1rem 2.2rem; font-size: .95rem; }
.toc-m a { text-decoration: none; }

.article { max-width: var(--measure); min-width: 0; }
.article h2 {
  font-family: var(--head); font-weight: 700; font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.18;
  letter-spacing: -.018em; margin: 3.2rem 0 1rem; text-wrap: balance;
}
.article h2:first-child { margin-top: 0; }
.article h3 { font-family: var(--head); font-weight: 650; font-size: 1.18rem; margin: 1.8rem 0 .4rem; line-height: 1.3; }
.article p { margin: 0 0 1.1rem; }
.article ul, .article ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.article li { margin-bottom: .55rem; }
.article li::marker { color: var(--teal); font-family: var(--head); font-weight: 700; }
.note { font-family: var(--head); font-size: .9rem; color: var(--muted); line-height: 1.5; }
a.ext { text-decoration-style: solid; }

/* network rows */
.group { margin: 1.8rem 0 2.2rem; scroll-margin-top: 5rem; }
.group-label { font-family: var(--head); margin: 0 0 .9rem; font-size: 1.02rem; line-height: 1.55; }
.group-label strong { font-size: 1.12rem; font-weight: 700; }
.net { border-left: 3px solid var(--teal); padding: .1rem 0 .1rem 1.05rem; margin: 0 0 1.35rem; }
.net-name { font-family: var(--head); font-weight: 700; font-size: 1.15rem; margin: 0 0 .1rem; line-height: 1.3; }
.net-name a { color: var(--ink); text-decoration-color: var(--amber); text-decoration-thickness: 2px; }
.net-name a:hover { color: var(--teal-d); }
.net p { margin: 0 0 .5rem; font-size: 1.02rem; line-height: 1.6; }
.net dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .15rem 1rem; font-family: var(--head); font-size: .93rem; line-height: 1.5; }
.net dt { color: var(--muted); }
.net dd { margin: 0; }
.best { font-family: var(--head); font-size: .93rem; color: var(--muted); margin: 0 0 .35rem; }

/* tables */
.tbl-tools { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .8rem; font-family: var(--head); }
.chip {
  font-family: var(--head); font-size: .88rem; font-weight: 600; background: var(--card); color: var(--ink);
  border: 1px solid var(--mist); border-radius: 999px; padding: .35rem .85rem; cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s;
}
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--mist); border-radius: 10px; background: var(--card); margin: 0 0 1.4rem; }
table { border-collapse: collapse; width: 100%; font-family: var(--head); font-size: .94rem; line-height: 1.45; }
th, td { text-align: left; padding: .75rem .95rem; vertical-align: top; border-bottom: 1px solid var(--mist-2); }
th { background: var(--mist-2); font-weight: 650; font-size: .88rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: #F8FBFA; }
td:first-child { font-weight: 650; min-width: 9.5rem; }
td:first-child a { color: var(--ink); }
tr[hidden] { display: none; }
.tbl-wrap:focus-visible { outline-offset: -3px; }

/* faq */
.faq h3 { margin-top: 1.6rem; }

/* flow diagram (mobile page) */
.stack { margin: 0; background: var(--card); border: 1px solid var(--mist); border-radius: 14px; padding: 1.2rem; font-family: var(--head); }
.stack-row { display: grid; gap: .5rem; }
.stack .lbl { font-size: .86rem; color: var(--muted); font-weight: 600; margin-bottom: .1rem; }
.stack .box { border: 1px solid var(--mist); background: var(--paper); border-radius: 8px; padding: .55rem .8rem; font-size: .93rem; font-weight: 600; }
.stack .box.main { background: var(--ink); color: #fff; border-color: var(--ink); }
.stack .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.stack .join { width: 2px; height: 1.1rem; background: var(--teal); margin: .1rem auto; }
.stack figcaption { font-size: .78rem; color: var(--muted); margin-top: .8rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #C7D6D2; font-family: var(--head); font-size: .93rem; }
.foot-in { max-width: 72rem; margin: 0 auto; padding: 2.4rem 1rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer a { color: #E8F0EE; text-decoration-color: rgba(255, 255, 255, .35); }
.site-footer a:hover { color: #fff; text-decoration-color: var(--amber); }
.site-footer p { margin: 0 0 .5rem; line-height: 1.55; }
.site-footer .h { color: #fff; font-weight: 700; margin-bottom: .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.legal { border-top: 1px solid rgba(255, 255, 255, .12); max-width: 72rem; margin: 0 auto; padding: 1rem; font-size: .84rem; color: #93A9A4; }

/* ---------- responsive ---------- */
@media (max-width: 62rem) {
  .hero.has-visual { grid-template-columns: minmax(0, 1fr); }
  .page { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rail { display: none; }
  .toc-m { display: block; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-in > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  body { font-size: 1.05rem; }
  .bar-in { flex-direction: column; align-items: flex-start; gap: .35rem; padding-bottom: .5rem; }
  .nav { width: 100%; margin: 0 -.25rem; }
  .hero { padding-top: 1.8rem; }
  .net dl { grid-template-columns: 1fr; gap: 0; }
  .net dt { margin-top: .35rem; }
  .bid { grid-template-columns: 4.4rem 1fr; }
  .foot-in { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .auction.play .fill, .auction.play .fill.win, .auction.play .verdict { animation: none !important; transform: none; opacity: 1; }
  .auction .fill.win { background: var(--amber); }
  * { transition-duration: .01ms !important; }
}

/* ================= motion + imagery layer ================= */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--amber)); transform-origin: left; transform: scaleX(0); }

.hero-wrap { position: relative; overflow: hidden; border-bottom: 1px solid var(--mist); isolation: isolate; }
.hero-wrap::before, .hero-wrap::after {
  content: ""; position: absolute; z-index: -2; border-radius: 50%; filter: blur(60px); pointer-events: none;
}
.hero-wrap::before { width: 34rem; height: 34rem; left: -10rem; top: -14rem; background: radial-gradient(circle, rgba(75,163,160,.38), rgba(75,163,160,0) 70%); animation: drift1 24s ease-in-out infinite; }
.hero-wrap::after { width: 30rem; height: 30rem; right: 8%; bottom: -16rem; background: radial-gradient(circle, rgba(240,162,2,.30), rgba(240,162,2,0) 70%); animation: drift2 28s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(8rem, 5rem); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-9rem, -3rem); } }
.hero-art {
  position: absolute; inset: -2rem 0 0 0; z-index: -1; pointer-events: none;
  background: url(img/hero.svg) right center / cover no-repeat;
  transform: translate3d(0, calc(var(--sy, 0) * 0.12px), 0);
  will-change: transform;
}
.hero > * { position: relative; }

/* hero load sequence: one staggered entrance */
.hero h1, .hero .lede, .hero .takeaways, .hero .stamp, .hero figure {
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.hero .lede { animation-delay: .1s; }
.hero .takeaways { animation-delay: .2s; }
.hero .stamp { animation-delay: .3s; }
.hero figure { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.brand i b { transform-origin: bottom; animation: bars 1.2s cubic-bezier(.2,.8,.2,1) both; }
.brand i b:nth-child(2) { animation-delay: .1s; }
.brand i b:nth-child(3) { animation-delay: .2s; }
.brand:hover i b { animation: bars .9s ease; }
@keyframes bars { 0% { transform: scaleY(.2); } 60% { transform: scaleY(1.15); } 100% { transform: scaleY(1); } }

/* network strip */
.strip { border-top: 1px solid rgba(217,227,224,.9); background: rgba(255,255,255,.55); backdrop-filter: blur(6px); overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.strip-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip ul { display: flex; gap: 2.2rem; list-style: none; margin: 0; padding: .8rem 1.1rem; font-family: var(--head); font-size: .95rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.strip li { display: flex; align-items: center; gap: 2.2rem; }
.strip li::after { content: ""; width: .35rem; height: .35rem; border-radius: 1px; background: var(--amber); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* scroll reveal (only when JS is on) */
.js .rv { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }

/* richer hover states */
.net { transition: border-color .25s, transform .25s, background-color .25s; border-radius: 0 8px 8px 0; }
.net:hover { border-left-color: var(--amber); transform: translateX(4px); background: linear-gradient(90deg, rgba(14,111,114,.06), transparent 70%); }
.takeaways { transition: box-shadow .3s, transform .3s; }
.takeaways:hover { box-shadow: 0 14px 30px -20px rgba(23,35,43,.45); transform: translateY(-2px); }
.takeaways li::before { transition: transform .25s; }
.takeaways li:hover::before { transform: rotate(45deg) scale(1.15); }
.takeaways a { color: inherit; }
.faq h3 { transition: color .2s; }
.faq h3:hover { color: var(--teal-d); }

/* dark band with moving lines */
.band { position: relative; overflow: hidden; isolation: isolate; color: #E8F0EE; background: var(--ink) url(img/band.svg) center / cover no-repeat; border-radius: 16px; padding: 2rem 1.6rem 1.6rem; margin: 3.2rem 0 0; }
.article .band h2 { margin-top: 0; color: #fff; }
.band p, .band li { color: #D4E1DE; }
.band a { color: #fff; text-decoration-color: var(--amber); text-decoration-thickness: 2px; }
.band a:hover { color: var(--amber); }
.band a.ext { color: #fff; }
.band li::marker { color: var(--amber); }
.band .net-name a { color: #fff; }

/* format tiles */
.fmt { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: .9rem; margin: 1.1rem 0 1.4rem; }
.fmt > div { background: var(--card); border: 1px solid var(--mist); border-radius: 12px; padding: 1rem 1.05rem 1.05rem; position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.fmt > div::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--teal), var(--amber)); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.fmt > div:hover { transform: translateY(-3px); box-shadow: 0 16px 28px -20px rgba(23,35,43,.55); border-color: #BFD1CD; }
.fmt > div:hover::after { transform: scaleX(1); }
.fmt h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.fmt p { margin: 0; font-size: .98rem; line-height: 1.55; }
.fmt svg { width: 2.6rem; height: 2.6rem; margin-bottom: .6rem; }
.fmt svg * { transition: transform .4s cubic-bezier(.2,.7,.2,1); transform-box: fill-box; transform-origin: center; }
.fmt > div:hover svg .mv { transform: translateY(-3px) scale(1.06); }

/* flow dots on the mobile diagram */
.stack .join { position: relative; overflow: hidden; }
.stack .join::after { content: ""; position: absolute; left: -1px; width: 4px; height: 6px; border-radius: 2px; background: var(--amber); animation: down 1.8s ease-in infinite; }
@keyframes down { from { top: -8px; } to { top: 100%; } }
.stack .box.main { animation: glow 3.6s ease-in-out infinite; }
@keyframes glow { 0%,100% { box-shadow: 0 0 0 0 rgba(240,162,2,0); } 50% { box-shadow: 0 0 0 5px rgba(240,162,2,.28); } }

/* footer art */
.site-footer { position: relative; isolation: isolate; background: var(--ink) url(img/footer.svg) bottom center / 100% auto no-repeat; }

/* table row highlight when filtered */
tbody tr { animation: rowin .35s ease both; }
@keyframes rowin { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-wrap::before, .hero-wrap::after, .strip-track, .stack .join::after, .stack .box.main,
  .hero h1, .hero .lede, .hero .takeaways, .hero .stamp, .hero figure, .brand i b, tbody tr { animation: none !important; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .hero-art { transform: none; }
}
.hero-art { -webkit-mask-image: linear-gradient(90deg, transparent 0, transparent 28%, rgba(0,0,0,.55) 52%, #000 72%); mask-image: linear-gradient(90deg, transparent 0, transparent 28%, rgba(0,0,0,.55) 52%, #000 72%); }
@media (max-width: 62rem) { .hero-art { -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 45%, #000 100%); mask-image: linear-gradient(180deg, transparent 0, transparent 45%, #000 100%); } }
