/* dekretines.lt — shared design system. Calm editorial: warm paper, one teal accent,
   serif for headings and key figures, sans for everything you operate. Flat: hairlines, no shadows
   except floating layers. Every colour/size below comes from a token. */

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/fonts/figtree-latin-ext-wght-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("/fonts/source-serif-4-latin-ext-wght-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  /* surfaces */
  --paper: #f6f3ec;
  --surface: #fffdf8;
  --sunken: #f0ece2;
  --line: #e3ddd0;
  --line-strong: #cbc3b2;
  /* ink (all ≥4.5:1 on --surface) */
  --ink: #1d2327;
  --ink-2: #454d53;
  --ink-3: #5e676c;
  --ink-faint: #8a9195;           /* decoration only, never text */
  /* accent */
  --accent: #17564f;
  --accent-hover: #0f433e;
  --accent-soft: #e2eeeb;
  --on-accent: #ffffff;
  /* semantic */
  --win: #1f6b3a;   --win-soft: #e8f2ea;
  --loss: #a52a1f;  --loss-soft: #f8e9e6;
  --warn: #6b4d00;  --warn-soft: #faf0d6;
  /* timeline */
  --tl-dekret: #a23b5b;
  --tl-tevas: #2f6f8f;
  --tl-nep: #5a4a8a;
  --tl-vp: #7b68ac;
  --tl-vpalt: #a85a14;
  --tl-work: #e6e1d6;
  /* type */
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --fs-xs: .8125rem;   /* 13 */
  --fs-sm: .875rem;    /* 14 */
  --fs-base: 1rem;     /* 16 */
  --fs-md: 1.125rem;   /* 18 */
  --fs-lg: 1.375rem;   /* 22 */
  --fs-xl: 1.75rem;    /* 28 */
  --fs-2xl: 2.25rem;   /* 36 */
  /* space + shape */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.6; background: var(--paper); color: var(--ink);
  min-height: 100vh; display: flex; flex-direction: column; font-variant-numeric: lining-nums; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
.num, td.r, .kn-val, .gt-amount, .gt-sub-amt, .date-val, .pb-sub-amt, .mb-row-amt { font-variant-numeric: tabular-nums lining-nums; }

.page-wrap { max-width: 960px; margin: 0 auto; padding: 0 var(--sp-4); }
body > .page-wrap { flex: 1 0 auto; width: 100%; }

/* ── Masthead ── */
header { padding: var(--sp-6) 0 var(--sp-5); }
header .page-wrap { display: flex; flex-direction: column; gap: var(--sp-2); }
header .brand { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; color: var(--ink); text-decoration: none; }
header .brand:hover { color: var(--accent); }
header h1 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
header p { color: var(--ink-2); font-size: var(--fs-base); max-width: var(--measure); }
@media (min-width: 700px) { header h1 { font-size: var(--fs-2xl); } }

/* ── Surfaces ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5); margin-bottom: var(--sp-5); }
@media (max-width: 520px) { .card { padding: var(--sp-4); } }
.section-label { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; color: var(--ink); margin-bottom: var(--sp-4); }
.card-subhead { font-weight: 700; font-size: var(--fs-base); color: var(--ink); margin-bottom: var(--sp-2); }

/* ── Form ── */
.basics-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-4); margin-bottom: var(--sp-3); }
@media (max-width: 700px) { .basics-grid { grid-template-columns: 1fr 1fr; } .basics-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 440px) { .basics-grid { grid-template-columns: 1fr; } }

.parents-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
@media (max-width: 620px) { .parents-grid { grid-template-columns: 1fr; } .parent-col:first-child { border-right: none; border-bottom: 1px solid var(--line); } }
.parent-col { padding: var(--sp-5) var(--sp-4); }
@media (min-width: 621px) { .parent-col { padding: var(--sp-5); } }
.parent-col:first-child { border-right: 1px solid var(--line); }
.parent-heading { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; color: var(--ink); margin-bottom: var(--sp-4); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field:last-child { margin-bottom: 0; }
label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.hint { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.45; }
abbr.abbr-term { text-decoration: underline dotted var(--ink-faint); text-underline-offset: 3px; cursor: help; }
select, input[type="number"], input[type="date"] {
  padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: var(--fs-base); width: 100%; background: var(--surface); color: var(--ink);
  -webkit-appearance: none; appearance: none; min-height: 46px;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235e676c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
select:hover, input:hover, .dp-input:hover { border-color: var(--ink-faint); }
select:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type="number"]::-webkit-inner-spin-button { opacity: .4; }
input::placeholder { color: var(--ink-3); opacity: .8; }
input[type="checkbox"] { accent-color: var(--accent); }
select:disabled, input:disabled { background: var(--sunken); color: var(--ink-3); cursor: not-allowed; }

/* segmented toggles (Bruto/Neto, simple/detail) */
.pay-mode-row { display: flex; gap: 0; margin-bottom: 6px; width: max-content; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.pay-mode-btn { padding: 6px 14px; font: inherit; font-size: var(--fs-xs); font-weight: 600; border: none; border-right: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; color: var(--ink-2); min-height: 32px; }
.pay-mode-btn:last-child { border-right: none; }
.pay-mode-btn:hover { background: var(--sunken); }
.pay-mode-btn.active { background: var(--accent); color: var(--on-accent); }

/* ── Date picker ── */
.dp-wrap { position: relative; display: flex; align-items: center; gap: 6px; }
.dp-input { display: block; width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; font-size: var(--fs-base); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 46px; }
.dp-input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.dp-input.empty { color: var(--ink-3); }
.dp-clear { flex-shrink: 0; background: none; border: none; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 6px; line-height: 1; }
.dp-clear:hover { color: var(--loss); }
.dp-cal { display: none; position: fixed; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--sp-4); z-index: 600; box-shadow: 0 12px 32px rgba(29,35,39,.16); min-width: 280px; }
.dp-cal.open { display: block; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); gap: var(--sp-2); }
.dp-head-lbl { font-weight: 700; font-size: var(--fs-sm); flex: 1; text-align: center; }
.dp-nav { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 32px; height: 32px; cursor: pointer; font-size: 16px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dp-nav:hover { background: var(--sunken); color: var(--ink); }
.dp-dow { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); margin-bottom: 4px; }
.dp-dow span { padding: 3px 0; }
.dp-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.dp-cell { text-align: center; padding: 9px 2px; font-size: var(--fs-sm); border-radius: var(--radius-sm); cursor: pointer; line-height: 1; }
.dp-cell:hover:not(.dp-empty) { background: var(--sunken); }
.dp-cell.dp-today { color: var(--accent); font-weight: 700; }
.dp-cell.dp-sel { background: var(--accent) !important; color: var(--on-accent) !important; font-weight: 700; }
.dp-cell.dp-empty { cursor: default; }

