/* Freeway — unified design system for the marketing site, docs, and relay dashboard.
   Dark obsidian surfaces, warm amber optics, disciplined compact scale, calm breathing room. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   MPA View Transitions — Sequential, Ghost-Free, Header Locked
   ========================================================================== */

@view-transition {
  navigation: auto;
}

@keyframes vt-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::view-transition {
  background: var(--bg);
}

::view-transition-group(root) {
  animation-duration: 0s;
}

::view-transition-image-pair(root) {
  isolation: isolate;
}

::view-transition-old(root) {
  animation: 110ms cubic-bezier(0.23, 1, 0.32, 1) both vt-out;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  animation: 170ms cubic-bezier(0.23, 1, 0.32, 1) 110ms both vt-in;
  mix-blend-mode: normal;
}

::view-transition-group(site-header) {
  z-index: 100;
  animation-duration: 0s;
}

::view-transition-old(site-header) {
  display: none;
}

::view-transition-new(site-header) {
  animation: none;
  mix-blend-mode: normal;
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --bg: #0b0c0e;
  --bg-elevated: #101216;
  --bg-surface: #14161b;
  --bg-hover: #1b1e24;
  --bg-inset: #0d0f12;

  --border: rgb(255 255 255 / 7.5%);
  --border-strong: rgb(255 255 255 / 14%);
  --border-sheen: rgb(255 255 255 / 5%);

  --text: #f1efe9;
  --text-muted: #9a9890;
  --text-subtle: #6e6c66;

  --accent: #ffb224;
  --accent-hover: #ffc456;
  --accent-ink: #1a1203;
  --accent-soft: rgb(255 178 36 / 10%);
  --accent-border: rgb(255 178 36 / 30%);

  --success: #3dd68c;
  --success-soft: rgb(61 214 140 / 12%);
  --danger: #ff6b6b;
  --danger-soft: rgb(255 107 107 / 12%);

  --radius-xs: 5px;
  --radius-sm: 7px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-card:
    0 1px 0 var(--border-sheen) inset,
    0 16px 36px -24px rgb(0 0 0 / 82%);
  --shadow-window:
    0 1px 0 rgb(255 255 255 / 7%) inset,
    0 24px 60px -20px rgb(0 0 0 / 90%),
    0 0 0 1px rgb(255 255 255 / 5%);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --container: 1060px;
  --header: 58px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --s-1: clamp(6px, 0.9svh, 10px);
  --s-2: clamp(12px, 1.8svh, 18px);
  --s-3: clamp(18px, 2.8svh, 30px);
  --s-4: clamp(24px, 3.8svh, 42px);

  color-scheme: dark;
}

@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-block-start: var(--header);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #2b2f37 var(--bg);
  scrollbar-width: thin;
  caret-color: var(--accent);
}

html.smooth-scroll {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.4em;
  line-height: 1.12;
  letter-spacing: -0.028em;
  font-weight: 650;
  text-wrap: balance;
  color: var(--text);
}

h1 {
  font-size: min(clamp(1.95rem, 2.7vw + 0.6rem, 3.2rem), 6.1svh);
  letter-spacing: -0.036em;
  line-height: 1.07;
}

h2 {
  font-size: min(clamp(1.45rem, 1.7vw + 0.55rem, 2.05rem), 4.1svh);
  letter-spacing: -0.028em;
}

h3 {
  font-size: 0.95rem;
  line-height: 1.32;
  letter-spacing: -0.014em;
  font-weight: 600;
}

p {
  margin: 0 0 0.9em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 150ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    color: var(--accent-hover);
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

code,
pre,
kbd {
  font-family: var(--mono);
  font-size: 0.85em;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.825rem;
  line-height: 1.45;
}

.lead {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 0.35vw + 0.84rem, 1.02rem);
  line-height: 1.56;
  max-width: 54ch;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 3.5vw, 36px);
}

.narrow {
  max-width: 620px;
}

.center {
  text-align: center;
}

.center .lead {
  margin-inline: auto;
}

.center-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.push-right {
  margin-left: auto;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -56px;
  z-index: 200;
  padding: 9px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: top 160ms var(--ease-out);
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Brand
   ========================================================================== */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 650;
  font-size: 0.98rem;
  letter-spacing: -0.025em;
  flex: none;
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover {
    color: var(--text);
  }
}

