@font-face {
  font-family: "Cuprum";
  src: url("fonts/cuprum-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cuprum";
  src: url("fonts/cuprum-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Tokens mirror src/theme.rs so the page and the app read as one product. */
:root {
  --bg: #0e1116;
  --panel: #12161d;
  --card: #151a22;
  --line: #242c38;
  --text: #f1f1f1;
  --muted: #a9a9ad;
  --accent: #3fd0d8;
  --accent-deep: #216470;
  --warn: #f2a33c;
  --dock: 280px;
  --gutter: clamp(16px, 6vw, 96px);
  --measure: 40rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.1875rem/1.5 "Cuprum", "Arial Narrow", sans-serif;
  font-kerning: normal;
}

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; }
p, ul, ol, dl, figure { margin: 0; }
p { text-wrap: pretty; }
code, kbd, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.84em; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--accent); color: var(--bg); padding: 8px 14px; border-radius: 6px; font-weight: 700;
}
.skip:focus { top: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Shell: content on the left, the panel docked to the right edge ---------- */

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "hero" "dock" "rest";
}
.hero { grid-area: hero; }
.dock { grid-area: dock; }
.rest { grid-area: rest; }

@media (min-width: 960px) {
  .shell {
    grid-template-columns: minmax(0, 1fr) var(--dock);
    grid-template-rows: auto 1fr;
    grid-template-areas: "hero dock" "rest dock";
  }
  .dock {
    position: sticky; top: 0; align-self: start;
    height: 100vh; height: 100dvh;
    border-left: 1px solid var(--line);
  }
}

.hero, .rest > * { padding-inline: var(--gutter); }

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

.hero {
  padding-block: clamp(48px, 10vh, 120px) 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-content: start;
}
@media (min-width: 960px) { .hero { min-height: min(100vh, 60rem); min-height: min(100dvh, 60rem); align-content: center; } }

h1 {
  display: flex; align-items: baseline; gap: 0.18em;
  font-size: clamp(3.5rem, 2rem + 6vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.015em;
}
.logo { width: 0.62em; height: 0.62em; fill: var(--accent); flex: none; }

.lede { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); line-height: 1.4; max-width: 34rem; color: var(--text); }

