:root {
  color-scheme: light dark;
  --canvas: #f4f7f7;
  --canvas-glow: rgba(8, 122, 128, .12);
  --surface: rgba(255, 255, 255, .88);
  --surface-strong: #fff;
  --text: #172327;
  --muted: #627176;
  --line: rgba(22, 52, 57, .12);
  --accent: #087a80;
  --accent-strong: #05666b;
  --accent-soft: rgba(8, 122, 128, .09);
  --success: #167451;
  --danger: #b23a43;
  --shadow: 0 24px 70px rgba(18, 46, 50, .1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0b1114;
    --canvas-glow: rgba(61, 183, 186, .12);
    --surface: rgba(18, 27, 31, .88);
    --surface-strong: #151f23;
    --text: #edf4f5;
    --muted: #99aaae;
    --line: rgba(224, 241, 242, .11);
    --accent: #3db7ba;
    --accent-strong: #65ced0;
    --accent-soft: rgba(61, 183, 186, .12);
    --success: #5ed3a3;
    --danger: #ff8b94;
    --shadow: 0 28px 80px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at 50% -15%, var(--canvas-glow), transparent 38rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-underline-offset: 3px; }
.page-shell { width: min(720px, calc(100% - 32px)); margin: 0 auto; padding: max(36px, env(safe-area-inset-top)) 0 max(40px, env(safe-area-inset-bottom)); }
.brand-row { display: flex; align-items: center; gap: 17px; margin: 0 4px 32px; }
.brand-row.compact { margin-top: 24px; }
.brand-mark { display: block; width: 64px; height: 64px; border-radius: 17px; box-shadow: 0 10px 26px rgba(8, 122, 128, .12); }
.eyebrow, .section-kicker { margin: 0 0 6px; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(25px, 6vw, 34px); line-height: 1.1; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 21px; line-height: 1.25; letter-spacing: -.018em; }
p { color: var(--muted); line-height: 1.62; }

.hero-card, .panel, .trust-grid article {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.hero-card { display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start; padding: 24px; border-radius: 22px; margin-bottom: 16px; }
.hero-card p:last-child { margin-bottom: 0; }
.status-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: var(--accent); background: var(--accent-soft); }
.status-icon svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.panel { padding: 26px; border-radius: 22px; margin-bottom: 16px; }
.panel-heading { display: grid; grid-template-columns: 38px 1fr; gap: 14px; }
.panel-heading p { margin-bottom: 22px; }
.step-number { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.step-number.active { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.field-label { display: block; margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 650; }
input[type="text"] { width: 100%; height: 50px; padding: 0 15px; color: var(--text); letter-spacing: .08em; border: 1px solid var(--line); border-radius: 13px; outline: none; background: var(--surface-strong); text-transform: uppercase; transition: border-color .18s, box-shadow .18s; }
input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.consent-row { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; margin: 18px 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.consent-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.consent-row strong { color: var(--text); }
.primary-button, .secondary-button, .danger-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 50px; padding: 0 18px; border-radius: 13px; cursor: pointer; font-weight: 680; transition: transform .16s, background .16s, opacity .16s; }
.primary-button { color: #fff; border: 0; background: var(--accent); box-shadow: 0 10px 24px rgba(8, 122, 128, .2); }
.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.secondary-button { color: var(--text); border: 1px solid var(--line); background: transparent; }
.danger-button { color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); background: transparent; }
button:not(:disabled):active { transform: scale(.985); }
button:disabled { cursor: wait; opacity: .58; }
.form-message { margin: 13px 2px 0; color: var(--danger); font-size: 13px; }
.form-message.success-message { color: var(--success); }
.instruction-list { list-style: none; margin: 2px 0 20px; padding: 0; }
.instruction-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 13px 0; border-top: 1px solid var(--line); }
.instruction-list li > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 750; }
.instruction-list p { margin: 2px 0 0; }
.instruction-list strong { color: var(--text); }
.waiting-row { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.spinner { width: 17px; height: 17px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.success-panel { text-align: center; }
.success-symbol { display: grid; place-items: center; width: 58px; height: 58px; margin: 2px auto 18px; border-radius: 18px; color: var(--success); background: color-mix(in srgb, var(--success) 13%, transparent); font-size: 28px; font-weight: 700; }
.device-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 22px 0 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--accent-soft); }
.device-summary span { color: var(--muted); font-size: 13px; }
.device-summary strong { font: 700 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.fine-print { margin-bottom: 20px; font-size: 12px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 24px; }
.trust-grid article { padding: 18px; border-radius: 17px; box-shadow: none; }
.trust-grid span { display: block; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.trust-grid strong { display: block; font-size: 14px; }
.trust-grid p { margin: 7px 0 0; font-size: 12px; line-height: 1.55; }
footer { display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; }
.back-link { display: inline-block; margin-bottom: 6px; text-decoration: none; }
.prose h2 { margin-top: 28px; font-size: 17px; }
.prose h2:first-of-type { margin-top: 10px; }
.prose p { margin-bottom: 0; }
.notice-version { font-size: 12px; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 620px) {
  .page-shell { width: min(100% - 24px, 720px); padding-top: max(24px, env(safe-area-inset-top)); }
  .brand-row { margin-bottom: 24px; }
  .brand-mark { width: 56px; height: 56px; border-radius: 15px; }
  .hero-card { grid-template-columns: 44px 1fr; padding: 21px 18px; }
  .status-icon { width: 44px; height: 44px; border-radius: 13px; }
  .panel { padding: 22px 18px; }
  .trust-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
