/* ==========================================================================
   KO Research Labs — styles
   Sections map 1:1 to future WordPress template parts.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Clinical Precision palette (docs/DESIGN.md) */
  --surface: #F8FAFC;
  --surface-raised: #FFFFFF;
  --surface-subdued: #F1F5F9;
  --hairline: #E2E8F0;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #526075; /* AA on every light surface, unlike #64748b on #f1f5f9 */
  --rule: #E2E8F0;
  --rule-strong: #CBD5E1;
  --primary: #0284C7;
  --primary-strong: #0369A1; /* filled buttons: white on #0284c7 is only 4.1:1 */
  --primary-deep: #075985;
  --primary-ink: #0369A1; /* primary for small text on light surfaces */
  --tertiary: #0EA5E9;
  --agent-o: #565E74;
  --success: #059669;
  --success-ink: #047857;
  --error: #DC2626;
  --night: #0A122A;
  --night-2: #111B36;
  --night-rule: rgba(148, 163, 184, .18);
  --on-night: #F8FAFC;
  --on-night-muted: #94A3B8;
  --primary-on-night: #38BDF8;
  --success-on-night: #34D399;
  --error-on-night: #F87171;

  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-body: "Hanken Grotesk", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --sec: clamp(88px, 12vw, 168px);
  --radius: 14px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
/* Component display rules must never override the hidden attribute */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--primary-strong); color: #fff; }
em { font-style: italic; }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; background: var(--ink); color: var(--surface); border-radius: 8px;
  transform: translateY(-150%); transition: transform .3s var(--ease-out);
}
.skip:focus { transform: none; }

.grain {
  position: fixed; inset: -50%; z-index: 150; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--sec) 0; position: relative; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

.eyebrow {
  margin: 0; font: 500 12px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow--light { color: var(--on-night-muted); }

.display {
  font: 400 clamp(40px, 5.6vw, 84px)/1.02 var(--f-display);
  letter-spacing: -.02em; margin: 18px 0 0; text-wrap: balance;
}
.display em { color: var(--primary); }
.display--light { color: var(--on-night); }
.display--light em { color: var(--primary-on-night); }

.section__head { display: grid; gap: 4px; margin-bottom: clamp(48px, 7vw, 88px); max-width: 820px; }
.section__head--center { text-align: center; margin-inline: auto; justify-items: center; }
.section__intro { color: var(--ink-2); font-size: 19px; max-width: 56ch; margin: 22px 0 0; }
.section__intro--light { color: var(--on-night-muted); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--surface);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font: 600 15px/1 var(--f-body); letter-spacing: .01em;
  overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), background-color .3s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--ink); transform: translateY(101%); transition: transform .55s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn .arrow { display: inline-block; transition: transform .45s var(--ease-out); }
.btn--primary { --bg: var(--primary-strong); --fg: #fff; }
.btn--primary::before { background: var(--primary-deep); }
.btn--ink { --bg: var(--ink); --fg: var(--surface); }
.btn--ink::before { background: var(--primary); }
.btn--ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.btn--sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }
.btn.is-disabled, .btn:disabled { opacity: .45; pointer-events: none; }
@media (hover: hover) {
  .btn:hover { box-shadow: 0 14px 30px -14px rgba(15, 23, 42, .5); }
  .btn:hover::before { transform: translateY(0); }
  .btn--ghost:hover { --fg: var(--surface); }
  .btn:hover .arrow { transform: translateX(5px); }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: background-color .4s, box-shadow .4s, transform .5s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(248, 250, 252, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--rule);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
/* Logo colours follow the light/dark variants in assets/img/logo-*.svg */
.brand {
  --logo-tile: #F0F9FF; --logo-stroke: var(--primary); --logo-dot: var(--primary);
  --logo-word: var(--ink); --logo-sub: var(--primary);
  display: inline-flex; align-items: center;
}
.brand__logo { width: auto; height: 40px; overflow: visible; }
.brand__tile { fill: var(--logo-tile); stroke: var(--logo-stroke); transition: fill .4s, stroke .4s; }
.brand__glyph { stroke: var(--logo-stroke); transition: stroke .4s; }
.brand__dot { fill: var(--logo-dot); transition: fill .4s, transform .6s var(--spring); }
.brand__word { fill: var(--logo-word); font: 800 18px "Plus Jakarta Sans", var(--f-body); letter-spacing: .05em; transition: fill .4s; }
.brand__sub { fill: var(--logo-sub); font: 700 9.5px var(--f-mono); letter-spacing: .18em; transition: fill .4s; }
.brand:hover .brand__dot { transform: translateX(2px); }
@media (max-width: 380px) { .brand__logo { height: 34px; } }

.nav__links { display: flex; gap: 6px; }
.nav__links a {
  position: relative; padding: 8px 14px; font-size: 15px; font-weight: 500; color: var(--ink-2); border-radius: 999px;
  transition: color .25s, background-color .25s;
}
.nav__links a:hover { color: var(--ink); background: rgba(15, 23, 42, .05); }
.nav__links a.is-active, .nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a.is-active::after, .nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--primary);
}
.nav__actions { display: flex; align-items: center; gap: 10px; }