.brand svg {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  transition: transform 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover svg {
    transform: scale(1.06);
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 560;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 150ms var(--ease-out),
    border-color 150ms var(--ease-out),
    color 150ms var(--ease-out),
    transform 150ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn .icon {
  width: 15px;
  height: 15px;
  transition: transform 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn-arrow:hover .icon {
    transform: translateX(3px);
  }
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.825rem;
  gap: 6px;
}

.btn-lg {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 620;
  box-shadow: 0 1px 0 rgb(255 255 255 / 32%) inset;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    color: var(--accent-ink);
    box-shadow:
      0 1px 0 rgb(255 255 255 / 38%) inset,
      0 6px 20px -8px rgb(255 178 36 / 55%);
  }
}

.btn-ghost {
  background: rgb(255 255 255 / 3.5%);
  border-color: var(--border);
  color: var(--text);
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover:not(:disabled) {
    background: rgb(255 255 255 / 7%);
    border-color: var(--border-strong);
    color: var(--text);
  }
}

.btn-google {
  width: 100%;
  min-height: 42px;
  background: #f6f5f2;
  color: #151618;
  font-weight: 600;
  border-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .btn-google:hover:not(:disabled) {
    background: #ffffff;
    color: #0b0c0e;
  }
}

.google-g {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn[data-copied] {
  border-color: rgb(61 214 140 / 40%);
  color: var(--success);
  background: var(--success-soft);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.button-row.center {
  justify-content: center;
}

@media (pointer: coarse) {
  .btn,
  .btn-sm,
  .btn-icon {
    min-height: 40px;
  }

  .btn-icon {
    width: 40px;
    min-width: 40px;
  }
}

/* ==========================================================================
   Site Header (Session-Aware, Zero Flicker, Zero Layout Jump)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header);
  background: rgb(11 12 14 / 84%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  view-transition-name: site-header;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 100%;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text);
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 16px;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
}

.site-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 0.855rem;
  font-weight: 500;
  transition: color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .site-nav-links a:hover {
    color: var(--text);
    background: rgb(255 255 255 / 4.5%);
  }
}

.site-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 186px;
  flex: none;
}

.auth-dashboard {
  gap: 7px;
}

.nav-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgb(26 18 3 / 28%);
}

/* ==========================================================================
   Full-Viewport Landing Sections (.screen)
   ========================================================================== */

.screen {
  position: relative;
  min-height: calc(100svh - var(--header));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--border);
}

.screen-alt {
  background: var(--bg-elevated);
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 600px;
}

.section-head.center {
  margin-inline: auto;
  align-items: center;
}

.section-head h2 {
  margin: 0;
}

.section-action {
  display: flex;
  justify-content: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 14px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgb(255 255 255 / 3%);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgb(255 178 36 / 75%);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  overflow: clip;
  padding-block: var(--s-2);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  opacity: 0.64;
  mask-image: radial-gradient(85% 90% at 68% 48%, #000 24%, transparent 82%);
  -webkit-mask-image: radial-gradient(85% 90% at 68% 48%, #000 24%, transparent 82%);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgb(11 12 14 / 72%) 42%, rgb(11 12 14 / 12%) 100%),
    linear-gradient(180deg, rgb(11 12 14 / 45%) 0%, transparent 25%, transparent 78%, var(--bg) 100%);
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(28px, 4.5vw, 56px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-copy h1 {
  margin-bottom: 14px;
  max-width: 15ch;
}

.hero-copy .lead {
  margin-bottom: 22px;
  max-width: 46ch;
}

.hero-note {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.workbench {
  border-radius: var(--radius-lg);
  background: rgb(16 18 22 / 92%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-window);
  overflow: hidden;
}

.wb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgb(255 255 255 / 2.5%);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.wb-dots {
  display: flex;
  gap: 6px;
}

.wb-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(255 255 255 / 14%);
}

.wb-title {
  color: var(--text-muted);
}

.wb-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.wb-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgb(61 214 140 / 65%);
}

.wb-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.wb-prompt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 3.5%);
  border: 1px solid var(--border);
}

.wb-role {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  flex: none;
}

.wb-prompt p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text);
}

.wb-trace {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.wb-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.wb-tool {
  color: var(--accent);
  font-weight: 500;
}

.wb-line code {
  font-size: 1em;
  color: var(--text);
}

.wb-diff {
  margin-left: auto;
  display: inline-flex;
  gap: 5px;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.diff-add {
  color: var(--success);
}

.diff-del {
  color: var(--danger);
}

.wb-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 4px;
  font-size: 0.75rem;
}

.wb-result::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex: none;
  background: currentColor;
}

.wb-fail {
  color: var(--danger);
}

.wb-ok {
  color: var(--success);
}

.wb-approval {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgb(255 178 36 / 9%), rgb(255 178 36 / 3%));
  border: 1px solid var(--accent-border);
}

