/* Temă Rammer Tech: scala crimson (brand-50..950) și neutrali warm stone, preluate din rammertech.ro (globals.css).
   Layout: coloană unică lată; credit existent + setări sus, carduri de oferte, apoi tabel comparativ cu prima coloană fixă. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.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; }
:root {
  --bg: oklch(0.985 0.002 56.366);          /* stone-50 */
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.970 0.003 56.366);   /* stone-100 */
  --ink: oklch(0.147 0.004 49.25);          /* stone-950 */
  --muted: oklch(0.505 0.013 58.071);       /* stone-500, întunecat puțin pentru contrast AA pe text mic */
  --line: oklch(0.923 0.003 48.717);        /* stone-200 */
  --accent: oklch(0.352 0.128 25.723);      /* brand-700 (primary) */
  --accent-ink: oklch(0.985 0 0);
  --accent-soft: oklch(0.971 0.013 17.38);  /* brand-50 */
  --good: oklch(0.527 0.154 150.069);       /* green-700, citibil ca text */
  --bad: oklch(0.577 0.245 27.325);         /* destructive */
  --warn: oklch(0.555 0.163 48.998);        /* amber-700, citibil ca text */
  --c1: oklch(0.444 0.177 26.899); --c2: oklch(0.666 0.179 58.318); --c3: oklch(0.541 0.281 293.009);
  --c4: oklch(0.627 0.194 149.214); --c5: oklch(0.511 0.096 186.391); --c6: oklch(0.546 0.245 262.881);
  --font-display: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.147 0.004 49.25); --surface: oklch(0.216 0.006 56.043); --surface-2: oklch(0.268 0.007 34.298);
    --ink: oklch(0.985 0.002 56.366); --muted: oklch(0.702 0.01 56.366); --line: oklch(0.32 0.006 56);
    --accent: oklch(0.637 0.237 25.331); --accent-ink: oklch(0.985 0 0); --accent-soft: oklch(0.2 0.05 25);
    --good: oklch(0.723 0.191 149.214); --bad: oklch(0.704 0.191 22.216); --warn: oklch(0.769 0.188 70.08);
    --c1: oklch(0.704 0.191 22.216); --c2: oklch(0.769 0.188 70.08); --c3: oklch(0.702 0.183 293.541);
    --c4: oklch(0.792 0.209 151.711); --c5: oklch(0.777 0.152 181.912); --c6: oklch(0.707 0.165 254.624);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: oklch(0.147 0.004 49.25); --surface: oklch(0.216 0.006 56.043); --surface-2: oklch(0.268 0.007 34.298);
  --ink: oklch(0.985 0.002 56.366); --muted: oklch(0.702 0.01 56.366); --line: oklch(0.32 0.006 56);
  --accent: oklch(0.637 0.237 25.331); --accent-ink: oklch(0.985 0 0); --accent-soft: oklch(0.2 0.05 25);
  --good: oklch(0.723 0.191 149.214); --bad: oklch(0.704 0.191 22.216); --warn: oklch(0.769 0.188 70.08);
  --c1: oklch(0.704 0.191 22.216); --c2: oklch(0.769 0.188 70.08); --c3: oklch(0.702 0.183 293.541);
  --c4: oklch(0.792 0.209 151.711); --c5: oklch(0.777 0.152 181.912); --c6: oklch(0.707 0.165 254.624);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.45; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 16px 56px; display: flex; flex-direction: column; gap: 20px; }
