/* PROBNAYA — shared stylesheet
   Tokens and layout are ported directly from the approved design. */

:root {
  --ink: #16181C;
  --paper: #EFF0F2;
  --blue: #2233CC;
  --mid: #767B84;
  --faint: #A7ABB3;
  --faint-line: #C7CAD0;
  --border: #D2D5DA;
  --hover-bg: #E7E9EC;
  --body-text: #3B3E45;

  --sans: 'Archivo', Helvetica, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;

  --header-h: 52px;
  --header-h-mobile: 46px;
  --bottom-nav-h: 54px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--paper); }

body {
  -webkit-font-smoothing: antialiased;
  font-family: var(--sans);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--blue); color: var(--paper); }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--blue); }

input, textarea, button { font-family: inherit; }
input, textarea { outline: none; }

p { text-wrap: pretty; }

/* ---------- desktop header ---------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 0 28px; height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(239, 240, 242, 0.94);
  backdrop-filter: blur(6px);
}

.site-header .brand-group { display: flex; align-items: center; gap: 18px; }

.brand-mark { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.brand-mark svg { display: block; flex-shrink: 0; }
.brand-name { font-weight: 600; font-size: 14px; letter-spacing: 0.06em; }

.brand-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--mid);
  cursor: help; border-bottom: 1px dotted var(--faint); padding-bottom: 2px;
}
.brand-tag:hover { color: var(--blue); border-bottom-color: var(--blue); }

.nav-right { display: flex; align-items: center; gap: 24px; }

.nav-link { cursor: pointer; display: flex; align-items: center; gap: 8px; }
.nav-link span.label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; white-space: nowrap;
}
.nav-dot { width: 5px; height: 5px; background: var(--blue); display: block; flex-shrink: 0; }

.nav-cta {
  cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--blue); border: 1px solid var(--blue); padding: 7px 14px;
  white-space: nowrap; flex-shrink: 0; background: none;
}
.nav-cta:hover { background: var(--blue); color: var(--paper); }

/* ---------- mobile header + bottom nav ---------- */

.mobile-header {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  align-items: center; justify-content: space-between;
  padding: 0 18px; height: var(--header-h-mobile);
  border-bottom: 1px solid var(--border);
  background: rgba(239, 240, 242, 0.94);
  backdrop-filter: blur(6px);
}
.mobile-header .brand-name { font-size: 13px; letter-spacing: 0.07em; cursor: pointer; }
.mobile-header .crumb { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: var(--faint); }

.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--ink);
  background: rgba(239, 240, 242, 0.96);
  backdrop-filter: blur(6px);
}
.bottom-nav a {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--bottom-nav-h);
  border-right: 1px solid var(--border);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em;
  color: var(--ink);
}
.bottom-nav a:last-child { border-right: none; background: var(--ink); color: var(--paper); }
.bottom-nav a:last-child:hover { color: var(--paper); }
.bottom-nav .nav-dot { width: 5px; height: 5px; background: var(--blue); display: block; }

/* ---------- layout shell ---------- */

.main { flex: 1; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 28px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.site-footer a, .site-footer span.stamp {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint);
}
.site-footer a:hover { color: var(--blue); }

.page {
  max-width: 1120px; margin: 0 auto; padding: 100px 40px 120px;
}

.eyebrow-row {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--ink); padding-bottom: 12px;
}
.eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--mid);
}
.eyebrow-meta {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--faint);
}

.back-link {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--mid); cursor: pointer;
}
.back-link:hover { color: var(--blue); }

/* ---------- figure captions ---------- */

.figure { display: flex; flex-direction: column; gap: 10px; }
.figure-plate {
  position: relative; border: 1px solid var(--ink); background: var(--paper); overflow: hidden;
}
.figure-plate canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.figure-caption {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
}
.figure-caption .dim { color: var(--mid); }
.figure-caption .note { color: var(--faint); }

/* ---------- index / hero ---------- */