.cart-btn, .nav-icon {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  transition: background-color .25s;
}
.cart-btn:hover, .nav-icon:hover { background: rgba(15, 23, 42, .06); }
.cart-btn svg, .nav-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.cart-btn__count {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--primary); color: #fff; font: 600 11px/18px var(--f-mono); text-align: center;
  transform: scale(0); transition: transform .45s var(--spring);
}
.cart-btn__count.has-items { transform: scale(1); }
.cart-btn__count.bump { animation: bump .5s var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

.menu-btn { display: none; width: 44px; height: 44px; position: relative; border-radius: 50%; }
.menu-btn span {
  position: absolute; left: 12px; right: 12px; height: 1.6px; background: var(--ink);
  transition: transform .45s var(--ease-out), top .45s var(--ease-out);
}
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  display: grid; padding: 8px var(--gutter) 24px; background: var(--surface); box-shadow: 0 1px 0 var(--rule);
  max-height: calc(100svh - 80px); min-height: calc(100svh - 80px); align-content: start; overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
@media (min-width: 941px) { .mobile-menu { display: none; } }
.mobile-menu a {
  font: 400 34px/1.25 var(--f-display); padding: 6px 0; border-bottom: 1px solid var(--rule);
  opacity: 0; transform: translateY(12px); animation: menuIn .5s var(--ease-out) forwards;
}
.mobile-menu a:nth-child(2) { animation-delay: .04s; } .mobile-menu a:nth-child(3) { animation-delay: .08s; }
.mobile-menu a:nth-child(4) { animation-delay: .12s; } .mobile-menu a:nth-child(5) { animation-delay: .16s; }
.mobile-menu a:nth-child(6) { animation-delay: .2s; } .mobile-menu a:nth-child(7) { animation-delay: .24s; }
.mobile-menu a:last-child { color: var(--primary-ink); }
.mobile-menu a[aria-current="page"] { color: var(--primary-ink); }
@keyframes menuIn { to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 140px 0 72px; overflow: hidden;
  background:
    radial-gradient(60% 60% at 20% 30%, rgba(2, 132, 199, .09), transparent 70%),
    radial-gradient(50% 55% at 85% 40%, rgba(14, 165, 233, .08), transparent 70%),
    var(--surface);
}
.hero__field {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .25) 40%, #000 72%);
          mask-image: linear-gradient(90deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .25) 40%, #000 72%);
}
.hero__inner { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); pointer-events: none; }
.hero__inner a, .hero__inner button { pointer-events: auto; }
.hero__eyebrow { margin-bottom: 28px; }
.hero__title {
  margin: 0; font: 400 clamp(64px, 13.2vw, 212px)/.88 var(--f-display); letter-spacing: -.035em;
}
/* Desktop gets a quieter headline; phones and tablets keep the large type above. */
@media (min-width: 941px) {
  .hero__title { font-size: clamp(72px, 6.8vw, 96px); line-height: .95; letter-spacing: -.03em; }
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { color: var(--primary); padding-right: .04em; }
.hero__foot {
  margin-top: clamp(32px, 4vw, 56px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.hero__lede { max-width: 50ch; margin: 0; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); }
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__legend {
  position: absolute; top: 120px; right: var(--gutter); display: grid; gap: 8px;
  font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px;
  background: rgba(248, 250, 252, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero__legend span { display: flex; align-items: center; gap: 10px; }
.sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sw--k { background: var(--primary); }
.sw--o { background: var(--agent-o); }
.sw--x { width: 18px; height: 1.5px; border-radius: 0; background: var(--ink); }
.hero__scroll {
  position: absolute; left: 50%; bottom: 22px; width: 24px; height: 38px; margin-left: -12px;
  border: 1.5px solid var(--rule-strong); border-radius: 12px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--ink);
  animation: scrollDot 2s var(--ease-io) infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Page-load choreography */
/* Hidden start states only when JS runs, so content never depends on it. */
.js [data-load] { opacity: 0; transform: translateY(24px); }
.js .hero__title [data-load] { opacity: 1; transform: translateY(110%); }
.is-loaded [data-load] { animation: rise 1.1s var(--ease-out) forwards; }
.is-loaded .hero__title [data-load] { animation: lineUp 1.2s var(--ease-out) forwards; }
.is-loaded [data-load="1"] { animation-delay: .1s; }
.is-loaded [data-load="2"] { animation-delay: .2s; }
.is-loaded [data-load="3"] { animation-delay: .32s; }
.is-loaded [data-load="4"] { animation-delay: .44s; }
.is-loaded [data-load="5"] { animation-delay: .7s; }
.is-loaded [data-load="6"] { animation-delay: .82s; }
.is-loaded [data-load="7"] { animation-delay: 1s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes lineUp { to { transform: none; } }

/* ---------- Marquee ---------- */
.marquee { position: relative; overflow: hidden; background: var(--ink); color: var(--surface); padding: 20px 0; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 8%; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--ink), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }
.marquee__track {
  display: flex; gap: 36px; width: max-content; align-items: center;
  font: 400 clamp(24px, 3vw, 36px)/1 var(--f-display); white-space: nowrap;
  animation: marquee 38s linear infinite;
}
.marquee__track b { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Reveal on scroll ---------- */
html.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0s); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.about__label { padding-top: 14px; border-top: 1px solid var(--ink); align-self: start; }
.about__body .display { margin-top: 0; max-width: 18ch; }
.about__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 56px; }
.about__cols p { margin: 0; color: var(--ink-2); font-size: 18px; }
.about__cols p:first-child { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 72px 0 0; border-top: 1px solid var(--rule-strong); }
.stat { padding: 24px 20px 0 0; border-right: 1px solid var(--rule); }
.stat + .stat { padding-left: 20px; }
.stat:last-child { border-right: 0; }
.stat dt { font: 500 11px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-height: 2.8em; }
.stat dd { margin: 14px 0 0; font: 400 clamp(52px, 6vw, 80px)/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat dd small { font-size: .45em; color: var(--primary); margin-left: 2px; }

/* ---------- Research ---------- */
.research { background: var(--surface-subdued); }
.research::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 0%, #000, transparent 65%);
          mask-image: radial-gradient(ellipse at 70% 0%, #000, transparent 65%);
}
.research .wrap { position: relative; }
.focus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1200px; }
.focus__card {
  position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface-raised);
  border: 1px solid var(--rule); transform-style: preserve-3d;
  transition: opacity 1s var(--ease-out), transform .7s var(--ease-out), box-shadow .5s var(--ease-out), border-color .4s;
}
.focus__card.reveal.is-in { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.focus__card.is-in:hover { box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .35); border-color: var(--rule-strong); }
.focus__fig { height: 160px; margin: -4px -4px 24px; border-radius: 10px; background: var(--surface-subdued); display: grid; place-items: center; overflow: hidden; }
.focus__fig svg { width: 82%; height: auto; overflow: visible; }
.focus__card h3 { font: 400 30px/1.1 var(--f-display); margin: 0 0 12px; letter-spacing: -.01em; }
.focus__card p { margin: 0; color: var(--ink-2); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 22px 0 0; }
.tags li { font: 500 11px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--ink-2); }

/* figure animations */
.f-k, .f-o { fill: none; stroke-width: 1.5; transition: transform 1s var(--spring); transform-box: fill-box; transform-origin: center; }
.f-k { stroke: var(--primary); }
.f-o { stroke: var(--agent-o); }
.f-x { fill: var(--ink); opacity: .85; transition: opacity .6s; }
.focus__card:hover .f-k { transform: translateX(8px); }
.focus__card:hover .f-o { transform: translateX(-8px); }
.f-grid { stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.f-curve { fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1.6s var(--ease-io) .3s; }
.focus__card.is-in .f-curve { stroke-dashoffset: 0; }
.f-pts circle { fill: var(--surface); stroke: var(--ink); stroke-width: 2; transform-box: fill-box; transform-origin: center; transition: transform .5s var(--spring); }
.focus__card:hover .f-pts circle { transform: scale(1.5); }
.focus__card:hover .f-pts circle:nth-child(2) { transition-delay: .05s; }
.focus__card:hover .f-pts circle:nth-child(3) { transition-delay: .1s; }
.focus__card:hover .f-pts circle:nth-child(4) { transition-delay: .15s; }
.f-bars rect { fill: var(--agent-o); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform 1s var(--ease-out); }
.f-bars rect:nth-child(2n) { fill: var(--primary); }
.focus__card.is-in .f-bars rect { transform: scaleY(1); }
.f-bars rect:nth-child(2) { transition-delay: .08s; } .f-bars rect:nth-child(3) { transition-delay: .16s; }
.f-bars rect:nth-child(4) { transition-delay: .24s; } .f-bars rect:nth-child(5) { transition-delay: .32s; }
.f-err { stroke: var(--ink); stroke-width: 1.5; opacity: 0; transition: opacity .6s .9s; }
.focus__card.is-in .f-err { opacity: .7; }

/* ---------- Method (dark) ---------- */
.method { background: var(--night); color: var(--on-night); overflow: clip; }
.method::after {
  content: ""; position: absolute; width: 900px; height: 900px; right: -300px; top: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 132, 199, .22), transparent 60%); pointer-events: none;
}
.method__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.method__head { position: sticky; top: 120px; }
.method__meter { display: flex; align-items: center; gap: 14px; margin-top: 48px; color: var(--on-night-muted); }
.meter { flex: 1; height: 2px; background: var(--night-rule); border-radius: 2px; overflow: hidden; max-width: 220px; }
.meter i { display: block; height: 100%; width: 100%; background: var(--primary-on-night); transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease-out); }