/* ── Disclosures (replace the old ▶ glyph with a drawn chevron) ── */
details.advanced { margin-top: var(--sp-5); border-top: 1px solid var(--line); padding-top: var(--sp-4); }
details.special { margin-bottom: var(--sp-5); }
.special-inner { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-3); }
.special-inner .field { flex: 1 1 220px; margin-bottom: 0; }
summary { cursor: pointer; list-style: none; user-select: none; }
summary::-webkit-details-marker { display: none; }
details.advanced summary, details.special summary, details.disclosure > summary {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: var(--sp-2); min-height: 32px; }
details.advanced summary::before, details.special summary::before, details.disclosure > summary::before {
  content: ""; width: 8px; height: 8px; flex-shrink: 0; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(-45deg); transition: transform .18s var(--ease); margin: 0 4px 0 2px; }
details[open].advanced > summary::before, details[open].special > summary::before, details.disclosure[open] > summary::before { transform: rotate(45deg); }
details.advanced summary:hover, details.special summary:hover, details.disclosure > summary:hover { color: var(--ink); }
.advanced-inner { margin-top: var(--sp-4); }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 560px) { .adv-grid { grid-template-columns: 1fr; } }
.adv-col-label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); margin-bottom: var(--sp-3); }
.prior-toggle label { display: flex; align-items: flex-start; gap: var(--sp-2); font-weight: 500; cursor: pointer; font-size: var(--fs-sm); }
.prior-toggle input[type="checkbox"] { margin-top: 4px; flex-shrink: 0; width: auto; min-height: 0; }
.prior-fields { border-left: 1px solid var(--line-strong); padding-left: var(--sp-4); margin-top: var(--sp-3); }

/* work history */
.history-row { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3); background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: var(--sp-2); }
.history-line-0 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.history-line-1 { display: grid; grid-template-columns: 64px 1fr 28px; gap: 6px; align-items: center; }
.history-line-2 { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); flex-wrap: wrap; }
.history-row select, .history-row input[type="number"] { font-size: var(--fs-sm); padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); width: 100%; min-height: 38px; }
.history-row .rm-btn { background: none; border: none; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 4px; line-height: 1; justify-self: center; }
.history-row[data-type="leave"] .history-line-0 { grid-template-columns: 1fr; }
.history-row[data-type="leave"] .rm-btn { grid-column: 3; }
.history-row .rm-btn:hover { color: var(--loss); }
.history-bn { padding: 4px 6px; font: inherit; font-size: var(--fs-xs); font-weight: 600; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; color: var(--ink-2); width: 100%; min-height: 38px; }
.history-bn.neto { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.history-date-btn { padding: 4px 10px; font: inherit; font-size: var(--fs-sm); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; color: var(--ink); white-space: nowrap; min-height: 38px; }
.history-date-btn:hover { border-color: var(--ink-faint); background: var(--sunken); }
.history-date-btn.empty { color: var(--ink-3); }
.history-months-lbl { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.history-hint { margin: 6px 0 0 0; }
.history-footer { display: flex; align-items: center; gap: var(--sp-2); margin-top: 6px; flex-wrap: wrap; }
.history-add { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 6px 12px; font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; color: var(--ink-2); min-height: 34px; }
.history-add:hover { background: var(--sunken); }
.history-add:disabled { opacity: .45; cursor: default; }
.history-counter { font-size: var(--fs-xs); color: var(--ink-3); margin-left: auto; }
.history-counter.over { color: var(--loss); font-weight: 700; }
.history-gap { font-size: var(--fs-xs); color: var(--loss); margin: 0 0 var(--sp-2) 0; }
.history-window { font-size: var(--fs-xs); color: var(--ink-3); margin: 2px 0 0 0; display: block; }
.sal-mode-toggle { display: flex; margin-bottom: var(--sp-4); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.sal-mode-btn { flex: 1; padding: 8px 6px; font: inherit; font-size: var(--fs-sm); font-weight: 600; border: none; border-right: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; color: var(--ink-2); text-align: center; line-height: 1.3; min-height: 40px; }
.sal-mode-btn:last-child { border-right: none; }
.sal-mode-btn:hover { background: var(--sunken); }
.sal-mode-btn.active { background: var(--accent); color: var(--on-accent); }
.sal-history-block { margin-top: 4px; }
.sal-history-block .history-window { margin: 0 0 var(--sp-2) 0; }
.mh-cal { display: none; position: fixed; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--sp-3); z-index: 700; box-shadow: 0 12px 32px rgba(29,35,39,.16); width: 232px; }
.mh-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); }
.mh-year-lbl { font-weight: 700; font-size: var(--fs-sm); }
.mh-nav { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 30px; height: 30px; cursor: pointer; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mh-nav:hover { background: var(--sunken); }
.mh-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; }
.mh-cell { text-align: center; padding: 9px 2px; font-size: var(--fs-xs); border-radius: var(--radius-sm); cursor: pointer; }
.mh-cell:hover { background: var(--sunken); }
.mh-cell.mh-sel { background: var(--accent) !important; color: var(--on-accent) !important; font-weight: 700; }
.mh-cell.mh-dim { color: var(--ink-3); opacity: .55; }