.wb-approval-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wb-approval-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.wb-approval-icon .icon {
  width: 14px;
  height: 14px;
}

.wb-approval-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wb-approval-label {
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 560;
}

.wb-approval-copy code {
  font-size: 0.78rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-approval-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.wb-chip {
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  font-size: 0.74rem;
  font-weight: 600;
}

.wb-chip-ghost {
  background: rgb(255 255 255 / 5%);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.wb-chip-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.works-with {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: var(--s-2);
  border-top: 1px solid var(--border);
}

.works-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.platform-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-list li {
  font-size: 0.9rem;
  font-weight: 560;
  letter-spacing: -0.015em;
  color: var(--text-muted);
}

/* ==========================================================================
   How it works — Clean 3-Step Rail + Simple Centered Connector Strip
   ========================================================================== */

.steps-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.step-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 28px 24px 0;
}

.step-item + .step-item {
  padding-left: 28px;
  border-left: 1px solid var(--border);
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.step-icon .icon {
  width: 18px;
  height: 18px;
}

.step-item h3 {
  margin: 0;
}

.step-item p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.endpoint-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.endpoint-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 440px;
  padding: 5px 5px 5px 14px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
}

.endpoint-box code {
  color: var(--accent);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-guides {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.endpoint-guides a {
  font-size: 0.83rem;
  color: var(--text-muted);
}

@media (hover: hover) and (pointer: fine) {
  .endpoint-guides a:hover {
    color: var(--text);
  }
}

/* ==========================================================================
   Capabilities — Spacious Symmetric 3x2 Open Grid
   ========================================================================== */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 40px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.cap-item {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--accent);
  margin-bottom: 2px;
}

.cap-icon .icon {
  width: 16px;
  height: 16px;
}

.cap-item h3 {
  margin: 0;
}

.cap-item p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.56;
}

/* ==========================================================================
   Security — Centered Vertical Flow + Clean 3x2 Hairline List
   ========================================================================== */

.sec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 36px;
  row-gap: 0;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.sec-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-block: 22px;
  border-bottom: 1px solid var(--border);
}

.sec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  flex: none;
  color: var(--accent);
}

.sec-icon .icon {
  width: 17px;
  height: 17px;
}

.sec-item h3 {
  margin: 0 0 5px;
}

.sec-item p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.52;
}

/* ==========================================================================
   Pricing — Centered Vertical + Pure-CSS Sliding Billing Toggle
   ========================================================================== */

.pricing-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

.bill-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.billing-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(146px, 1fr));
  padding: 4px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.billing-toggle::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc(50% - 4px);
  border-radius: 6px;
  background: var(--bg-hover);
  box-shadow: 0 1px 0 rgb(255 255 255 / 6%) inset, 0 1px 3px rgb(0 0 0 / 45%);
  transition: transform 240ms var(--ease-out);
  z-index: 0;
}

.bill-opt {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 550;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 150ms var(--ease-out);
}

.save-badge {
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
}

#bill-monthly:checked ~ .billing-toggle::before {
  transform: translateX(0%);
}

#bill-yearly:checked ~ .billing-toggle::before {
  transform: translateX(100%);
}

#bill-monthly:checked ~ .billing-toggle label[for="bill-monthly"],
#bill-yearly:checked ~ .billing-toggle label[for="bill-yearly"] {
  color: var(--text);
}

#bill-monthly:focus-visible ~ .billing-toggle label[for="bill-monthly"],
#bill-yearly:focus-visible ~ .billing-toggle label[for="bill-yearly"] {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 740px;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.price-card.featured {
  background:
    radial-gradient(90% 55% at 50% 0%, rgb(255 178 36 / 9%), transparent 70%),
    var(--bg-surface);
  border-color: var(--accent-border);
  box-shadow:
    0 1px 0 rgb(255 178 36 / 28%) inset,
    0 20px 48px -24px rgb(0 0 0 / 90%);
}