.steps { position: relative; list-style: none; margin: 0; padding: 0 0 0 52px; }
.steps__rail { position: absolute; left: 11px; top: 12px; bottom: 12px; width: 2px; background: var(--night-rule); }
.steps__rail i { position: absolute; inset: 0; background: linear-gradient(var(--primary-on-night), var(--primary)); transform-origin: top; transform: scaleY(0); }
.step { position: relative; padding: 0 0 72px; }
.step:nth-last-child(2) { padding-bottom: 0; } /* last stage; the rail <li> follows it */
.step h3 { color: var(--on-night-muted); transition: color .6s var(--ease-out); }
.step.is-active h3 { color: var(--on-night); }
.step__node {
  position: absolute; left: -52px; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--night); border: 2px solid var(--night-rule); z-index: 1;
  transition: border-color .5s, background-color .5s, box-shadow .5s;
}
.step.is-active .step__node { border-color: var(--primary-on-night); background: var(--primary); box-shadow: 0 0 0 6px rgba(56, 189, 248, .18); }
.step__k { color: var(--primary-on-night); }
.step h3 { font: 400 clamp(32px, 3.4vw, 46px)/1.05 var(--f-display); margin: 10px 0 12px; letter-spacing: -.015em; }
.step p { margin: 0; color: var(--on-night-muted); max-width: 46ch; }

