/* Tunnel Control™ website: one layout, two colour themes.
   html[data-theme="light" | "dark"] is set before the first paint by the script in <head>: the visitor's
   saved choice, otherwise the system preference. Everything that differs between the themes is a custom
   property below, so switching the theme changes colours and decoration but never moves the layout. */

/* ---------- Fonts ---------- */
/* Served from this site: the latin subsets of the Google Fonts builds, variable in weight, under the
   SIL Open Font License (fonts/OFL.txt). Characters outside the range fall back to the next font. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  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;
}

/* ---------- Light theme (also the fallback without JavaScript) ---------- */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --surface: #f5f7fa;
  --border: #dfe6ee;
  --text: #071832;
  --muted: #4b5f73;
  --accent: #06d0f6;
  --accent-ink: #0b7fa3;
  --link: #0b7fa3;
  --btn: #071832;
  --btn-text: #ffffff;
  --warn: #d97706;
  --warn-bg: #fff7ed;
  --ok: #15803d;
  --radius: 12px;
  /* Fonts are shared by both themes. */
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --frame: #071832;
  --shadow: 0 12px 40px rgba(7, 24, 50, .12);
  --code-bg: #0b1a30;
  --code-text: #e6f1f8;
  --kicker: #0b7fa3;

  --page-bg: #ffffff;
  --page-grid: none;
  --header-bg: #ffffff;
  --header-border: var(--border);
  --header-stuck-bg: rgba(255, 255, 255, .86);
  --header-stuck-shadow: 0 6px 24px rgba(7, 24, 50, .07);
  --nav-mark-shadow: none;
  --footer-bg: var(--bg-alt);
  --mark-bg: currentColor;
  --mark-mask: url("img/mark-mask.webp") center / contain no-repeat;
  --inline-code-bg: #eef2f6;
  --inline-code-border: #e2e8f0;
  --code-border: transparent;
  --copy-border: rgba(255, 255, 255, .25);
  --terminal-bar-text: #9fb6c9;
  --terminal-bar-border: rgba(255, 255, 255, .08);
  --ghost-border: #c7d2de;
  --window-dot: #cbd5e1;
  --glass: none;
  --glow-install: none;
  --glow-btn: none;
  --glow-frame: var(--shadow);
  --phone-border: var(--frame);
  --node-main-bg: #ffffff;
  --node-main-shadow: 0 0 0 1px var(--accent) inset;
  --h2-dot: none;
  --h2-indent: 0px;
  --kicker-dash: inline-block;
  --show-dark: none;
  --show-light: block;
  --lock-text: #071832;
  --lock-bg:
    linear-gradient(rgba(7, 24, 50, .05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(7, 24, 50, .05) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(120% 75% at 50% 0%, #d9f6fd 0%, #eef9fd 40%, #f7fbfd 75%, #ffffff 100%);
  --notif-bg: rgba(255, 255, 255, .72);
  --notif-shadow: 0 1px 2px rgba(7, 24, 50, .08), 0 0 0 1px rgba(7, 24, 50, .05) inset;
  --notif-text: rgba(7, 24, 50, .88);
  --toggle-track: #e9eef4;
  --toggle-border: #d3dce6;
  --toggle-knob: #ffffff;
  --toggle-icon: #f59e0b;
  --toggle-knob-shadow: 0 1px 3px rgba(7, 24, 50, .25);
  --toggle-x: 0px;
  --rdpex-ink: #0b2341; /* the ink of the rdpex logo on light backgrounds */
  /* Hovered tab of the panel screenshot: the panel turns the label from #6b7280 to #d1d5db. This maps
     the grey to that colour and keeps the white background white. */
  --tab-hover-filter: invert(1) brightness(.3) invert(1);
}

/* ---------- Dark theme (Neon: the app icon as the visual system) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #041226;
  --bg-alt: transparent;
  --surface: rgba(7, 24, 50, .55);
  --border: rgba(126, 207, 246, .18);
  --text: #eaf6fb;
  --muted: #8fb3c7;
  --accent: #06d0f6;
  --accent-ink: #06d0f6;
  --link: #7ecff6;
  --btn: #06d0f6;
  --btn-text: #031a2b;
  --warn: #ffb347;
  --warn-bg: rgba(255, 179, 71, .08);
  --ok: #36e39a;
  --radius: 18px;
  --frame: #0b2f4f;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --code-bg: rgba(2, 13, 35, .7);
  --code-text: #d9f3fb;
  --kicker: #06d0f6;

  --page-bg: radial-gradient(120% 70% at 50% -10%, #155585 0%, #0b2f4f 28%, #071832 58%, #020d23 100%) fixed #020d23;
  --page-grid:
    linear-gradient(rgba(126, 207, 246, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 207, 246, .07) 1px, transparent 1px);
  --header-bg: transparent;
  --header-border: transparent;
  --header-stuck-bg: rgba(4, 18, 38, .78);
  --header-stuck-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --nav-mark-shadow: 0 0 10px rgba(6, 208, 246, .6);
  --footer-bg: transparent;
  --mark-bg: url("img/mark-color.webp") center / contain no-repeat;
  --mark-mask: none;
  --inline-code-bg: var(--surface);
  --inline-code-border: var(--border);
  --code-border: var(--border);
  --copy-border: var(--border);
  --terminal-bar-text: var(--muted);
  --terminal-bar-border: var(--border);
  --ghost-border: var(--border);
  --window-dot: var(--border);
  --glass: blur(10px);
  --glow-install: 0 0 0 1px rgba(6, 208, 246, .15), 0 0 32px rgba(6, 208, 246, .12);
  --glow-btn: 0 0 24px rgba(6, 208, 246, .35);
  --glow-frame: var(--shadow), 0 0 40px rgba(6, 208, 246, .12);
  --phone-border: #0f3b61;
  --node-main-bg: var(--surface);
  --node-main-shadow: 0 0 0 1px var(--accent) inset, 0 0 30px rgba(6, 208, 246, .18);
  --h2-dot: block;
  --h2-indent: 26px;
  --kicker-dash: none;
  --show-dark: block;
  --show-light: none;
  --lock-text: #ffffff;
  --lock-bg:
    linear-gradient(rgba(126, 207, 246, .06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(126, 207, 246, .06) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(120% 75% at 50% 0%, #155585 0%, #0b2f4f 34%, #071832 66%, #020d23 100%);
  --notif-bg: rgba(22, 36, 58, .62);
  --notif-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset;
  --notif-text: rgba(255, 255, 255, .92);
  --toggle-track: rgba(6, 208, 246, .10);
  --toggle-border: rgba(126, 207, 246, .35);
  --toggle-knob: #06d0f6;
  --toggle-icon: #031a2b;
  --toggle-knob-shadow: 0 0 12px rgba(6, 208, 246, .55);
  --toggle-x: 22px;
  --rdpex-ink: #ffffff;
  /* #9ca3af to #d1d5db; the near-black background barely changes. */
  --tab-hover-filter: brightness(1.3) saturate(.5);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset); }