/* primary action */
.btn-calc { margin-top: var(--sp-5); width: 100%; padding: 14px; background: var(--accent); color: var(--on-accent); border: none; border-radius: var(--radius-sm);
  font: inherit; font-size: var(--fs-base); font-weight: 700; cursor: pointer; min-height: 52px; transition: background .15s; }
.btn-calc:hover { background: var(--accent-hover); }
.btn-calc:disabled { opacity: .6; cursor: progress; }
@media (min-width: 700px) { .btn-calc { width: auto; min-width: 280px; padding-inline: var(--sp-6); } }

/* ── Notices ── */
.alert { border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); line-height: 1.6; margin-bottom: var(--sp-3); color: var(--ink-2); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--accent-soft); color: var(--ink-2); }
.alert strong { font-weight: 700; color: var(--ink); }
.alert-warn strong { color: var(--warn); }

/* sources: quiet inline reference, not a bordered chip */
.src { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-decoration: underline dotted var(--ink-faint); text-underline-offset: 3px; margin-left: 4px; white-space: nowrap; }
.src:hover { color: var(--accent); text-decoration-style: solid; }

/* ── Tooltips (see tip.js) ── */
.tip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 5px; vertical-align: -3px; border-radius: 50%;
  border: 1px solid var(--ink-faint); background: transparent; color: var(--ink-3); cursor: help; padding: 0; font: 700 11px/1 var(--font-body); }
.tip::before { content: "i"; font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 12px; }
.tip:hover, .tip[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tip-pop { position: fixed; z-index: 800; max-width: min(340px, calc(100vw - 24px)); padding: var(--sp-3) var(--sp-4); background: var(--ink); color: #f4f1ea; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); line-height: 1.55; box-shadow: 0 10px 28px rgba(29,35,39,.28); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s, transform .15s var(--ease); }
.tip-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.tip-pop a { color: #bfe3dc; }
.tip-pop strong { color: #fff; }
.tip-pop p + p { margin-top: var(--sp-2); }

/* ── Results ── */
.key-nums { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5); margin-bottom: var(--sp-5); display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-4) var(--sp-5); }
.kn-item { display: flex; flex-direction: column; gap: 2px; }
.kn-label { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; line-height: 1.35; }
.kn-val { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }

.tab-nav { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: var(--sp-4); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab-btn { padding: 12px 4px; margin-right: var(--sp-5); font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.sc-sum, .dates-card, .uc-card, .ins-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5); margin-bottom: var(--sp-5); }
@media (max-width: 520px) { .sc-sum, .dates-card, .uc-card, .ins-card { padding: var(--sp-4); } }
.sc-sum { overflow-x: auto; }
.sc-sum-title, .dates-card-title, .uc-title, .ins-card-title, .muni-title, .mb-card-title, .tl-title, .pb-label {
  font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; color: var(--ink); margin-bottom: var(--sp-3); }
.sc-sum-tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 340px; }
.sc-sum-tbl th { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); padding: 0 var(--sp-2) var(--sp-2) 0; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.sc-sum-tbl th.r { text-align: right; padding-right: 0; }
.sc-sum-tbl td { padding: 10px var(--sp-2) 10px 0; border-bottom: 1px solid var(--line); }
.sc-sum-tbl td.r { text-align: right; padding-right: 0; font-weight: 600; white-space: nowrap; }
.sc-sum-tbl tr:last-child td { border-bottom: none; font-weight: 700; background: var(--sunken); padding-left: var(--sp-2); }
.sc-sum-tbl tr:last-child td.r { padding-right: var(--sp-2); }
.sc-star { font-size: var(--fs-xs); font-weight: 700; background: var(--accent); color: var(--on-accent); padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

.dates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--sp-5) var(--sp-4); }
.date-badge { display: block; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }
.di-dekret, .di-tevas, .di-vp, .di-nep, .di-alt { background: none; color: var(--ink-3); padding: 0; }
.date-val { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.date-note { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }

.uc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 560px) { .uc-grid { grid-template-columns: 1fr; } }
.uc-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-4); }
.uc-name { font-size: var(--fs-base); font-weight: 700; margin-bottom: 6px; }
.uc-detail { font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: 4px; }
.uc-note { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 6px; }
.uc-total { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); font-size: var(--fs-base); font-weight: 700; }