/* ---------- Partners ---------- */
.venn { max-width: 620px; margin: 0 auto clamp(40px, 6vw, 72px); }
.venn svg { width: 100%; overflow: visible; }
.v-l, .v-r { fill: none; stroke-width: 1.5; transition: transform 1.6s var(--spring); }
.v-l { stroke: var(--primary); transform: translateX(-60px); }
.v-r { stroke: var(--agent-o); transform: translateX(60px); }
.v-i { fill: var(--ink); opacity: 0; transition: opacity .8s .9s; }
.venn.is-in .v-l, .venn.is-in .v-r { transform: none; }
.venn.is-in .v-i { opacity: 1; }
.v-t { font: 500 13px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; fill: var(--ink-2); text-anchor: middle; }
.v-t--c { font: 400 italic 30px var(--f-display); letter-spacing: 0; text-transform: none; fill: var(--surface); opacity: 0; transition: opacity .6s 1.3s; }
.v-t--s { fill: var(--hairline); font-size: 10px; opacity: 0; transition: opacity .6s 1.4s; }
.venn.is-in .v-t--c, .venn.is-in .v-t--s { opacity: 1; }
.amp { font-style: italic; color: var(--primary); }
.partners__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.pcard { padding: 32px 28px 8px 0; }
.pcard + .pcard { padding-left: 28px; border-left: 1px solid var(--rule); }
.pcard__icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-subdued); margin-bottom: 22px; transition: background-color .4s, transform .6s var(--spring);
}
.pcard__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s; }
.pcard:hover .pcard__icon { background: var(--primary); transform: rotate(-8deg) scale(1.06); }
.pcard:hover .pcard__icon svg { stroke: #fff; }
.pcard h3 { font: 400 28px/1.1 var(--f-display); margin: 0 0 10px; }
.pcard p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* ---------- Boundaries ---------- */
.bounds { background: var(--surface-subdued); }
.bounds__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: end; }
.bounds .display { max-width: 14ch; }
.bounds__lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.blist { padding: 26px; border-radius: var(--radius); background: var(--surface-raised); border: 1px solid var(--rule); }
.blist h3 { margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.blist h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.blist--yes h3::before { background: var(--success); }
.blist--no { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.blist--no h3::before { background: var(--primary); }
.blist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 15px; }
.blist li { position: relative; padding-left: 24px; line-height: 1.45; }
.blist--yes li::before { content: "✓"; position: absolute; left: 0; color: var(--success-ink); font-weight: 700; }
.blist--no li::before { content: "✕"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* ---------- Store ---------- */
.store__head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; margin-bottom: 48px; }
.store__head .display { max-width: 13ch; }
.store__more { margin: 28px 0 0; text-align: center; }
.store__note p { margin: 0; color: var(--ink-2); font-size: 18px; }
.store__disclaimer {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 20px !important;
  padding: 14px 16px; border-radius: 10px; background: var(--surface-subdued); border: 1px dashed var(--rule-strong);
  font-size: 12.5px !important; line-height: 1.6; color: var(--ink-2) !important; text-transform: none; letter-spacing: .02em;
}
.store__disclaimer svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.filters {
  position: relative; display: flex; gap: 4px; padding: 5px; margin-bottom: 32px; width: max-content; max-width: 100%;
  border-radius: 999px; background: var(--surface-subdued); border: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
@media (max-width: 600px) {
  .filters { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
}
.filters button {
  position: relative; z-index: 1; height: 40px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .35s;
}
.filters button[aria-selected="true"] { color: var(--surface); }
.filters__ink {
  position: absolute; top: 5px; left: 0; height: 40px; border-radius: 999px; background: var(--ink);
  transition: transform .55s var(--ease-out), width .55s var(--ease-out);
}

.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-raised); border: 1px solid var(--rule);
  animation: cardIn .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms);
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@media (hover: hover) {
  .product:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -28px rgba(15, 23, 42, .4); }
  .product:hover .product__art svg { transform: scale(1.06) rotate(-2deg); }
}
.product__art {
  position: relative; aspect-ratio: 1 / .86; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 60%, var(--tint, #E0F2FE), var(--surface-subdued) 70%);
}
.product__art svg {
  width: 52%; height: auto; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .8s var(--ease-out);
}
.product__art svg .acc { stroke: var(--primary); }
.product__art svg .fillacc { fill: var(--primary); stroke: none; opacity: .9; }
.product__art svg .fillcool { fill: var(--agent-o); stroke: none; opacity: .85; }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 5px 9px; border-radius: 999px;
  font: 500 10px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; background: var(--surface); border: 1px solid var(--rule);
}
.badge--inst { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.product__body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 18px; }
.product__cat { font: 500 10px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.product__name { font: 400 24px/1.1 var(--f-display); margin: 6px 0 6px; }
.product__name a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease-out); }
.product__name a:hover { background-size: 100% 1px; }
.product__desc { margin: 0 0 18px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.product__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font: 500 16px var(--f-mono); font-variant-numeric: tabular-nums; }
.add {
  position: relative; height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; overflow: hidden;
  background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 600;
  transition: background-color .35s, transform .2s var(--ease-out);
}
.add:active { transform: scale(.94); }
.add:hover { background: var(--primary); }
.add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.add .add__ok { position: absolute; inset: 0; display: grid; place-items: center; background: var(--success-ink); transform: translateY(100%); transition: transform .4s var(--ease-out); }
.add.is-added .add__ok, .add.added .add__ok { transform: none; }