.hero {
  position: relative; height: 100vh; overflow: hidden; cursor: crosshair; background: var(--paper);
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero-ruler-top {
  position: absolute; top: var(--header-h); left: 0; right: 0; height: 12px;
  background: repeating-linear-gradient(90deg, var(--border) 0px, var(--border) 1px, transparent 1px, transparent 12px);
  border-bottom: 1px solid var(--border);
  pointer-events: none;
}
.hero-ruler-left {
  position: absolute; top: var(--header-h); bottom: 0; left: 0; width: 12px;
  background: repeating-linear-gradient(180deg, var(--border) 0px, var(--border) 1px, transparent 1px, transparent 12px);
  border-right: 1px solid var(--border);
  pointer-events: none;
}

.hero-crosshair-h, .hero-crosshair-v {
  position: absolute; pointer-events: none; will-change: transform;
  background: rgba(34, 51, 204, 0.45);
}
.hero-crosshair-h { left: 0; right: 0; top: 0; height: 1px; }
.hero-crosshair-v { top: 0; bottom: 0; left: 0; width: 1px; }

.hero-readout {
  position: absolute; top: 0; left: 0; pointer-events: none; will-change: transform;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--blue); white-space: pre;
}

.hero-pen {
  position: absolute; top: -4px; left: -4px; width: 7px; height: 7px;
  border: 1px solid var(--blue); background: var(--paper); pointer-events: none; will-change: transform;
}

.hero-title {
  position: absolute; left: 40px; bottom: 44px;
  display: flex; flex-direction: column; gap: 18px; pointer-events: none;
}
.hero-title h1 {
  margin: 0; font-weight: 600; font-size: clamp(58px, 9vw, 138px); line-height: 0.92; letter-spacing: -0.03em;
}
.wordmark-dash {
  display: inline-block; width: 0.34em; height: 0.062em; background: var(--ink);
  vertical-align: 0.312em; margin-left: 0.04em;
}
.hero-tagline { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.hero-tagline span.word { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; }
.hero-tagline span.dot { color: var(--faint); }

.hero-note {
  position: absolute; right: 28px; bottom: 44px; text-align: right;
  display: flex; flex-direction: column; gap: 6px; pointer-events: none;
}
.hero-note span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; }
.hero-note span:first-child { color: var(--mid); }
.hero-note span:last-child { color: var(--faint); }
.hero-note.mobile-fig { display: none; }

.index-list { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.index-row {
  display: grid; grid-template-columns: 120px 1fr 150px; gap: 28px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.index-row:hover { background: var(--hover-bg); }
.index-row .id { font-weight: 500; font-size: 26px; }
.index-row .desc { font-weight: 300; font-size: 17px; color: var(--body-text); }
.index-row .status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-align: right; }
.status-operational { color: var(--blue); }
.status-observation { color: var(--mid); }

.index-foot {
  display: flex; justify-content: space-between; align-items: baseline; padding: 26px 0 90px 0;
}
.index-foot .count {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); cursor: pointer;
}
.index-foot .count:hover { color: var(--blue); }
.index-foot .cta {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--blue); cursor: pointer;
  border-bottom: 1px solid var(--blue); padding-bottom: 3px;
}

/* ---------- generic two-column detail layout ---------- */

.split {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; padding-top: 40px; align-items: start;
}
.split.reverse { grid-template-columns: 0.9fr 1.1fr; }
.split-title {
  display: flex; align-items: flex-end; justify-content: space-between;
  border-bottom: 1px solid var(--ink); padding: 26px 0 14px 0;
}
.split-title .num {
  font-weight: 500; font-size: clamp(56px, 8vw, 104px); letter-spacing: -0.03em; line-height: 0.9;
}
.split-title .status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; }

.attr-line {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--faint);
}
.attr-line--detail { display: block; padding-top: 12px; }

.lede { margin: 0; font-weight: 300; font-size: 21px; line-height: 1.4; color: var(--ink); text-wrap: pretty; }
.body-copy { margin: 0; font-weight: 300; font-size: 16px; line-height: 1.6; color: var(--body-text); text-wrap: pretty; }