.mb-card { background: var(--warn-soft); border-radius: var(--radius); padding: var(--sp-5); margin-bottom: var(--sp-5); color: var(--ink); }
.mb-card-title { color: var(--warn); }
.mb-parent-label { font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--sp-3); margin-top: var(--sp-4); }
.mb-parent-label:first-child { margin-top: 0; }
.mb-row { display: flex; gap: var(--sp-3); align-items: baseline; margin-bottom: 8px; font-size: var(--fs-sm); }
.mb-row-name { font-weight: 600; flex: 1; }
.mb-row-amt { white-space: nowrap; font-weight: 700; }
.mb-row-note { font-size: var(--fs-xs); color: var(--ink-2); }
.mb-steps { margin: var(--sp-3) 0 var(--sp-2); padding-left: 0; list-style: none; font-size: var(--fs-sm); color: var(--ink-2); counter-reset: step; }
.mb-steps li { padding: 4px 0 4px 24px; position: relative; }
.mb-steps li::before { content: counter(step); counter-increment: step; position: absolute; left: 0; font-weight: 700; color: var(--warn); }
.mb-footer { margin-top: var(--sp-3); font-size: var(--fs-xs); color: var(--ink-2); border-top: 1px solid rgba(107,77,0,.22); padding-top: var(--sp-3); }

