/* Nanonetes — instrument-panel design
   Page surface = light instrument grey. The only colours that ever
   appear are the four Stroop stimulus inks, used only where they mean
   something (stimuli, response keys, trial data). */

:root {
  --paper: #ECECE8;
  --panel: #7C7C78;
  --panel-deep: #6E6E6A;
  --ink: #1D1D1B;
  --soft: #57574F;
  --rule: #C8C8C0;
  --white: #F5F5F1;
  --stim-red: #C6392E;
  --stim-green: #237A46;
  --stim-blue: #2D5DA8;
  --stim-yellow: #D99C15;
  --sans: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

.wrap, .site-head, .site-foot > span:first-child { max-width: 1120px; }

main > section, .site-head, .site-foot {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.panel :focus-visible { outline-color: var(--white); }

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

.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 26px;
  padding-bottom: 22px;
}

.wordmark {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav { display: flex; gap: 30px; }
.site-nav a {
  color: var(--soft);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

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

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
  padding-top: 44px;
  padding-bottom: 96px;
}

h1 {
  font-size: clamp(48px, 7.2vw, 84px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}

.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--soft);
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 5px;
  border: 1px solid var(--ink);
  transition: background-color 140ms ease, color 140ms ease;
}
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: #000; }
.btn.ghost { color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

.fineprint { font-size: 13.5px; color: var(--soft); max-width: 44ch; }

/* ---------- the instrument panel ---------- */

.panel {
  background: var(--panel);
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.25) inset,
    0 18px 44px -20px rgba(29,29,27,.45);
  color: var(--white);
  display: flex;
  flex-direction: column;
  user-select: none;
}

.panel-chrome {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(245,245,241,.16);
  font-family: var(--mono);
  font-size: 12.5px;
  color: rgba(245,245,241,.75);
}

.panel-stage {
  min-height: 318px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px 20px;
}

.state-idle .stage-note,
.state-summary .stage-note {
  font-size: 16.5px;
  line-height: 1.5;
  color: rgba(245,245,241,.92);
  margin-bottom: 22px;
}
.state-idle strong { color: var(--white); }

.stage-hint {
  font-size: 13px;
  color: rgba(245,245,241,.62);
  margin-top: 16px;
}

kbd {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid rgba(245,245,241,.35);
  border-radius: 4px;
  padding: 1px 6px;
  color: rgba(245,245,241,.8);
}

.pbtn {
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(245,245,241,.65);
  border-radius: 6px;
  padding: 11px 26px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.pbtn:hover { background: var(--white); color: var(--panel-deep); }

.fixation {
  font-size: 52px;
  font-weight: 400;
  color: rgba(245,245,241,.9);
  line-height: 1;
}

.stimulus {
  font-size: clamp(44px, 5.6vw, 62px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.ink-red    { color: var(--stim-red); }
.ink-green  { color: var(--stim-green); }
.ink-blue   { color: var(--stim-blue); }
.ink-yellow { color: var(--stim-yellow); }

.state-summary .cost {
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 20px;
}

.summary-rows {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px 34px;
  justify-content: center;
  margin-bottom: 8px;
}
.summary-rows dt { font-size: 12.5px; color: rgba(245,245,241,.6); }
.summary-rows dd { font-family: var(--mono); font-size: 15.5px; color: var(--white); }

.panel-readout {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  padding: 14px 20px;
  border-top: 1px solid rgba(245,245,241,.16);
}

.readout { display: flex; flex-direction: column; gap: 2px; min-width: 74px; }
.ro-label { font-size: 11.5px; color: rgba(245,245,241,.55); }
.ro-value { font-family: var(--mono); font-size: 21px; color: var(--white); }

.spark {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 34px;
}
.spark i {
  flex: 1;
  height: 3px;
  min-width: 2px;
  background: rgba(245,245,241,.16);
  border-radius: 1px;
  transition: height 120ms ease;
}
.spark i.miss { height: 100%; background: transparent; border: 1px solid rgba(245,245,241,.45); }

.panel-responses {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 20px 20px;
  border-top: 1px solid rgba(245,245,241,.16);
}

.rbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(245,245,241,.5);
  border-radius: 6px;
  padding: 10px 6px;
  cursor: pointer;
  transition: background-color 120ms ease, opacity 120ms ease;
}
.rbtn:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.rbtn:disabled { opacity: 0.35; cursor: default; }
.rbtn i { width: 11px; height: 11px; border-radius: 2.5px; flex: none; }

/* ---------- sections ---------- */

.prose-section, .battery-section, .network-section, .contact-section {
  border-top: 1px solid var(--rule);
  padding-top: 76px;
  padding-bottom: 88px;
}

h2 {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 34px;
}

.promises, .ways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}

.promise h3, .way h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
}
.promise p, .way p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--soft);
  max-width: 34ch;
}

/* ---------- battery table ---------- */

.battery-head p {
  color: var(--soft);
  max-width: 62ch;
  margin: -10px 0 36px;
}

.battery-section { overflow-x: auto; }

.battery-table { border-collapse: collapse; min-width: 680px; }
.battery-table th, .battery-table td {
  text-align: left;
  padding: 11px 40px 11px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}
.battery-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
  border-bottom: 1px solid var(--ink);
  padding-top: 0;
}
.battery-table td:first-child { font-weight: 500; font-size: 16px; white-space: nowrap; }
.battery-table td { font-size: 15.5px; color: var(--soft); }
.battery-table td:last-child { font-size: 14.5px; white-space: nowrap; }
.battery-table tr.group th {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid #A9A9A0;
  padding-top: 30px;
}
.battery-table a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.battery-foot {
  margin-top: 30px;
  font-size: 15px;
  color: var(--soft);
  max-width: 70ch;
}

/* ---------- network roster ---------- */

.network-head p { color: var(--soft); max-width: 62ch; margin: -10px 0 36px; }
.network-head em { font-style: italic; }

.roster {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
}
.roster li { border-bottom: 1px solid var(--rule); }
.roster a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  padding: 13px 0;
}
.r-top { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; }
.r-name { font-size: 16.5px; font-weight: 600; }
.roster a:hover .r-name { text-decoration: underline; text-underline-offset: 3px; }
.r-url { font-family: var(--mono); font-size: 12.5px; color: var(--soft); white-space: nowrap; }
.r-sub { font-size: 14px; color: var(--soft); margin-top: 1px; }

/* ---------- contact & footer ---------- */

.contact-section .btn { margin-top: 42px; }

.site-foot {
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 26px;
  padding-bottom: 44px;
  font-size: 13.5px;
  color: var(--soft);
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-bottom: 72px; }
  .panel { max-width: 540px; }
  .promises, .ways { grid-template-columns: 1fr; gap: 34px; }
  .roster { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  main > section, .site-head, .site-foot { padding-left: 20px; padding-right: 20px; }
  .site-nav { gap: 18px; }
  .panel-responses { grid-template-columns: 1fr 1fr; }
  .summary-rows { gap: 8px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
