/* ======================================================================
   siauliutlk.lt — redakcinis (žurnalinis) šablonas
   Serif antraštės ir tekstas, sans-serif tarnybiniai elementai,
   plati tinklelio sistema su lipniu turinio sąrašu kairėje.
   ====================================================================== */

:root {
  /* popierius ir rašalas */
  --paper: #fbfaf7;
  --paper-2: #f3f1ea;
  --paper-3: #ffffff;
  --ink: #16181c;
  --ink-2: #3c4148;
  --muted: #6d7279;
  --rule: #ddd8cc;
  --rule-strong: #c3bcab;

  /* akcentas */
  --accent: #134a6b;
  --accent-ink: #0d3852;
  --accent-soft: #e8eff4;

  /* įspėjimai */
  --warn-bg: #fdf4e3;
  --warn-rule: #d9b877;
  --warn-ink: #6b5418;

  /* tipografija */
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* matmenys */
  --shell: 1180px;
  --measure: 70ch;
  --gut: 24px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14161a;
    --paper-2: #1b1e24;
    --paper-3: #1b1e24;
    --ink: #eceae4;
    --ink-2: #c9ccd2;
    --muted: #979da6;
    --rule: #2e333b;
    --rule-strong: #454c57;
    --accent: #7db9dd;
    --accent-ink: #a8d2ec;
    --accent-soft: #16303f;
    --warn-bg: #2b2413;
    --warn-rule: #6d5a2c;
    --warn-ink: #e3cd96;
  }
}

:root[data-theme="dark"] {
  --paper: #14161a;
  --paper-2: #1b1e24;
  --paper-3: #1b1e24;
  --ink: #eceae4;
  --ink-2: #c9ccd2;
  --muted: #979da6;
  --rule: #2e333b;
  --rule-strong: #454c57;
  --accent: #7db9dd;
  --accent-ink: #a8d2ec;
  --accent-soft: #16303f;
  --warn-bg: #2b2413;
  --warn-rule: #6d5a2c;
  --warn-ink: #e3cd96;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--gut);
  top: 10px;
  z-index: 60;
  background: var(--paper-3);
  padding: 10px 16px;
  border: 1px solid var(--accent);
  font-family: var(--sans);
  font-size: 15px;
}

/* ======================================================================
   Masthead
   ====================================================================== */

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 14px;
}

.masthead-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.masthead-brand img {
  width: 38px;
  height: 38px;
}

.masthead-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.1;
}

.masthead-tagline {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-top: 3px;
}

.masthead-flag {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.masthead-nav {
  border-top: 1px solid var(--rule);
}

.masthead-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 30px;
}

.masthead-nav a {
  display: block;
  padding: 11px 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.masthead-nav a:hover { color: var(--accent); }

.masthead-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ======================================================================
   Breadcrumbs
   ====================================================================== */

.breadcrumbs {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.breadcrumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--rule-strong);
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ======================================================================
   Antraštinis blokas
   ====================================================================== */

.page-head {
  padding: 26px 0 30px;
  border-bottom: 3px double var(--rule-strong);
  margin-bottom: 38px;
}

.kicker {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5.2vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 20ch;
}

.standfirst {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
  margin: 20px 0 0;
  max-width: 58ch;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 24px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.byline a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
}

.byline a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.byline-sep { color: var(--rule-strong); }

/* ======================================================================
   Tinklelis: turinys + straipsnis
   ====================================================================== */

.layout {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-bottom: 64px;
}

.toc {
  position: sticky;
  top: 24px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.toc-title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.toc li {
  margin: 0 0 11px;
  counter-increment: toc;
  display: flex;
  gap: 9px;
}

.toc li::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--rule-strong);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  padding-top: 2px;
}

.toc a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.toc a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.article { min-width: 0; }

/* ======================================================================
   Straipsnio turinys
   ====================================================================== */

.article > p,
.article > ul,
.article > ol,
.article > h2,
.article > h3,
.article > .source-note {
  max-width: var(--measure);
}

.article p { margin: 0 0 22px; }

.article-lead > p:first-of-type::first-letter {
  float: left;
  font-size: 3.9em;
  line-height: 0.84;
  padding: 6px 10px 0 0;
  font-weight: 400;
  color: var(--accent);
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(25px, 3.1vw, 33px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 52px 0 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin: 34px 0 12px;
}

ul, ol { margin: 0 0 24px; padding-left: 1.3em; }
li { margin-bottom: 10px; }
li::marker { color: var(--accent); }

strong { font-weight: 700; }
em { font-style: italic; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 44px 0; }

figure {
  margin: 34px 0;
  max-width: none;
}

figure img {
  width: 100%;
  border: 1px solid var(--rule);
}

figcaption {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--rule-strong);
  max-width: 62ch;
}

blockquote {
  margin: 36px 0;
  padding: 0 0 0 26px;
  border-left: 3px solid var(--accent);
  font-style: italic;
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

blockquote p:last-child { margin-bottom: 0; }
blockquote strong { font-style: normal; }

.warning {
  margin: 36px 0;
  padding: 20px 24px;
  background: var(--warn-bg);
  border-top: 2px solid var(--warn-rule);
  border-bottom: 1px solid var(--warn-rule);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--warn-ink);
  max-width: var(--measure);
}

.warning p:last-child { margin-bottom: 0; }
.warning strong { color: inherit; }