/* scenarios */
.scenarios { display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.sc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sc-card.optimal { border: 2px solid var(--accent); }
.sc-header { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.sc-card.optimal .sc-header { background: var(--accent-soft); border-bottom-color: rgba(23,86,79,.22); }
.sc-rank { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); }
.sc-title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; line-height: 1.3; }
.optimal-badge { margin-left: auto; font-size: var(--fs-xs); font-weight: 700; background: var(--accent); color: var(--on-accent); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.sc-body { padding: 0 var(--sp-5) var(--sp-5); }
@media (max-width: 520px) { .sc-header { padding: var(--sp-3) var(--sp-4); } .sc-body { padding: 0 var(--sp-4) var(--sp-4); } }
.sc-note { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; padding: var(--sp-3) var(--sp-4); background: var(--sunken); border-radius: var(--radius-sm); }

/* timeline */
.tl-section { margin-top: var(--sp-5); }
.tl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tl-inner { min-width: 320px; }
@media (max-width: 640px) { .tl-marks span:nth-child(odd) { display: none; } }
.tl-row { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: 6px; }
.tl-name { width: 48px; font-size: var(--fs-xs); font-weight: 700; text-align: right; flex-shrink: 0; color: var(--ink-2); }
.tl-bar { display: flex; flex: 1; height: 34px; border-radius: var(--radius-sm); overflow: visible; position: relative; }
.tl-seg { display: flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; padding: 0 4px; cursor: default; flex-shrink: 0; }
.tl-seg:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.tl-seg:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.tl-axis { margin-top: 4px; }
.tl-marks { position: relative; flex: 1; height: 30px; }
.tl-marks span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--ink-3); text-align: center; line-height: 1.25; }
.birth-line { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); z-index: 20; pointer-events: none; }
.birth-label { position: absolute; top: -20px; left: 4px; font-size: 11px; font-weight: 700; color: var(--ink); white-space: nowrap; background: var(--surface); padding: 0 3px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px var(--sp-4); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-2); }
.leg { display: flex; align-items: center; gap: 6px; }
.leg-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.seg-dekret  { background: var(--tl-dekret); color: #fff; }
.seg-tevas   { background: var(--tl-tevas); color: #fff; }
.seg-nep     { background: var(--tl-nep); color: #fff; }
.seg-vp60    { background: var(--tl-vp); color: #fff; }
.seg-work    { background: var(--tl-work); color: var(--ink-2); }
.seg-lost    { background: repeating-linear-gradient(45deg,#f6dcd7 0,#f6dcd7 4px,#eebdb5 4px,#eebdb5 8px); color: var(--loss); }
.seg-prework { background: var(--sunken); color: var(--ink-3); }
.seg-vpalt   { background: var(--tl-vpalt); color: #fff; }

/* benefit table */
.parent-block { margin-top: var(--sp-5); }
.pb-label { font-size: var(--fs-base); font-family: var(--font-body); font-weight: 700; margin-bottom: var(--sp-2); color: var(--ink-2); }
.bt { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); table-layout: fixed; }
.bt colgroup col:nth-child(1) { width: 40%; }
.bt colgroup col:nth-child(2) { width: 12%; }
.bt colgroup col:nth-child(3) { width: 12%; }
.bt colgroup col:nth-child(4) { width: 18%; }
.bt colgroup col:nth-child(5) { width: 18%; }
.bt thead th { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-align: left; padding: 0 var(--sp-2) var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.bt thead th.r { text-align: right; padding-right: 0; }
.bt tbody tr { border-bottom: 1px solid var(--line); }
.bt tbody tr:last-child { border-bottom: none; }
.bt tbody td { padding: 10px var(--sp-2) 10px 0; vertical-align: top; }
.bt tbody td.r { text-align: right; padding-right: 0; font-weight: 600; white-space: nowrap; }
.td-name { font-weight: 600; color: var(--ink); }
.td-sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 4px; line-height: 1.5; }
.td-dim { color: var(--ink-2); white-space: nowrap; }
.td-lost { color: var(--loss); font-size: var(--fs-xs); }
.pb-sub { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--sp-3); margin-top: 6px; border-top: 1px solid var(--line-strong); font-size: var(--fs-sm); }
.pb-sub-lbl { color: var(--ink-2); font-weight: 600; }
.pb-sub-amt { font-weight: 700; font-size: var(--fs-md); }
@media (max-width: 600px) {
  .bt thead { display: none; }
  .bt tbody td { display: block; padding: 2px 0; }
  .bt tbody td::before { content: attr(data-label); font-size: var(--fs-xs); color: var(--ink-3); display: block; margin-bottom: 1px; }
  .bt tbody td.r { text-align: left; }
  .bt tbody tr { display: block; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
  .bt tbody tr:last-child { border-bottom: none; }
}

/* insurance */
.ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 560px) { .ins-grid { grid-template-columns: 1fr; } }
.ins-parent-label { font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--sp-3); }
.ins-row { display: flex; align-items: baseline; gap: var(--sp-2); margin-bottom: 6px; font-size: var(--fs-sm); }
.ins-icon { font-size: var(--fs-sm); flex-shrink: 0; width: 16px; }
.ins-name { flex: 1; }
.ins-detail { font-size: var(--fs-xs); color: var(--ink-3); margin-left: 24px; margin-bottom: 4px; }
.ins-summary { margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 600; }
.ins-ok   { background: var(--win-soft); color: var(--win); }
.ins-warn { background: var(--warn-soft); color: var(--warn); }
.ins-bad  { background: var(--loss-soft); color: var(--loss); }
.ins-override { background: var(--accent-soft); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); margin-top: var(--sp-2); color: var(--accent-hover); }

/* compare verdict: filled tint, no side stripe */
.cmp { margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--sunken); border-radius: var(--radius-sm); font-size: var(--fs-sm); line-height: 1.65; }
.cmp.win  { background: var(--win-soft); }
.cmp.loss { background: var(--loss-soft); }
.cmp.warn { background: var(--warn-soft); }
.cmp-title { font-weight: 700; margin-bottom: 4px; }
.cv-win  { color: var(--win); font-weight: 700; }
.cv-loss { color: var(--loss); font-weight: 700; }
.cmp-foot { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 4px; }

.grand-total { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line-strong); }
.gt-sub { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); margin-bottom: 6px; }
.gt-sub-lbl { font-size: var(--fs-sm); color: var(--ink-2); }
.gt-sub-amt { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.gt-divider { border: none; border-top: 1px solid var(--line); margin: var(--sp-2) 0; }
.gt-main { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.gt-label { font-size: var(--fs-sm); font-weight: 700; }
.gt-amount { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; }

/* municipality */
.muni-note { font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: var(--sp-3); line-height: 1.55; }
.muni-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 420px; }
.muni-table th { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-align: left; padding: 0 var(--sp-3) var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.muni-table th.r { text-align: right; }
.muni-table td { padding: 10px var(--sp-3) 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.muni-table td.r { text-align: right; font-weight: 600; }
.muni-table tbody tr:last-child td { border-bottom: none; }
.muni-unknown { color: var(--ink-3); font-weight: 400; }
.muni-total { font-weight: 700; }

.sodra-note { padding: var(--sp-3) var(--sp-4); background: var(--sunken); border-radius: var(--radius-sm); font-size: var(--fs-xs); color: var(--ink-2); margin: var(--sp-5) 0; }

/* secondary buttons */
.btn-print, .btn-share { padding: 9px 16px; border-radius: var(--radius-sm); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; min-height: 40px; }
.btn-print { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-2); }
.btn-print:hover { border-color: var(--ink-faint); color: var(--ink); }
.btn-share { background: var(--accent); border: 1px solid var(--accent); color: var(--on-accent); }
.btn-share:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.hidden { display: none; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--sp-6); padding: var(--sp-5) 0; font-size: var(--fs-xs); color: var(--ink-3); }
.site-footer .page-wrap { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); align-items: center; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-sep { color: var(--ink-faint); }

/* ── Cookie banner ── */
.cookie-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: 0 -8px 24px rgba(29,35,39,.08); }
.cookie-bar.open { display: block; }
.cookie-bar-inner { max-width: 960px; margin: 0 auto; padding: var(--sp-4); display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }
.cookie-bar-text { flex: 1 1 360px; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }
.cookie-bar-actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }
.cookie-btn { padding: 10px 18px; font: inherit; font-size: var(--fs-sm); font-weight: 700; border-radius: var(--radius-sm); cursor: pointer; min-height: 42px; }
.cookie-btn-accept { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.cookie-btn-accept:hover { background: var(--accent-hover); }
.cookie-btn-decline { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong); }
.cookie-btn-decline:hover { border-color: var(--ink-faint); color: var(--ink); }

