/* Inter (SIL OFL 1.1) — lokāli, bez Google Fonts pieprasījumiem; latin + latin-ext (ā č ē ģ ī ķ ļ ņ š ū ž) */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.ad4eb06671be.woff2") format("woff2-variations"), url("../fonts/inter-latin-ext-wght-normal.ad4eb06671be.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.8e433c0592f7.woff2") format("woff2-variations"), url("../fonts/inter-latin-wght-normal.8e433c0592f7.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* =========================================================
   Dobeles Namsaimnieks — prototips (DICOM)
   Tēmas: pamata, ligo, maijs4, lacplesis, nov18, ziemassvetki, lieldienas
   Visas krāsas — CSS mainīgajos; tēmu pārslēdz <html data-theme="...">
   ========================================================= */

:root {
  --brand: #17402a;          /* galvene, varoņa fons */
  --brand-2: #0f2e1e;        /* tumšākais tonis */
  --accent: #e2bb55;         /* zelts — pogas, akcenti uz tumša */
  --accent-ink: #1b1b1b;     /* teksts uz akcenta */
  --accent-strong: #8a6414;  /* akcents uz gaiša fona (kontrasts ≥ 4.5) */
  --hero-ink: #ffffff;
  --hero-glow: rgba(226, 187, 85, .18);

  --bg: #f7f4ec;
  --surface: #ffffff;
  --ink: #1d2420;
  --muted: #55605a;
  --line: #e2ddd0;
  --danger: #a3221b;
  --danger-bg: #fdf0ee;
  --focus: #1a5fd0;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(23,64,42,.08);
  --wrap: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Svētku tēmas ---------- */
[data-theme="ligo"] {
  --brand: #1f4a22; --brand-2: #143316;
  --accent: #f0c74a; --accent-strong: #7d5c08;
  --hero-glow: rgba(255, 214, 102, .25);
}
[data-theme="maijs4"],
[data-theme="nov18"] {
  --brand: #7a1f2b; --brand-2: #5a1520;
  --accent: #ffffff; --accent-ink: #7a1f2b; --accent-strong: #9e3039;
  --hero-glow: rgba(255,255,255,.12);
}
[data-theme="lacplesis"] {
  --brand: #3a1d22; --brand-2: #241216;
  --accent: #e7c27a; --accent-strong: #8a5a17;
  --hero-glow: rgba(255, 190, 90, .16);
}
[data-theme="ziemassvetki"] {
  --brand: #15365a; --brand-2: #0d2440;
  --accent: #f1d27c; --accent-strong: #7f6114;
  --hero-glow: rgba(255,255,255,.12);
}
[data-theme="lieldienas"] {
  --brand: #2f5d34; --brand-2: #224626;
  --accent: #f6d36b; --accent-strong: #7b5d0c;
  --hero-glow: rgba(255, 200, 220, .22);
}

/* ---------- Pamati ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--font);   /* 16px pamatteksts */
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: #fff; color: #000; padding: 10px 16px; z-index: 100; border-radius: 8px; }
.skip:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Pogas ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  min-height: 48px; padding: .7em 1.3em; border-radius: 999px;
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-ghost { border-color: currentColor; color: var(--hero-ink); background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- Galvene ---------- */
.site-header { background: var(--brand-2); color: #fff; position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.logo svg { width: 42px; height: 42px; color: var(--accent); }
.logo b { display: block; font-size: 1.05rem; line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: .55em .7em; white-space: nowrap; color: #fff; text-decoration: none;
  border-radius: 8px; font-weight: 500;
}
.main-nav a:hover { background: rgba(255,255,255,.1); }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.header-portal { min-height: 44px; padding: .55em 1.1em; white-space: nowrap; }
.menu-toggle {
  display: none; background: none; border: 2px solid rgba(255,255,255,.5); color: #fff;
  border-radius: 10px; min-width: 48px; min-height: 48px; cursor: pointer; font: inherit;
}
.menu-toggle svg { width: 24px; height: 24px; margin: auto; }

@media (max-width: 1180px) {
  .menu-toggle { display: grid; }
  .header-portal span { display: none; }
  .header-portal { padding: .55em .8em; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--brand-2); border-top: 1px solid rgba(255,255,255,.12);
    padding: 8px 16px 16px;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: .8em .5em; font-size: 1.05rem; }
  .main-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--accent); padding-left: 1em; }
}
@media (max-width: 420px) {
  .site-header .wrap { gap: 10px; }
  .logo svg { width: 34px; height: 34px; }
  .logo b { font-size: .92rem; }
}

/* ---------- Varonis (hero) ---------- */
.hero {
  position: relative; color: var(--hero-ink); overflow: hidden;
  background:
    radial-gradient(60% 80% at 85% 30%, var(--hero-glow), transparent 70%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
}
/* Reālai fotogrāfijai: .hero-photo ar <picture>; tumšais pārklājums nodrošina kontrastu */
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--brand-2) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.15) 100%); }

