/* Ilze Medne — v2, Braun stilā.
   Kreisā sānjosla uz silta pamata, balts satura panelis, klasisks serif virsrakstiem,
   saraksta rindas kā žurnālā. */

:root {
  --base: #f4efe7;
  --panel: #fffefc;
  --soft: #f7f2ea;
  --ink: #1d1b18;
  --ink-2: #4b4740;
  --muted: #8a857b;
  --line: rgba(29, 27, 24, .1);
  --line-2: rgba(29, 27, 24, .18);
  --accent: #8a2f2b;
  --accent-ink: #fff;
  --pod: #e2231a;

  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --side: 256px;
  --content: 820px;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--base); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: #ead9c7; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Karkass ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 18px 14px 24px 18px; display: flex; flex-direction: column; gap: 22px;
  scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }
.me { display: flex; gap: 12px; align-items: center; padding: 4px 6px; }
.me img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; }
.me b { display: block; font: 600 17px/1.15 var(--serif); }
.me span { font-size: 13px; color: var(--muted); line-height: 1.3; display: block; }
.search-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: rgba(29, 27, 24, .06); border-radius: var(--r-s); padding: 9px 12px; color: var(--muted); font-size: 14px; text-align: left;
}
.search-btn kbd { margin-left: auto; font: 500 11px/1 var(--sans); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 5px; }
.side h4 { font: 600 11.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 10px 8px; }
.side nav a {
  display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: var(--r-s);
  font-size: 14.5px; color: var(--ink-2); transition: background .15s, color .15s;
}
.side nav a:hover { background: rgba(29, 27, 24, .05); color: var(--ink); }
.side nav a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(29, 27, 24, .08); }
.side nav a small { margin-left: auto; font-size: 12px; color: var(--muted); }
.side .cta { margin-top: auto; }
.side .cta .btn { width: 100%; justify-content: center; }
.side .cta p { font-size: 12.5px; color: var(--muted); margin: 8px 4px 0; line-height: 1.4; }

.main { padding: 10px 10px 10px 0; min-width: 0; }
.panel { background: var(--panel); border-radius: var(--r-l); min-height: calc(100vh - 20px); box-shadow: 0 0 0 1px rgba(29, 27, 24, .04); }
.content { max-width: calc(var(--content) + 96px); margin: 0 auto; padding: 48px 48px 40px; }

