/* Chestionare Stivuitorist — stil (mobile-first, fără dependențe) */

:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #17202b;
  --muted: #55606d;
  --border: #d8dde4;
  --header-bg: #17202b;
  --header-text: #ffffff;
  --header-link: #d9e1ea;
  --accent: #f2b705;
  --accent-hover: #ffc62e;
  --accent-ink: #17202b;
  --accent-soft: #fff6d9;
  --link: #1b4f93;
  --ok: #17753a;
  --ok-bg: #e7f4eb;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --warn-bg: #fff4d6;
  --focus: #2f6fdb;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 2px 10px rgb(16 24 40 / 6%);
  --wrap: 760px;
  /* fundal: contururi de stivuitoare, foarte discrete (desen propriu, SVG) */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360' viewBox='0 0 360 360'%3E%3Cdefs%3E%3Cg id='f'%3E%3Cpath d='M2 64H28M28 64V40M28 44H34'/%3E%3Cpath d='M34 6V66M40 6V66M34 12H40M34 38H40'/%3E%3Cpath d='M40 46H100Q106 46 106 52V60Q106 66 100 66H40Z'/%3E%3Cpath d='M46 46L50 16H82L86 46'/%3E%3Cpath d='M66 46V38H74M56 32L60 40'/%3E%3Ccircle cx='50' cy='66' r='8'/%3E%3Ccircle cx='94' cy='67' r='7'/%3E%3C/g%3E%3Cg id='p'%3E%3Cuse href='%23f'/%3E%3Cpath d='M4 62V50H26V62M4 56H26'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='none' stroke='%2317202b' stroke-opacity='.08' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cuse href='%23f' transform='translate(26 44) rotate(-12) scale(.9)'/%3E%3Cuse href='%23p' transform='translate(196 70) rotate(9) scale(1.05)'/%3E%3Cuse href='%23f' transform='translate(150 230) rotate(16) scale(-.85 .85)'/%3E%3Cuse href='%23p' transform='translate(222 262) rotate(-20) scale(.95)'/%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1319;
    --surface: #161d25;
    --surface-2: #1e2731;
    --text: #e6ebf0;
    --muted: #9ea9b5;
    --border: #2c3743;
    --header-bg: #0a0e13;
    --accent-soft: #2e2608;
    --link: #8ebaf5;
    --ok: #6fd394;
    --ok-bg: #122f1d;
    --bad: #ff8f86;
    --bad-bg: #3b1714;
    --warn-bg: #362c0c;
    --focus: #8ebaf5;
    --shadow: none;
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360' viewBox='0 0 360 360'%3E%3Cdefs%3E%3Cg id='f'%3E%3Cpath d='M2 64H28M28 64V40M28 44H34'/%3E%3Cpath d='M34 6V66M40 6V66M34 12H40M34 38H40'/%3E%3Cpath d='M40 46H100Q106 46 106 52V60Q106 66 100 66H40Z'/%3E%3Cpath d='M46 46L50 16H82L86 46'/%3E%3Cpath d='M66 46V38H74M56 32L60 40'/%3E%3Ccircle cx='50' cy='66' r='8'/%3E%3Ccircle cx='94' cy='67' r='7'/%3E%3C/g%3E%3Cg id='p'%3E%3Cuse href='%23f'/%3E%3Cpath d='M4 62V50H26V62M4 56H26'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='none' stroke='%23e6ebf0' stroke-opacity='.07' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cuse href='%23f' transform='translate(26 44) rotate(-12) scale(.9)'/%3E%3Cuse href='%23p' transform='translate(196 70) rotate(9) scale(1.05)'/%3E%3Cuse href='%23f' transform='translate(150 230) rotate(16) scale(-.85 .85)'/%3E%3Cuse href='%23p' transform='translate(222 262) rotate(-20) scale(.95)'/%3E%3C/g%3E%3C/svg%3E");
  }
}

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

