@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The phosphor theme. The script in the head swaps these for the chosen theme. */
:root {
  --bg: #000000;
  --faint: #0a1a3a;
  --dim: #3a5f9e;
  --fg: #9dbeff;
  --accent: #0068ff;
  --bright: #e8f1ff;
  --warn: #ff5a4e;
  /* Small text: dim lifted to pass 4.5:1, and the blue lifted the same way. */
  --dimt: #5d84c6;
  --acct: #4d94ff;
  --shade: #0a1a3a;
  --sun: #e8f1ff;
  --acc-rgb: 0, 104, 255;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gut: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
:root.print { color-scheme: light; }

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 56px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.65 var(--mono);
  min-height: 100vh;
  /* One light source above the page. */
  background-image: linear-gradient(to bottom, rgba(var(--acc-rgb), 0.10), transparent 60vh);
  background-repeat: no-repeat;
  transition: background-color 0.35s ease, color 0.35s ease;
}
/* Faint scanlines over the whole page on dark themes, grain on paper. */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.18) 2px 3px);
}
.print body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .18 0 0 0 0 .08 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.28;
}
.print body { background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent 50vh); }

a { color: var(--acct); text-decoration: none; }
a:hover, a:focus-visible { color: var(--bright); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--acct); outline-offset: 3px; }
button { font: inherit; color: inherit; }
.dim { color: var(--dimt); }
.acc { color: var(--acct); }
.br { color: var(--bright); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--bright); color: var(--bg); padding: 6px 10px; }
.skip:focus { left: 8px; }

/* The top bar, like the one on the home screen. */
.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) var(--gut) 6px;
  background: color-mix(in srgb, var(--faint) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--dim) 40%, transparent);
  font-size: 14px;
}
.brand { color: var(--bright); }
.brand:hover { text-decoration: none; }
.bar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.bar nav a { color: var(--fg); }
.bar nav a:hover { color: var(--bright); }
@media (max-width: 420px) { .bar { font-size: 13px; } .bar nav { gap: 12px; } .brand .dim { display: none; } }

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

.hero { padding: 14px var(--gut) 0; }
.crt { position: relative; }
.screen {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--bg);
  /* A bevel on the top edge, falloff below: lit from above. */
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--dim) 45%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 40px 80px -40px rgba(var(--acc-rgb), 0.45);
  height: clamp(500px, calc(100svh - 180px), 660px);
  touch-action: pan-y;
}
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bloom {
  pointer-events: none;
  filter: blur(12px) brightness(1.35);
  mix-blend-mode: screen;
  opacity: 0.32;
}
@media (min-width: 960px) { .bloom { opacity: 0.55; } }
.print .bloom { display: none; }

/* CRT glass: scanlines, a curved vignette, a glare from above and a slow flicker. */
.glass { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.32) 2px 3px),
    radial-gradient(120% 90% at 50% 45%, transparent 58%, rgba(0, 0, 0, 0.55) 100%),
    radial-gradient(80% 40% at 50% -6%, rgba(255, 255, 255, 0.07), transparent 70%);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(var(--acc-rgb), 0.035);
  animation: flicker 4.2s steps(1) infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 0.0; }
  7% { opacity: 0.9; } 8% { opacity: 0.1; } 31% { opacity: 0.5; } 32% { opacity: 0; }
  63% { opacity: 0.7; } 64% { opacity: 0.2; } 88% { opacity: 0.4; } 89% { opacity: 0; }
}
/* Paper has no scanlines: grain and a warm edge instead. */
.print .glass::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .18 0 0 0 0 .08 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(90, 66, 30, 0.18) 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.print .glass::after { display: none; }
.print .screen { box-shadow: 0 0 0 1px color-mix(in srgb, var(--dim) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 30px 60px -36px rgba(60, 40, 10, 0.35); }

.hero-copy { position: relative; z-index: 2; padding: 26px 4px 0; }
.eyebrow { margin: 0 0 14px; font-size: 13px; color: var(--dimt); letter-spacing: 0.04em; display: flex; align-items: center; gap: 10px; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent), 0 0 2px var(--bright); }
.print .led { box-shadow: none; }
h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--bright);
  font-weight: 700;
  text-wrap: balance;
  text-shadow: 0 0 22px rgba(var(--acc-rgb), 0.55), 0 0 2px rgba(var(--acc-rgb), 0.6);
}
/* On paper the heading is printed twice, the second ink off register. */
.print h1, .print .sec-head h2, .print .get h2 { text-shadow: 3px 3px 0 var(--shade); }
h1 .cur {
  display: inline-block; width: 0.55em; height: 0.9em; margin-left: 0.14em; vertical-align: -0.08em;
  background: var(--accent); box-shadow: 0 0 14px var(--accent);
  animation: blink 1.06s steps(1) infinite;
}
.print h1 .cur { box-shadow: 3px 3px 0 var(--shade); }
@keyframes blink { 50% { opacity: 0; } }
.lead { margin: 0; max-width: 54ch; font-size: 16px; color: var(--fg); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 26px 0 0; }
.play {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--bright);
  background: rgba(var(--acc-rgb), 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 24px -8px rgba(var(--acc-rgb), 0.8);
  font-weight: 700;
}
.play .tri { color: var(--acct); font-size: 12px; }
.print .play { box-shadow: 3px 3px 0 var(--shade); background: transparent; }
.price { color: var(--dimt); font-size: 14px; }
.price b { color: var(--bright); font-size: 16px; }