body {
  margin: 0;
  min-width: 360px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}
/* The faint grid of the dark theme, fading out from the top centre. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--page-grid);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 100%);
}
a { color: var(--link); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
.section-tight { padding: 8px 0 24px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -.025em; }
h2 { position: relative; padding-left: var(--h2-indent); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .6em; }
h2::before {
  content: ""; display: var(--h2-dot); position: absolute; left: 2px; top: .42em;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px #06d0f6, 0 0 14px rgba(6, 208, 246, .7);
}
h3 { font-size: 1.08rem; margin-bottom: .4em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.lead-sm { color: var(--muted); max-width: 70ch; margin-bottom: 36px; }
.kicker {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kicker);
  margin: 0 0 14px;
}
.kicker::before {
  content: ""; display: var(--kicker-dash); width: 18px; height: 3px;
  background: var(--accent); margin-right: 10px; vertical-align: middle;
}
.accent { color: var(--accent-ink); font-style: normal; }
code, pre, kbd, .mono { font-family: var(--mono); }
p code, li code, td code, h2 code, h3 code {
  font-size: .9em;
  padding: .1em .35em;
  border-radius: 5px;
  background: var(--inline-code-bg);
  border: 1px solid var(--inline-code-border);
  overflow-wrap: anywhere;
}

/* Header */
.site-header { padding: 18px 0; background: var(--header-bg); border-bottom: 1px solid var(--header-border); }
/* Where the menu shows, the header stays on top: transparent over the hero as before, with its own
   background once the page scrolls (site.js sets .is-stuck). Anchors stop below it. */
