/*
 * Video Assembly customer design system: the landing page, account area and OAuth pages.
 * The CSP is `default-src 'self'`: no web fonts, no inline styles, no data: images. Fonts come
 * from the system stack (every listed family covers Vietnamese); icons are inline SVG.
 */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* Type scale (1.25 ratio) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --leading-tight: 1.2;
  --leading-normal: 1.6;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --container: 1120px;
  --container-narrow: 440px;
  --container-medium: 760px;

  /* Light palette: every text/background pair meets WCAG AA (4.5:1). */
  --color-bg: #f6f7fb;
  --color-surface: #ffffff;
  --color-surface-muted: #f0f1f8;
  --color-text: #151729;
  --color-text-muted: #525873;
  --color-border: #e1e3ee;
  --color-border-strong: #c5c9db;
  --color-primary: #4338ca;
  --color-primary-hover: #3730a3;
  --color-primary-soft: #eceafd;
  --color-on-primary: #ffffff;
  --color-accent: #f59e0b;
  --color-focus: #4338ca;
  --color-danger: #b42318;
  --color-danger-hover: #912018;
  --color-danger-soft: #fef3f2;
  --color-danger-border: #fecdca;
  --color-success: #067647;
  --color-success-soft: #ecfdf3;
  --color-success-border: #abefc6;
  --color-warning: #93370d;
  --color-warning-soft: #fffaeb;
  --color-warning-border: #fedf89;

  --shadow-sm: 0 1px 2px rgb(20 22 41 / 0.06);
  --shadow-md: 0 1px 2px rgb(20 22 41 / 0.05), 0 8px 24px -6px rgb(20 22 41 / 0.12);
  --shadow-lg: 0 2px 4px rgb(20 22 41 / 0.04), 0 24px 48px -12px rgb(20 22 41 / 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0d0e19;
    --color-surface: #161827;
    --color-surface-muted: #1d2033;
    --color-text: #eceef8;
    --color-text-muted: #a4a9c4;
    --color-border: #2a2d45;
    --color-border-strong: #3c4061;
    --color-primary: #8f91fa;
    --color-primary-hover: #aeb0fc;
    --color-primary-soft: #23244a;
    --color-on-primary: #0d0e19;
    --color-accent: #fbbf24;
    --color-focus: #aeb0fc;
    --color-danger: #fb7c72;
    --color-danger-hover: #fda29b;
    --color-danger-soft: #2a1416;
    --color-danger-border: #5c2320;
    --color-success: #4ade9a;
    --color-success-soft: #0e2a1d;
    --color-success-border: #17583a;
    --color-warning: #fcc552;
    --color-warning-soft: #2a1f08;
    --color-warning-border: #5e430e;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -6px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 24px 48px -12px rgb(0 0 0 / 0.6);
  }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: var(--leading-tight); letter-spacing: -0.01em; font-weight: 700; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
p { margin: 0; }
p + p { margin-top: var(--space-3); }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; }
code, kbd { font-family: var(--font-mono); font-size: 0.92em; }

a { color: var(--color-primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-primary-hover); }

:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-sm); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 10;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  background: var(--color-primary); color: var(--color-on-primary); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-3); color: var(--color-on-primary); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-5); }
.container-narrow { max-width: calc(var(--container-narrow) + 2 * var(--space-5)); }
.container-medium { max-width: calc(var(--container-medium) + 2 * var(--space-5)); }

.muted { color: var(--color-text-muted); }
.small { font-size: var(--text-sm); }
.mono { font-family: var(--font-mono); }
.break { overflow-wrap: anywhere; }

