/* Dead Reckoning — shared styles
   Palette and type carried over from the original landing page. */

:root {
  --bg:      #0E0D0A;
  --line:    rgba(245,241,232,0.08);
  --line-2:  rgba(245,241,232,0.16);
  --ink:     #F5F1E8;
  --dim:     rgba(245,241,232,0.92);
  --dimmer:  rgba(245,241,232,0.62);
  --faint:   rgba(245,241,232,0.38);
  --contact: #C97A32;
  --mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans:    'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --gutter:  32px;
  --measure: 1040px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.035) 0%, rgba(0,0,0,0) 62%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--contact); outline-offset: 3px; border-radius: 2px; }
img, video { display: block; max-width: 100%; }

#field {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; display: block;
}

.page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1; }

/* ─── Top bar ─────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 5;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(14,13,10,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 15px; letter-spacing: 0.1em;
  color: var(--dim); text-transform: uppercase;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-right { gap: 28px; }
.topbar .home { text-decoration: none; }
.topbar .home img { height: 22px; width: auto; }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a { text-decoration: none; color: var(--dim); transition: color .2s; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--contact); }
.clockset { display: flex; align-items: center; gap: 10px; }
.clockset .tz-time { color: var(--ink); letter-spacing: 0.04em; }
.clockset .tz-zone { color: var(--dimmer); font-size: 13px; }

/* ─── Bottom bar ──────────────────────────── */
.bottombar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; padding: 0 var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 15px; letter-spacing: 0.1em;
  color: var(--dim); text-transform: uppercase;
}
.bottombar-left { display: flex; align-items: center; gap: 18px; }
.bottombar a { color: var(--dim); text-decoration: none; transition: color .2s; }
.bottombar a:hover { color: var(--ink); }
.bottombar .sep { color: rgba(245,241,232,0.15); }

/* ─── Landing: hero ───────────────────────── */
.hero {
  min-height: calc(100svh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px var(--gutter);
  text-align: center;
}
.hero .logo-wrap { opacity: 0; animation: up 1.6s cubic-bezier(.16,1,.3,1) .2s forwards; }
.hero .logo-wrap img { width: 421px; height: auto; }
.tagline {
  margin-top: 34px;
  font-size: 22px; font-weight: 500; letter-spacing: 0.005em;
  line-height: 1.4; max-width: 48ch;
  opacity: 0;
  animation: clickIn 1.1s cubic-bezier(.34,1.56,.64,1) .75s forwards;
}
.hero .line {
  margin-top: 22px;
  font-size: 16px; color: var(--dimmer); letter-spacing: 0.01em;
  opacity: 0; animation: up 1.2s cubic-bezier(.16,1,.3,1) 1.6s forwards;
}

@keyframes up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes clickIn {
  0%   { opacity: 0; transform: translateY(10px) scale(.94); }
  60%  { opacity: 1; transform: translateY(-3px) scale(1.035); }
  100% { opacity: 1; transform: none; }
}

/* ─── Landing: sections ───────────────────── */
.band { border-top: 1px solid var(--line); }
.band-inner {
  max-width: var(--measure); margin: 0 auto;
  padding: 96px var(--gutter);
  display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 64px;
}
.band h2 {
  font-size: 15px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--dimmer);
  padding-top: 6px;
}
.statement {
  font-size: clamp(26px, 3.4vw, 38px); font-weight: 500;
  line-height: 1.22; letter-spacing: -0.015em;
  max-width: 22ch; margin-bottom: 28px;
}
.band p.body {
  font-family: var(--sans);
  font-size: 18px; line-height: 1.65; color: var(--dim);
  max-width: 60ch;
}
.band p.body + p.body { margin-top: 1em; }

/* what we build — term / description rows */
.rows { border-top: 1px solid var(--line-2); }
.rows > div {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px;
  padding: 26px 0; border-bottom: 1px solid var(--line-2);
}
.rows dt { font-size: 17px; font-weight: 600; }
.rows dd { font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--dim); max-width: 56ch; }

/* where it matters — taxel-marked list */
.jobs { list-style: none; display: grid; gap: 18px; }
.jobs li {
  display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 18px; align-items: baseline;
  font-size: 19px; font-weight: 500;
}
.jobs li::before {
  content: ""; width: 10px; height: 10px; border-radius: 2px;
  background: var(--contact); transform: translateY(-1px);
}
.jobs li span { display: block; margin-top: 4px; font-family: var(--sans); font-weight: 400; font-size: 16px; color: var(--dimmer); }

