/* ShieldMind code audit pages (landing, cabinet, test payment, owner).
   Tokens follow the console (internal/console/static/app.css).
   Spacing scale: 4 8 12 16 24 32 48. Base text 16px. */

:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #64748B;
  --brand: #4F46E5;
  --brand-hover: #4338CA;
  --brand-soft: #EEF2FF;
  --brand-text: #3730A3;
  --on-brand: #FFFFFF;
  --ok: #15803D;
  --ok-soft: #DCFCE7;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --danger: #B91C1C;
  --danger-soft: #FEE2E2;
  --info: #1D4ED8;
  --info-soft: #DBEAFE;
  --muted-soft: #F1F5F9;
  --sev-critical: #B91C1C;
  --sev-critical-soft: #FEE2E2;
  --sev-high: #C2410C;
  --sev-high-soft: #FFEDD5;
  --sev-medium: #A16207;
  --sev-medium-soft: #FEF9C3;
  --sev-low: #1D4ED8;
  --sev-low-soft: #DBEAFE;
  --sev-info: #475569;
  --sev-info-soft: #F1F5F9;
  --code-bg: #0F172A;
  --code-text: #E2E8F0;
  --code-border: #0F172A;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .18);
  --ring: 0 0 0 3px rgba(79, 70, 229, .3);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1120;
    --surface: #111827;
    --surface-2: #1E293B;
    --border: #273449;
    --border-strong: #3B4A63;
    --text: #E2E8F0;
    --text-2: #A5B4C8;
    --text-3: #8B9AB0;
    --brand: #818CF8;
    --brand-hover: #A5B4FC;
    --brand-soft: rgba(129, 140, 248, .14);
    --brand-text: #C7D2FE;
    --on-brand: #0B1120;
    --ok: #4ADE80;
    --ok-soft: rgba(74, 222, 128, .13);
    --warn: #FBBF24;
    --warn-soft: rgba(251, 191, 36, .13);
    --danger: #F87171;
    --danger-soft: rgba(248, 113, 113, .14);
    --info: #60A5FA;
    --info-soft: rgba(96, 165, 250, .14);
    --muted-soft: #1E293B;
    --sev-critical: #F87171;
    --sev-critical-soft: rgba(248, 113, 113, .15);
    --sev-high: #FB923C;
    --sev-high-soft: rgba(251, 146, 60, .14);
    --sev-medium: #FACC15;
    --sev-medium-soft: rgba(250, 204, 21, .12);
    --sev-low: #60A5FA;
    --sev-low-soft: rgba(96, 165, 250, .14);
    --sev-info: #A5B4C8;
    --sev-info-soft: #1E293B;
    --code-bg: #020617;
    --code-text: #E2E8F0;
    --code-border: #273449;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
    --ring: 0 0 0 3px rgba(129, 140, 248, .4);
    color-scheme: dark;
  }
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
code, pre, kbd { font-family: var(--mono); }
code { font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
kbd { font-size: .85em; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
svg.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--brand); color: var(--on-brand); }
.skip:focus { top: 8px; }
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 14px; }
.nowrap { white-space: nowrap; }

