/* ─────────────────────────────────────────────
   Cortex Agent — tokens
   ───────────────────────────────────────────── */
:root {
  --bg: #0c0d0b;
  --bg-2: #121410;
  --panel: #15171300;
  --line: #2a2c26;
  --line-2: #3a3c34;
  --ink: #ece6d8;
  --ink-2: #b8b2a3;
  --mute: #7e7a6e;
  --accent: #ff5a1f;
  --accent-ink: #160803;
  --ice: #9fd3d0;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* film grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.dim { color: var(--mute); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }

/* ─────────────────────────────────────────────
   Type
   ───────────────────────────────────────────── */
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.02em; }
h1 {
  font-family: var(--serif);
  font-size: clamp(64px, 11vw, 148px);
  line-height: .86;
  letter-spacing: -0.035em;
}
h1 em { color: var(--accent); }
h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1;
}
h2 em { color: var(--ice); }
h3 { font: 600 18px/1.3 var(--sans); letter-spacing: -0.01em; }

.eyebrow {
  margin: 0 0 22px;
  font: 500 12px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 10px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 90, 31, .6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 90, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); } }

.sub { color: var(--ink-2); max-width: 60ch; margin: 22px 0 0; }
.fine { font: 400 12px/1.5 var(--mono); color: var(--mute); margin-top: 18px; }

/* ─────────────────────────────────────────────
   Nav
   ───────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 15px/1 var(--sans); letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; color: var(--ink); }
.brand-sm .brand-mark { width: 20px; height: 20px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta { color: var(--ink); border: 1px solid var(--line-2); padding: 8px 14px; border-radius: 999px; }
.nav-links .nav-cta:hover { border-color: var(--accent); }

@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ─────────────────────────────────────────────
   Buttons
   ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font: 500 15px/1 var(--sans);
  text-decoration: none;
  border-radius: 999px;
  transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: #ff7440; }
.btn-line { border: 1px solid var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink-2); }

/* ─────────────────────────────────────────────
   Hero
   ───────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 8vw, 110px);
  overflow: hidden;
  isolation: isolate;
}
.topo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 40%, #000 30%, transparent 85%);
          mask-image: radial-gradient(120% 90% at 70% 40%, #000 30%, transparent 85%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 52ch; margin: 32px 0 0; }
.lede strong { color: var(--ink); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────
   Console (hero demo)
   ───────────────────────────────────────────── */
.console {
  margin: 0;
  background: linear-gradient(180deg, rgba(21, 23, 19, .92), rgba(14, 15, 13, .96));
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  font: 400 13px/1.5 var(--mono);
  overflow: hidden;
  min-width: 0;
}
.console-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.console-title { color: var(--ink); white-space: nowrap; }
.console-tabs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.console-tabs button {
  appearance: none; cursor: pointer;
  font: 400 11px/1 var(--mono);
  color: var(--mute);
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 8px;
  border-radius: 999px;
  transition: color .2s, border-color .2s;
}
.console-tabs button:hover { color: var(--ink-2); }
.console-tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--line-2); }

.console-state { padding: 16px 16px 14px; border-bottom: 1px dashed var(--line); }
.k { color: var(--mute); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.state-text { margin: 6px 0 0; color: var(--ink); min-height: 4.5em; }
.state-text .caret { display: inline-block; width: 7px; height: 1.05em; vertical-align: -2px; background: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.console-answers { list-style: none; margin: 0; padding: 6px 16px 10px; min-height: 300px; }
.ans { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .04); opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.ans:last-child { border-bottom: 0; }
.ans.pending { opacity: .45; transform: none; }
.ans.pending > :not(.ans-head), .ans.pending .ans-type { visibility: hidden; }
.ans.in { opacity: 1; transform: none; }
.ans-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ans-q { color: var(--ink-2); }
.ans-q b { color: var(--ink); font-weight: 500; }
.ans-type { color: var(--mute); font-size: 11px; white-space: nowrap; }

.bars { display: grid; gap: 5px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 12px; }
.bar-track { position: relative; height: 20px; background: rgba(255, 255, 255, .03); border-radius: 2px; overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--line-2); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.bar.win .bar-fill { background: var(--accent); }
.bar-label { position: relative; z-index: 1; padding: 0 8px; line-height: 20px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bar.win .bar-label { color: var(--ink); font-weight: 500; }
.ans.in .bar.win .bar-label { color: var(--accent-ink); transition: color .3s .35s; }
.bar-pct { text-align: right; color: var(--mute); font-variant-numeric: tabular-nums; }
.bar.win .bar-pct { color: var(--ink); }

.score { position: relative; height: 28px; margin-top: 4px; }
.score-track { position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: var(--line-2); }
.score-band { position: absolute; top: 8px; height: 12px; background: rgba(159, 211, 208, .18); border: 1px solid rgba(159, 211, 208, .5); border-radius: 2px; transition: left .9s, width .9s; }
.score-dot { position: absolute; top: 6px; width: 3px; height: 16px; background: var(--ice); transform: translateX(-1px); transition: left .9s cubic-bezier(.2, .8, .2, 1); }
.score-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); margin-top: 2px; }
.score-val { color: var(--ice); }

.abstain {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 3px;
  color: var(--ink-2);
  background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(255, 255, 255, .025) 6px 12px);
}
.abstain b { color: var(--ink); font-weight: 500; }

