@import url("https://fonts.googleapis.com/css2?family=Kanit:wght@400;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

/* =============================================================
   ScreenTester.uk — style.css
   May 2026 mobile-first theme refresh
   -------------------------------------------------------------
   Design goals:
   • Single-row, horizontally scrollable top bar on every breakpoint
   • Modern "precision lab" visual language with richer depth
   • Strong mobile readability and touch targets
   • Desktop usability without nav wrap or overflow glitches
   ============================================================= */

/* ── Design tokens ───────────────────────────────────────────── */
:root {
  --bg: #050b14;
  --bg-top: #091321;
  --surface: rgba(10, 22, 40, 0.82);
  --surface-solid: #0d1c34;
  --surface-2: #122845;
  --surface-3: #173257;
  --card: rgba(14, 27, 48, 0.9);
  --card-strong: rgba(17, 33, 58, 0.96);

  --fg: #f4f8ff;
  --fg-soft: #cad7ea;
  --muted: #91a6c5;

  --accent: #7af2d1;
  --accent-strong: #2fe6b7;
  --accent-2: #78b8ff;
  --accent-warm: #ffc27a;

  --link: #8fd2ff;
  --link-visited: #a6dbff;
  --link-hover: #b8ebff;
  --link-active: #d8fff5;
  --link-underline: rgba(143, 210, 255, 0.55);

  --border: rgba(150, 186, 255, 0.14);
  --border-strong: rgba(122, 242, 209, 0.28);
  --shadow: 0 24px 80px rgba(2, 8, 20, 0.45);
  --shadow-soft: 0 14px 34px rgba(2, 8, 20, 0.28);

  --radius: 24px;
  --radius-sm: 18px;
  --radius-xs: 14px;
  --page-max: 1240px;
  --page-narrow: 980px;
  --nav-offset: max(0.65rem, env(safe-area-inset-top, 0px));

  --radial-distance: 5.35em;
  --rm-surface: rgba(18, 33, 56, 0.78);
  --rm-surface-strong: rgba(34, 55, 88, 0.94);
  --rm-border-ui: rgba(177, 211, 255, 0.26);
  --rm-icon-ui: #f4f8ff;
  --rm-shadow-ui: 0 16px 34px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --rm-surface-light: rgba(255, 255, 255, 0.86);
  --rm-surface-light-strong: rgba(255, 255, 255, 0.94);
  --rm-border-light: rgba(7, 17, 31, 0.16);
  --rm-icon-light: #08111f;
  --rm-shadow-light: 0 14px 28px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.54);

  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

/* ── Base ────────────────────────────────────────────────────── */
body {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: var(--fg);
  background:
    radial-gradient(circle at 12% 8%, rgba(122, 242, 209, 0.16), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(120, 184, 255, 0.17), transparent 24%),
    radial-gradient(circle at 50% 115%, rgba(255, 194, 122, 0.10), transparent 32%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 42%, #040911 100%);
  padding:
    max(0.8rem, var(--safe-t))
    max(0.85rem, var(--safe-r))
    max(1rem, var(--safe-b))
    max(0.85rem, var(--safe-l));
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  text-align: left;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), transparent 90%);
  opacity: 0.2;
  z-index: -3;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ── Shell blocks ────────────────────────────────────────────── */
.site-header,
#main-nav,
.cards,
.prose,
footer,
.site-footer,
.container {
  width: min(100%, var(--page-max));
  margin-inline: auto;
}

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: 1.15rem 1rem 1.2rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(18, 39, 68, 0.82), rgba(9, 18, 34, 0.72)),
    var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

.site-header::before {
  width: 180px;
  height: 180px;
  top: -92px;
  right: -68px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(122, 242, 209, 0.24), transparent 68%);
}

.site-header::after {
  width: 220px;
  height: 220px;
  bottom: -126px;
  left: -92px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(120, 184, 255, 0.2), transparent 72%);
}

.site-header > * { position: relative; z-index: 1; }

.site-header .brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  text-decoration: none;
  color: var(--fg);
}

.site-header .brand img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(255,255,255,0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}

