:root {
  --body-blue: #07101f;
  --body-panel: #0d1a2c;
  --body-high: #14243a;
  --bone: #f2e8d5;
  --muted: #c8c4bd;
  --oxygen: #5de2d5;
  --capillary: #ff6b5f;
  --synapse: #f5c451;
  --neural: #9d83ff;
  --tissue: #31445f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--body-blue); font-size: 21px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 4%, rgba(157, 131, 255, .11), transparent 26rem),
    radial-gradient(circle at 88% 22%, rgba(93, 226, 213, .08), transparent 32rem),
    linear-gradient(120deg, transparent 0 49.8%, rgba(242, 232, 213, .025) 50%, transparent 50.2%),
    var(--body-blue);
  color: var(--bone);
  font: 21px/1.55 "Atkinson Hyperlegible", Arial, sans-serif;
}
a { color: inherit; }
button, input, select { font: inherit; }
button, input[type="button"], input[type="range"], input[type="date"], input[type="time"], input[type="text"], input[type="number"], select {
  min-height: 48px;
}
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 52px;
  padding: .65rem 1rem;
  border: 2px solid var(--oxygen);
  border-radius: 999px;
  background: transparent;
  color: var(--bone);
  font-weight: 700;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--oxygen); color: var(--body-blue); }
button.secondary { border-color: var(--tissue); }
button.danger { border-color: var(--capillary); }
input[type="date"], input[type="time"], input[type="text"], input[type="number"], select {
  max-width: 100%;
  padding: .55rem .7rem;
  border: 2px solid var(--tissue);
  border-radius: .35rem;
  background: #091525;
  color: var(--bone);
}
input[type="range"] { width: 100%; accent-color: var(--oxygen); }
label { font-weight: 700; }
.skip-link {
  position: fixed;
  left: 1rem;
  top: -8rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--synapse);
  color: var(--body-blue);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 4px solid var(--oxygen); outline-offset: 5px; }
.lived-shell { width: min(92vw, 76rem); margin: 0 auto; padding: 1.1rem 0 4rem; }
.lived-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .7rem 0 1rem;
  border-bottom: 2px solid var(--tissue);
  font: 700 18px/1.3 "IBM Plex Mono", "Courier New", monospace;
}
.lived-nav div { display: flex; flex-wrap: wrap; gap: .8rem 1rem; }
.lived-nav a { min-height: 48px; display: inline-flex; align-items: center; text-underline-offset: .3em; }
.lived-nav .brand { color: var(--oxygen); text-decoration: none; letter-spacing: .04em; }
.instrument-shell { width: min(100%, 68rem); margin: 0 auto; padding-top: clamp(2.2rem, 6vw, 5rem); }
.kicker {
  margin: 0 0 .55rem;
  color: var(--oxygen);
  font: 700 18px/1.3 "IBM Plex Mono", "Courier New", monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: Syne, "Arial Black", Arial, sans-serif; }
h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 6.7rem);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.055em;
}
.clock-instructions { max-width: 42rem; margin: 1.25rem 0 0; color: var(--muted); }
.live-reading {
  display: block;
  margin: 1rem 0;
  color: var(--synapse);
  font: 700 clamp(1.35rem, 3.3vw, 2.5rem)/1.2 "IBM Plex Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.instrument-stage {
  position: relative;
  isolation: isolate;
  min-height: 24rem;
  margin-top: 2rem;
  padding: clamp(1rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 2px solid var(--tissue);
  border-radius: 1.2rem .25rem 1.2rem .25rem;
  background:
    linear-gradient(rgba(93, 226, 213, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 226, 213, .055) 1px, transparent 1px),
    rgba(8, 20, 36, .88);
  background-size: 2.2rem 2.2rem;
}
.reading-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.reading-cell { min-width: 0; padding: .85rem; border: 2px solid var(--tissue); background: rgba(7, 16, 31, .8); }
.reading-cell span { display: block; color: var(--muted); font: 700 18px/1.3 "IBM Plex Mono", monospace; text-transform: uppercase; }
.reading-cell strong { display: block; margin-top: .3rem; color: var(--synapse); font: 700 clamp(1.05rem, 2.4vw, 1.5rem)/1.25 "IBM Plex Mono", monospace; overflow-wrap: anywhere; }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem 1rem; margin-top: 1.25rem; }
.control { display: grid; gap: .35rem; min-width: min(100%, 12rem); }
.instrument-status { min-height: 1.6em; margin: 1rem 0 0; color: var(--oxygen); }
.measurement-limit {
  max-width: 52rem;
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border-left: 6px solid var(--capillary);
  background: rgba(255, 107, 95, .08);
}
.measurement-limit h2 { margin: 0 0 .4rem; font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
.measurement-limit p { margin: 0; color: var(--muted); }
.history-note {
  max-width: 52rem;
  margin: 2.5rem 0 0 auto;
  padding: clamp(1.1rem, 3vw, 1.7rem);
  border: 2px solid var(--tissue);
  border-top-color: var(--neural);
  background: rgba(13, 26, 44, .82);
}
.history-note h2 { margin: 0 0 .6rem; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; }
.history-copy { margin: 0; color: var(--muted); }
.history-source { min-height: 48px; display: inline-flex; align-items: center; margin-top: .7rem; color: var(--oxygen); font: 700 18px/1.3 "IBM Plex Mono", monospace; text-underline-offset: .3em; }
.clock-traverse {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--tissue);
}
.clock-traverse a { min-height: 52px; display: flex; align-items: center; justify-content: center; padding: .55rem; border: 2px solid var(--tissue); text-align: center; text-underline-offset: .25em; }
.privacy-note { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .lived-shell { width: min(90vw, 34rem); }
  .lived-nav { align-items: flex-start; flex-direction: column; }
  .instrument-stage { min-height: 20rem; padding: 1rem; }
  .reading-grid { grid-template-columns: 1fr; }
  .clock-traverse { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