/* ---------- Header and footer ---------- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text); text-decoration: none; font-weight: 700; font-size: var(--text-lg); letter-spacing: -0.02em; }
.brand:hover { color: var(--color-text); }
.logo-mark { width: 32px; height: 32px; flex: none; }
.logo-mark-bg { fill: var(--color-primary); }
.logo-mark-strip { fill: var(--color-accent); }
.logo-mark-play { fill: var(--color-on-primary); }

.site-nav { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; justify-content: flex-end; }
.site-nav > a:not(.btn) {
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  color: var(--color-text-muted); font-size: var(--text-sm); font-weight: 600; text-decoration: none;
}
.site-nav > a:not(.btn):hover { color: var(--color-text); background: var(--color-surface-muted); }
.site-nav > a[aria-current="page"] { color: var(--color-primary); background: var(--color-primary-soft); }
.site-nav form { margin-left: var(--space-2); }

.site-main { flex: 1; padding-block: var(--space-7); }

.site-footer { border-top: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); font-size: var(--text-sm); }
.site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-5); }
.site-footer .brand { font-size: var(--text-base); }
.site-footer .logo-mark { width: 24px; height: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); list-style: none; }
.footer-links a { color: var(--color-text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--color-text); text-decoration: underline; }

/* ---------- Cards and page headers ---------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}
.card + .card { margin-top: var(--space-5); }
.card-elevated { box-shadow: var(--shadow-lg); }
.card-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-5); }
.card-header p { margin-top: var(--space-2); }
.card-footer { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--color-border); }

.page-header { margin-bottom: var(--space-6); }
.page-header h1 { font-size: var(--text-3xl); }
.page-header p { margin-top: var(--space-2); color: var(--color-text-muted); max-width: 60ch; }

.auth-card { text-align: left; }
.auth-card h1 { font-size: var(--text-2xl); }
.auth-card .lead { margin-top: var(--space-2); color: var(--color-text-muted); }
.card.auth-card > * + * { margin-top: var(--space-5); }
.auth-icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--color-primary-soft); color: var(--color-primary);
}
.auth-icon.is-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.auth-icon.is-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.auth-icon.is-success { background: var(--color-success-soft); color: var(--color-success); }
.auth-help { font-size: var(--text-sm); color: var(--color-text-muted); }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 24px; height: 24px; }

/* ---------- Forms ---------- */

.stack { display: grid; gap: var(--space-4); }

.field { display: grid; gap: var(--space-2); }
.field-label { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.field-hint { font-size: var(--text-sm); color: var(--color-text-muted); }

input, select, textarea, button { font: inherit; color: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--color-text-muted); opacity: 0.75; }
input:hover, select:hover, textarea:hover { border-color: var(--color-text-muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 30%, transparent);
}
.input-code { font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.input-code::placeholder { text-transform: none; }
.input-code-lg { font-size: var(--text-xl); text-align: center; letter-spacing: 0.18em; min-height: 56px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-2) var(--space-5);
  border: 1px solid transparent; border-radius: var(--radius-md);
  font-weight: 600; font-size: var(--text-base); line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-primary-hover); color: var(--color-on-primary); }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border-strong); }
.btn-secondary:hover { background: var(--color-surface-muted); color: var(--color-text); }
.btn-ghost { background: transparent; color: var(--color-text-muted); }
.btn-ghost:hover { background: var(--color-surface-muted); color: var(--color-text); }
.btn-danger { background: transparent; color: var(--color-danger); border-color: var(--color-danger-border); }
.btn-danger:hover { background: var(--color-danger-soft); color: var(--color-danger-hover); border-color: var(--color-danger); }
.btn-sm { min-height: 36px; padding: var(--space-1) var(--space-3); font-size: var(--text-sm); }
.btn-lg { min-height: 52px; padding: var(--space-3) var(--space-6); font-size: var(--text-lg); }
.btn-block { width: 100%; }

.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.button-row form { display: contents; }
.button-row .btn { width: 100%; }
.actions-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- Alerts ---------- */

.alert {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-3) var(--space-4); border: 1px solid; border-radius: var(--radius-md);
  font-size: var(--text-sm); line-height: 1.5;
}
.alert .icon { margin-top: 1px; }
.alert-danger { background: var(--color-danger-soft); border-color: var(--color-danger-border); color: var(--color-danger); }
.alert-warning { background: var(--color-warning-soft); border-color: var(--color-warning-border); color: var(--color-warning); }
.alert-success { background: var(--color-success-soft); border-color: var(--color-success-border); color: var(--color-success); }
.page-alert { margin-bottom: var(--space-5); }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 2px var(--space-2); border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600; line-height: 1.6; white-space: nowrap;
  background: var(--color-surface-muted); color: var(--color-text-muted); border: 1px solid var(--color-border);
}
.badge-success { background: var(--color-success-soft); color: var(--color-success); border-color: var(--color-success-border); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); border-color: var(--color-warning-border); }
.badge-neutral { background: var(--color-surface-muted); color: var(--color-text-muted); }

/* ---------- Definition lists ---------- */

.detail-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-3) var(--space-5); margin: 0; font-size: var(--text-sm); }
.detail-list dt { color: var(--color-text-muted); }
.detail-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.detail-list dd.mono { font-weight: 500; font-size: var(--text-xs); }

/* ---------- Consent ---------- */

.connect-visual { display: flex; align-items: center; gap: var(--space-3); }
.app-avatar {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none;
  border-radius: var(--radius-md); border: 1px solid var(--color-border);
  background: var(--color-surface-muted); color: var(--color-text);
  font-weight: 700; font-size: var(--text-xl); text-transform: uppercase;
}
.app-avatar .logo-mark { width: 48px; height: 48px; }
.connect-arrow { color: var(--color-text-muted); }