.fund {
  margin-top: 56px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center;
  padding: 32px; border-radius: var(--radius); background: var(--ink); color: var(--surface);
}
.fund .eyebrow { color: var(--on-night-muted); }
.fund__big { font: 400 clamp(26px, 2.6vw, 36px)/1.1 var(--f-display); margin: 10px 0 0; }
.fund__track { height: 10px; border-radius: 999px; background: rgba(248, 250, 252, .1); overflow: hidden; }
.fund__track i {
  display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--primary), var(--tertiary));
  transition: transform 1.8s var(--ease-out) .2s;
}
.fund.is-in .fund__track i { transform: scaleX(var(--v)); }
.fund__labels { display: flex; justify-content: space-between; margin-top: 12px; color: var(--on-night-muted); font-size: 11px; }
.fund__labels span:last-child { color: var(--surface); }

/* ---------- Contact (dark) ---------- */
.contact { background: var(--night); color: var(--on-night); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.contact__meta { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 0; border-top: 1px solid var(--night-rule); }
.contact__meta li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--night-rule); color: var(--on-night); text-transform: none; font-size: 13px; letter-spacing: .02em; flex-wrap: wrap; }
.contact__meta span { color: var(--on-night-muted); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }

.form { padding: clamp(24px, 3vw, 40px); border-radius: 20px; background: var(--night-2); border: 1px solid var(--night-rule); display: grid; gap: 14px; }
.field { position: relative; }
.field input, .field textarea, .field select {
  width: 100%; padding: 26px 16px 10px; border-radius: 10px; font: 400 16px var(--f-body); color: var(--on-night);
  background: rgba(248, 250, 252, .04); border: 1px solid var(--night-rule); outline: none; resize: vertical;
  -webkit-appearance: none; appearance: none;
  transition: border-color .3s, background-color .3s, box-shadow .3s;
}
.field select { cursor: pointer; }
.field--select::after {
  content: ""; position: absolute; right: 18px; top: 26px; width: 8px; height: 8px; pointer-events: none;
  border-right: 1.5px solid var(--on-night-muted); border-bottom: 1.5px solid var(--on-night-muted); transform: rotate(45deg);
}
.field select option { color: var(--ink); }
.field label {
  position: absolute; left: 17px; top: 18px; color: var(--on-night-muted); font-size: 16px; pointer-events: none;
  transform-origin: left top; transition: transform .35s var(--ease-out), color .3s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary-on-night); background: rgba(248, 250, 252, .06); box-shadow: 0 0 0 4px rgba(56, 189, 248, .18); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select:focus + label, .field select:valid + label { transform: translateY(-10px) scale(.74); color: var(--primary-on-night); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: var(--error-on-night); animation: shake .4s var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--on-night-muted); cursor: pointer; margin: 4px 0 8px; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); cursor: pointer; }
.check.is-invalid span { color: var(--error-on-night); }
.form__status { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--success-on-night); }
.form__status.is-error { color: var(--error-on-night); }
.contact__meta a { color: inherit; text-decoration: underline; text-decoration-color: var(--night-rule); text-underline-offset: 4px; }
.contact__meta a:hover { text-decoration-color: currentColor; }
.form .btn::before { background: var(--surface); }
@media (hover: hover) { .form .btn:hover { --fg: var(--ink); } }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: var(--on-night-muted); padding: 0 0 40px; overflow: hidden; }
.footer__word {
  margin: 0; padding-top: 40px; border-top: 1px solid var(--night-rule);
  font: 400 clamp(56px, 13.6vw, 210px)/.9 var(--f-display); letter-spacing: -.04em; color: var(--on-night); white-space: nowrap;
}
.footer__word em { color: var(--primary-on-night); }
.footer__row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 40px; font-size: 14px; }
.footer__row p { margin: 0; max-width: 60ch; }
.footer__row nav { display: flex; gap: 22px; }
.footer__row nav a { transition: color .25s; }
.footer__row nav a:hover { color: var(--on-night); }
.footer__fine { margin: 20px 0 0; font-size: 12px; opacity: .7; max-width: 80ch; }

/* ---------- Drawer / cart ---------- */
.scrim { position: fixed; inset: 0; z-index: 120; background: rgba(10, 18, 42, .45); opacity: 0; transition: opacity .45s var(--ease-out); }
.scrim.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 130; width: min(440px, 100%);
  display: flex; flex-direction: column; background: var(--surface);
  box-shadow: -30px 0 80px -30px rgba(10, 18, 42, .45);
  transform: translateX(105%); transition: transform .6s var(--ease-out); visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--rule); }
