/*
 * System Quest - systemquest.fit
 *
 * The site is the System's public readout: viewport-pinned HUD chrome, chamfered
 * glass panels, numbered diagnostic sections. Tokens mirror src/theme/tokens.ts so
 * the site and the app read as one product - change them there first.
 */

/* Self-hosted so the site makes zero third-party requests - a page that claims "no
   tracking" shouldn't hand every visitor's IP to Google Fonts. Both OFL-1.1, see
   fonts/OFL-NOTICE.txt. Same pairing as the app (@expo-google-fonts). */
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/orbitron-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Electrolize';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/electrolize-latin.woff2') format('woff2');
}

:root {
  /* Surfaces */
  --base: #050d1c;
  --base-top: #0b1e3a;
  --glass: rgba(12, 34, 64, 0.55);
  --glass-solid: #0d2340;

  /* Window chrome */
  --frame: #2e8bff;
  --frame-glow: #6fb8ff;
  --frame-dim: rgba(46, 139, 255, 0.35);

  /* Accent - brightness IS the accent */
  --accent: #5ce1ff;
  --accent-bright: #9becff;

  --text: #eaf6ff;
  --text-dim: #9fc2e0;
  --success: #39e59c;
  --warn: #ff5a5a;
  --reward: #f2c14e;

  /* Tier ramp - a separate palette from the chrome */
  --bronze: #cd7f32;
  --silver: #c0c7d0;
  --gold: #f2c14e;
  --platinum: #5fd0c7;
  --diamond: #7cc4ff;
  --master: #b47cff;

  --chamfer: 14px;
  --measure: 68ch;
  --shell: 1120px;

  --font-display: 'Orbitron', ui-sans-serif, sans-serif;
  --font-body: 'Electrolize', ui-sans-serif, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(15px, 0.55vw + 13.4px, 17px);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Atmosphere: dotted grid + a wash of chrome blue from the top ---- */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 1px 1px, rgba(46, 139, 255, 0.16) 1px, transparent 0) 0 0 / 34px 34px,
    radial-gradient(ellipse 120% 70% at 50% -10%, var(--base-top) 0%, var(--base) 62%);
}

/* Scanlines - barely there, but they stop the flat areas reading as dead CSS */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(92, 225, 255, 0.035) 0 1px,
    transparent 1px 3px
  );
}

/* ---- Viewport chrome: the frame the System looks through ---- */

.chrome {
  position: fixed;
  inset: 12px;
  z-index: 50;
  pointer-events: none;
  border: 1px solid rgba(46, 139, 255, 0.14);
}

.chrome span {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--frame);
}
.chrome span:nth-child(1) {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}
.chrome span:nth-child(2) {
  top: -1px;
  right: -1px;
  border-left: 0;
  border-bottom: 0;
}
.chrome span:nth-child(3) {
  bottom: -1px;
  left: -1px;
  border-right: 0;
  border-top: 0;
}
.chrome span:nth-child(4) {
  bottom: -1px;
  right: -1px;
  border-left: 0;
  border-top: 0;
}

/* ---- Layout ---- */

.shell {
  width: min(100% - 3rem, var(--shell));
  margin-inline: auto;
}

main {
  position: relative;
  z-index: 1;
}

section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

/* ---- Type ---- */

h1,
h2,
h3,
.mono {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  margin: 0 0 1.5rem;
}

h3 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  margin: 0 0 0.6rem;
  color: var(--accent-bright);
}

p {
  margin: 0 0 1.1rem;
  max-width: var(--measure);
  color: var(--text-dim);
}

a {
  color: var(--accent);
  text-decoration-color: rgba(92, 225, 255, 0.4);
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}
a:hover {
  color: var(--accent-bright);
}

strong {
  color: var(--text);
  font-weight: 400;
}

/* Section label: [01] PROTOCOL - the diagnostic-entry device */
.tag {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.1rem;
}

.tag::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--frame);
}

.tag b {
  color: var(--accent);
  font-weight: 700;
}

/* ---- HUD panel: chamfered, single crisp stroke, bracket accents ---- */