/* latest research teaser */
.teaser { text-decoration: none; display: block; }
.teaser .t-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; transition: color .2s; }
.teaser:hover .t-title { color: var(--contact); }
.teaser .t-dek { margin-top: 14px; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--dim); max-width: 58ch; }

/* ─── Outcome strips (shared) ─────────────── */
.outcomes { display: grid; gap: 16px; margin: 36px 0 18px; }
.outcome-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: center; gap: 18px; font-size: 14px; }
.outcome-row .who { color: var(--dim); }
.outcome-row .who b { color: var(--ink); font-weight: 600; }
.strip { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 5px; max-width: 520px; }
.strip i, .legend i { display: block; aspect-ratio: 1; border-radius: 2px; }
.ok   { background: var(--contact); }
.fail { box-shadow: inset 0 0 0 1.5px var(--contact); }
.miss { background: rgba(245,241,232,0.12); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; font-size: 13px; color: var(--dimmer); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 11px; }

/* buttons & links */
.cta {
  display: inline-block; margin-top: 32px;
  padding: 14px 22px;
  font: 600 14px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bg); background: var(--ink);
  border-radius: 2px; text-decoration: none;
  transition: background-color .2s;
}
.cta:hover { background: var(--contact); }
.textlink { color: var(--ink); text-decoration: underline; text-decoration-color: var(--contact); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.textlink:hover { color: var(--contact); }

/* ─── Blog index ──────────────────────────── */
.blog-head, .post-head, .post-body, .post-list {
  max-width: 760px; margin-left: auto; margin-right: auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}
.blog-head { padding-top: 96px; padding-bottom: 48px; }
.blog-head h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 600; letter-spacing: -0.02em; }
.blog-head p { margin-top: 14px; font-family: var(--sans); font-size: 18px; color: var(--dimmer); }

.post-list { list-style: none; padding-bottom: 120px; }
.post-list li { border-top: 1px solid var(--line-2); }
.post-list li:last-child { border-bottom: 1px solid var(--line-2); }
.post-list a { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; padding: 30px 0; text-decoration: none; }
.post-list time { font-size: 14px; color: var(--dimmer); padding-top: 5px; }
.post-list .p-title { font-size: 22px; font-weight: 600; line-height: 1.3; transition: color .2s; }
.post-list a:hover .p-title { color: var(--contact); }
.post-list .p-dek { margin-top: 10px; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--dim); }

/* ─── Post ────────────────────────────────── */
.post-head { padding-top: 88px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.post-head .back { font-size: 14px; color: var(--dimmer); text-decoration: none; }
.post-head .back:hover { color: var(--contact); }
.post-head time { display: block; margin-top: 40px; font-size: 14px; color: var(--dimmer); }
.post-head h1 { margin-top: 14px; font-size: clamp(32px, 5vw, 50px); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; max-width: 18ch; }
.post-head .dek { margin-top: 24px; font-family: var(--sans); font-size: 20px; line-height: 1.55; color: var(--dim); max-width: 58ch; }

.post-body { padding-top: 56px; padding-bottom: 120px; }
.post-body h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.005em; margin: 56px 0 16px; }
.post-body h2:first-child { margin-top: 0; }
.post-body p { font-family: var(--sans); font-size: 18px; line-height: 1.72; color: var(--dim); margin-bottom: 1.1em; max-width: 66ch; }
.post-body p strong { color: var(--ink); font-weight: 600; }
.post-body figure { margin: 40px 0; }
.post-body figure img { width: 100%; border-radius: 2px; border: 1px solid var(--line-2); background: rgba(245,241,232,0.04); }
.post-body figcaption { margin-top: 12px; font-size: 13px; line-height: 1.55; color: var(--dimmer); max-width: 64ch; }
.post-body figcaption b { color: var(--ink); font-weight: 600; }

.panes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pane video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; border: 1px solid var(--line-2); background: rgba(245,241,232,0.04); }
.pane .pane-label { margin-top: 10px; font-size: 13px; color: var(--dim); }

.table-scroll { overflow-x: auto; margin-top: 28px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); text-align: right; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
thead th { font-weight: 600; color: var(--ink); border-bottom-color: var(--dimmer); }
td { color: var(--dim); }