.tray { margin: 26px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.tray-label { font-size: 13px; color: var(--dimt); min-width: 15ch; }
.tray-label b { color: var(--bright); font-weight: 700; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; }
.dot {
  width: 26px; height: 26px; padding: 0; cursor: pointer;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--dim) 60%, transparent);
  background: radial-gradient(circle at 50% 50%, var(--c) 0 5px, var(--b) 6px);
  transition: transform 0.15s ease;
}
.dot:hover { transform: translateY(-2px); }
.dot[aria-pressed="true"] { outline: 2px solid var(--bright); outline-offset: 2px; }

/* Layout tabs, joined to the bottom of the screen. */
.layouts { padding: 22px 4px 0; }
.layouts h2 { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--acct); letter-spacing: 0.06em; }
.ltabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ltabs button {
  text-align: left; cursor: pointer;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--dim) 55%, transparent);
  background: color-mix(in srgb, var(--faint) 45%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex; flex-direction: column; gap: 2px;
  transition: border-color 0.2s, background 0.2s;
}
.ltabs b { color: var(--bright); font-size: 14px; }
.ltabs span { color: var(--dimt); font-size: 12.5px; line-height: 1.35; }
.ltabs button:hover { border-color: var(--accent); }
.ltabs button[aria-pressed="true"] { border-color: var(--accent); background: rgba(var(--acc-rgb), 0.16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 22px -10px rgba(var(--acc-rgb), 0.9); }
.ltabs button[aria-pressed="true"] span { color: var(--fg); }
.print .ltabs button[aria-pressed="true"] { box-shadow: 3px 3px 0 var(--shade); background: transparent; }
.ldesc { margin: 12px 0 0; color: var(--fg); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; }
.link { background: none; border: 0; padding: 0; color: var(--acct); cursor: pointer; font-size: 14px; }
.link::before { content: "↻ "; }
.link:hover { color: var(--bright); text-decoration: underline; }

@media (max-width: 959px) {
  .ltabs { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .ltabs::-webkit-scrollbar { display: none; }
}

/* Wide screens: the words sit inside the tube, left of the home screen. */
@media (min-width: 960px) {
  .screen { height: clamp(640px, calc(100svh - 150px), 900px); }
  .crt { min-height: clamp(640px, calc(100svh - 150px), 900px); }
  .crt .screen { position: absolute; inset: 0; }
  .hero-copy {
    position: absolute; left: clamp(28px, 4vw, 64px); top: 50%; transform: translateY(-50%);
    width: min(44%, 560px); padding: 0;
  }
  .layouts { display: grid; grid-template-columns: 170px 1fr; gap: 6px 18px; align-items: start; }
  .layouts h2 { margin: 12px 0 0; }
  .ldesc { grid-column: 2; margin-top: 4px; }
}

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

.sec { max-width: 1180px; margin: 0 auto; padding: 96px var(--gut) 0; }
.sec-head { max-width: 760px; margin: 0 0 30px; }
.sec-head.row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.kicker { margin: 0 0 8px; font-size: 13px; color: var(--acct); }
.sec h2 { margin: 0 0 12px; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.15; color: var(--bright); letter-spacing: -0.01em; text-wrap: balance; }
.sec-head p { margin: 0; color: var(--fg); }
.new { display: inline-block; padding: 0 6px; margin-right: 8px; border-radius: 3px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.print .new { color: var(--bg); background: var(--bright); }

/* Panels look like the boxes on the home screen: title set into the top edge. */
.panel {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--dim) 75%, transparent);
  border-top-color: color-mix(in srgb, var(--fg) 55%, transparent);
  border-radius: 8px;
  padding: 20px 18px 16px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--faint) 40%, transparent), transparent 70%);
}
.panel p { margin: 0; }
.ptitle {
  position: absolute; top: -0.85em; left: 12px;
  margin: 0; padding: 0 6px;
  background: var(--bg);
  font-size: 15px !important; line-height: 1.6; color: var(--acct) !important; font-weight: 700; letter-spacing: 0;
}
.ptag { position: absolute; top: -0.8em; right: 12px; padding: 0 6px; background: var(--bg); color: var(--dimt); font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px 20px; margin-top: 34px; }
.cards .panel p { color: var(--fg); font-size: 14px; }

