/*
 * TunnelConnect site — 1980s neon with Tron styling (spec §8).
 *
 * Rules this file keeps:
 * - Text colours come only from the tokens in :root; test/theme.test.js
 *   checks every text token against --void and --panel (≥ 5.9:1).
 * - Glow is decoration. Meaning is always carried by text, never glow alone.
 * - Motion is off under prefers-reduced-motion; glows and art are off under
 *   prefers-contrast: more and forced-colors.
 * - No inline styles anywhere (the CSP is style-src 'self').
 */

/* Orbitron and Share Tech Mono declare Reserved Font Names, so they are the
   unmodified upstream files from google/fonts (a subset would be a Modified
   Version, OFL FAQ 2.6). Exo 2 has no RFN, so its latin subsets are fine. */
@font-face { font-family: "Orbitron"; font-weight: 400 900; font-display: swap; src: url("/fonts/orbitron-variablefont-wght.ttf") format("truetype"); }
@font-face { font-family: "Exo 2"; font-weight: 400; font-display: swap; src: url("/fonts/exo-2-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/exo-2-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 500; font-display: swap; src: url("/fonts/exo-2-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 600; font-display: swap; src: url("/fonts/exo-2-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Share Tech Mono"; font-weight: 400; font-display: swap; src: url("/fonts/share-tech-mono-regular.ttf") format("truetype"); }

:root {
  /* Surfaces */
  --void: #07060f;
  --panel: #0f0d24;
  --magenta-deep: #3a0a30;
  /* Text tokens (contrast-tested) */
  --text: #e8f6ff;
  --text-dim: #9fb3c8;
  --cyan: #00e5ff;
  --magenta: #ff2bd6;
  --violet: #b672ff;
  --amber: #ffb000;
  --ok: #3dff9a;
  --error: #ff5470;
  /* Decorative only, never text */
  --grid: #1f3a5f;
  --sun-top: #ff2bd6;
  --sun-bottom: #ffb000;

  --glow-cyan: 0 0 6px rgba(0, 229, 255, 0.55), 0 0 18px rgba(0, 229, 255, 0.28);
  --glow-magenta: 0 0 6px rgba(255, 43, 214, 0.55), 0 0 18px rgba(255, 43, 214, 0.28);
  --text-glow-cyan: 0 0 4px rgba(0, 229, 255, 0.9), 0 0 14px rgba(0, 229, 255, 0.55), 0 0 30px rgba(0, 229, 255, 0.3);
  --text-glow-soft: 0 0 3px rgba(232, 246, 255, 0.6), 0 0 14px rgba(0, 229, 255, 0.45);

  --display: "Orbitron", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Exo 2", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "Share Tech Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 6px;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--void); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--void);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:visited { color: var(--violet); }
.page-home a.button:visited, a.button:visited { color: inherit; }
code, .mono { font-family: var(--mono); }
code { color: var(--amber); font-size: 0.95em; }

/* Focus: always visible, never glow-only (spec §8.5). */
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--amber); color: var(--void); font-weight: 600; }
.skip:focus { top: 10px; color: var(--void); }

.prelaunch { text-align: center; font: 400 13px/1 var(--mono); letter-spacing: 0.06em; color: var(--text-dim); padding: 6px 12px; border-bottom: 1px solid rgba(0, 229, 255, 0.15); }

/* ---------- Header */
.site-header {
  position: relative; z-index: 20;
  max-width: var(--max); margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 28px;
}
.brand { text-decoration: none; }
.brand-word { font: 800 44px/1 var(--display); letter-spacing: 0.01em; color: var(--cyan); text-shadow: var(--text-glow-cyan); }
.nav { display: flex; align-items: center; gap: 34px; }
.nav > a, .nav-legal > summary { color: var(--text); text-decoration: none; font: 500 16px/1 var(--body); cursor: pointer; }
.nav > a:hover, .nav-legal > summary:hover, .nav [aria-current="page"] { color: var(--cyan); text-shadow: var(--text-glow-soft); }
.nav-legal { position: relative; }
.nav-legal > summary { list-style: none; }
.nav-legal > summary::-webkit-details-marker { display: none; }
.nav-legal-menu {
  position: absolute; right: 0; top: calc(100% + 12px); min-width: 230px; margin: 0; padding: 8px 0; list-style: none;
  background: var(--panel); border: 1px solid var(--cyan); border-radius: var(--radius); box-shadow: var(--glow-cyan);
}
.nav-legal-menu a { display: block; padding: 8px 16px; color: var(--text); text-decoration: none; }
.nav-legal-menu a:hover { color: var(--cyan); background: rgba(0, 229, 255, 0.07); }
.nav-toggle { display: none; }