/* Layout */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }
.wrap.wide { max-width: 1280px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap-row { flex-wrap: wrap; }
.spacer { flex: 1; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); }
.topbar-inner { height: 60px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.brand-sub { font-size: 13px; color: var(--text-3); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 550; font-size: 15px; line-height: 1.25; cursor: pointer; text-align: center; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 1px 2px rgba(79, 70, 229, .25); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-solid:hover { filter: brightness(.95); }
.btn.lg { min-height: 48px; padding: 12px 24px; font-size: 16px; border-radius: 10px; }
.btn.sm { min-height: 32px; padding: 4px 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn svg.icon { width: 18px; height: 18px; }
.btn .spinner { border-color: color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; }

/* Card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 20px; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
.card-head .sub { color: var(--text-2); margin-top: 4px; }
.card-head > .spacer { flex: 1 1 240px; }
.card + .card { margin-top: 0; }
.h2 { font-size: 20px; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* Banner */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); border: 1px solid transparent; line-height: 1.5; }
.banner svg.icon { margin-top: 2px; }
.banner > div { min-width: 0; flex: 1; }
.banner strong { font-weight: 650; }
.banner p { color: var(--text-2); }
.banner .actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.banner.info { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 22%, transparent); }
.banner.info svg.icon { color: var(--brand); }
.banner.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.banner.ok svg.icon { color: var(--ok); }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.banner.warn svg.icon { color: var(--warn); }
.banner.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 28%, transparent); }
.banner.danger svg.icon { color: var(--danger); }
.banner.plain { background: var(--surface-2); }
.banner.plain svg.icon { color: var(--text-3); }
.test-strip { background: var(--warn-soft); color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.test-strip .wrap { display: flex; align-items: center; gap: 8px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 15px; font-weight: 550; }
.test-strip svg.icon { color: var(--warn); }

/* Badge, dot */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 550; white-space: nowrap; background: var(--muted-soft); color: var(--text-2);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-text); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.off { background: transparent; border: 2px solid var(--border-strong); }
.dot.live { background: var(--ok); animation: pulse 2s ease-out infinite; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label, .field > .row > label { font-size: 14px; font-weight: 600; color: var(--text); }
.hint { font-size: 14px; color: var(--text-3); line-height: 1.45; }
.input, .select {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 16px; transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: var(--text-3); }
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input.mono { font-family: var(--mono); font-size: 15px; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 40px; }
.input-suffix .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; line-height: 1.5; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand); cursor: pointer; }
.form-error { color: var(--danger); font-size: 15px; display: flex; gap: 8px; align-items: flex-start; }
.form-error svg.icon { margin-top: 2px; }
.form-ok { color: var(--ok); font-size: 15px; font-weight: 550; display: inline-flex; gap: 6px; align-items: center; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-size: 14px; font-weight: 600; margin-bottom: 8px; }

/* Choice cards (radio) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.choice:hover { border-color: var(--brand); }
.choice input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--brand); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.choice:has(input:focus-visible) { box-shadow: var(--ring); }
.choice-title { font-weight: 600; display: block; }
.choice-sub { color: var(--text-2); font-size: 14px; display: block; margin-top: 2px; }

/* Segmented control */
.seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; background: var(--surface-2); border-radius: 10px; max-width: 100%; }
.seg button { min-height: 36px; padding: 6px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-weight: 550; font-size: 15px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Skeleton, spinner */
.skeleton { border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--border) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.sk-line { height: 14px; margin: 10px 0; }
.sk-title { height: 24px; width: 45%; margin-bottom: 16px; }
.sk-block { height: 120px; }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--text-2); padding: 24px; }

/* State block (loading / error / empty) */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 24px; }
.state .state-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px; background: var(--brand-soft); color: var(--brand); }
.state.error .state-icon { background: var(--danger-soft); color: var(--danger); }
.state .state-icon svg.icon { width: 24px; height: 24px; }
.state h2, .state h3 { font-size: 18px; font-weight: 650; }
.state p { color: var(--text-2); max-width: 46ch; }
.state .btn { margin-top: 12px; }

/* Toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); animation: slide-up .18s ease-out; font-size: 15px; }
.toast.error { background: var(--danger); color: #fff; }

/* Footer */
.foot { border-top: 1px solid var(--border); margin-top: 48px; padding: 24px 0 32px; color: var(--text-3); font-size: 14px; }
.foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--text-2); }

/* ---------------------------------------------------------------- Landing */
.hero { padding: 48px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--brand-text); background: var(--brand-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: 44px; line-height: 1.1; font-weight: 750; letter-spacing: -.025em; max-width: 18ch; text-wrap: balance; }
.hero .lead { margin-top: 16px; font-size: 19px; line-height: 1.55; color: var(--text-2); max-width: 56ch; }
.hero .cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.facts { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; color: var(--text-2); font-size: 15px; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts svg.icon { color: var(--ok); width: 18px; height: 18px; }

.flow { padding: 24px; display: flex; flex-direction: column; gap: 0; }
.flow-title { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 16px; }
.flow-node { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.flow-node.you { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.flow-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); color: var(--brand); flex: none; box-shadow: var(--shadow); }
.flow-node strong { display: block; font-weight: 650; }
.flow-node p { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.flow-link { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 0 8px 33px; position: relative; }
.flow-link::before { content: ""; position: absolute; left: 33px; top: 0; bottom: 0; width: 2px; background: repeating-linear-gradient(to bottom, var(--border-strong) 0 4px, transparent 4px 8px); }
.flow-link span { font-size: 13px; color: var(--text-2); padding-left: 16px; display: flex; align-items: center; gap: 4px; line-height: 1.35; }
.flow-link span b { font-weight: 700; color: var(--brand); }

.section { padding: 48px 0; scroll-margin-top: 60px; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 32px; max-width: 65ch; }
.section-head h2 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.section-head p { margin-top: 12px; font-size: 17px; color: var(--text-2); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-top: 48px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-weight: 700; }
.steps h3 { font-size: 18px; font-weight: 650; line-height: 1.3; }
.steps p { margin-top: 8px; color: var(--text-2); }

.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; list-style: none; }
.trust li { display: flex; gap: 16px; padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg); }
.section:not(.alt) .trust li { background: var(--surface); }
.trust .ti { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); flex: none; }
.trust h3 { font-size: 17px; font-weight: 650; line-height: 1.35; }
.trust p { margin-top: 4px; color: var(--text-2); font-size: 15px; }

