/* ==========================================================================
   Operator Board — product page. Mirrors the app's own control-room UI:
   slate panels, letter-spaced section labels, big tile buttons.
   ========================================================================== */
:root {
  --bg: #121317;
  --bg-2: #181a1f;
  --panel: #1e2026;
  --panel-2: #262931;
  --border: #2e323b;
  --text: #eef0f3;
  --dim: #9097a3;
  --blue: #3d8bff;
  --blue-deep: #2b6fe0;
  --green: #22a447;
  --purple: #7c5cff;
  --red: #ff4141;
  --amber: #f5b301;
  --header-bg: rgba(18, 19, 23, 0.9);
  --hover: #30343d;

  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-head: "Inter Tight", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 3px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Light mode: the app's panels on a light console. Screenshots stay dark. */
:root[data-theme="light"] {
  --bg: #f2f3f5;
  --bg-2: #e8eaee;
  --panel: #ffffff;
  --panel-2: #eceef2;
  --border: #d4d8df;
  --text: #15171c;
  --dim: #5a6170;
  --blue: #2468db;
  --blue-deep: #1b56b8;
  --green: #1a8a3a;
  --header-bg: rgba(242, 243, 245, 0.9);
  --hover: #dfe2e8;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, p { margin: 0; }
code { font-family: var(--font-mono); font-size: 0.86em; background: var(--panel-2); padding: 2px 6px; border-radius: var(--r); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.cap {
  font: 700 0.78rem/1 var(--font);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.wordmark {
  font: 900 1.05rem/1.05 var(--font-head);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
}

/* Header ------------------------------------------------------------------ */
.ob-header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.ob-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.ob-header nav { display: flex; align-items: center; gap: 26px; }
.ob-header nav a { color: var(--dim); text-decoration: none; font-weight: 500; font-size: 0.94rem; }
.ob-header nav a:hover { color: var(--text); }
.ob-header nav .btn { color: #fff; }
.theme-toggle {
  display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r);
  color: var(--text); cursor: pointer;
}
.theme-toggle:hover { background: var(--hover); }
.back { font: 600 0.72rem/1 var(--font); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); text-decoration: none; }
.back:hover { color: var(--text); }
.brand { display: flex; align-items: center; gap: 22px; }
/* The logo sits tight to the title it belongs to. */
.brand .logo { display: block; margin-right: -12px; flex: none; }
/* The logo's shape filled with the title's blue, so it matches in both themes. */
.brand .logo span {
  display: block;
  width: 42px;
  height: 42px;
  background: var(--blue);
  -webkit-mask: url(img/logo.svg) center / contain no-repeat;
  mask: url(img/logo.svg) center / contain no-repeat;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px;
  font: 700 0.92rem/1 var(--font);
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--hover); }
.btn--blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-deep); }
.btn--sm { padding: 9px 14px; font-size: 0.84rem; }
.btn--blue .meta { color: rgba(255, 255, 255, 0.78); }