:root { --header-offset: 0px; }
@media (min-width: 741px) {
  :root { --header-offset: 71px; } /* the height of .site-header */
  .site-header { position: sticky; top: 0; z-index: 50; transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease; }
  .site-header.is-stuck {
    background: var(--header-stuck-bg); border-bottom-color: var(--border); box-shadow: var(--header-stuck-shadow);
    -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  }
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-end { display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
/* One box for the mark in both themes: the icon set shares its proportions with logo-color.png. */
.mark {
  display: inline-block; flex: none; width: 34px; height: 34px;
  background: var(--mark-bg);
  -webkit-mask: var(--mark-mask);
  mask: var(--mark-mask);
}
.nav { display: flex; flex: none; gap: 26px; font-weight: 500; font-size: .95rem; }
.nav a { position: relative; color: var(--muted); text-decoration: none; transition: color .2s ease; }
.nav a[aria-current] { color: var(--text); }
.nav a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: var(--accent); box-shadow: var(--nav-mark-shadow);
}
.nav a:hover { color: var(--text); }
.nav .nav-github { color: var(--text); }

/* Theme switch: the knob carries the icon of the current theme. */
.theme-toggle {
  position: relative; flex: none; width: 50px; height: 28px; padding: 0;
  border: 1px solid var(--toggle-border); border-radius: 999px;
  background: var(--toggle-track); cursor: pointer;
}
.theme-knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--toggle-knob); color: var(--toggle-icon); box-shadow: var(--toggle-knob-shadow);
  transform: translateX(var(--toggle-x));
  transition: transform .2s ease, background-color .2s ease;
}
.theme-knob svg { grid-area: 1 / 1; width: 14px; height: 14px; }
.theme-knob .icon-sun { display: var(--show-light); }
.theme-knob .icon-moon { display: var(--show-dark); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Hero */
.hero { padding: 72px 0 56px; }
/* The text column is sized so that the install one-liner stays on one line down to 1120px wide. */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-visual { min-width: 0; }
.hero .window { box-shadow: var(--glow-frame); }
.hero .window img { aspect-ratio: 16 / 11; object-fit: cover; object-position: top; }
/* The hero box is only as wide as the command and its button. */
.hero .install { width: fit-content; max-width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: calc(var(--radius) - 4px);
  font-weight: 600; text-decoration: none; border: 1px solid transparent; font-size: .95rem;
}
.btn-primary { background: var(--btn); color: var(--btn-text); box-shadow: var(--glow-btn); }
.btn-ghost { border-color: var(--ghost-border); color: var(--text); }
.btn:hover { filter: brightness(1.08); }

/* Install one-liner */
.install {
  display: flex; align-items: center; gap: 12px;
  margin: 26px 0 10px; padding: 12px 12px 12px 18px;
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid var(--code-border); border-radius: calc(var(--radius) - 4px);
  box-shadow: var(--glow-install);
  font-family: var(--mono); font-size: .9rem; overflow: hidden;
}
/* The command wraps when the box is too narrow instead of scrolling or stretching its column. */
.install code { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.prompt { color: var(--accent); margin-right: .4em; user-select: none; }
.copy {
  flex: none; display: inline-grid; text-align: center;
  border: 1px solid var(--copy-border); background: transparent; color: var(--code-text);
  padding: 7px 12px; border-radius: 8px; font: inherit; font-size: .8rem; cursor: pointer;
}
/* Both labels share one grid cell: the button is as wide as the longer one and never changes size. */
.copy > span { grid-area: 1 / 1; }
.copy .copy-done, .copy.is-done .copy-label { visibility: hidden; }
.copy.is-done .copy-done { visibility: visible; }
.copy:hover { border-color: var(--accent); color: var(--accent); }

/* Frames */
.card, .node, .window, .terminal, .warn { -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); }
.window {
  margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.window-bar {
  height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 14px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--window-dot); display: block; }
.window-title { margin-left: 10px; font-size: .78rem; color: var(--muted); font-family: var(--mono); }
.window img { display: block; width: 100%; height: auto; }
.phone {
  margin: 0; border: 9px solid var(--phone-border); border-radius: 38px; overflow: hidden;
  background: #000; box-shadow: var(--glow-frame);
}
.phone img { display: block; width: 100%; height: auto; }
.terminal {
  margin: 0; border: 1px solid var(--code-border); border-radius: var(--radius); overflow: hidden;
  background: var(--code-bg); box-shadow: var(--shadow);
}
.terminal-bar {
  padding: 10px 16px; border-bottom: 1px solid var(--terminal-bar-border);
  font-family: var(--mono); font-size: .85rem; color: var(--terminal-bar-text);
}
.console {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  font-size: 12.5px; line-height: 1.5; color: var(--code-text);
}
.console .ok { color: var(--ok); font-weight: 600; }
.code {
  margin: 0; padding: 18px; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid var(--code-border); border-radius: var(--radius);
  font-size: 12px; line-height: 1.55; /* the longest config line then fits an equal column at 1120px and up */
}
.code .c { color: var(--accent); }
.code .cm { color: var(--muted); }

/* Warning */
.warn {
  border: 1px solid var(--border); border-left: 4px solid var(--warn);
  background: var(--warn-bg); padding: 22px 26px; border-radius: var(--radius);
}
/* The warning title is an h2 for the outline of the page, set like an h3. */
.warn .warn-title { padding-left: 0; font-size: 1.08rem; color: var(--warn); margin-bottom: .3em; }
.warn .warn-title::before { display: none; }
.warn p { margin: 0; }
/* Server and VPS side by side keep the lines short without leaving an empty field on the right. */
.warn-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 36px; margin: .7em 0 0; padding: 0; list-style: none; }
@media (max-width: 760px) {
  .warn-list { grid-template-columns: minmax(0, 1fr); }
}