.checks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; list-style: none; }
.checks-grid li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.checks-grid svg.icon { color: var(--brand); margin-top: 2px; }

.reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; list-style: none; }
.reqs li { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.alt .reqs li { background: var(--bg); }
.reqs .ri { color: var(--brand); margin-bottom: 12px; }
.reqs h3 { font-size: 16px; font-weight: 650; }
.reqs p { margin-top: 4px; color: var(--text-2); font-size: 15px; }

.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.tier { display: flex; flex-direction: column; padding: 32px; gap: 0; position: relative; }
.tier.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-md); }
.tier-flag { position: absolute; top: -13px; left: 32px; }
.tier h3 { font-size: 20px; font-weight: 650; }
.tier .price { margin-top: 12px; font-size: 40px; line-height: 1.1; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tier .price-note { color: var(--text-3); font-size: 14px; margin-top: 4px; }
.tier ul { list-style: none; margin: 24px 0 32px; display: flex; flex-direction: column; gap: 12px; }
.tier li { display: flex; gap: 12px; align-items: flex-start; }
.tier li svg.icon { color: var(--ok); margin-top: 2px; }
.tier li.inherit { font-weight: 600; }
.tier li.inherit svg.icon { color: var(--brand); }
.tier .btn { margin-top: auto; }

.order-card { padding: 32px; max-width: 640px; }
.order-card form { display: flex; flex-direction: column; gap: 24px; }
.pay-note { font-size: 14px; color: var(--text-3); text-align: center; }

/* ---------------------------------------------------------------- Cabinet */
.page { padding: 32px 0 48px; }
.order-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.order-head .kicker { font-size: 14px; color: var(--text-3); font-weight: 550; }
.order-head h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.order-head .badge { margin-left: auto; margin-top: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; color: var(--text-2); font-size: 15px; list-style: none; }
.meta li { display: inline-flex; align-items: center; gap: 6px; }
.meta svg.icon { width: 16px; height: 16px; color: var(--text-3); }
.note-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.note-line svg.icon { width: 18px; height: 18px; color: var(--text-3); margin-top: 1px; }

.step-list { list-style: none; display: flex; flex-direction: column; gap: 24px; counter-reset: cstep; }
.cstep { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px 16px; }
.cstep-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; background: var(--brand-soft); color: var(--brand-text); }
.cstep-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cstep-body h3 { font-size: 17px; font-weight: 650; line-height: 32px; }