.drawer__head h2 { margin: 0; font: 400 32px/1 var(--f-display); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: background-color .25s, transform .4s var(--ease-out); }
.icon-btn:hover { background: var(--surface-subdued); transform: rotate(90deg); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px; overscroll-behavior: contain; }
.drawer__empty { text-align: center; padding: 64px 12px; color: var(--muted); }
.drawer__empty strong { display: block; font: 400 28px var(--f-display); color: var(--ink); margin-bottom: 6px; }
.drawer__empty .btn { margin-top: 20px; }
.line-item h4 a:hover { color: var(--primary-ink); }
.line-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule);
  animation: rise .5s var(--ease-out) both;
}
.line-item__art { width: 64px; height: 64px; border-radius: 10px; background: var(--surface-subdued); display: grid; place-items: center; }
.line-item__art svg { width: 60%; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.line-item__art svg .acc { stroke: var(--primary); }
.line-item__art svg .fillacc { fill: var(--primary); stroke: none; }
.line-item__art svg .fillcool { fill: var(--agent-o); stroke: none; }
.line-item h4 { margin: 0; font: 400 19px/1.15 var(--f-display); }
.line-item .price { font-size: 13px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--rule-strong); border-radius: 999px; margin-top: 8px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; font-size: 16px; line-height: 1; }
.qty button:hover { background: var(--surface-subdued); }
.qty span { min-width: 22px; text-align: center; font: 500 13px var(--f-mono); }
.line-item__total { font: 500 14px var(--f-mono); text-align: right; }
.drawer__foot { padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); display: grid; gap: 10px; background: var(--surface-subdued); }
.drawer__row { display: flex; justify-content: space-between; font-size: 15px; }
.drawer__row strong { font: 500 16px var(--f-mono); }
.drawer__row--fund { color: var(--success-ink); font-size: 14px; }
.drawer__row--fund strong { font-size: 14px; }
.drawer__fine { margin: 2px 0 0; text-align: center; color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: .02em; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 160; padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--surface); font-size: 14px; white-space: nowrap; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px; pointer-events: none;
  opacity: 0; transform: translate(-50%, 16px) scale(.96); transition: opacity .35s var(--ease-out), transform .45s var(--spring);
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .products { grid-template-columns: repeat(3, 1fr); }
  .bounds__grid { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 940px) {
  .nav__links, .nav__cta { display: none; }
  .menu-btn { display: block; }
  .hero__legend { display: none; }
  .about__grid { grid-template-columns: 1fr; gap: 24px; }
  .about__label { border-top: 0; padding-top: 0; }
  .about__cols { grid-template-columns: 1fr; gap: 24px; margin-top: 36px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); margin-top: 24px; }
  .focus { grid-template-columns: 1fr; }
  .method__grid { grid-template-columns: 1fr; }
  .method__head { position: static; }
  .partners__grid { grid-template-columns: 1fr; }
  .pcard, .pcard + .pcard { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .store__head { grid-template-columns: 1fr; gap: 24px; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .fund { grid-template-columns: 1fr; gap: 24px; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-bottom: 88px; }
  .hero__ctas { width: 100%; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .bounds__lists { grid-template-columns: 1fr; }
  .products { grid-template-columns: 1fr; gap: 14px; }
  .product { flex-direction: row; }
  .product__art { aspect-ratio: auto; width: 38%; flex: none; }
  .product__art svg { width: 66%; }
  .product__body { padding: 14px; }
  .product__name { font-size: 21px; }
  .product__desc { display: none; }
  .badge { top: 8px; left: 8px; font-size: 9px; }
  .stat dd { font-size: 52px; }
  .footer__row nav { flex-wrap: wrap; column-gap: 22px; row-gap: 0; }
  .footer__row nav a, .footer__legal a { display: inline-block; padding-block: 11px; }
  .footer__legal { row-gap: 0; }
  .venn .v-t { font-size: 15px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  [data-load], .hero__title [data-load], .reveal { opacity: 1 !important; transform: none !important; }
  .grain { animation: none; }
}

/* ---------- Nav over dark sections ---------- */
.nav.on-dark.is-scrolled { background: rgba(10, 18, 42, .78); box-shadow: 0 1px 0 var(--night-rule); }
.nav.on-dark .brand, .nav.on-dark .cart-btn, .nav.on-dark .nav-icon { color: var(--on-night); }
.nav.on-dark .brand { --logo-tile: #0A122A; --logo-stroke: var(--tertiary); --logo-dot: var(--primary-on-night); --logo-word: var(--on-night); --logo-sub: var(--primary-on-night); }
.nav.on-dark .nav__links a { color: var(--on-night-muted); }
.nav.on-dark .nav__links a:hover, .nav.on-dark .nav__links a.is-active, .nav.on-dark .nav__links a[aria-current="page"] { color: var(--on-night); background: rgba(248, 250, 252, .06); }
.nav.on-dark .nav__cta { --bg: var(--surface); --fg: var(--ink); }
.nav.on-dark .cart-btn:hover, .nav.on-dark .nav-icon:hover { background: rgba(248, 250, 252, .08); }
.nav.on-dark .menu-btn span { background: var(--on-night); }
.nav, .nav .brand, .nav .nav__links a, .nav .cart-btn { transition: background-color .4s, box-shadow .4s, transform .5s var(--ease-out), color .4s; }
@media (max-width: 600px) { .hide-sm { display: none; } }

/* ---------- Focus on dark surfaces ---------- */
.method :focus-visible, .contact :focus-visible, .footer :focus-visible,
.fund :focus-visible, .nav.on-dark :focus-visible { outline-color: var(--primary-on-night); }

/* ==========================================================================
   Shared inner-page components
   Used by shop, product, cart, checkout, account and journal templates.
   ========================================================================== */

/* ---------- Page header ---------- */
.page-head { position: relative; padding: clamp(128px, 16vw, 168px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--rule); overflow: hidden; }
.page-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 85% 0%, #000, transparent 60%);
          mask-image: radial-gradient(ellipse at 85% 0%, #000, transparent 60%);
}
.page-head .wrap { position: relative; }
.page-head__title { font: 400 clamp(48px, 7.4vw, 112px)/.95 var(--f-display); letter-spacing: -.03em; margin: 14px 0 0; text-wrap: balance; }
.page-head__title em { color: var(--primary); }
.page-head__intro { max-width: 58ch; margin: 22px 0 0; color: var(--ink-2); font-size: clamp(17px, 1.4vw, 19px); }
.page-head__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; font: 500 11px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.page-head__meta li { display: inline-flex; align-items: center; gap: 8px; }
.page-head__meta li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.page-head--compact { padding-bottom: 36px; }
.page-head--compact .page-head__title { font-size: clamp(40px, 5.4vw, 72px); }

/* ---------- Breadcrumbs ---------- */
.crumbs { margin: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font: 500 11px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #94A3B8; }
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--primary-ink); }
.crumbs [aria-current="page"] { color: var(--ink); }

/* ---------- Chips (category / filter links) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: var(--surface-raised); color: var(--ink-2);
  font-size: 14px; font-weight: 500; white-space: nowrap; transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip__count { font: 500 11px var(--f-mono); color: inherit; opacity: .7; }

/* ---------- Status chips (DESIGN.md: mono, 4px radius) ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 4px;
  font: 600 10px/16px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  background: var(--surface-subdued); border: 1px solid var(--rule); color: #475569;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--active { background: rgba(2, 132, 199, .08); border-color: rgba(2, 132, 199, .25); color: var(--primary-ink); }
.status--pass { background: rgba(5, 150, 105, .08); border-color: rgba(5, 150, 105, .25); color: var(--success-ink); }
.status--warn { background: rgba(217, 119, 6, .08); border-color: rgba(217, 119, 6, .3); color: #92400E; }

/* ---------- Notices ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px;
  background: var(--surface-subdued); border: 1px solid var(--rule); color: var(--ink-2); font-size: 14px; line-height: 1.55;
}
.notice > svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notice p { margin: 0; }
.notice strong { color: var(--ink); }
.notice a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; }
.notice--dashed { border-style: dashed; border-color: var(--rule-strong); }
.notice--warn { background: #FFFBEB; border-color: #FCD34D; }
.notice--warn > svg { stroke: #B45309; }
.notice--success { background: #ECFDF5; border-color: #A7F3D0; }
.notice--success > svg { stroke: var(--success-ink); }

/* ---------- Light form fields (label above input) ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-field { display: grid; gap: 6px; align-content: start; }
.form-field > label, .form-field__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.form-field .req { color: #B91C1C; margin-left: 2px; }
.form-field .opt { font-weight: 400; color: var(--muted); }
.input {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 8px;
  background: var(--surface-raised); border: 1px solid var(--rule-strong); color: var(--ink);
  font: 400 16px/1.4 var(--f-body); outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: #75849A; }
.input:hover { border-color: #94A3B8; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(2, 132, 199, .15); }
textarea.input { min-height: 112px; resize: vertical; }
select.input {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23526075' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.form-field__hint { margin: 0; font-size: 13px; color: var(--muted); }
.form-field__error { display: none; margin: 0; font-size: 13px; font-weight: 500; color: #B91C1C; }
.form-field.is-invalid .input { border-color: var(--error); }
.form-field.is-invalid .input:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.form-field.is-invalid .form-field__error { display: block; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; min-width: 0; }
.input-group .btn { height: 48px; flex: none; }

/* Checkbox rows */
.tick { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); cursor: pointer; line-height: 1.5; }
.tick input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary-strong); cursor: pointer; }
.tick a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; }
.tick.is-invalid { color: #B91C1C; }

/* Option cards (shipping, payment) */
.options { display: grid; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.option {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: center;
  padding: 16px 18px; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--surface-raised); cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.option:hover { border-color: #94A3B8; }
.option input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary-strong); cursor: pointer; }
.option__title { font-weight: 600; color: var(--ink); }
.option__note { grid-column: 2 / -1; font-size: 13px; color: var(--muted); }
.option__price { font: 500 14px var(--f-mono); color: var(--ink); }
.option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: #F7FBFF; }
.option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.option:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.option-group { display: grid; }
.option__panel { display: none; padding: 14px 4px 6px; }
.option-group:has(input:checked) .option__panel { display: block; }

/* ---------- Panels ---------- */
.panel { background: var(--surface-raised); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.panel__title { margin: 0 0 20px; font: 400 clamp(26px, 2.4vw, 32px)/1.1 var(--f-display); }
.panel__kicker { display: block; margin-bottom: 8px; font: 500 11px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Spec table (product specs, article tables) ---------- */
.spec-table { width: 100%; border-collapse: collapse; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--surface-raised); }
.spec-table caption { text-align: left; padding: 0 0 12px; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--surface-subdued); vertical-align: top; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 38%; font-weight: 500; color: var(--ink-2); font-size: 15px; background: var(--surface); }
.spec-table td { font: 500 14px/1.5 var(--f-mono); color: var(--ink); }

/* ---------- Summary rows (totals) ---------- */
.sum { display: grid; gap: 12px; margin: 0; }
.sum div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; }
.sum dt { color: var(--ink-2); }
.sum dd { margin: 0; font: 500 15px var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; }
.sum__total { padding-top: 14px; border-top: 1px solid var(--rule); }
.sum__total dt { color: var(--ink); font-weight: 600; }
.sum__total dd { font-size: 20px; font-weight: 600; }
.sum__fund dt, .sum__fund dd { color: var(--success-ink); font-size: 14px; }