.wide .skywrap { position: relative; height: 270px; margin: 0 0 16px; }
.wide .skywrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wide > p { color: var(--fg); max-width: 80ch; font-size: 14px; }
.sky-picker, .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.sky-picker button, .chips button {
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--dim) 60%, transparent);
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.sky-picker button:hover, .chips button:hover { border-color: var(--accent); color: var(--bright); }
.sky-picker button[aria-pressed="true"], .chips button[aria-pressed="true"] { border-color: var(--accent); background: rgba(var(--acc-rgb), 0.16); color: var(--bright); }
.chips i { width: 14px; height: 14px; border-radius: 3px; background: radial-gradient(circle, var(--c) 0 4px, var(--b) 5px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--dim) 60%, transparent); }

ul.list { list-style: none; margin: 0 0 14px; padding: 0; }
ul.list li { padding: 3px 0 3px 2ch; text-indent: -2ch; color: var(--fg); }
ul.list li::before { content: "› "; color: var(--acct); }

/* Lock screen. */
.lock { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 56px; align-items: center; }
.lock-copy p { color: var(--fg); }
.lock-copy h2 { margin-bottom: 14px; }
.lock-art { display: flex; justify-content: center; }
.phone.live { width: min(320px, 100%); position: relative; }
.phone.live canvas { display: block; width: 100%; height: 100%; border-radius: 26px; background: var(--bg); }
.phone.live .glass { inset: 10px; border-radius: 26px; }
@media (max-width: 760px) { .lock { grid-template-columns: 1fr; gap: 30px; } .lock-art { order: 2; } }

/* A phone, lit from above: bevel on top, falloff below. */
.phone {
  aspect-ratio: 1 / 2;
  padding: 10px;
  border-radius: 36px;
  background: linear-gradient(to bottom, #1d1f24, #07080a 40%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 50px 70px -40px rgba(var(--acc-rgb), 0.5),
    0 20px 40px -20px rgba(0, 0, 0, 0.8);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 26px; background: #000; }

/* Carousel. */
.track {
  display: flex; gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 4px 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--dim) transparent;
  overscroll-behavior-x: contain;
}
.track figure { margin: 0; flex: 0 0 auto; width: clamp(220px, 62vw, 270px); scroll-snap-align: start; }
.track figcaption { margin-top: 14px; font-size: 13px; color: var(--fg); text-align: center; }
.track:focus-visible { outline-offset: 6px; }
.arrows { display: flex; gap: 8px; }
.arrows button {
  width: 44px; height: 44px; cursor: pointer;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--dim) 70%, transparent);
  background: color-mix(in srgb, var(--faint) 50%, transparent);
  color: var(--bright); font-size: 22px; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.arrows button:hover { border-color: var(--accent); }

.inks { display: grid; gap: 22px; }
.ink-group h3 { margin: 0 0 10px; font-size: 13px; color: var(--acct); }
.note { margin: 10px 0 0; color: var(--dimt); font-size: 14px; max-width: 80ch; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 22px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.two .panel { padding-top: 24px; }
.privacy p { color: var(--fg); max-width: 80ch; }

.get { text-align: center; padding-bottom: 20px; }
.get h2 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 8px; }
.get .big { color: var(--bright); text-shadow: 0 0 26px rgba(var(--acc-rgb), 0.7); }
.print .get .big { text-shadow: none; }
.get p { color: var(--fg); margin: 0 0 24px; }

.foot {
  max-width: 1180px; margin: 80px auto 0;
  padding: 16px var(--gut) calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--faint);
  color: var(--dimt); font-size: 13px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.foot a { color: var(--fg); }

/* ------------------------------------------------------------ legal pages */

.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--gut) 64px; }
.doc .bar { margin: 0 calc(-1 * var(--gut)); }
.doc h1 { margin-top: 40px; font-size: clamp(28px, 6vw, 40px); }
.doc h2 { color: var(--acct); font-size: 16px; margin: 30px 0 6px; }
.doc p, .doc li { color: var(--fg); max-width: 70ch; }
.doc ul { padding-left: 2ch; }
.doc strong { color: var(--bright); }
.doc footer { margin: 56px 0 0; padding-top: 14px; border-top: 1px solid var(--faint); color: var(--dimt); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.doc footer a { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  h1 .cur, .glass::after { animation: none; }
  .dot, body { transition: none; }
}
