:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #101828;
  background: #fff;
  --ink: #101828;
  --muted: #5d6b82;
  --line: #d8e3e1;
  --soft: #f4f8f7;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --blue: #2563eb;
  --amber: #d97706;
  --shadow: 0 20px 52px rgba(16, 24, 40, 0.09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: linear-gradient(180deg, rgba(15,118,110,.08), rgba(255,255,255,0) 390px), #fff; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .68; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(37, 99, 235, .32); outline-offset: 3px; }
.app-shell { width: min(1440px, 100%); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 18px clamp(18px,4vw,58px); border-bottom: 1px solid #edf2f1; background: rgba(255,255,255,.94); backdrop-filter: blur(18px); }
.brand, .site-header nav a, .export-button, .primary-action, .secondary-action, .card-actions button, .voice-actions button, .route-list a { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; border-radius: 8px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.brand { color: var(--ink); font-size: 18px; }
.brand span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 8px; color: #fff; background: var(--teal); font-size: 11px; letter-spacing: 0; }
.site-header nav { display: flex; gap: 6px; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.site-header nav a { color: #344054; padding: 0 12px; font-size: 14px; }
.site-header nav a:hover { background: #e7f5f2; color: var(--teal-dark); }
.export-button, .secondary-action, .card-actions button, .voice-actions button { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 0 15px; font-size: 14px; }
.export-button svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.export-button[data-locked="true"], #copyAgentPlan[data-locked="true"] { border-color: #f6d7ad; color: #7a4a12; background: #fffaf2; }
.primary-action { border: 0; background: var(--teal); color: #fff; padding: 0 18px; box-shadow: 0 12px 28px rgba(15,118,110,.24); }
.primary-action.full { width: 100%; }
main { padding: 48px clamp(18px,4vw,58px) 76px; }
.hero { display: grid; grid-template-columns: minmax(0,.82fr) minmax(620px,1.18fr); gap: clamp(28px,4vw,58px); align-items: start; }
.hero-copy { position: sticky; top: 102px; padding-top: 20px; }
.hero-copy h1 { margin: 0; font-size: clamp(44px,6.5vw,82px); line-height: .95; letter-spacing: 0; }
.hero-copy p { max-width: 610px; margin: 24px 0 0; color: #475467; font-size: clamp(17px,2vw,21px); line-height: 1.55; }
.hero-actions, .card-actions, .trust-strip, .voice-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions { margin-top: 32px; }
.trust-strip { margin-top: 30px; color: #475467; font-size: 13px; font-weight: 850; }
.trust-strip span { display: inline-flex; align-items: center; gap: 8px; }
.trust-strip i { display: inline-grid; width: 23px; height: 23px; place-items: center; border-radius: 999px; background: #e9f7f4; color: var(--teal-dark); font-size: 9px; font-style: normal; font-weight: 950; }
.audit-panel, .score-card, .voice-panel, .breakdown, .subscription-panel, .payment-panel, .agent-panel, .gap-panel, .plan-panel, .competitor-section { border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.audit-panel, .voice-panel, .subscription-panel, .payment-panel, .agent-panel, .gap-panel, .plan-panel, .competitor-section { padding: clamp(18px,3vw,28px); }
.panel-title, .section-title { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
h2 { margin: 0; font-size: clamp(24px,2.6vw,34px); line-height: 1.12; letter-spacing: 0; }
p { color: var(--muted); line-height: 1.45; }
.mode { border: 1px solid #b9ded8; border-radius: 999px; padding: 7px 11px; color: var(--teal-dark); background: #e9f7f4; font-size: 12px; font-weight: 900; }
.identity-grid, .signals-grid { display: grid; gap: 12px; margin-top: 22px; }
.identity-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.signals-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.field { display: grid; gap: 7px; }
.field.wide { grid-column: 1 / -1; }
.field span { color: #344054; font-size: 12px; font-weight: 900; }
.field input, textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--ink); background: #fff; padding: 0 12px; font-size: 15px; font-weight: 800; }
.field input { min-height: 44px; }
textarea { padding: 12px; resize: vertical; line-height: 1.35; margin: 14px 0; }
.field input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.toggles { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.toggles label { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: #344054; font-size: 13px; font-weight: 850; }
.toggles input { accent-color: var(--teal); }
.status-line { min-height: 38px; margin: 16px 0 0; color: #475467; font-size: 13px; font-weight: 750; }
.score-row { display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; margin-top: 34px; }
.score-card { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: clamp(20px,3vw,30px); }
.score-ring { width: 184px; height: 184px; display: grid; place-items: center; border-radius: 999px; }
.score-ring div { width: 136px; height: 136px; display: grid; place-items: center; border-radius: 999px; background: #fff; }
.score-ring strong { margin-top: 12px; font-size: 48px; line-height: .8; }
.score-ring span, .score-ring em { color: var(--muted); font-size: 13px; font-style: normal; font-weight: 900; }
.score-ring em { color: var(--teal-dark); }
.coach-answer { min-height: 120px; padding: 14px; border-radius: 8px; border: 1px solid #e4ecea; background: #f8fbfa; color: #344054; font-weight: 750; line-height: 1.5; white-space: pre-wrap; }
.breakdown { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; margin-top: 24px; padding: clamp(18px,3vw,28px); }
.breakdown-row { display: grid; gap: 8px; }
.breakdown-row span { color: #344054; font-size: 13px; font-weight: 900; }
.breakdown-row strong { color: var(--teal-dark); font-size: 26px; }
.breakdown-row div { height: 8px; overflow: hidden; border-radius: 999px; background: #e3ecea; }
.breakdown-row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--teal),var(--blue)); }
.subscription-panel, .payment-panel { margin-top: 24px; }
.subscription-grid { display: grid; grid-template-columns: minmax(260px,.9fr) minmax(0,1fr) auto; gap: 12px; align-items: end; margin-top: 22px; }
.subscription-price { min-height: 84px; padding: 14px; border: 1px solid #d8e3e1; border-radius: 8px; background: #f8fbfa; }
.subscription-price strong, .subscription-price span { display: block; }
.subscription-price strong { color: #101828; font-size: 22px; line-height: 1.05; }
.subscription-price span { margin-top: 4px; color: var(--teal-dark); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.subscription-price p { margin: 8px 0 0; color: #475467; font-size: 13px; font-weight: 760; }
.subscription-status { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; border: 1px solid #d8e3e1; border-radius: 8px; padding: 13px 14px; background: #f8fbfa; color: #344054; }
.subscription-status strong { color: #101828; font-weight: 950; }
.subscription-status span { color: #475467; font-size: 13px; font-weight: 800; line-height: 1.35; text-align: right; }
.subscription-status[data-state="checking"], .subscription-status[data-state="redirecting"] { border-color: #bfdbfe; background: #eff6ff; }
.subscription-status[data-state="stripe_checkout_not_configured"], .subscription-status[data-state="stripe_checkout_failed"], .subscription-status[data-state="checkout_error"], .subscription-status[data-state="cancelled"] { border-color: #fed7aa; background: #fff7ed; }
.payment-grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1fr) auto; gap: 12px; align-items: end; margin-top: 22px; }
.payment-status { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; border: 1px solid #d8e3e1; border-radius: 8px; padding: 13px 14px; background: #f8fbfa; color: #344054; }
.payment-status strong { color: #101828; font-weight: 950; }
.payment-status span { color: #475467; font-size: 13px; font-weight: 800; line-height: 1.35; text-align: right; }
.payment-status[data-state="verified"] { border-color: #9ad7cd; background: #e9f7f4; }
.payment-status[data-state="checking"] { border-color: #bfdbfe; background: #eff6ff; }
.payment-status[data-state="verification_required"], .payment-status[data-state="missing_identifier"], .payment-status[data-state="command_verifier_not_exposed"], .payment-status[data-state="command_verifier_rejected"], .payment-status[data-state="command_verifier_timeout"], .payment-status[data-state="command_verifier_error"] { border-color: #fed7aa; background: #fff7ed; }
.gate-note { margin: 10px 0 0; color: #6b7280; font-size: 12px; font-weight: 800; }
.agent-panel { margin-top: 24px; }
.agent-control { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 22px; }
.agent-output { display: grid; grid-template-columns: .82fr 1.18fr; gap: 24px; margin-top: 24px; }
.agent-panel h3 { margin: 0 0 12px; color: #101828; font-size: 14px; font-weight: 950; text-transform: uppercase; }
.agent-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.agent-meta span { border: 1px solid #d8e3e1; border-radius: 999px; padding: 7px 10px; color: #344054; background: #f8fbfa; font-size: 12px; font-weight: 900; }
.agent-tasks, .agent-assets, .agent-risks { display: grid; gap: 12px; margin: 0; color: #344054; }
.agent-tasks { padding-left: 20px; }
.agent-tasks li { padding: 14px; border: 1px solid #e4ecea; border-radius: 8px; background: #f8fbfa; }
.agent-tasks strong, .agent-tasks span, .agent-tasks em, .agent-tasks code { display: block; }
.agent-tasks strong { color: #101828; line-height: 1.35; }
.agent-tasks span { margin-top: 8px; line-height: 1.45; }
.agent-tasks em { margin-top: 8px; color: var(--teal-dark); font-size: 12px; font-style: normal; font-weight: 950; }
.agent-tasks code { margin-top: 10px; white-space: pre-wrap; color: #1d2939; font-family: inherit; font-weight: 750; line-height: 1.45; }
.agent-assets { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
.agent-assets div { min-width: 0; padding: 14px; border: 1px solid #e4ecea; border-radius: 8px; background: #fff; }
.agent-assets strong { color: #101828; font-size: 13px; font-weight: 950; }
.agent-assets p, .agent-assets ul { margin: 8px 0 0; color: #344054; font-size: 13px; font-weight: 750; line-height: 1.45; }
.insight-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 24px; margin-top: 24px; }
.gap-panel ul, .plan-panel ol { display: grid; gap: 12px; margin: 22px 0 0; color: #344054; font-weight: 800; line-height: 1.48; }
.gap-panel li::marker { color: var(--amber); }
.competitor-section { margin-top: 24px; }
.competitor-table { margin-top: 22px; overflow: hidden; border: 1px solid #e7eeed; border-radius: 8px; }
.table-row { display: grid; grid-template-columns: 1.3fr .55fr .7fr .7fr 1.25fr; gap: 14px; align-items: center; min-height: 58px; padding: 13px 16px; border-bottom: 1px solid #e7eeed; color: #344054; font-weight: 800; }
.table-row:last-child { border-bottom: 0; }
.table-head { background: #101828; color: #fff; font-size: 12px; font-weight: 950; text-transform: uppercase; }
.table-row:nth-child(2) { background: #edf8f5; }
.routes-section { display: grid; grid-template-columns: .72fr 1fr; gap: 28px; margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }
.routes-section > * { min-width: 0; }
.route-list { display: grid; gap: 10px; }
.route-list a { justify-content: space-between; width: 100%; min-width: 0; min-height: 56px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 13px 15px; }
@media (max-width: 1120px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { grid-column: 1 / -1; justify-content: flex-start; order: 3; }
  .hero, .score-row, .subscription-grid, .payment-grid, .agent-control, .agent-output, .insight-grid, .routes-section { grid-template-columns: 1fr; }
  .hero-copy { position: static; }
  .breakdown { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .agent-assets { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  main { padding-top: 28px; }
  .site-header { padding: 14px 16px; }
  .site-header nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 8px; }
  .site-header nav a { min-height: 36px; padding: 0 8px; font-size: 12px; white-space: normal; text-align: center; }
  .export-button { width: 42px; padding: 0; overflow: hidden; }
  .export-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .export-button svg { color: var(--ink); }
  .hero-copy h1 { font-size: 43px; }
  .identity-grid, .signals-grid, .toggles, .score-card, .table-row, .breakdown, .agent-assets { grid-template-columns: 1fr; }
  .subscription-status, .payment-status { display: grid; }
  .subscription-status span, .payment-status span { text-align: left; }
  .route-list a { justify-content: flex-start; white-space: normal; text-align: left; }
  .score-ring { width: 160px; height: 160px; }
  .score-ring div { width: 118px; height: 118px; }
  .table-head { display: none; }
}