/* ---------- Empty state ---------- */
.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: clamp(48px, 8vw, 96px) 20px; border: 1px dashed var(--rule-strong); border-radius: var(--radius); background: var(--surface-raised); }
.empty__icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-subdued); }
.empty__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty h2, .empty h3 { margin: 6px 0 0; font: 400 clamp(28px, 3vw, 36px)/1.1 var(--f-display); }
.empty p { margin: 0; max-width: 44ch; color: var(--ink-2); }
.empty .btn { margin-top: 10px; }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; margin-top: clamp(40px, 6vw, 64px); }
.pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pager a, .pager button, .pager span {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px;
  font: 500 14px var(--f-mono); color: var(--ink-2); border: 1px solid transparent; transition: border-color .2s, background-color .2s, color .2s;
}
.pager a:hover, .pager button:hover { border-color: var(--rule-strong); color: var(--ink); }
.pager [aria-current="page"] { background: var(--ink); color: var(--surface); }
.pager [aria-disabled="true"], .pager button:disabled { opacity: .4; pointer-events: none; }

/* ---------- Text link with arrow ---------- */
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--primary-ink); }
.link-arrow span { transition: transform .35s var(--ease-out); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Visually hidden ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .page-head__meta { gap: 8px 16px; }
}

/* ---------- Theme page shells ---------- */
.steps__rail { list-style: none; }
.section--page { padding: clamp(40px, 6vw, 72px) 0 var(--sec); }
.prose--page { max-width: 720px; }
.not-found { display: grid; gap: 24px; max-width: 640px; }
.korl-builder > .elementor { overflow: clip; }
.comments { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--rule); display: grid; gap: 24px; }
.comments__title { margin: 0; font: 400 32px/1.1 var(--f-display); }
.comments__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.comments__list .children { list-style: none; margin: 16px 0 0; padding-left: 24px; border-left: 1px solid var(--rule); }
.comment-body { display: grid; gap: 8px; font-size: 15px; }
.comment-meta { font: 500 12px var(--f-mono); color: var(--muted); }
.comment-form { display: grid; gap: 14px; }
.comment-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--rule-strong); font: 400 16px var(--f-body);
}
.byline__name:hover { color: var(--primary-ink); }
.cover--image { background: var(--surface-subdued); }
.cover--image img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.cover--image::before { display: none; }