/* antetul fix acoperă partea de sus: ancorele (#…) se opresc sub el */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg) var(--pattern) repeat;
  background-size: 360px 360px;
  color: var(--text);
  font: 400 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 2px; }

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.75rem, 1.25rem + 2.4vw, 2.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.55rem); }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ref { color: var(--muted); font-size: 0.9em; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 8px; }

/* ---------- antet (rămâne fix sus la derulare) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); color: var(--header-text);
  box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
}
.site-header::before {
  content: "";
  display: block;
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, #17202b 12px 24px);
}
.header-row.wrap { max-width: 1180px; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 8px; padding-bottom: 8px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--header-text); text-decoration: none; font-weight: 700; font-size: 1.05rem;
}
.brand img { display: block; border-radius: 8px; width: 34px; height: 34px; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a { display: inline-block; padding: 7px 10px; border-radius: 8px; color: var(--header-link); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { background: rgb(255 255 255 / 10%); color: #fff; }
.site-nav a.nav-surse { box-shadow: inset 0 0 0 1.5px var(--accent); color: #fff; font-weight: 600; }
.site-nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.header-contact { color: var(--header-link); text-decoration: none; font-size: 0.88rem; white-space: nowrap; }
.header-contact:hover { color: #fff; text-decoration: underline; }
.l-short { display: none; }
/* peste 860px: trei zone egal distanțate — siglă / meniu centrat / contact la margine */
@media (min-width: 861px) {
  .header-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
  .brand { justify-self: start; white-space: nowrap; }
  .site-nav { justify-self: center; }
  .header-contact { justify-self: end; }
}
/* sub 860px ascundem adresa de contact din antet, ca să nu aglomerăm meniul */
@media (max-width: 860px) {
  .header-contact { display: none; }
}
/* pe telefon antetul are un singur rând: doar sigla și etichete scurte */
@media (max-width: 560px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand img { width: 30px; height: 30px; }
  .l-long { display: none; }
  .l-short { display: inline; }
  .site-nav ul { gap: 2px; }
  .site-nav a { padding: 6px 8px; font-size: 0.9rem; }
}
@media (max-width: 360px) {
  .site-nav a { padding: 6px 6px; font-size: 0.86rem; }
}