.price-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.price-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
}

.price-head h3 {
  margin: 0;
  font-size: 1rem;
}

.plan-pill {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
}

.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.price strong {
  font-size: clamp(1.8rem, 2.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.price span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.price-yearly {
  display: none;
}

#bill-yearly:checked ~ .price-grid .price-monthly {
  display: none;
}

#bill-yearly:checked ~ .price-grid .price-yearly {
  display: flex;
  animation: panelFade 180ms var(--ease-out);
}

.price-card .check-list {
  flex: 1;
}

/* ==========================================================================
   Check List (Pricing + OAuth Consent)
   ========================================================================== */

.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.check-list li .icon {
  margin-top: 2px;
  color: var(--accent);
}

/* ==========================================================================
   FAQ — Pure Single-Column Vertical Stack
   ========================================================================== */

.faq-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

.faq-list {
  width: 100%;
  max-width: 660px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.faq-list details {
  border-bottom: 1px solid var(--border);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px;
  min-height: 52px;
  font-size: 0.94rem;
  font-weight: 540;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  list-style: none;
  transition: color 150ms var(--ease-out);
}

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

@media (hover: hover) and (pointer: fine) {
  .faq-list summary:hover {
    color: var(--accent-hover);
  }
}

.faq-list summary .icon {
  color: var(--text-subtle);
  transition: transform 200ms var(--ease-out), color 160ms var(--ease-out);
}

.faq-list details[open] summary {
  color: var(--text);
}

.faq-list details[open] summary .icon {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-list details p {
  margin: 0 auto;
  padding: 0 16px 18px;
  max-width: 56ch;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.58;
}

@supports (interpolate-size: allow-keywords) {
  .faq-list details::details-content {
    height: 0;
    overflow: clip;
    opacity: 0;
    transition:
      height 220ms var(--ease-out),
      opacity 180ms var(--ease-out),
      content-visibility 220ms allow-discrete;
  }

  .faq-list details[open]::details-content {
    height: auto;
    opacity: 1;
  }
}

/* ==========================================================================
   Closing CTA Band & Footer
   ========================================================================== */

.cta-band {
  padding-block: clamp(52px, 8svh, 88px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(50% 100% at 50% 100%, rgb(255 178 36 / 10%), transparent 75%),
    var(--bg);
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.cta-inner h2 {
  margin: 0;
}

.cta-inner p {
  margin: 0 0 10px;
  font-size: 0.94rem;
}

.site-footer {
  background: var(--bg-elevated);
  padding-block: 42px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 0.8fr));
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.footer-brand p {
  margin-top: 10px;
  max-width: 34ch;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.site-footer nav h2 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: 0;
}

.site-footer nav a {
  color: var(--text-muted);
  font-size: 0.84rem;
}

@media (hover: hover) and (pointer: fine) {
  .site-footer nav a:hover {
    color: var(--text);
  }
}

.footer-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 18px;
}

/* ==========================================================================
   Download Page — Calm Centered Vertical Architecture
   ========================================================================== */

.download {
  background: radial-gradient(55% 40% at 50% 0%, rgb(255 178 36 / 6%), transparent 70%);
}

.download-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  max-width: 920px;
}

.download-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 580px;
}

.download-head h1 {
  margin-bottom: 10px;
}

.download-head .lead {
  margin-bottom: 22px;
}

.spec-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin: 22px 0 0;
  padding: 0;
}

.spec-bar > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.spec-bar dt {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.spec-bar dd {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 540;
  color: var(--text-muted);
}

.download-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.download-steps li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px 20px 0;
}

.download-steps li + li {
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.download-steps h3 {
  margin: 0;
  font-size: 0.9rem;
}

.download-steps p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.download-steps code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78em;
  overflow-wrap: break-word;
}

.download-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
}

.note-card h3 {
  margin: 0 0 5px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.note-card p {
  margin: 0;
  font-size: 0.815rem;
  color: var(--text-subtle);
  line-height: 1.52;
}

.note-card strong {
  color: var(--text-muted);
}

/* ==========================================================================
   Docs & Legal Prose Pages
   ========================================================================== */

.docs-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 60px);
  padding-block: 40px 72px;
  align-items: start;
}

