/* Saulės skaičiuoklė
   Kryptis: ramus, laikraštinis vartotojų gidas. Šiltas popierius, serif antraštės, viena saulės geltona,
   plonos linijos vietoj šešėlių. Šriftai sisteminiai: nieko nesiunčiame (greitis, privatumas). */
:root {
  --paper: #f7f4ec;
  --surface: #fffdf7;
  --ink: #1f1d18;
  --ink-2: #4b473e;
  --muted: #7b7568;
  --line: #e3ddcd;
  --line-2: #cfc7b3;
  --sun: #f2b01e;
  --sun-wash: #fbe7a8;
  --sun-ink: #8a5a00;
  --good: #2e6a3c;
  --good-wash: #e5eedd;
  --bad: #a33b23;
  --focus: #1d5fd1;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.62 var(--sans);
}
a { color: inherit; text-decoration-color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.015em; margin: 0 0 .9rem; }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); margin: 3rem 0 .9rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 .5rem; }
p { margin: 0 0 1rem; }
mark { background: linear-gradient(transparent 58%, var(--sun-wash) 58%, var(--sun-wash) 92%, transparent 92%); color: inherit; padding: 0 .05em; }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.lead { font-size: 1.16rem; color: var(--ink-2); max-width: 36rem; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* ---------- antraštė ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; white-space: nowrap; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.logo svg { flex: none; }
.site-nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { text-decoration: none; color: var(--ink-2); white-space: nowrap; font-size: .95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sun); }
@media (max-width: 880px) {
  .header-row { flex-wrap: wrap; gap: 0; padding-top: 10px; }
  .site-nav { width: 100%; margin: 6px 0 8px; gap: 18px; }
}

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: end; padding: 44px 0 28px; }
.hero-art { justify-self: end; width: 100%; max-width: 380px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 28px; gap: 8px; } .hero-art { display: none; } }
.dateline { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--sun-ink); font-weight: 600; margin-bottom: 14px; }