.permission-list { list-style: none; display: grid; gap: var(--space-3); font-size: var(--text-sm); }
.permission-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.permission-list .icon { color: var(--color-success); margin-top: 1px; }

.panel { padding: var(--space-4); border-radius: var(--radius-md); background: var(--color-surface-muted); border: 1px solid var(--color-border); }
.panel-title { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--space-3); }

/* ---------- Usage meter ---------- */

.usage { display: grid; gap: var(--space-2); min-width: 220px; }
.usage-label { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); }
.usage progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: var(--radius-full); background: var(--color-surface-muted); overflow: hidden; }
.usage progress::-webkit-progress-bar { background: var(--color-surface-muted); border-radius: var(--radius-full); }
.usage progress::-webkit-progress-value { background: var(--color-primary); border-radius: var(--radius-full); }
.usage progress::-moz-progress-bar { background: var(--color-primary); border-radius: var(--radius-full); }

/* ---------- Tables (stack into cards on narrow screens) ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { padding: var(--space-3) var(--space-4); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--color-border); }
.table thead th { background: var(--color-surface-muted); color: var(--color-text-muted); font-weight: 600; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-actions { text-align: right; width: 1%; white-space: nowrap; }
.table .cell-strong { font-weight: 600; }

@media (max-width: 640px) {
  .table-stack { border: 0; overflow: visible; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack tbody { display: grid; gap: var(--space-3); }
  .table-stack tr { display: grid; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
  .table-stack td { display: flex; justify-content: space-between; gap: var(--space-3); padding: 0; border: 0; }
  .table-stack td[data-label]::before { content: attr(data-label); color: var(--color-text-muted); font-weight: 500; }
  .table-stack .cell-strong { font-size: var(--text-base); }
  .table-stack .cell-actions { width: auto; text-align: left; padding-top: var(--space-2); }
  .table-stack .cell-actions form, .table-stack .cell-actions .btn { width: 100%; }
}

/* ---------- Empty and success states ---------- */

.empty-state { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-7) var(--space-5); text-align: center; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); }
.empty-state .auth-icon { margin-bottom: var(--space-1); }
.empty-state p { max-width: 46ch; color: var(--color-text-muted); }

.steps { list-style: none; counter-reset: step; display: grid; gap: var(--space-3); font-size: var(--text-sm); }
.steps li { counter-increment: step; display: flex; gap: var(--space-3); align-items: flex-start; }
.steps li::before {
  content: counter(step); flex: none; display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: var(--radius-full); background: var(--color-primary-soft); color: var(--color-primary); font-weight: 700; font-size: var(--text-xs);
}

.feature-row { display: flex; gap: var(--space-4); align-items: flex-start; }
.feature-row h2 { font-size: var(--text-lg); }
.feature-row p { margin-top: var(--space-1); }

/* ---------- Landing page ---------- */

.page-landing .site-main { padding-block: 0; }
.section { padding-block: var(--space-8); }
.section-muted { background: var(--color-surface); border-block: 1px solid var(--color-border); }
.section-header { max-width: 640px; margin-bottom: var(--space-7); }
.section-header h2 { font-size: var(--text-3xl); }
.section-header p { margin-top: var(--space-3); color: var(--color-text-muted); font-size: var(--text-lg); }
.eyebrow { display: inline-block; margin-bottom: var(--space-3); color: var(--color-primary); font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.hero { position: relative; overflow: hidden; padding-block: var(--space-8); }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-primary) 18%, transparent), transparent);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--space-7); align-items: center; }
.hero h1 { font-size: var(--text-4xl); letter-spacing: -0.03em; line-height: 1.1; }
.hero h1 em { font-style: normal; color: var(--color-primary); }
.hero .lead { margin-top: var(--space-5); font-size: var(--text-lg); color: var(--color-text-muted); max-width: 54ch; }
.hero .actions-row { margin-top: var(--space-6); }
.hero-note { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); }