.site-header .brand h1 {
  margin: 0;
  font-family: "Kanit", sans-serif;
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  background: linear-gradient(90deg, #f8fbff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header p {
  margin-top: 0.65rem;
  max-width: 72ch;
  margin-inline: auto;
  color: var(--fg-soft);
  font-size: 0.95rem;
}

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: "Kanit", sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.55rem, 5vw, 2.35rem); color: var(--fg); }
h2 { font-size: clamp(1.15rem, 4vw, 1.55rem); color: var(--accent); }
h3 { font-size: clamp(1rem, 3.3vw, 1.2rem); color: var(--fg); }

p, li { color: var(--fg-soft); }
strong { color: var(--fg); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0.1rem 0.38rem;
}

/* ── Main nav ────────────────────────────────────────────────── */
#main-nav {
  position: sticky;
  top: var(--nav-offset);
  z-index: 60;
  isolation: isolate;
  margin-bottom: 1.4rem;
  padding: 0.55rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(6, 14, 27, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

#main-nav::before,
#main-nav::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.4rem;
  pointer-events: none;
  z-index: 1;
}

#main-nav::before {
  left: 0;
  background: linear-gradient(90deg, rgba(6, 14, 27, 0.96), rgba(6, 14, 27, 0));
}

#main-nav::after {
  right: 0;
  background: linear-gradient(270deg, rgba(6, 14, 27, 0.96), rgba(6, 14, 27, 0));
}

#main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.38rem;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-padding-inline: 0.7rem;
  padding-inline-start: 0.15rem;
  padding-inline-end: 0.95rem;
  padding-bottom: 0.1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 242, 209, 0.45) transparent;
  scroll-snap-type: x proximity;
}

#main-nav ul::-webkit-scrollbar {
  height: 7px;
}

#main-nav ul::-webkit-scrollbar-track {
  background: transparent;
}

#main-nav ul::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(122, 242, 209, 0.6), rgba(120, 184, 255, 0.55));
  border-radius: 999px;
}

#main-nav li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

#main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 0.92rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg-soft);
  text-decoration: none;
  white-space: nowrap;
  font-family: "Kanit", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.015em;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#main-nav a:hover {
  transform: translateY(-1px);
  background: rgba(122, 242, 209, 0.12);
  border-color: rgba(122, 242, 209, 0.24);
  color: var(--fg);
}

#main-nav a[aria-current="page"] {
  background: linear-gradient(90deg, rgba(122, 242, 209, 0.96), rgba(120, 184, 255, 0.92));
  border-color: transparent;
  color: #04111f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
}

/* ── Utility navs on simple pages ───────────────────────────── */
.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  overflow-x: auto;
  justify-content: center;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
  color: var(--fg-soft);
  white-space: nowrap;
}

.breadcrumbs {
  width: min(100%, var(--page-narrow));
  margin: 0 auto 0.8rem;
  color: var(--muted);
}

/* ── Footer + simple containers ─────────────────────────────── */
footer,
.site-footer {
  margin-top: 2rem;
  padding: 1.15rem 1rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(13, 27, 49, 0.82), rgba(8, 16, 30, 0.82));
  box-shadow: var(--shadow-soft);
  text-align: center;
  font-size: 0.92rem;
}

footer p + p,
.site-footer p + p {
  margin-top: 0.55rem;
}

.site-header .header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.site-header .header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(122, 242, 209, 0.22);
  background: linear-gradient(180deg, rgba(18, 42, 72, 0.86), rgba(9, 21, 38, 0.78));
  color: var(--fg);
  text-decoration: none;
  font-family: "Kanit", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(2, 8, 20, 0.24);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.site-header .header-action__icon {
  font-size: 0.92em;
}

.site-header .header-action:hover,
.site-header .header-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(122, 242, 209, 0.4);
  background: linear-gradient(180deg, rgba(33, 70, 115, 0.92), rgba(12, 28, 49, 0.86));
  color: var(--accent);
}

.site-header .header-share-link {
  padding-inline: 0.9rem;
  font-size: 0.78rem;
}

.site-header .header-share-link--quiet {
  border-color: rgba(150, 186, 255, 0.16);
  background: rgba(11, 22, 37, 0.72);
  color: var(--fg-soft);
}