.source-note {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

ul.source-note li { margin-bottom: 9px; }

/* ======================================================================
   Lentelės
   ====================================================================== */

.table-scroll {
  overflow-x: auto;
  margin: 32px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
}

caption {
  caption-side: top;
  text-align: left;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 0;
}

thead th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 10px 16px 10px 0;
  vertical-align: bottom;
  text-align: left;
}

tbody th, tbody td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
}

tbody th {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 0; }

th:last-child, td:last-child { padding-right: 0; }

/* ======================================================================
   Reitingas
   ====================================================================== */

.disclosure {
  margin: 30px 0;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: var(--measure);
}

.disclosure p:last-child { margin-bottom: 0; }

.rating-list {
  list-style: none;
  margin: 34px 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.rating-item {
  display: grid;
  grid-template-columns: 52px 108px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 20px;
}

.rating-pos {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  color: var(--rule-strong);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rating-item img {
  width: 108px;
  height: 58px;
  object-fit: contain;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 4px;
}

.rating-name {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.rating-offer {
  display: block;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 3px;
}

.rating-score {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  line-height: 1.3;
}

.rating-score b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 27px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  line-height: 1.1;
}

/* ======================================================================
   Mygtukai
   ====================================================================== */

.btn-cta,
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: var(--accent);
  color: var(--paper);
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 12px 22px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .15s ease, color .15s ease;
}

.btn-cta:hover,
.btn:hover {
  background: transparent;
  color: var(--accent);
}

.btn-cta-sm {
  padding: 8px 14px;
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

/* ======================================================================
   Vidinių nuorodų kortelės
   ====================================================================== */

.link-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0;
  margin: 32px 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.link-cards li {
  margin: 0;
  padding: 18px 22px 18px 0;
  border-bottom: 1px solid var(--rule);
}

.link-cards a {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15.5px;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.link-cards span {
  display: block;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 6px;
}

/* ======================================================================
   Autoriaus blokas
   ====================================================================== */

.author-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 28px;
  margin: 56px 0 0;
  padding: 30px 0 0;
  border-top: 3px double var(--rule-strong);
  scroll-margin-top: 20px;
}

.author-card img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.author-card h2 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}

.author-name {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 4px;
}

.author-role {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.author-body p {
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 64ch;
}

.author-body p:last-child { margin-bottom: 0; }

/* ======================================================================
   Poraštė
   ====================================================================== */

.site-footer {
  background: var(--paper-2);
  border-top: 3px double var(--rule-strong);
  padding: 46px 0 32px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 34px;
}

.footer-title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.site-footer p { margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.site-footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.footer-author {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-author img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
  flex: 0 0 auto;
}

.footer-author p { font-size: 13.5px; margin-bottom: 8px; }

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}

.footer-bottom p { margin: 0; }

.age-badge {
  display: inline-block;
  border: 1px solid var(--warn-rule);
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 1px 9px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-right: 8px;
}

/* ======================================================================
   404
   ====================================================================== */

.error-page {
  padding: 70px 0 90px;
  max-width: 640px;
}

.error-code {
  font-family: var(--serif);
  font-size: clamp(76px, 15vw, 132px);
  line-height: 0.9;
  color: var(--rule-strong);
  margin: 0 0 12px;
  letter-spacing: -0.04em;
}

.error-page h1 { max-width: none; }

.error-page p { max-width: 54ch; }

.error-page .btn { margin-top: 10px; }

.error-links {
  list-style: none;
  padding: 24px 0 0;
  margin: 34px 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-family: var(--sans);
  font-size: 14px;
}

.error-links li { margin: 0; }

/* ======================================================================
   Adaptyvumas
   ====================================================================== */

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc {
    position: static;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rule);
  }
  .toc ol {
    columns: 2;
    column-gap: 32px;
  }
  .toc li { break-inside: avoid; }
}

@media (max-width: 760px) {
  :root { --gut: 16px; }

  body { font-size: 18px; }

  .masthead-top { padding: 14px 0 12px; }
  .masthead-flag { display: none; }

  .masthead-nav ul {
    gap: 0 20px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .masthead-nav ul::-webkit-scrollbar { display: none; }
  .masthead-nav a { white-space: nowrap; font-size: 12px; }

  .page-head { padding: 20px 0 24px; margin-bottom: 28px; }

  .article-lead > p:first-of-type::first-letter {
    font-size: 3.2em;
    padding-right: 8px;
  }

  .rating-item {
    grid-template-columns: 38px 88px minmax(0, 1fr);
    grid-template-areas:
      "pos logo name"
      "score score score"
      "cta cta cta";
    gap: 12px 14px;
    padding: 20px 0;
  }
  .rating-pos { grid-area: pos; font-size: 26px; }
  .rating-item img { grid-area: logo; width: 88px; height: 48px; }
  .rating-body { grid-area: name; }
  .rating-score {
    grid-area: score;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 8px;
  }
  .rating-score b { display: inline; font-size: 21px; }
  .rating-cta { grid-area: cta; }
  .rating-cta .btn-cta { display: block; width: 100%; }

  .author-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .author-card img { width: 92px; height: 92px; }

  .link-cards li { padding-right: 0; }

  blockquote { font-size: 18px; padding-left: 18px; }
}

@media print {
  .masthead-nav, .toc, .disclosure, .rating-cta, .site-footer, .breadcrumbs { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .layout { grid-template-columns: 1fr; }
  a { text-decoration: none; color: #000; }
}