@media (max-width: 520px) {
  .console-bar { flex-direction: column; align-items: flex-start; }
  .console-tabs { justify-content: flex-start; margin-left: -8px; }
}

.console-foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-2);
}

/* ─────────────────────────────────────────────
   Marquee strip
   ───────────────────────────────────────────── */
.strip { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; background: var(--bg-2); }
.strip-track { display: flex; gap: 48px; width: max-content; animation: marquee 50s linear infinite; }
.strip-track span { font-family: var(--serif); font-size: 26px; font-style: italic; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 48px; }
.strip-track span::after { content: "✶"; font-style: normal; font-size: 14px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ─────────────────────────────────────────────
   Sections
   ───────────────────────────────────────────── */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 780px; }

/* Contract */
.contract {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0;
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.contract-col { min-width: 0; background: var(--bg-2); }
.code-label { display: flex; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); font: 400 12px/1 var(--mono); color: var(--ink-2); }
.code { margin: 0; padding: 20px 18px; font: 400 13px/1.65 var(--mono); color: var(--ink-2); overflow-x: auto; }
.t-k { color: var(--ink); }
.t-s { color: #d9b77e; }
.t-n { color: var(--ice); }
.t-z { color: var(--accent); }
.contract-arrow {
  display: grid; place-items: center;
  width: 84px;
  border-inline: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), var(--accent) calc(50% - .5px), var(--accent) calc(50% + .5px), transparent calc(50% + .5px));
}
.contract-arrow span {
  background: var(--bg); padding: 10px 0;
  font: 500 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .1em; text-align: center; color: var(--accent);
}
@media (max-width: 860px) {
  .contract { grid-template-columns: 1fr; }
  .contract-arrow { width: auto; height: 56px; border-inline: 0; border-block: 1px solid var(--line);
    background: linear-gradient(180deg, transparent 0 0), linear-gradient(0deg, transparent calc(50% - .5px), var(--accent) calc(50% - .5px), var(--accent) calc(50% + .5px), transparent calc(50% + .5px)); }
  .contract-arrow span { padding: 0 12px; }
  .contract-arrow span br { display: none; }
}

/* Properties */
.props {
  list-style: none; margin: 72px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.props li { padding: 32px 28px 36px 0; border-bottom: 1px solid var(--line); position: relative; }
.props li:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.prop-n { display: block; font: italic 400 30px/1 var(--serif); color: var(--accent); margin-bottom: 18px; }
.props p { color: var(--ink-2); margin: 10px 0 0; font-size: 15.5px; }
@media (max-width: 860px) {
  .props { grid-template-columns: 1fr 1fr; }
  .props li, .props li:not(:nth-child(3n+1)) { padding: 28px 20px 30px 0; border-left: 0; }
  .props li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .props { grid-template-columns: 1fr; }
  .props li:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* ─────────────────────────────────────────────
   Gate simulator
   ───────────────────────────────────────────── */
.gate-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (max-width: 960px) { .gate-grid { grid-template-columns: 1fr; } }
.gate { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 24px; }
.gate-field {
  position: relative;
  height: 280px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.gate-field .zone { position: absolute; top: 0; font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.gate-field .zone-esc { left: 0; color: var(--mute); }
.gate-field .zone-auto { right: 0; color: var(--accent); }
.gate-field .line {
  position: absolute; top: 22px; bottom: 0; width: 0;
  border-left: 1px dashed var(--accent);
  transition: left .15s;
}
.gate-field .axis { position: absolute; bottom: -20px; font: 400 10px/1 var(--mono); color: var(--mute); transform: translateX(-50%); }
.dot {
  position: absolute;
  width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%, 50%);
  transition: background .25s, box-shadow .25s, border-color .25s;
  background: transparent;
  border: 1.5px solid var(--line-2);
}
.dot.auto { background: var(--accent); border-color: var(--accent); }
.dot.auto.wrong { background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, .18); }
.dot.esc.wrong { border-color: var(--mute); }

.gate-control { display: block; margin-top: 34px; }
.gate-label { display: flex; justify-content: space-between; font: 400 12px/1 var(--mono); color: var(--ink-2); margin-bottom: 14px; letter-spacing: .04em; }
.gate-val { color: var(--accent); }
.gate-range { width: 100%; appearance: none; -webkit-appearance: none; background: transparent; height: 22px; cursor: pointer; }
.gate-range::-webkit-slider-runnable-track { height: 2px; background: var(--line-2); }
.gate-range::-moz-range-track { height: 2px; background: var(--line-2); }
.gate-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); margin-top: -8px; border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }
.gate-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }

.gate-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; }
.gate-stats div { border-top: 1px solid var(--line); padding-top: 12px; }
.gate-stats dt { font: 400 11px/1.3 var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.gate-stats dd { margin: 8px 0 0; font: 400 40px/1 var(--serif); font-variant-numeric: tabular-nums; }
.gate-stats .s-auto { color: var(--accent); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font: 400 11px/1 var(--mono); color: var(--mute); margin-top: 16px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1.5px solid var(--line-2); }
.legend .l-auto { background: var(--accent); border-color: var(--accent); }
.legend .l-wrong { border-color: var(--accent); }

/* ─────────────────────────────────────────────
   Services
   ───────────────────────────────────────────── */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 64px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.svc { background: var(--bg); padding: clamp(28px, 4vw, 44px); position: relative; transition: background .3s; }
.svc:hover { background: var(--bg-2); }
.svc::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--accent); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.svc:hover::before { width: 100%; }
.svc-tag { display: inline-block; font: 400 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ice); margin-bottom: 40px; }
.svc h3 { font: 400 30px/1.1 var(--serif); letter-spacing: -0.015em; }
.svc p { color: var(--ink-2); margin: 14px 0 0; max-width: 46ch; }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } }

/* ─────────────────────────────────────────────
   Contact
   ───────────────────────────────────────────── */