/* Decorative storyboard built from markup (no images under the CSP). */
.storyboard { padding: var(--space-5); border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-lg); }
.storyboard-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); font-size: var(--text-sm); font-weight: 600; }
.storyboard-dots { display: flex; gap: 6px; }
.storyboard-dots span { width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--color-border-strong); }
.storyboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.scene { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); background: var(--color-surface-muted); }
.scene-frame { aspect-ratio: 16 / 10; position: relative; }
.scene-frame::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 18%; height: 34%; border-radius: 50% 50% 0 0; background: color-mix(in srgb, var(--color-surface) 55%, transparent); }
.scene-1 .scene-frame { background: linear-gradient(160deg, #a5b4fc, #4338ca); }
.scene-2 .scene-frame { background: linear-gradient(160deg, #fde68a, #f59e0b); }
.scene-3 .scene-frame { background: linear-gradient(160deg, #6ee7b7, #0f766e); }
.scene-4 .scene-frame { background: linear-gradient(160deg, #fbcfe8, #db2777); }
.scene-5 .scene-frame { background: linear-gradient(160deg, #bae6fd, #0369a1); }
.scene-6 .scene-frame { background: linear-gradient(160deg, #ddd6fe, #7c3aed); }
.scene-meta { display: flex; justify-content: space-between; align-items: center; gap: var(--space-1); padding: var(--space-2); font-size: var(--text-xs); font-weight: 600; }
.scene-meta .dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-success); }
.scene-meta .dot.is-pending { background: var(--color-accent); }
.waveform { display: flex; align-items: center; gap: 3px; height: 40px; margin-top: var(--space-4); padding: 0 var(--space-3); border-radius: var(--radius-md); background: var(--color-primary-soft); }
.waveform span { flex: 1; border-radius: 2px; background: var(--color-primary); height: 30%; }
.waveform span:nth-child(3n) { height: 70%; }
.waveform span:nth-child(4n) { height: 50%; }
.waveform span:nth-child(5n) { height: 85%; }
.waveform span:nth-child(7n) { height: 40%; }
.storyboard-caption { display: flex; justify-content: space-between; margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }

.step-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); counter-reset: step; }
.step-card { position: relative; padding: var(--space-6); border-radius: var(--radius-lg); background: var(--color-bg); border: 1px solid var(--color-border); counter-increment: step; }
.step-card::before { content: "0" counter(step); display: block; margin-bottom: var(--space-4); font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; color: var(--color-primary); }
.step-card .auth-icon { margin-bottom: var(--space-4); }
.step-card h3 { font-size: var(--text-xl); }
.step-card p { margin-top: var(--space-3); color: var(--color-text-muted); }

.feature-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.feature-grid li { display: flex; gap: var(--space-4); align-items: flex-start; }
.feature-grid h3 { font-size: var(--text-lg); }
.feature-grid p { margin-top: var(--space-1); color: var(--color-text-muted); }

.platform-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.platform-card { display: grid; align-content: start; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--color-bg); border: 1px solid var(--color-border); }
.platform-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.platform-card h3 { font-size: var(--text-lg); }
.platform-card p { color: var(--color-text-muted); font-size: var(--text-sm); }
.platform-card.is-unavailable { opacity: 0.85; }
.section-note { margin-top: var(--space-5); font-size: var(--text-sm); color: var(--color-text-muted); }

.check-list { list-style: none; display: grid; gap: var(--space-3); }
.check-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.check-list .icon { color: var(--color-primary); margin-top: 2px; }

.cta-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); }
.cta-card { padding: var(--space-6); border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-surface); }
.cta-card.is-primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); }
.cta-card.is-primary p { color: color-mix(in srgb, var(--color-on-primary) 85%, transparent); }
.cta-card.is-primary .btn { background: var(--color-on-primary); color: var(--color-primary); }
.cta-card.is-primary .btn:hover { background: color-mix(in srgb, var(--color-on-primary) 90%, var(--color-primary)); }
.cta-card.is-primary :focus-visible { outline-color: var(--color-on-primary); }
.cta-card h2 { font-size: var(--text-2xl); }
.cta-card p { margin-top: var(--space-3); color: var(--color-text-muted); }
.cta-card .actions-row { margin-top: var(--space-5); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .step-grid, .platform-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .feature-grid, .cta-band { grid-template-columns: 1fr; }
  .landing-nav > a:not(.btn) { display: none; }
}

@media (max-width: 560px) {
  :root { --space-7: 2rem; --space-8: 3rem; }
  .container { padding-inline: var(--space-4); }
  .card { padding: var(--space-5); border-radius: var(--radius-md); }
  .site-main { padding-block: var(--space-5); }
  .page-header h1 { font-size: var(--text-2xl); }
  .section-header h2 { font-size: var(--text-2xl); }
  .brand-name { font-size: var(--text-base); }
  .site-header-inner:has(.account-nav) .brand-name { display: none; }
  .site-nav > a:not(.btn) { padding-inline: var(--space-2); }
  .site-nav form { margin-left: 0; }
  .storyboard-grid { grid-template-columns: repeat(2, 1fr); }
  .scene-5, .scene-6 { display: none; }
  .hero .actions-row .btn { flex: 1 1 100%; }
  .detail-list { grid-template-columns: 1fr; gap: var(--space-1); }
  .detail-list dd + dt { margin-top: var(--space-2); }
  .usage { min-width: 0; width: 100%; }
}

@media (max-width: 400px) {
  .account-nav .nav-label-long { display: none; }
}

.brand-name { white-space: nowrap; }