.specs {
  display: grid; grid-template-columns: 110px 1fr; gap: 9px 20px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  border-top: 1px solid var(--border); padding-top: 16px; line-height: 1.7;
}
.specs dt { color: var(--faint); grid-column: 1; }
.specs dd { margin: 0; grid-column: 2; }
.specs .accent { color: var(--blue); }

.action-link {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--blue); cursor: pointer;
  align-self: flex-start; border-bottom: 1px solid var(--blue); padding-bottom: 3px; display: inline-block;
}

/* ---------- instruments overview ---------- */

.instrument-block { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 44px 0 0 0; align-items: start; }
.instrument-block + .instrument-block { padding-top: 76px; }
.instrument-copy { display: flex; flex-direction: column; gap: 18px; }
.instrument-copy .head { display: flex; align-items: baseline; justify-content: space-between; }
.instrument-copy .head .num { font-weight: 500; font-size: 52px; letter-spacing: -0.02em; line-height: 1; }
.instrument-copy .head .status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; }

.bench-note {
  margin-top: 76px; border: 1px dashed var(--faint); padding: 22px 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
}
.bench-note .label { color: var(--mid); }
.bench-note .value { color: var(--faint); }

/* ---------- investigations ---------- */

.register-plate { position: relative; height: 132px; margin-top: 26px; border-bottom: 1px solid var(--border); }
.register-plate canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.register-axis { display: flex; justify-content: space-between; padding-top: 8px; }
.register-axis span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; }
.register-axis span:first-child, .register-axis span:last-child { color: var(--faint); }
.register-axis span:nth-child(2) { color: var(--mid); }

.record-list { margin-top: 44px; }
.record-row {
  display: grid; grid-template-columns: 82px 1fr 150px; gap: 24px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.record-row:hover { background: var(--hover-bg); }
.record-row .rid { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); }
.record-row .title { font-weight: 300; font-size: 22px; }
.record-row .redacted { display: block; height: 15px; width: 56%; background: var(--ink); }
.record-row .status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--mid); text-align: right; }

.list-note { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); margin: 18px 0 0 0; }

/* ---------- record detail ---------- */

.record-sealed {
  margin-top: 40px; border: 1px solid var(--ink); padding: 40px;
  display: flex; flex-direction: column; gap: 18px; align-items: flex-start;
}
.record-sealed .redacted { display: block; height: 22px; width: 52%; background: var(--ink); }
.record-sealed p { margin: 0; font-weight: 300; font-size: 19px; line-height: 1.5; color: var(--body-text); max-width: 46ch; text-wrap: pretty; }

.record-open { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; padding-top: 40px; align-items: start; }
.record-open h2 { margin: 0; font-weight: 300; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; letter-spacing: -0.015em; text-wrap: pretty; }

/* ---------- lab ---------- */

.lab-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; padding-top: 44px; align-items: start; }
.lab-copy { display: flex; flex-direction: column; gap: 28px; }
.lab-copy > p.intro { margin: 0; font-weight: 300; font-size: 15px; line-height: 1.65; color: var(--body-text); max-width: 52ch; text-wrap: pretty; }
.lab-copy .thesis { margin: 0; font-weight: 300; font-size: 19px; line-height: 1.45; color: var(--ink); max-width: 36ch; text-wrap: pretty; }

.working-with { border-top: 1px solid var(--border); padding-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.working-with .label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--mid); }
.working-with .row {
  display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; cursor: pointer;
}
.working-with .row:not(:last-child) { border-bottom: 1px solid var(--border); }
.working-with .row:hover { background: var(--hover-bg); }
.working-with .row span.name { font-weight: 300; font-size: 17px; }
.working-with .row span.chan { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--blue); }

/* ---------- intake ---------- */

.intake-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 60px; padding-top: 44px; align-items: start; }
.intake-copy { display: flex; flex-direction: column; gap: 22px; }