/* ---------- Country menu (header). Mirrors VoiceBotSite's widget: a listbox
   button (public/js/country-select.js) over a native <select> + Apply that
   is the no-JS fallback. Text colours are theme tokens only. */
.country-form { margin: 0; }
.country-picker { position: relative; }
.country-widget { position: relative; }
.country-fallback {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; pointer-events: none;
}
.no-js .country-widget { display: none; }
.no-js .country-fallback {
  position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto;
  white-space: normal; pointer-events: auto; display: flex; align-items: center; gap: 8px;
}
.country-fallback select, .country-apply {
  font: 500 15px/1.2 var(--body); color: var(--text); background: var(--panel);
  border: 1px solid var(--cyan); border-radius: var(--radius); padding: 6px 10px; min-height: 36px;
}
.country-apply { cursor: pointer; }
.country-apply:hover { background: rgba(0, 229, 255, 0.08); }
.country-toggle {
  display: inline-flex; align-items: center; gap: 8px; max-width: 11.5rem; min-height: 36px;
  padding: 4px 10px 4px 6px; border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: var(--text); font: 500 16px/1 var(--body); cursor: pointer;
}
.country-toggle:hover, .country-toggle[aria-expanded="true"] {
  color: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-cyan); text-shadow: var(--text-glow-soft);
}
.country-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-chevron { flex: none; }
.country-flag {
  width: 20px; height: 15px; flex: none; object-fit: cover; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.45); background: var(--panel);
}
.country-list {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 30;
  width: min(19rem, calc(100vw - 2rem)); max-height: min(22rem, 60vh); margin: 0; padding: 6px;
  overflow: auto; list-style: none;
  background: var(--panel); border: 1px solid var(--cyan); border-radius: var(--radius); box-shadow: var(--glow-cyan);
}
.country-list[hidden] { display: none; }
.country-list:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.country-option {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 4px;
  color: var(--text); cursor: pointer; font: 500 15px/1.3 var(--body);
}
/* The active row: a cyan rule and tint, plus the check mark on the chosen row,
   so the state never relies on colour alone. */
.country-option.is-active, .country-option:hover { background: rgba(0, 229, 255, 0.1); box-shadow: inset 3px 0 0 var(--cyan); }
.country-option[aria-selected="true"] .country-option-name { color: var(--cyan); }
.country-option-name { flex: 1; }
.country-option-code { color: var(--text-dim); font: 400 13px/1 var(--mono); letter-spacing: 0.06em; }
.country-check { width: 12px; height: 12px; flex: none; color: var(--cyan); }

/* ---------- Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px; border-radius: var(--radius);
  font: 500 17px/1 var(--body); text-decoration: none; cursor: pointer;
  border: 2px solid currentColor; background: transparent; color: var(--text);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.button svg { width: 22px; height: 22px; }
.button-magenta { color: var(--text); border-color: var(--magenta); background: var(--magenta-deep); box-shadow: var(--glow-magenta); }
.button-magenta:hover { background: #561048; box-shadow: 0 0 10px rgba(255, 43, 214, 0.8), 0 0 28px rgba(255, 43, 214, 0.45); }
.button-outline-cyan { color: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.button-outline-cyan:hover { background: rgba(0, 229, 255, 0.08); box-shadow: 0 0 10px rgba(0, 229, 255, 0.8), 0 0 28px rgba(0, 229, 255, 0.45); }
.button-outline-magenta { color: var(--text); border-color: var(--magenta); box-shadow: var(--glow-magenta); }
.button-outline-magenta:hover { background: rgba(255, 43, 214, 0.1); }
.nav-buy { min-width: 98px; font-size: 18px; }
.button-stripe { color: var(--text); border-color: var(--magenta); box-shadow: var(--glow-magenta); min-width: 214px; font-size: 19px; }
.button-stripe svg { color: #b7c2ff; width: 24px; height: 24px; }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Hero */
.page-home main { overflow-x: clip; }
/*
 * The horizon (top edge of .grid-floor) is placed from the hero's bottom
 * edge, never from its top: it sits --horizon-gap below the last line of hero
 * content (the meta line, or the viewer in one-column layouts) at every
 * width, so it can never cross the headline, subheading or buttons however
 * the text wraps. --floor-show is how much grid shows before the cards.
 * The viewer and the sun are pinned to the same line: the viewer dips
 * --viewer-dip below it, and the sun sinks --sun-sink into the grid.
 * scripts/screenshots.js measures this at 1440/1280/1024/768/390 px.
 */
