/* ==========================================================================
   Bacalaureatul.ro — design system v2 (prototip)
   Fără framework, fără dependențe. Țintă: < 25 KB CSS, LCP < 1.5s.
   ========================================================================== */

:root {
  --ink: #0f1b33;
  --ink-2: #3a4763;
  --muted: #6b7690;
  --line: #e3e7ef;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-warm: #fff8e8;
  --brand: #1d4ed8;
  --brand-ink: #1e3a8a;
  --brand-soft: #e8efff;
  --accent: #ffb703;
  --accent-ink: #7a4b00;
  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fff3e0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 27, 51, .06), 0 6px 20px rgba(15, 27, 51, .06);
  --shadow-lg: 0 10px 40px rgba(15, 27, 51, .12);
  --wrap: 1180px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Bara de sus (anunț) ---------- */
.topbar { background: var(--ink); color: #dbe3f5; font-size: 14px; }
.topbar .wrap { display: flex; gap: 12px; align-items: center; justify-content: center; padding-top: 8px; padding-bottom: 8px; text-align: center; }
.topbar strong { color: var(--accent); }
.topbar a { color: #fff; font-weight: 600; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.logo span em { font-style: normal; color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.header-cta { margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; } .menu-btn span::after { position: absolute; top: 6px; }

/* ---------- Butoane ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 15px; padding: 12px 20px; border-radius: 11px; border: 0; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(29,78,216,.3); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-accent { background: var(--accent); color: var(--ink); box-shadow: 0 4px 14px rgba(255,183,3,.35); }
.btn-accent:hover { color: var(--ink); background: #ffc533; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: #c8d0df; }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1200px 400px at 85% -10%, #dce7ff 0%, transparent 60%), linear-gradient(180deg, var(--bg-soft), #fff); padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 18px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.hero h1 .hl { background: linear-gradient(transparent 62%, #ffe08a 62%); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.trust { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: var(--muted); }
.trust b { color: var(--ink); }

/* Search */
.search { position: relative; max-width: 560px; margin-top: 8px; }
.search input { width: 100%; font: inherit; font-size: 16px; padding: 15px 18px 15px 48px; border-radius: 12px; border: 1px solid #cfd6e4; background: #fff; box-shadow: var(--shadow); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: 6px; z-index: 20; display: none; }
.search-results.open { display: block; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.search-results a small { display: block; color: var(--muted); font-weight: 500; }
.search-results a:hover, .search-results a.active { background: var(--bg-soft); }

/* Countdown card */
.countdown-card { background: var(--ink); color: #fff; border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.countdown-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,183,3,.18); }
.countdown-card h2 { font-size: 1.1rem; font-weight: 700; color: #c9d4ee; margin-bottom: 4px; }
.countdown-card .big { font-size: 1.5rem; font-weight: 800; margin-bottom: 18px; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.cd div { background: rgba(255,255,255,.08); border-radius: 12px; padding: 12px 6px; text-align: center; }
.cd b { display: block; font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd span { font-size: 12px; color: #aab6d3; text-transform: uppercase; letter-spacing: .06em; }
.next-steps { list-style: none; padding: 0; margin: 0 0 18px; font-size: 15px; }
.next-steps li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.next-steps time { color: var(--accent); font-weight: 700; min-width: 92px; }
.note { font-size: 12.5px; color: #93a0c0; margin: 0; }

/* ---------- Secțiuni ---------- */
.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-warm { background: var(--bg-warm); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head p { color: var(--ink-2); margin: 0; max-width: 40em; }
.section-head a { font-weight: 700; white-space: nowrap; }

/* Quick links */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -8px; }
.q { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.q:hover { transform: translateY(-2px); border-color: #c4cfe6; color: var(--ink); }
.q .ico { flex: none; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; background: var(--brand-soft); }
.q b { display: block; font-size: 16px; }
.q small { color: var(--muted); font-size: 14px; line-height: 1.4; display: block; }

/* Materii */
.subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.subj { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.subj:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); }
.subj .tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); }
.subj .tag.ob { background: var(--brand-soft); color: var(--brand-ink); }
.subj b { font-size: 1.05rem; }
.subj small { color: var(--muted); font-size: 14px; }

/* Cards generice */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.card .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* Tool banner (calculator) */
.tool-banner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: linear-gradient(120deg, var(--brand) 0%, #3b5bdb 100%); color: #fff; border-radius: 20px; padding: 32px 36px; }
.tool-banner h2 { color: #fff; margin-bottom: 6px; }
.tool-banner p { color: #dbe5ff; margin: 0; }

/* ---------- Afiliere: produse ---------- */
.disclosure { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 24px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.disclosure > span[aria-hidden] { display: none; }
.disclosure b { color: var(--muted); font-weight: 600; }
.aff-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--muted); margin: 16px 0 0; max-width: 720px; }
.book-buy + .aff-note { margin-top: 18px; padding-top: 14px; border-top: 1px dashed #ecd9a6; }
.aff-note b { color: var(--ink-2); font-weight: 600; }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; position: relative; }
.product .badge { position: absolute; top: 14px; left: 14px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; z-index: 1; }
.cover { aspect-ratio: 3 / 3.4; border-radius: 10px; margin-bottom: 14px; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; color: #fff; font-weight: 800; font-size: 1.05rem; line-height: 1.2; position: relative; overflow: hidden; }
.cover small { font-weight: 600; font-size: 12px; opacity: .8; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
.cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: rgba(0,0,0,.18); }
.c1 { background: linear-gradient(150deg, #1d4ed8, #0f1b33); }
.c2 { background: linear-gradient(150deg, #e11d48, #7f1d1d); }
.c3 { background: linear-gradient(150deg, #059669, #064e3b); }
.c4 { background: linear-gradient(150deg, #7c3aed, #3b0764); }
.c5 { background: linear-gradient(150deg, #ea580c, #7c2d12); }
.c6 { background: linear-gradient(150deg, #0891b2, #164e63); }
.product h3 { font-size: 1.02rem; margin-bottom: 6px; }
.product .why { font-size: 14px; color: var(--ink-2); margin-bottom: 12px; flex: 1; }
.product .pros { list-style: none; padding: 0; margin: 0 0 14px; font-size: 14px; }
.product .pros li { padding-left: 22px; position: relative; margin-bottom: 4px; }
.product .pros li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.price { font-weight: 800; font-size: 1.1rem; }
.price small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.stores { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* Inline recomandare (în corpul articolelor) */
.reco { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; background: var(--bg-warm); border: 1px solid #f3dfa6; border-radius: var(--radius); padding: 14px 16px; margin: 26px 0; }
.reco .cover { aspect-ratio: 3 / 4; margin: 0; padding: 8px; font-size: 11px; border-radius: 6px; }
.reco .cover::before { width: 5px; }
.reco b { display: block; }
.reco p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.reco .lbl { font-size: 11.5px; font-weight: 800; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Banchet ---------- */
.banchet { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.banchet-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { border-radius: var(--radius); padding: 18px; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; text-decoration: none; font-weight: 800; }
.tile small { font-weight: 600; opacity: .85; }
.tile:hover { color: #fff; filter: brightness(1.08); }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--ink); color: #fff; border-radius: 22px; padding: 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.newsletter h2 { color: #fff; }
.newsletter p { color: #c3cde6; }
.nl-form { display: flex; gap: 10px; flex-wrap: wrap; }
.nl-form input { flex: 1 1 220px; font: inherit; padding: 13px 16px; border-radius: 11px; border: 0; }
.nl-form small { flex-basis: 100%; color: #93a0c0; font-size: 12.5px; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); }

/* ---------- Pagină de conținut ---------- */
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 34px 0 30px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs span { margin: 0 6px; }
.page-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--muted); margin-top: 10px; }
.page-meta b { color: var(--ink-2); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding: 40px 20px 64px; }
.prose { max-width: 740px; min-width: 0; }
.layout > * { min-width: 0; }
.prose h2 { margin-top: 1.8em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.callout { border-radius: 12px; padding: 14px 18px; margin: 22px 0; font-size: 15.5px; border-left: 4px solid; }
.callout.info { background: var(--brand-soft); border-color: var(--brand); }
.callout.warn { background: var(--warn-soft); border-color: var(--warn); }
.callout.ok { background: var(--ok-soft); border-color: var(--ok); }
.callout p:last-child { margin: 0; }

table.t { width: 100%; border-collapse: collapse; font-size: 15px; margin: 18px 0 24px; }
.t th, .t td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t th { background: var(--bg-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.t tr:hover td { background: #fafbfe; }
.table-scroll { overflow-x: auto; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); white-space: nowrap; }
.pill.est { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }

.downloads { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.downloads a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.downloads a:hover { border-color: var(--brand); background: var(--brand-soft); }
.downloads small { color: var(--muted); font-weight: 500; }

/* Sidebar */
.side { display: flex; flex-direction: column; gap: 20px; }
.sticky { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 20px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.toc b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.1em; font-size: 15px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); }
.side-box { border-radius: var(--radius); padding: 20px; background: var(--bg-warm); border: 1px solid #f3dfa6; }
.side-box h3 { font-size: 1rem; }
.side-box p { font-size: 14px; color: var(--ink-2); }

/* Progress checklist */
.check { list-style: none; padding: 0; }
.check li { margin-bottom: 8px; }
.check label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--ok); flex: none; }
.check input:checked + span { color: var(--muted); text-decoration: line-through; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0 16px; }
.progress i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .3s; }

/* Calculator */
.calc { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.calc-row { display: grid; grid-template-columns: 1fr 140px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.calc-row label b { display: block; }
.calc-row label small { color: var(--muted); font-size: 13.5px; }
.calc input[type="number"] { width: 100%; font: inherit; font-size: 1.15rem; font-weight: 700; padding: 10px 12px; border: 1px solid #cfd6e4; border-radius: 10px; text-align: center; }
.calc input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.calc input.bad { border-color: #dc2626; background: #fef2f2; }
.result { margin-top: 22px; border-radius: 16px; padding: 22px; text-align: center; background: var(--bg-soft); }
.result .avg { font-size: 3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.result .verdict { font-weight: 700; margin-top: 8px; }
.result.pass { background: var(--ok-soft); } .result.pass .verdict { color: var(--ok); }
.result.fail { background: #fef2f2; } .result.fail .verdict { color: #b91c1c; }
.result small { display: block; color: var(--muted); margin-top: 6px; font-size: 13.5px; }

/* ---------- Footer ---------- */
.footer { background: #0b1427; color: #aeb9d3; font-size: 15px; padding: 56px 0 28px; margin-top: 0; }
.footer a { color: #dbe3f5; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer-disclaimer { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-disclaimer h4 { margin-bottom: 14px; }
.footer-disclaimer dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 28px; margin: 0; }
.footer-disclaimer dt { color: #dbe3f5; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.footer-disclaimer dd { margin: 0; font-size: 12.5px; line-height: 1.6; color: #8592ad; }
@media (max-width: 1020px) { .footer-disclaimer dl { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-disclaimer dl { grid-template-columns: 1fr; gap: 14px; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 20px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .quick { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sticky { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
  .menu-btn { display: block; }
  .header-cta { display: none; }
  .hero-grid, .banchet, .newsletter, .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .tool-banner { grid-template-columns: 1fr; padding: 26px; }
  .hero { padding-top: 36px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .layout { padding: 28px 16px 48px; }
  .quick, .products { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cd b { font-size: 1.45rem; }
  .countdown-card, .newsletter { padding: 22px; }
  .reco { grid-template-columns: 64px 1fr; }
  .reco .btn { grid-column: 1 / -1; }
  .calc { padding: 18px; }
  .calc-row { grid-template-columns: 1fr 100px; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .wrap { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ==========================================================================
   WordPress: conținut din editor (articole vechi 2008–2022), arhive, paginare
   ========================================================================== */
.prose img { height: auto; border-radius: 10px; }
.prose figure { margin: 22px 0; }
.prose figcaption, .prose .wp-caption-text { font-size: 14px; color: var(--muted); margin-top: 6px; }
.prose .wp-caption { max-width: 100%; }
.alignleft { float: left; margin: 6px 22px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 22px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose::after { content: ""; display: table; clear: both; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 18px 0 24px; display: block; overflow-x: auto; }
.prose table td, .prose table th { padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.prose blockquote { margin: 22px 0; padding: 12px 18px; border-left: 4px solid var(--brand); background: var(--bg-soft); border-radius: 0 10px 10px 0; }
.prose iframe, .prose embed, .prose video { max-width: 100%; }
.prose a { word-break: break-word; }
.prose pre { overflow-x: auto; background: var(--bg-soft); padding: 14px; border-radius: 10px; font-size: 14px; }
/* Resturi Divi/shortcodes vechi în conținut: le neutralizăm vizual */
.prose [class^="et_pb_"], .prose [class*=" et_pb_"] { max-width: 100% !important; width: auto !important; padding: 0 !important; margin: 0 0 1em !important; background: none !important; }

.page-head .search { margin-top: 18px; }
.page-head .lead { margin-bottom: 0; }

.post-card h3 { font-size: 1.05rem; }
.post-card p { font-size: 15px; color: var(--ink-2); margin: 0; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; justify-content: center; }
.pagination a, .pagination span { display: inline-flex; min-width: 42px; height: 42px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 700; color: var(--ink-2); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }

/* Context panel categorii (din plugin) */
.bac-context { margin-bottom: 28px; }
.bac-context .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bac-context .links a { padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 14px; }
.bac-context .links a:hover { border-color: var(--brand); }

.lbl { display: inline-block; font-size: 11.5px; font-weight: 800; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.side-box .lbl { margin-bottom: 4px; }
.years { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.year { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.year h2 { font-size: 1.5rem; margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.year p { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.year ul { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.year li { padding: 6px 0; border-top: 1px solid var(--line); }
.year li a { text-decoration: none; font-weight: 600; }
.year.current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.jump a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.jump a:hover { border-color: var(--brand); color: var(--brand); }
.subject-groups { display: grid; gap: 28px; }
.subject-groups h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.calc-toggle { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: 15px; cursor: pointer; }
.calc-toggle input { width: 18px; height: 18px; }
@media (max-width: 860px) { .alignleft, .alignright { float: none; margin: 16px 0; } }
.cover-img { padding: 0; background: var(--bg-soft); align-items: center; justify-content: center; }
.cover-img::before { display: none; }
.cover-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.reco .cover-img img { border-radius: 6px; }
.products .price-row { margin-top: auto; }

/* ===== Cărți (librarie.net) — v2.1 ===== */
.book-zone { margin: 8px 0 12px; }
.book-zone > h2 { margin-top: 28px; }
.book-h3 { margin: 30px 0 12px; font-size: 1.12rem; }
.book-hero { display: grid; grid-template-columns: 200px 1fr; gap: 26px; background: var(--bg-warm); border: 1px solid #f3dfa6; border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.book-hero-cover { display: block; background: #fff; border-radius: 12px; padding: 10px; border: 1px solid var(--line); align-self: start; }
.book-hero-cover img, .book-cover img, .book-side-cover img, .book-thumb img, .bc-cover img { display: block; width: 100%; height: auto; object-fit: contain; aspect-ratio: 1; }
.book-kicker { display: inline-block; background: var(--accent); color: var(--ink); font-weight: 800; font-size: 13px; padding: 4px 11px; border-radius: 999px; margin-bottom: 10px; }
.book-hero h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 6px; }
.book-hero h3 a { color: var(--ink); text-decoration: none; }
.book-hero h3 a:hover { color: var(--brand); }
.book-hero p { margin: 0 0 10px; }
.book-hero .pros { list-style: none; padding: 0; margin: 0 0 14px; font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.book-hero .pros li { padding-left: 22px; position: relative; }
.book-hero .pros li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.book-meta { font-size: 13.5px; color: var(--muted); margin: 0 0 8px; }
.book-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.book-price { font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.book-price small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.book-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.book-all { margin: 14px 0 0; font-weight: 700; }
.book-cards .book-cover { background: #fff; border: 1px solid var(--line); padding: 10px; display: block; aspect-ratio: auto; }
.book-cards .book-cover::before { display: none; }
.book-cards .product h3 { font-size: .98rem; line-height: 1.35; }
.book-compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.book-compare th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.book-compare td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bc-book { display: flex; gap: 12px; align-items: center; min-width: 220px; }
.bc-cover { display: block; flex: none; width: 58px; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: #fff; }
.bc-book b { display: block; line-height: 1.3; }
.bc-book small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.bc-badge { display: inline-block; font-style: normal; font-size: 11px; font-weight: 800; background: var(--accent); color: var(--ink); border-radius: 999px; padding: 2px 8px; margin-bottom: 4px; }
.bc-price { font-weight: 800; white-space: nowrap; }
.bc-cta { text-align: right; white-space: nowrap; }
.bc-cta .btn { white-space: nowrap; }
.book-inline { grid-template-columns: 84px 1fr auto; }
.book-thumb { display: block; background: #fff; border-radius: 6px; padding: 4px; border: 1px solid #f3dfa6; }
.book-side { text-align: center; }
.book-side-cover { display: block; width: 130px; margin: 6px auto 10px; }
.book-side h3 { font-size: 1rem; line-height: 1.35; }
.book-side .book-price { margin: 4px 0 10px; }
.subj-books { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.book-sticky { display: none; }
@media (max-width: 860px) {
  .book-hero { grid-template-columns: 110px 1fr; gap: 16px; padding: 16px; }
  .book-hero h3 { font-size: 1.08rem; }
  .book-hero .btn { width: 100%; }
  .book-compare thead { display: none; }
  .book-compare, .book-compare tbody, .book-compare tr, .book-compare td { display: block; width: 100%; }
  .book-compare tr { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; background: #fff; }
  .book-compare td, .book-compare th { border: 0 !important; padding: 4px 0 !important; background: none !important; }
  .table-wrap:has(.book-compare) { border: 0; overflow: visible; }
  .book-compare td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
  .book-compare td.bc-book { display: flex; min-width: 0; padding-bottom: 8px; }
  .book-compare td.bc-price { display: inline-block; width: auto; }
  .bc-cta { text-align: left; padding-top: 8px !important; }
  .bc-cta .btn { width: 100%; }
  .book-sticky { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 60; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; box-shadow: var(--shadow-lg); transform: translateY(140%); transition: transform .25s; }
  .book-sticky.is-on { transform: none; }
  .book-sticky img { width: 40px; height: 40px; object-fit: contain; flex: none; }
  .book-sticky span { flex: 1; min-width: 0; font-size: 13px; line-height: 1.25; }
  .book-sticky span small { display: block; color: var(--muted); font-size: 11.5px; }
  .book-sticky span b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 560px) {
  .book-hero { grid-template-columns: 1fr; }
  .book-hero-cover { width: 160px; margin: 0 auto; }
  .book-inline { grid-template-columns: 64px 1fr; }
  .book-cards .book-cover img { max-width: 170px; margin: 0 auto; }
  .book-inline > .btn { grid-column: 1 / -1; }
}

/* Arhivă: navigare pe ani + datele principale */
.year-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.year-jump a { font-size: 14px; font-weight: 700; text-decoration: none; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); }
.year-jump a:hover { border-color: var(--brand); color: var(--brand); }
.year { scroll-margin-top: 90px; }
.year-dates { margin: 0 0 12px; padding: 10px 12px; background: var(--bg-soft); border-radius: 10px; font-size: 13.5px; }
.year-dates > div { padding: 4px 0; }
.year-dates > div + div { border-top: 1px solid var(--line); }
.year-dates dt { color: var(--muted); font-size: 12px; }
.year-dates dd { margin: 0; font-weight: 600; }

/* Carduri de document (înlocuiesc PDF Embedder) */
.doc-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; box-shadow: var(--shadow); transition: border-color .15s; }
.doc-card:hover { border-color: var(--brand); }
.doc-icon { flex: none; width: 40px; height: 48px; display: block; filter: drop-shadow(0 1px 1.5px rgba(15,27,51,.12)); transition: transform .15s; }
.doc-icon svg { display: block; width: 100%; height: 100%; }
.doc-card:hover .doc-icon { transform: translateY(-2px) rotate(-2deg); }
.doc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-kind { font-style: normal; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.doc-body b { font-size: 15px; line-height: 1.35; color: var(--ink); }
.doc-body small { font-size: 12.5px; color: var(--muted); }
.doc-actions { flex: none; display: flex; gap: 8px; }
.prose .doc-card a.btn, .entry-content .doc-card a.btn { text-decoration: none; }
@media (max-width: 560px) {
  .doc-card { flex-wrap: wrap; }
  .doc-actions { width: 100%; }
  .doc-actions .btn { flex: 1; text-align: center; }
}

/* Grilele nu mai depășesc ecranul când un card are cuvinte/URL-uri lungi */
.grid-2 > *, .grid-3 > *, .products > * { min-width: 0; }
.post-card h3, .post-card p { overflow-wrap: anywhere; }
.side-box .aff-note { font-size: 11.5px; margin-top: 10px; text-align: left; }

/* Set premium de cărți */
.book-set { margin: 22px 0 6px; padding: 20px; border-radius: 18px; background: linear-gradient(135deg, #0b1427 0%, #1e2b52 100%); color: #dbe3f5; }
.book-set-head h3 { color: #fff; font-size: 1.15rem; margin: 8px 0 6px; }
.book-set-head p { font-size: 14.5px; margin: 0 0 16px; color: #aeb9d3; }
.book-set-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.book-set-item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px; text-decoration: none; color: #fff; transition: background .15s; }
.book-set-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.book-set-item img { width: 100%; max-width: 120px; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.book-set-item b { font-size: 14px; line-height: 1.3; }
.book-set-item small { font-size: 12.5px; color: #aeb9d3; }
.book-set-item .btn { margin-top: auto; }
.book-set-total { margin: 14px 0 0; font-size: 14px; color: #aeb9d3; }
.book-set-total b { color: var(--accent); }
@media (max-width: 560px) { .book-set-items { grid-template-columns: 1fr; } .book-set-item { flex-direction: row; text-align: left; } .book-set-item img { max-width: 64px; } .book-set-item .btn { margin: 0 0 0 auto; } }

/* Coperți tăiate la proporția reală a cărții (fără margini albe) */
.book-hero-cover, .book-thumb, .bc-cover, .book-side-cover { background: none !important; border: 0 !important; padding: 0 !important; }
.book-hero-cover img, .book-cover img, .book-side-cover img, .book-thumb img, .bc-cover img, .book-set-item img, .book-sticky img {
  aspect-ratio: auto !important; height: auto; object-fit: contain; background: none; padding: 0;
  border-radius: 2px 5px 5px 2px; box-shadow: 0 1px 2px rgba(15,27,51,.12), 0 8px 18px -6px rgba(15,27,51,.28);
}
.book-hero-cover { align-self: center; }
.book-hero-cover img { width: 100%; max-width: 190px; margin: 0 auto; }
.book-cards .book-cover { display: flex !important; align-items: center; justify-content: center; height: 250px; padding: 18px !important; background: var(--bg-soft) !important; border: 0 !important; border-radius: 10px; aspect-ratio: auto !important; }
.book-cards .book-cover img { width: auto; max-width: 100%; max-height: 100%; margin: 0; }
.bc-cover { width: 50px; }
.book-thumb { width: 64px; }
.book-side-cover { width: 120px; }
.book-set-item img { width: auto; max-width: 100%; max-height: 170px; }
.book-sticky img { width: auto; height: 44px; max-width: 34px; box-shadow: 0 2px 6px rgba(15,27,51,.25); }
@media (max-width: 560px) {
  .book-hero-cover img { max-width: 150px; }
  .book-cards .book-cover { height: 220px; }
  .book-set-item img { max-height: 90px; max-width: 64px; }
}
