/* ==========================================================================
   Covan — components
   ========================================================================== */

/* ---------------- navigation ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .45s var(--ease), border-color .45s, backdrop-filter .45s;
  border-bottom: 1px solid transparent;
}
.nav::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--ember) 40%, var(--gold) 60%, transparent);
  opacity: 0; transition: opacity .4s;
}
.nav.is-stuck {
  background: rgba(7, 8, 10, .74);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border-bottom-color: var(--line);
}
.nav.is-stuck::after { opacity: .5; }
.nav__inner { display: flex; align-items: center; gap: 34px; width: 100%; }

.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo__mark { width: auto; height: 33px; flex: none; color: var(--ember); }
.logo__word {
  font-size: 1.44rem; font-weight: 400; letter-spacing: -.006em; line-height: 1;
  color: var(--text);
}
.logo__word em { font-style: normal; color: var(--ember); }
.footer .logo__word { font-size: 1.62rem; }
.logo__text { display: inline-flex; flex-direction: column; gap: 3px; }
.logo__by {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 7.5px; line-height: 1; letter-spacing: .18em;
  text-transform: uppercase; color: var(--faint); white-space: nowrap;
}
.logo__by i { width: 4px; height: 4px; border-radius: 50%; background: #2ee27a; display: block; }
@media (max-width: 860px) { .logo__by { display: none; } }

.nav__links { display: flex; align-items: center; gap: 2px; margin-left: 2px; }
.nav__link {
  position: relative;
  padding: 9px 13px; border-radius: 999px;
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: color .25s, background .25s;
}
.nav__link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--ember);
}
.nav__right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; font-weight: 500;
  color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 12px;
  transition: color .2s, border-color .2s;
}
.lang__btn:hover { color: var(--text); border-color: var(--line-3); }
.lang__menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 132px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 6px; box-shadow: 0 24px 50px -20px #000;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .22s, transform .22s, visibility .22s;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; font-size: .87rem; color: var(--muted); }
.lang__menu a:hover { background: rgba(255,255,255,.06); color: var(--text); }
.lang__menu a[aria-current="true"] { color: var(--text); }
.lang__menu a span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; opacity: .55; }

.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 50%; position: relative; }
.burger i { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform .35s var(--ease), opacity .2s; }
.burger i:nth-child(1) { top: 16px; }
.burger i:nth-child(2) { top: 21px; }
.burger i:nth-child(3) { top: 26px; }
body.is-menu .burger i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.is-menu .burger i:nth-child(2) { opacity: 0; }
body.is-menu .burger i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(7, 8, 10, .98);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  padding: calc(var(--nav-h) + 30px) var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  overflow-y: auto;
}
body.is-menu .drawer { opacity: 1; visibility: visible; }
.drawer a.drawer__link {
  font-size: clamp(1.6rem, 6vw, 2.3rem); font-weight: 500; letter-spacing: -.035em;
  padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between;
  transform: translateY(14px); opacity: 0; transition: transform .5s var(--ease-out), opacity .5s;
}
body.is-menu .drawer a.drawer__link { transform: none; opacity: 1; }
.drawer a.drawer__link span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--faint); }
.drawer__foot { margin-top: auto; padding-top: 32px; display: grid; gap: 16px; }

/* ---------------- hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(48px, 7vw, 96px));
  padding-bottom: clamp(56px, 7vw, 104px);
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__grid-wrap { position: absolute; inset: -10% -5% 0; }
.hero__orb {
  position: absolute; width: 70vw; height: 70vw; max-width: 940px; max-height: 940px;
  right: -14vw; top: -26vw; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255,106,42,.20), rgba(255,106,42,.05) 42%, transparent 68%);
  filter: blur(30px);
}
.hero__orb--2 {
  left: -30vw; top: 34%; width: 52vw; height: 52vw;
  background: radial-gradient(circle, rgba(134,169,255,.1), transparent 64%);
}
.hero__inner { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(36px, 5vw, 68px); align-items: center; }
.hero__copy { display: grid; gap: 26px; justify-items: start; }
.hero__badge {
  display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 10px;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px 7px 10px;
  background: rgba(255,255,255,.035);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}
.hero__badge b { color: var(--text); font-weight: 500; }
.hero__badge .pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }
.hero__badge .pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(100,227,196,.5);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: 1 } 70%, 100% { transform: scale(1.5); opacity: 0 } }
.hero__title { font-size: clamp(2.6rem, 5.2vw, 4.55rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 600; }
.hero__title .serif-i { letter-spacing: -.018em; }
.hero__lead { max-width: 33ch; font-size: clamp(1.02rem, 1.35vw, 1.2rem); line-height: 1.55; color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; padding-top: 4px; }
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--faint); }
.hero__meta svg { color: var(--teal); flex: none; }

.hero__visual { position: relative; }
.console-wrap { position: relative; transform: perspective(1600px) rotateY(-7deg) rotateX(2.5deg); transform-origin: 50% 50%; }
.console-wrap::after {
  content: ""; position: absolute; inset: 14% -6% -12% 6%; z-index: -1;
  background: radial-gradient(60% 60% at 50% 50%, rgba(255,106,42,.28), transparent 72%);
  filter: blur(34px);
}
.console-tilt { transition: transform .8s var(--ease-out); }
.hero__visual:hover .console-tilt { transform: perspective(1600px) rotateY(-3deg) rotateX(1deg) translateY(-4px); }
.ui-float--a { right: -104px; bottom: 9%; }
.ui-float--b { left: -118px; top: 21%; }

.scroll-hint {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}
.scroll-hint i { display: block; width: 1px; height: 26px; background: linear-gradient(180deg, var(--line-3), transparent); }

/* ---------------- section heading ---------------- */
.sec-head { display: grid; gap: 18px; max-width: 760px; }
.sec-head--center { margin-inline: auto; justify-items: center; text-align: center; }
.sec-head__row { display: flex; align-items: end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(34px, 4vw, 58px); }
.sec-head__row .sec-head { max-width: 640px; }
.sec-num {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; color: var(--faint);
  display: inline-flex; align-items: center; gap: 10px;
}
.sec-num::after { content: ""; width: 34px; height: 1px; background: var(--line-2); }
.section--cream .sec-num, .section--cream-2 .sec-num { color: #9a836c; }
.section--cream .sec-num::after, .section--cream-2 .sec-num::after { background: rgba(20,17,13,.2); }

/* ---------------- cards ---------------- */
.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.042), rgba(255,255,255,.012));
  padding: clamp(22px, 2.4vw, 30px);
  display: grid; gap: 14px; align-content: start;
  transition: border-color .35s, transform .5s var(--ease-out), background .35s;
}
.card:hover { border-color: var(--line-3); transform: translateY(-3px); }
.card--flat:hover { transform: none; }
.card__icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line-2);
  background: linear-gradient(160deg, rgba(255,106,42,.2), rgba(255,106,42,.04));
  color: var(--ember-2);
}
.card__icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.card__icon--teal { background: linear-gradient(160deg, rgba(100,227,196,.18), rgba(100,227,196,.03)); color: var(--teal); }
.card__icon--blue { background: linear-gradient(160deg, rgba(134,169,255,.18), rgba(134,169,255,.03)); color: var(--blue); }
.card__icon--violet { background: linear-gradient(160deg, rgba(182,156,255,.18), rgba(182,156,255,.03)); color: var(--violet); }
.card__icon--gold { background: linear-gradient(160deg, rgba(247,195,106,.2), rgba(247,195,106,.04)); color: var(--gold); }
.card h3 { font-size: 1.12rem; letter-spacing: -.02em; }
.card p { font-size: .93rem; line-height: 1.6; color: var(--muted); }
.card__label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.card--accent { border-color: rgba(255,106,42,.28); background: linear-gradient(165deg, rgba(255,106,42,.09), rgba(255,106,42,.015) 60%); }
.card--hoverlink::after {
  content: "↗"; position: absolute; top: 22px; right: 24px; font-size: 15px; color: var(--faint);
  transition: color .3s, transform .4s var(--ease-out);
}
.card--hoverlink:hover::after { color: var(--ember-2); transform: translate(2px, -2px); }