.cmd { position: relative; border-radius: var(--radius); background: var(--code-bg); border: 1px solid var(--code-border); overflow: hidden; }
.cmd pre { margin: 0; padding: 16px; padding-right: 16px; overflow-x: auto; color: var(--code-text); font: 13.5px/1.65 var(--mono); white-space: pre; tab-size: 2; -webkit-overflow-scrolling: touch; }
.cmd pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; color: inherit; }
.cmd-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid rgba(148, 163, 184, .18); color: #94A3B8; font-size: 13px; }
.cmd-bar .btn { margin-left: auto; background: rgba(148, 163, 184, .14); border-color: transparent; color: #E2E8F0; }
.cmd-bar .btn:hover { background: rgba(148, 163, 184, .26); }
.cmd-bar .btn.copied { color: #86EFAC; }

.agent-state { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.agent-state .dot { margin-top: 7px; }
.agent-state strong { font-weight: 650; display: block; }
.agent-state p { color: var(--text-2); font-size: 15px; margin-top: 2px; }
.agent-state.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.agent-state.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.agent-state .spinner { margin-top: 3px; }

.progress-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 16px; }
.progress-bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width .2s ease; }
.psteps { list-style: none; margin-top: 16px; }
.pstep { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.pstep:first-child { border-top: 0; }
.pstep .pi { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.pstep .pi svg.icon { width: 16px; height: 16px; stroke-width: 2.2; }
.pstep .pi.pending { border: 2px solid var(--border-strong); }
.pstep .pi.done { background: var(--ok-soft); color: var(--ok); }
.pstep .pi.failed { background: var(--danger-soft); color: var(--danger); }
.pstep .pi.skipped { background: var(--surface-2); color: var(--text-3); }
.pstep .pi.running .spinner { width: 20px; height: 20px; }
.pstep .pt { font-weight: 550; line-height: 24px; }
.pstep.pending .pt { color: var(--text-2); font-weight: 450; }
.pstep .pn { font-size: 14px; color: var(--text-2); margin-top: 2px; word-break: break-word; }
.pstep .ps { font-size: 13px; color: var(--text-3); line-height: 24px; white-space: nowrap; }
.pstep.running .ps { color: var(--brand); font-weight: 600; }
.pstep.failed .ps { color: var(--danger); font-weight: 600; }
.pstep.done .ps { color: var(--ok); }

.result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.grade { width: 96px; height: 96px; border-radius: 20px; display: grid; place-items: center; font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.02em; background: var(--surface-2); color: var(--text-2); }
.grade.g-A, .grade.g-B { background: var(--ok-soft); color: var(--ok); }
.grade.g-C, .grade.g-D { background: var(--warn-soft); color: var(--warn); }
.grade.g-E, .grade.g-F { background: var(--danger-soft); color: var(--danger); }
.grade.sm { width: 32px; height: 32px; border-radius: 8px; font-size: 17px; font-weight: 750; }
.result h2 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.result .meaning { font-size: 17px; margin-top: 4px; }
.result .scale { font-size: 14px; color: var(--text-3); margin-top: 4px; }
.counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; list-style: none; }
.counts li { padding: 12px; border-radius: var(--radius); background: var(--sev-info-soft); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.counts .n { font-size: 26px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.counts .l { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.counts .c-critical { background: var(--sev-critical-soft); } .counts .c-critical .n { color: var(--sev-critical); }
.counts .c-high { background: var(--sev-high-soft); } .counts .c-high .n { color: var(--sev-high); }
.counts .c-medium { background: var(--sev-medium-soft); } .counts .c-medium .n { color: var(--sev-medium); }
.counts .c-low { background: var(--sev-low-soft); } .counts .c-low .n { color: var(--sev-low); }
.counts .c-info { background: var(--sev-info-soft); } .counts .c-info .n { color: var(--sev-info); }
.counts li.zero { background: var(--surface-2); }
.counts li.zero .n { color: var(--text-3); }
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; }

details.more { border-top: 1px solid var(--border); padding-top: 16px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary svg.icon { transition: transform .15s ease; width: 18px; height: 18px; }
details.more[open] summary svg.icon { transform: rotate(180deg); }
details.more[open] summary { margin-bottom: 24px; }
details.more.flat { border-top: 0; padding-top: 0; }

/* Test payment */
.paytest { max-width: 520px; margin: 0 auto; padding: 32px; text-align: center; }
.paytest .state-icon { margin: 0 auto 16px; }
.paytest h1 { font-size: 24px; font-weight: 700; }
.paytest .sum { font-size: 40px; font-weight: 750; letter-spacing: -.02em; margin: 16px 0 4px; font-variant-numeric: tabular-nums; }
.paytest .what { color: var(--text-2); }
.paytest .banner { text-align: left; margin-top: 24px; }
.paytest .btns { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }

/* ---------------------------------------------------------------- Owner */
.tabs { display: flex; gap: 4px; height: 100%; }
.tabs a { position: relative; display: flex; align-items: center; padding: 0 12px; height: 60px; color: var(--text-2); font-weight: 550; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.page-head p { color: var(--text-2); margin-top: 4px; }
.page-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 14px; }

.owner-note:not(:empty) { margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
.otable { width: 100%; border-collapse: collapse; font-size: 15px; }
.otable th { text-align: left; font-size: 13px; font-weight: 600; color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.otable td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.otable tbody tr.main:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.otable tbody:last-child tr:last-child td { border-bottom: 0; }
.otable .sub { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.otable .strong { font-weight: 600; }
.otable .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.otable .err { display: block; color: var(--danger); font-size: 13px; margin-top: 4px; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otable .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: nowrap; }
.otable td.c-order { white-space: nowrap; }
.otable td.c-acts { width: 1%; }
.otable td.c-buyer { min-width: 220px; }
.otable td.c-result { min-width: 170px; }
.otable tr.detail td { background: var(--surface-2); padding: 16px 24px; }
.otable .email { overflow-wrap: anywhere; }
.tcounts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tc { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sev-info-soft); color: var(--sev-info); white-space: nowrap; }
.tc.critical { background: var(--sev-critical-soft); color: var(--sev-critical); }
.tc.high { background: var(--sev-high-soft); color: var(--sev-high); }
.tc.medium { background: var(--sev-medium-soft); color: var(--sev-medium); }
.tc.low { background: var(--sev-low-soft); color: var(--sev-low); }
.online { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-top: 6px; white-space: nowrap; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--text-3); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; }
.detail-grid h3 { font-size: 14px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.detail-grid .psteps { margin-top: 0; }

.settings { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.settings .card-pad { display: flex; flex-direction: column; gap: 20px; }
.settings .card-pad > div:empty { display: none; }
.settings h2 { font-size: 18px; font-weight: 650; }
.settings .desc { color: var(--text-2); font-size: 15px; margin-top: -12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.key-state { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 550; color: var(--ok); }
.key-state.none { color: var(--text-3); }
.save-bar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.save-bar .msg { flex: 1; min-width: 200px; }

dialog { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(15, 23, 42, .5); }
dialog[open] { animation: pop .16s ease-out; }
.dlg { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dlg h2 { font-size: 18px; font-weight: 650; }
.dlg p { color: var(--text-2); }
.dlg .btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Animation */
.appear { animation: appear .18s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .spinner { animation: spin 1.6s linear infinite !important; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tiers { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Owner table becomes cards */
  .otable thead { display: none; }
  .otable, .otable tbody, .otable tr, .otable td { display: block; width: 100%; }
  .otable tbody { border-bottom: 1px solid var(--border); }
  .otable tbody:last-child { border-bottom: 0; }
  .otable tr.main { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
  .otable tr.main td { padding: 0; border: 0; width: auto; }
  .otable td.c-order { display: flex; align-items: baseline; flex-wrap: wrap; }
  .otable td.c-order .sub, .otable td.c-buyer .sub, .otable td.c-sum .sub { display: inline; margin: 0 0 0 8px; }
  .otable td.c-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .otable td.c-status .online { margin-top: 0; }
  .otable td.c-status .err { flex-basis: 100%; margin-top: 0; }
  .otable td.c-result.none { display: none; }
  .otable td.c-acts { margin-top: 4px; }
  .otable .acts { justify-content: flex-start; flex-wrap: wrap; }
  .otable tr.detail td { border: 0; padding: 16px; }
  .otable .err { max-width: none; white-space: normal; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 32px 0; }
  .hero h1 { font-size: 32px; }
  .hero .lead { font-size: 17px; }
  .hero .cta .btn { flex: 1 1 100%; }
  .section { padding: 40px 0; }
  .section-head { margin-bottom: 24px; }
  .section-head h2 { font-size: 24px; }
  .steps { grid-template-columns: 1fr; }
  .tier { padding: 24px; }
  .tier-flag { left: 24px; }
  .tier .price { font-size: 34px; }
  .order-card { padding: 24px 16px; }
  .card-pad { padding: 16px; }
  .page { padding: 24px 0 32px; }
  .order-head h1 { font-size: 24px; }
  .order-head .badge { margin-left: 0; }
  .cstep { grid-template-columns: 1fr; }
  .cstep-n { display: none; }
  .cstep-body h3 { line-height: 1.35; }
  .cmd pre { font-size: 12.5px; padding: 12px; }
  .result { grid-template-columns: 1fr; gap: 16px; }
  .grade { width: 80px; height: 80px; font-size: 44px; }
  .actions-row .btn { flex: 1 1 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .brand-sub { display: none; }
  .tabs a { padding: 0 8px; }
  .save-bar { padding: 12px 16px; }
  .paytest { padding: 24px 16px; }
  .flow { padding: 16px; }
  .flow-link { grid-template-columns: 1fr; padding-left: 33px; }
}

@media print {
  .topbar, .foot, .toasts, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
}
