/* Facooltate — stiluri. Mobil întâi, apoi desktop de la 860px. */

:root {
  --cream: #FFF7E8;
  --cream-2: #FCEFD6;
  --card: #FFFFFF;
  --navy: #14213D;
  --navy-2: #3A4766;
  --muted: #5B6680;
  --line: #E9DEC6;
  --blue: #2F5BFF;
  --blue-dark: #1E44D6;
  --blue-soft: #E6ECFF;
  --lime: #C8F031;
  --lime-soft: #F1FBCF;
  --ok: #1B7F45;
  --ok-soft: #E3F5E9;
  --bad: #C42B37;
  --bad-soft: #FDE7E9;
  --none: #7A5B00;
  --none-soft: #FFF1C9;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(20, 33, 61, .06), 0 8px 24px -12px rgba(20, 33, 61, .18);
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-title: 'Bricolage Grotesque', 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; outline: none; padding-bottom: 48px; }

h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--blue-dark); }
/* Titlurile primesc focus doar programatic (la schimbarea ecranului), pentru cititoarele de ecran. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- antet și subsol ---------- */

.site-header { padding: 14px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.logo {
  font-family: var(--font-title); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em;
  color: var(--navy); text-decoration: none; line-height: 1;
}
.logo .cool {
  background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%);
  padding: 0 .04em;
}
.logo-sm { font-size: 1.05rem; }

.header-tag {
  font-size: .78rem; font-weight: 600; color: var(--navy-2);
  border: 1.5px solid var(--line); background: var(--card); padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}

.site-footer { border-top: 1px solid var(--line); padding: 20px 0 28px; color: var(--muted); font-size: .88rem; }
.site-footer p { margin: 0; }

/* ---------- butoane ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px -8px rgba(47, 91, 255, .7); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #0B1430; }
.btn-ghost { background: var(--card); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--navy-2); }
.btn-sm { min-height: 42px; padding: 9px 16px; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: 14px 26px; font-size: 1.08rem; }
.btn-block { width: 100%; }

.link-btn {
  display: inline-flex; align-items: center; gap: .4em; background: none; border: 0; padding: 8px 4px;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--navy-2); cursor: pointer; border-radius: 8px;
}
.link-btn:hover:not(:disabled) { color: var(--bad); }
.link-btn:disabled { opacity: .4; cursor: default; }

.back {
  display: inline-flex; align-items: center; gap: .35em; margin: 6px 0 14px;
  color: var(--navy-2); font-weight: 600; font-size: .95rem; text-decoration: none; padding: 4px 0;
}
.back:hover { color: var(--blue-dark); }

/* ---------- etichete ---------- */

.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-2); margin-bottom: .5em; }
.muted { color: var(--muted); }
.fine { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }
.label { font-family: var(--font-ui); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-2); }

.badge-demo {
  display: inline-flex; align-items: center; gap: .4em; font-size: .8rem; font-weight: 700;
  background: var(--lime); color: var(--navy); padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.tag-soon {
  display: inline-block; font-size: .8rem; font-weight: 700; color: var(--navy-2);
  background: var(--cream-2); border: 1.5px dashed #D6C39C; padding: 4px 11px; border-radius: 999px;
}
.chip { display: inline-block; font-size: .8rem; font-weight: 700; background: var(--blue-soft); color: var(--blue-dark); padding: 3px 10px; border-radius: 999px; }

.notice { background: var(--none-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 8px; font-weight: 500; }

/* ---------- pagina principală ---------- */

.hero { padding: 28px 0 12px; }
.hero h1 { max-width: 15ch; }
.lead { font-size: 1.12rem; color: var(--navy-2); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 8px; }

.resume {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card); border: 2px solid var(--blue); border-radius: var(--radius); padding: 14px 16px; margin-top: 20px;
}
.resume-text { display: flex; gap: 10px; align-items: flex-start; }
.resume-text .icon { color: var(--blue); margin-top: 3px; }
.resume p { margin: 0; }

.section { margin-top: 40px; }

.track-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.track-card {
  background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: flex-start; border: 2px solid transparent;
}
.track-card p { color: var(--navy-2); flex: 1; }
.track-card.is-active { border-color: var(--navy); }
.track-card.is-soon { background: rgba(255, 255, 255, .55); box-shadow: none; border: 2px dashed var(--line); }
.track-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px;
  background: var(--lime); color: var(--navy); margin-bottom: 14px; font-size: 1.25rem;
}
.is-soon .track-icon { background: var(--cream-2); color: var(--navy-2); }