/* ---------------- stats ---------------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: clamp(24px, 2.6vw, 36px) clamp(14px, 1.8vw, 26px); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__v {
  font-size: clamp(2.05rem, 3.4vw, 3.2rem); font-weight: 600; letter-spacing: -.05em; line-height: 1;
  font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 2px;
}
.stat__v sup { font-size: .42em; font-weight: 500; color: var(--ember); top: -.9em; }
.stat__l { margin-top: 12px; font-size: .84rem; line-height: 1.45; color: var(--muted); max-width: 20ch; }
.section--cream .stats, .section--cream-2 .stats { border-color: rgba(20,17,13,.12); }
.section--cream .stat, .section--cream-2 .stat { border-color: rgba(20,17,13,.12); }
.section--cream .stat__l, .section--cream-2 .stat__l { color: var(--on-cream-2); }

/* ---------------- chips / badges ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: .48em .82em; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: .82rem; line-height: 1; color: var(--muted);
  background: rgba(255,255,255,.02);
  transition: color .25s, border-color .25s, background .25s;
}
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip--dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ember); flex: none; }
.chip--teal::before { background: var(--teal); }
.chip--sm { font-size: .75rem; padding: .38em .66em; }
.section--cream .chip, .section--cream-2 .chip { border-color: rgba(20,17,13,.16); color: var(--on-cream-2); background: transparent; }
.section--cream .chip:hover, .section--cream-2 .chip:hover { color: var(--on-cream); border-color: rgba(20,17,13,.34); }

.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px;
  background: rgba(255,106,42,.1); border: 1px solid rgba(255,106,42,.24); color: var(--ember-2);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase;
}
.badge--teal { background: rgba(100,227,196,.08); border-color: rgba(100,227,196,.22); color: var(--teal); }
.badge--neutral { background: rgba(255,255,255,.045); border-color: var(--line-2); color: var(--muted); }
.section--cream .badge, .section--cream-2 .badge { background: rgba(184,68,12,.07); border-color: rgba(184,68,12,.2); color: #a8470f; }

/* ---------------- lists ---------------- */
.flist { display: grid; gap: 13px; }
.flist li { display: grid; grid-template-columns: 19px 1fr; gap: 12px; align-items: start; font-size: .94rem; line-height: 1.55; color: var(--muted); }
.flist li b { color: var(--text); font-weight: 600; }
.flist svg { width: 19px; height: 19px; color: var(--ember); margin-top: 1px; flex: none; }
.flist--teal svg { color: var(--teal); }
.section--cream .flist li, .section--cream-2 .flist li { color: var(--on-cream-2); }
.section--cream .flist li b, .section--cream-2 .flist li b { color: var(--on-cream); }

.ticklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
.ticklist li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.ticklist svg { width: 16px; height: 16px; color: var(--teal); flex: none; margin-top: 3px; }

/* ---------------- steps ---------------- */
.steps { display: grid; }
.step {
  display: grid; grid-template-columns: 64px 1fr; gap: 22px;
  padding: clamp(22px, 2.6vw, 32px) 0; border-top: 1px solid var(--line);
  transition: background .3s;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__n {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: var(--ember-2);
  padding-top: 4px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { font-size: .94rem; color: var(--muted); max-width: 62ch; line-height: 1.6; }

/* ---------------- split ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 5vw, 76px); align-items: center; }
.split > *, .grid > *, .stats > * { min-width: 0; }
.split--right-heavy { grid-template-columns: .82fr 1.18fr; }
.split--left-heavy { grid-template-columns: 1.18fr .82fr; }
.split__copy { display: grid; gap: 22px; align-content: center; }
.split__copy .lead { max-width: 44ch; }

/* ---------------- marquee ---------------- */
.marquee {
  position: relative; overflow: hidden; min-width: 0; max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee--slow .marquee__track { animation-duration: 64s; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 12px; padding-right: 12px; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

.src-pill {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px;
  font-size: .87rem; color: var(--muted); background: rgba(255,255,255,.022);
  white-space: nowrap;
}
.src-pill i {
  width: 8px; height: 8px; border-radius: 2px; display: block; flex: none;
  background: var(--c, var(--ember));
}

/* ---------------- template cards ---------------- */
.tpl {
  position: relative; display: grid; gap: 13px; align-content: start;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.038), rgba(255,255,255,.008));
  transition: border-color .35s, transform .5s var(--ease-out), background .35s;
  overflow: hidden;
}
.tpl::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--c, var(--ember)), transparent);
  opacity: 0; transition: opacity .35s;
}
.tpl:hover { transform: translateY(-3px); border-color: var(--line-3); }
.tpl:hover::before { opacity: .8; }
.tpl__head { display: flex; align-items: center; gap: 12px; }
.tpl__icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c, var(--ember)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--ember)) 32%, transparent);
  color: var(--c, var(--ember));
}
.tpl__icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.tpl__name { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; }
.tpl__kind { font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }
.tpl__desc { font-size: .87rem; line-height: 1.55; color: var(--muted); min-height: 3.4em; }
.tpl__meta { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; border-top: 1px solid var(--line); }
.tpl__meta span {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; color: var(--faint);
  padding: 5px 7px; border-radius: 6px; background: rgba(255,255,255,.035);
}
.tpl__meta span b { color: var(--muted); font-weight: 500; }

