@layer reset, tokens, base, shell, form, process, history, report, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, ol, ul, fieldset { margin: 0; }
  ol, ul { padding: 0; }
  button, input, textarea, select { font: inherit; }
  button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
  button { color: inherit; cursor: pointer; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    color-scheme: light;
    --paper: #f4f0e8;
    --paper-deep: #e9e2d6;
    --card: #fffdf8;
    --ink: #17233d;
    --muted: #627080;
    --quiet: #89919b;
    --line: #17233d1c;
    --line-strong: #17233d38;
    --coral: #dd735e;
    --coral-dark: #bd5543;
    --coral-soft: #f4c9bc;
    --blue: #55708f;
    --violet: #74698f;
    --green: #4c7666;
    --shadow: 0 28px 70px #18213b17, 0 2px 8px #18213b0d;
    --serif: Georgia, "Times New Roman", serif;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
  }
}

@layer base {
  body { min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--paper); }
  body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55; background-image: radial-gradient(#17233d0c .7px, transparent .7px); background-size: 5px 5px; }
  a { color: inherit; text-underline-offset: 4px; }
  button, input, textarea, select, a { outline-offset: 4px; }
  :focus-visible { outline: 3px solid #dd735e75; }
  ::selection { color: #fff; background: var(--coral); }
  .skip-link { position: fixed; top: -80px; left: 18px; z-index: 100; padding: 12px 16px; color: white; background: var(--ink); }
  .skip-link:focus { top: 18px; }
  .shell-grid { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
  .eyebrow { display: flex; gap: 10px; align-items: center; color: var(--muted); font: 600 11px/1.2 var(--mono); letter-spacing: .12em; }
  .eyebrow span { color: var(--coral-dark); }
}

@layer shell {
  .site-header { width: min(1400px, calc(100% - 64px)); min-height: 82px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .brand { display: inline-flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
  .brand-mark { width: 25px; height: 25px; display: inline-grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 3px; padding: 4px; border-radius: 50%; border: 1px solid var(--line-strong); }
  .brand-mark span { width: 100%; border-radius: 4px; background: var(--coral); }
  .brand-mark span:nth-child(1) { height: 45%; }
  .brand-mark span:nth-child(2) { height: 85%; }
  .brand-mark span:nth-child(3) { height: 62%; }
  .header-meta { display: flex; align-items: center; gap: 26px; font-size: 12px; color: var(--muted); }
  .privacy-chip { display: inline-flex; align-items: center; gap: 8px; font: 600 10px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
  .privacy-chip span { color: var(--green); font-size: 8px; }
  .hero { min-height: 730px; display: grid; grid-template-columns: minmax(0, .94fr) minmax(520px, 1.06fr); gap: clamp(64px, 8vw, 128px); align-items: start; padding-block: 86px 96px; }
  .hero-copy { position: sticky; top: 54px; padding-top: 34px; }
  .hero h1 { margin: 28px 0 28px; font: 400 clamp(48px, 5.2vw, 74px)/.99 var(--serif); letter-spacing: -.045em; }
  .hero h1 em { color: var(--coral-dark); font-weight: 400; }
  .hero-intro { max-width: 580px; color: #435266; font-size: 18px; line-height: 1.7; }
  .trust-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); }
  .trust-row div { display: grid; gap: 7px; }
  .trust-row strong { font-size: 13px; }
  .trust-row span { color: var(--muted); font-size: 12px; line-height: 1.55; }
  .browser-check { margin-top: 32px; display: flex; gap: 13px; align-items: center; padding: 15px 17px; border: 1px solid var(--line); border-radius: 8px; background: #fff8; }
  .browser-check[data-state="ready"] { border-color: #4c766650; background: #eff6f0; }
  .browser-check[data-state="warning"] { border-color: #bd554350; background: #fff4ee; }
  .check-orb { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--quiet); box-shadow: 0 0 0 5px #89919b18; }
  [data-state="ready"] .check-orb { background: var(--green); box-shadow: 0 0 0 5px #4c766619; }
  [data-state="warning"] .check-orb { background: var(--coral-dark); box-shadow: 0 0 0 5px #bd554319; }
  .browser-check div { display: grid; }
  .browser-check strong { font-size: 12px; }
  .browser-check span { color: var(--muted); font-size: 11px; }
  .site-footer { width: min(1400px, calc(100% - 64px)); margin-inline: auto; min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
}

@layer form {
  .setup-card { position: relative; padding: 34px; border: 1px solid #17233d16; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
  .setup-card::before { content: ""; position: absolute; inset: 10px; pointer-events: none; border: 1px solid #17233d0b; border-radius: 9px; }
  .setup-card > * { position: relative; }
  .card-heading { display: flex; justify-content: space-between; gap: 30px; align-items: start; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
  .card-heading h2 { margin-top: 11px; font: 400 28px/1.2 var(--serif); letter-spacing: -.025em; }
  .time-estimate { flex: none; padding: 7px 9px; border-radius: 99px; color: var(--muted); background: var(--paper); font: 600 10px var(--mono); }
  .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
  .field { display: grid; gap: 8px; }
  .field--wide { grid-column: 1 / -1; }
  .field > span, .choice-field legend, .platform-field legend, .persona-field legend { font-size: 12px; font-weight: 700; }
  .field b { margin-left: 7px; color: var(--coral-dark); font: 600 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .field i { margin-left: 6px; color: var(--quiet); font-size: 10px; font-style: normal; font-weight: 500; }
  input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: #fffdfa; transition: border-color .15s, box-shadow .15s; }
  input, select { height: 46px; padding: 0 13px; }
  textarea { min-height: 112px; padding: 12px 13px; resize: vertical; line-height: 1.55; }
  input::placeholder, textarea::placeholder { color: #939aa3; }
  input:hover, textarea:hover, select:hover { border-color: #17233d63; }
  input:focus, textarea:focus, select:focus { border-color: var(--coral); box-shadow: 0 0 0 3px #dd735e16; outline: 0; }
  .choice-field, .platform-field, .persona-field { min-width: 0; padding: 0; border: 0; margin-top: 24px; }
  .segmented-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
  .segmented-options label { min-width: 0; }
  .segmented-options input, .platform-option input, .persona-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; clip-path: inset(50%); pointer-events: none; }
  .segmented-options span { min-height: 62px; display: grid; align-content: center; gap: 2px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 6px; background: #faf8f3; cursor: pointer; }
  .segmented-options b { font-size: 11px; }
  .segmented-options small { overflow: hidden; color: var(--muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
  .segmented-options input:checked + span { border-color: var(--ink); background: var(--ink); color: white; box-shadow: 0 4px 12px #17233d1c; }
  .segmented-options input:checked + span small { color: #ced4dc; }
  .segmented-options input:focus-visible + span, .platform-option input:focus-visible + span, .persona-option input:focus-visible + span { outline: 3px solid #dd735e75; outline-offset: 3px; }
  .platform-field legend { width: 100%; display: flex; justify-content: space-between; gap: 16px; }
  .platform-field legend span { color: var(--quiet); font: 500 9px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
  .platform-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
  .platform-option > span { min-height: 128px; display: grid; grid-template-rows: 64px auto auto; align-content: start; gap: 2px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: #faf8f3; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
  .platform-option > span:hover { transform: translateY(-2px); border-color: var(--line-strong); }
  .platform-option input:checked + span { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink), 0 4px 12px #17233d12; }
  .platform-option b { padding: 3px 5px 0; font-size: 10px; }
  .platform-option small { padding: 0 5px; color: var(--muted); font-size: 8px; }
  .platform-preview { position: relative; display: block; overflow: hidden; border-radius: 4px; background: #202124; }
  .platform-preview::before { content: ""; position: absolute; inset: 8px 8px 19px; border-radius: 3px; background: linear-gradient(140deg, #786f6b, #383d45); }
  .platform-preview::after { content: ""; position: absolute; width: 15px; height: 11px; right: 11px; top: 11px; border: 1px solid #ffffff5c; border-radius: 2px; background: #2b3037; }
  .platform-preview i { position: absolute; z-index: 1; bottom: 7px; width: 9px; height: 9px; border-radius: 50%; background: #ffffff24; }
  .platform-preview i:nth-child(1) { left: calc(50% - 17px); }
  .platform-preview i:nth-child(2) { left: calc(50% - 4px); }
  .platform-preview i:nth-child(3) { left: calc(50% + 9px); background: #c24d46; }
  .platform-preview--zoom { border-radius: 2px; background: #111; }
  .platform-preview--zoom::before { border-radius: 1px; }
  .platform-preview--zoom i { border-radius: 2px; }
  .platform-preview--meet { background: #202124; }
  .platform-preview--meet::before { border-radius: 7px; }
  .platform-preview--teams { border-radius: 4px; background: linear-gradient(#f5f5f5 0 12px, #272727 12px); }
  .platform-preview--teams::before { inset: 16px 24px 5px 5px; }
  .platform-preview--teams::after { top: 16px; right: 5px; }
  .platform-preview--teams i { top: 3px; bottom: auto; width: 6px; height: 6px; border-radius: 2px; }
  .platform-preview--teams i:not(:last-child) { background: #7770bd; }
  .field--textarea { margin-top: 22px; }
  .field--textarea small { display: flex; justify-content: space-between; color: var(--quiet); font-size: 9px; }
  .persona-field legend { width: 100%; display: flex; justify-content: space-between; }
  .persona-field legend span { color: var(--quiet); font: 500 9px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
  .persona-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
  .persona-option > span { min-height: 114px; display: grid; justify-items: center; align-content: center; gap: 3px; padding: 11px 7px; border: 1px solid var(--line); border-radius: 7px; background: #faf8f3; text-align: center; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
  .persona-option > span:hover { transform: translateY(-2px); border-color: var(--line-strong); }
  .persona-option input:checked + span { border-color: var(--coral); background: #fff8f4; box-shadow: inset 0 0 0 1px var(--coral); }
  .persona-option strong { margin-top: 4px; font-size: 10px; }
  .persona-option small { color: var(--muted); font-size: 8px; }
  .mini-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: 50% 36%; background: var(--paper-deep); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
  .consent-note { display: flex; gap: 12px; margin-top: 25px; padding: 14px; border-radius: 7px; background: var(--paper); color: var(--muted); font-size: 10px; line-height: 1.5; }
  .consent-note strong { display: block; color: var(--ink); }
  .lock-icon { flex: none; color: var(--green); font-size: 20px; line-height: 1; }
  .form-error { margin-top: 16px; padding: 10px 12px; border: 1px solid #bd55434f; border-radius: 6px; color: #913e33; background: #fff2ed; font-size: 11px; }
  .primary-button, .secondary-button, .quiet-button { border-radius: 6px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; font-weight: 700; }
  .primary-button { width: 100%; margin-top: 18px; padding: 13px 18px; color: white; background: var(--coral-dark); box-shadow: 0 8px 20px #bd55432b; }
  .primary-button span:last-child { font-size: 19px; }
  .primary-button:hover:not(:disabled) { background: #a64738; }
  .primary-button:disabled { cursor: wait; opacity: .65; }
  .requirements { margin-top: 10px; color: var(--quiet); font: 500 9px var(--mono); text-align: center; }
}

@layer process {
  .process-band { padding: 92px max(32px, calc((100% - 1240px) / 2)); display: grid; grid-template-columns: .65fr 1.35fr; gap: 100px; color: #f4f0e8; background: var(--ink); }
  .process-band .eyebrow { color: #aab3c0; }
  .process-band .eyebrow span { color: var(--coral-soft); }
  .process-heading h2 { margin-top: 26px; font: 400 38px/1.1 var(--serif); }
  .process-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 42px; }
  .process-steps li { position: relative; padding-top: 52px; border-top: 1px solid #fff3; }
  .process-steps li > span { position: absolute; top: 14px; font: 500 10px var(--mono); color: var(--coral-soft); }
  .process-steps strong { font-size: 13px; }
  .process-steps p { margin-top: 11px; color: #aeb7c4; font-size: 12px; line-height: 1.7; }
}

@layer history {
  .history-section { display: grid; grid-template-columns: .68fr 1.32fr; gap: 100px; padding-block: 100px; }
  .history-section h2 { margin-top: 20px; font: 400 40px var(--serif); }
  .section-copy { margin-top: 18px; max-width: 380px; color: var(--muted); font-size: 13px; line-height: 1.7; }
  .history-list { display: grid; gap: 10px; align-content: start; }
  .empty-history { padding: 30px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: 12px; text-align: center; }
  .history-item { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 18px 20px; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; background: #fff9; }
  .history-item:hover { border-color: var(--coral); background: var(--card); }
  .history-item div { display: grid; gap: 4px; }
  .history-item strong { font-size: 13px; }
  .history-item span { color: var(--muted); font-size: 10px; }
  .history-score { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font: 700 13px var(--mono); }
}

@layer report {
  .report-view { min-height: calc(100vh - 170px); padding-block: 70px 110px; }
  .report-header { display: flex; justify-content: space-between; gap: 60px; align-items: end; }
  .back-link { display: inline-block; margin-bottom: 34px; color: var(--muted); font-size: 12px; text-decoration: none; }
  .report-header h1 { margin-top: 18px; font: 400 clamp(44px, 6vw, 72px)/1 var(--serif); letter-spacing: -.04em; }
  .report-meta { margin-top: 15px; color: var(--muted); font-size: 12px; }
  .report-actions { display: flex; gap: 9px; }
  .secondary-button, .quiet-button { min-height: 42px; padding: 10px 14px; font-size: 11px; }
  .secondary-button { color: white; background: var(--ink); }
  .quiet-button { border-color: var(--line-strong); background: transparent; }
  .report-content { width: min(1240px, calc(100% - 64px)); margin: 64px auto 0; display: grid; gap: 28px; }
  .report-hero { display: grid; grid-template-columns: 260px 1fr; gap: 50px; padding: 40px; border-radius: 12px; color: white; background: var(--ink); }
  .overall-score { display: grid; place-items: center; align-content: center; min-height: 200px; border-right: 1px solid #fff2; }
  .overall-score strong { font: 400 82px/.9 var(--serif); }
  .overall-score span { margin-top: 12px; color: #b9c1cc; font: 600 10px var(--mono); letter-spacing: .09em; }
  .report-summary { align-self: center; }
  .report-summary h2 { font: 400 30px var(--serif); }
  .report-summary p { margin-top: 16px; max-width: 720px; color: #d3d8df; font-size: 14px; line-height: 1.75; }
  .report-notice { margin-top: 18px; color: var(--coral-soft) !important; font-size: 10px !important; }
  .score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .score-card { padding: 24px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
  .score-card header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
  .score-card h3 { font-size: 12px; }
  .score-value { color: var(--coral-dark); font: 700 19px var(--mono); }
  .score-track { height: 3px; margin: 17px 0; overflow: hidden; border-radius: 9px; background: var(--paper-deep); }
  .score-track span { display: block; height: 100%; background: var(--coral); }
  .score-card p { color: var(--muted); font-size: 11px; line-height: 1.6; }
  .evidence-list { margin-top: 13px; display: grid; gap: 7px; list-style: none; }
  .evidence-list li { color: #596578; font: 500 9px/1.5 var(--mono); }
  .report-section { padding: 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff8; }
  .report-section > h2 { margin-bottom: 24px; font: 400 28px var(--serif); }
  .review-list { display: grid; gap: 10px; }
  .question-review { border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
  .question-review summary { list-style: none; display: flex; gap: 18px; align-items: center; padding: 18px 20px; cursor: pointer; }
  .question-review summary::-webkit-details-marker { display: none; }
  .review-index { flex: none; color: var(--coral-dark); font: 700 10px var(--mono); }
  .question-review summary strong { flex: 1; font-size: 12px; }
  .question-review summary span:last-child { color: var(--muted); }
  .review-body { padding: 0 20px 22px 54px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .review-body h4 { margin: 0 0 9px; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
  .review-body ul { padding-left: 17px; color: var(--muted); font-size: 11px; line-height: 1.6; }
  .outline-block { grid-column: 1 / -1; padding: 15px; border-radius: 6px; background: var(--paper); }
  .action-list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .action-list li { padding: 22px; border-radius: 8px; color: white; background: var(--ink); font-size: 12px; line-height: 1.65; }
  .action-list span { display: block; margin-bottom: 20px; color: var(--coral-soft); font: 700 10px var(--mono); }
  .transcript-list { display: grid; gap: 22px; }
  .transcript-turn { display: grid; grid-template-columns: 90px 1fr; gap: 20px; }
  .transcript-turn strong { color: var(--coral-dark); font: 700 9px var(--mono); letter-spacing: .05em; text-transform: uppercase; }
  .transcript-turn p { color: var(--muted); font-size: 12px; line-height: 1.7; }
  .transcript-turn p + p { margin-top: 8px; color: var(--ink); }
}

@layer responsive {
  @media (max-width: 1050px) {
    .hero { grid-template-columns: 1fr; gap: 52px; }
    .hero-copy { position: static; }
    .process-band, .history-section { grid-template-columns: 1fr; gap: 52px; }
    .score-grid { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 720px) {
    .shell-grid, .report-content, .site-header, .site-footer { width: min(100% - 32px, 1240px); }
    .site-header { min-height: 68px; }
    .header-meta a { display: none; }
    .hero { padding-block: 50px 68px; }
    .hero h1 { font-size: 48px; }
    .hero-intro { font-size: 16px; }
    .trust-row, .field-grid, .process-steps, .score-grid, .action-list, .review-body { grid-template-columns: 1fr; }
    .setup-card { padding: 24px 18px; }
    .segmented-options, .platform-options, .persona-options { grid-template-columns: 1fr; }
    .segmented-options span { min-height: 54px; }
    .platform-option > span { min-height: 82px; grid-template: 1fr 1fr / 112px 1fr; align-items: end; }
    .platform-preview { grid-row: 1 / 3; height: 66px; }
    .platform-option small { align-self: start; }
    .persona-option > span { grid-template-columns: auto 1fr; justify-items: start; min-height: 74px; text-align: left; }
    .persona-option strong, .persona-option small { grid-column: 2; }
    .mini-avatar { grid-row: 1 / 3; }
    .process-band { padding: 68px 24px; }
    .history-section { padding-block: 70px; }
    .report-header { align-items: start; flex-direction: column; }
    .report-hero { grid-template-columns: 1fr; padding: 26px; }
    .overall-score { min-height: 150px; border-right: 0; border-bottom: 1px solid #fff2; }
    .report-section { padding: 22px 16px; }
    .review-body { padding-left: 20px; }
    .outline-block { grid-column: auto; }
    .transcript-turn { grid-template-columns: 1fr; gap: 5px; }
    .site-footer { flex-direction: column; align-items: start; justify-content: center; }
  }
}

.account-gate { min-height: 65vh; display: grid; place-items: center; padding: 48px 24px; }
.account-gate[hidden], form[hidden] { display: none; }
.account-card { background: #fffdf8; border: 1px solid #dcd6cd; border-radius: 18px; padding: 36px; width: min(100%, 580px); box-shadow: 0 16px 48px #3028200a; }
.account-card h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.account-card p { line-height: 1.6; }
.account-card form { display: grid; gap: 16px; margin: 24px 0; }
.account-card > button { width: 100%; margin-top: 16px; }
.report-delivery { margin: 0 auto 24px; max-width: 1200px; padding: 16px 24px; border-bottom: 1px solid #dcd6cd; }