/* Mobilā augšjosla */
.mbar { display: none; }
@media (max-width: 980px) {
  .shell { display: block; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 70; background: var(--base);
    transform: translateX(-102%); transition: transform .35s var(--ease); box-shadow: 0 0 40px rgba(0, 0, 0, .15);
  }
  .side.is-open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(29, 27, 24, .3); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .scrim.is-on { opacity: 1; pointer-events: auto; }
  .mbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50;
    padding: 10px 16px; background: rgba(244, 239, 231, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .mbar .me { padding: 0; }
  .mbar .me img { width: 34px; height: 34px; }
  .mbar button { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
  .mbar .menu { margin-left: auto; }
  .main { padding: 0 8px 8px; }
  .panel { min-height: 0; border-radius: var(--r-m); }
  .content { padding: 22px 18px 32px; }
}

/* ---------- Tipogrāfija un pogas ---------- */
.t-hero { font: 600 clamp(34px, 4.4vw, 50px)/1.08 var(--serif); letter-spacing: -0.015em; }
.t-sec { font: 600 22px/1.2 var(--serif); letter-spacing: -0.005em; }
.t-big { font: 600 clamp(26px, 3vw, 34px)/1.15 var(--serif); letter-spacing: -0.01em; }
.meta { font-size: 13px; color: var(--muted); }
.meta b { font-weight: 500; color: var(--ink-2); }
.prose { font: 400 18px/1.65 var(--serif); color: var(--ink-2); }
.prose a, .u { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(29, 27, 24, .3); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover, .u:hover { text-decoration-color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: var(--r-s); font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #742622; }
.btn--line { border: 1px solid var(--line-2); }
.btn--line:hover { border-color: var(--ink); }
.more { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 500; color: var(--accent); }
.more span { transition: transform .2s var(--ease); }
.more:hover span { transform: translateX(3px); }

.sec { margin-top: 72px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); border-radius: var(--r-m); overflow: hidden; background: var(--soft); }
.hero__text { padding: 40px 36px 32px; }
.hero__text .t-hero { margin-bottom: 20px; }
.hero__text .prose { font-size: 17px; margin-bottom: 26px; }
.hero__photo { position: relative; min-height: 420px; }
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hero__photo figcaption { position: absolute; left: 14px; bottom: 14px; background: rgba(255, 254, 252, .92); border-radius: 6px; padding: 6px 10px; font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero__photo { min-height: 0; aspect-ratio: 4 / 4.4; order: -1; }
  .hero__text { padding: 26px 20px 24px; }
}

/* Pieteikšanās forma */
.apply { border-top: 1px solid var(--line-2); padding-top: 20px; }
.apply h3 { font: 600 15px/1.3 var(--sans); margin-bottom: 12px; }
.apply .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.apply input, .apply select {
  width: 100%; height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--panel); padding: 0 12px; font-size: 15px;
}
.apply input:focus, .apply select:focus { outline: none; border-color: var(--ink); }
.apply .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.apply .chips label { position: relative; }
.apply .chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.apply .chips span { display: inline-block; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; background: var(--panel); transition: all .15s; }
.apply .chips input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.apply .chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.apply .go { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.apply .go .meta a { text-decoration: underline; text-underline-offset: 2px; }
.apply .ok { display: none; font-size: 14.5px; background: #e7eedf; border-radius: var(--r-s); padding: 12px 14px; margin-top: 10px; }
.apply.is-sent .ok { display: block; }
@media (max-width: 480px) { .apply .row { grid-template-columns: 1fr; } }

/* ---------- Saraksti (Braun rindas) ---------- */
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.feat__img { border-radius: var(--r-s); overflow: hidden; aspect-ratio: 3 / 2; background: var(--soft); display: block; }
.feat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.feat:hover .feat__img img { transform: scale(1.02); }
.feat--sq .feat__img { aspect-ratio: 1; max-width: 280px; }
.feat .meta { margin-bottom: 8px; }
.feat h3 { font: 600 24px/1.2 var(--serif); margin-bottom: 10px; }
.feat h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.feat p { font: 400 16.5px/1.55 var(--serif); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 14px; }
@media (max-width: 640px) { .feat { grid-template-columns: 1fr; gap: 16px; } .feat--sq .feat__img { max-width: none; aspect-ratio: 3 / 2; } }

.rows li { border-bottom: 1px solid var(--line); }
.rowi { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 13px 0; width: 100%; text-align: left; }
.rowi .tag { font: 600 11px/1.6 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rowi .tt { font: 400 17px/1.35 var(--serif); }
.rowi .rm { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rowi:hover .tt { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rowi .tag--pod::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pod); margin-right: 6px; vertical-align: 1px; }
@media (max-width: 640px) {
  .rowi { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .rowi .tag { grid-column: 1 / -1; }
}

/* Atskaņošanas poga */
.play { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.play i { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: all .15s; }
.play:hover i, .play.is-playing i { background: var(--ink); border-color: var(--ink); color: #fff; }
.play svg { width: 10px; height: 10px; }

/* ---------- Palīdzības saraksts (izvēršams) ---------- */
.helps li { border-bottom: 1px solid var(--line); }
.helps li:first-child { border-top: 1px solid var(--ink); }
.helps button { display: grid; grid-template-columns: 36px minmax(0, 1fr) 20px; gap: 12px; width: 100%; text-align: left; padding: 15px 0; align-items: baseline; }
.helps .n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.helps .s { font: 400 18px/1.4 var(--serif); }
.helps .pm { color: var(--muted); transition: transform .25s; text-align: center; }
.helps li.is-open .pm { transform: rotate(45deg); color: var(--ink); }
.helps .q { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.helps li.is-open .q { grid-template-rows: 1fr; }
.helps .q > div { overflow: hidden; }
.helps .q p { margin: 0 0 16px 48px; padding: 14px 16px; background: var(--soft); border-radius: var(--r-s); font: 400 17px/1.45 var(--serif); }
.helps .q p small { display: block; font: 500 12px/1.4 var(--sans); color: var(--muted); margin-bottom: 4px; }
.note { margin-top: 18px; font: 400 17px/1.5 var(--serif); color: var(--ink-2); }

/* ---------- Soļi ---------- */
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.step { background: var(--soft); border-radius: var(--r-m); padding: 20px 20px 18px; }
.step .meta { margin-bottom: 8px; display: flex; justify-content: space-between; }
.step h3 { font: 600 19px/1.25 var(--serif); margin-bottom: 6px; }
.step p { font-size: 15px; color: var(--ink-2); margin: 0; }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Pakalpojumi (kartītes) ---------- */
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.work { border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .3s var(--ease); }
.work:hover { border-color: var(--line-2); transform: translateY(-2px); }
.work .ill { background: var(--soft); aspect-ratio: 16 / 10; display: grid; place-items: center; }
.work .ill img { width: 62%; }
.work div { padding: 14px 16px 16px; }
.work h3 { font: 600 17px/1.25 var(--serif); margin-bottom: 6px; }
.work p { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.5; }
@media (max-width: 860px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .works { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 0 18px 6px; scrollbar-width: none; }
  .works::-webkit-scrollbar { display: none; }
  .work { flex: 0 0 76%; scroll-snap-align: start; }
}

/* ---------- Citātu kava ---------- */
.quotes { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 28px; align-items: center; background: #1f1d1a; color: #f4efe7; border-radius: var(--r-m); padding: 32px; }
.quotes .t-sec { color: #fff; margin-bottom: 8px; }
.quotes .lead { font-size: 15px; color: rgba(244, 239, 231, .7); margin-bottom: 18px; }
.qnav { display: flex; align-items: center; gap: 8px; }
.qnav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(244, 239, 231, .3); color: #fff; }
.qnav button:hover { border-color: #fff; }
.qnav span { font-size: 13px; color: rgba(244, 239, 231, .6); margin-left: 6px; font-variant-numeric: tabular-nums; }
.qdeck { position: relative; height: 300px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.qcard {
  position: absolute; inset: 0; border-radius: var(--r-m); padding: 26px; background: var(--c, #fffefc); color: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between; transition: transform .5s var(--ease), opacity .35s; cursor: grab;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
}
.qcard.is-drag { transition: none; cursor: grabbing; }
.qcard blockquote { margin: 0; font: 400 clamp(20px, 2.1vw, 25px)/1.35 var(--serif); }
.qcard blockquote::before { content: "„"; } .qcard blockquote::after { content: "”"; }
.qcard footer { display: flex; justify-content: space-between; align-items: end; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.qcard .who b { display: block; font-weight: 600; font-size: 14.5px; }
.qcard .who span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .quotes { grid-template-columns: 1fr; padding: 22px 18px; } .qdeck { height: 320px; } }

/* ---------- Laika josla ---------- */
.tl li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tl .y { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }
.tl .e { font: 400 17px/1.4 var(--serif); }
.tl .e span { display: block; font: 400 13.5px/1.4 var(--sans); color: var(--muted); margin-top: 2px; }

/* ---------- Atsauksmes ---------- */
.kind { columns: 2 280px; column-gap: 12px; }
.kind figure { break-inside: avoid; margin: 0 0 12px; background: var(--soft); border-radius: var(--r-m); padding: 20px; }
.kind blockquote { margin: 0 0 12px; font: 400 17px/1.5 var(--serif); }
.kind figcaption { font-size: 13.5px; color: var(--muted); }
.kind figcaption b { color: var(--ink); font-weight: 600; }
.kind .rest { display: none; }
.kind figure.is-open .rest { display: inline; }
.kind .rm { font-size: 13.5px; font-weight: 500; color: var(--accent); margin-left: 4px; }

/* ---------- Par mani ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 32px; }
.about h3 { font: 600 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.about h3:first-child { margin-top: 0; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.facts li span:last-child { color: var(--muted); text-align: right; }
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.badges button { background: #fff; border: 1px solid var(--line); border-radius: var(--r-s); aspect-ratio: 1; padding: 10px; display: grid; place-items: center; }
.badges button:hover { border-color: var(--ink); }
.badges img { max-height: 100%; width: auto; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* ---------- Grāmatas (vāki) ---------- */
.books { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.book img { aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .35); background: var(--soft); width: 100%; }
.book b { display: block; font: 600 15px/1.3 var(--serif); margin-top: 10px; }
.book span { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .books { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Kājene panelī ---------- */
.foot { margin-top: 80px; padding-top: 28px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.foot .t-sec { margin-bottom: 6px; }
.foot p { color: var(--ink-2); font-size: 15px; margin: 0; }
.foot small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .foot { grid-template-columns: 1fr; } }

/* ---------- Peldošā poga ---------- */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border-radius: 999px; padding: 12px 18px; font-size: 14.5px; font-weight: 500;
  box-shadow: 0 10px 26px -10px rgba(138, 47, 43, .7); transition: transform .3s var(--ease), opacity .3s;
}
.fab:hover { transform: translateY(-2px); }
.fab.is-hidden { opacity: 0; pointer-events: none; transform: translateY(10px); }
body.has-player .fab { bottom: 96px; }

/* ---------- Meklēšana ---------- */
dialog.find { border: 0; padding: 0; width: min(640px, 94vw); border-radius: var(--r-m); background: var(--panel); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .4); margin-top: 10vh; }
dialog.find::backdrop { background: rgba(29, 27, 24, .35); }
.find__in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.find__in input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; }
.find__in kbd { font-size: 11px; border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 6px; color: var(--muted); }
.find__res { max-height: 56vh; overflow-y: auto; padding: 6px; }
.find__res a { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 10px; border-radius: var(--r-s); align-items: baseline; }
.find__res a:hover, .find__res a.is-sel { background: var(--soft); }
.find__res .tag { font: 600 11px/1.6 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.find__res .tt { font: 400 16px/1.35 var(--serif); }
.find__res .tt small { display: block; font: 400 12.5px/1.4 var(--sans); color: var(--muted); margin-top: 2px; }
.find__empty { padding: 24px; text-align: center; color: var(--muted); font-size: 14.5px; }

/* ---------- Atskaņotājs (no site.js) ---------- */
.player {
  position: fixed; left: calc(50% + var(--side) / 2); bottom: 16px; z-index: 60; transform: translate(-50%, 140%); transition: transform .45s var(--ease);
  width: min(620px, calc(100% - var(--side) - 40px)); background: #1f1d1a; color: #f4efe7; border-radius: var(--r-m);
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 10px 9px 9px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.player.is-on { transform: translate(-50%, 0); }
.player img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.player .t { font: 600 14.5px/1.25 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .bar { height: 3px; background: rgba(244, 239, 231, .18); border-radius: 2px; margin-top: 7px; cursor: pointer; position: relative; }
.player .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--pod); border-radius: 2px; width: 0; }
.player .time { font-size: 11.5px; color: rgba(244, 239, 231, .55); margin-top: 5px; font-variant-numeric: tabular-nums; }
.player .ctrl { display: flex; gap: 4px; }
.player .ctrl button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.player .ctrl .pp { background: #f4efe7; color: #1f1d1a; }
.player .ctrl .x { color: rgba(244, 239, 231, .6); }
.player svg { width: 13px; height: 13px; }
@media (max-width: 980px) { .player { left: 50%; width: calc(100% - 20px); } }

dialog.lb { border: 0; padding: 0; background: transparent; max-width: min(1000px, 94vw); }
dialog.lb::backdrop { background: rgba(29, 27, 24, .8); }
dialog.lb img { border-radius: 6px; max-height: 86vh; width: auto; margin: 0 auto; background: #fff; }
dialog.lb p { color: #fff; text-align: center; margin: 12px 0 0; }
dialog.lb .close { position: fixed; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; background: #fff; font-size: 22px; }

/* ---------- Žurnāls (portal.js) ---------- */
.page-head { margin-bottom: 8px; }
.page-head .label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 8px; }
.page-head .display { font: 600 clamp(32px, 4vw, 44px)/1.1 var(--serif); letter-spacing: -0.012em; margin-bottom: 12px; }
.page-head .display em { font-style: normal; }
.page-head .lead { font: 400 17px/1.55 var(--serif); color: var(--ink-2); max-width: 40em; }
.toolbar { position: sticky; top: 0; z-index: 20; background: var(--panel); padding: 14px 0; border-bottom: 1px solid var(--ink); margin-bottom: 8px; }
.toolbar .wrap { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 0; max-width: none; }
.toolbar form, .toolbar .search { position: relative; flex: 0 1 260px; }
@media (max-width: 980px) { .toolbar { top: 60px; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.chip sup { font-size: 10.5px; color: var(--muted); top: 0; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[aria-pressed="true"] sup { color: rgba(255, 255, 255, .6); }
.search input { width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--panel); padding: 0 12px 0 36px; font-size: 14.5px; }
.search input:focus { outline: none; border-color: var(--ink); }
.search svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--muted); }
.year-group { padding-top: 28px; }
.year-group > h2 { font: 600 26px/1 var(--serif); margin-bottom: 10px; }
.entries li { border-bottom: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: 86px 96px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 13px 0; }
.entry .d { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.entry .k { font: 600 11px/1.6 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.entry .k[data-k="podkasts"]::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pod); margin-right: 6px; vertical-align: 1px; }
.entry h3 { font: 400 17px/1.35 var(--serif); }
.entry h3 a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry .ex { font-size: 14px; color: var(--ink-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry .num { font-size: 12px; color: var(--muted); margin-right: 6px; }
.entry .act { white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.entry .act .label { font-size: 12.5px; color: var(--muted); }
.entry .play i { width: 30px; height: 30px; }
.arrow-link { font-size: 14px; font-weight: 500; color: var(--accent); }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.more-wrap { display: flex; justify-content: center; padding: 28px 0 0; }
.more-wrap .btn { border: 1px solid var(--line-2); }
@media (max-width: 760px) {
  .entry { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .entry .meta-row { grid-column: 1 / -1; display: flex; gap: 10px; }
  .entry .body { grid-column: 1; }
  .entry .act { grid-column: 2; grid-row: 2; align-self: start; }
}

/* Raksts */
.article { max-width: 680px; margin: 0 auto; }
.article .back { display: inline-flex; margin-bottom: 28px; }
.article h1 { font: 600 clamp(30px, 4vw, 42px)/1.12 var(--serif); letter-spacing: -0.012em; margin: 10px 0 20px; }
.article .byline { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 32px; font-size: 14px; }
.article .byline img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.article-body { font: 400 19px/1.72 var(--serif); color: #2b2925; }
.article-body h3, .article-body h4 { font: 600 24px/1.25 var(--serif); margin: 40px 0 12px; color: var(--ink); }
.article-body p { margin: 0 0 1.15em; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(29, 27, 24, .3); }
.article-body figure { margin: 32px 0; }
.article-body figure img { border-radius: 6px; margin: 0 auto; }
.article-body figcaption { font: 400 13px/1.5 var(--sans); color: var(--muted); text-align: center; margin-top: 8px; }
.article-body blockquote { margin: 28px 0; padding-left: 20px; border-left: 2px solid var(--accent); font-size: 21px; color: var(--ink); }
.article-body ul, .article-body ol { padding-left: 1.2em; margin-bottom: 1.15em; }
.article-body ul { list-style: disc; } .article-body ol { list-style: decimal; }
.article-body iframe { width: 100%; border: 0; aspect-ratio: 16 / 9; height: auto; }
.article-foot, .article-nav { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--ink); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.article-nav { border-top: 1px solid var(--line); margin-top: 16px; }
.label { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.link { text-decoration: underline; text-underline-offset: 3px; }

.reveal { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; } * { transition-duration: .01ms !important; } }