.prose-layout {
  padding-block: 40px 72px;
  max-width: 740px;
}

.docs-nav {
  position: sticky;
  top: calc(var(--header) + 28px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}

.docs-nav-title {
  margin: 0 0 8px;
  padding-inline: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-subtle);
}

.docs-nav a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 480;
  transition: color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .docs-nav a:hover {
    color: var(--text);
    background: rgb(255 255 255 / 4%);
  }
}

.docs-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 560;
}

.prose {
  min-width: 0;
  max-width: 68ch;
}

.prose-head {
  padding-bottom: 20px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.prose-head h1 {
  font-size: clamp(1.65rem, 2.2vw, 2.15rem);
  margin-bottom: 8px;
}

.prose h2 {
  font-size: 1.18rem;
  margin-top: 2em;
  margin-bottom: 0.55em;
}

.prose h3 {
  font-size: 0.98rem;
  margin-top: 1.5em;
}

.prose p,
.prose li {
  color: #cfcdc6;
  line-height: 1.64;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1.1em;
}

.prose li {
  margin-bottom: 0.35em;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.prose pre {
  margin: 1em 0 1.3em;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 0.84rem;
}

.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1em 0 1.6em;
  font-size: 0.86rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.prose th,
.prose td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.prose th {
  background: var(--bg-surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
}

.prose td {
  color: var(--text-muted);
}

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

/* ==========================================================================
   404 Page
   ========================================================================== */

.not-found {
  background: radial-gradient(50% 45% at 50% 45%, rgb(255 178 36 / 5%), transparent 70%);
}

.not-found h1 {
  margin-bottom: 10px;
}

.not-found .lead {
  margin-bottom: 22px;
}

/* ==========================================================================
   Relay Dashboard (body.app) — Symmetric 2-Col Dense Layout, Zero Nested Boxes
   Preserves the exact HTML class contract from views.rs and dashboard.rs.
   ========================================================================== */

body.app {
  background:
    radial-gradient(55% 32% at 50% 0%, rgb(255 178 36 / 4.5%), transparent 65%),
    var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header);
  background: rgb(11 12 14 / 84%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  view-transition-name: site-header;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 920px;
  height: 100%;
  margin-inline: auto;
  padding-inline: clamp(20px, 3.5vw, 36px);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-nav > a {
  color: var(--text-muted);
  font-size: 0.855rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
}

@media (hover: hover) and (pointer: fine) {
  .topbar-nav > a:hover {
    color: var(--text);
    background: rgb(255 255 255 / 4.5%);
  }
}

.account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 11px 0 5px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.account-email {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-main {
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
  padding: 36px clamp(20px, 3.5vw, 36px) 72px;
}

.page-head {
  margin-bottom: 28px;
}

.page-head h1 {
  font-size: clamp(1.55rem, 2vw, 1.95rem);
  margin-bottom: 5px;
}

.page-head .muted {
  font-size: 0.92rem;
}

/* 2-column dense grid:
   Row 1: Connector URL (full width .span-2)
   Row 2: Approvals (left 50%) + This month (right 50%), equal height
   Row 3: Computers (full width .span-2)
   Row 4: Connected apps (full width .span-2) */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 16px;
  align-items: stretch;
}

.dash-grid > [data-fragment] {
  display: contents;
}

.dash-grid > .span-2 {
  grid-column: 1 / -1;
}

.dash-grid > div.span-2[data-fragment] {
  display: block;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.card.is-updated {
  animation: cardPulse 550ms var(--ease-out);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-head > div {
  min-width: 0;
}

.card-head h2 {
  font-size: 0.96rem;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: -0.015em;
}

.card-head p {
  margin: 0;
  font-size: 0.825rem;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--accent);
}

.card-icon .icon {
  width: 16px;
  height: 16px;
}

.approvals-card.has-items {
  border-color: var(--accent-border);
  background:
    radial-gradient(90% 50% at 50% 0%, rgb(255 178 36 / 8%), transparent 70%),
    var(--bg-elevated);
}

.copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-field input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.guide-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
}

.guide-links a .icon {
  width: 13px;
  height: 13px;
  transition: transform 150ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .guide-links a:hover {
    color: var(--text);
  }

  .guide-links a:hover .icon {
    transform: translateX(3px);
  }
}

/* Flush hairline states (no nested card-inside-card clutter) */
.empty {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 16px 0 4px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.86rem;
}

.empty .icon {
  color: var(--success);
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 16px 0 2px;
  border-top: 1px solid var(--border);
}

.empty-state p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.item-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.item:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.item-body {
  flex: 1;
  min-width: 0;
}

.item-title {
  margin: 0 0 2px;
  font-size: 0.9rem;
  font-weight: 560;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--text-subtle);
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 8px rgb(61 214 140 / 70%);
}

.approval-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.approval {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.approval + .approval {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.approval-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.approval-summary {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--text);
  word-break: break-word;
}

.risk {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}

.risk-high,
.risk-critical,
.risk-exec {
  background: var(--danger-soft);
  color: var(--danger);
}

.risk-low,
.risk-read {
  background: var(--success-soft);
  color: var(--success);
}

.usage-figure {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.usage-figure strong {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.usage-meter {
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-inset);
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
}

.usage-meter::-webkit-meter-bar {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.usage-meter::-webkit-meter-optimum-value {
  background: var(--accent);
  border-radius: var(--radius-pill);
}

.usage-meter::-webkit-meter-suboptimum-value {
  background: var(--accent-hover);
  border-radius: var(--radius-pill);
}

.usage-meter::-webkit-meter-even-less-good-value {
  background: var(--danger);
  border-radius: var(--radius-pill);
}

.usage-meter::-moz-meter-bar {
  background: var(--accent);
  border-radius: var(--radius-pill);
}

.upgrade {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.upgrade p {
  margin: 0;
  font-size: 0.82rem;
}

/* ==========================================================================
   Relay Focus Pages (body.focus: Login, OAuth Consent, Pairing, Errors)
   ========================================================================== */

body.focus {
  background:
    radial-gradient(55% 45% at 50% 18%, rgb(255 178 36 / 7%), transparent 70%),
    var(--bg);
}

.focus-main {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px 18px;
}

.focus-brand {
  display: flex;
  justify-content: center;
}

.focus-card {
  width: 100%;
  max-width: 420px;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-window);
}

.focus-card h1 {
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

.consent-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.consent-head h1 {
  margin: 0;
}

.consent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

.consent-icon.success {
  background: var(--success-soft);
  border-color: rgb(61 214 140 / 32%);
  color: var(--success);
}

.fine-print {
  margin: 0;
  font-size: 0.79rem;
  color: var(--text-subtle);
  line-height: 1.48;
}

.fine-print strong {
  color: var(--text-muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 0.82rem;
  font-weight: 540;
  color: var(--text-muted);
}

.code-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  transition: border-color 150ms var(--ease-out);
}

.code-input:focus {
  outline: none;
  border-color: var(--accent);
}

.pair-code {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  border: 1px solid var(--border);
  background: var(--bg-inset);
}

.notice-error {
  background: var(--danger-soft);
  border-color: rgb(255 107 107 / 32%);
  color: var(--danger);
}

.focus-card .button-row {
  justify-content: flex-end;
  margin-top: 4px;
}

/* ==========================================================================
   Motion, Hero Choreography & Scroll-Linked Reveals (GPU-only)
   ========================================================================== */

@keyframes heroLead {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSupport {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroWorkbench {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOnly {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollReveal {
  from {
    opacity: 0.45;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardPulse {
  0% {
    border-color: var(--accent-border);
  }
  100% {
    border-color: var(--border);
  }
}

html.fresh-load .hero-copy h1 {
  animation: heroLead 380ms var(--ease-out) both;
}

html.fresh-load .hero-copy .lead,
html.fresh-load .hero-copy .button-row {
  animation: heroSupport 340ms var(--ease-out) 50ms both;
}

html.fresh-load .hero-visual {
  animation: heroWorkbench 400ms var(--ease-out) 85ms both;
}

html.fresh-load .hero-copy .status-pill,
html.fresh-load .hero-note,
html.fresh-load .works-with {
  animation: fadeOnly 320ms var(--ease-out) 100ms both;
}

@supports (animation-timeline: view()) {
  html:not(.is-anchor-nav) .reveal {
    animation: scrollReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 22%;
  }
}

/* ==========================================================================
   Height-Aware Desktop Tuning (1280x720, 1366x768, 1600x900, 1920x1080)
   ========================================================================== */

@media (min-width: 900px) and (height <= 820px) {
  :root {
    --header: 54px;
    --s-2: 10px;
    --s-3: 18px;
    --s-4: 24px;
  }

  .step-item {
    padding: 16px 20px 16px 0;
  }

  .step-item + .step-item {
    padding-left: 20px;
  }

  .cap-grid {
    gap: 22px 32px;
  }

  .sec-item {
    padding-block: 16px;
  }

  .price-card {
    padding: 18px 22px;
    gap: 14px;
  }

  .price-head {
    padding-bottom: 12px;
  }

  .wb-body {
    gap: 9px;
    padding: 13px;
  }

  .faq-list summary {
    padding: 12px 2px;
    min-height: 44px;
  }

  .download-steps li {
    padding: 14px 14px 14px 0;
  }

  .download-steps li + li {
    padding-left: 14px;
  }
}

@media (min-width: 900px) and (height <= 740px) {
  :root {
    --header: 52px;
    --s-2: 8px;
    --s-3: 14px;
    --s-4: 18px;
  }

  h1 {
    font-size: min(clamp(1.85rem, 2.5vw + 0.5rem, 2.75rem), 5.8svh);
  }

  h2 {
    font-size: min(clamp(1.35rem, 1.6vw + 0.45rem, 1.85rem), 3.9svh);
  }

  .lead {
    font-size: 0.92rem;
    line-height: 1.48;
  }

  .hero-copy .lead,
  .download-head .lead {
    margin-bottom: 14px;
  }

  .status-pill {
    margin-bottom: 10px;
  }

  .cap-grid {
    gap: 16px 28px;
  }

  .sec-item {
    padding-block: 13px;
  }

  .faq-list summary {
    padding: 10px 2px;
    min-height: 40px;
  }

  .spec-bar {
    margin-top: 14px;
  }

  .focus-card {
    padding: 20px 22px;
  }
}

/* ==========================================================================
   Responsive Breakpoints (Tablet & Mobile down to 360px)
   ========================================================================== */

@media (max-width: 960px) {
  .screen {
    min-height: auto;
    padding-block: 52px;
  }

  .hero {
    padding-block: 36px 42px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .steps-rail {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-item {
    padding: 18px 0;
  }

  .step-item + .step-item {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .cap-grid,
  .sec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .download-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .download-steps li {
    padding: 18px 16px 18px 0;
  }

  .download-steps li:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .download-steps li:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .docs-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .docs-nav-title {
    width: 100%;
    padding: 0;
    margin-bottom: 4px;
  }

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

@media (max-width: 760px) {
  .nav-toggle-label {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 20px 20px;
    background: rgb(11 12 14 / 97%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-strong);
    overscroll-behavior: contain;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 180ms var(--ease-out),
      transform 180ms var(--ease-out),
      visibility 180ms;
  }

  .nav-toggle:checked ~ .site-nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-toggle:focus-visible + .nav-toggle-label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .site-nav-links {
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    gap: 2px;
  }

  .site-nav-links a {
    min-height: 42px;
    padding: 0 12px;
    font-size: 0.95rem;
  }

  .site-nav-actions {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .site-nav-actions .btn {
    width: 100%;
    min-height: 42px;
  }

  .cap-grid,
  .sec-grid,
  .price-grid,
  .download-steps,
  .download-notes,
  .dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .download-steps li {
    padding: 16px 0;
    border-left: 0;
  }

  .download-steps li + li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .dash-grid > .span-2 {
    grid-column: auto;
  }

  .account-email {
    display: none;
  }

  .account {
    padding: 0 4px;
  }

  .wb-approval {
    flex-direction: column;
    align-items: flex-start;
  }

  .wb-approval-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .copy-field {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .focus-card {
    padding: 20px;
  }
}

/* ==========================================================================
   Reduced Motion — Strictly Disables All Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  html,
  html.smooth-scroll {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    animation-timeline: auto !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal,
  .hero-copy h1,
  .hero-copy .lead,
  .hero-copy .button-row,
  .hero-copy .status-pill,
  .hero-note,
  .hero-visual,
  .works-with {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