.hero {
  --horizon-gap: 24px; --floor-show: 66px; --scene-below: 130px; --viewer-dip: 30px;
  --sun-size: 205px; --sun-sink: 46px;
  position: relative; max-width: var(--max); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 24px; align-items: start;
  padding: 18px 28px calc(var(--horizon-gap) + var(--floor-show));
}
.hero-scene { position: absolute; inset: -110px -400px calc(-1 * var(--scene-below)) -400px; z-index: 0; pointer-events: none; overflow: hidden; }
.sun {
  position: absolute; left: calc(50% + 165px); width: var(--sun-size); height: var(--sun-size); border-radius: 50%; transform: translateX(-50%);
  /* Bottom edge --sun-sink below the horizon, and the part below it clipped
     away (the negative insets keep the glow), so the sun sets into the grid. */
  bottom: calc(var(--scene-below) + var(--floor-show) - var(--sun-sink));
  clip-path: inset(-160px -160px var(--sun-sink) -160px);
  background:
    repeating-linear-gradient(to bottom, transparent 0 46%, var(--void) 46% 49%, transparent 49% 56%, var(--void) 56% 60%, transparent 60% 66%, var(--void) 66% 71%, transparent 71% 76%, var(--void) 76% 82%, transparent 82% 87%, var(--void) 87% 93%, transparent 93%),
    linear-gradient(to bottom, var(--sun-top) 0%, #ff4f9a 45%, #ff7a59 75%, var(--sun-bottom) 100%);
  box-shadow: 0 0 40px rgba(255, 43, 214, 0.55), 0 0 110px rgba(255, 43, 214, 0.3);
}
.grid-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--scene-below) + var(--floor-show));
  perspective: 300px; perspective-origin: 50% 0%;
}
.grid-floor::before {
  content: ""; position: absolute; inset: 0 0 -60% 0; transform: rotateX(62deg); transform-origin: 50% 0%;
  background:
    linear-gradient(to right, rgba(0, 229, 255, 0.55) 1.5px, transparent 1.5px) 0 0 / 64px 64px,
    linear-gradient(to bottom, rgba(0, 229, 255, 0.55) 1.5px, transparent 1.5px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 70%, transparent 100%);
  animation: grid-run 4s linear infinite;
}
.grid-floor::after { /* horizon glow */
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px;
  background: linear-gradient(to right, transparent, var(--magenta) 30%, var(--cyan) 50%, var(--magenta) 70%, transparent);
  box-shadow: 0 0 18px rgba(255, 43, 214, 0.7);
}
@keyframes grid-run { from { background-position: 0 0, 0 0; } to { background-position: 0 64px, 0 64px; } }