/* filter row */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  padding: .58em 1.05em; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: .85rem; font-weight: 500; color: var(--muted);
  transition: background .25s, color .25s, border-color .25s;
}
.filter:hover { color: var(--text); border-color: var(--line-3); }
.filter.is-active { background: var(--text); color: #14110d; border-color: var(--text); }
.tpl[hidden] { display: none; }

/* ---------------- tabs ---------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); width: fit-content; }
.tab {
  padding: .62em 1.05em; border-radius: 10px; font-size: .87rem; font-weight: 500; color: var(--muted);
  transition: background .25s, color .25s;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: rgba(255,255,255,.09); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset; }
.tabpanel { display: none; }
.tabpanel.is-active { display: block; animation: fadeUp .5s var(--ease-out) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section--cream .tabs, .section--cream-2 .tabs { border-color: rgba(20,17,13,.14); background: rgba(20,17,13,.035); }
.section--cream .tab, .section--cream-2 .tab { color: var(--on-cream-2); }
.section--cream .tab.is-active, .section--cream-2 .tab.is-active { background: var(--on-cream); color: var(--cream); }

/* ---------------- record-type switcher ---------------- */
.record { display: grid; grid-template-columns: 240px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.02); }
.record__list { border-right: 1px solid var(--line); padding: 10px; display: grid; gap: 3px; align-content: start; }
.record__item {
  text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 13px; border-radius: 10px; font-size: .89rem; color: var(--muted);
  transition: background .25s, color .25s;
}
.record__item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.record__item.is-active { background: rgba(255,106,42,.11); color: var(--text); }
.record__item span { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: var(--faint); }
.record__item.is-active span { color: var(--ember-2); }
.record__body { padding: clamp(20px, 2.6vw, 30px); display: grid; gap: 18px; align-content: start; min-height: 340px; }
.record__pane { display: none; }
.record__pane.is-active { display: grid; gap: 18px; animation: fadeUp .45s var(--ease-out) both; }
.record__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.record__title h3 { font-size: 1.24rem; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kv div { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: rgba(255,255,255,.02); }
.kv dt { font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.kv dd { margin: 5px 0 0; font-size: .86rem; color: var(--text); }
.jsonline { font-family: var(--font-mono); font-size: .74rem; line-height: 1.85; color: var(--muted); background: rgba(0,0,0,.32); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; white-space: pre; }
.jsonline .k { color: var(--blue); }
.jsonline .s { color: var(--gold); }
.jsonline .n { color: var(--teal); }

/* ---------------- compare table ---------------- */
.cmp-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.015); }
.cmp { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cmp th, .cmp td { padding: 15px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cmp thead th {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--faint); background: rgba(255,255,255,.03); position: sticky; top: 0; z-index: 2;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.cmp thead th:nth-child(2) { color: var(--ember-2); }
.cmp tbody tr:hover { background: rgba(255,255,255,.022); }
.cmp td:first-child { font-weight: 500; color: var(--text); width: 20%; }
.cmp td:nth-child(2) { color: var(--text); background: rgba(255,106,42,.028); }
.cmp td:nth-child(3) { color: var(--muted); }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp-wrap--scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp--cream { font-size: .9rem; }
.section--cream .cmp th, .section--cream .cmp td, .section--cream-2 .cmp th, .section--cream-2 .cmp td { border-color: rgba(20,17,13,.12); }
.section--cream .cmp td:first-child, .section--cream-2 .cmp td:first-child { color: var(--on-cream); }
.section--cream .cmp td:nth-child(3), .section--cream-2 .cmp td:nth-child(3) { color: var(--on-cream-2); }
.section--cream .cmp thead th, .section--cream-2 .cmp thead th { background: rgba(20,17,13,.04); color: #9a836c; }
.section--cream .cmp td:nth-child(2), .section--cream-2 .cmp td:nth-child(2) { background: rgba(184,68,12,.05); color: var(--on-cream); }

/* ---------------- accordion ---------------- */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 21px 0; text-align: left; font-size: 1.02rem; font-weight: 500; letter-spacing: -.02em;
  color: var(--text);
}
.acc__btn i {
  position: relative; width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 1px solid var(--line-2);
}
.acc__btn i::before, .acc__btn i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 1px; background: var(--text);
  transform: translate(-50%, -50%); transition: transform .35s var(--ease);
}
.acc__btn i::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc__item.is-open .acc__btn i::after { transform: translate(-50%, -50%) rotate(0deg); }
.acc__panel { overflow: hidden; max-height: 0; transition: max-height .45s var(--ease); }
.acc__panel > div { padding: 0 0 24px; max-width: 74ch; font-size: .94rem; line-height: 1.65; color: var(--muted); }

/* ---------------- forms ---------------- */
.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field > label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.input {
  width: 100%; padding: 14px 16px; border-radius: 11px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.032); color: var(--text);
  font-size: .94rem; transition: border-color .2s, background .2s, box-shadow .2s;
}
.input::placeholder { color: var(--faint); }
select.input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a39e96' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 42px;
}
select.input option { background: #14161a; color: var(--text); }
.input:focus { outline: none; border-color: rgba(255,106,42,.6); background: rgba(255,255,255,.05); box-shadow: 0 0 0 4px rgba(255,106,42,.1); }
textarea.input { resize: vertical; min-height: 130px; line-height: 1.55; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: .85rem; line-height: 1.5; color: var(--muted); }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ember); flex: none; }
.check a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.form__note { font-size: .78rem; line-height: 1.5; color: var(--faint); }
.form__success {
  display: none; padding: 22px; border-radius: 14px; border: 1px solid rgba(100,227,196,.28);
  background: rgba(100,227,196,.06); color: var(--text); font-size: .93rem;
}
.form.is-sent .form__success { display: block; }
.form.is-sent > *:not(.form__success) { display: none; }
.error { color: #ff8f7a; font-size: .8rem; display: none; }
.field.is-invalid .input { border-color: rgba(255,120,100,.65); }
.field.is-invalid .error { display: block; }

/* ---------------- page hero ---------------- */
.page-hero {
  position: relative; overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(46px, 6vw, 86px));
  padding-bottom: clamp(36px, 4vw, 66px);
  isolation: isolate;
}
.page-hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.page-hero__inner { display: grid; gap: 26px; }
.page-hero__inner > * { max-width: 940px; }
.page-hero h1 { font-size: clamp(2.35rem, 4.9vw, 4rem); line-height: 1; letter-spacing: -.042em; }
.page-hero .lead { max-width: 62ch; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--faint); }
.breadcrumb a:hover { color: var(--muted); }
.breadcrumb svg { width: 11px; height: 11px; opacity: .6; }
.page-hero__row { display: flex; align-items: end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }

/* ---------------- CTA band ---------------- */
.cta-band {
  position: relative; overflow: hidden;
  border: 1px solid rgba(255,106,42,.2); border-radius: var(--radius-lg);
  padding: clamp(34px, 5vw, 68px);
  background:
    radial-gradient(90% 130% at 0% 0%, rgba(255,106,42,.16), transparent 58%),
    radial-gradient(70% 100% at 100% 100%, rgba(182,156,255,.08), transparent 60%),
    #0c0a09;
  isolation: isolate;
}
.cta-band__grid { position: absolute; inset: 0; z-index: -1; opacity: .6;
  background-image: linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 20% 0%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 90% at 20% 0%, #000, transparent 72%);
}
.cta-band__inner { display: grid; grid-template-columns: 1.35fr auto; gap: clamp(28px, 4vw, 64px); align-items: center; }
.cta-band h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -.04em; line-height: 1.02; }
.cta-band p { margin-top: 16px; color: var(--muted); max-width: 46ch; }
.cta-band__actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-width: 260px; justify-self: end; }
.cta-band__actions .btn { justify-content: center; }
.cta-band__actions .mono { color: var(--faint); font-size: 10px; }

/* ---------------- misc blocks ---------------- */
.panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.022);
  padding: clamp(20px, 2.4vw, 28px);
}
.panel--pad-lg { padding: clamp(26px, 3.4vw, 44px); }
.panel--graph { background: radial-gradient(120% 120% at 20% 0%, rgba(255,106,42,.06), transparent 60%), var(--panel); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.panel__head h3 { font-size: 1rem; }
.panel__head .chip { font-size: .74rem; }

.codebox {
  position: relative; border: 1px solid var(--line); border-radius: 13px;
  background: #08090b; overflow: hidden;
}
.codebox__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025); }
.codebox__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-3); display: block; }
.codebox__bar span { margin-left: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--faint); }
.codebox pre { margin: 0; padding: 16px 18px; font-family: var(--font-mono); font-size: .74rem; line-height: 1.85; color: var(--muted); overflow-x: auto; }
.codebox .k { color: var(--blue); }
.codebox .s { color: var(--gold); }
.codebox .n { color: var(--teal); }
.codebox .c { color: var(--faint); }
.codebox .fn { color: var(--ember-2); }