.hud {
  --ch: var(--chamfer);
  position: relative;
  padding: 1px;
  background: linear-gradient(150deg, var(--frame) 0%, var(--frame-dim) 45%, rgba(46, 139, 255, 0.5) 100%);
  clip-path: polygon(
    var(--ch) 0,
    100% 0,
    100% calc(100% - var(--ch)),
    calc(100% - var(--ch)) 100%,
    0 100%,
    0 var(--ch)
  );
}

.hud__body {
  --ch: calc(var(--chamfer) - 1px);
  position: relative;
  height: 100%;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--glass-solid);
  background-image: linear-gradient(160deg, rgba(46, 139, 255, 0.08), transparent 60%);
  clip-path: polygon(
    var(--ch) 0,
    100% 0,
    100% calc(100% - var(--ch)),
    calc(100% - var(--ch)) 100%,
    0 100%,
    0 var(--ch)
  );
}

/* Bracket accents, top-right and bottom-left - the corners the chamfer leaves square */
.hud__body::before,
.hud__body::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  opacity: 0.7;
}
.hud__body::before {
  top: 9px;
  right: 9px;
  border-left: 0;
  border-bottom: 0;
}
.hud__body::after {
  bottom: 9px;
  left: 9px;
  border-right: 0;
  border-top: 0;
}

/* ---- Buttons: split open from the middle, then the label fades in ---- */

.btn {
  --ch: 11px;
  display: inline-block;
  position: relative;
  padding: 0.95rem 2.4rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--base);
  background: var(--accent);
  clip-path: polygon(
    var(--ch) 0,
    100% 0,
    100% calc(100% - var(--ch)),
    calc(100% - var(--ch)) 100%,
    0 100%,
    0 var(--ch)
  );
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.24s ease;
}

.btn:hover {
  color: var(--base);
  background: var(--accent-bright);
  /* The one place a glow is earned */
  box-shadow: 0 0 22px rgba(92, 225, 255, 0.45);
}

.btn:active {
  transform: scale(0.975);
}

.btn--ghost {
  color: var(--accent);
  background: transparent;
  padding: 0.9rem 2rem;
  box-shadow: inset 0 0 0 1px var(--frame);
}
.btn--ghost:hover {
  color: var(--accent-bright);
  background: rgba(46, 139, 255, 0.12);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* ---- Header ---- */

.site-head {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.9rem;
}

.site-head__mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}

.site-head__mark svg {
  width: 132px;
  height: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  padding-bottom: 4px;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: left 0.22s ease, right 0.22s ease;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--accent);
}

.site-nav a:hover::after,
.site-nav a[aria-current='page']::after {
  left: 0;
  right: 0;
}

@media (max-width: 620px) {
  .site-nav {
    gap: 1rem;
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }
  .site-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
}

/* ---- Hero ---- */

.hero {
  position: relative;
  /* No bottom padding - the next section's own top padding is the whole gap. */
  padding-block: clamp(2rem, 5vw, 3.5rem) 0;
}

.hero__title {
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  line-height: 1.08;
  margin: 0 0 1.5rem;
  max-width: 14ch;
  color: var(--text);
  /* The hero headline is the one place a halo is earned - see UI_DESIGN's "no glow abuse". */
  text-shadow: 0 0 34px rgba(92, 225, 255, 0.22);
}

.hero__sub {
  max-width: 52ch;
  margin-bottom: 2.2rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}

.hero__note {
  font-family: var(--font-display);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Live status pill */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.8rem;
}

.status::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(57, 229, 156, 0.5);
  }
  50% {
    opacity: 0.55;
    box-shadow: 0 0 0 6px rgba(57, 229, 156, 0);
  }
}

/* ---- Grids ---- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

/* Text is top-aligned against the phone rather than centred on it - centred left the
   headline floating in the middle of a very tall column. The small top offset keeps it
   off the device's own top edge. */
.hero__split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.62fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.hero__split > div:first-child {
  padding-top: clamp(0.5rem, 3vw, 2.5rem);
}

@media (max-width: 900px) {
  .hero__split {
    grid-template-columns: 1fr;
    gap: 3rem;
    justify-items: center;
  }
  .hero__split > div:first-child {
    justify-self: stretch;
  }
}

/* ---- Device shot ---- */

/* Device width and bezel are kept UNITLESS so --k comes out a bare number - scale()
   rejects a length, and `300px / 390` is a length, not a ratio. */