.hero-copy { position: relative; z-index: 2; padding-top: 6px; }
.hero-title { margin: 0; font: 800 clamp(34px, 4.6vw, 60px)/1.08 var(--display); white-space: nowrap; letter-spacing: 0.005em; color: #fbfdff; text-shadow: var(--text-glow-soft); }
.hero-title span { display: block; }
.hero-lede { margin: 16px 0 22px; font: 500 19px/1.4 var(--body); color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px; }
.hero-meta { margin: 18px 0 0; font-size: 15px; color: var(--text-dim); letter-spacing: 0.04em; }

/* Hero art: the viewer window and the menu-bar dropdown */
/* Bottom-aligned, with a negative bottom margin, so the viewer's lower edge
   sits --viewer-dip below the horizon and the sun sets behind it. */
.hero-art {
  position: relative; z-index: 2; align-self: end; margin-top: 30px;
  margin-bottom: calc(-1 * (var(--horizon-gap) + var(--viewer-dip)));
}
.viewer {
  position: relative; margin-left: auto; width: 400px; max-width: 100%; border: 2px solid var(--cyan); border-radius: 10px; overflow: hidden;
  background: #0b0a1a; box-shadow: var(--glow-cyan);
}
.viewer-bar { display: flex; align-items: center; gap: 7px; padding: 9px 12px; font: 500 14px/1 var(--body); background: #12102a; }
.viewer-bar strong { margin-left: 12px; font-weight: 500; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.viewer-menubar { display: flex; gap: 12px; padding: 3px 10px; font: 400 9px/1.2 var(--body); color: #d9d4ee; background: #1d1838; }
.viewer-menubar b { width: 8px; height: 9px; border-radius: 2px; background: #d9d4ee; }
.viewer-screen { position: relative; height: 250px; }
.landscape { width: 100%; height: 100%; }
.dock { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px 7px; border-radius: 9px; background: rgba(255, 255, 255, 0.2); }
.dock i { width: 14px; height: 14px; border-radius: 4px; background: #94a3b8; }
.dock i:nth-child(1) { background: #4ea1ff; } .dock i:nth-child(2) { background: #ff6b6b; } .dock i:nth-child(3) { background: #ffd166; }
.dock i:nth-child(4) { background: #06d6a0; } .dock i:nth-child(5) { background: #a78bfa; } .dock i:nth-child(6) { background: #f472b6; }
.dock i:nth-child(7) { background: #38bdf8; } .dock i:nth-child(8) { background: #facc15; } .dock i:nth-child(9) { background: #fb923c; }
.dock i:nth-child(10) { background: #34d399; } .dock i:nth-child(11) { background: #c084fc; } .dock i:nth-child(12) { background: #60a5fa; }
.dock i:nth-child(13) { background: #f87171; } .dock i:nth-child(14) { background: #cbd5e1; margin-left: 6px; }
.tray-menu {
  position: absolute; right: -26px; top: -52px; width: 178px; z-index: 3;
  background: rgba(15, 13, 36, 0.96); border: 2px solid var(--cyan); border-radius: 8px; box-shadow: var(--glow-cyan);
  font: 500 14px/1 var(--body);
}
.tray-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; }
.tray-head svg { width: 18px; height: 18px; color: var(--text); }
.tray-menu ul { list-style: none; margin: 0; padding: 0 14px 6px; }
.tray-menu li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.tray-foot { margin: 0 14px; padding: 11px 0 12px; border-top: 1px solid rgba(232, 246, 255, 0.2); }

/* ---------- Highlight cards + price card */
.cards {
  position: relative; z-index: 3; max-width: var(--max); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.55fr); gap: 22px; padding: 0 28px;
}
.card {
  position: relative; padding: 18px 18px 18px; border-radius: var(--radius);
  background: rgba(15, 13, 36, 0.92); border: 2px solid var(--cyan); box-shadow: var(--glow-cyan);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.card-magenta { border-color: var(--magenta); box-shadow: var(--glow-magenta); }
.card h2 { margin: 12px 0 6px; font: 600 18px/1.25 var(--body); color: var(--text); }
.card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text); }
.card-icon { display: block; width: 52px; height: 52px; }
.icon-cyan { color: var(--cyan); filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.8)); }
.icon-magenta { color: var(--magenta); filter: drop-shadow(0 0 4px rgba(255, 43, 214, 0.8)); }
.card-price { border-color: var(--magenta); box-shadow: var(--glow-magenta); padding: 20px 22px; align-self: start; margin-top: -8px; }
.card-price h2 { margin: 0 0 10px; font: 500 22px/1.2 var(--body); }
.price { font: 600 27px/1.15 var(--body) !important; white-space: nowrap; color: var(--magenta) !important; text-shadow: 0 0 10px rgba(255, 43, 214, 0.55); margin: 0 0 6px !important; }
.price-more { margin: 0 0 4px !important; font-size: 13px !important; color: var(--text-dim) !important; }
/* The other four prices, so a visitor can compare without switching. */
.price-list { margin: 0 0 14px !important; font-size: 13px !important; color: var(--text-dim) !important; letter-spacing: 0.02em; }
.soon { margin: 10px 0 0 !important; font-size: 14px !important; color: var(--amber) !important; }

/* ---------- Sections below the fold */
.section-title { font: 800 30px/1.2 var(--display); color: var(--text); text-shadow: var(--text-glow-soft); margin: 0 0 22px; }
.features, .faq { max-width: var(--max); margin: 0 auto; width: 100%; padding: 64px 28px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature-grid article { padding: 20px; border: 1px solid rgba(0, 229, 255, 0.45); border-radius: var(--radius); background: var(--panel); }
.feature-grid h3 { margin: 0 0 8px; font: 600 18px/1.3 var(--body); color: var(--cyan); }
.feature-grid p { margin: 0; color: var(--text); font-size: 16px; }
.faq details { border-top: 1px solid rgba(0, 229, 255, 0.3); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid rgba(0, 229, 255, 0.3); }
.faq summary { cursor: pointer; font: 600 18px/1.4 var(--body); color: var(--text); }
.faq summary:hover { color: var(--cyan); }
.faq p { margin: 10px 0 0; color: var(--text-dim); max-width: 75ch; }

/* ---------- Reading pages (docs, legal, support, stubs) */
.sheet { max-width: 72ch; margin: 0 auto; padding: 40px 28px 20px; }
.sheet h1 { font: 800 clamp(30px, 4vw, 44px)/1.15 var(--display); margin: 4px 0 16px; text-shadow: var(--text-glow-soft); }
.eyebrow { margin: 0; color: var(--magenta); letter-spacing: 0.14em; text-transform: uppercase; font-size: 14px; }
.lede { font-size: 19px; color: var(--text); }
.prose h2 { font: 600 24px/1.3 var(--display); color: var(--cyan); margin: 36px 0 12px; }
.prose h3 { font: 600 19px/1.35 var(--body); color: var(--text); margin: 26px 0 8px; }
.prose h4 { font: 600 17px/1.4 var(--body); color: var(--text); margin: 20px 0 6px; }
.prose p, .prose li { color: var(--text); }
.prose hr, .sheet hr {
  border: 0; height: 2px; margin: 34px 0;
  background: linear-gradient(to right, var(--cyan), rgba(0, 229, 255, 0.15) 60%, transparent);
}
.prose pre { overflow-x: auto; padding: 14px 16px; border: 1px solid rgba(0, 229, 255, 0.4); border-radius: var(--radius); background: var(--panel); }
.prose pre code { color: var(--text); font-size: 15px; line-height: 1.5; }
.doc-contents { margin: 20px 0 10px; padding: 14px 20px; border-left: 3px solid var(--magenta); background: var(--panel); }
.doc-contents ol { margin: 0; padding-left: 18px; }
.table-wrap { overflow-x: auto; margin: 18px 0; }
table { width: 100%; border-collapse: collapse; }
caption { text-align: left; font: 600 18px/1.4 var(--body); color: var(--text); padding-bottom: 8px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(0, 229, 255, 0.25); vertical-align: top; }
thead th { color: var(--cyan); font-weight: 600; }
.fine { font-size: 15px; color: var(--text-dim); }
.banner { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--cyan); background: var(--panel); color: var(--text); }
.banner-warn { border-color: var(--amber); color: var(--amber); }

/* Callouts from blockquote markdown (src/markdown.js): "> **Warning:** …"
   becomes an aside with a red border and a "!" badge. The badge is a text
   glyph (no image asset, forced-colours safe). */
.callout { margin: 20px 0; padding: 14px 18px; border: 2px solid var(--error); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.callout-warning::before { content: "!"; display: inline-block; width: 22px; height: 22px; margin-right: 10px; border: 2px solid var(--error); border-radius: 50%; color: var(--error); background: var(--panel); font: 700 15px/1 var(--mono); text-align: center; vertical-align: middle; }
.callout-warning strong { color: var(--error); }

.sheet .hero-actions { margin-top: 26px; }

/* ---------- Buy and success (Stripe Embedded Checkout) */
.banner-test { border-color: var(--magenta); }
.banner-test strong { color: var(--magenta); }
.order { margin: 24px 0; padding: 18px 20px; border: 1px solid rgba(0, 229, 255, 0.45); border-radius: var(--radius); background: var(--panel); }
.order h2 { margin-top: 0; }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; }
.facts dt { color: var(--text-dim); }
.facts dd { margin: 0; }
.price-inline { color: var(--magenta); font-weight: 600; }
.buy-form { display: grid; gap: 16px; justify-items: start; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--cyan); }
/* Marketing opt-out on the buy page: same neon checkbox, with a visible focus
   ring for keyboard users and the explanatory note indented under its label. */
/* flex: none stops a long label squeezing the box narrower than 20px. */
.check input { flex: none; }
.check input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.check input:disabled + span { color: var(--text-dim); }
.optout-note { margin: -4px 0 0 30px; max-width: 40rem; }
.checkout-mount { margin-top: 18px; }
.checkout-mount:empty { display: none; }
.licence-label { margin: 24px 0 6px; color: var(--text-dim); }
.licence-key { margin: 0 0 20px; padding: 14px 18px; font-size: clamp(16px, 3.2vw, 24px); letter-spacing: 0.06em; color: var(--cyan); border: 2px solid var(--cyan); border-radius: var(--radius); background: var(--panel); overflow-wrap: anywhere; user-select: all; }
@media (max-width: 760px) {
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* Support form */
.support-form { display: grid; gap: 6px; margin-top: 10px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin: 0 0 10px; display: grid; gap: 6px; }
.field label { font-weight: 600; color: var(--text); }
.field input, .field textarea {
  width: 100%; padding: 11px 12px; font: 400 17px/1.4 var(--body); color: var(--text);
  background: var(--panel); border: 1px solid rgba(0, 229, 255, 0.55); border-radius: var(--radius);
}
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.support-form .button { justify-self: start; margin-top: 4px; }

/* ---------- Footer */
.site-footer { max-width: var(--max); margin: 40px auto 0; width: 100%; padding: 0 28px 22px; font-size: 15px; color: var(--text-dim); }
.page-home .site-footer { margin-top: 56px; }
.trail { height: 1px; margin-bottom: 14px; background: linear-gradient(to right, rgba(0, 229, 255, 0.5), rgba(0, 229, 255, 0.5) 85%, transparent); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); text-decoration: underline; }
/* A button that sits in the footer's link run (it reopens the cookie bar). */
.link-button { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: var(--text-dim); cursor: pointer; }
.link-button:hover { color: var(--cyan); text-decoration: underline; }

/* ---------- Cookie consent bar (public/js/consent.js) */
/*
 * Fixed to the top of the viewport and floating over the page, so the visitor
 * sees it on first load without scrolling (Edward, 25 Oct 2026). It is in the
 * markup as [hidden] and only the script reveals it when there is no choice to
 * honour; with JavaScript off nothing analytics-related loads and the bar stays
 * away. z-index sits above the header (20) and its menus (30), below the skip
 * link (100).
 * Accept and Reject share one class on purpose: equal prominence, no nudge.
 */
.consent {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  padding: 14px 28px;
  border-bottom: 1px solid var(--cyan);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(7, 6, 15, 0.85);
}
.consent[hidden] { display: none; }
.consent-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; max-width: var(--max); margin: 0 auto; }
.consent-text { margin: 0; flex: 1 1 340px; font-size: 15px; color: var(--text-dim); }
.consent-text a { color: var(--cyan); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-choice { min-height: 44px; padding: 0 18px; font-size: 16px; }
.consent-choice:hover { background: rgba(0, 229, 255, 0.08); box-shadow: var(--glow-cyan); }

/* ---------- Responsive */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .hero-title { white-space: normal; }
  .hero-art { margin: 70px auto calc(-1 * (var(--horizon-gap) + var(--viewer-dip))); width: 420px; max-width: 100%; }
  .viewer { width: 100%; }
  .viewer-screen { height: 225px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-price { grid-column: 1 / -1; margin-top: 0; }
  /* The scene is 800px wider than the hero, so offsets are from its centre. */
  /* Peeks out to the left of the centred viewer. */
  .sun { left: calc(50% - 200px); }
}
/* Tablet: keep the full nav on one line (the Buy button overflowed at 768). */
/* Tablet and small laptop: flag and chevron only, so the nav stays on one
   line; the country name stays in the button's accessible label. */
@media (max-width: 1080px) and (min-width: 761px) {
  .nav { gap: 24px; }
  .country-current { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .country-list { left: auto; right: 0; }
  .country-toggle { padding: 4px 6px; }
}
@media (max-width: 900px) and (min-width: 761px) {
  .site-header { padding: 14px 20px; gap: 16px; }
  .brand-word { font-size: 30px; }
  .nav { gap: 14px; }
  .nav-buy { min-width: 76px; padding: 0 14px; }
}
@media (max-width: 760px) {
  .site-header { padding: 12px 18px; flex-wrap: wrap; }
  .brand-word { font-size: 30px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
    border: 2px solid var(--cyan); border-radius: var(--radius); background: transparent; color: var(--cyan); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
  .nav.is-open, .no-js .nav { display: flex; }
  .nav > a, .nav-legal > summary { padding: 13px 4px; border-bottom: 1px solid rgba(0, 229, 255, 0.2); }
  .nav-legal-menu { position: static; box-shadow: none; border: 0; background: transparent; padding-left: 12px; }
  .nav-buy { margin-top: 12px; }
  .country-form { border-bottom: 1px solid rgba(0, 229, 255, 0.2); padding: 6px 0; }
  .country-toggle { max-width: none; width: 100%; min-height: 46px; padding: 8px 4px; }
  .country-current { flex: 1; text-align: left; }
  .country-list { position: static; width: 100%; max-height: 15rem; margin-top: 6px; box-shadow: none; }
  .no-js .country-fallback { padding: 6px 0; flex-wrap: wrap; }
  .hero { --sun-size: 150px; --sun-sink: 34px; --floor-show: 56px; padding: 12px 18px calc(var(--horizon-gap) + var(--floor-show)); }
  .hero-title { font-size: clamp(34px, 10vw, 46px); }
  .hero-lede { font-size: 18px; }
  .hero-actions .button { width: 100%; }
  /* The viewer leaves a strip on the left where the sun shows. */
  .sun { left: calc(50% - 125px); }
  .hero-art { width: 100%; margin-top: 76px; }
  .viewer { width: calc(100% - 64px); }
  .viewer-screen { height: 180px; }
  /* Narrower so it clears the viewer's "VNC Viewer" title. */
  .tray-menu { right: 0; top: -58px; width: 138px; font-size: 13px; }
  .cards { grid-template-columns: 1fr; padding: 0 18px; gap: 18px; }
  .feature-grid { grid-template-columns: 1fr; }
  .features, .faq { padding: 48px 18px 0; }
  .field-row { grid-template-columns: 1fr; }
  .sheet { padding: 28px 18px 10px; }
  .site-footer { padding: 0 18px 20px; }
  .consent { padding: 12px 18px; }
  .consent-text { flex-basis: auto; }
  .consent-actions { width: 100%; }
  .consent-choice { flex: 1 1 0; }
}

/* ---------- Accessibility preferences (spec §8.5) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (prefers-contrast: more) {
  :root { --glow-cyan: none; --glow-magenta: none; --text-glow-cyan: none; --text-glow-soft: none; }
  .hero-scene { display: none; }
  .card, .feature-grid article, .viewer, .tray-menu { box-shadow: none; }
  .price { text-shadow: none; }
}
@media (forced-colors: active) {
  .hero-scene, .hero-art { display: none; }
  .card { clip-path: none; border: 2px solid CanvasText; box-shadow: none; }
  .button { border: 2px solid ButtonText; box-shadow: none; }
  .country-toggle, .country-list { border: 1px solid ButtonText; box-shadow: none; }
  .country-option.is-active { outline: 2px solid Highlight; }
  .brand-word, .hero-title, .section-title, .sheet h1 { text-shadow: none; }
  .callout { border: 2px solid ButtonText; }
  .consent { border-bottom: 2px solid ButtonText; box-shadow: none; }
  .callout-warning::before { border-color: ButtonText; color: ButtonText; }
}