/* ---------- Elementor: KORL sections are full-bleed and own their spacing ---------- */
.korl-builder .e-con:has(> .elementor-widget[data-widget_type^="korl-"]),
.korl-builder .e-con:has(> .e-con-inner > .elementor-widget[data-widget_type^="korl-"]) {
  --padding-top: 0; --padding-right: 0; --padding-bottom: 0; --padding-left: 0; --gap: 0; --row-gap: 0; --column-gap: 0;
  --container-max-width: none; --content-width: 100%; padding: 0; max-width: none;
}
.korl-builder .elementor-section .elementor-column-gap-no > .elementor-column > .elementor-widget-wrap { padding: 0; }
.korl-builder .elementor-widget[data-widget_type^="korl-"] { width: 100%; margin: 0; }
.korl-builder .elementor-widget[data-widget_type^="korl-"] > .elementor-widget-container { margin: 0; padding: 0; }

/* ---------- Legal pages ---------- */
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 13px; }
.footer__legal a { text-decoration: underline; text-decoration-color: var(--night-rule); text-underline-offset: 4px; transition: color .25s, text-decoration-color .25s; }
.footer__legal a:hover { color: var(--on-night); text-decoration-color: currentColor; }
/* Placeholders in draft legal text stay visible until replaced with real details. */
.legal-todo { padding: 1px 5px; border-radius: 4px; background: #FEF3C7; color: #78350F; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.legal__review { margin-bottom: 32px; }