/* ── Modal (privacy/terms) ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(29,35,39,.5); z-index: 1000; align-items: center; justify-content: center; padding: var(--sp-4); }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 80vh; overflow-y: auto; padding: var(--sp-6); position: relative; }
.modal-close { position: absolute; top: var(--sp-3); right: var(--sp-3); background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ink-3); line-height: 1; padding: 6px 10px; }
.modal-close:hover { color: var(--ink); }
.modal-h1 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; margin-bottom: var(--sp-5); }
.modal-box .modal-h2 { font-size: var(--fs-sm); font-weight: 700; margin: var(--sp-5) 0 6px; color: var(--ink); }
.modal-box p, .modal-box li { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.7; margin-bottom: 6px; }
.modal-box ul { padding-left: 18px; margin-bottom: var(--sp-2); }
.modal-box .modal-footer-note { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }

/* ── FAQ accordion (index + content pages) ── */
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: var(--sp-4) 0; font-size: var(--fs-base); font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); line-height: 1.4; }
.faq-list summary::after { content: ""; width: 9px; height: 9px; flex-shrink: 0; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .18s var(--ease); margin-right: 4px; }
.faq-list details[open] > summary::after { transform: rotate(-135deg); }
.faq-list summary:hover { color: var(--accent); }
.faq-list .faq-a { padding: 0 0 var(--sp-4); max-width: var(--measure); color: var(--ink-2); font-size: var(--fs-base); line-height: 1.65; }
.faq-list .faq-a p + p { margin-top: var(--sp-3); }

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

/* ── Print ── */
@media print {
  body { background: #fff; }
  header, .card, .btn-print, .btn-share, .site-footer, .tab-nav, .tip, .cookie-bar { display: none !important; }
  #rezultatai { display: block !important; }
  .tab-panel { display: block !important; }
  .page-wrap { max-width: 100%; padding: 0; }
  .sc-card { break-inside: avoid; }
  .alert { break-inside: avoid; }
  details.disclosure > :not(summary) { display: block !important; }
}

/* ── Results hierarchy ── */
.results-h { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; margin: var(--sp-6) 0 var(--sp-3); line-height: 1.25; }
.note-prose { max-width: var(--measure); font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.75; margin: 0 0 var(--sp-3) 0; }
ol.note-prose { margin-left: 20px; }
ol.note-prose li { margin-bottom: 6px; }
details.todo { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.todo-body { margin-top: var(--sp-3); }
.todo-body .card-subhead { margin-top: var(--sp-4); }

/* card-level disclosures */
details.ins-card, details.uc-card { padding-block: var(--sp-4); }
details.ins-card > summary, details.uc-card > summary { padding: 0; }
details.ins-card > summary .ins-card-title, details.uc-card > summary .uc-title { margin: 0; }
details.ins-card[open] > summary, details.uc-card[open] > summary { margin-bottom: var(--sp-4); }
details.disclosure > summary .ins-card-title, details.disclosure > summary .uc-title { font-size: var(--fs-md); }

/* scenario cards: collapsed ones are a single tappable row */
details.sc-card > summary.sc-header { cursor: pointer; border-bottom: none; }
details.sc-card[open] > summary.sc-header { border-bottom: 1px solid var(--line); }
details.sc-card > summary.sc-header::after { content: ""; margin-left: auto; width: 9px; height: 9px; flex-shrink: 0; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .18s var(--ease); }
details.sc-card[open] > summary.sc-header::after { transform: rotate(-135deg); }
details.sc-card > summary.sc-header:hover .sc-title { color: var(--accent); }

/* benefit table on phones: name + total on one line, the numbers as a quiet meta row */
@media (max-width: 600px) {
  .bt, .bt tbody, .bt colgroup { display: block; width: 100%; }
  .bt colgroup { display: none; }
  .bt tbody tr { display: grid; grid-template-columns: auto auto 1fr auto; column-gap: var(--sp-3); row-gap: 2px; align-items: baseline; padding: var(--sp-3) 0; }
  .bt tbody td { display: block; padding: 0; min-width: 0; }
  .bt tbody td::before { display: none; }
  .bt td:nth-child(1) { grid-column: 1 / 4; grid-row: 1; font-size: var(--fs-base); }
  .bt td:nth-child(5) { grid-column: 4; grid-row: 1; text-align: right; font-size: var(--fs-base); }
  .bt td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: var(--fs-xs); color: var(--ink-3); }
  .bt td:nth-child(3) { grid-column: 2; grid-row: 2; font-size: var(--fs-xs); color: var(--ink-3); }
  .bt td:nth-child(4) { grid-column: 3; grid-row: 2; text-align: left; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; }
  .bt td:nth-child(4)::after { content: "/mėn."; }
  .bt td:nth-child(2)::after { content: " ·"; }
  .bt td:nth-child(3)::after { content: " ·"; }
}

/* ── Refinements after first visual pass ── */
@media (max-width: 520px) {
  .key-nums { grid-template-columns: 1fr 1fr; padding: var(--sp-4); gap: var(--sp-4) var(--sp-3); }
  .kn-val { font-size: var(--fs-lg); }
  .sc-sum-tbl { min-width: 0; table-layout: fixed; }
  .sc-sum-tbl th, .sc-sum-tbl td { font-size: var(--fs-xs); white-space: normal; }
  .sc-sum-tbl th:first-child, .sc-sum-tbl td:first-child { width: 28%; }
  .sc-sum { overflow-x: visible; }
}
.card > details.advanced:only-child { margin-top: 0; border-top: none; padding-top: 0; }

/* ── Essentials-first form: three questions, everything else behind "Tikslinti" ── */
.ask-date { max-width: 340px; margin-bottom: var(--sp-5); }
.ask-date label { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; }
.ask-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
@media (max-width: 620px) { .ask-pair { grid-template-columns: 1fr; gap: var(--sp-5); } }
.ask-col .field { margin-bottom: 0; }
.ask-parent { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; margin-bottom: var(--sp-3); }
.ask-col .pay-mode-row { margin-bottom: var(--sp-2); }
.ask-col > .hint { display: block; margin: -6px 0 var(--sp-3) !important; }
.detail-note { font-size: var(--fs-sm); color: var(--ink-2); background: var(--sunken); border-radius: var(--radius-sm); padding: var(--sp-3); margin-top: var(--sp-3); }
.refine { margin-top: var(--sp-5); }
.refine > summary { align-items: baseline; flex-wrap: wrap; row-gap: 2px; }
.refine-sub { font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs); flex-basis: 100%; padding-left: 22px; }
.refine-body { display: flex; flex-direction: column; gap: var(--sp-5); margin-top: var(--sp-4); }
.refine-basics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 520px) { .refine-basics { grid-template-columns: 1fr; } }
.refine-h { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); margin-bottom: var(--sp-3); }
.refine details.special { margin-bottom: 0; }
.refine details.advanced { margin-top: 0; border-top: 1px solid var(--line); padding-top: var(--sp-4); }
.refine .special-inner .field { flex-basis: 240px; }
.btn-calc { margin-bottom: 0; }