/* Meniul din antet */
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-weight: 700; font-size: .95rem; color: var(--navy); text-decoration: none;
  padding: 8px 12px; border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center;
}
.site-nav a:hover { background: var(--cream-2); }
.site-nav a[aria-current="page"] { background: var(--navy); color: #fff; }
.site-nav .header-tag { margin-left: 8px; }

/* Acasă: titlul secțiunii cu link „Toate facultățile” */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: .5em; }
.section-head h2 { margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: .35em; font-weight: 700; text-decoration: none; padding: 6px 0; }
.home-more { margin-top: 14px; font-size: .92rem; }

/* Istoric și progres */
.local-note {
  display: flex; gap: 10px; align-items: flex-start; background: var(--lime-soft); border: 1.5px solid #D9EC8F;
  border-radius: var(--radius-sm); padding: 12px 14px; margin: 4px 0 0; font-size: .92rem; max-width: 70ch;
}
.local-note .icon { margin-top: 2px; color: var(--navy-2); }
.prog-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-top: 12px; }
.prog-card h3 { margin-bottom: .25em; }
.prog-total { margin: 0 0 12px; font-size: .92rem; }
.prog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.prog-row { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.prog-row.is-empty { border-style: dashed; background: rgba(255, 255, 255, .5); }
.prog-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.prog-base { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--navy-2); }
.prog-empty { margin: 8px 0 0; font-size: .9rem; color: var(--navy-2); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prog-bar { display: flex; height: 10px; border-radius: 999px; background: var(--cream-2); border: 1px solid var(--line); overflow: hidden; margin: 10px 0; }
.prog-bar span { display: block; height: 100%; }
.seg-ok { background: var(--ok); }
.seg-bad { background: var(--bad); }
.seg-none { background: #E2B227; }
.prog-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.hist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hist-item {
  display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center;
  background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.hist-item h3 { margin: 0 0 .15em; }
.hist-item p { margin: 0; }
.hist-date { font-size: .82rem; font-weight: 700; color: var(--navy-2); text-transform: uppercase; letter-spacing: .04em; }
.hist-score { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hist-pts { font-family: var(--font-title); font-weight: 800; font-size: 1.5rem; }
.hist-counts { display: inline-flex; gap: 10px; font-weight: 700; font-size: .9rem; }
.hist-counts span { display: inline-flex; align-items: center; gap: 3px; }
.hist-counts span:nth-child(1) { color: var(--ok); }
.hist-counts span:nth-child(2) { color: var(--bad); }
.hist-counts span:nth-child(3) { color: var(--none); }
.hist-item .btn { justify-self: start; }
@media (min-width: 860px) {
  .hist-item { grid-template-columns: 1fr auto auto; gap: 20px; }
}
@media (max-width: 420px) {
  .site-nav a { padding: 8px 10px; font-size: .9rem; }
  .logo { font-size: 1.4rem; }
}

/* Selectorul de limbă RO | EN */
.header-inner { flex-wrap: wrap; }
.lang-switch {
  display: inline-flex; align-items: center; padding: 3px; gap: 2px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
}
.lang-switch button {
  font: inherit; font-size: .85rem; font-weight: 800; letter-spacing: .04em; color: var(--navy-2);
  min-width: 44px; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
}
.lang-switch button:hover { background: var(--cream-2); color: var(--navy); }
.lang-switch button[aria-pressed="true"] { background: var(--lime); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.lang-switch button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.site-nav { margin-left: auto; }

/* Conținut fără traducere și limba examenului */
.tag-lang {
  display: inline-flex; align-items: center; gap: .3em; font-size: .78rem; font-weight: 700;
  background: var(--blue-soft); color: var(--blue-dark); padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
.exam-lang { display: flex; align-items: flex-start; gap: 6px; }
.exam-lang .icon { margin-top: 2px; flex: none; }

@media (max-width: 560px) {
  .site-header { padding: 10px 0 6px; }
  .header-inner { row-gap: 4px; }
  .logo { order: 1; }
  .lang-switch { order: 2; margin-left: auto; }
  .lang-switch button { min-height: 34px; }
  .site-nav { order: 3; width: 100%; margin-left: -10px; }
  .site-nav a { min-height: 36px; padding: 6px 10px; }
}

/* Test personalizat („Creează un test”) */
.mode-custom { background: var(--card); border-style: dashed; border-color: var(--navy-2); }
.mode-custom[aria-expanded="true"] { border-style: solid; border-color: var(--blue); background: var(--blue-soft); }
.mode-custom .mode-go { background: var(--navy); }
.custom-panel { margin-top: 14px; border: 2px solid var(--blue); border-radius: var(--radius); padding: 18px; background: #fff; }
.custom-panel h3 { margin-bottom: .25em; }
.custom-grid { display: grid; gap: 14px; margin-top: 10px; }
.custom-group { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 8px; min-width: 0; }
.custom-group legend { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-2); margin-bottom: 8px; padding: 0; }
.check {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); cursor: pointer; max-width: 100%;
}
.check input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; margin: 0; }
.check:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.check:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.check.is-disabled { opacity: .5; cursor: not-allowed; }
.custom-bottom { display: grid; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); align-items: end; }
.custom-count { display: flex; flex-direction: column; gap: 6px; }
.custom-count label { font-weight: 700; font-size: .95rem; }
.custom-count input {
  font: inherit; font-weight: 700; font-size: 1.1rem; width: 120px; min-height: 48px; padding: 8px 12px;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); color: var(--navy);
}
.custom-count input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.custom-count input[aria-invalid="true"] { border-color: var(--bad); }
.custom-info p { margin: 0; }
.custom-avail { font-weight: 700; }
.custom-status { color: var(--navy-2); font-size: .92rem; }
.custom-status.is-error { color: var(--bad); font-weight: 600; }
@media (min-width: 860px) {
  .custom-grid { grid-template-columns: 1fr 1.4fr; }
  .custom-bottom { grid-template-columns: auto 1fr auto; }
}

/* Instalare (PWA) */
.install-card {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center;
  background: var(--card); border: 2px dashed var(--navy-2); border-radius: var(--radius); padding: 14px 16px; margin-top: 18px; max-width: 640px;
}
.install-card img { border-radius: 12px; }
.install-card h2 { margin: 0 0 .2em; }
.install-card p { margin: 0; color: var(--navy-2); }
.install-card .btn { grid-column: 1 / -1; justify-self: start; }
.install-ios ol { margin: 6px 0 8px; padding-left: 1.3em; color: var(--navy-2); }
.install-ios li { margin: 2px 0; }
.install-done { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 700; color: var(--ok); }
@media (min-width: 560px) {
  .install-card { grid-template-columns: auto 1fr auto; }
  .install-card .btn { grid-column: auto; }
  .install-ios { grid-template-columns: auto 1fr; }
}

/* Greșelile mele */
.mist-link {
  display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 16px; max-width: 520px;
  background: var(--card); border: 2px solid var(--navy); border-radius: var(--radius); color: var(--navy); text-decoration: none;
}
.mist-link:hover { border-color: var(--blue); }
.mist-link > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.mist-link-n {
  flex: none; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 14px; display: grid; place-items: center;
  background: var(--bad-soft); color: var(--bad); font-family: var(--font-title); font-weight: 800; font-size: 1.3rem;
}
.mist-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mist-head h2 { margin-bottom: .2em; }
.mist-count { margin: 0; color: var(--navy-2); }
.mist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mist-item { border: 1.5px solid var(--line); border-left: 6px solid var(--bad); border-radius: var(--radius-sm); padding: 12px 14px; }
.mist-item .qmeta { margin-bottom: 6px; }
.mist-q { font-weight: 600; margin: 0 0 4px; }
.mist-meta { font-size: .85rem; margin: 0; }
.mist-empty h2 { margin-top: 12px; }

/* Selectorul de programe și pagina unui program fără grile */
.program-grid { margin-top: 16px; }
.program-card .h3, .h3 { font-size: 1.12rem; font-weight: 600; margin: 0 0 .5em; }
.program-card .tag-soon { margin-bottom: 12px; }
.soon-card { background: var(--card); border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.soon-card h2 { margin-top: 12px; }
.soon-card p { color: var(--navy-2); max-width: 56ch; }
.soon-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: 16px; }
.steps h3 { margin-bottom: .2em; }
.steps p { margin: 0; color: var(--navy-2); }
.step-n {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--lime); font-family: var(--font-title); font-weight: 800;
}

/* ---------- ilustrații pe pagină (data/ilustratii.js) ---------- */

.page-art { margin: 22px 0 0; }
/* Ilustrațiile au fundal transparent: stau direct pe crem, fără card. */
.page-art img { display: block; width: 100%; height: auto; }
/* Trasee (telefon): scena sub text, dar limitată, ca opțiunile de test să rămână aproape. */
.art-layout:not(.art-hero) .page-art { max-width: 320px; margin-left: auto; margin-right: auto; }
/* Traseu activ (telefon): scena mică lângă titlu, ca opțiunile de test să încapă în primul ecran. */
.art-side.has-art { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; align-items: center; }
.art-side.has-art .page-art { margin: 0; max-width: none; }
/* Test și rezultat: scenă mică lângă titlu, enunțul / punctajul rămân prioritare. */
/* Pe telefon: titlul și scena pe același rând; eticheta Demo coboară pe rândul ei, pe toată lățimea,
   ca să nu ajungă sub ilustrație (antetul testului și al rezultatului). */
.art-compact.has-art { display: grid; grid-template-columns: minmax(0, 1fr) 96px; column-gap: 12px; row-gap: 0; align-items: end; }
.art-compact.has-art .art-text,
.art-compact.has-art .test-title { display: contents; }
.art-compact.has-art .eyebrow { grid-column: 1; grid-row: 1; }
.art-compact.has-art h1 { grid-column: 1; grid-row: 2; margin: 0; }
.art-compact.has-art .page-art { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; max-width: none; }
.art-compact.has-art .badge-demo { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin: 12px 0 14px; }

/* ---------- traseu / alegerea testului ---------- */

.page-head { padding: 12px 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); }

