/* Fonturi locale (fără Google Fonts): Archivo, IBM Plex Sans, IBM Plex Mono, licența SIL OFL 1.1 (fonts/OFL.txt) */
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url(../fonts/archivo-latin-wdth-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url(../fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* Stratigrafie: paginile sunt straturi orizontale; modulele apar ca strate ale unei coloane geologice.
   Culori: antracit (cărbune) + malachit (minereu de cupru) + ocru. */
:root {
  --bg: #eceeea;
  --surface: #fbfbf8;
  --surface-2: #f3f4f0;
  --ink: #1d2320;
  --muted: #5d6762;
  --line: #d3d8d3;
  --accent: #0d6b5b;
  --accent-soft: #d8ebe5;
  --on-accent: #ffffff;
  --ore: #a8681a;
  --ore-soft: #f4e6cf;
  --ok: #2e7a3c;
  --ok-soft: #dcefdf;
  --bad: #b2392d;
  --bad-soft: #f7dfdb;
  --shadow: 0 1px 2px rgb(20 30 25 / 6%), 0 6px 20px rgb(20 30 25 / 6%);
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121715; --surface: #1a201e; --surface-2: #202825; --ink: #e5ebe8; --muted: #9ba7a1; --line: #2e3834;
    --accent: #45b89f; --accent-soft: #173a33; --on-accent: #0b1512; --ore: #dba54e; --ore-soft: #3a2d17;
    --ok: #6cc47a; --ok-soft: #1b3520; --bad: #ea7466; --bad-soft: #3d1f1b; --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121715; --surface: #1a201e; --surface-2: #202825; --ink: #e5ebe8; --muted: #9ba7a1; --line: #2e3834;
  --accent: #45b89f; --accent-soft: #173a33; --on-accent: #0b1512; --ore: #dba54e; --ore-soft: #3a2d17;
  --ok: #6cc47a; --ok-soft: #1b3520; --bad: #ea7466; --bad-soft: #3d1f1b; --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--f-body);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.15; }
.mono { font-family: var(--f-mono); }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Antet */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-stretch: 85%; font-size: 19px; letter-spacing: .01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; overflow: hidden; display: grid; grid-template-rows: 3fr 2fr 4fr 2fr; flex: none; }
.brand-mark i:nth-child(1) { background: var(--ore); } .brand-mark i:nth-child(2) { background: var(--ink); }
.brand-mark i:nth-child(3) { background: var(--accent); } .brand-mark i:nth-child(4) { background: var(--muted); }
nav.tabs { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
nav.tabs button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
nav.tabs button[aria-current="true"] { background: var(--accent-soft); color: var(--ink); }
nav.tabs .count { font-family: var(--f-mono); font-size: 12px; background: var(--bad-soft); color: var(--bad); padding: 0 6px; border-radius: 99px; margin-left: 4px; }

main { padding-block: 24px 64px; }
.view { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lead { color: var(--muted); max-width: 62ch; margin: 6px 0 0; }

/* Buton */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 9px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); min-height: 40px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Acasă */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: end; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; font-stretch: 80%; letter-spacing: -.01em; }
.hero .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat b { display: block; font-family: var(--f-display); font-size: 28px; font-stretch: 85%; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; display: grid; gap: 4px; min-height: 96px; }
.quick button:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.quick button strong { font-family: var(--f-display); font-size: 17px; font-stretch: 90%; }
.quick button span { color: var(--muted); font-size: 13px; }
.quick button.main { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.quick button.main span { color: inherit; opacity: .85; }

/* Coloana stratigrafică a modulelor */
.column { display: grid; gap: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.stratum { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px 12px 0; border-top: 1px solid var(--line); }
.stratum:first-child { border-top: 0; }
.stratum .band { align-self: stretch; }
.stratum h3 { font-size: 16px; font-stretch: 92%; font-weight: 700; }
.stratum .meta { color: var(--muted); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.stratum .meta .mono { font-size: 12px; }
.stratum .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mastery { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 8px; max-width: 360px; }
.mastery i { display: block; height: 100%; background: var(--ok); }
.group-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.group-title h2 { font-size: 20px; font-stretch: 90%; }

/* Configurare test */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 18px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 14px; background: var(--surface); }
.chip input:checked + label { background: var(--accent-soft); border-color: var(--accent); }
.chip input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip label small { color: var(--muted); font-family: var(--f-mono); font-size: 11px; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }

/* Întrebare */
.runner { display: grid; gap: 16px; }
.runbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.progress { flex: 1 1 200px; height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.timer { font-family: var(--f-mono); font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.timer.low { color: var(--bad); border-color: var(--bad); }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 3vw, 26px); display: grid; gap: 16px; box-shadow: var(--shadow); }
.qhead { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-block; align-self: flex-start; line-height: 1.5; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.ore { background: var(--ore-soft); color: var(--ore); border-color: transparent; }
.tag.term { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.qtext { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.45; font-weight: 500; max-width: 70ch; }
.opts { display: grid; gap: 8px; }
.opt { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 11px 12px; cursor: pointer; line-height: 1.45; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt .k { font-family: var(--f-mono); font-size: 12px; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt.ok { border-color: var(--ok); background: var(--ok-soft); }
.opt.ok .k { background: var(--ok); color: var(--surface); border-color: var(--ok); }
.opt.bad { border-color: var(--bad); background: var(--bad-soft); }
.opt.bad .k { background: var(--bad); color: var(--surface); border-color: var(--bad); }
.opt:disabled { cursor: default; }
.feedback { border-left: 4px solid var(--ok); background: var(--surface-2); padding: 12px 14px; border-radius: 0 8px 8px 0; display: grid; gap: 6px; }
.feedback.wrong { border-left-color: var(--bad); }
.feedback strong { font-family: var(--f-display); font-stretch: 90%; font-size: 16px; }
.feedback p { margin: 0; max-width: 72ch; }
.ref { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.qfoot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.kbd { font-size: 12px; color: var(--muted); }

/* Rezultate */
.score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.ring { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring-c) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring b { width: 92px; height: 92px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--f-display); font-size: 28px; font-stretch: 85%; font-variant-numeric: tabular-nums; }
.review { display: grid; gap: 10px; }
.review details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.review summary { cursor: pointer; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; }
.review summary .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--ok); }
.review details.wrong summary .dot { background: var(--bad); }
.review .body { padding: 10px 0 2px 28px; display: grid; gap: 6px; }
.review .body p { margin: 0; }
.ans-ok { color: var(--ok); } .ans-bad { color: var(--bad); }
table.by-mod { width: 100%; border-collapse: collapse; font-size: 14px; }
table.by-mod td, table.by-mod th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.by-mod td.n { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* Glosar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { flex: 1 1 260px; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 12px; }
select { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 10px; max-width: 100%; }
.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.term { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.term h3 { font-size: 18px; font-stretch: 92%; }
.term .def { margin: 0; font-size: 14px; }
.term .exp { margin: 0; font-size: 14px; color: var(--ink); background: var(--ore-soft); border-radius: 6px; padding: 8px 10px; }
.term .exp b { color: var(--ore); font-weight: 600; }
.term .src { display: flex; gap: 4px 8px; flex-wrap: wrap; align-items: flex-start; }
.term .more { border-top: 1px solid var(--line); padding-top: 8px; font-size: 14px; }
.term .more summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.term .more p { margin: 8px 0 0; }
.term .more ul { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.term .more .lbl { font-weight: 600; }
.term .more .ex { background: var(--surface-2); border-radius: 6px; padding: 8px 10px; }
.term .more .warn { color: var(--ink); border-left: 3px solid var(--bad); padding-left: 8px; }
mark { background: var(--ore-soft); color: inherit; border-radius: 3px; }

/* Fișe */
.flash { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 260px; padding: 24px; display: grid; gap: 14px; align-content: center; text-align: center; cursor: pointer; box-shadow: var(--shadow); }
.flash h2 { font-size: clamp(24px, 4vw, 34px); font-stretch: 85%; }
.flash .back { text-align: left; display: grid; gap: 10px; max-width: 70ch; margin: 0 auto; }
.flash .back p { margin: 0; }

.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); }
footer { color: var(--muted); font-size: 13px; padding-block: 0 32px; display: grid; gap: 6px; }
footer p { margin: 0; max-width: 80ch; }
.disclaimer { border-top: 1px solid var(--line); padding-top: 12px; }
.free { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--ore-soft); max-width: 62ch; font-size: 14.5px; }
.free strong { color: var(--ink); }
.indep { margin: 10px 0 0; font-size: 13px; color: var(--muted); border-left: 3px solid var(--ore); padding-left: 10px; max-width: 62ch; }

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .terms { grid-template-columns: minmax(0, 1fr); }
  .stratum { grid-template-columns: 8px minmax(0, 1fr); }
  .stratum .acts { grid-column: 2; justify-content: flex-start; }
  nav.tabs { margin-left: 0; width: 100%; }
  .score { grid-template-columns: minmax(0, 1fr); justify-items: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Scara geologică */
.quick { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.scale-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.scale-side { position: sticky; top: 72px; }
.scale-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table.scale { width: 100%; border-collapse: collapse; font-size: 13px; }
.scale th { background: var(--surface-2); color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 6px; text-align: left; border-bottom: 1px solid var(--line); }
.scale td { border: 1px solid rgb(0 0 0 / 16%); padding: 0; vertical-align: middle; }
.scale td button { all: unset; display: block; box-sizing: border-box; width: 100%; padding: 4px 6px; cursor: pointer; font-weight: 600; line-height: 1.2; color: inherit; overflow-wrap: break-word; hyphens: auto; }
.scale td button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.scale td.sel { box-shadow: inset 0 0 0 3px var(--ink); }
.toolbar select.on { border-color: var(--accent); background: var(--accent-soft); }
.scale td.age { background: var(--surface); color: var(--ink); font-family: var(--f-mono); font-size: 12px; text-align: right; padding: 2px 6px; vertical-align: bottom; white-space: nowrap; }
.scale-detail { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; }
.scale-detail p { margin: 0; }
.scale-detail.muted { color: var(--muted); }
.linkish { all: unset; color: var(--accent); cursor: pointer; text-decoration: underline; }
.tbar-block { display: grid; gap: 6px; }
.tbar-block .note { margin: 0; }
.tbar { display: flex; height: 34px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.tbar.thin { height: 26px; }
.tbar button { border: 0; padding: 0 4px; font-size: 12px; font-weight: 600; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.scale-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scale-extra .panel { gap: 10px; align-content: start; }
.scale-extra p { margin: 0; }
table.mini { border-collapse: collapse; width: 100%; font-size: 14px; }
table.mini th, table.mini td { text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--line); }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.ord-done, .ord-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.ord-chip { border: 1px solid var(--line); border-left: 8px solid var(--accent); background: var(--surface); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-weight: 600; color: var(--ink); font-size: 14px; }
.ord-chip:hover { border-color: var(--accent); }
.ord-chip.ok { background: var(--ok-soft); cursor: default; }
.swatch { display: inline-block; width: 64px; height: 14px; border-radius: 4px; margin: 0 auto; }
@media (max-width: 760px) {
  .scale-grid { grid-template-columns: 1fr; }
  .scale-side { position: static; order: -1; }
  .scale-extra { grid-template-columns: 1fr; }
  table.scale { font-size: 11px; }
  .scale th { font-size: 10px; padding: 5px 3px; }
  .scale td button { padding: 3px 4px; }
  .scale td.d0:not(.leaf) button, .scale td.d1:not(.leaf) button, .scale td.d2:not(.leaf) button { writing-mode: vertical-rl; transform: rotate(180deg); padding: 6px 2px; text-align: center; }
  .scale th:nth-child(-n+3) { font-size: 0; padding: 0; width: 22px; }
  .scale td.age { font-size: 11px; padding: 2px 4px; }
}
@media (max-width: 760px) { nav.tabs .long { display: none; } }

/* Domenii */
.domains { display: flex; gap: 6px; padding-bottom: 10px; flex-wrap: wrap; }
.domains button { flex: 1 1 0; min-width: 0; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 8px; padding: 8px 10px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: var(--f-display); font-stretch: 90%; line-height: 1.2; }
.domains button:hover { border-color: var(--accent); }
.domains button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 760px) { .domains button { font-size: 12.5px; padding: 7px 6px; } }
.verdict { margin: 6px 0 0; font-family: var(--f-display); font-size: 22px; font-weight: 800; }
.verdict span { font-family: var(--f-body); font-size: 14px; font-weight: 400; color: var(--muted); }
.verdict.ok { color: var(--ok); } .verdict.bad { color: var(--bad); }

/* ---------- lecții animate ---------- */
.lx-stage { position: relative; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; min-height: 340px; display: flex; flex-direction: column; }
.lx-slide { flex: 1; padding: 34px 32px 28px; display: flex; flex-direction: column; justify-content: center; gap: 12px; text-align: center; align-items: center; }
.lx-slide > * { animation: lx-in .6s cubic-bezier(.2,.7,.2,1) both; max-width: 70ch; }
.lx-slide > :nth-child(2) { animation-delay: .12s; }
.lx-slide > :nth-child(3) { animation-delay: .5s; }
.lx-slide > :nth-child(4) { animation-delay: .9s; }
.lx-slide > :nth-child(5) { animation-delay: 1.2s; }
.lx-slide > :nth-child(6) { animation-delay: 1.4s; }
@keyframes lx-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lx-slide > * { animation: none; } }
.lx-eb { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ore); }
.lx-h { margin: 0; font-family: var(--f-display); font-size: clamp(20px, 3.2vw, 30px); line-height: 1.25; text-wrap: balance; }
.lx-titlu .lx-h, .lx-final .lx-h { font-size: clamp(26px, 4.4vw, 42px); }
.lx-termen .lx-h { color: var(--accent); }
.lx-t { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink); }
.lx-sub { margin: 0; font-size: 15px; color: var(--muted); background: var(--ore-soft); border-radius: 8px; padding: 8px 12px; }
.lx-ans { font-weight: 700; font-size: 18px; padding: 10px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); }
.lx-ans.bad { background: var(--bad-soft); }
.lx-ans span { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.lx-ref { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.lx-slidebar { height: 4px; background: var(--line); }
.lx-slidebar i { display: block; height: 100%; width: 0; background: var(--ore); }
.lx-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.lx-controls .lx-prog { flex: 1 1 140px; }
.lx-count { font-size: 13px; color: var(--muted); }
.lx-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.lx-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 760px) { .lx-slide { padding: 24px 16px 20px; } .lx-stage { min-height: 300px; } .lx-t { font-size: 16px; } }

/* ---------- cont, sugestii ---------- */
html.gated body { overflow: hidden; }
html.gated #app, html.gated header.top nav, html.gated header.top .domains { visibility: hidden; }
#gate { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 24px; }
#gate[hidden] { display: none; }
.gate-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 22px; box-shadow: var(--shadow); }
.gate-card .brand { margin-bottom: 10px; }
.gate-free { font-size: 14.5px; background: var(--ore-soft); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
.gate-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.gate-tabs button { flex: 1; border: 0; background: transparent; padding: 9px 6px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; font: inherit; }
.gate-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.gate-card form, .sg-form { display: flex; flex-direction: column; gap: 12px; }
.gate-card label, .sg-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 500; }
.gate-card input, .sg-form input, .sg-form select, .sg-form textarea { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); }
.sg-form textarea { resize: vertical; }
.gate-card form p { margin: 0; }
.gate-small { font-size: 13px; color: var(--muted); margin: 0; }
.gate-msg { margin: 0; color: var(--muted); }
.gate-note { font-size: 14px; padding: 9px 11px; border-radius: 8px; background: var(--ok-soft); margin-bottom: 12px; }
.gate-note.bad { background: var(--bad-soft); }
.sg-form .gate-note { margin-bottom: 0; }
.linkbtn { border: 0; background: transparent; padding: 2px 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }
.feedback .report { display: block; margin: 8px auto 0 0; font-size: 13px; text-align: left; }
.userbar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 14px; padding-bottom: 8px; font-size: 13px; color: var(--muted); }
.userbar[hidden] { display: none; }
.userbar .who { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.userbar .linkbtn { font-size: 13px; }
dialog#sugestie { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); padding: 22px; }
dialog#sugestie::backdrop { background: rgb(0 0 0 / 45%); }
dialog#sugestie h2 { margin: 0; font-family: var(--f-display); }
.suggest-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 12px; font-size: 14.5px; }
.suggest-cta > div { flex: 1 1 260px; }
.free-foot { font-size: 14px; }
#lx-mod, #lx-part { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
#lx-part { flex: 1 1 220px; }

/* ---------- joc: Drumul spre milion (scena are culorile ei, în ambele teme) ---------- */
.joc-intro, .joc-scena { --j-bg: #0b1433; --j-bg2: #142257; --j-line: #5f7fd6; --j-ink: #f3f6ff; --j-muted: #b8c4ea; --j-gold: #f4b740; --j-ok: #2fae5b; --j-bad: #d6453a; --j-sel: #f08c21;
  background: radial-gradient(120% 90% at 50% 0%, #22357e 0%, var(--j-bg) 60%); color: var(--j-ink); border-radius: 16px; padding: 22px; border: 1px solid #263a85; }
.joc-intro { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 30px 20px; }
.joc-intro p { max-width: 62ch; margin: 0; }
.joc-intro .muted { color: var(--j-muted); font-size: 14px; }
.joc-logo { width: 190px; height: 190px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at 50% 35%, #31469a, #0b1433 70%); border: 3px solid var(--j-gold); box-shadow: 0 0 40px rgb(244 183 64 / 35%), inset 0 0 30px rgb(0 0 0 / 50%); animation: joc-rot 6s ease-in-out infinite; }
.joc-logo span { font-family: var(--f-display); font-size: 22px; letter-spacing: .1em; text-transform: uppercase; color: var(--j-muted); }
.joc-logo b { font-family: var(--f-display); font-size: 30px; font-stretch: 80%; color: var(--j-gold); line-height: 1; }
@keyframes joc-rot { 50% { box-shadow: 0 0 60px rgb(244 183 64 / 55%), inset 0 0 30px rgb(0 0 0 / 50%); } }
.joc-reguli { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.joc-reguli li { background: rgb(255 255 255 / 7%); border: 1px solid var(--j-line); border-radius: 99px; padding: 6px 12px; font-size: 14px; color: var(--j-muted); }
.joc-reguli b { color: var(--j-gold); margin-right: 4px; }
.joc-start { justify-content: center; }
.joc-start select { background: var(--j-bg2); color: var(--j-ink); border-color: var(--j-line); max-width: 100%; }
.joc-msg { color: #ffd3cf; }
.btn.joc-btn { background: linear-gradient(#ffcd5e, #e09a12); color: #1c1300; border: 0; font-weight: 700; }
.joc-scena .btn:not(.joc-btn) { background: transparent; color: var(--j-ink); border-color: var(--j-line); }
.joc-scena { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 18px; position: relative; overflow: hidden; }
.joc-main { display: grid; gap: 14px; align-content: start; min-width: 0; }
.joc-sus { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.joc-ajutoare { display: flex; gap: 8px; }
.joc-aj { width: 58px; height: 38px; border-radius: 50%; border: 2px solid var(--j-line); background: var(--j-bg2); color: var(--j-ink); font-weight: 700; font-size: 15px; cursor: pointer; }
.joc-aj:hover:not(:disabled) { border-color: var(--j-gold); }
.joc-aj:disabled { opacity: .35; cursor: default; background: repeating-linear-gradient(45deg, transparent 0 6px, rgb(214 69 58 / 45%) 6px 8px), var(--j-bg2); }
.joc-stare { margin-left: auto; display: grid; justify-items: end; line-height: 1.2; }
.joc-stare span { font-size: 13px; color: var(--j-muted); }
.joc-stare b { font-family: var(--f-display); font-size: 24px; color: var(--j-gold); }
.joc-stare small { font-size: 12px; color: var(--j-muted); }
.joc-sunet { background: transparent; border: 0; font-size: 20px; cursor: pointer; color: var(--j-ink); }
.joc-q, .joc-opt { position: relative; background: linear-gradient(#1a2b6b, #0e1a47); border: 2px solid var(--j-line); color: var(--j-ink); clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 18px 100%, 0 50%); }
.joc-q { padding: 20px 34px; font-size: 19px; line-height: 1.4; text-align: center; font-weight: 500; min-height: 92px; display: grid; place-content: center; animation: lx-in .5s both; }
.joc-sursa { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--j-gold); margin-bottom: 6px; }
.joc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.joc-opt { padding: 12px 30px; text-align: left; font: inherit; font-size: 15.5px; cursor: pointer; display: flex; gap: 8px; align-items: center; min-height: 58px; animation: lx-in .5s both; }
.joc-opt:nth-child(2) { animation-delay: .1s; } .joc-opt:nth-child(3) { animation-delay: .2s; } .joc-opt:nth-child(4) { animation-delay: .3s; }
.joc-opt .k { color: var(--j-gold); font-weight: 700; }
.joc-opt:hover:not(:disabled) { background: linear-gradient(#2a3f93, #16265f); }
.joc-opt:disabled { cursor: default; }
.joc-opt.scos { opacity: .35; }
.joc-opt.ales { background: linear-gradient(#ffb04d, var(--j-sel)); color: #1c1000; }
.joc-opt.ales .k { color: #1c1000; }
.joc-opt.blocat { animation: joc-clip .45s steps(2) infinite; }
.joc-opt.ok { background: linear-gradient(#4fd17e, var(--j-ok)); color: #04170a; animation: joc-clip .3s steps(2) 4; }
.joc-opt.ok .k, .joc-opt.bad .k { color: inherit; }
.joc-opt.bad { background: linear-gradient(#ef6b60, var(--j-bad)); color: #fff; }
@keyframes joc-clip { 50% { filter: brightness(1.35); } }
.joc-pub { position: absolute; left: 30px; right: 30px; bottom: 4px; height: 4px; background: rgb(255 255 255 / 15%); border-radius: 2px; }
.joc-pub::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--j-gold); border-radius: 2px; animation: joc-bar 1s ease-out both; }
.joc-pub em { position: absolute; right: 0; bottom: 6px; font-style: normal; font-size: 12px; color: var(--j-gold); font-weight: 700; }
@keyframes joc-bar { from { width: 0; } }
.joc-tel { background: rgb(255 255 255 / 8%); border-left: 3px solid var(--j-gold); padding: 10px 12px; border-radius: 6px; font-size: 15px; animation: lx-in .4s both; }
.joc-confirm { text-align: center; display: grid; gap: 10px; justify-items: center; }
.joc-confirm strong { font-size: 18px; }
.joc-confirm .row { justify-content: center; }
.joc-puls { animation: joc-clip .6s infinite; color: var(--j-gold); }
.joc-final { background: rgb(255 255 255 / 7%); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; animation: lx-in .5s both; }
.joc-final strong { font-size: 18px; }
.joc-final.ok strong { color: #7ee7a2; }
.joc-final.bad strong { color: #ff9a90; }
.joc-final.win strong { color: var(--j-gold); font-size: 24px; }
.joc-final p { margin: 0; color: var(--j-muted); }
.joc-final .ref { font-family: var(--f-mono); font-size: 12px; color: var(--j-muted); }
.joc-garantat { color: var(--j-gold); font-weight: 600; }
.joc-jos { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.joc-jos .kbd { color: var(--j-muted); font-size: 12px; }
.joc-scara-wrap summary { cursor: pointer; color: var(--j-muted); font-size: 14px; margin-bottom: 6px; }
.joc-scara { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-family: var(--f-mono); font-size: 14px; }
.joc-scara li { display: flex; justify-content: space-between; padding: 3px 10px; border-radius: 6px; color: var(--j-muted); }
.joc-scara li span { width: 2.2em; }
.joc-scara li.sigur { color: var(--j-ink); font-weight: 600; }
.joc-scara li.trecut { color: var(--j-gold); }
.joc-scara li.acum { background: linear-gradient(90deg, #ffb04d, var(--j-sel)); color: #1c1000; font-weight: 700; }
.joc-scena.confetti::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, #f4b740 2px, transparent 3px), radial-gradient(circle, #5fd38a 2px, transparent 3px), radial-gradient(circle, #6c8cff 2px, transparent 3px); background-size: 60px 60px, 80px 80px, 70px 70px; animation: joc-confetti 3s linear infinite; opacity: .8; }
@keyframes joc-confetti { from { background-position: 0 -80px, 20px -120px, 40px -100px; } to { background-position: 0 600px, 20px 640px, 40px 620px; } }
@media (prefers-reduced-motion: reduce) { .joc-logo, .joc-opt, .joc-q, .joc-scena.confetti::after, .joc-puls { animation: none !important; } }
@media (max-width: 860px) {
  .joc-scena { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .joc-scara-wrap { order: -1; }
  .joc-opts { grid-template-columns: minmax(0, 1fr); }
  .joc-q { font-size: 17px; padding: 16px 26px; }
  .joc-opt { padding: 10px 24px; }
  .joc-aj { width: 48px; height: 34px; font-size: 13px; }
  .joc-sus { flex-wrap: nowrap; gap: 6px; }
  .joc-stare b { font-size: 20px; }
}

/* butonul „✉ Sugestie” din colțul de sus (js/sugestii.js, varianta fără cont) */
.sg-colt { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; }
.sg-colt:hover { background: var(--accent); color: var(--on-accent); }
@media (max-width: 760px) { .sg-colt { position: absolute; top: 10px; right: max(16px, env(safe-area-inset-right, 0px)); } .sg-colt span { display: none; } }