/* ---------- kas keičiasi (lentelė vietoj kortelių) ---------- */
.changes { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line-2); margin: 8px 0 40px; }
.changes-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 28px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.changes-row:last-child { border-bottom: 0; }
.changes-row .what { color: var(--ink-2); }
.changes-row .what b { color: var(--ink); font-weight: 600; }
.changes-row .old { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--bad); white-space: nowrap; font-variant-numeric: tabular-nums; }
.changes-row .new { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.changes-cap { display: flex; justify-content: space-between; gap: 16px; font-size: .84rem; color: var(--muted); padding: 10px 0 0; }
@media (max-width: 560px) {
  .changes-row { grid-template-columns: 1fr auto; }
  .changes-row .what { grid-column: 1 / -1; }
}

/* ---------- skaičiuoklė ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--surface); border: 1px solid var(--line-2); border-top: 4px solid var(--sun); margin: 12px 0 8px; }
.calc > * { padding: 28px; }
.calc > * + * { border-left: 1px solid var(--line); }
@media (max-width: 900px) { .calc { grid-template-columns: minmax(0, 1fr); } .calc > * + * { border-left: 0; border-top: 1px solid var(--line); } .calc > * { padding: 22px 18px; } }
.calc h2 { margin: 0 0 18px; font-size: 1.4rem; }
.step { display: inline-block; font-family: var(--serif); color: var(--sun-ink); margin-right: 6px; }
.field { margin-bottom: 20px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .86rem; margin-top: 5px; }
.input-unit { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; }
.input-unit:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.input-unit input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.05rem; padding: 10px 12px; color: var(--ink); outline: none; font-variant-numeric: tabular-nums; }
.input-unit span { padding: 10px 12px; color: var(--muted); white-space: nowrap; }
select { width: 100%; max-width: 100%; text-overflow: ellipsis; font: inherit; padding: 10px 12px; border-radius: 4px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
input[type="range"] { width: 100%; accent-color: var(--ink); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row output { min-width: 3.2em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: .2em; cursor: pointer; font-size: .86rem; }
details.more { margin: 4px 0 0; border-top: 1px dashed var(--line-2); padding-top: 14px; }
details.more summary { cursor: pointer; font-weight: 600; }
details.more[open] summary { margin-bottom: 10px; }

/* rezultatas: kaip sąskaita */
.verdict { margin-bottom: 22px; }
.verdict .k { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.verdict .b { font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 700; line-height: 1.15; margin: 4px 0 10px; }
.verdict p { margin: 0; color: var(--ink-2); }
.verdict.warn .b { color: var(--bad); }
.rows { border-top: 1px solid var(--ink); }
.row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.row .line { display: flex; align-items: baseline; gap: 8px; }
.row .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .dots { flex: 1; border-bottom: 2px dotted var(--line-2); transform: translateY(-4px); min-width: 16px; }
.row .c { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .x { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.row.best .n { font-weight: 700; }
.row.best .c { color: var(--good); }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; color: var(--good); background: var(--good-wash); padding: 1px 7px; border-radius: 3px; margin-left: 8px; vertical-align: 2px; }
.flows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 20px 0 4px; border: 1px solid var(--line); }
.flows div { padding: 10px 12px; font-size: .83rem; color: var(--muted); }
.flows div + div { border-left: 1px solid var(--line); }
.flows b { display: block; font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .flows { grid-template-columns: 1fr; } .flows div + div { border-left: 0; border-top: 1px solid var(--line); } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; border-radius: 4px; padding: 10px 16px; cursor: pointer; border: 1px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #000; }

/* ---------- turinys ---------- */
.prose { max-width: 40rem; }
.prose li { margin-bottom: .45rem; }
.table-wrap { overflow-x: auto; margin: 16px 0 22px; border-top: 2px solid var(--ink); }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; font-size: .86rem; color: var(--muted); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.up { color: var(--bad); font-weight: 600; }
.callout { border-left: 3px solid var(--sun); padding: 4px 0 4px 18px; margin: 24px 0; font-family: var(--serif); font-size: 1.12rem; }
.callout p:last-child { margin: 0; }
.linkcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border-top: 2px solid var(--ink); margin: 16px 0; }
.linkcards a { display: block; text-decoration: none; padding: 16px 18px 18px 0; border-bottom: 1px solid var(--line); }
.linkcards b { display: block; font-family: var(--serif); font-size: 1.15rem; margin-bottom: 4px; }
.linkcards a:hover b { text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 2px; }
.linkcards span { color: var(--ink-2); font-size: .93rem; }
details.duk { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.duk:first-of-type { border-top: 2px solid var(--ink); }
details.duk summary { cursor: pointer; font-weight: 600; font-size: 1.04rem; }
details.duk[open] summary { margin-bottom: 8px; }
details.duk p { color: var(--ink-2); }
.sources { font-size: .9rem; color: var(--ink-2); }
.sources li { margin-bottom: .3rem; word-break: break-word; }
.breadcrumbs { font-size: .86rem; color: var(--muted); margin: 22px 0 0; }
.breadcrumbs a { color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.4rem; margin-bottom: .8rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -.1rem; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--sun-ink); }
.figure { margin: 18px 0 24px; }
.figure figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
section { scroll-margin-top: 20px; }

/* ---------- poraštė ---------- */
.site-footer { margin-top: 72px; border-top: 2px solid var(--ink); padding: 28px 0 32px; color: var(--ink-2); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; margin-bottom: 18px; }
.footer-brand { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-decoration-color: var(--sun); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

@media print {
  .site-header, .site-footer, .actions, .site-nav { display: none; }
  body { background: #fff; }
}

/* sumos sudėtis */
h3.sub { font-size: 1.1rem; margin: 24px 0 8px; }
table.breakdown { font-size: .94rem; border-top: 1px solid var(--ink); }
table.breakdown th { font-weight: 400; color: var(--ink-2); font-size: .94rem; padding: 9px 12px 9px 0; }
table.breakdown th span { display: block; color: var(--muted); font-size: .8rem; }
table.breakdown td { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; padding: 9px 0; }
table.breakdown tr.sum th, table.breakdown tr.sum td { font-weight: 700; color: var(--ink); border-bottom: 0; border-top: 2px solid var(--ink); }
@media (max-width: 480px) { table.breakdown td { white-space: normal; } }
.rows-head { display: flex; justify-content: space-between; gap: 12px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.row .delta { display: block; color: var(--ink-2); }
.row .delta b { color: var(--bad); }
.row.current { background: linear-gradient(90deg, var(--sun-wash), transparent 70%); }
.tag.cur { color: var(--sun-ink); background: var(--sun-wash); }
@media (max-width: 480px) {
  .rows-head span + span { display: none; }
  .row .line { flex-wrap: wrap; }
  .row .dots { display: none; }
  .row .c { margin-left: auto; }
  .hero-jump { display: inline-flex; }
}
.hero-jump { display: none; margin-top: 4px; }