/* ── Plain-language verdict at the top of results ── */
.verdict { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5); margin-bottom: var(--sp-5); }
.verdict-lead { font-size: var(--fs-base); color: var(--ink-2); max-width: var(--measure); margin-bottom: var(--sp-2); }
.verdict-lead strong { color: var(--ink); }
.verdict-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); color: var(--ink-2); font-size: var(--fs-base); }
.verdict-total .gt-amount { color: var(--ink); font-size: var(--fs-2xl); line-height: 1.1; }
.verdict-source { margin-top: var(--sp-1); font-size: var(--fs-xs); color: var(--ink-3); }
.verdict-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-4); }
.ask-col { display: flex; flex-direction: column; }
.ask-col > .hint { order: 9; margin: var(--sp-3) 0 0 !important; }
.ask-col .field > label { order: 1; }
.ask-col .field > .pay-mode-row { order: 2; margin: 0 0 var(--sp-2); }
.ask-col .field > input { order: 3; }
.ask-col .field > .hint { order: 4; }
.ask-col .field { display: flex; flex-direction: column; }

/* ── Calculator + live preview side by side ── */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--sp-5); align-items: start; margin-bottom: var(--sp-5); }
.calc-layout > .card { margin-bottom: 0; }
@media (max-width: 860px) { .calc-layout { grid-template-columns: 1fr; gap: var(--sp-4); } }
@media (min-width: 861px) { .preview { position: sticky; top: var(--sp-4); } }
.preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.preview-title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; }
.preview-tag { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); background: var(--sunken); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.preview-tag.is-live { background: var(--accent-soft); color: var(--accent); }
.pv-row { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.pv-row strong { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding-top: var(--sp-4); font-size: var(--fs-sm); font-weight: 600; }
.pv-total .gt-amount { font-size: var(--fs-xl); }
.preview-note { margin-top: var(--sp-3); font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; }

/* ── "How it works" strip + parent action lists ── */
.how, .todo-now { margin-bottom: var(--sp-6); }
.how-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; margin-bottom: var(--sp-4); }
.how-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: how; border-top: 2px solid var(--ink); }
.how-steps li { counter-increment: how; padding: var(--sp-4) var(--sp-4) 0 0; display: flex; flex-direction: column; gap: 4px; }
.how-steps li strong { font-size: var(--fs-base); line-height: 1.3; }
.how-when { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); }
.how-meta { font-size: var(--fs-sm); color: var(--ink-2); }
@media (max-width: 700px) { .how-steps { grid-template-columns: 1fr; border-top: none; } .how-steps li { padding: var(--sp-3) 0; border-top: 1px solid var(--line); } }
.todo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
@media (max-width: 700px) { .todo-cols { grid-template-columns: 1fr; } }
.todo-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5); }
.todo-who { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; margin-bottom: var(--sp-3); }
.todo-list { margin: 0 0 0 1.2rem; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; }
.todo-list li { margin-bottom: var(--sp-3); padding-left: 4px; }
.todo-list li::marker { color: var(--accent); font-weight: 700; }
.todo-list strong { color: var(--ink); }
.todo-link { white-space: nowrap; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.todo-link:hover { color: var(--accent-hover); }

/* ── Guide cards (homepage) ── */
.guides { margin-bottom: var(--sp-6); }
.guides-group { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin: var(--sp-5) 0 var(--sp-3); }
.guides-group:first-of-type { margin-top: 0; }
.guides-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.guides-grid .is-featured { grid-column: span 2; }
.guide-card { display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 44px; padding: var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-2); text-decoration: none; transition: border-color .15s, background .15s; }
.guide-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.guide-t { font-family: var(--font-display); font-size: var(--fs-base); font-weight: 600; color: var(--accent); line-height: 1.3; }
.guide-t::after { content: " →"; }
.guide-d { font-size: var(--fs-sm); line-height: 1.45; }
.is-featured .guide-card { border-color: var(--accent); border-width: 2px; }
@media (max-width: 900px) { .guides-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .guides-grid { grid-template-columns: 1fr; } .guides-grid .is-featured { grid-column: auto; } .guide-card { padding: var(--sp-3) var(--sp-4); } }
.site-footer .footer-guides { display: block; margin-bottom: var(--sp-3); line-height: 1.9; }
.guides-grid > li { margin: 0; padding: 0; }
.guides--hub .guides-grid { max-width: none; margin: 0; }
.guides--hub .guides-group { font-family: inherit; }
.guides-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .guides-grid--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .guides-grid--4 { grid-template-columns: 1fr; } }
.guides-all { margin-top: var(--sp-4); font-weight: 600; }
.guides-all a { color: var(--accent); text-underline-offset: 2px; }