.post-cta { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line-2); }
.post-cta p { color: var(--ink); }

/* ─── Long post with contents rail ────────── */
.post-layout {
  max-width: 1080px; margin: 0 auto;
  padding: 56px var(--gutter) 120px;
  display: grid; grid-template-columns: 190px minmax(0, 700px); column-gap: 64px;
}
.post-layout .post-body { max-width: none; margin: 0; padding: 0; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 13px; }
.toc p { margin-bottom: 12px; color: var(--dimmer); }
.toc ul { list-style: none; border-left: 1px solid var(--line-2); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; text-decoration: none; color: var(--dimmer); border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--contact); }
.post-body section { scroll-margin-top: 88px; }
.post-body a:not(.cta) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--contact); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.post-body a:not(.cta):hover { color: var(--contact); }
.post-head .hf { margin-left: 18px; font-size: 14px; color: var(--dimmer); }

/* synced video clips pulled from Hugging Face */
.screen { position: relative; aspect-ratio: 4 / 3; background: rgba(245,241,232,0.04); border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; }
.screen > video { width: 100%; height: 100%; object-fit: cover; border: 0; aspect-ratio: auto; }
.screen .inset { position: absolute; right: 10px; bottom: 10px; width: 26%; height: auto; aspect-ratio: 1; border: 2px solid var(--bg); border-radius: 2px; object-fit: cover; image-rendering: pixelated; }
.notice { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 13px; line-height: 1.5; color: var(--dimmer); }
.pane.unavailable .notice { display: flex; }
.pane.unavailable video { visibility: hidden; }
.post-body .pane-label { display: flex; justify-content: space-between; gap: 12px; }
.post-body .pane-label a { color: var(--dimmer); text-decoration: none; }
.controls { display: flex; align-items: center; gap: 16px; margin-top: 16px; font-size: 13px; color: var(--dimmer); }
.controls button { font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--bg); background: var(--ink); border: 0; border-radius: 2px; padding: 11px 16px; min-width: 84px; cursor: pointer; }
.controls button:hover { background: var(--contact); }
.controls button:disabled { opacity: .35; cursor: default; background: var(--ink); }
.controls input { flex: 1; accent-color: var(--contact); }
.clock { font-variant-numeric: tabular-nums; min-width: 12ch; text-align: right; }

/* ─── Responsive ──────────────────────────── */
@media (max-width: 960px) {
  .post-layout { grid-template-columns: 1fr; padding-top: 40px; }
  .toc { position: static; margin-bottom: 40px; }
}
@media (max-width: 860px) {
  .band-inner { grid-template-columns: 1fr; row-gap: 24px; padding-top: 72px; padding-bottom: 72px; }
  .band h2 { padding-top: 0; }
  .rows > div { grid-template-columns: 1fr; gap: 8px; }
  .outcome-row { grid-template-columns: 1fr; gap: 8px; }
  .clockset .city { display: none; }
}
@media (max-width: 768px) {
  :root { --gutter: 20px; }
  .hero .logo-wrap img { width: 300px; }
  .tagline { font-size: 18px; }
  .topbar { font-size: 13px; }
  .topbar-right { gap: 18px; }
  .topbar nav { gap: 16px; }
  .bottombar { flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; padding: 20px var(--gutter); font-size: 13px; }
  .post-list a { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 480px) {
  .hero .logo-wrap img { width: 240px; }
  .clockset { display: none; }
  .bottombar-left { flex-direction: column; align-items: flex-start; gap: 6px; }
  .bottombar .sep { display: none; }
  .post-body p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .logo-wrap, .tagline, .hero .line { animation: none; opacity: 1; }
}

/* section rhythm in long posts */
.post-body section > h2 { margin-top: 0; }
.post-body section + section { margin-top: 64px; }

/* ─── Backed by ──────────────────────────── */
.backer { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink);
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.backer img { height: 30px; width: auto; opacity: 0.88; transition: opacity .2s; }
.backer:hover img { opacity: 1; }
.backer:hover span { color: var(--contact); }

/* ─── Footer: links grouped on the right ─── */
.bottombar-right { display: flex; align-items: center; gap: 24px; }
@media (max-width: 768px) { .bottombar-right { gap: 18px; } }