.quote {
  border-left: 2px solid var(--ember); padding-left: 22px;
  font-family: var(--font-serif); font-size: clamp(1.25rem, 2.1vw, 1.75rem); line-height: 1.32; letter-spacing: -.015em;
  color: var(--text);
}

.vector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.vector-grid > div { padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.vector-grid > div:nth-child(3n) { border-right: 0; }
.vector-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.vector-grid h4 { font-size: .96rem; }
.vector-grid p { font-size: .86rem; line-height: 1.55; color: var(--muted); }
.vector-grid .k { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; color: var(--ember-2); text-transform: uppercase; }

/* ---------------- impact / hops visual ---------------- */
.impact { display: grid; grid-template-columns: 1fr 290px; gap: 22px; align-items: stretch; }
.impact__stage {
  position: relative; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(90% 90% at 30% 10%, rgba(255,106,42,.075), transparent 62%), #0a0c0f;
  min-height: 380px; overflow: hidden; padding: 18px;
}
.impact__stage svg { width: 100%; height: 100%; min-height: 340px; }
.impact .inode { transition: opacity .45s, filter .45s; }
.impact .inode.far { opacity: .12; filter: grayscale(1); }
.impact__ctrl { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 16px; align-content: start; background: rgba(255,255,255,.02); }
.impact__readout { display: flex; align-items: baseline; gap: 8px; }
.impact__readout b { font-size: 2.6rem; font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1; }
.impact__readout span { font-size: .84rem; color: var(--muted); }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--ember), rgba(255,255,255,.14)); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--text); margin-top: -7px;
  border: 3px solid var(--ink); box-shadow: 0 0 0 1px var(--line-3);
}
input[type="range"]::-moz-range-track { height: 3px; background: rgba(255,255,255,.16); }
input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--text); border: 3px solid var(--ink); }

/* ---------------- provider / source grid ---------------- */
.provgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prov {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.022);
  font-size: .87rem; color: var(--text);
}
.prov i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; font-style: normal; font-weight: 700; font-size: 10px; color: #120b06; background: var(--c, var(--ember)); }
.prov small { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }

/* ---------------- table of contents (side nav) ---------------- */
.page-with-toc { display: grid; grid-template-columns: 210px 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 28px); display: grid; gap: 4px; }
.toc a { font-size: .85rem; color: var(--faint); padding: 7px 0 7px 14px; border-left: 1px solid var(--line); transition: color .2s, border-color .2s; }
.toc a:hover, .toc a.is-active { color: var(--text); border-color: var(--ember); }
.toc .toc__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1340px) {
  .ui-float { display: none; }
}
@media (max-width: 1180px) {
  .hero__inner { grid-template-columns: 1fr; gap: 54px; }
  .hero__copy { max-width: 760px; }
  .hero__visual { max-width: 760px; }
  .console-wrap { transform: none; }
  .ui-float--a { right: -14px; bottom: 4%; }
  .ui-float--b { left: -16px; top: 6%; }
  .cta-band__inner { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3n) { border-right: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .page-with-toc { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; }
  .toc .toc__label { display: none; }
}
@media (max-width: 1020px) {
  .nav__links { display: none; }
  .burger { display: block; }
  .nav__right .btn { display: none; }
  .split, .split--right-heavy, .split--left-heavy { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record { grid-template-columns: 1fr; }
  .record__list { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: repeat(3, 1fr); }
  .record__body { min-height: 0; }
  .impact { grid-template-columns: 1fr; }
  .provgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vector-grid > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .vector-grid > div:nth-child(2n) { border-right: 0; }
  .cmp thead th:first-child, .cmp td:first-child { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:nth-child(n+4) { border-top: 0; }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__row { grid-template-columns: 1fr; }
  .ticklist { grid-template-columns: 1fr; }
  .record__list { grid-template-columns: repeat(2, 1fr); }
  .provgrid { grid-template-columns: 1fr; }
  .vector-grid { grid-template-columns: 1fr; }
  .vector-grid > div { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .vector-grid > div:last-child { border-bottom: 0 !important; }
  .cmp-wrap--scroll .cmp { min-width: 640px; font-size: .82rem; }
  .cmp-wrap--scroll .cmp th, .cmp-wrap--scroll .cmp td { padding: 12px 14px; }
  .hero__badge { font-size: 9.5px; }
  .cta-band__actions { width: 100%; }
  .cta-band__actions .btn { width: 100%; }
  .sec-head__row { gap: 18px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .record__list { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0 !important; border-bottom: 1px solid var(--line); }
}


/* keep diagrams legible on small screens: allow horizontal panning */
@media (max-width: 760px) {
  .impact__stage { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .impact__stage svg { min-width: 560px; min-height: 0; }
  .panel--graph { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .panel--graph svg.graph { min-width: 460px; }
  .section--tight { padding-block: 44px; }
}


/* compact mobile impact list */
.impact__mobile { display: none; }
@media (max-width: 760px) {
  .impact__mobile { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: radial-gradient(90% 90% at 20% 0%, rgba(255,106,42,.07), transparent 60%), #0a0c0f; }
  .impact__mroot { display: grid; gap: 3px; padding: 12px 14px; border-radius: 10px; background: #2a1a10; border: 1px solid rgba(255,106,42,.5); margin-bottom: 6px; }
  .impact__mroot span { font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; color: var(--ember-2); }
  .impact__mroot b { font-size: .92rem; font-weight: 500; }
  .impact__mrow { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); }
  .impact__mrow .impact__mhop { font-family: var(--font-mono); font-size: 10px; color: var(--faint); }
  .impact__mrow .impact__mkind { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; color: var(--ember-2); }
  .impact__mrow b { font-size: .84rem; font-weight: 500; }
  .impact__mrow[data-hop="4"] { opacity: .55; }
  .impact .impact__stage { display: none; }
  .impact__ctrl { padding: 18px; }
}


/* grids inside panels must be able to shrink their scrolling children */
.panel > div, .panel--graph > div { min-width: 0; }

/* ---------------- benefit rows (why page) ---------------- */
.benefit {
  display: grid; grid-template-columns: 34px 38px 1fr; gap: 16px; align-items: start;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.benefit__n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--faint); padding-top: 13px; }
.benefit h3 { font-size: 1.02rem; margin-bottom: 6px; letter-spacing: -.02em; }
.benefit p { font-size: .89rem; line-height: 1.62; color: var(--muted); max-width: 54ch; }
@media (max-width: 760px) {
  .benefit { grid-template-columns: 28px 1fr; gap: 12px; }
  .benefit > .card__icon { display: none; }
  .benefit__n { padding-top: 3px; }
}


/* parent brand descriptor (footer) */
.footer__cobrand {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint);
}
.footer__cobrand i {
  width: 6px; height: 6px; border-radius: 50%; background: #2ee27a; display: block;
  box-shadow: 0 0 0 3px rgba(46, 226, 122, .12);
}
