:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f3efe9;
  --text: #1f1a17;
  --muted: #6b625b;
  --line: #e6dfd6;
  --accent: #7a1f2b;
  --accent-ink: #ffffff;
  --accent-soft: #f5e6e7;
  --focus: #b8323f;
  --shadow: 0 1px 2px rgba(31, 26, 23, .06), 0 4px 16px rgba(31, 26, 23, .05);
  --radius: 14px;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151212;
    --surface: #1d1919;
    --surface-2: #252020;
    --text: #efe9e4;
    --muted: #a89f98;
    --line: #342d2c;
    --accent: #e0707c;
    --accent-ink: #1a0f10;
    --accent-soft: #3a2326;
    --focus: #f0909a;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px/1 var(--serif); letter-spacing: -.01em; }
.brand-mark { width: 26px; height: 26px; }
.brand-mark path:first-child { fill: var(--accent); }
.brand-line { fill: none; stroke: var(--bg); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dot { color: var(--accent); }
.header-nav { display: flex; gap: 22px; font-size: 15px; }
.header-nav a { text-decoration: none; color: var(--muted); }
.header-nav a:hover { color: var(--text); }

/* hero */
.hero { padding: 64px 0 40px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
h1 { margin: 0; font-size: clamp(32px, 5.4vw, 54px); max-width: 17ch; }
.lead { margin: 20px 0 0; max-width: 62ch; font-size: clamp(17px, 2vw, 19px); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 36px 0 0; max-width: 720px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 2px 0 0; font: 600 28px/1.1 var(--serif); font-variant-numeric: tabular-nums; }

/* catalog */
.catalog { padding: 32px 0 56px; }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.catalog-head h2 { margin: 0; font-size: 30px; }
.result-count { margin: 0; color: var(--muted); font-size: 15px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 14px; }
.search { position: relative; flex: 1 1 320px; }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
input[type="search"], select {
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
input[type="search"] { padding: 0 14px 0 40px; }
select { padding: 0 36px 0 12px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.select { flex: 0 1 180px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); cursor: pointer; padding: 0 4px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .n { opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }

.year { margin: 0 0 14px; }
.year + .year { margin-top: 36px; }
.year-h { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 600 22px/1 var(--serif); }
.year-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.thumb {
  position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); border: 0; padding: 0; width: 100%;
  cursor: pointer; overflow: hidden; color: inherit; font: inherit;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.thumb.no-img, .placeholder {
  background:
    radial-gradient(circle at 18% 28%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    radial-gradient(circle at 82% 82%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 50%),
    var(--surface-2);
}
.thumb:hover img { transform: scale(1.03); }
.thumb .play {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(122, 31, 43, .92); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.thumb .play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.thumb .dur, .placeholder .dur {
  position: absolute; right: 10px; bottom: 10px; background: rgba(20, 16, 16, .82); color: #fff;
  font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.placeholder {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: 14px; padding: 16px;
}
.placeholder .ph-cat { display: block; font: 600 16px/1.3 var(--serif); color: var(--text); margin-bottom: 4px; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.card-title { margin: 0; font: 600 17px/1.35 var(--serif); letter-spacing: -.005em; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.badge { border-radius: 6px; padding: 0 7px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.badge:hover { text-decoration: underline; }
.hits { list-style: none; margin: 6px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.hits a { display: block; text-decoration: none; font-size: 13.5px; line-height: 1.45; border-radius: 8px; }
.hits a:hover .hit-title { color: var(--accent); }
.hit-title { display: flex; align-items: baseline; gap: 6px; font-weight: 600; }
.hit-time { flex: none; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.hit-text { display: block; color: var(--muted); }
.hit-text mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); border-radius: 3px; padding: 0 1px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 4px; font-size: 13.5px; color: var(--muted); }
.meta span { white-space: nowrap; }
.lang-tag { border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* about */
.about { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0; }
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; }
.about h2 { margin: 0 0 14px; font-size: 28px; }
.about p { margin: 0 0 12px; max-width: 62ch; }
.about-note { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 22px; align-self: start; }
.about-note h3 { margin: 0 0 8px; font-size: 18px; }
.about-note p { margin: 0; font-size: 15px; }

.site-footer { padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-row > span:first-child { font: 600 16px var(--serif); color: var(--text); }

/* player */
.player { width: min(1000px, 100% - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.player::backdrop { background: rgba(15, 10, 10, .72); }
.player-inner { padding: 14px 16px 16px; }
.player-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.player-head h3 { margin: 4px 0 0; font-size: 19px; }
.icon-btn { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.player-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-meta { margin: 10px 0 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.player-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.player-link:hover { text-decoration: underline; }

/* gidų sąrašas */
.guides { padding: 8px 0 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 30px; }
.section-head p { margin: 0; color: var(--muted); max-width: 64ch; font-size: 15px; }
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.guide-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.guide-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.guide-card h3 { margin: 0; font-size: 18px; }
.guide-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.guide-n { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* pranešimo ir gido puslapiai */
.page { padding: 28px 0 56px; }
.back { display: inline-block; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--text); }
.loading { color: var(--muted); }
.page-head { margin-bottom: 24px; }
.page-head .eyebrow { margin-bottom: 8px; }
.page-title { margin: 0; font-size: clamp(26px, 3.6vw, 38px); max-width: 30ch; }
.page-meta { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.page-head .lead { margin-top: 12px; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.page-grid.single { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.page-main { min-width: 0; max-width: 780px; }
.page-side { position: sticky; top: 76px; max-height: calc(100dvh - 92px); overflow: auto; display: flex; flex-direction: column; gap: 20px; }
.page-side:empty { display: none; }

.video { aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; scroll-margin-top: 76px; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video .thumb { height: 100%; }
.video-none { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); text-align: center; padding: 16px; }
.video-none p { margin: 0; }

.notice { margin: 0 0 24px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; font-size: 14.5px; }
.k-block { margin-bottom: 36px; }
.k-block > h2, .guide-body h2, .sources h2 { margin: 0 0 14px; font-size: 24px; scroll-margin-top: 76px; }
.k-summary { margin: 0 0 12px; font-size: 17px; }
.k-part { margin: 26px 0 10px; font: 600 13px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.k-sec { padding: 16px 0; border-top: 1px solid var(--line); scroll-margin-top: 76px; }
.k-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.k-sec h3 { margin: 0; font-size: 18px; }
.k-sec ul { margin: 8px 0 0; padding-left: 20px; }
.k-sec li { margin: 4px 0; }
.time {
  flex: none; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface);
  color: var(--accent); border-radius: 999px; padding: 1px 9px 1px 7px; font: 600 12.5px/1.6 var(--sans); font-variant-numeric: tabular-nums; cursor: pointer;
}
.time:hover { border-color: var(--accent); }
.time-icon svg { width: 10px; height: 10px; fill: currentColor; display: block; }
.time-off { color: var(--muted); cursor: default; padding: 1px 9px; }
.takeaways { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 12px; }
.takeaways ol { margin: 0; padding-left: 22px; }
.takeaways li { margin: 0 0 8px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 18px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 600; font-size: 13.5px; }
tbody tr:last-child td { border-bottom: 0; }

.toc, .side-guides { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 12px; }
.toc h2, .side-guides h2 { margin: 0 0 10px; font: 600 13px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc-list, .toc-extra, .side-guides ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.toc-list li, .toc-extra li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.toc-list li:first-child { border-top: 0; }
.toc-list li.toc-part { display: block; padding: 12px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--accent); line-height: 1.35; }
.toc-extra { margin-top: 6px; }
.toc a, .side-guides a { text-decoration: none; line-height: 1.4; }
.toc a:hover, .side-guides a:hover { color: var(--accent); }
.side-guides li { padding: 4px 0; }
.side-guides a { color: var(--accent); font-weight: 500; }

.guide-body { font-size: 16.5px; }
.guide-body h2 { margin-top: 36px; }
.guide-body h2:first-child { margin-top: 0; }
.guide-body h3 { margin: 22px 0 8px; font-size: 19px; }
.guide-body p { margin: 0 0 14px; }
.guide-body ul, .guide-body ol { margin: 0 0 16px; padding-left: 22px; }
.guide-body li { margin: 0 0 7px; }
.callout { margin: 0 0 18px; padding: 12px 16px; background: var(--surface-2); border-radius: 10px; font-size: 15px; }
.ref {
  display: inline-block; margin: 0 1px; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font: 600 12px/1.7 var(--sans); font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; vertical-align: 1px;
}
a.ref:hover { background: var(--accent); color: var(--accent-ink); }
.ref-help { margin: 0 0 22px; font-size: 14px; color: var(--muted); }

.sources { margin-top: 44px; padding-top: 8px; border-top: 1px solid var(--line); }
.sources h3 { margin: 28px 0 12px; font-size: 18px; }
.src-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.src { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.src-head { display: flex; gap: 10px; align-items: baseline; }
.src-head a { font: 600 16px/1.35 var(--serif); text-decoration: none; }
.src-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.src-nr { flex: none; min-width: 26px; text-align: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; }
.src-meta { margin: 4px 0 0 36px; font-size: 13px; color: var(--muted); }
.src-secs { list-style: none; margin: 8px 0 0 36px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.src-secs a { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px 2px 3px; }
.src-secs a:hover { border-color: var(--accent); }
.src-secs .time { padding: 0 7px; border: 0; background: var(--accent-soft); font-size: 12px; }

@media (max-width: 760px) {
  .hero { padding: 40px 0 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .year-grid { grid-template-columns: 1fr; }
  .select { flex: 1 1 140px; }
  .header-nav { gap: 16px; }
  .page-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .page-side { position: static; max-height: none; margin-top: 12px; }
  .page-side .toc { display: none; }
  .src-meta, .src-secs { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .thumb img { transition: none; }
}
