/* Vedlis vietne. Dizaina apraksts: docs/dizains.md.
   Balts papīrs, tumši zaļa tinte, piparmētru akcents. Virsraksti un lielie skaitļi: Bricolage Grotesque; viss pārējais: Instrument Sans.
   Kustība: viena sākumlapas secība (rēķins → banka → grāmatojums), ritināšanai piesaistīta atklāšanās un atbilde uz darbību.
   Bez JavaScript viss ir redzams; ar prefers-reduced-motion kustības nav. */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/fonts/instrument-sans-latin-ext.woff2) format('woff2-variations');
  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: 'Instrument Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/fonts/instrument-sans-latin.woff2) format('woff2-variations');
  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: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-latin-ext.woff2) format('woff2-variations');
  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: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-latin.woff2) format('woff2-variations');
  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: #ffffff;
  --bg-2: #f3f7f4;
  --surface: #ffffff;
  --ink: #14211c;
  --ink-2: #44554d;
  --ink-3: #65776e;
  --line: #dbe4de;
  --line-2: #b7c7bd;
  --green: #1d6b4a;
  --green-deep: #0f4a33;
  --green-ink: #185c40;
  --green-soft: #e6f3ec;
  --mint: #8fd9b0;
  --mint-soft: rgba(143, 217, 176, 0.22);
  --red: #a8322f;
  --red-soft: #fbe9e7;
  --amber: #8a5a12;
  --focus: #1d6b4a;
  --wrap: 72rem;
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --shadow-s: 0 1px 2px rgba(20, 33, 28, 0.06), 0 8px 24px -18px rgba(20, 33, 28, 0.25);
  --shadow-m: 0 1px 2px rgba(20, 33, 28, 0.06), 0 18px 44px -22px rgba(20, 33, 28, 0.32);
  --shadow-deep: 0 24px 60px -24px rgba(15, 74, 51, 0.55);
  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.015em; text-wrap: balance; }
h1, h2 { font-family: var(--display); }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; }
h2 { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.8rem); font-weight: 700; margin-top: 2.4em; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; font-weight: 650; margin-top: 1.6em; }
p, ul, ol, table, dl { margin: 0 0 1em; }
b, strong { font-weight: 650; }
.num, td.n, th.n { font-variant-numeric: tabular-nums lining-nums; text-align: right; white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: 42rem; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 0.75rem; z-index: 50; border-radius: var(--r-s); box-shadow: var(--shadow-m); }

/* ---------- Galvene ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; }
.brand svg { width: 1.85rem; height: 1.85rem; flex: none; }
.brand:hover { color: var(--green-ink); }
.site-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 560; padding: 0.45rem 0.75rem; border-radius: 999px; transition: background-color 0.2s, color 0.2s; }
.site-nav a:hover { color: var(--ink); background: var(--bg-2); }
.site-nav a[aria-current='page'] { color: var(--green-deep); background: var(--green-soft); }

main { padding: 2.25rem 0 4rem; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 42rem; line-height: 1.5; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 42rem; }
.crumbs { font-size: 0.875rem; color: var(--ink-3); margin-bottom: 0.9rem; }
.crumbs a { color: var(--ink-2); text-decoration-color: var(--line-2); }
.crumbs a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------- Īsumā: atbilde pirmajā ekrānā (meklētājiem, AI un cilvēkiem) ---------- */
.answer {
  margin: 1.5rem 0 1.75rem; max-width: 56rem;
  background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: var(--r-m); padding: 1rem 1.25rem 0.9rem;
}
.answer-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; }
.answer h2 { margin: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; font-family: var(--font); }
.answer .updated { margin: 0; font-size: 0.8rem; color: var(--green-deep); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.6rem; }
.answer-list { margin: 0.7rem 0 0.6rem; padding-left: 1.15rem; font-size: 0.97rem; }
.answer-list li { margin-bottom: 0.3rem; }
.answer-list li::marker { color: var(--green); }
.answer-list b { font-variant-numeric: tabular-nums; }
.answer-src { margin: 0; font-size: 0.82rem; color: var(--ink-2); }
.answer-src a { color: var(--ink-2); }