/* Hero -------------------------------------------------------------------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font: 800 clamp(2.5rem, 6.4vw, 5.2rem)/0.95 var(--font-head); letter-spacing: -0.04em; margin: 18px 0 24px; }
.hero h1 span { color: var(--blue); }
.hero .lede { color: var(--dim); font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 50ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 34px; }
.meta { font: 500 0.8rem/1.5 var(--font-mono); color: var(--dim); }

/* Interactive LED wall panel in the hero (mirrors the app's Operate page) */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.panel > .cap { display: block; margin-bottom: 14px; }
.wall-demo .tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile {
  min-height: 92px;
  font: 800 clamp(0.8rem, 1.4vw, 1.05rem)/1.1 var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: background 0.12s;
}
.tile:hover { background: var(--hover); }
.tile[aria-pressed="true"][data-state="frozen"] { background: var(--blue); border-color: var(--blue); }
.tile[aria-pressed="true"][data-state="blackout"] { background: #000; border-color: var(--red); color: var(--red); }
.wall-screen {
  position: relative;
  margin-bottom: 14px;
  aspect-ratio: 16 / 7;
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(180deg, #2a3b5c 0%, #c97a4a 58%, #3b2a22 59%, #18120f 100%);
  transition: filter 0.2s;
}
.wall-screen::after { /* LED pixel grid */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(0,0,0,0.38) 0.9px, transparent 1.1px);
  background-size: 4px 4px;
}
.wall-screen .sun { position: absolute; left: 62%; top: 34%; width: 56px; height: 56px; border-radius: 50%; background: #ffd9a0; box-shadow: 0 0 48px 16px rgba(255, 190, 120, 0.5); animation: drift 7s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-60px, 16px); } }
.wall-screen[data-state="frozen"] .sun { animation-play-state: paused; }
.wall-screen[data-state="blackout"] { filter: brightness(0); }
.wall-banner {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 7px 10px;
  font: 800 0.74rem/1 var(--font); letter-spacing: 0.2em; text-align: center;
  color: #fff; background: var(--blue);
  transform: translateY(-100%); transition: transform 0.15s; z-index: 2;
}
.wall-screen[data-state="frozen"] .wall-banner { transform: none; }
.wall-screen[data-state="blackout"] + .blackout-note { opacity: 1; }
.blackout-note { opacity: 0; margin: -6px 0 12px; font: 700 0.72rem/1 var(--font); letter-spacing: 0.2em; color: var(--red); transition: opacity 0.15s; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font-size: 0.8rem; padding: 5px 10px; border-radius: var(--r); background: var(--green); color: #fff; }
.chip--off { background: var(--panel-2); color: var(--dim); }

.hero-shot { margin-top: clamp(48px, 7vw, 88px); border: 1px solid #2e323b; border-bottom: 0; border-radius: var(--r) var(--r) 0 0; overflow: hidden; box-shadow: 0 -30px 80px rgba(61, 139, 255, 0.08); }

/* Sections ---------------------------------------------------------------- */
.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--border); }
.section--alt { background: var(--bg-2); }
.section h2 { font: 800 clamp(1.9rem, 4.4vw, 3.2rem)/1 var(--font-head); letter-spacing: -0.03em; margin: 14px 0 18px; }
.section .intro { color: var(--dim); max-width: 60ch; margin-bottom: clamp(32px, 5vw, 52px); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.features .panel h3 { font: 700 1.15rem/1.25 var(--font); margin: 10px 0 8px; }
.features .panel p { color: var(--dim); font-size: 0.95rem; }

/* At a glance --------------------------------------------------------------- */
.facts { list-style: none; margin: 0 0 clamp(40px, 6vw, 64px); padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.facts li { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; border-top: 3px solid var(--blue); }
.facts b { display: block; font: 800 1.35rem/1.15 var(--font-head); letter-spacing: -0.01em; }
.facts span { color: var(--dim); font-size: 0.9rem; }
.features--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
a.tile-link { color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
a.tile-link:hover { border-color: var(--blue); transform: translateY(-2px); }
.glance-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.glance-row .keys { margin-top: 14px; }
.steps { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 6px; color: var(--dim); }
.steps strong { color: var(--text); }

/* In detail ------------------------------------------------------------------ */
.detail-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 clamp(32px, 5vw, 48px); }
.detail-nav a { padding: 8px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.detail-nav a:hover { border-color: var(--blue); color: var(--blue); }
.detail {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--border); scroll-margin-top: 80px;
}
.detail:nth-of-type(even) .detail-media { order: 2; }
.detail--text { grid-template-columns: minmax(0, 1fr); }
.detail-media { margin: 0; }
.detail-media img { width: 100%; border-radius: var(--r); border: 1px solid var(--border); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); }
/* screenshot carousel: a scroll-snap strip (swipe works without the script); the script adds the bar */
.car-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  overscroll-behavior-x: contain; border-radius: var(--r); border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); background: var(--panel);
}
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.car-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.detail-media .car-slide img { display: block; border: 0; border-radius: 0; box-shadow: none; aspect-ratio: 1600 / 1060; object-fit: cover; }
.car-slide figcaption { padding: 8px 12px; font-size: 0.85rem; color: var(--dim); }
.carousel.is-ready .car-slide figcaption { display: none; }
.car-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.car-label { flex: 1; min-width: 0; font-size: 0.88rem; color: var(--dim); }
.car-label b { color: var(--text); font-weight: 700; }
.car-count { font-family: var(--font-mono); font-size: 0.8rem; margin-right: 8px; }
.car-dots { display: flex; gap: 6px; }
.car-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--border); cursor: pointer; transition: width 0.2s, background 0.2s; }
.car-dot[aria-current="true"] { width: 22px; background: var(--blue); }
.car-btn {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); font: 700 1rem/1 var(--font);
}
.car-btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.car-btn:disabled { opacity: 0.35; cursor: default; }
.detail-text h3 { font: 800 clamp(1.4rem, 2.6vw, 1.9rem)/1.1 var(--font-head); letter-spacing: -0.02em; margin: 10px 0 10px; }
.detail-text > p { color: var(--dim); margin-bottom: 14px; }
.detail-text ul { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.detail-text li { color: var(--dim); font-size: 0.95rem; }
.detail-text li b { color: var(--text); }
.detail-text ul.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; }
#glance [id], .detail { scroll-margin-top: 80px; }