.phone {
  --pw: 300;
  --bz: 11;
  --k: calc((var(--pw) - 2 * var(--bz)) / 390);
  --bezel: calc(var(--bz) * 1px);
  width: calc(var(--pw) * 1px);
  justify-self: end;
}

@media (max-width: 380px) {
  .phone {
    --pw: 260;
  }
}

@media (max-width: 900px) {
  .phone {
    justify-self: center;
  }
}

.phone__frame {
  position: relative;
  padding: var(--bezel);
  border-radius: 46px;
  background: linear-gradient(155deg, #33506f 0%, #16283f 45%, #0a1526 100%);
  box-shadow:
    0 0 0 1px rgba(111, 184, 255, 0.35),
    0 30px 70px -20px rgba(0, 0, 0, 0.85),
    0 0 60px -12px rgba(46, 139, 255, 0.35);
}

.phone__screen {
  position: relative;
  height: calc(844 * var(--k) * 1px);
  border-radius: 35px;
  overflow: hidden;
  background: radial-gradient(ellipse 120% 60% at 50% 0%, #10294a 0%, #060f1f 70%);
}

/* ---- Home-screen mock ----------------------------------------------------------
   Built at true iPhone point size (390x844) and scaled into the bezel, so spacing and
   type sizes can be copied straight from app/(tabs)/index.tsx rather than re-guessed at
   thumbnail scale. It mirrors the real screen: identity header, week strip, DAILY QUEST
   window, quest board, nav bar. If the app's home screen changes materially, change this
   too - it is a marketing likeness, not a live render. */

.mock {
  width: 390px;
  height: 844px;
  transform: scale(var(--k));
  transform-origin: top left;
  padding: 0 20px;
  font-family: var(--font-body);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* Faint circuit wash, the app's ScreenBackground */
  background-image: radial-gradient(circle at 1px 1px, rgba(46, 139, 255, 0.13) 1px, transparent 0);
  background-size: 26px 26px;
}

.mock * {
  line-height: 1.25;
}

.mock__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 6px 4px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.mock__status i {
  display: inline-block;
  width: 22px;
  height: 10px;
  border: 1px solid rgba(234, 246, 255, 0.65);
  border-radius: 3px;
  position: relative;
}

.mock__status i::after {
  content: '';
  position: absolute;
  inset: 2px;
  right: 7px;
  background: var(--text);
  border-radius: 1px;
}

/* Identity header */
.mock__id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mock__avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--accent-bright);
  background: rgba(46, 139, 255, 0.12);
  box-shadow: inset 0 0 0 1px var(--frame);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.mock__avatar svg {
  width: 30px;
  height: 30px;
}

.mock__idinfo {
  flex: 1;
  display: grid;
  gap: 4px;
}

.mock__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--frame-glow);
}

.mock__gaugerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.mock__coin {
  color: var(--reward);
}

.mock__bar {
  height: 7px;
  background: rgba(46, 139, 255, 0.18);
  box-shadow: inset 0 0 0 1px var(--frame-dim);
}

.mock__bar b {
  display: block;
  height: 100%;
  background: var(--accent);
}

/* Week strip */
.mock__days {
  display: flex;
  justify-content: space-between;
}

.mock__day {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.mock__day span {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.mock__day.is-today span {
  color: var(--accent-bright);
}

.mock__hex {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

.mock__hex svg {
  position: absolute;
  inset: 0;
}

.mock__hex b {
  font-size: 14px;
  color: var(--success-bright, #86ffcb);
  line-height: 1;
}

.mock__stats {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-top: 10px;
}

.mock__stats b {
  color: var(--accent);
  font-weight: 400;
  font-size: 15px;
}

/* Section label - the app's SystemTab */
.mock__tab {
  align-self: flex-start;
  padding: 4px 14px 4px 10px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-bright);
  background: rgba(46, 139, 255, 0.16);
  box-shadow: inset 0 0 0 1px var(--frame);
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
  margin-bottom: -6px;
}

/* DAILY QUEST window */
.mock__card {
  padding: 16px;
  background: rgba(12, 34, 64, 0.72);
  box-shadow: inset 0 0 0 1px var(--frame);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.mock__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--frame-glow);
  margin-bottom: 12px;
}

.mock__divider::before,
.mock__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--frame-dim);
}