.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: 56px 0 72px; }
.hero-kicker { font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .9; margin-bottom: .8em; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); font-weight: 800; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.greeting { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 28px; max-width: 34em; }
.greeting svg { width: 34px; height: 34px; flex: none; color: var(--accent); margin-top: 2px; }
.greeting strong { display: block; font-size: 1.35rem; color: var(--accent); line-height: 1.25; }
.greeting span { display: block; font-size: 1.05rem; opacity: .95; }
.greeting[hidden] { display: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-decor { justify-self: end; width: min(100%, 440px); color: var(--accent); }
.hero-decor svg { width: 100%; height: auto; }

.ornament {
  height: 16px; background: var(--accent); opacity: .9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16'%3E%3Cpath d='M0 8 8 0l8 8-8 8zM16 8l8-8 8 8-8 8z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M8 5l3 3-3 3-3-3zM24 5l3 3-3 3-3-3z'/%3E%3C/svg%3E") repeat-x center / 32px 16px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16'%3E%3Cpath d='M0 8 8 0l8 8-8 8zM16 8l8-8 8 8-8 8z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M8 5l3 3-3 3-3-3zM24 5l3 3-3 3-3-3z'/%3E%3C/svg%3E") repeat-x center / 32px 16px;
}
.hero .ornament { position: absolute; left: 0; right: 0; bottom: 18px; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 36px 0 56px; gap: 8px; }
  .hero-decor { order: -1; justify-self: start; width: 160px; }
}
@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-decor { width: 120px; }
}