/* Fold-away extras ---------------------------------------------------------- */
.more { margin-top: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); }
.more summary { cursor: pointer; padding: 14px 18px; font-weight: 700; }
.more summary:hover { color: var(--blue); }
.more-body { padding: 0 18px 18px; color: var(--dim); font-size: 0.93rem; }
.more-body p { margin-top: 12px; }
/* release notes, filled from releases.json */
.notes { max-width: 860px; margin-top: 18px; color: var(--dim); }
.notes > :first-child { margin-top: 0; }
.notes h3 { margin: 0 0 4px; font-size: 1.35rem; color: var(--text); }
.notes h4, .notes h5, .notes h6 { margin: 22px 0 8px; font-size: 1rem; color: var(--text); }
.notes p { margin: 10px 0 0; }
.notes ul, .notes ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.notes strong { color: var(--text); }
.notes code { font-family: var(--font-mono); font-size: 0.88em; }
.notes a { color: var(--blue); }
.notes .rel-link { margin-top: 18px; font-weight: 600; }
.rel-list { display: grid; padding-bottom: 6px; }
.rel { border-top: 1px solid var(--border); }
.rel summary { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; cursor: pointer; }
.rel summary:hover .rel-v { color: var(--blue); }
.rel summary::after { content: '+'; margin-left: auto; font: 700 1.1rem/1 var(--font-mono); color: var(--dim); }
.rel[open] summary::after { content: '\2212'; }
.rel-v { font: 800 1.05rem/1 var(--font-mono); color: var(--text); }
.rel-date { font-size: 0.85rem; }
.rel .notes { margin: 0 0 18px; font-size: 0.93rem; }
.rel .notes > h4:first-child { margin-top: 0; }

.keys { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.key { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 0.92rem; }
kbd { font: 700 0.8rem/1 var(--font-mono); padding: 8px 10px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--border); border-bottom-width: 3px; color: var(--text); }

/* Tables */
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.two > div:last-child { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 14px; align-items: start; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font: 700 0.72rem/1.3 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
td.y { color: var(--green); font-weight: 700; }
td.n { color: var(--dim); }
.versions { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.versions span { text-align: center; padding: 14px 0; border-radius: var(--r); background: var(--panel-2); font: 700 0.95rem/1 var(--font-mono); border-bottom: 3px solid var(--green); }

/* Download ---------------------------------------------------------------- */
.dl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.dl { display: flex; flex-direction: column; gap: 16px; }
.dl--main { border-color: var(--blue); }
.dl h3 { font: 800 1.5rem/1.1 var(--font-head); letter-spacing: -0.02em; }
.dl p, .dl li { color: var(--dim); font-size: 0.95rem; }
.dl ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.dl .btn { align-self: flex-start; }
.dl .hash { font: 500 0.7rem/1.5 var(--font-mono); color: var(--dim); word-break: break-all; }
.note { margin-top: 14px; padding: 16px 18px; border-left: 3px solid var(--amber); background: var(--panel); border-radius: 0 var(--r) var(--r) 0; color: var(--dim); font-size: 0.95rem; }
.note strong { color: var(--text); }

.legal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.legal .panel p { color: var(--dim); font-size: 0.92rem; margin-top: 10px; }

.ob-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--dim); font-size: 0.88rem; }
.ob-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.ob-footer a { color: var(--text); text-decoration: none; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1180px) {
  .features--5 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .hero-grid, .dl-grid, .two > div:last-child { grid-template-columns: minmax(0, 1fr); }
  .features, .legal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail, .glance-row { grid-template-columns: minmax(0, 1fr); }
  .detail:nth-of-type(even) .detail-media { order: 0; }
}
@media (max-width: 680px) {
  .ob-header nav a:not(.btn) { display: none; }
  .back { display: none; }
  .features, .legal, .features--5, .detail-text ul.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .versions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile { min-height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