.mock__goalrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mock__goalname {
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--text);
}

.mock__goalcount {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-bright);
}

/* Segmented rep bar - discrete chunks, matching ProgressBar variant="segments" */
.mock__segs {
  display: flex;
  gap: 3px;
  height: 7px;
}

.mock__segs i {
  flex: 1;
  background: rgba(46, 139, 255, 0.22);
}

.mock__segs i.on {
  background: var(--accent);
}

.mock__reward {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.mock__rewardvals {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.5px;
}

.mock__rp {
  color: var(--rp, #9becff);
}

.mock__cta {
  margin-top: 18px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

/* Quest board cards */
.mock__quest {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(12, 34, 64, 0.45);
}

/* Bracket corners, the app's BracketCard */
.mock__quest::before,
.mock__quest::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--frame);
}
.mock__quest::before {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}
.mock__quest::after {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
}

.mock__qicon {
  width: 30px;
  text-align: center;
  font-size: 20px;
  color: var(--frame-glow);
}

.mock__qmain {
  flex: 1;
  display: grid;
  gap: 5px;
}

.mock__qtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text);
}

/* Severity pips */
.mock__pips {
  display: flex;
  gap: 2px;
}

.mock__pips i {
  width: 3px;
  height: 12px;
  background: var(--frame-dim);
}

.mock__pips i.on {
  background: var(--accent);
}

.mock__qspec {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.mock__qpay {
  display: grid;
  justify-items: end;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 14px;
}

.mock__chip {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--reward);
}

/* Reroll - a text row, not a button (it out-weighs the quests it re-deals) */
.mock__reroll {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--frame-glow);
}

/* Nav bar */
.mock__nav {
  margin-top: auto;
  margin-inline: -6px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-around;
  padding: 10px 6px;
  background: rgba(12, 34, 64, 0.8);
  box-shadow: inset 0 0 0 1px var(--frame-dim);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%, 0 12px);
}

.mock__nav span {
  display: grid;
  justify-items: center;
  gap: 3px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

.mock__nav span em {
  font-style: normal;
  font-size: 16px;
}

.mock__nav span.on {
  color: var(--accent);
}

.phone__island {
  position: absolute;
  top: calc(var(--bezel) + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: 82px;
  height: 24px;
  border-radius: 14px;
  background: #05080f;
}

/* ---- Legal / prose pages ---- */

.page-head {
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
}

.page-head h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 0 0 0.9rem;
}

.page-head .meta {
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.prose {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.prose h2 {
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  margin: 2.8rem 0 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(46, 139, 255, 0.22);
  color: var(--text);
}

.prose h2:first-of-type {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.prose h3 {
  margin-top: 1.8rem;
  font-size: 0.9rem;
}

.prose ul,
.prose ol {
  max-width: var(--measure);
  color: var(--text-dim);
  padding-left: 1.1rem;
  margin: 0 0 1.1rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose li::marker {
  color: var(--frame);
}

/* Data table - what we collect, why, where it lives */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
  text-align: left;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.4rem;
}

.data-table th {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--frame-dim);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid rgba(46, 139, 255, 0.14);
  color: var(--text-dim);
  vertical-align: top;
}

.data-table td:first-child {
  color: var(--text);
  min-width: 8.5rem;
}

/* Inline emphasis block for the "camera never leaves the phone" style claims */
.note {
  --ch: 10px;
  max-width: calc(var(--measure) + 3rem);
  margin: 1.6rem 0;
  padding: 1.1rem 1.3rem;
  background: rgba(46, 139, 255, 0.08);
  border-left: 2px solid var(--accent);
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--ch)),
    calc(100% - var(--ch)) 100%,
    0 100%
  );
}

.note p:last-child {
  margin-bottom: 0;
}

/* ---- Entrance: one orchestrated load, staggered ---- */

.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.d1 {
  animation-delay: 0.08s;
}
.d2 {
  animation-delay: 0.16s;
}
.d3 {
  animation-delay: 0.26s;
}
.d4 {
  animation-delay: 0.36s;
}
.d5 {
  animation-delay: 0.46s;
}

/* Panels materialise on scroll rather than all at once */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .grid > * {
      animation: rise 1ms linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Accessibility ---- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.8rem 1.2rem;
  background: var(--accent);
  color: var(--base);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

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