:root {
  --bg-top: #0b1020;
  --bg-bot: #141a30;
  --surface: #141a2c;
  --surface-2: #1c2440;
  --line: #2c3552;
  --ink: #f8fafc;
  --muted: #9cacc2;
  --accent: #f97316;
  --radius: 18px;
  --wrap: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-top);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bot) 100%);
}

body::after {
  content: "";
  position: fixed;
  top: -220px;
  right: -160px;
  width: 720px;
  height: 720px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.28), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.wrap {
  width: min(var(--wrap), 100% - 48px);
  margin-inline: auto;
}

a {
  color: var(--accent);
}

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

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

header.site {
  padding: 28px 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

nav .brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

nav a.link {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

nav a.link:hover {
  color: var(--ink);
}

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

.hero {
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.pill {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b1020;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 20px 0 16px;
}

.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 26px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 12px;
  background: var(--accent);
  color: #0b1020;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn.secondary {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: not-allowed;
}

.install-note {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.hero-art {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.hero-art img {
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line);
}

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

section {
  padding: 56px 0;
}

section + section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.sub {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 32px;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card .glyph {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: rgba(249, 115, 22, 0.14);
  color: var(--accent);
  font-size: 19px;
  font-weight: 700;
}

figure {
  margin: 0;
}

figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--line);
  display: block;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.shots {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: start;
}

/* The options page is landscape, so it sits below the portrait popup shots
   instead of stretching one grid row out of step with the others. */
.shot-wide {
  max-width: 620px;
  margin: 24px auto 0;
}

.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 40px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: #cfd9e6;
}

.prose ul {
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

/* Three-column tables cannot shrink below the width of their longest cell, so
   they would push the whole page sideways on a phone. Let the table keep its
   readable width and scroll inside its own container instead. */
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin: 20px 0;
  /* A visible hint that there is more to the right. */
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left / 24px 100% no-repeat,
    linear-gradient(to left, var(--surface) 30%, transparent) right / 24px 100% no-repeat,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.14), transparent) left / 10px 100% no-repeat,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.14), transparent) right / 10px 100% no-repeat;
}

.table-scroll table {
  margin: 0;
  min-width: 520px;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  /* Identifiers like chrome.storage.local must be breakable, or a narrow
     column pushes the table wider than the viewport. */
  overflow-wrap: anywhere;
}

.callout {
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(249, 115, 22, 0.1);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.35);
  color: #f5e2d0;
  margin: 24px 0;
}

.callout strong {
  color: var(--accent);
}

/* ---------------------------------------------------------------- footer */

footer.site {
  padding: 40px 0 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 15px;
}

footer.site .foot {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

footer.site .foot nav {
  margin-left: auto;
}

footer.site p {
  margin: 0;
}

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

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-top: 36px;
  }

  .hero-art {
    order: -1;
  }

  .wrap {
    width: min(var(--wrap), 100% - 32px);
  }

  section {
    padding: 44px 0;
  }
}

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