.site-header .header-home-link {
  border-color: rgba(255, 194, 122, 0.34);
  background: linear-gradient(135deg, rgba(255, 194, 122, 0.95), rgba(248, 143, 122, 0.9));
  color: #221003;
  box-shadow: 0 14px 30px rgba(92, 46, 18, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.site-header .header-home-link:hover,
.site-header .header-home-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 220, 170, 0.72);
  background: linear-gradient(135deg, rgba(255, 210, 122, 0.98), rgba(255, 160, 103, 0.96));
  color: #221003;
  box-shadow: 0 18px 34px rgba(92, 46, 18, 0.28), 0 0 0 4px rgba(255, 194, 122, 0.16);
}

.site-header .header-action.is-feedback {
  border-color: rgba(122, 242, 209, 0.44);
  background: linear-gradient(90deg, rgba(122, 242, 209, 0.96), rgba(120, 184, 255, 0.92));
  color: #04111f;
}

.site-header .header-home-link[aria-current="page"] {
  border-color: rgba(255, 220, 170, 0.78);
  background: linear-gradient(135deg, rgba(255, 207, 107, 0.98), rgba(255, 151, 97, 0.95));
  color: #221003;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
}

.site-footer--network {
  text-align: left;
}

.site-footer--network .footer-network {
  display: grid;
  gap: 1rem;
}

.site-footer--network .footer-copy strong {
  display: inline-block;
  margin-bottom: 0.32rem;
  font-family: "Kanit", sans-serif;
  font-size: 1.02rem;
  color: var(--fg);
}

.site-footer--network .footer-copy p {
  margin: 0;
  color: var(--muted);
}

.site-footer--network .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.site-footer--network .footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(122, 242, 209, 0.34);
  background: linear-gradient(135deg, rgba(122, 242, 209, 0.24), rgba(120, 184, 255, 0.2));
  box-shadow: 0 14px 28px rgba(4, 10, 18, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #eef8ff;
  text-decoration: none;
  white-space: nowrap;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.site-footer--network .footer-link:hover,
.site-footer--network .footer-link:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(122, 242, 209, 0.95), rgba(120, 184, 255, 0.88));
  border-color: rgba(182, 246, 234, 0.92);
  box-shadow: 0 16px 34px rgba(18, 46, 74, 0.3), 0 0 0 4px rgba(122, 242, 209, 0.12);
  color: #07131d;
}

.site-footer--network .footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(150, 186, 255, 0.12);
}

.site-footer--network .footer-meta small {
  color: var(--muted);
}

.site-footer--network .footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
}

.container {
  padding: 1.35rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(14, 28, 50, 0.92), rgba(8, 17, 30, 0.88));
  box-shadow: var(--shadow-soft);
}

.cta {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

/* ── Overlay ─────────────────────────────────────────────────── */
#testOverlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  z-index: 1000;
  display: none;
  cursor: pointer;
  background: transparent;
  overscroll-behavior: none;
}

#testOverlay canvas { width: 100%; height: 100%; display: block; }

/* ── Decorative lines ────────────────────────────────────────── */
.lines {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  width: min(90vw, 1440px);
  margin: auto;
  display: flex;
  justify-content: space-between;
  z-index: -2;
  pointer-events: none;
  opacity: 0.42;
}

.line {
  position: relative;
  width: 2px;
  height: 100%;
  overflow: hidden;
}

.line::after {
  content: "";
  position: absolute;
  inset: auto 0;
  top: -45%;
  width: 100%;
  height: 14vh;
  background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.85) 76%, rgba(255,255,255,0.98) 100%);
  animation: drop 7s 0s infinite;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.4, 0.26, 0, 0.97);
}