.exam-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-top: 16px; }
.exam-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.exam-head h2 { margin: 0; }
.exam-head .muted { font-weight: 600; }

.mode-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mode {
  width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px;
  text-align: left; font: inherit; color: var(--navy); cursor: pointer;
  background: var(--cream); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px;
  transition: border-color .12s ease, background-color .12s ease, transform .12s ease;
}
.mode:hover { border-color: var(--blue); background: #fff; }
.mode:active { transform: translateY(1px); }
.mode-title { font-family: var(--font-title); font-weight: 800; font-size: 1.15rem; }
.mode-meta { grid-row: 2; font-size: .9rem; color: var(--muted); }
.mode-go {
  grid-row: 1 / span 2; grid-column: 2; align-self: center; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue); color: #fff;
}
.mode-featured { background: var(--lime-soft); border-color: #B5DB2A; }

/* ---------- test ---------- */

.test-head { padding: 4px 0 8px; }
.test-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.test-title h1 { font-size: clamp(1.7rem, 5.5vw, 2.4rem); margin: 0; }

.progress-text { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; font-weight: 600; color: var(--navy-2); margin-bottom: 6px; }
.bar { height: 10px; border-radius: 999px; background: var(--cream-2); overflow: hidden; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #5C7DFF); border-radius: inherit; transition: width .25s ease; }
.bar-lg { height: 12px; margin-top: 10px; }
.is-perfect .bar > span { background: linear-gradient(90deg, var(--ok), #3FB06A); }

.test-grid { display: grid; gap: 16px; margin-top: 14px; }

.qcard { background: var(--card); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow); }
.qmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .88rem; color: var(--navy-2); font-weight: 600; margin-bottom: 14px; }
.qmeta span:not(.chip) { display: inline-flex; align-items: center; gap: .35em; }
.qtext { font-family: var(--font-ui); font-size: 1.15rem; font-weight: 700; line-height: 1.4; letter-spacing: 0; margin-bottom: 14px; }
.qnum { color: var(--blue-dark); }
.hint { font-size: .88rem; color: var(--muted); margin: 0 0 10px; }

.options { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.option {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}
.option:hover { border-color: #B9C6F5; background: #fff; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.letter {
  flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; background: #fff; border: 2px solid var(--line); color: var(--navy);
}
.otext { flex: 1; }
.option:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.option:has(input:checked) .letter { background: var(--blue); border-color: var(--blue); color: #fff; }
.option:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
/* rezervă pentru browsere fără :has() */
.option input:checked + .letter { background: var(--blue); border-color: var(--blue); color: #fff; }

.qtools { margin-top: 8px; min-height: 40px; }
.qfoot { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.qfoot .btn { flex: 1; }

.test-side { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); align-self: start; }
.qnav { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px 8px; }
/* Grilaj: starea se vede prin simbol (bifă / cerc gol), nu doar prin culoare.
   Grila curentă: chenar gros + săgeată dedesubt. Focus tastatură: contur albastru punctat, separat. */
.qdot {
  width: 100%; aspect-ratio: 1; min-height: 44px; border-radius: 12px; border: 2px solid #D9C9A6; background: var(--cream);
  font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px;
}
.qdot:hover { border-color: var(--blue); }
.qdot-n { line-height: 1; }
.qdot-s { display: grid; place-items: center; height: 14px; }
.qdot-s .icon { width: 14px; height: 14px; stroke-width: 2.6; color: var(--navy-2); }
.qdot.is-answered { background: var(--navy); border-color: var(--navy); color: #fff; }
.qdot.is-answered .qdot-s .icon { color: var(--lime); stroke-width: 3.2; }
.qdot.is-current { border-width: 4px; border-color: var(--navy); }
.qdot.is-current.is-answered { border-color: var(--lime); box-shadow: 0 0 0 2px var(--navy); }
.qdot.is-current::after {
  content: ''; position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--navy); border-bottom: 0;
}
.qdot:focus { outline: none; }
.qdot:focus-visible { outline: 3px dashed var(--blue); outline-offset: 4px; }

.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .82rem; color: var(--navy-2); margin: 0 0 14px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.qdot-mini {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid #D9C9A6; background: var(--cream); position: relative;
}
.qdot-mini .icon { width: 12px; height: 12px; stroke-width: 2.6; color: var(--navy-2); }
.qdot-mini.is-answered { background: var(--navy); border-color: var(--navy); }
.qdot-mini.is-answered .icon { color: var(--lime); stroke-width: 3.2; }
.qdot-mini.is-current { border-width: 4px; border-color: var(--navy); }
.qdot-mini.is-current::after {
  content: ''; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--navy); border-bottom: 0;
}

dialog {
  border: 0; border-radius: var(--radius); padding: 22px; max-width: min(440px, calc(100vw - 32px));
  background: var(--card); color: var(--navy); box-shadow: 0 30px 60px -20px rgba(20, 33, 61, .45);
}
dialog::backdrop { background: rgba(20, 33, 61, .45); }
.dlg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- rezultat ---------- */

.score-card { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px 20px; margin-top: 10px; display: grid; gap: 18px; }
.score-card .eyebrow { color: var(--lime); }
.score-card .fine { color: #C5CCE0; margin: 0; }
.score { margin: 0; font-family: var(--font-title); line-height: 1; }
.score-n { font-size: 4rem; font-weight: 800; }
.score-of { font-size: 1.8rem; font-weight: 600; color: #C5CCE0; }
.score-card .bar { background: rgba(255, 255, 255, .15); border-color: transparent; }

.counts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.count { display: flex; flex-direction: column; gap: 4px; background: rgba(255, 255, 255, .08); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .9rem; }
.count strong { font-family: var(--font-title); font-size: 1.5rem; display: block; line-height: 1.1; }
.count .icon { width: 26px; height: 26px; padding: 4px; border-radius: 50%; stroke-width: 3; }
.count-ok .icon { background: #3FB06A; color: #fff; }
.count-bad .icon { background: #F05561; color: #fff; }
.count-none .icon { background: #F6C945; color: var(--navy); }

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.perfect { margin-top: 16px; background: var(--lime); border-radius: var(--radius); padding: 20px; }
.perfect h2 { display: flex; align-items: center; gap: .4em; }
.perfect p { max-width: 52ch; }

.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ch; }
.chapters li {
  counter-increment: ch; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px 12px 52px; position: relative; border: 1.5px solid var(--line);
}
.chapters li::before {
  content: counter(ch); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--lime);
  display: grid; place-items: center; font-weight: 800; font-size: .85rem;
}
.chapter-count { font-size: .88rem; font-weight: 700; background: var(--bad-soft); color: var(--bad); padding: 3px 10px; border-radius: 999px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter {
  font: inherit; font-size: .9rem; font-weight: 600; min-height: 40px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 2px solid var(--line); color: var(--navy);
}
.filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-n { opacity: .7; margin-left: 2px; }

.review-list { display: grid; gap: 14px; }
.review-item { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border-left: 6px solid var(--line); }
.review-item.status-ok { border-left-color: var(--ok); }
.review-item.status-bad { border-left-color: var(--bad); }
.review-item.status-none { border-left-color: #E2B227; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; font-size: .88rem; }

.pill { display: inline-flex; align-items: center; gap: .35em; font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 999px; }
.pill .icon { stroke-width: 3; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-none { background: var(--none-soft); color: var(--none); }

.ropts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.ropt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid transparent; }
.ropt .letter { width: 30px; height: 30px; border-radius: 8px; font-size: .9rem; }
.ropt.is-key { background: var(--ok-soft); border-color: #A9DDBC; }
.ropt.is-key .letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.ropt.is-wrong-pick { background: var(--bad-soft); border-color: #F2B6BC; }
.ropt.is-wrong-pick .letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.mark { display: inline-flex; align-items: center; gap: .3em; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fff; }
.mark .icon { stroke-width: 3; }
.mark-key { color: var(--ok); }
.ropt.is-wrong-pick .mark-sel { color: var(--bad); }
.ropt.is-key .mark-sel { color: var(--navy); }

.answer-sum { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 22px; margin: 0 0 12px; font-size: .9rem; }
.answer-sum dt { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.answer-sum dd { margin: 0; font-weight: 700; }

.explain { background: var(--cream); border-radius: var(--radius-sm); padding: 12px 14px; }
.explain h4 { font-family: var(--font-ui); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--navy-2); margin-bottom: .35em; }
.explain p { margin: 0; }

/* ---------- desktop ---------- */

@media (min-width: 860px) {
  .wrap { padding: 0 28px; }
  .site-header { padding: 22px 0; }
  .hero { padding: 40px 0 24px; }
  .art-layout.has-art { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
  .art-layout.has-art .page-art { margin: 0; }
  .art-hero.has-art { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
  .art-hero.has-art h1 { font-size: clamp(2.4rem, 4.4vw, 3.4rem); }
  .art-layout.has-art:not(.art-hero) .page-art { max-width: none; }
  .art-compact.has-art { grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; align-items: end; }
  /* Desktop: titlul și eticheta din nou împreună, scena în coloana din dreapta. */
  .art-compact.has-art .art-text { display: block; }
  .art-compact.has-art .test-title { display: flex; }
  .art-compact.has-art .page-art { grid-column: 2; grid-row: 1; }
  .art-compact.has-art .badge-demo { margin: 0; }
  .track-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .exam-card { padding: 28px; }
  .mode-list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .test-grid { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .test-side { position: sticky; top: 16px; }
  .qnav { grid-template-columns: repeat(4, 1fr); }
  .qcard { padding: 28px; }
  .qfoot .btn { flex: 0 0 auto; }
  .score-card { grid-template-columns: 1fr 1.3fr; align-items: center; padding: 28px; }
  .score-card .fine { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .header-tag { display: none; }
  .answer-sum { grid-template-columns: 1fr 1fr; }
  .score-n { font-size: 3.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