.contact { border-top: 1px solid var(--line); background:
  radial-gradient(60% 80% at 100% 100%, rgba(255, 90, 31, .10), transparent 70%), var(--bg); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: end; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-actions { display: grid; border-top: 1px solid var(--line-2); }
.contact-card {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line-2);
  text-decoration: none;
  transition: padding .3s, color .3s;
}
.contact-card:hover { padding-left: 14px; }
.contact-card:hover .cc-arrow { color: var(--accent); transform: translateX(4px); }
.cc-k { font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
.cc-v { font: 400 24px/1.15 var(--serif); }
.cc-arrow { font-size: 20px; transition: transform .3s, color .3s; color: var(--ink-2); }
@media (max-width: 480px) { .contact-card { grid-template-columns: minmax(0, 1fr) auto; } .cc-k { grid-column: 1 / -1; } }

/* ─────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ─────────────────────────────────────────────
   Reveal + motion
   ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

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

/* ─────────────────────────────────────────────
   Contact form
   ───────────────────────────────────────────── */
.contact-grid { align-items: start; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contact-form { display: grid; gap: 18px; }
.kind { border: 0; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kind label { cursor: pointer; }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind span {
  display: inline-block; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink-2);
  font: 400 13px/1 var(--mono); transition: border-color .2s, color .2s, background .2s;
}
.kind label:hover span { color: var(--ink); }
.kind input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kind input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field > span { font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.field > span i { font-style: normal; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.field input, .field textarea {
  width: 100%;
  font: 400 16px/1.4 var(--sans);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  padding: 8px 0 10px;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field-err { font: 400 12px/1.3 var(--mono); color: var(--accent); }
.field-err:empty { display: none; }
.has-err input, .has-err textarea { border-bottom-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form-foot .btn { border: 0; cursor: pointer; }
.form-foot .btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.form-msg { margin: 0; font: 400 13px/1.4 var(--mono); color: var(--ink-2); }
.form-msg.is-err { color: var(--accent); }

.form-done {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 28px;
  background: linear-gradient(180deg, rgba(255, 90, 31, .08), transparent);
}
.form-done-title { font: 400 34px/1.1 var(--serif); margin: 10px 0 8px; }
.form-done .dim { font: 400 12px/1 var(--mono); margin: 0; }
.contact-alt { margin: 22px 0 0; font-size: 14px; }
.contact-alt a { color: var(--ink-2); }
.contact-alt a:hover { color: var(--ink); }

/* 404 */
.nf { min-height: calc(100vh - 140px); display: grid; place-items: center; text-align: center; padding: 60px 16px; }
.nf h1 { font-size: clamp(56px, 10vw, 120px); }
.nf .eyebrow { justify-content: center; }
.nf .abstain { display: inline-flex; gap: 14px; margin: 28px auto 32px; font: 400 13px/1.5 var(--mono); }

/* ─────────────────────────────────────────────
   Blog
   ───────────────────────────────────────────── */
.page-title { font-family: var(--serif); font-size: clamp(48px, 7vw, 92px); line-height: .95; letter-spacing: -0.03em; }
.page-title em { color: var(--accent); }
.blog-empty { margin-top: 48px; }
.post-list { list-style: none; margin: 56px 0 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 28px 0; text-decoration: none; transition: padding .3s; }
.post-list a:hover { padding-left: 10px; }
.post-list a:hover .post-list-title { color: var(--accent); }
.post-list time, .post-list-meta { font: 400 12px/1.4 var(--mono); color: var(--mute); white-space: nowrap; }
.post-list-body { display: grid; gap: 8px; }
.post-list-title { font: 400 clamp(26px, 3vw, 34px)/1.1 var(--serif); letter-spacing: -0.01em; transition: color .2s; }
.post-list-sum { color: var(--ink-2); max-width: 70ch; }
@media (max-width: 640px) {
  .post-list a { grid-template-columns: 1fr; gap: 8px; }
  .post-list-meta { display: none; }
}

.preview-bar { background: var(--accent); color: var(--accent-ink); text-align: center; padding: 8px 16px; font: 500 12px/1.4 var(--mono); }
.preview-bar a { color: inherit; }

.article > .wrap { max-width: 860px; }
.article-head { padding-top: clamp(56px, 8vw, 104px); }
.article-head .eyebrow a { text-decoration: none; color: var(--ink-2); }
.article-head .eyebrow a:hover { color: var(--accent); }
.article-title { font-family: var(--serif); font-size: clamp(42px, 6vw, 76px); line-height: 1; letter-spacing: -0.025em; }
.article-dek { font-size: clamp(18px, 1.8vw, 21px); color: var(--ink-2); margin: 24px 0 0; max-width: 60ch; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 24px 0 0; }
.tags li { font: 400 11px/1 var(--mono); color: var(--ice); border: 1px solid rgba(159, 211, 208, .35); padding: 5px 9px; border-radius: 999px; }
.article-foot { display: flex; gap: 12px; flex-wrap: wrap; padding-bottom: clamp(80px, 10vw, 140px); margin-top: 56px; }

.prose { max-width: 720px; margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); font-size: 18px; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.2em; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin-bottom: 0; }
.prose h2 { font: 400 clamp(30px, 3.4vw, 38px)/1.15 var(--serif); letter-spacing: -0.015em; margin-top: 2em; }
.prose h3 { font: 600 20px/1.35 var(--sans); margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin-left: 0; padding-left: 20px; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 1.3em; line-height: 1.4; color: var(--ink-2); }
.prose code { font: 400 .86em/1 var(--mono); background: rgba(255, 255, 255, .06); padding: .15em .4em; border-radius: 3px; }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; font-size: inherit; line-height: inherit; }
.prose img { max-width: 100%; height: auto; border-radius: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { font: 400 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }

/* Latest writing on the home page */
.latest { margin-top: 56px; }
.latest-more { margin: 32px 0 0; }

/* ─────────────────────────────────────────────
   Hero secondary links, results
   ───────────────────────────────────────────── */
.cta-sub { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; font-size: 14px; color: var(--mute); }
.cta-sub a { color: var(--ink-2); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.cta-sub a:hover { color: var(--ink); text-decoration-color: var(--accent); }
.props p a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }

.results-wrap { margin-top: 56px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.results { width: 100%; min-width: 640px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.results th, .results td { padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.results tbody tr:last-child th, .results tbody tr:last-child td { border-bottom: 0; }
.results thead th { font: 500 13px/1.3 var(--sans); color: var(--ink); vertical-align: bottom; }
.results thead th a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.results tbody th { font: 400 15px/1.4 var(--sans); color: var(--ink-2); width: 34%; }
.results td { font: 400 17px/1.3 var(--mono); color: var(--ink-2); white-space: nowrap; }
.results td strong { color: var(--ink); font-weight: 500; }
.results .is-kodiak { background: rgba(255, 90, 31, .05); }
.results thead .is-kodiak { box-shadow: inset 0 2px 0 var(--accent); }
.th-note { display: block; font: 400 11px/1.4 var(--mono); color: var(--mute); margin-top: 3px; text-transform: none; }
.method { margin: 16px 0 0; max-width: 80ch; font: 400 12.5px/1.6 var(--mono); color: var(--mute); }

.results-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); margin-top: 56px; }
@media (max-width: 860px) { .results-foot { grid-template-columns: 1fr; } }
.mini-h { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ice); margin-bottom: 18px; }
.new-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.new-list li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); color: var(--ink-2); position: relative; }
.new-list li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.limits { border: 1px dashed var(--line-2); border-radius: 8px; padding: 22px 24px; align-self: start;
  background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(255, 255, 255, .015) 8px 16px); }
.limits p { margin: 0; color: var(--ink-2); }
.limits a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.limits .small-print { margin-top: 14px; font-size: 13px; }