h1, h2 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 2rem; line-height: 1.1; }
h2 { font-size: 1.15rem; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ctrls { display: flex; gap: 10px; flex-wrap: wrap; }
.theme { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 3px; gap: 2px; }
.theme input { position: absolute; opacity: 0; pointer-events: none; }
.theme label { font-size: 0.85rem; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.theme input:checked + label { background: var(--accent); color: var(--accent-ink); }
.theme input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.sub { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.fields { display: grid; gap: 14px; }
.f3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.f4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wide { grid-column: 1 / -1; }
.fields.ae, .offer .f2 { align-items: end; }
.inp input[type=date] { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; min-width: 0; }
.field[hidden] { display: none; }
.client { display: grid; gap: 8px; }
.client > h3 { margin: 0; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inp { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding-right: 10px; min-width: 0; }
.inp:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.inp input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; font-weight: 600; padding: 10px 10px; font-variant-numeric: tabular-nums; outline: none; width: 100%; }
.inp i { font-style: normal; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.inp.ro { padding: 10px; font-size: 1.05rem; font-weight: 600; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.hint-span { grid-column: span 2; margin: 0; align-self: end; }
.dur { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 0 12px; min-width: 0; }
.dur:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.dur label { display: flex; align-items: baseline; gap: 5px; cursor: text; }
.dur label + label { margin-left: 10px; }
.dur input { width: 2.2ch; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; font-weight: 600; padding: 10px 0; text-align: left; field-sizing: content; min-width: 1.2ch; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; appearance: textfield; }
.dur input::-webkit-outer-spin-button, .dur input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dur span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.inp select { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; font-weight: 600; padding: 10px 6px; outline: none; cursor: pointer; }
.inp select option { background: var(--surface); color: var(--ink); }
.scn-c[hidden] { display: none; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btn[hidden] { display: none; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.sm { padding: 6px 12px; font-size: 0.85rem; align-self: center; }
.btn.armed { color: var(--bad); border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.btn.ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); filter: none; }
.tarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: 0.85rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px; resize: vertical; }
.tarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.sec { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.sec h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 0; }
.sec p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.chartwrap { position: relative; touch-action: pan-y; }
.chartwrap svg { width: 100%; height: auto; display: block; }
.chartwrap .gl { stroke: var(--line); stroke-width: 1; }
.chartwrap .zl { stroke: var(--muted); stroke-width: 1.5; }
.chartwrap text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chartwrap .axt { font-size: 11px; }
.chartwrap .guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chartwrap .ln { fill: none; stroke-width: 2.25; stroke-linejoin: round; }
.chartwrap .hit { fill: transparent; cursor: crosshair; }
.chartwrap .mk { fill: var(--surface); stroke-width: 2.5; }
.tip { position: absolute; top: 6px; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 0.8rem; box-shadow: 0 4px 14px rgba(0,0,0,.18); min-width: 150px; z-index: 2; font-variant-numeric: tabular-nums; }
.tip[hidden] { display: none; }
.tip b { display: block; margin-bottom: 4px; }
.tip div { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.tip .sw { width: 14px; height: 0; border-top: 3px solid; flex: none; }
.tip .nm { flex: 1; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 22px; height: 0; border-top: 3px solid; }
.amhead { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.amhead .inp { min-width: 200px; }
tr.tot td, tr.tot th { font-weight: 700; border-top: 2px solid var(--line); }
td.hl { background: color-mix(in srgb, var(--good) 10%, var(--surface)); }
.ut { display: inline-flex; gap: 2px; flex: none; }
.ut button { font: inherit; font-size: 0.75rem; font-weight: 700; border: 0; background: transparent; color: var(--muted); padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.ut button.on { background: var(--accent); color: var(--accent-ink); }
.ut button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.big { font-size: 1.12rem; font-weight: 700; color: var(--ink); }
tr.detail th, tr.detail td { color: var(--muted); font-size: 0.86rem; }
td.worse, th.worse { background: color-mix(in srgb, var(--bad) 9%, var(--surface)); }
.badge[hidden] { display: none; }
.badge.neg { color: var(--bad); border-color: var(--bad); margin-top: 4px; white-space: nowrap; }
.offer.worse { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.offer header .badge { flex: none; margin-top: 0; }
.derived { margin: 0; font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.derived b { color: var(--ink); }

.global { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: end; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--bg); }
.seg label small { color: var(--muted); font-size: 0.82rem; }
.seg input:checked + label { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: inset 0 0 0 1px var(--accent); }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.link { font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.rate-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: -4px 0 14px; }
.rate-row .hint { margin: 0; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.btn { font: inherit; font-weight: 600; font-size: 0.9rem; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible, .rm:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.offer { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.offer header { display: flex; gap: 8px; align-items: center; }
.offer .name { flex: 1; min-width: 0; font: inherit; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; margin-left: -6px; }
.offer .name:hover { border-color: var(--line); }
.offer .name:focus { outline: none; border-color: var(--accent); }
.rm { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.rm:hover { color: var(--bad); border-color: var(--bad); }

.verdict { border-radius: 12px; padding: 14px 18px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.verdict.win { border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); }
.verdict.lose { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.verdict strong { font-family: var(--font-display); font-size: 1.15rem; }
.verdict span { color: var(--muted); font-size: 0.92rem; }
.notice { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { vertical-align: bottom; font-family: var(--font-display); font-size: 1rem; background: var(--surface); }
tbody th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.88rem; position: sticky; left: 0; background: var(--surface); min-width: 190px; }
thead th:first-child { position: sticky; left: 0; z-index: 1; text-align: left; }
tr.grp th { background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 14px; }
tr.grp th:not(:first-child) { background: var(--surface-2); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tr.sum td, tr.sum th { font-weight: 700; color: var(--ink); }
td.best, th.best { background: color-mix(in srgb, var(--good) 8%, var(--surface)); }
tbody th.rowkey { background: var(--surface); }
.badge { display: inline-block; font-family: var(--font-body); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--good); border: 1px solid var(--good); border-radius: 99px; padding: 1px 8px; margin-top: 4px; }
.tag-ex { font-family: var(--font-body); font-size: 0.7rem; color: var(--muted); font-weight: 600; display: block; margin-top: 2px; }
.good { color: var(--good); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
.sm { font-size: 0.8rem; color: var(--muted); font-weight: 400; display: block; }
.strong td, .strong th { font-weight: 700; font-size: 1.02rem; }
.err { color: var(--bad); font-size: 0.78rem; font-weight: 500; display: block; margin-top: 4px; }
.notes { font-size: 0.85rem; color: var(--muted); max-width: 90ch; margin: 0; }
.notes b { color: var(--ink); }

@media (max-width: 720px) {
  .f3 { grid-template-columns: 1fr; }
  .f4 { grid-template-columns: 1fr 1fr; }
  .hint-span { grid-column: 1 / -1; }
  .global { grid-template-columns: 1fr; }
  .seg { grid-template-columns: 1fr; }
  h1 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: no-preference) { .btn { transition: filter .15s; } }

.foot { margin-top: 8px; display: flex; flex-direction: column; gap: 14px; }
.foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; }
.foot a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.footcard { display: grid; grid-template-columns: 1fr; gap: 6px 24px; }
@media (min-width: 640px) { .footcard { grid-template-columns: 1fr 1fr; } }
.footcard h3 { grid-column: 1 / -1; margin: 0 0 2px; font-size: 0.95rem; }
.footcard dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 0.88rem; align-content: start; }
.footcard dt { color: var(--muted); }
.footcard dd { margin: 0; overflow-wrap: anywhere; }
.footnote { margin: 0; font-size: 0.8rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.footdisc { margin: 0; font-size: 0.78rem; color: var(--muted); max-width: 80ch; }
.stale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border: 1px solid var(--warn); border-radius: 8px; padding: 10px 12px; font-size: 0.85rem; background: color-mix(in srgb, var(--warn) 10%, transparent); }
.stale[hidden] { display: none; }

/* ---------- Pagina publică: antet, hero, secțiuni de conținut ---------- */
.skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top { align-items: center; gap: 12px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 10px; display: block; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; }
.brand small { font-size: 0.72rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.sitenav { display: flex; gap: 4px 18px; flex-wrap: wrap; order: 3; width: 100%; padding-top: 2px; border-top: 1px solid var(--line); }
.ctrls { margin-left: auto; align-items: center; }
.sitenav a { color: var(--muted); font-weight: 500; font-size: 0.9rem; text-decoration: none; padding: 4px 2px; border-radius: 4px; }
.sitenav a:hover { color: var(--accent); }
.sitenav a:focus-visible, .brand:focus-visible, .theme a:focus-visible, .doc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme a { font-size: 0.85rem; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 7px; text-decoration: none; }
.theme a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.theme a:not([aria-current]):hover { color: var(--accent); }
.main { display: flex; flex-direction: column; gap: 28px; }
.hero { display: flex; flex-direction: column; gap: 10px; padding: 12px 0 0; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); line-height: 1.08; font-weight: 750; max-width: 22ch; }
.hero .sub { font-size: 1.05rem; max-width: 64ch; margin-top: 4px; }
.trust { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.trust li { font-size: 0.82rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 99px; padding: 4px 12px; }
.calc { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 16px; }
.btn { text-decoration: none; display: inline-block; }
.doc { display: flex; flex-direction: column; gap: 12px; max-width: 78ch; scroll-margin-top: 16px; }
.doc h2 { font-size: 1.45rem; line-height: 1.2; }
.doc p { margin: 0; }
.doc a { color: var(--accent); font-weight: 600; }
.doc .hint { font-size: 0.85rem; }
.steps, .method { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 8px; }
.terms { margin: 0; display: grid; gap: 4px; }
.terms dt { font-weight: 700; margin-top: 8px; }
.terms dd { margin: 0; color: var(--muted); }
.faq { display: flex; flex-direction: column; gap: 8px; }
.qa { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 16px; }
.qa[open] { padding-bottom: 14px; }
.qa summary { cursor: pointer; list-style: none; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--accent); flex: none; }
.qa[open] summary::after { content: '\2212'; }
.qa summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.qa h3 { margin: 0; font-size: 1rem; font-weight: 650; }
.qa p { color: var(--muted); }
.sources { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }
.cta { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 12px; padding: 20px; }
.cta .btn { margin-top: 2px; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 80%, #000); border-color: color-mix(in srgb, var(--accent) 80%, #000); }
.extable { min-width: 560px; }
.extable td, .extable thead th:not(:first-child) { white-space: nowrap; }
.extable tr.sum th, .extable tr.sum td { font-weight: 700; color: var(--ink); background: var(--accent-soft); }
.extable caption { text-align: left; }
@media (max-width: 720px) {
  .doc h2 { font-size: 1.25rem; }
}
#exemplu { max-width: none; }
#exemplu > p { max-width: 78ch; }
.brand img { background: #fbfaf9; padding: 2px; }
@media (max-width: 720px) {
  .sitenav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
  .ctrls { gap: 8px; margin-left: 0; }
  .theme label, .theme a { padding: 6px 9px; font-size: 0.8rem; }
}

/* Reordonare oferte: butoane de mutare în antetul cardului; săgeți orizontale pe ecran lat, verticale pe îngust */
.mv { display: inline-flex; gap: 4px; flex: none; }
.mvb { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer; padding: 0; }
.mvb:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.mvb:disabled { opacity: 0.35; cursor: not-allowed; }
.mvb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mvb .av { display: none; }
@media (max-width: 720px) { .mvb .ah { display: none; } .mvb .av { display: inline; } }

/* Ghiduri: breadcrumb, valorile BNR (ROBOR / IRCC), lista de ghiduri de pe pagina principală, celule numerice */
.guide .hero h1 { max-width: 30ch; }
.crumbs { font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.live { display: flex; flex-direction: column; gap: 10px; max-width: 78ch; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 12px; padding: 18px 20px; }
.live h2 { font-size: 1.1rem; margin: 0; }
.livegrid { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.livegrid dt { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.livegrid dd { margin: 2px 0 0; display: flex; flex-direction: column; gap: 2px; }
.livegrid b { font-size: 1.9rem; line-height: 1.1; font-weight: 750; font-variant-numeric: tabular-nums; }
.livegrid small { font-size: 0.78rem; color: var(--muted); min-height: 1.1em; }
.live .hint a { color: var(--accent); font-weight: 600; }
.guides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.guides a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 400; }
.guides a:hover { border-color: var(--accent); }
.guides a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guides b { color: var(--accent); font-size: 1rem; }
.guides span { font-size: 0.88rem; color: var(--muted); }
.extable th.num, .extable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.related a { font-weight: 600; }

/* OTH-26: istoric ROBOR / IRCC (tabel + grafic SVG). Culorile vin din variabilele temei, deci urmează tema deschisă / închisă. */
.hist .hint:last-child { margin-top: 2px; }
.live .updated { margin: -8px 0 0; }
.live .updated:empty { display: none; }
.histfig { margin: 0; display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.histchart { display: block; width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.histchart text { font-family: var(--font-body); font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.histchart .hval { fill: var(--ink); font-weight: 600; stroke: var(--surface); stroke-width: 3px; paint-order: stroke; }
.histchart .hgrid { stroke: var(--line); stroke-width: 1; }
.hline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.hline.h3 { stroke: var(--accent); }
.hline.h6 { stroke: var(--c6); stroke-dasharray: 7 4; }
.hdot.h3 { fill: var(--accent); }
.hdot.h6 { fill: var(--c6); }
.histkey { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.88rem; }
.histkey li { display: inline-flex; align-items: center; gap: 6px; }
.histkey b { font-variant-numeric: tabular-nums; }
.hsw { flex: none; }
.histtable { max-width: 560px; max-height: 24rem; overflow: auto; }
.histtable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.histtab { width: 100%; min-width: 0; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.histtab th, .histtab td { padding: 7px 14px; vertical-align: middle; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.histtab thead th { position: sticky; top: 0; background: var(--surface); font-family: inherit; font-size: 0.82rem; color: var(--muted); z-index: 1; }
.histtab tbody tr:last-child th, .histtab tbody tr:last-child td { border-bottom: 0; }
.histtab .num { text-align: right; }
.histtab tbody th { position: static; min-width: 0; font-weight: 500; font-size: inherit; color: var(--ink); }
.hist[hidden] { display: none; }

/* OTH-25: calculatorul de rată și scadențar (ghidul "scadentar") */
.calcbox { max-width: none; }
.calcbox > p, .calcbox > .hint { max-width: 78ch; }
.calcbox .err:empty { display: none; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
fieldset.plain:disabled { opacity: 0.55; }
.calcbox h3 { margin: 0; font-size: 1.1rem; }
.calcres { max-width: none; }
.calcres h3 { font-size: 1.1rem; }
#schedOut { display: flex; flex-direction: column; gap: 14px; }
#schedOut[hidden] { display: none; }
#schedOut > p { margin: 0; }
.tablewrap.sched { max-height: 30rem; overflow: auto; }
.sched .extable thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.monthly { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 16px; }
.monthly[open] { padding-bottom: 14px; }
.monthly summary { cursor: pointer; padding: 14px 0; font-weight: 650; }
.monthly summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 480px) { .calcbox .f4 { grid-template-columns: 1fr; } }
.sched tbody th { min-width: 0; }
/* OTH-27: semnătura ghidului (autor, dată, metodologie) și linkul din subsol */
.byline { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.85rem; color: var(--muted); }
.byline a { color: var(--accent); font-weight: 600; }
.byline a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.footlinks { margin: 0; font-size: 0.88rem; }

/* ---------- OTH-28: calculator încorporabil (/embed/) și paginile de instrucțiuni ---------- */
html[data-embed] .embed-wrap { max-width: none; padding: 12px 12px 14px; gap: 14px; }
.embed-bar { display: flex; justify-content: flex-end; }
.embed-main { gap: 14px; }
.embed-foot { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.embed-credit { margin: 0; font-size: 0.85rem; }
.embed-credit a { color: var(--accent); font-weight: 600; text-decoration: none; }
.embed-credit a:hover { text-decoration: underline; }
.embed-credit a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.panel[hidden] { display: none; }
.embed-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.embed-preview iframe { display: block; width: 100%; }
.codebox { margin: 0; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font: 0.85rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.codebox:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.codebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.codebar .hint { margin: 0; }
@media (max-width: 480px) {
  html[data-embed] .embed-wrap { padding: 8px 8px 12px; }
  html[data-embed] .panel { padding: 14px; }
  html[data-embed] .f4, html[data-embed] .f2 { grid-template-columns: 1fr; }
}
.footlinks { display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* ---------- OTH-31: varianta compactă a embed-ului (/embed/compact/, <html data-embed="compact">) ---------- */
/* Ținta: sub ~1500 px înălțime la 800 px lățime, cu valorile implicite. Ce se strânge: butonul de resetare plutește în colțul primului panou, ajutorul
   lung stă în <details>, panourile „Ce vrei să obții” și „Costuri comune” au antetul și valorile pe același rând, iar cardurile de ofertă au câmpurile pe două coloane. */
html[data-embed="compact"] [hidden] { display: none; }
html[data-embed="compact"] .embed-wrap { position: relative; gap: 12px; }
html[data-embed="compact"] .embed-bar { position: absolute; top: 20px; right: 28px; z-index: 2; }
html[data-embed="compact"] .calc, html[data-embed="compact"] .embed-main { gap: 10px; }
html[data-embed="compact"] .panel { padding: 10px 14px 12px; gap: 8px; }
html[data-embed="compact"] .fields { gap: 10px 12px; }
html[data-embed="compact"] .inp input, html[data-embed="compact"] .inp select { padding-top: 7px; padding-bottom: 7px; }
html[data-embed="compact"] .dur input { padding-top: 7px; padding-bottom: 7px; }
html[data-embed="compact"] .panel h2, html[data-embed="compact"] .bar h2 { font-size: 1.05rem; margin: 0; }
html[data-embed="compact"] .panel > .hint, html[data-embed="compact"] section[aria-labelledby="h-costs"] .hint, html[data-embed="compact"] #idxBox .hint, html[data-embed="compact"] .field > .hint:not(#exRemainingHint):not([data-role="termHint"]) { display: none; }
html[data-embed="compact"] .mv, html[data-embed="compact"] #addOffer:disabled { display: none; }
html[data-embed="compact"] section[aria-labelledby="h-goal"] { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); column-gap: 14px; row-gap: 10px; align-items: start; }
html[data-embed="compact"] section[aria-labelledby="h-goal"] > h2, html[data-embed="compact"] section[aria-labelledby="h-goal"] > .rate-row { grid-column: 1 / -1; }
html[data-embed="compact"] section[aria-labelledby="h-goal"] > .global { grid-column: 1; }
html[data-embed="compact"] section[aria-labelledby="h-goal"] > #idxBox { grid-column: 2; grid-template-columns: minmax(0, 1fr); gap: 10px; }
html[data-embed="compact"] .seg label { padding: 9px 12px; }
html[data-embed="compact"] section[aria-labelledby="h-costs"] { display: grid; grid-template-columns: 230px minmax(0, 1fr); column-gap: 16px; align-items: center; }
html[data-embed="compact"] section[aria-labelledby="h-costs"] > h2 { grid-column: 1; grid-row: 1; align-self: end; }
html[data-embed="compact"] section[aria-labelledby="h-costs"] > .derived { grid-column: 1; grid-row: 2; align-self: start; }
html[data-embed="compact"] section[aria-labelledby="h-costs"] > .fields { grid-column: 2; grid-row: 1 / span 2; }
html[data-embed="compact"] .offer { padding: 10px 14px 14px; gap: 10px; }
html[data-embed="compact"] .offer label.field > span > .hint, html[data-embed="compact"] .offer [data-role="var"] { display: none; }
html[data-embed="compact"] .global { display: block; }
html[data-embed="compact"] .verdict.win > span { display: none; }
html[data-embed="compact"] .embed-foot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
html[data-embed="compact"] .embed-foot .footdisc { flex-basis: 100%; }
.embed-more { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 0 12px; }
.embed-more summary { cursor: pointer; padding: 8px 0; font-size: 0.86rem; font-weight: 600; color: var(--accent); }
.embed-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.embed-more[open] { padding-bottom: 12px; }
.embed-more[open] summary { margin-bottom: 4px; }
.embed-more .hint { display: block; margin: 10px 0 0; }
.embed-more .derived { margin: 10px 0 0; }
.embed-foot .embed-full { margin: 0; }
.embed-full .btn { display: inline-block; text-decoration: none; }
.embed-full .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cresults { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.cres { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.cres.best { border-color: var(--good); border-top-color: inherit; }
.cres h3 { margin: 0; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cres h3 .badge { margin-top: 0; }
.cres dl { margin: 0; display: flex; flex-direction: column; }
.cres dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.cres dl > div:first-child { border-top: 0; }
.cres dt { color: var(--muted); font-size: 0.85rem; }
.cres dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.cres dl > .strong dd { font-weight: 700; font-size: 1.05rem; }
.cres .err { margin: 0; color: var(--bad); font-size: 0.9rem; }
@media (max-width: 720px) {
  html[data-embed="compact"] .seg { grid-template-columns: 1fr 1fr; gap: 6px; }
  html[data-embed="compact"] .seg label { padding: 8px 10px; }
  html[data-embed="compact"] .seg label small { font-size: 0.78rem; }
}
@media (min-width: 661px) and (max-width: 720px) {
  html[data-embed="compact"] .f4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  html[data-embed="compact"] section[aria-labelledby="h-costs"] { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  html[data-embed="compact"] section[aria-labelledby="h-costs"] > h2 { grid-column: 1; grid-row: 1; align-self: center; }
  html[data-embed="compact"] section[aria-labelledby="h-costs"] > .derived { grid-column: 2; grid-row: 1; align-self: center; }
  html[data-embed="compact"] section[aria-labelledby="h-costs"] > .fields { grid-column: 1 / -1; grid-row: 2; }
  html[data-embed="compact"] section[aria-labelledby="h-goal"] { grid-template-columns: minmax(0, 1fr); }
  html[data-embed="compact"] section[aria-labelledby="h-goal"] > #idxBox, html[data-embed="compact"] section[aria-labelledby="h-goal"] > .global { grid-column: 1; }
  /* OTH-31: pe ecran îngust bannerul „câștigă oferta X” repetă cardul cu rezultatul principal, deci se ascunde (≈60-80 px economisiți).
     Verdictul „nicio ofertă nu economisește” (.verdict.lose) rămâne vizibil. */
  html[data-embed="compact"] .verdict.win { display: none; }
}
@media (max-width: 480px) {
  html[data-embed="compact"] section[aria-labelledby="h-costs"] { grid-template-columns: minmax(0, 1fr); }
  html[data-embed="compact"] section[aria-labelledby="h-costs"] > h2, html[data-embed="compact"] section[aria-labelledby="h-costs"] > .derived, html[data-embed="compact"] section[aria-labelledby="h-costs"] > .fields { grid-column: 1; grid-row: auto; }
  html[data-embed="compact"] .embed-bar { top: 14px; right: 22px; }
  html[data-embed="compact"] .seg label small { font-size: 0.74rem; }
  html[data-embed="compact"] .f4, html[data-embed="compact"] .f2 { grid-template-columns: 1fr 1fr; }
  html[data-embed="compact"] .cresults { grid-template-columns: 1fr; }
  html[data-embed="compact"] .cres dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  html[data-embed="compact"] .cres dl > div { flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border-top: 0; }
  html[data-embed="compact"] .cres dd { text-align: left; }
  html[data-embed="compact"] .cres dl > .ret { grid-column: 1 / -1; order: 5; }
  html[data-embed="compact"] .cres dl > .strong { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; }
  html[data-embed="compact"] .cres dl > .strong dd { text-align: right; }
  html[data-embed="compact"] .inp input, html[data-embed="compact"] .inp select { padding-top: 6px; padding-bottom: 6px; font-size: 1rem; }
  html[data-embed="compact"] .dur input { padding-top: 6px; padding-bottom: 6px; font-size: 1rem; }
  html[data-embed="compact"] .field { font-size: 0.8rem; gap: 4px; }
  html[data-embed="compact"] #exRemainingHint { display: none; }
  html[data-embed="compact"] .verdict { padding: 10px 14px; }
  html[data-embed="compact"] .verdict strong { font-size: 1rem; }
  html[data-embed="compact"] .embed-wrap { padding: 8px 8px 10px; }
  html[data-embed="compact"] .panel { padding: 10px 12px 12px; }
}