.line:nth-child(1)::after  { background: linear-gradient(to bottom, transparent, #7af2d1 75%, #7af2d1); animation-delay: .4s; }
.line:nth-child(2)::after  { background: linear-gradient(to bottom, transparent, #6fd6ff 75%, #6fd6ff); animation-delay: .9s; }
.line:nth-child(3)::after  { background: linear-gradient(to bottom, transparent, #ffc27a 75%, #ffc27a); animation-delay: 1.4s; }
.line:nth-child(4)::after  { background: linear-gradient(to bottom, transparent, #f88f7a 75%, #f88f7a); animation-delay: 1.9s; }
.line:nth-child(5)::after  { background: linear-gradient(to bottom, transparent, #9ed2ff 75%, #9ed2ff); animation-delay: 2.4s; }
.line:nth-child(6)::after  { background: linear-gradient(to bottom, transparent, #7af2d1 75%, #7af2d1); animation-delay: 2.9s; }
.line:nth-child(7)::after  { background: linear-gradient(to bottom, transparent, #ffc27a 75%, #ffc27a); animation-delay: 3.4s; }
.line:nth-child(8)::after  { background: linear-gradient(to bottom, transparent, #6fd6ff 75%, #6fd6ff); animation-delay: 3.9s; }
.line:nth-child(9)::after  { background: linear-gradient(to bottom, transparent, #f88f7a 75%, #f88f7a); animation-delay: 4.4s; }
.line:nth-child(10)::after { background: linear-gradient(to bottom, transparent, #9ed2ff 75%, #9ed2ff); animation-delay: 4.9s; }

@media (max-width: 560px) {
  .line:nth-child(n+6) { display: none; }
}

@keyframes drop {
  0% { top: -50%; }
  100% { top: 110%; }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.88rem 1.18rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent) 0%, #9bf0ff 100%);
  color: #03111b;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.97rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(47, 230, 183, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:hover,
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(47, 230, 183, 0.22);
  filter: saturate(1.05);
}

.btn:active,
button:active {
  transform: translateY(0);
}

.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--fg);
  border-color: var(--border);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(122, 242, 209, 0.1);
  border-color: var(--border-strong);
  color: var(--fg);
}

/* ── Actions row ─────────────────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.actions .btn,
.actions button {
  width: 100%;
}

/* ── Shared content surfaces ─────────────────────────────────── */
.callout,
aside.related,
.faq details,
#video-demos .card,
.cards > section,
.prose,
.faq-bleed .faq-inner {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.callout {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-xs);
  background: linear-gradient(180deg, rgba(17, 34, 58, 0.92), rgba(10, 20, 36, 0.88));
}

.callout.warning {
  background: linear-gradient(180deg, rgba(88, 51, 15, 0.94), rgba(39, 22, 10, 0.9));
  border-color: rgba(255, 194, 122, 0.28);
}

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

ol.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 0.9rem;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
}

ol.steps li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  color: var(--fg-soft);
}

ol.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(122, 242, 209, 0.24), rgba(120, 184, 255, 0.28));
  border: 1px solid rgba(122, 242, 209, 0.28);
  color: var(--fg);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.prose ol.steps a:not(.btn),
ol.steps a:not(.btn) {
  display: inline;
}

aside.related {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-xs);
  background: linear-gradient(180deg, rgba(15, 30, 52, 0.94), rgba(9, 18, 33, 0.92));
}

aside.related h2 {
  margin-bottom: 0.55rem;
}

aside.related ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

aside.related li {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

aside.related li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.faq details {
  padding: 0.95rem 1rem;
  margin: 0.7rem 0;
  border-radius: var(--radius-xs);
  background: linear-gradient(180deg, rgba(15, 30, 52, 0.94), rgba(9, 18, 33, 0.92));
}

.faq summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
  color: var(--fg);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details[open] {
  border-color: var(--border-strong);
}

.faq details p {
  margin-top: 0.7rem;
}

/* ── Cards and prose ─────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.cards > section {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.2rem 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 34, 60, 0.94), rgba(10, 20, 36, 0.9));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.cards > section:hover {
  transform: translateY(-3px);
  border-color: rgba(122, 242, 209, 0.22);
  box-shadow: 0 22px 44px rgba(2, 8, 20, 0.32);
}

.cards > section > p { flex: 1; }

.prose {
  padding: 1.25rem 1.1rem;
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(180deg, rgba(15, 29, 51, 0.96), rgba(8, 17, 30, 0.92));
}

.prose > * + * { margin-top: 1rem; }
.prose h1 { margin: 0; }
.prose ul { padding-left: 1.15rem; }
.prose ol { padding-left: 1.25rem; }
.prose li { margin: 0.35rem 0; }

.prose table,
.cards table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}

.prose th,
.prose td,
.cards th,
.cards td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.prose th,
.cards th {
  color: var(--accent);
  font-weight: 700;
  background: rgba(255,255,255,0.02);
}

.prose tr:last-child td,
.cards tr:last-child td {
  border-bottom: 0;
}

/* ── Links ───────────────────────────────────────────────────── */
:where(.prose, footer, .cards, .faq, aside, .site-footer, .container) a:not(.btn) {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
  text-decoration-skip-ink: auto;
}

:where(.prose, footer, .cards, .faq, aside, .site-footer, .container) a:not(.btn):visited {
  color: var(--link-visited);
}

:where(.prose, footer, .cards, .faq, aside, .site-footer, .container) a:not(.btn):hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

:where(.prose, footer, .cards, .faq, aside, .site-footer, .container) a:not(.btn):active,
:where(.prose, footer, .cards, .faq, aside, .site-footer, .container) a:not(.btn):focus-visible {
  color: var(--link-active);
  text-decoration-color: currentColor;
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  background: #fff;
  color: #08121f;
  z-index: 999;
}

/* ── Canvas / utilities ─────────────────────────────────────── */
canvas#touchCanvas {
  width: 100%;
  height: 280px;
  display: block;
  margin-top: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(122, 242, 209, 0.35);
  background: linear-gradient(180deg, rgba(4, 10, 20, 0.92), rgba(8, 19, 34, 0.92));
  touch-action: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.muted { color: var(--muted); font-size: 0.9rem; }
small.muted { font-size: 0.82rem; }
.d-block { display: block; }
.h5 {
  font-size: 1.04rem;
  color: var(--fg);
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.tag-off    { background: rgba(255,255,255,0.08); color: #d3d8e2; }
.tag-normal { background: rgba(47, 230, 183, 0.16); color: #aef9df; }
.tag-fast   { background: rgba(248, 143, 122, 0.16); color: #ffc0b4; }
.tag-mobile { background: rgba(120, 184, 255, 0.16); color: #c4e2ff; }
.tag-desktop { background: rgba(255, 194, 122, 0.16); color: #ffe0bb; }

/* ── Video demo cards ───────────────────────────────────────── */
#video-demos { grid-column: 1 / -1; }

#video-demos .video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

#video-demos .card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(17, 34, 60, 0.94), rgba(10, 20, 36, 0.9));
}

#video-demos h3 { margin: 0; }

/* ── Affiliate cards ────────────────────────────────────────── */
.aff-wrap {
  width: min(100%, var(--page-max));
  margin: 2rem auto 0;
}

.aff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.aff-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.aff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.aff-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 34, 60, 0.94), rgba(10, 20, 36, 0.9));
  box-shadow: var(--shadow-soft);
}

.aff-card .aff-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d1625;
}

.aff-card .aff-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem;
}

.aff-card h3 {
  margin: 0.2rem 0 0.55rem;
  font-size: 1rem;
}

.aff-card ul {
  margin: 0.1rem 0 1rem;
  padding-left: 1.15rem;
  flex: 1;
}

.aff-card li { margin: 0.24rem 0; }

.aff-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffd96a 0%, #ffbd73 100%);
  color: #241300;
  font-weight: 800;
  text-decoration: none;
  box-shadow: none;
}

.aff-btn:hover {
  filter: brightness(1.03);
}

.aff-muted {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.aff-blank { display: none; }

/* ── FAQ bleed (home page) ──────────────────────────────────── */
.faq-bleed {
  width: 100%;
  margin-top: 2.2rem;
  padding: 0;
  background: transparent;
  border: 0;
}

.faq-bleed .faq-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.4rem 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 29, 51, 0.96), rgba(8, 17, 30, 0.92));
}

.faq-bleed h2 { margin-top: 0; }
.faq-bleed h3 { margin: 1rem 0 0.45rem; color: var(--fg); }

/* ── Radial menu ────────────────────────────────────────────── */
.radial-menu {
  position: absolute;
  z-index: 1001;
  pointer-events: auto;
  --rm-surface-current: var(--rm-surface);
  --rm-surface-current-strong: var(--rm-surface-strong);
  --rm-border-current: var(--rm-border-ui);
  --rm-icon-current: var(--rm-icon-ui);
  --rm-shadow-current: var(--rm-shadow-ui);
  --rm-accent-ring: rgba(122, 242, 209, 0.12);
}

.radial-menu.light {
  --rm-surface-current: var(--rm-surface-light);
  --rm-surface-current-strong: var(--rm-surface-light-strong);
  --rm-border-current: var(--rm-border-light);
  --rm-icon-current: var(--rm-icon-light);
  --rm-shadow-current: var(--rm-shadow-light);
  --rm-accent-ring: rgba(7, 17, 31, 0.08);
}

.radial-menu .container {
  position: absolute;
  bottom: 7px;
  right: 7px;
  width: 0;
  height: 0;
  overflow: visible;
}

.radial-menu .rm-label,
.radial-menu .rm-action {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--rm-border-current);
  background: linear-gradient(180deg, var(--rm-surface-current-strong), var(--rm-surface-current));
  color: var(--rm-icon-current);
  box-shadow: var(--rm-shadow-current);
  line-height: 0;
  touch-action: manipulation;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.radial-menu .rm-label::after,
.radial-menu .rm-action::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.radial-menu .rm-action {
  position: absolute;
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  opacity: 0;
  transform: translate(0, 0) scale(0.84);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease-out,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.radial-menu .rm-action:hover {
  color: var(--accent);
  border-color: rgba(122, 242, 209, 0.32);
  box-shadow:
    var(--rm-shadow-current),
    0 0 0 5px var(--rm-accent-ring);
}

.radial-menu .rm-action > span,
.radial-menu .rm-label > span {
  display: block;
  font-size: 1rem;
  line-height: 1;
}

.radial-menu.is-open .rm-action { opacity: 1; }
.radial-menu.is-open .deg0   { transform: rotate(0deg) translate(var(--radial-distance)) rotate(0deg) scale(1); }
.radial-menu.is-open .deg45  { transform: rotate(45deg) translate(var(--radial-distance)) rotate(-45deg) scale(1); }
.radial-menu.is-open .deg90  { transform: rotate(90deg) translate(var(--radial-distance)) rotate(-90deg) scale(1); }
.radial-menu.is-open .deg135 { transform: rotate(135deg) translate(var(--radial-distance)) rotate(-135deg) scale(1); }
.radial-menu.is-open .deg180 { transform: rotate(180deg) translate(var(--radial-distance)) rotate(-180deg) scale(1); }
.radial-menu.is-open .deg225 { transform: rotate(225deg) translate(var(--radial-distance)) rotate(-225deg) scale(1); }
.radial-menu.is-open .deg270 { transform: rotate(270deg) translate(var(--radial-distance)) rotate(-270deg) scale(1); }
.radial-menu.is-open .deg315 { transform: rotate(315deg) translate(var(--radial-distance)) rotate(-315deg) scale(1); }

.radial-menu .rm-label {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  padding: 0;
  cursor: pointer;
  user-select: none;
  z-index: 2;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.radial-menu .rm-label::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 58%, rgba(0, 0, 0, 0.06));
  pointer-events: none;
}

.radial-menu .rm-label:hover {
  color: var(--accent);
  border-color: rgba(122, 242, 209, 0.32);
  box-shadow:
    var(--rm-shadow-current),
    0 0 0 6px var(--rm-accent-ring);
}

.radial-menu.is-dragging .rm-label {
  cursor: grabbing;
  box-shadow:
    var(--rm-shadow-current),
    0 0 0 6px rgba(122, 242, 209, 0.12);
}

.radial-menu .rm-label > span {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 1;
  font-size: 1.2rem !important;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22));
}

.radial-menu .rm-action-exit:hover {
  color: #ffc8bc;
  border-color: rgba(248, 143, 122, 0.36);
  box-shadow:
    var(--rm-shadow-current),
    0 0 0 5px rgba(248, 143, 122, 0.12);
}

.radial-menu.light .rm-action-exit:hover {
  color: #7d1f1f;
}

.radial-menu.bubble label span {
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  line-height: 1;
}

.overlay-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(14, 28, 48, 0.92), rgba(7, 15, 27, 0.82));
  color: var(--fg);
  font: 800 0.84rem "Manrope", system-ui, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.overlay-exit:hover {
  color: var(--accent);
  border-color: rgba(122, 242, 209, 0.32);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 6px rgba(122, 242, 209, 0.12);
}

/* ── Focus states ───────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.rm-label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Mobile-first responsive steps ──────────────────────────── */
@media (min-width: 640px) {
  body {
    padding:
      max(1rem, var(--safe-t))
      max(1rem, var(--safe-r))
      max(1.15rem, var(--safe-b))
      max(1rem, var(--safe-l));
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
  }

  #video-demos .video-grid,
  .aff-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .actions .btn,
  .actions button {
    width: auto;
  }

  .prose,
  .site-header,
  .container {
    padding-left: 1.3rem;
    padding-right: 1.3rem;
  }
}

@media (min-width: 760px) {
  .site-header {
    padding-right: 19rem;
  }

  .site-header .header-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    margin-top: 0;
    justify-content: flex-end;
    max-width: min(45vw, 28rem);
  }

  .site-header .header-action {
    padding-inline: 0.88rem;
  }

  .site-header .header-home-link {
    min-width: 8.4rem;
  }

  .site-footer--network .footer-network {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr);
    align-items: start;
  }

  .site-footer--network .footer-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 900px) {
  body {
    font-size: 1.04rem;
    padding:
      max(1.15rem, var(--safe-t))
      max(1rem, var(--safe-r))
      max(1.4rem, var(--safe-b))
      max(1rem, var(--safe-l));
  }

  .site-header,
  .container {
    padding: 1.35rem 1.2rem;
    text-align: left;
  }

  .site-header .brand {
    justify-content: flex-start;
  }

  .site-header p {
    margin-inline: 0;
  }

  #main-nav {
    padding: 0.5rem;
  }

  #main-nav ul {
    gap: 0.32rem;
  }

  #main-nav a {
    min-height: 40px;
    font-size: 0.76rem;
    padding: 0.62rem 0.72rem;
    letter-spacing: 0.01em;
  }

  .cards {
    gap: 1.35rem;
  }

  .cards > section {
    min-height: 240px;
  }

  .aff-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .aff-blank { display: block; }
}

@media (min-width: 1180px) {
  #main-nav a {
    font-size: 0.79rem;
    padding-inline: 0.8rem;
  }
}

@media (min-width: 1440px) {
  body {
    font-size: 1.08rem;
  }

  .site-header .brand h1 {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
  }

  #main-nav a {
    font-size: 0.82rem;
    padding-inline: 0.92rem;
  }

  .cards {
    gap: 1.5rem;
  }

  .prose {
    width: min(100%, var(--page-narrow));
  }
}

@media (max-width: 540px) {
  :root {
    --radial-distance: 4.45em;
  }

  body {
    padding:
      max(0.55rem, var(--safe-t))
      max(0.55rem, var(--safe-r))
      max(0.8rem, var(--safe-b))
      max(0.55rem, var(--safe-l));
  }

  .site-header {
    padding: 1rem 0.9rem 1.05rem;
  }

  .site-header .brand {
    gap: 0.65rem;
  }

  .site-header .brand img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .site-header .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .site-header .header-home-link {
    grid-column: 1 / -1;
  }

  .site-header .header-action {
    width: 100%;
    min-width: 0;
    padding: 0.72rem 0.78rem;
    font-size: 0.75rem;
  }

  #main-nav {
    margin-bottom: 1.15rem;
    padding: 0.45rem;
  }

  #main-nav ul {
    gap: 0.3rem;
    scroll-padding-inline: 0.45rem;
  }

  #main-nav a {
    min-height: 40px;
    padding: 0.62rem 0.78rem;
    font-size: 0.76rem;
  }

  .cards > section,
  .prose,
  .container,
  .faq-bleed .faq-inner,
  footer,
  .site-footer {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }

  .site-footer--network .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer--network .footer-link {
    min-height: 44px;
    padding-inline: 0.7rem;
    white-space: normal;
    text-align: center;
  }

  .prose table,
  .cards table,
  .compat-table,
  .uni-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .prose th,
  .prose td,
  .cards th,
  .cards td {
    min-width: 8.75rem;
  }

  .radial-menu .rm-label {
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
  }

  .radial-menu .rm-action {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
  }
}

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