/* OralReady — light, clean, accessible. No framework, no build step. */

:root {
  --ink: #14212b;
  --ink-2: #33424f;
  --muted: #56636f;
  --line: #dde4ea;
  --bg: #ffffff;
  --surface: #f5f8fa;
  --surface-2: #ecf2f5;
  --brand: #0f6e66;
  --brand-ink: #0a524c;
  --brand-soft: #e3f2f0;
  --rec: #c62828;
  --rec-ink: #9f1d1d;
  --warn-bg: #fff8e8;
  --warn-line: #f0d08a;
  --warn-ink: #6b4500;
  --ok: #146c43;
  --ok-bg: #e7f5ee;
  --err: #b42318;
  --err-bg: #fdeceb;
  --lvl-belowA: #6b7280;
  --lvl-A: #b45309;
  --lvl-B: #0f6e66;
  --lvl-C: #4338ca;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 20px rgba(16, 24, 40, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.85rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-ink); }

:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; border-radius: 4px; }

[hidden] { display: none !important; }

.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: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.5rem 0.9rem; border-radius: 8px;
}
.skip-link:focus { top: 0.75rem; color: #fff; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 760px; }
.section { padding: 4rem 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--brand); margin-bottom: 0.5rem; }
.lead { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.logo { width: 30px; height: 30px; color: var(--brand); flex: none; }
/* The brand and its French descriptor, beside it on every page (CHARTER-7) */
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-descriptor { font-size: 0.78rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.site-footer .brand-descriptor { font-size: 0.8rem; }
/* On a phone the descriptor needs the header's width: the practice button there gives way (the page and footer link it) */
@media (max-width: 520px) { .header-actions .btn-small, .header-link { display: none; } }
/* The language gateway at / */
.gateway { padding: 4rem 0; }
.gateway .brand { margin-bottom: 2rem; }
.main-nav { display: flex; gap: 1.25rem; margin-left: auto; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.main-nav a:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.main-nav + .header-actions { margin-left: 0.5rem; }
.lang-toggle {
  font-weight: 600; font-size: 0.95rem; color: var(--ink-2); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; background: #fff; cursor: pointer;
  font-family: inherit;
}
.lang-toggle:hover { border-color: var(--brand); color: var(--brand); }
.header-link { font-weight: 600; font-size: 0.95rem; color: var(--ink-2); text-decoration: none; }
.header-link:hover, .header-link[aria-current] { color: var(--brand); }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .main-nav + .header-actions { margin-left: auto; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2;
  padding: 0.8rem 1.3rem; border-radius: 999px; border: 2px solid var(--brand);
  background: var(--brand); color: #fff; text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); padding-left: 0.6rem; padding-right: 0.6rem; }
.btn-ghost:hover { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.btn-small { padding: 0.5rem 0.95rem; font-size: 0.93rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn .icon { width: 1.15em; height: 1.15em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Hero */
.hero { padding: 4.5rem 0 3.5rem; background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 85%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
.hero h1 { max-width: 15em; }
.hero .lead { max-width: 34em; }
.hero-points { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; font-weight: 600; }
.hero-points li { position: relative; padding-left: 1.6rem; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: 0.22em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230f6e66' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.hero-note { margin-top: 0.6rem; font-size: 0.95rem; color: var(--muted); }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; }
.hero-card .q-label { font-size: 0.8rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.06em; }
.hero-card .q-text { font-size: 1.08rem; font-weight: 600; margin: 0.4rem 0 1rem; }
.mini-rec { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--surface); border-radius: var(--radius-sm); }
.mini-rec .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--rec); flex: none; }
.mini-rec .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.mini-rec .bar span { display: block; width: 58%; height: 100%; background: var(--brand); }
.mini-result { display: flex; align-items: center; gap: 0.9rem; margin-top: 1rem; }
@media (max-width: 860px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Notices */
.notice {
  border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink);
  border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; font-size: 0.95rem;
}
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: #4d3200; }
.notice-info { border-color: #cfe3f5; background: #f1f7fd; color: #1e3a5f; }
.notice-top { margin-bottom: 1.5rem; }
/* Bloc N on the results page: at body size, like the text around it (COMP-5) */
.alert { border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; background: var(--err-bg); color: var(--err); border: 1px solid #f5c2bd; }
.alert p:last-child { margin-bottom: 0; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #b9e1cb; }

/* Cards & grids */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card-flat { box-shadow: none; }
.step-num {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; margin-bottom: 0.8rem;
}
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 1.8rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.32em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230f6e66' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; max-width: 860px; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }
.price-card { display: flex; flex-direction: column; }
.price-card .btn { margin-top: auto; }
.price-card.featured { border: 2px solid var(--brand); }
.price { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0.2rem 0 0.1rem; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.price-card .situation { margin: -0.3rem 0 0.4rem; font-weight: 600; color: var(--brand-ink); }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.pricing-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; margin-top: 1.5rem; }
@media (max-width: 860px) { .pricing-ladder { grid-template-columns: 1fr; } }
.pass-list { list-style: none; padding: 0; margin: 0.4rem 0 1rem; }
.pass-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.pass-list li strong { min-width: 5.5rem; }

/* Legal pages */
.legal h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.legal h2 { margin-top: 2.2rem; font-size: 1.35rem; scroll-margin-top: 5rem; } /* clear of the sticky header when a link lands on a section */
.legal table { font-size: 0.93rem; }
.legal td:first-child { min-width: 9rem; }
.callout { border-left: 4px solid var(--brand); background: var(--surface); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; margin: 0 0 1.25rem; }
.callout p, .callout ul { margin-bottom: 0.4rem; }
mark.todo { background: var(--warn-bg); color: var(--warn-ink); border: 1px dashed var(--warn-line); border-radius: 4px; padding: 0 0.25rem; }

/* Order summary */
.order h2 { margin-top: 1.8rem; }
.order-actions { margin-top: 1.8rem; }
.election { display: flex; gap: 0.6rem; align-items: flex-start; }
.election input { margin-top: 0.35rem; width: 1.1rem; height: 1.1rem; flex: none; }

/* Pricing page: the test and target chosen for the first mock */
.selector { margin-top: 0.5rem; }
.selector-groups { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.selector-label { font-weight: 650; margin-bottom: 0.4rem; }
.chips { list-style: none; padding: 0; margin: 0 0 0.8rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips a { display: inline-block; padding: 0.35rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: #fff; }
.chips a:hover { border-color: var(--brand); }
.chips a[aria-current="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }

/* Guide (SEO article) */
.guide { max-width: 780px; }
.guide h2 { margin-top: 2.4rem; scroll-margin-top: 5rem; } /* clear of the sticky header when the table of contents lands on a section */
.breadcrumb { color: var(--muted); margin-bottom: 0.8rem; }
.guide-body { padding-top: 0.5rem; } /* the hero above already ends in space */
.guide-body nav h2 { margin-top: 0; }
.guide td:first-child, .guide th:first-child { width: 1%; white-space: nowrap; } /* the level letter */
.guide h3 { margin-top: 1.6rem; }
/* Practice questions: one card-like row each, numbered through the page's stages */
.question-list { padding-left: 2.2em; }
.question-list li { margin: 0 0 0.6rem; padding: 0.7rem 0.9rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); scroll-margin-top: 5rem; }
.question-list li::marker { color: var(--brand); font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
th { background: var(--surface); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.compare-table td { width: 50%; }
.next-step { border: 2px solid var(--brand); }
.compare-table th[scope="rowgroup"] { background: var(--brand-soft); color: var(--brand-ink); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.compare-table tbody:last-child tr:last-child td { border-bottom: 0; }
.sources { font-size: 0.92rem; color: var(--muted); }
.sources a { word-break: break-word; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
.faq summary { cursor: pointer; font-weight: 650; padding: 0.7rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 0.8rem; color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 2.5rem 0 1.5rem; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; margin-bottom: 1.5rem; }
.footer-grid ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.footer-legal { margin-top: 0.9rem; font-size: 0.92rem; }
.footer-tests { margin-bottom: 0.6rem; font-weight: 600; }
.footer-grid a { color: var(--ink-2); }
/* The pages in both languages: a French column and an English one */
.footer-pair { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Forms */
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
legend { font-weight: 700; margin-bottom: 0.6rem; font-size: 1.05rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label {
  display: block; height: 100%; cursor: pointer; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.9rem 1rem; background: #fff; transition: border-color 0.15s ease, background 0.15s ease;
}
.choice label strong { display: block; font-size: 1.05rem; }
.choice label span { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 0.15rem; }
.choice input:checked + label { border-color: var(--brand); background: var(--brand-soft); }
.choice input:focus-visible + label { outline: 3px solid #2563eb; outline-offset: 2px; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 650; margin-bottom: 0.35rem; }
input[type="email"], input[type="text"], textarea {
  width: 100%; font: inherit; padding: 0.75rem 0.9rem; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
input[type="email"]:focus, input[type="text"]:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(15, 110, 102, 0.2); }
select { font: inherit; padding: 0.6rem 0.8rem; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
textarea.code { font-family: var(--mono); font-size: 0.85rem; min-height: 6.5rem; word-break: break-all; resize: vertical; }
input.code, p.code { font-family: var(--mono); letter-spacing: 0.06em; }
input.code { font-size: 1.15rem; }

/* App pages */
.app-main { padding: 2.5rem 0 3rem; }
.page-title { margin-bottom: 0.4rem; }
.status-card { display: flex; gap: 1rem; align-items: flex-start; }
.status-card .icon { width: 1.6rem; height: 1.6rem; flex: none; color: var(--brand); }
.status-card p { margin: 0; }
.status-card .actions { margin-top: 0.8rem; }

.progress-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.q-count { font-weight: 700; margin: 0; }
.stage-chip { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 650; color: var(--brand-ink); background: var(--brand-soft); border-radius: 999px; padding: 0.25rem 0.75rem; }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 1.75rem; }
.progress > span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width 0.3s ease; }
.progress.thin { height: 6px; margin: 0.75rem 0 1rem; }
.question-text { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 650; line-height: 1.35; margin-bottom: 0.75rem; }
.question-text:focus { outline: none; }

.recorder { margin-top: 1.25rem; }
.rec-panel { text-align: center; padding: 0.5rem 0; }
.btn-record {
  display: inline-flex; align-items: center; gap: 0.7rem; font: inherit; font-weight: 700; font-size: 1.1rem;
  padding: 1rem 1.6rem; border-radius: 999px; border: 2px solid var(--rec); background: var(--rec); color: #fff; cursor: pointer;
}
.btn-record:hover { background: var(--rec-ink); border-color: var(--rec-ink); }
.btn-record .dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.btn-stop { background: #fff; color: var(--rec); border-color: var(--rec); }
.btn-stop:hover { background: var(--err-bg); color: var(--rec-ink); border-color: var(--rec-ink); }
.btn-stop .square { width: 12px; height: 12px; background: currentColor; border-radius: 2px; }
.rec-indicator { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--rec); margin-bottom: 0.25rem; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--rec); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }
.timer { font-variant-numeric: tabular-nums; font-size: 2.2rem; font-weight: 750; letter-spacing: -0.01em; margin: 0.2rem 0; }
.timer.warn { color: var(--rec); }
.rec-warn { font-weight: 650; color: var(--rec-ink); margin: 1rem 0 0.5rem; }
.rec-warn:empty { margin: 0; } /* stays in the page, empty, so screen readers announce the warning */
.check { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.meter { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; max-width: 320px; margin: 0.5rem auto 1rem; }
.meter > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #34d399, var(--brand)); transition: width 0.08s linear; }
.transcript {
  margin: 0.5rem 0 1.25rem; padding: 1rem 1.1rem; background: var(--surface); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: pre-wrap; text-align: left;
}
.transcript.empty { color: var(--muted); font-style: italic; }
audio { width: 100%; max-width: 480px; margin: 0.5rem 0 1rem; }
.done-head { text-align: left; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; }
.spinner { display: inline-block; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 0.8s linear infinite; vertical-align: middle; }
.spinner.lg { width: 3rem; height: 3rem; border-width: 4px; margin-bottom: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.processing { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 1.5rem 0; font-weight: 600; }
dialog { width: calc(100% - 2rem); max-width: 34rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(15 23 42 / 0.4); }

/* Results */
.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
@media (max-width: 640px) { .result-hero { grid-template-columns: 1fr; } }
.level-badge {
  display: grid; place-items: center; width: 8rem; height: 8rem; border-radius: 24px; color: #fff; text-align: center;
  background: var(--lvl-B); font-weight: 800; line-height: 1;
}
.level-badge .lvl { font-size: 3.4rem; letter-spacing: -0.03em; }
.level-badge .lvl.long { font-size: 1.35rem; line-height: 1.15; padding: 0 0.5rem; }
.level-badge .cap { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.9; margin-top: 0.4rem; }
.level-badge[data-level="below_A"] { background: var(--lvl-belowA); }
.level-badge[data-level="A"] { background: var(--lvl-A); }
.level-badge[data-level="B"] { background: var(--lvl-B); }
.level-badge[data-level="C"] { background: var(--lvl-C); }
.level-pill { display: inline-block; min-width: 2.2rem; text-align: center; font-weight: 800; font-size: 0.9rem; padding: 0.15rem 0.55rem; border-radius: 999px; color: #fff; background: var(--lvl-B); white-space: nowrap; }
.level-pill[data-level="below_A"] { background: var(--lvl-belowA); }
.level-pill[data-level="A"] { background: var(--lvl-A); }
.level-pill[data-level="C"] { background: var(--lvl-C); }
.level-pill.na { background: var(--surface-2); color: var(--muted); }
.meta-list { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; padding: 0; list-style: none; color: var(--muted); font-size: 0.93rem; margin: 0 0 0.8rem; }
.result-head { font-weight: 750; font-size: 1.15rem; margin-bottom: 0.25rem; }
.target-status { font-weight: 700; }
.target-status.met { color: var(--ok); }
.target-status.not-met { color: var(--warn-ink); }
.result-section { margin-top: 2.5rem; }
.criteria-table td:first-child { width: 32%; }
.criteria-table td:nth-child(2) { width: 6.5rem; }
.error-list { list-style: none; padding: 0; counter-reset: err; }
.error-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem 1rem 3.2rem; margin-bottom: 0.9rem; position: relative; counter-increment: err; }
.error-item::before { content: counter(err); position: absolute; left: 1rem; top: 1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-weight: 800; display: grid; place-items: center; font-size: 0.9rem; }
.said, .better { display: block; padding: 0.15rem 0; }
.said { color: var(--err); }
.said s { text-decoration-thickness: 1px; }
.better { color: var(--ok); font-weight: 650; }
.tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-right: 0.4rem; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.compare .col { border-radius: var(--radius-sm); padding: 1rem 1.1rem; background: var(--surface); }
.compare .col.improved { background: var(--ok-bg); }
.compare h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.5rem; }
.action-list { counter-reset: act; list-style: none; padding: 0; }
.action-list li { counter-increment: act; position: relative; padding: 0.9rem 1rem 0.9rem 3.2rem; border-radius: var(--radius-sm); background: var(--brand-soft); margin-bottom: 0.75rem; }
.action-list li::before { content: counter(act); position: absolute; left: 1rem; top: 0.85rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 0.9rem; }
.transcripts details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.6rem 1rem; margin-bottom: 0.6rem; }
.transcripts summary { cursor: pointer; font-weight: 650; }
.why summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.why[open] summary { margin-bottom: 1rem; }
.why ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.why li { margin-bottom: 0.35rem; }
.print-only { display: none; }

/* Grading steps (FR-4.1 AC2) */
.steps { list-style: none; padding: 0; margin: 1.25rem auto 0; max-width: 22rem; text-align: left; }
.steps li { position: relative; padding-left: 1.7rem; margin: 0.4rem 0; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 0.25rem; top: 0.4em; width: 0.65rem; height: 0.65rem; border-radius: 50%; border: 2px solid var(--brand); }
.steps li.active { color: var(--ink); font-weight: 650; }
.steps li.done::before { content: "✓"; border: 0; width: auto; height: auto; top: 0; color: var(--brand); font-weight: 800; }

/* Legal pages */
.legal h2 { margin-top: 2rem; font-size: 1.35rem; }
.legal { max-width: 760px; }

/* Print */
@media print {
  @page { margin: 16mm; }
  body { font-size: 11pt; color: #000; }
  .site-header, .site-footer, .no-print, .skip-link, .btn, button { display: none !important; }
  .print-only { display: block; }
  .card, .error-item, .compare .col, .action-list li { box-shadow: none; break-inside: avoid; }
  .level-badge, .level-pill, .action-list li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: #000; text-decoration: none; }
  .app-main { padding-top: 0; }
  details > summary { list-style: none; }
}

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

/* Heading-size utilities (keep the document outline, change the look) */
.h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
.h3 { font-size: 1.2rem; }
.h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.5rem; }
.center-row { justify-content: center; }

/* Polish */
.pricing + p { margin-top: 1rem; }
tbody th { background: transparent; font-weight: 650; }
.error-item p:last-child { margin-bottom: 0; }
.error-item p { margin-top: 0.4rem; }