/* Grids and cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.card p { margin: 0; color: var(--muted); }
.req-grid { grid-template-columns: 1fr; }
.config-row { margin-top: 44px; }

/* Diagram */
.diagram { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr) auto minmax(0, 1fr); gap: 14px; align-items: center; margin: 8px 0 44px; }
.node { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.node-main { border-color: var(--accent); background: var(--node-main-bg); box-shadow: var(--node-main-shadow); }
.node-title { font-weight: 700; margin-bottom: 6px; }
.node-sub { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.node-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.arrow { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 128px; padding: 0 6px; }
.arrow span { font-size: .72rem; line-height: 1.3; text-align: center; color: var(--muted); }
.arrow i { position: relative; display: block; width: 100%; height: 2px; background: var(--border); }
.arrow i::after {
  content: ""; position: absolute; right: -1px; top: -5px;
  border: 6px solid transparent; border-left: 8px solid var(--border); border-right: 0;
}
.arrow-multi i { background: var(--accent); }
.arrow-multi i::after { border-left-color: var(--accent); }
.arrow-multi span { color: var(--accent-ink); }

/* Panel section */
.shot-desktop { margin-bottom: 28px; }

/* Interactive panel: stacked screenshots that cross-fade, with invisible buttons over the tabs. */
.demo-stage { position: relative; aspect-ratio: 1976 / 1739; background: var(--surface); }
.window .demo-shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .45s ease;
}
.window .demo-shot.is-active { opacity: 1; }
.demo-tabs { position: absolute; inset: 0; pointer-events: none; }
.demo-tab {
  position: absolute; top: 11.5%; height: 5.25%; left: var(--x); width: var(--w);
  margin: 0; padding: 0; border: 0; border-radius: 6px;
  background: transparent; cursor: pointer; pointer-events: auto;
}
/* Like the panel: the label of a hovered tab changes its colour; the open tab does not react. The filter
   hugs the label (rows 229-259 of the screenshot, columns per tab), so the background around it is untouched. */
.demo-tab::before { content: ""; position: absolute; left: var(--fx); width: var(--fw); top: 31.76%; height: 33.95%; }
.demo-tab[aria-selected="false"]:hover::before {
  -webkit-backdrop-filter: var(--tab-hover-filter); backdrop-filter: var(--tab-hover-filter);
}
.demo-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.phones { display: grid; grid-template-columns: repeat(3, 230px); gap: 28px; justify-content: center; margin-bottom: 56px; }
.console-block h3 { margin-top: 8px; }
.console-block .terminal { max-width: 980px; }

/* Push notifications */
.push { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: center; margin: 8px 0 64px; }
.push-events { list-style: none; margin: 0 0 18px; padding: 0; }
.push-events li { display: flex; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; transform: translateY(1px); }
.dot-bad { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(234, 179, 8, .18); }
.phone-lock { width: 300px; border-radius: 42px; }
.lock {
  position: relative; height: 610px; padding: 64px 12px 16px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  color: var(--lock-text); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--lock-bg);
}
.lock-time { font-size: 64px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.lock-date { margin-top: 8px; font-size: 15px; font-weight: 500; opacity: .85; }
.notifs { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.notif {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 20px; text-align: left;
  background: var(--notif-bg); box-shadow: var(--notif-shadow);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.phone .notif-icon { flex: none; display: block; width: 36px; height: 36px; margin-top: 1px; border-radius: 8px; }
.notif-main { min-width: 0; flex: 1; }
.notif-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 1.25; }
.notif-head b { font-weight: 600; }
.notif-head span { flex: none; opacity: .6; font-size: 12px; }
.notif p { margin: 2px 0 0; font-size: 13px; line-height: 1.3; color: var(--notif-text); }

/* Install section: the left column holds the one-liner, so it gets the larger share. */
.install-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.install-row .install { margin-top: 0; }
.steps { margin: 26px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-left: 44px; margin-bottom: 16px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--accent-ink);
  font-weight: 700; font-size: .9rem; font-family: var(--mono);
}
.table-title { margin-top: 48px; }
.table { width: 100%; border-collapse: collapse; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
/* Commands stay on one line; the column grows to the longest one (the narrow layout below lets them wrap). */
.table td:first-child { width: 36%; white-space: nowrap; }
.table td:last-child { color: var(--muted); }

/* Footer */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--border); padding: 40px 0 48px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.brand-footer { margin-bottom: 12px; }
.footer-links { display: flex; gap: 18px; font-size: .95rem; }
.footer-meta { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }
.rdpex { display: inline-flex; color: var(--rdpex-ink); opacity: .9; }
.rdpex:hover { opacity: 1; }
.rdpex svg { display: block; height: 30px; width: auto; }

/* Screenshots exist in both themes; each theme shows its own. */
.only-dark-shot, .window img.only-dark-shot { display: var(--show-dark); }
.only-light-shot, .window img.only-light-shot { display: var(--show-light); }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  /* Below this the one-liner and the longest config line no longer fit their columns (a desktop scrollbar
     takes about 15px of the viewport): one column each. */
  .hero-grid, .config-row, .install-row { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 40px; }
}
@media (max-width: 960px) {
  .grid-2, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { gap: 18px; font-size: .9rem; }
  .header-end { gap: 20px; }
  .diagram { grid-template-columns: minmax(0, 1fr); }
  .arrow { flex-direction: row; min-width: 0; padding: 4px 0; gap: 14px; justify-content: center; }
  .arrow i { width: 2px; height: 44px; }
  .arrow i::after { right: -5px; top: auto; bottom: -1px; border: 6px solid transparent; border-top: 8px solid var(--border); border-bottom: 0; }
  .arrow-multi i::after { border-top-color: var(--accent); }
  .arrow span { text-align: left; }
  .phones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .push { grid-template-columns: minmax(0, 1fr); gap: 32px; justify-items: center; }
  .push-copy { justify-self: stretch; }
  .phone { border-width: 6px; border-radius: 26px; }
  .table td:first-child { width: auto; white-space: normal; }
}
@media (max-width: 740px) {
  /* Brand, menu and theme switch need about 720px; below that only the brand and the switch stay. */
  .nav { display: none; }
}
@media (max-width: 830px) {
  /* The console sample is 96 columns wide: a smaller type keeps it on screen down to about 720px; below that it scrolls. */
  .console { font-size: 11px; }
}
@media (max-width: 640px) {
  section { padding: 52px 0; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .phones { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .phones .phone:nth-child(3n) { display: none; }
  .install { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .theme-knob, .window .demo-shot { transition: none; }
}

/* ---------- Documentation (docs/index.html, built by tools/build-docs.py from the README) ---------- */
.doc-main { padding: 48px 0 88px; }
.doc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc-toc { position: sticky; top: calc(var(--header-offset) + 24px); max-height: calc(100vh - var(--header-offset) - 48px); overflow-y: auto; font-size: .9rem; }
.doc-toc-title { margin: 0 0 12px; font-weight: 600; color: var(--text); }
.doc-toc ol, .doc-toc-mobile ol { list-style: none; margin: 0; padding: 0; }
.doc-toc ol { border-left: 1px solid var(--border); }
.doc-toc a { display: block; margin-left: -1px; padding: 4px 0 4px 13px; border-left: 2px solid transparent; }
.doc-toc .toc-3 a { padding-left: 25px; font-size: .85rem; }
.doc-toc a[aria-current] { color: var(--text); border-left-color: var(--accent); }
.doc-toc-mobile li { margin: 0 0 7px; }
.doc-toc-mobile .toc-3 { padding-left: 14px; font-size: .85rem; }
.doc-toc a, .doc-toc-mobile a { color: var(--muted); text-decoration: none; }
.doc-toc a:hover, .doc-toc-mobile a:hover { color: var(--text); }
.doc-toc-mobile { display: none; }

/* About 75 characters a line, as the frontend-design guidance asks. */
.doc { min-width: 0; max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.doc h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 2.1em 0 .6em; scroll-margin-top: 20px; }
.doc h3 { font-size: 1.15rem; margin: 1.8em 0 .5em; scroll-margin-top: 20px; }
.doc-anchor::before { content: "#"; }
.doc-anchor { margin-left: .35em; color: var(--muted); font-weight: 400; text-decoration: none; opacity: 0; }
.doc h2:hover .doc-anchor, .doc h3:hover .doc-anchor, .doc-anchor:focus-visible { opacity: 1; }
.doc-source { color: var(--muted); margin-bottom: 2.2em; }
.doc-source time { white-space: nowrap; }
.doc ul, .doc ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.doc li { margin: 0 0 .45em; }
.doc li > ul, .doc li > ol { margin: .45em 0 0; }

/* Commands look like the terminal of the home page; the diagram keeps its columns. */
.doc-code { margin: 0 0 1.3em; }
.doc-code .terminal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 16px; }
.doc-code .console { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-code .cm { color: var(--terminal-bar-text); }
.doc-pre.code { margin: 0 0 1.3em; white-space: pre; overflow-wrap: normal; overflow-x: auto; }

.table-wrap { margin: 0 0 1.4em; overflow-x: auto; }
.doc-table th { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: .9rem; color: var(--text); }
.doc-table td:first-child { width: auto; }

.doc-alert { margin: 0 0 1.4em; }
.doc-alert-title { margin: 0 0 .35em; font-family: var(--font-head); font-weight: 700; color: var(--warn); }
.doc-alert ul { margin: .6em 0 0; }
.doc-note { padding: 18px 22px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.doc-note .doc-alert-title { color: var(--accent-ink); }

@media (max-width: 960px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { display: none; }
  .doc-toc-mobile { display: block; margin: 0 0 2em; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); }
  .doc-toc-mobile summary { cursor: pointer; font-weight: 600; }
  .doc-toc-mobile ol { margin-top: 12px; }
}

/* ---------- The 404 page (404.html, built by tools/build-docs.py) ---------- */
.error-main { padding: 14vh 0 18vh; }
.error-main .lead { margin-bottom: 0; }

/* Interface pieces are not text to copy: a double click or a drag over them selects nothing.
   Texts, commands and code stay selectable. */
.site-header, .btn, .copy, .demo-tabs, .window-bar, .kicker, .phone, .phone-lock,
.diagram .arrow, .doc-anchor, .doc-toc, .doc-toc-mobile, .doc-code .terminal-bar span,
.rdpex, .footer-meta {
  -webkit-user-select: none;
  user-select: none;
}