/* ---------- Kalkulators ---------- */
.calc { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; margin-top: 1.75rem; }
.calc form, .gen form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.35rem 1.35rem 0.6rem;
  box-shadow: var(--shadow-s);
}
.field { margin-bottom: 1.15rem; }
.field > label, .field > .label, legend { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0 0 1.15rem; min-width: 0; }
.hint { font-size: 0.85rem; color: var(--ink-2); margin-top: 0.35rem; }

/* Segmentētā izvēle: pogu rinda ar kustīgu iezīmējumu */
.seg { display: inline-flex; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 1.4rem; padding: 3px; max-width: 100%; gap: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span, .seg a {
  display: block; padding: 0.42rem 0.9rem; font-weight: 560; font-size: 0.95rem; color: var(--ink-2); cursor: pointer; border-radius: 999px;
  text-decoration: none; white-space: nowrap; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg span:hover, .seg a:hover { color: var(--ink); }
.seg input:checked + span, .seg a[aria-current='page'] { background: var(--ink); color: #fff; box-shadow: 0 2px 8px -2px rgba(20, 33, 28, 0.4); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.tabs { margin: 0.75rem 0 0.25rem; }

.money { position: relative; max-width: 16rem; }
.money input { padding-right: 2.2rem; }
.money::after { content: '€'; position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; font-weight: 500; }
input[type='text'], input[type='number'], input:not([type]), input[type='email'], input[type='tel'], input[type='date'], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 0.6rem 0.75rem; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--mint-soft); }
input.big { font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; padding: 0.5rem 0.8rem; letter-spacing: -0.01em; }
select { max-width: 26rem; }
textarea { resize: vertical; }
input[type='color'] { width: 3.2rem; height: 2.5rem; padding: 0.15rem; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); }
input[type='file'] { font: inherit; font-size: 0.9rem; max-width: 100%; }
input:disabled, select:disabled { background: var(--bg-2); color: var(--ink-3); border-color: var(--line); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.18rem; accent-color: var(--green); flex: none; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.stepper button { font: inherit; font-size: 1.25rem; width: 2.75rem; border: 0; background: var(--bg-2); color: var(--ink); cursor: pointer; transition: background-color 0.15s; }
.stepper button:hover { background: var(--green-soft); }
.stepper button:active { background: var(--mint-soft); }
.stepper button:disabled { color: var(--ink-3); cursor: default; background: var(--bg-2); }
.stepper input { width: 3.5rem; border: 0; border-radius: 0; text-align: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.stepper input:focus-visible { box-shadow: inset 0 0 0 2px var(--green); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; max-width: 26rem; }
details.more { border-top: 1px solid var(--line); padding: 0.85rem 0; margin-top: 0.4rem; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--green-ink); list-style: none; display: flex; align-items: center; gap: 0.5rem; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: ''; width: 0.5rem; height: 0.5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.25s var(--ease); margin-left: 0.15rem; }
details.more[open] summary::before { transform: rotate(45deg); }
details.more[open] summary { margin-bottom: 0.9rem; }

/* Rezultāta kartīte: tumši zaļa, lielais skaitlis piparmētru krāsā */
.slip {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--green-deep) 0%, #0c3b29 100%);
  color: #fff; border-radius: var(--r-l); padding: 1.4rem 1.4rem 1.1rem;
  box-shadow: var(--shadow-deep);
}
.slip::before {
  content: ''; position: absolute; inset: auto -20% -45% auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(143, 217, 176, 0.28), transparent 70%); pointer-events: none;
}
.slip > * { position: relative; }
.slip h2 { margin: 0 0 0.25rem; font-size: 0.95rem; color: rgba(255, 255, 255, 0.72); font-weight: 560; letter-spacing: 0; font-family: var(--font); }
.slip .net { font-family: var(--display); font-size: clamp(2.5rem, 1.6rem + 3.2vw, 3.5rem); font-weight: 800; color: var(--mint); font-variant-numeric: tabular-nums; letter-spacing: -0.035em; line-height: 1.05; margin: 0 0 1.1rem; }
.slip .net small { font-family: var(--font); font-size: 0.42em; font-weight: 500; color: rgba(255, 255, 255, 0.72); margin-left: 0.35rem; letter-spacing: 0; }
.slip a { color: var(--mint); }
.slip a:hover { color: #fff; }
.slip .muted { color: rgba(255, 255, 255, 0.72); }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0 0 1.1rem; }
.ledger th { text-align: left; font-weight: 450; padding: 0.45rem 0.5rem 0.45rem 0; vertical-align: top; color: rgba(255, 255, 255, 0.9); }
.ledger td { padding: 0.45rem 0; vertical-align: top; }
.ledger tr + tr th, .ledger tr + tr td { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.ledger .op { color: rgba(255, 255, 255, 0.5); width: 1.2rem; text-align: center; font-weight: 600; }
.ledger .rate { color: rgba(255, 255, 255, 0.55); font-size: 0.85rem; white-space: nowrap; padding-left: 0.35rem; }
.ledger tr.total th, .ledger tr.total td { font-weight: 700; color: #fff; border-top: 1px solid rgba(255, 255, 255, 0.5); border-bottom: 3px double rgba(255, 255, 255, 0.5); }
.ledger caption { text-align: left; font-weight: 650; padding-bottom: 0.3rem; caption-side: top; color: var(--mint); font-size: 0.85rem; letter-spacing: 0.02em; }
.ledger .sub { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }
.slip .notes { font-size: 0.85rem; color: rgba(255, 255, 255, 0.72); padding-left: 1.1rem; margin: 0 0 0.8rem; }
.slip .share { font-size: 0.85rem; color: rgba(255, 255, 255, 0.72); }
.slip .share button.link { color: var(--mint); }
.slip .share button.link:hover { color: #fff; }
.slip .small, .slip .small.muted { color: rgba(255, 255, 255, 0.72); }
button.link { font: inherit; background: none; border: 0; padding: 0; color: var(--green-ink); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
button.link:hover { color: var(--ink); }
/* Pārrēķins: kartīte īsi atbild (web/tools pievieno klasi is-updated) */
.slip.is-updated .net { animation: tick 0.45s var(--ease); }
@keyframes tick { 0% { transform: translateY(0.25rem); opacity: 0.4; } 100% { transform: none; opacity: 1; } }

/* ---------- Saturs zem rīka ---------- */
.steps { padding-left: 1.4rem; }
.steps li { margin-bottom: 0.55rem; padding-left: 0.3rem; }
.steps li::marker { color: var(--green); font-weight: 700; }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; max-width: 48rem; background: var(--surface); font-size: 0.97rem; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
table.data th, table.data td { border-bottom: 1px solid var(--line); padding: 0.65rem 0.9rem; text-align: left; vertical-align: top; }
table.data thead th { font-weight: 650; background: var(--bg-2); color: var(--ink-2); font-size: 0.9rem; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td, table.data tbody tr:hover th { background: #fafcfb; }
table.data tbody th a { text-decoration-color: var(--line-2); }
table.data tbody th a:hover { text-decoration-color: currentColor; }
table.data .n { text-align: right; }
table.data tfoot td, table.data tfoot th { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; background: var(--bg-2); }
.table-scroll { overflow-x: auto; margin-bottom: 1.25rem; -webkit-overflow-scrolling: touch; }
.table-scroll table { margin-bottom: 0; }
.faq { max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: 0.95rem 2.2rem 0.95rem 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 0.35rem; top: 1.25rem; width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg); transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.5rem; }
.faq summary:hover { color: var(--green-ink); }
.faq details p { margin: 0 0 1rem; color: var(--ink-2); max-width: 44rem; }
.sources { font-size: 0.9rem; color: var(--ink-2); max-width: 48rem; padding-left: 1.2rem; }
.sources li { margin-bottom: 0.35rem; }
.stamp { font-size: 0.875rem; color: var(--ink-2); border-left: 3px solid var(--green); padding-left: 0.75rem; }
code { background: var(--green-soft); color: var(--green-deep); padding: 0.08em 0.35em; border-radius: 4px; font-size: 0.88em; overflow-wrap: anywhere; }

/* ---------- Pogas un kartītes ---------- */
.btn, button.btn {
  font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 999px; padding: 0.65rem 1.25rem; cursor: pointer; text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s var(--ease), box-shadow 0.2s;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; box-shadow: 0 10px 24px -14px rgba(15, 74, 51, 0.7); }
.btn:active { transform: scale(0.98); }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.sec:hover { background: var(--green-soft); color: var(--green-deep); border-color: var(--green-soft); box-shadow: none; }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.75rem 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.25rem 1.35rem; box-shadow: var(--shadow-s); }
.card ul { padding-left: 1.2rem; }
.card li { margin-bottom: 0.35rem; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.err { color: var(--red); }
.ok { color: var(--green-ink); }
.warn { color: var(--amber); }
.problems { font-size: 0.9rem; margin: 0.25rem 0 0.5rem; }
.problems div + div { margin-top: 0.2rem; }

/* Aicinājums: tumši zaļa josla ar klusu rakstu */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--green-deep), #0c3b29); color: #eef5f0; border-radius: var(--r-l); padding: 1.6rem 1.75rem; margin: 3rem 0 1rem;
  display: flex; gap: 1.25rem; align-items: center; justify-content: space-between; flex-wrap: wrap; max-width: 56rem;
}
.cta::before {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 60%; aspect-ratio: 1; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(143, 217, 176, 0.25), transparent 72%);
}
.cta p { margin: 0; max-width: 36rem; font-size: 1.05rem; }
.cta a { background: var(--mint); color: var(--green-deep); border-color: var(--mint); white-space: nowrap; }
.cta a:hover { background: #fff; border-color: #fff; color: var(--green-deep); box-shadow: none; }

/* ---------- Rīku saraksts: sākumlapā un "Citi rīki" ---------- */
.tools { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
.tools li { min-width: 0; }
.tools a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 0.3rem 1rem; align-items: start;
  padding: 1.15rem 1.25rem; height: 100%; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-s);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.tools a:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: var(--line-2); color: var(--ink); }
.tools a:hover .t { color: var(--green-ink); }
.tools .t { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; transition: color 0.2s; }
.tools .d { color: var(--ink-2); grid-column: 1; font-size: 0.93rem; line-height: 1.45; }
.tools .k { grid-row: 1 / span 2; grid-column: 2; align-self: start; font-family: var(--display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--green); white-space: nowrap; line-height: 1; padding-top: 0.15rem; }
.tools.related { margin-bottom: 1rem; }
.tools.related .t { font-size: 1.05rem; }

/* ---------- Sākumlapa ---------- */
.home-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; padding: 0.5rem 0 1.5rem; }
.home-hero h1 { max-width: 14ch; }
.home-hero .lede { font-size: 1.15rem; }
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.25rem 0 0.5rem; }
.today-note { margin: 1.25rem 0 0; font-size: 1rem; color: var(--ink-2); border-left: 3px solid var(--red); padding-left: 0.85rem; max-width: 36rem; }
.home-section { margin-top: 2.75rem; }
.home-section h2 { margin-top: 0; }
.home-example { margin-top: 1.25rem; }