.get { display: grid; gap: 14px; justify-items: start; }
.btn {
  display: inline-grid; gap: 2px;
  padding: 14px 26px 12px;
  background: var(--accent); color: var(--bg);
  border-radius: 7px;
  text-decoration: none;
  font-size: 1.375rem; font-weight: 700; line-height: 1.1;
  touch-action: manipulation;
}
.btn small { font-size: 0.95rem; font-weight: 400; opacity: 0.8; }
.btn:hover { background: #6fe0e6; }
.btn:focus-visible { outline-color: var(--text); }
.get-alt { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 1.0625rem; }

/* Panel-style label/value rows, the app's core visual unit. */
.spec { display: grid; max-width: 26rem; border-top: 1px solid var(--line); }
.spec > div {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.spec dt { color: var(--muted); }
.spec dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.spec-wide { max-width: 30rem; margin-block: 8px; }
.spec-wide dd { color: var(--accent); font-weight: 700; font-size: 1.375rem; line-height: 1.2; }

/* ---------- Docked demo panel ---------- */

.dock {
  display: flex; flex-direction: column;
  background: #0b0d11;
  margin: 0 var(--gutter) 24px;
  border: 1px solid var(--line); border-radius: 8px;
  max-height: 34rem;
  overflow: hidden;
}
@media (min-width: 960px) {
  .dock { margin: 0; border-width: 0 0 0 1px; border-radius: 0; max-height: none; }
}

.mh {
  flex: 1; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  padding: 10px 14px 16px;
  font-size: 15px; line-height: 1.45;
}
.mh-top { display: flex; justify-content: space-between; align-items: center; }
.mh-brand {
  display: flex; align-items: center; gap: 7px;
  color: var(--muted); font-weight: 700; font-size: 14px; letter-spacing: 0.08em;
}
.mh-brand svg { width: 16px; height: 16px; fill: var(--accent); }
.mh-icons { display: flex; gap: 6px; }
.mh-icons i {
  display: grid; place-items: center; width: 22px; height: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  font-style: normal; font-size: 12px; color: var(--text);
}
.mh-clock { font-weight: 700; font-size: 38px; line-height: 1.05; color: var(--accent); margin-top: 2px; font-variant-numeric: tabular-nums; }
.mh-date { color: var(--text); font-size: 15px; padding-bottom: 10px; }

.mh-b { position: relative; padding: 9px 0 10px; border-top: 1px solid var(--line); }
.mh-h { font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; font-size: 19px; line-height: 1.25; }
.mh-h b { color: var(--accent); font-variant-numeric: tabular-nums; }
.mh-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-r { position: relative; display: flex; justify-content: space-between; gap: 8px; }
.mh-r > :first-child { color: #d6d6d9; }
.mh-r > :last-child { font-variant-numeric: tabular-nums; }
.mh-app { font-size: 13.5px; }
.mh-app > :first-child { color: var(--muted); padding-left: 10px; }
.mh-r.mh-app:first-of-type, .mh-r:not(.mh-app) + .mh-app { margin-top: 4px; }

.spark { position: absolute; right: 0; bottom: 0; width: 46%; height: 62%; pointer-events: none; }
.spark .a { fill: var(--accent); opacity: 0.08; }
.spark .l { fill: none; stroke: var(--accent); stroke-width: 1.25; opacity: 0.45; vector-effect: non-scaling-stroke; }

.dock-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px; border-top: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-size: 13.5px; line-height: 1.3;
}
.dock-foot button {
  flex: none;
  font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 5px;
  padding: 5px 10px; cursor: pointer; touch-action: manipulation;
}
.dock-foot button:hover { border-color: var(--accent); }

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

.sec {
  padding-block: 64px;
  border-top: 1px solid var(--line);
  display: grid; gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}
.sec > * { max-width: var(--measure); }
.sec h2 { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.625rem); margin-bottom: 4px; }
.sec h3 { font-size: 1.5rem; margin-top: 18px; }
.note { color: var(--muted); font-size: 1.0625rem; }

.devices { border-top: 1px solid var(--line); }
.devices > div {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 4px 24px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.devices dt { font-weight: 700; font-size: 1.25rem; line-height: 1.3; }
.devices dd { margin: 0; color: #d6d6d9; }
@media (max-width: 520px) { .devices > div { grid-template-columns: 1fr; } }

.nodata {
  display: grid; grid-template-columns: 15rem 1fr; gap: 24px; align-items: start;
  margin-top: 14px;
}
.nodata-row {
  display: flex; justify-content: space-between;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 7px;
  background: #0b0d11; font-size: 15px;
}
.nodata-row span:last-child { color: var(--muted); }
@media (max-width: 640px) { .nodata { grid-template-columns: 1fr; gap: 12px; } .nodata-row { max-width: 15rem; } }

.list { padding-left: 1.1em; display: grid; gap: 6px; }
.list li::marker { color: var(--accent); }

.shot { max-width: 52rem; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.shot figcaption { color: var(--muted); font-size: 1.0625rem; margin-top: 10px; }

.keys { display: grid; gap: 10px; }
.keys > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.keys dt { min-width: 11rem; }
.keys dd { margin: 0; }
kbd {
  display: inline-block; min-width: 2em; padding: 2px 7px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  color: var(--text);
}

/* Tables */
.table-wrap, .dl-wrap { overflow-x: auto; max-width: 56rem; }
table { border-collapse: collapse; width: 100%; font-size: 1.0625rem; line-height: 1.35; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); font-weight: 400; border-bottom-color: #3a4250; }
tbody th { font-weight: 700; }
td.no { color: var(--muted); }
.table-wrap table { min-width: 40rem; }
.table-wrap tbody th { position: sticky; left: 0; background: var(--bg); min-width: 9rem; }
.dl { max-width: 40rem; }
.dl td { font-variant-numeric: tabular-nums; white-space: nowrap; }

.os { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.steps { padding-left: 1.4em; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.steps li::marker { color: var(--accent); font-weight: 700; }
pre {
  margin: 10px 0 0; padding: 12px 14px; overflow-x: auto;
  background: #0b0d11; border: 1px solid var(--line); border-radius: 7px;
  line-height: 1.5;
}
:not(pre) > code { background: var(--card); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

.foot {
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 1.0625rem;
  display: grid; gap: 10px;
}
.foot p:last-child { display: flex; flex-wrap: wrap; gap: 6px 22px; }