/* ---------- butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 11px 20px;
  border: 2px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--muted); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-small { min-height: 38px; padding: 7px 16px; font-size: 0.9rem; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
@media (max-width: 480px) {
  .actions .btn { flex: 1 1 100%; }
}

/* ---------- pagina principală ---------- */
.hero { background: var(--surface) var(--pattern) repeat; background-size: 360px 360px; border-bottom: 1px solid var(--border); padding: 28px 0 24px; }
.eyebrow { display: inline-block; margin: 0 0 12px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 0.85rem; font-weight: 600; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.title-center { text-align: center; }
.lead-oneline { max-width: none; }
@media (min-width: 640px) {
  .lead-oneline { font-size: 1rem; }
}
.facts { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.facts li { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); font-size: 0.95rem; }
.facts strong { display: block; font-size: 1.1rem; }
@media (min-width: 640px) {
  .facts { grid-template-columns: repeat(3, 1fr); }
}

.section { padding-top: 28px; padding-bottom: 8px; } /* fără padding lateral: îl dă .wrap */
.page { padding-top: 24px; }
main > .section + .section { border-top: 1px solid var(--border); }
.steps li { margin-bottom: 10px; }

.faq details { margin-bottom: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.faq summary { position: relative; padding: 14px 44px 14px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 1.4rem; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 16px 14px; }

.cta-end { text-align: center; padding-bottom: 24px; }

/* ---------- pagini de conținut ---------- */
.article h2 { margin-top: 1.6em; }
.summary-box { margin: 16px 0 8px; padding: 16px 18px; border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.summary-box h2 { margin-top: 0; font-size: 1.15rem; }
.summary-box ul { margin: 0; }
.cta-box { margin: 32px 0 8px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-align: center; }
.cta-box h2 { margin-top: 0; }

.notice { margin: 0 0 16px; padding: 12px 14px; border-left: 4px solid var(--accent); border-radius: 8px; background: var(--warn-bg); }
.notice-surse a { font-weight: 700; }
.hero .notice-surse { margin: 4px 0 0; max-width: 62ch; }

/* ---------- pagina de surse ---------- */
.source { margin: 20px 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.article .source h2 { margin-top: 0; }
.source-meta { margin-top: -0.3em; color: var(--muted); font-size: 0.92rem; }
.source-read { margin-bottom: 0.4em; font-weight: 650; }
.source .btn { min-height: 44px; }

/* ---------- testul ---------- */
.quiz { margin: 8px 0 24px; }
.card { padding: 20px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
@media (min-width: 640px) {
  .card { padding: 24px; }
}
.card h2 { font-size: 1.25rem; }

.modes { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; border: 0; }
.modes legend { padding: 0; margin-bottom: 10px; font-weight: 650; font-size: 1.1rem; }
.mode { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 2px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mode input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); }
.mode strong { display: block; }
.mode small { display: block; color: var(--muted); font-size: 0.93rem; }

.q-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-size: 0.92rem; }
.progress { height: 6px; margin-bottom: 18px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; width: 0; height: 100%; background: var(--accent); transition: width 0.25s ease; }
.q-chapter { margin: 0 0 6px; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.q-text { margin: 0 0 16px; font-size: 1.2rem; font-weight: 650; line-height: 1.4; }
.q-text:focus { outline: none; }

.options { display: grid; gap: 10px; margin: 0 0 16px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 56px; padding: 13px 14px;
  border: 2px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.opt:hover:not([disabled]) { border-color: var(--muted); }
.opt .letter { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-weight: 700; }
.opt .txt { flex: 1; padding-top: 2px; }
.opt .tag { display: block; margin-top: 4px; font-size: 0.85rem; font-weight: 700; }
.opt[aria-pressed="true"] { border-color: var(--focus); background: var(--surface-2); }
.opt[aria-pressed="true"] .letter { background: var(--focus); color: var(--surface); }
.opt.correct { border-color: var(--ok); background: var(--ok-bg); }
.opt.correct .letter { background: var(--ok); color: var(--surface); }
.opt.correct .tag { color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .letter { background: var(--bad); color: var(--surface); }
.opt.wrong .tag { color: var(--bad); }
.opt[disabled] { cursor: default; }

.feedback { margin: 0 0 16px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.feedback p { margin-bottom: 0.6em; }
.feedback p:last-child { margin-bottom: 0; }
.verdict { font-weight: 700; }
.feedback.ok .verdict { color: var(--ok); }
.feedback.bad .verdict { color: var(--bad); }
.src { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
details.quote { margin-top: 8px; }
details.quote summary { color: var(--link); font-size: 0.92rem; cursor: pointer; }
blockquote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface); font-size: 0.95rem; }

.result { text-align: center; }
.score { margin: 4px 0 10px; font-size: 3rem; font-weight: 800; line-height: 1; }
.badge { display: inline-block; margin-bottom: 10px; padding: 6px 14px; border-radius: 999px; font-weight: 700; }
.pass .badge { background: var(--ok-bg); color: var(--ok); }
.fail .badge { background: var(--bad-bg); color: var(--bad); }
.result .actions { justify-content: center; }

.review { margin-top: 24px; }
.review ol { padding-left: 1.3em; }
.review li { margin-bottom: 18px; }
.review li p { margin-bottom: 0.35em; }
.review .rq { margin-bottom: 4px; font-weight: 650; }
.review .yours { color: var(--bad); }
.review .right { color: var(--ok); }

/* ---------- subsol ---------- */
.site-footer { margin-top: 40px; padding: 24px 0 32px; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.92rem; }
.site-footer a { color: var(--link); }
.footer-contact { margin-top: 14px; text-align: center; }
.footer-contact .btn { text-decoration: none; color: var(--text); }
@media (max-width: 560px) {
  .footer-contact { text-align: left; }
}

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