/* Klusas zaļas līknes hero fonā (giftcardlayers motīvs, lēni dreifē) */
.hero-bg { position: absolute; top: -4rem; left: 50%; width: 100vw; transform: translateX(-50%); height: 36rem; z-index: -1; pointer-events: none; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.hero-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg path { fill: none; stroke: var(--green); stroke-width: 1; }
.hero-bg .g1 { opacity: 0.1; animation: drift 26s ease-in-out infinite alternate; }
.hero-bg .g2 { opacity: 0.07; animation: drift 34s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate3d(-2%, 0, 0); } to { transform: translate3d(2%, -2%, 0); } }

/* Plūsma: rēķins → bankas maksājums → grāmatojums. Viena secība pēc ielādes. */
.flow { position: relative; display: grid; gap: 0.35rem; max-width: 24rem; margin: 0 auto; width: 100%; font-size: 0.9rem; }
.fl-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 0.85rem 1rem; box-shadow: var(--shadow-m);
  display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1rem; align-items: center;
}
.fl-card .fl-k { grid-column: 1; font-size: 0.78rem; color: var(--ink-3); font-weight: 600; letter-spacing: 0.01em; }
.fl-card .fl-v { grid-column: 2; grid-row: 1 / span 2; font-family: var(--display); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); align-self: center; }
.fl-card .fl-s { grid-column: 1; font-size: 0.85rem; color: var(--ink-2); }
.fl-card .fl-lines { display: grid; gap: 0.3rem; margin-top: 0.3rem; grid-column: 1 / -1; }
.fl-card .fl-lines i { display: block; height: 0.35rem; border-radius: 3px; background: var(--line); }
.fl-card .fl-lines i:nth-child(2) { width: 70%; }
.fl-2 { margin-left: 2rem; }
.fl-3 { grid-template-columns: 1fr; gap: 0.3rem; }
.fl-3 .fl-row { display: grid; grid-template-columns: 1.3rem 3.2rem 1fr auto; gap: 0 0.5rem; align-items: baseline; font-variant-numeric: tabular-nums; }
.fl-3 .fl-row b { color: var(--green-ink); }
.fl-3 .fl-row span:nth-child(3) { color: var(--ink-2); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-3 .fl-row .n { font-weight: 600; }
.fl-ok { position: absolute; right: -0.5rem; top: -0.7rem; background: var(--green); color: #fff; font-weight: 700; font-size: 0.8rem; padding: 0.25rem 0.6rem; border-radius: 999px; box-shadow: 0 6px 16px -8px rgba(15, 74, 51, 0.7); }
.fl-line { height: 1.9rem; margin: -0.1rem 0; display: flex; align-items: center; }
.fl-line svg { width: 100%; height: 100%; overflow: visible; }
.fl-line path { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; opacity: 0.55; }
.fl-l1 svg { margin-left: 2rem; width: 60%; }
.fl-l2 svg { margin-left: 2rem; width: 60%; }
.fl-anim .fl-card, .fl-anim .fl-ok { animation: rise 0.6s var(--ease) both; }
/* Līnija "uzzīmējas": pathLength=60, tāpēc dasharray 60 ir visa līnija */
.fl-anim .fl-line path { stroke-dasharray: 60; animation: dash 0.6s ease-out both; }
.fl-anim .fl-1 { animation-delay: 0.15s; }
.fl-anim .fl-l1 path { animation-delay: 0.75s; }
.fl-anim .fl-2 { animation-delay: 1.25s; }
.fl-anim .fl-l2 path { animation-delay: 1.85s; }
.fl-anim .fl-3 { animation-delay: 2.35s; }
.fl-anim .fl-ok { animation-name: pop; animation-delay: 3s; }
@keyframes rise { from { opacity: 0; transform: translateY(0.9rem); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.6); } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes dash { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }

/* ---------- Kājene ---------- */
.site-foot { background: var(--ink); color: rgba(255, 255, 255, 0.72); padding: 2.5rem 0 2.75rem; font-size: 0.9rem; margin-top: 2rem; }
.site-foot .wrap { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.site-foot p { max-width: 46rem; margin: 0 0 0.6rem; }
.site-foot strong { color: #fff; }
.site-foot a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.35); }
.site-foot a:hover { color: var(--mint); }
.site-foot .brand { color: #fff; }
.site-foot .brand:hover { color: var(--mint); }

/* ---------- Kalendārs ---------- */
.years { display: flex; gap: 0.4rem; margin: 0.25rem 0 1.25rem; flex-wrap: wrap; }
.years a { text-decoration: none; padding: 0.4rem 0.95rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; transition: background-color 0.2s, color 0.2s; }
.years a:hover { background: var(--bg-2); color: var(--ink); }
.years a[aria-current='page'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.legend { display: flex; gap: 1rem 1.25rem; flex-wrap: wrap; font-size: 0.875rem; color: var(--ink-2); margin: 0 0 1.25rem; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend i { display: inline-block; width: 1.3rem; height: 1.3rem; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); }
.legend .k-hol { background: var(--red-soft); border-color: var(--red); }
.legend .k-pre { box-shadow: inset 0 -3px 0 var(--ink-2); }
.legend .k-tr { background: repeating-linear-gradient(135deg, var(--surface) 0 3px, var(--line) 3px 5px); }
.legend .k-we { background: transparent; border-style: dashed; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 0.9rem 0.9rem 0.8rem; box-shadow: var(--shadow-s); }
.month h3 { margin: 0 0 0.5rem; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.month h3 span { font-size: 0.82rem; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-variant-numeric: tabular-nums; }
.grid .wd { font-size: 0.72rem; color: var(--ink-3); text-align: center; padding-bottom: 0.2rem; }
.grid .d { text-align: center; padding: 0.34rem 0; font-size: 0.9rem; border-radius: 6px; background: var(--bg-2); }
.grid .d.empty { background: transparent; }
.grid .d.we { background: transparent; color: var(--ink-3); }
.grid .d.hol { background: var(--red-soft); color: var(--red); font-weight: 700; }
.grid .d.pre { box-shadow: inset 0 -3px 0 var(--ink-2); }
.grid .d.tr { background: repeating-linear-gradient(135deg, var(--surface) 0 3px, var(--line) 3px 5px); }
.grid .d.ws { outline: 1px dashed var(--ink-2); outline-offset: -2px; background: var(--surface); color: var(--ink); }
.grid .d.is-today { outline: 2px solid var(--green); outline-offset: -2px; font-weight: 700; background: var(--green-soft); color: var(--green-deep); }
.month .meta { font-size: 0.8rem; color: var(--ink-2); margin-top: 0.4rem; }
.hol-list { list-style: none; padding: 0; max-width: 48rem; }
.hol-list li { display: grid; grid-template-columns: 1fr; gap: 0.1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.hol-list .date { font-weight: 650; font-variant-numeric: tabular-nums; }
.hol-list .we { color: var(--ink-3); font-size: 0.875rem; }
.downloads { font-size: 0.95rem; }

/* ---------- Rēķina ģenerators ---------- */
.gen { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; margin-top: 1.75rem; }
.gen form h3:first-child { margin-top: 0; }
.gen form h3 { font-size: 1rem; color: var(--ink-2); font-weight: 650; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.gen .preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.1rem; box-shadow: var(--shadow-s); }
.gen .total { font-family: var(--display); font-size: 2.1rem; font-weight: 800; color: var(--green-deep); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.gen iframe { width: 100%; height: 46rem; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; }
.line { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.4rem; align-items: end; margin-bottom: 0.5rem; }
.line .field:first-child { grid-column: 1 / -1; }
.line .field { margin: 0; }
.line .field > label { font-size: 0.8rem; }
.line button { height: 2.6rem; padding: 0; }
.samples td { vertical-align: top; }
.drop { border: 2px dashed var(--line-2); border-radius: var(--r-l); padding: 2rem 1.5rem; text-align: center; background: var(--surface); max-width: 48rem; transition: border-color 0.2s, background-color 0.2s; }
.drop.over { border-color: var(--green); background: var(--green-soft); }
.findings { max-width: 52rem; }
.findings td:first-child { white-space: nowrap; width: 1%; }

/* ---------- Telefonā: kalkulators pirms "Īsumā" (DOM secība paliek: fakti augšā meklētājiem), rezultāts joslā apakšā ---------- */
.net-bar { display: none; }
@media (max-width: 52rem) {
  main > .wrap { display: flex; flex-direction: column; }
  main > .wrap > * { min-width: 0; }
  main > .wrap > .tabs, main > .wrap > .calc, main > .wrap > .net-bar, main > .wrap > .gen { order: 1; }
  main > .wrap > .answer { order: 2; margin-top: 2rem; }
  main > .wrap > .calc ~ *, main > .wrap > .gen ~ * { order: 3; }
  main > .wrap > .calc ~ .answer, main > .wrap > .gen ~ .answer { order: 3; }
  .net-bar {
    display: flex; position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 15;
    justify-content: space-between; align-items: baseline; gap: 1rem;
    padding: 0.75rem 1.25rem; border-radius: 999px;
    background: var(--green-deep); color: #fff; text-decoration: none; font-weight: 600; box-shadow: var(--shadow-deep);
  }
  .net-bar strong { font-family: var(--display); font-size: 1.35rem; font-variant-numeric: tabular-nums; color: var(--mint); letter-spacing: -0.02em; }
  .net-bar:hover { color: #fff; }
  body.has-bar { padding-bottom: 5rem; }
  .slip { scroll-margin-top: 1rem; }
}

/* ---------- Platāki ekrāni ---------- */
@media (min-width: 40rem) {
  .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hol-list li { grid-template-columns: 11.5rem 1fr; gap: 1rem; }
  .site-foot .wrap { grid-template-columns: 1fr; }
}
@media (min-width: 52rem) {
  .answer { max-width: none; }
  .answer-list { columns: 2; column-gap: 2.25rem; font-size: 0.93rem; line-height: 1.5; }
  .answer-list li { break-inside: avoid; }
  .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 2rem; }
  .slip { position: sticky; top: 5.25rem; }
  .gen { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2rem; }
  .gen .preview { position: sticky; top: 5.25rem; }
  .line { grid-template-columns: minmax(0, 3fr) 4.5rem 5.5rem 6rem minmax(0, 1.8fr) 2.3rem; }
  .line .field:first-child { grid-column: auto; }
  .home-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3rem; padding: 1.5rem 0 2rem; }
  .home-hero.one { grid-template-columns: minmax(0, 1fr); }
  .flow { margin: 0 0 0 auto; }
  .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .tools.related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  main { padding-top: 2.75rem; }
}
@media (max-width: 40rem) {
  .site-head .wrap { gap: 0.2rem 1rem; padding-top: 0.6rem; padding-bottom: 0.45rem; min-height: 0; }
  .site-nav { width: calc(100% + 2.5rem); margin: 0 -1.25rem; padding: 0 1rem; gap: 0.1rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; font-size: 0.92rem; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; padding: 0.35rem 0.65rem; }
  main { padding-top: 1.25rem; }
  h1 { font-size: clamp(1.9rem, 1.3rem + 3.4vw, 2.4rem); }
  .lede, .lead { font-size: 1.08rem; }
  .seg span, .seg a { padding: 0.42rem 0.7rem; font-size: 0.9rem; }
  .calc form, .gen form { padding: 1rem 1rem 0.3rem; border-radius: var(--r-m); }
  .slip { padding: 1.1rem 1.1rem 0.9rem; border-radius: var(--r-m); }
  .answer { padding: 0.9rem 1rem 0.8rem; }
  .answer-list { font-size: 0.93rem; }
  .months { grid-template-columns: 1fr; }
  .tabs { display: flex; width: 100%; }
  .tabs a { flex: 1 1 auto; text-align: center; padding: 0.45rem 0.6rem; font-size: 0.9rem; }
  .seg label { flex: 1 1 auto; }
  .seg label span { text-align: center; white-space: normal; }
  .cta { padding: 1.35rem 1.25rem; border-radius: var(--r-m); }
  .hero-bg { height: 28rem; }
  .flow { font-size: 0.85rem; }
  .fl-2 { margin-left: 1rem; }
}

/* ---------- Ritināšanai piesaistītas kustības (tikai pārlūkos, kas to prot; citur viss redzams uzreiz) ---------- */
@supports (animation-timeline: view()) {
  .tools li { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 45%; }
  .month { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
}
@supports (animation-timeline: scroll()) {
  .site-head { animation: head-shadow linear both; animation-timeline: scroll(); animation-range: 0 6rem; }
  @keyframes head-shadow { to { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgba(20, 33, 28, 0.35); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .hero-bg .g1, .hero-bg .g2 { animation: none; }
  .tools a:hover { transform: none; }
}

@media print {
  .site-head, .site-foot, .calc form, .gen form, .years, .faq, .sources, .answer, .related, .tools, .cta, .downloads, .crumbs, .drop, .net-bar, .hero-bg { display: none; }
  body { background: #fff; }
  .slip { color: #000; background: none; box-shadow: none; border: 1px solid #000; }
  .slip .net { color: #000; }
  .month { break-inside: avoid; box-shadow: none; }
}