/* ── Site nav (all pages) ── */
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-5); flex-wrap: wrap; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-1) var(--sp-5); }
.site-nav ul a { display: inline-block; padding: 10px 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav ul a:hover { color: var(--accent); }
.site-nav ul a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
header .site-nav + h1 { margin-top: var(--sp-4); }
@media (max-width: 560px) { .site-nav ul { width: 100%; overflow-x: auto; gap: var(--sp-4); } }
.caps-link { margin: 0 0 var(--sp-6); font-weight: 600; }
.caps-link a { color: var(--accent); text-underline-offset: 2px; }
.muni-plus { display: block; font-weight: 500; font-size: var(--fs-xs); color: var(--win); }
.muni-none { color: var(--ink-3); font-style: italic; font-weight: 400 !important; }
.muni-row-note { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.faq-more { font-size: var(--fs-sm); color: var(--ink-2); margin: calc(-1 * var(--sp-2)) 0 var(--sp-3); }
.faq-more a { color: var(--accent); }
.next-steps { margin: var(--sp-5) 0; }
.footer-guides-h { font-weight: 700; color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
main.page-wrap { flex: 1 0 auto; width: 100%; }
.verdict-warn { margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); font-size: var(--fs-sm); max-width: var(--measure); }

/* ── Payment ceilings table ── */
.caps-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.caps-tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 560px; }
.caps-tbl th { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-align: left; padding: 0 var(--sp-3) var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.caps-tbl td { padding: 12px var(--sp-3) 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); line-height: 1.5; }
.caps-tbl td strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.caps-tbl tbody tr:last-child td { border-bottom: none; }
.caps-note { margin-top: var(--sp-4); font-size: var(--fs-xs); color: var(--ink-3); max-width: var(--measure); line-height: 1.6; }
@media (max-width: 600px) {
  .caps-tbl { min-width: 0; }
  .caps-tbl thead { display: none; }
  .caps-tbl, .caps-tbl tbody, .caps-tbl tr, .caps-tbl td { display: block; width: 100%; }
  .caps-tbl tr { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
  .caps-tbl tbody tr:last-child { border-bottom: none; }
  .caps-tbl td { border: none; padding: 2px 0; }
  .caps-tbl td:first-child { font-size: var(--fs-base); }
}
.caps-tbl { min-width: 720px; }
.caps-net { color: var(--ink-2); }
@media (max-width: 600px) {
  .caps-tbl { min-width: 0; }
  .caps-tbl td.caps-net { margin-top: 4px; }
  .caps-tbl td.caps-net::before { content: "Į rankas: "; font-weight: 700; color: var(--ink); }
}
.faq-list .faq-a ol, .faq-list .faq-a ul { margin: var(--sp-2) 0 var(--sp-3) 1.25rem; }
.faq-list .faq-a li { margin-bottom: 6px; }
/* calendar cells are real buttons now (keyboard access) */
button.dp-cell, button.mh-cell { border: none; background: none; font: inherit; color: inherit; width: 100%; }
button.dp-cell:focus-visible, button.mh-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.verdict-compare { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-2); max-width: var(--measure); }