.channel-toggle { display: flex; border: 1px solid var(--ink); }
.channel-toggle button {
  flex: 1; padding: 13px 14px; cursor: pointer; background: none; border: none;
  border-right: 1px solid var(--ink);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--faint); white-space: nowrap;
}
.channel-toggle button:last-child { border-right: none; }
.channel-toggle button.active { color: var(--blue); }

.channel-panel h2 { margin: 24px 0 0 0; font-weight: 300; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -0.015em; text-wrap: pretty; }
.channel-panel p { margin: 12px 0 0 0; font-weight: 300; font-size: 16px; line-height: 1.55; color: var(--body-text); max-width: 40ch; text-wrap: pretty; }
.channel-panel .specs { margin-top: 16px; }
.channel-panel[hidden] { display: none; }

.seismo-plate { position: relative; height: 120px; border: 1px solid var(--ink); background: var(--paper); overflow: hidden; }
.seismo-plate canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.seismo-caption { display: flex; justify-content: space-between; padding-bottom: 14px; }
.seismo-caption span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; }
.seismo-caption span:first-child { color: var(--mid); }
.seismo-caption span:last-child { color: var(--faint); }

.intake-form { display: flex; flex-direction: column; border: 1px solid var(--ink); }
.intake-form[hidden] { display: none; }
.intake-form input, .intake-form textarea {
  border: none; background: transparent; padding: 16px 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink);
}
.intake-form input { border-bottom: 1px solid var(--border); }
.intake-form textarea { resize: vertical; line-height: 1.8; }
.intake-form textarea[hidden] { display: none; }
.intake-form button {
  border: none; border-top: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 16px 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  cursor: pointer; text-align: left;
}
.intake-form button:hover { background: var(--blue); }
.intake-form button:disabled { opacity: 0.5; cursor: default; background: transparent; }

.intake-error { border: 1px solid var(--ink); padding: 14px 18px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--mid); }
.intake-error[hidden] { display: none; }

.intake-receipt { border: 1px solid var(--blue); padding: 30px; display: flex; flex-direction: column; gap: 10px; }
.intake-receipt[hidden] { display: none; }
.intake-receipt .stamp { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--blue); }
.intake-receipt .line { font-weight: 300; font-size: 22px; }
.intake-receipt .note { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); }

/* ============================================================
   MOBILE — structural changes from the approved design: simplified
   top bar, fixed bottom tab bar, stacked single-column content.
   ============================================================ */

@media (max-width: 760px) {
  .site-header, .site-footer { display: none; }
  .mobile-header { display: flex; }
  .bottom-nav.has-tabs { display: grid; }

  .main { padding-top: var(--header-h-mobile); padding-bottom: var(--bottom-nav-h); }

  .page { padding: 26px 18px 40px; }
  .page.detail { padding: 22px 18px 40px; }

  .hero { height: calc(100vh - 100px); }
  .hero-ruler-top { display: none; }
  .hero-ruler-left {
    top: 0; width: 10px;
    background: repeating-linear-gradient(180deg, var(--border) 0px, var(--border) 1px, transparent 1px, transparent 14px);
  }
  .hero-title { left: 22px; right: 18px; bottom: 26px; gap: 16px; }
  .hero-title h1 { font-size: 17vw; }
  .hero-note { display: none; }
  .hero-note.mobile-fig { display: flex; right: 16px; top: 14px; bottom: auto; left: auto; }
  .hero-crosshair-h, .hero-crosshair-v, .hero-readout { display: none; }

  /* Mobile index screen is the hero alone — 0x2F/057/investigations are one
     tap away via the bottom tab bar, matching the approved mobile composition. */
  .index-list { display: none; }

  .instrument-block, .split, .lab-grid, .intake-grid, .record-open { grid-template-columns: 1fr; gap: 18px; }
  .instrument-block + .instrument-block { padding-top: 30px; }
  .split-title .num { font-size: 48px; }

  .specs { grid-template-columns: 90px 1fr; }

  .register-plate { height: 150px; }
  .record-row { grid-template-columns: 1fr; gap: 10px; }
  .record-row .status { text-align: left; }
}