/* ---------- Ātrās saites (flīzes) ---------- */
.tiles { margin-top: -36px; position: relative; z-index: 2; }
.tiles ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.tile:hover { border-color: var(--accent-strong); }
.tile svg.ico { width: 30px; height: 30px; color: var(--brand); }
.tile b { font-size: 1.05rem; line-height: 1.25; }
.tile small { margin-top: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .875rem; }
.tile small svg { width: 14px; height: 14px; }
.tile--danger { background: var(--danger-bg); border-color: #f1c9c4; }
.tile--danger svg.ico, .tile--danger b { color: var(--danger); }
.tiles-note { color: var(--muted); font-size: .9rem; margin: 12px 0 0; }

@media (max-width: 960px) { .tiles ul { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) {
  .tiles ul { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; }
  .tile--danger { grid-column: 1 / -1; }
}

/* ---------- Sadaļas ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head h2 svg { width: 26px; height: 26px; color: var(--accent-strong); }
.more { font-weight: 600; }

.home-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .home-grid { grid-template-columns: 1fr; } }

/* ---------- Ziņu kartītes ---------- */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-list--page { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .news-list, .news-list--page { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .news-list, .news-list--page { grid-template-columns: 1fr; } }
.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.card-media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #dfe8df, #c9d8cc); display: grid; place-items: center; color: var(--brand); }
.card-media svg { width: 52px; height: 52px; opacity: .55; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: var(--muted); font-size: .875rem; }
.tag { background: #eef3ee; color: var(--brand); font-weight: 600; padding: 2px 10px; border-radius: 999px; font-size: .8rem; }
.tag--warn { background: var(--danger-bg); color: var(--danger); }
.card h3 { font-size: 1.1rem; margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* visa kartīte klikšķināma */
.card h3 a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Avārijas un kontaktu bloks ---------- */
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.emergency { background: var(--brand); color: #fff; padding: 20px; display: flex; gap: 14px; align-items: center; }
.emergency svg { width: 44px; height: 44px; flex: none; color: var(--accent); }
.emergency small { display: block; opacity: .9; font-size: .875rem; }
.emergency a { color: #fff; font-size: 1.5rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.emergency a:hover { text-decoration: underline; }
.contact-list { list-style: none; margin: 0; padding: 18px 20px 20px; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; }
.contact-list svg { width: 22px; height: 22px; flex: none; color: var(--brand); margin-top: 2px; }

/* ---------- Apakšlapas virsraksts ---------- */
.page-head { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 36px 0 52px; position: relative; }
.page-head .ornament { position: absolute; left: 0; right: 0; bottom: 14px; height: 12px; opacity: .7; }
.page-head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin: 0; }
.crumbs { font-size: .9rem; margin-bottom: 8px; }
.crumbs a { color: #fff; opacity: .9; }
.page-lead { max-width: 46em; opacity: .95; margin: 10px 0 0; }

/* ---------- Filtri ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 180px; min-width: 0; }
.field--wide { flex: 2 1 260px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select {
  font: inherit; min-height: 48px; padding: 10px 12px; width: 100%;
  border: 1.5px solid #b9b3a4; border-radius: 10px; background: #fff; color: var(--ink);
}
.results-info { color: var(--muted); margin: 0 0 14px; }

.year-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; padding: 0; list-style: none; }
.chip {
  font: 600 .95rem var(--font); min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Dokumentu saraksts ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.doc-ico { width: 48px; height: 56px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .75rem; color: #fff; background: #6b7280; }
.doc-ico[data-f="PDF"] { background: #b42318; }
.doc-ico[data-f="DOCX"], .doc-ico[data-f="DOC"] { background: #1d4ed8; }
.doc-ico[data-f="XLSX"], .doc-ico[data-f="XLS"] { background: #15803d; }
.doc h3 { font-size: 1.02rem; margin: 0 0 4px; }
.doc .btn { min-height: 44px; padding: .5em 1em; background: #eef3ee; color: var(--brand); }
.doc .btn:hover { background: #e1ebe2; }
@media (max-width: 600px) {
  .doc { grid-template-columns: 44px 1fr; }
  .doc-ico { width: 44px; height: 50px; font-size: .68rem; letter-spacing: -.02em; }
  .doc .btn { grid-column: 1 / -1; justify-content: center; }
}

/* ---------- Kontakti ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.3rem; }
dl.req { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
dl.req dt { color: var(--muted); }
dl.req dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 420px) { dl.req { grid-template-columns: 1fr; gap: 2px; } dl.req dd { margin-bottom: 10px; } }
table.hours { width: 100%; border-collapse: collapse; }
table.hours th, table.hours td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); }
table.hours td { font-weight: 600; text-align: right; }

/* ---------- Kājene ---------- */
.site-footer { background: var(--brand-2); color: #e9eee9; margin-top: 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; padding: 40px 0 28px; }
.site-footer h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 16px 0; font-size: .9rem; opacity: .9; grid-template-columns: none; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- Demo tēmu pārslēdzējs (tikai prezentācijai) ---------- */
.theme-demo {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  background: #fff; color: #111; border: 1px solid #ccc; border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2); padding: 10px 12px; font-size: .9rem;
  display: flex; gap: 8px; align-items: center; max-width: calc(100vw - 32px);
}
.theme-demo label { font-weight: 700; white-space: nowrap; }
.theme-demo select { font: inherit; min-height: 40px; border-radius: 8px; border: 1px solid #aaa; padding: 4px 8px; max-width: 200px; }
@media print { .theme-demo { display: none; } }

/* =========================================================
   v2: ilustrētā varoņa aina + papildu komponentes
   ========================================================= */
:root {
  --sky-top: #7fb0c9; --sky-bot: #f4dfb4; --sun: #ffe08a;
  --hill: #7fa874; --sil: #6c8c74; --bld: #efe8d8; --bld-2: #dcd1bb; --roof: #8a5a44;
  --win: #9fb3bf; --win-lit: #ffd27a; --tree: #3f7a3c; --tree-2: #4f8f48;
  --ground: #4a7a45; --water: #8cc3d6;
}
[data-theme="ligo"] { --sky-top: #3b5b8c; --sky-bot: #f7a95c; --sun: #ffd36b; --hill: #4f7f4a; --sil: #3f5f44; --tree: #2f6a2f; --tree-2: #3f7f3a; --ground: #3a6a35; --water: #e6a46a; }
[data-theme="lacplesis"] { --sky-top: #160f16; --sky-bot: #4a2a33; --sun: #e9dcc0; --hill: #2d2228; --sil: #241a20; --bld: #4c3d42; --bld-2: #3f3237; --roof: #2a2024; --win: #2f2629; --win-lit: #ffcf7a; --tree: #1f1619; --tree-2: #2a1e22; --ground: #1f171b; --water: #3a3348; }
[data-theme="nov18"] { --sky-top: #24152b; --sky-bot: #9b4250; --sun: #ffd9b0; --hill: #4a3038; --sil: #3a242c; --bld: #d9cfc6; --bld-2: #c4b8ad; --roof: #5a2a32; --win: #6f5a60; --win-lit: #ffd27a; --tree: #2f2a24; --tree-2: #3b342c; --ground: #2e2622; --water: #6a5470; }
[data-theme="ziemassvetki"] { --sky-top: #0b2140; --sky-bot: #3d6c9c; --sun: #f3f1e6; --hill: #c9d8e6; --sil: #7c93ad; --bld: #c8cfd8; --bld-2: #b4bdc9; --roof: #59636f; --win: #6e7f93; --win-lit: #ffd27a; --tree: #1f4a3a; --tree-2: #275a46; --ground: #e8f0f6; --water: #9cb8d0; }
[data-theme="lieldienas"], [data-theme="maijs4"] { --sky-top: #8cc7e8; --sky-bot: #eef7dc; --sun: #fff2a8; --hill: #9ccf86; --sil: #7aa88a; --bld: #f6f1e4; --bld-2: #e6dcc6; --tree: #4f9a48; --tree-2: #63ad57; --ground: #6fb05c; --water: #8fd0e6; }

.hero { min-height: 560px; display: flex; align-items: center; background: var(--brand-2); }
.hero-scene { position: absolute; inset: 0; }
.hero-scene .scene { width: 100%; height: 100%; display: block; }
.hero-scene::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--brand-2) 0%, color-mix(in srgb, var(--brand-2) 88%, transparent) 30%, color-mix(in srgb, var(--brand-2) 35%, transparent) 55%, transparent 72%); }
.hero .wrap { grid-template-columns: minmax(0, 640px); padding: 64px 0 96px; }

.scene .sun { fill: var(--sun); } .scene .hill-far { fill: var(--hill); } .scene .sil { fill: var(--sil); }
.scene .h, .scene .b1 { fill: var(--bld); } .scene .b2 { fill: var(--bld-2); } .scene .roof, .scene .roofline { fill: var(--roof); }
.scene .w { fill: var(--win); } .scene .wl { fill: var(--win-lit); } .scene .trunk { fill: #6b4a33; }
.scene .tree { fill: var(--tree); } .scene .tree2 { fill: var(--tree-2); } .scene .ground { fill: var(--ground); } .scene .water { fill: var(--water); }
.scene .clouds { fill: #fff; opacity: .35; } .scene .stars { fill: #fff; display: none; } .scene .glow { fill: #ffc94d; opacity: .22; }
.scene .snow, .scene .blossom, .scene .flag, .scene .layer { display: none; }
.scene .blossom { fill: #f7b6c8; } .scene .snow { fill: #fff; } .scene .snow-fall { fill: #fff; opacity: .85; }

[data-theme="ziemassvetki"] .scene .snow, [data-theme="ziemassvetki"] .scene .layer-snow, [data-theme="ziemassvetki"] .scene .layer-xmas,
[data-theme="ligo"] .scene .layer-ligo,
[data-theme="lacplesis"] .scene .layer-candles,
[data-theme="lieldienas"] .scene .layer-easter, [data-theme="lieldienas"] .scene .blossom,
[data-theme="maijs4"] .scene .layer-table, [data-theme="maijs4"] .scene .flag, [data-theme="maijs4"] .scene .blossom,
[data-theme="nov18"] .scene .flag,
[data-theme="lacplesis"] .scene .stars, [data-theme="ziemassvetki"] .scene .stars, [data-theme="nov18"] .scene .stars { display: inline; }
[data-theme="lacplesis"] .scene .clouds, [data-theme="ziemassvetki"] .scene .clouds, [data-theme="nov18"] .scene .clouds { display: none; }
[data-theme="lacplesis"] .scene .sun, [data-theme="ziemassvetki"] .scene .sun { r: 40px; }

@media (max-width: 860px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero .wrap { padding: 32px 0 24px; }
  .hero-scene { position: relative; height: 230px; order: 2; }
  .hero-scene::after { background: linear-gradient(180deg, var(--brand-2) 0%, transparent 35%); }
  .hero .ornament { bottom: 8px; }
}

/* Kartīšu attēli */
.card-media { position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

/* Pakalpojumi */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }
.service { height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.service .ico-wrap { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); margin-bottom: 14px; }
.service .ico-wrap svg { width: 28px; height: 28px; }
.service h3 { font-size: 1.15rem; }
.service p { color: var(--muted); margin: 0; }
.service ul { margin: 10px 0 0; padding-left: 1.2em; color: var(--muted); }

/* Faktu josla */
.facts { background: var(--brand); color: #fff; position: relative; }
.facts ul { list-style: none; margin: 0; padding: 34px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.facts b { display: block; font-size: 1.9rem; color: var(--accent); line-height: 1.1; }
.facts span { opacity: .95; }
@media (max-width: 860px) { .facts ul { grid-template-columns: 1fr 1fr; } }

/* BUJ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 48px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent-strong); }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 18px 16px; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Galerija */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } }
.gallery figure { margin: 0; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.gallery img { aspect-ratio: 16/10; width: 100%; object-fit: cover; }
.gallery figcaption { padding: 8px 12px; font-size: .9rem; color: var(--muted); }

/* Tabula (iepirkumi) — ritinās savā ietvarā */
.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; min-width: 760px; }
table.data th, table.data td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: #f1ede2; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.data tbody tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.status--open { background: #e3f3e6; color: #1f6b33; }
.status--eval { background: #fff4d6; color: #7a5a00; }
.status--done { background: #ececec; color: #4a4a4a; }

/* Raksts */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
@media (max-width: 960px) { .article { grid-template-columns: 1fr; } }
.article-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.article-body img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-text { padding: 24px 28px 28px; max-width: 72ch; }
@media (max-width: 560px) { .article-text { padding: 18px; } }
.article-text h2 { font-size: 1.3rem; margin-top: 1.2em; }
.attachments { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.attachments a { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.attachments a:hover { border-color: var(--accent-strong); }
.attachments svg { width: 22px; height: 22px; color: var(--accent-strong); flex: none; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.side-list a { font-weight: 600; color: var(--ink); text-decoration: none; }
.side-list a:hover { text-decoration: underline; }

/* Par mums */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .people { grid-template-columns: 1fr; } }
.person { display: flex; gap: 14px; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); font-weight: 800; font-size: 1.2rem; flex: none; }
.link-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.link-list li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .link-list { columns: 1; } }
.prose { max-width: 72ch; }
.section--alt { background: #efeadd; }

/* v3: svētku fotogrāfijas varonī */
[data-theme="jaunaisgads"] { --brand: #1a2350; --brand-2: #0f1636; --accent: #f1d27c; --accent-strong: #7f6114; }
.hero .hero-photo { display: none; }
.hero.has-photo .hero-photo { display: block; }
.hero.has-photo .hero-scene { display: none; }
.hero-photo img { object-position: 78% 55%; }
.hero-photo::after {
  background: linear-gradient(90deg, var(--brand-2) 0%, color-mix(in srgb, var(--brand-2) 85%, transparent) 32%, color-mix(in srgb, var(--brand-2) 30%, transparent) 58%, transparent 75%);
}
@media (max-width: 860px) {
  .hero.has-photo .hero-photo { position: relative; height: 200px; order: 2; }
  .hero-photo img { object-position: 70% 50%; }
  .hero-photo::after { background: linear-gradient(180deg, var(--brand-2) 0%, transparent 35%); }
}
h2 > svg { width: 26px; height: 26px; display: inline-block; vertical-align: -4px; color: var(--accent-strong); }
.gallery img { aspect-ratio: 16 / 9; }
/* v4: plašāka panorāma — mazāks augstums, lai redzama baznīca un svētku detaļas */
.hero.has-photo { min-height: 480px; }
.hero.has-photo .wrap { padding: 48px 0 80px; }
.hero-photo img { object-position: 66% 60%; }
@media (min-width: 1600px) { .hero.has-photo { min-height: 520px; } }

/* v5: Inter tipogrāfija + saites bez pasvītrojuma */
body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3 { letter-spacing: -.02em; font-weight: 700; }
.hero h1 { font-weight: 800; letter-spacing: -.025em; }
/* Saites: bez pasvītrojuma. Piekļūstamībai (WCAG 1.4.1) saites tekstā atšķiras ar krāsu UN treknumu,
   pasvītrojums parādās tikai pie hover/fokusa. */
a { text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.prose a, .article-text a, .answer a, .contact-list a, .page-lead a, .results-info a, dl.req a { font-weight: 600; }
.more { display: inline-flex; align-items: center; gap: 6px; }
.more::after { content: "→"; transition: transform .15s; }
.more:hover::after { transform: translateX(3px); }
.site-footer a, .crumbs a { color: #fff; }
.btn:hover, .tile:hover, .card a:hover, .main-nav a:hover, .logo:hover, .doc .btn:hover, .side-list a:hover { text-decoration: none; }
.side-list a:hover, .link-list a:hover { color: var(--accent-strong); }
.link-list a { font-weight: 600; }

/* v6: vienāds formas lauku augstums visās pārlūkprogrammās (Safari ignorē min-height <select>) */
.filters { align-items: flex-end; }
.field input, .field select {
  -webkit-appearance: none; appearance: none;
  height: 52px; min-height: 52px; padding: 0 14px; line-height: 1.2;
  font-size: 1rem; border-radius: 12px; background-color: #fff;
}
.field input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
.field select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2355605a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
.field input:hover, .field select:hover { border-color: #8f8877; }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.theme-demo select { -webkit-appearance: none; appearance: none; height: 40px; padding: 0 34px 0 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
[data-theme="ziema"] { --brand: #1b2b45; --brand-2: #101b2e; --accent: #f1d27c; --accent-strong: #7f6114; }

/* v7: fotogrāfijas galerijā un sānu attēli */
.gallery--photo img { aspect-ratio: 4 / 5; object-fit: cover; }
.gallery--photo figure { position: relative; border: 0; box-shadow: var(--shadow); }
.gallery--photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 14px 12px; color: #fff; font-weight: 600; font-size: .95rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.75));
}
.side-photo { margin: 28px 0 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.side-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; }
.side-photo--tall { margin: 0; position: sticky; top: 24px; }
.side-photo--tall img { aspect-ratio: 3 / 4; max-height: 640px; }
@media (max-width: 860px) { .side-photo--tall { position: static; } .side-photo--tall img { aspect-ratio: 4 / 3; } }
.gallery--photo img, .side-photo img { height: auto; }

/* v8: šķirošanas lapa */
.callout { display: flex; gap: 12px; align-items: flex-start; background: #fff6d6; border: 1px solid #f1d27c; border-radius: var(--radius); padding: 16px 18px; margin: 0 0 24px; font-size: 1.05rem; }
.callout svg { width: 26px; height: 26px; flex: none; color: #8a6414; }
.sort-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .sort-grid { grid-template-columns: 1fr; } }
.sort-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.sort-col h2 { margin: 0; padding: 16px 20px; display: flex; align-items: center; gap: 12px; font-size: 1.5rem; color: #fff; }
.sort-col h2 svg { width: 30px; height: 30px; padding: 4px; border-radius: 50%; background: rgba(255,255,255,.2); }
.sort-col--yes h2 { background: #1f6b33; }
.sort-col--no h2 { background: #a3221b; }
.sort-col ul { list-style: none; margin: 0; padding: 6px 20px 12px; }
.sort-col li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0 12px 28px; border-bottom: 1px solid var(--line); position: relative; }
.sort-col li:last-child { border-bottom: 0; }
.sort-col li::before { position: absolute; left: 0; top: 12px; font-weight: 800; font-size: 1.1rem; }
.sort-col--yes li::before { content: "✓"; color: #1f6b33; }
.sort-col--no li::before { content: "✕"; color: #a3221b; }
.sort-col .sub { color: var(--muted); font-size: .95rem; }
.codes { display: flex; gap: 6px; flex: none; }
.code { width: 34px; height: 30px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; padding-top: 6px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30'%3E%3Cpath d='M17 2 32 28H2z' fill='none' stroke='%231d2420' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.posters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .posters { grid-template-columns: 1fr; } }
.poster { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.poster img { width: 100%; height: auto; }
.poster figcaption { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.poster .btn { min-height: 44px; padding: .5em 1em; background: #eef3ee; color: var(--brand); }
.callout--link { background: color-mix(in srgb, var(--brand) 7%, #fff); border-color: var(--line); }
.callout--link svg { color: var(--brand); }
.sort-col h2 > svg { width: 34px; height: 34px; color: #fff; vertical-align: middle; }
.posters { align-items: start; }

/* =========================================================
   v9: sezonas foto apakšlapu galvenēs + 404
   ========================================================= */
.page-head { background-color: var(--brand-2); background-repeat: no-repeat; background-size: cover; }
[data-theme] .page-head { --ph-shade: linear-gradient(90deg, var(--brand-2) 0%, color-mix(in srgb, var(--brand-2) 82%, transparent) 45%, color-mix(in srgb, var(--brand-2) 30%, transparent) 100%); }
[data-theme="ziema"] .page-head        { background-image: var(--ph-shade), url("../img/foto/tornis-ziema-1536.f2793beb8dd7.webp"); background-position: center, 70% 38%; }
[data-theme="ziemassvetki"] .page-head { background-image: var(--ph-shade), url("../img/hero/ziemassvetki-1920.cd851bb7ac28.webp"); background-position: center, 75% 60%; }
[data-theme="jaunaisgads"] .page-head  { background-image: var(--ph-shade), url("../img/hero/jaunaisgads-1920.2d2846e29853.webp"); background-position: center, 60% 40%; }
[data-theme="lacplesis"] .page-head    { background-image: var(--ph-shade), url("../img/hero/lacplesis-1920.6722f3d39ccb.webp"); background-position: center, 75% 60%; }
[data-theme="nov18"] .page-head        { background-image: var(--ph-shade), url("../img/hero/nov18-1920.ec445b187d98.webp"); background-position: center, 75% 60%; }
[data-theme="ligo"] .page-head         { background-image: var(--ph-shade), url("../img/hero/ligo-1920.0115af37d45b.webp"); background-position: center, 75% 60%; }
[data-theme="lieldienas"] .page-head   { background-image: var(--ph-shade), url("../img/hero/lieldienas-1920.aa22d653a9fe.webp"); background-position: center, 75% 60%; }
@media (max-width: 760px) {
  [data-theme] .page-head { --ph-shade: linear-gradient(180deg, color-mix(in srgb, var(--brand-2) 70%, transparent), color-mix(in srgb, var(--brand-2) 88%, transparent)); }
  [data-theme="ziema"] .page-head { background-image: var(--ph-shade), url("../img/foto/tornis-ziema-960.60e870c32733.webp"); }
}

.e404 { position: relative; min-height: calc(100vh - 76px); display: flex; align-items: center; color: #fff; background: #0c1526; overflow: hidden; }
.e404 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 40%; }
.e404::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,18,32,.95) 0%, rgba(10,18,32,.75) 45%, rgba(10,18,32,.15) 100%); }
.e404 .wrap { position: relative; z-index: 1; padding: 64px 0; }
.e404 .code404 { font-size: clamp(4rem, 3rem + 6vw, 8rem); font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -.04em; margin: 0; }
.e404 h1 { font-size: clamp(1.8rem, 1.4rem + 2vw, 2.8rem); margin: 8px 0 12px; }
.e404 p { max-width: 34em; font-size: 1.1rem; opacity: .95; }
.e404 .hero-actions { margin-top: 24px; }
@media (max-width: 760px) { .e404::after { background: linear-gradient(180deg, rgba(10,18,32,.6), rgba(10,18,32,.92)); } }

/* =========================================================
   v9: Piekļūstamības rīki (vājredzīgiem)
   ========================================================= */
.a11y-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid #fff; background: #1a5fd0; color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.a11y-fab svg { width: 30px; height: 30px; }
.a11y-fab:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }
.a11y-panel {
  position: fixed; left: 16px; bottom: 84px; z-index: 61; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow: auto;
  background: #fff; color: #111; border: 2px solid #1a5fd0; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.3); padding: 18px;
  font-size: 1rem;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-size: 1.2rem; margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center; color: #111; }
.a11y-close { background: none; border: 0; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; font-size: 1.6rem; line-height: 1; color: #111; }
.a11y-close:hover { background: #eee; }
.a11y-group { border: 0; margin: 0 0 16px; padding: 0; }
.a11y-group legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.a11y-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.a11y-btn {
  min-height: 48px; border: 2px solid #c9c9c9; background: #f6f6f6; color: #111; border-radius: 10px; cursor: pointer;
  font: 600 1rem var(--font); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px; text-align: left;
}
.a11y-btn[aria-pressed="true"] { border-color: #1a5fd0; background: #e8f0fd; color: #0b3d91; }
.a11y-btn[aria-pressed="true"]::before { content: "✓"; font-weight: 800; }
.a11y-toggles { display: grid; gap: 8px; }
.a11y-toggles .a11y-btn { justify-content: flex-start; width: 100%; }
.a11y-reset { width: 100%; margin-top: 4px; background: #fff; }
.a11y-note { font-size: .875rem; color: #444; margin: 12px 0 0; }

/* Režīmi */
html.a11y-underline a:not(.btn):not(.tile):not(.logo) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: .2em; }
html.a11y-readable body { letter-spacing: .03em; word-spacing: .12em; }
html.a11y-readable p, html.a11y-readable li, html.a11y-readable dd, html.a11y-readable .answer { line-height: 1.9; max-width: 70ch; }
html.a11y-readable h1, html.a11y-readable h2, html.a11y-readable h3 { letter-spacing: 0; }

html.a11y-contrast {
  --bg: #000; --surface: #000; --ink: #fff; --muted: #fff; --line: #fff;
  --brand: #000; --brand-2: #000; --accent: #ffeb3b; --accent-ink: #000; --accent-strong: #ffeb3b;
  --danger: #ff8a80; --danger-bg: #000; --focus: #00e5ff; --shadow: none;
}
html.a11y-contrast body { background: #000; color: #fff; }
html.a11y-contrast .hero-scene, html.a11y-contrast .hero-photo, html.a11y-contrast .ornament,
html.a11y-contrast .card-media, html.a11y-contrast .side-photo { display: none !important; }
html.a11y-contrast .page-head { background-image: none !important; border-bottom: 2px solid #fff; }
html.a11y-contrast .site-header, html.a11y-contrast .site-footer { border-bottom: 2px solid #fff; border-top: 2px solid #fff; }
html.a11y-contrast .tile, html.a11y-contrast .card, html.a11y-contrast .service, html.a11y-contrast .panel, html.a11y-contrast .doc,
html.a11y-contrast .faq details, html.a11y-contrast .contact-box, html.a11y-contrast .filters, html.a11y-contrast .sort-col,
html.a11y-contrast .poster, html.a11y-contrast .table-scroll, html.a11y-contrast .callout { background: #000 !important; border: 2px solid #fff !important; color: #fff; }
html.a11y-contrast a { color: #ffeb3b !important; }
html.a11y-contrast .btn, html.a11y-contrast .chip[aria-pressed="true"] { background: #ffeb3b !important; color: #000 !important; border: 2px solid #ffeb3b !important; }
html.a11y-contrast .btn-ghost, html.a11y-contrast .chip { background: #000 !important; color: #ffeb3b !important; border: 2px solid #ffeb3b !important; }
html.a11y-contrast .tag, html.a11y-contrast .status, html.a11y-contrast .tile small, html.a11y-contrast .meta { color: #fff !important; background: #000 !important; border-color: #fff; }
html.a11y-contrast .tile svg.ico, html.a11y-contrast .tile b, html.a11y-contrast .service .ico-wrap { color: #ffeb3b !important; background: #000 !important; }
html.a11y-contrast .field input, html.a11y-contrast .field select { background-color: #000; color: #fff; border-color: #fff; }
html.a11y-contrast .emergency { background: #000; border-bottom: 2px solid #fff; }
html.a11y-contrast .facts, html.a11y-contrast .section--alt, html.a11y-contrast .e404 { background: #000; }
html.a11y-contrast .e404 img, html.a11y-contrast .e404::after { display: none; }
html.a11y-contrast .sort-col h2 { background: #000; border-bottom: 2px solid #fff; }
html.a11y-contrast table.data thead th { background: #000; color: #fff; }
html.a11y-contrast .gallery--photo figcaption { background: #000; position: static; }
html.a11y-contrast .doc-ico { background: #000 !important; border: 2px solid #fff; }
html.a11y-contrast .theme-demo, html.a11y-contrast .a11y-panel { background: #000; color: #fff; border-color: #fff; }
html.a11y-contrast .a11y-panel h2, html.a11y-contrast .a11y-close, html.a11y-contrast .a11y-note { color: #fff; }
html.a11y-contrast .a11y-btn { background: #000; color: #fff; border-color: #fff; }
html.a11y-contrast .a11y-btn[aria-pressed="true"] { background: #ffeb3b; color: #000; border-color: #ffeb3b; }
@media print { .a11y-fab, .a11y-panel { display: none; } }

/* v9b: palielināts teksts — nekas neiziet ārpus ekrāna */
.home-grid > *, .split > *, .two-col > *, .article > * { min-width: 0; }
h1, h2, h3, .tile b { overflow-wrap: break-word; }
@media (max-width: 560px) { .emergency a { white-space: normal; font-size: 1.3rem; } }
@media (max-width: 560px) { .theme-demo { left: 84px; right: 12px; bottom: 16px; } .theme-demo label { display: none; } .theme-demo select { max-width: none; width: 100%; } }

/* Ja izvēlne neietilpst (piem., palielināts teksts) — JS pievieno html.nav-collapsed */
html.nav-collapsed .menu-toggle { display: grid; }
html.nav-collapsed .header-portal span { display: none; }
html.nav-collapsed .header-portal { padding: .55em .8em; }
html.nav-collapsed .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--brand-2); border-top: 1px solid rgba(255,255,255,.12); padding: 8px 16px 16px; }
html.nav-collapsed .main-nav.is-open { display: block; }
html.nav-collapsed .main-nav ul { flex-direction: column; }
html.nav-collapsed .main-nav a { padding: .8em .5em; font-size: 1.05rem; }
html.nav-collapsed .main-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--accent); padding-left: 1em; border-radius: 0; }
html.nav-collapsed .logo b { font-size: .95rem; }
.facts li, .person > div, .service, .card-body { min-width: 0; overflow-wrap: break-word; }
.facts b { overflow-wrap: anywhere; }
/* Galvenes vadīklas mobilajā — fiksēts izmērs, lai palielināts teksts neizspiež pogas ārpus ekrāna */
@media (max-width: 420px) {
  .site-header .wrap { gap: 8px; }
  .logo { gap: 8px; min-width: 0; }
  .logo svg { width: 32px; height: 32px; flex: none; }
  .logo b, html.nav-collapsed .logo b { font-size: 14px; }
  .menu-toggle, .header-portal { min-width: 44px; min-height: 44px; width: 44px; height: 44px; padding: 0 !important; justify-content: center; flex: none; }
}
.tiles ul > li, .news-list > li, .services > li, .gallery > li, .people > li, .posters > li, .doc > div, .sort-col li > span { min-width: 0; }
.doc h3, .tile b, .card h3, .person b, .person .results-info { overflow-wrap: break-word; }
@media (max-width: 360px) { .tiles ul { grid-template-columns: 1fr; } }
@media (max-width: 960px) { .people { grid-template-columns: 1fr; } }

/* v10: jaunie attēli — pamata/4. maijs apakšlapu galvenēs zaļā fasāde; Lāčplēša diena — pils ar svecītēm */
[data-theme="pamata"] .page-head, [data-theme="maijs4"] .page-head { background-image: var(--ph-shade), url("../img/foto/fasade-zala-960.732f06ba0437.webp"); background-position: center, 50% 30%; }
[data-theme="lacplesis"] .page-head { background-position: center, 62% 40%; }

/* =========================================================
   Django versija: papildu komponentes
   ========================================================= */
a.chip { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
a.chip[aria-current="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.field--btn { flex: 0 0 auto; }
.field--btn .btn { height: 52px; }
.doc .doc-title { font-size: 1.02rem; margin: 0 0 4px; overflow-wrap: break-word; }
.stream > * + * { margin-top: 28px; }
.stream > .block-heading { margin-top: 40px; }
.block-heading { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); }
.rich p:last-child { margin-bottom: 0; }
.rich ul, .rich ol { padding-left: 1.3em; }
.rich a, .callout a { font-weight: 600; }
.block-image { margin: 0; border-radius: var(--radius); overflow: hidden; }
.block-image img { width: 100%; height: auto; }
.callout > div p { margin: 0; }
.text-image--left > :first-child { order: 2; }
@media (max-width: 860px) { .text-image--left > :first-child { order: 0; } }
.search-results { gap: 10px; }
.search-results .panel { padding: 16px 18px; }
.search-results .tag { margin-right: 6px; }
.auth-wrap { max-width: 560px; }
.auth-panel h1 { font-size: 1.6rem; }
.auth-panel form > div, .auth-panel form p { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.auth-panel label { font-weight: 600; }
.auth-panel input[type="text"], .auth-panel input[type="password"], .auth-panel input[type="email"], .auth-panel input:not([type]) {
  font: inherit; height: 52px; padding: 0 14px; border: 1.5px solid #b9b3a4; border-radius: 12px; }
.auth-panel input[type="checkbox"] { width: 20px; height: 20px; }
.auth-panel form > div:has(input[type="checkbox"]) { flex-direction: row; align-items: center; }
.auth-panel .helptext, .auth-panel ul.errorlist { color: var(--muted); font-size: .9rem; }
.auth-panel ul.errorlist { color: var(--danger); padding-left: 1.1em; }
.auth-panel img { margin: 12px 0; max-width: 240px; }
.auth-messages { list-style: none; padding: 12px 16px; margin: 0 0 16px; background: #fff6d6; border: 1px solid #f1d27c; border-radius: 12px; }
.logo svg { flex: none; }
.logo span { min-width: 0; }
.auth-panel button, .auth-panel input[type="submit"] {
  display: inline-flex; align-items: center; gap: .5em; min-height: 48px; padding: .7em 1.3em; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 1rem/1.2 var(--font); background: var(--accent); color: var(--accent-ink); margin: 6px 6px 0 0; }
.auth-panel button:hover { filter: brightness(1.06); }
.auth-panel code, .auth-panel pre { font-size: 1rem; background: #f3f0e6; padding: 10px 12px; border-radius: 10px; display: block; white-space: pre-wrap; }
.theme-demo { right: 84px; }
@media (max-width: 560px) { .theme-demo { right: 12px; } }
/* Konta (allauth) lapas: skaidri soļi un pogas */
.btn-light { background: #eef3ee; color: var(--brand); border: 0; }
.btn-light:hover { background: #e1ebe2; }
.auth-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.auth-nav form { margin: 0; }
.auth-nav button.btn { font: 600 1rem/1.2 var(--font); cursor: pointer; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.auth-panel .auth-actions .btn { margin: 0; }
.auth-panel .auth-actions .btn-light { background: #eef3ee; color: var(--brand); }
.auth-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; counter-reset: s; }
.auth-steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; color: var(--muted); }
.auth-steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .9rem; background: #ece7da; color: var(--muted); flex: none; }
.auth-steps li.done::before { content: "✓"; background: #1f6b33; color: #fff; }
.auth-steps li.current { color: var(--ink); font-weight: 700; }
.auth-steps li.current::before { background: var(--accent); color: var(--accent-ink); }
.recovery-codes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.recovery-codes code { display: block; text-align: center; font: 600 1.15rem/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em;
  background: #f3f0e6; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.totp-qr { display: block; width: 220px; height: 220px; margin: 8px 0 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.auth-panel input[readonly] { background: #f6f4ee; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
