:root {
  --bg: #0d0d11; --panel: #15151b; --panel2: #1c1c24; --line: #2a2a34;
  --text: #f1f1f5; --muted: #9b9ba8; --accent: #7f88e8; --accent2: #b0b6f5; --on-accent: #0d0e1c;
  --up: #6fcf97; --down: #e07a8a; --new: #b0b6f5;
  --serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f6f9; --panel: #fff; --panel2: #eeeef4; --line: #e0e0ea;
    --text: #1a1a22; --muted: #6a6a78; --accent: #4a52c4; --accent2: #3a41a6; --on-accent: #fff;
    --up: #2e7d52; --down: #b3384c; --new: #3a41a6;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 650; letter-spacing: .14em; font-size: 19px; }
.logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-size: 9px; padding-inline-start: 2px; }
.regions { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; order: 5; flex: 1 0 100%; padding-bottom: 6px; }
.regions a { padding: 5px 12px; border-radius: 2px; color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.regions a:hover { color: var(--text); }
.regions a[aria-current] { color: var(--accent2); box-shadow: inset 0 -1px var(--accent); }
/* language menu: a <details> with every language by its own name */
.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; padding: 5px 12px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; border: 1px solid var(--line); border-radius: 2px; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: "▾"; margin-inline-start: 8px; }
.langs summary:hover, .langs[open] summary { color: var(--text); border-color: var(--accent); }
.langs ul { position: absolute; z-index: 30; inset-inline-end: 0; top: calc(100% + 6px); width: min(600px, calc(100vw - 40px)); max-height: 70vh; overflow-y: auto; margin: 0; padding: 8px; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 18px 50px #0008; }
.langs li a { display: block; padding: 7px 10px; border-radius: 2px; color: var(--text); font-size: 14px; }
.langs li a:hover { background: var(--panel2); }
.langs li a[aria-current] { color: var(--accent2); background: var(--panel2); font-weight: 600; }
.search { position: relative; margin-inline-start: auto; flex: 0 1 300px; min-width: 0; }
.search input { width: 100%; height: 38px; padding: 0 14px 0 38px; color: var(--text); font: inherit; font-size: 14px; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239b9ba8' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat 14px 50%; border: 1px solid var(--line); border-radius: 2px; outline: none; transition: border-color .15s; }
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); }
.results { position: absolute; z-index: 20; top: calc(100% + 6px); inset-inline-end: 0; width: min(420px, calc(100vw - 40px)); margin: 0; padding: 6px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 18px 50px #0008; }
.results a { display: flex; gap: 12px; align-items: center; padding: 6px; border-radius: 2px; }
.results a:hover, .results a.on { background: var(--panel2); }
.results img { width: 44px; height: 44px; object-fit: cover; flex: none; border-radius: 2px; }
.results span { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.results b, .results small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.results small, .results .none { color: var(--muted); font-size: 13px; }
.results .none { padding: 10px; }
@media (max-width: 640px) { .search { flex: 1 0 100%; order: 3; margin-inline-start: 0; } .langs { margin-inline-start: auto; } .brand { font-size: 17px; } }

.hero { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 36px 0 20px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
h1 { margin: 10px 0 12px; font-family: var(--serif); font-weight: 650; font-size: clamp(32px, 5.5vw, 50px); line-height: 1.08; letter-spacing: -.01em; overflow-wrap: anywhere; hyphens: auto; }
/* the home title sits in a 340px column beside the player: keep long words (et "Populaarseimad", fi, hu...) inside it */
.hero-text { min-width: 0; }
.hero h1 { font-size: clamp(30px, 4.6vw, 42px); }
.sub { margin: 0; color: var(--muted); }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 24px 60px #0007; }
.yt-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-facade i { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; border: 1px solid #fffc; background: #0006; backdrop-filter: blur(4px); transition: background .15s, border-color .15s; }
.yt-facade i::after { content: ""; position: absolute; left: 26px; top: 21px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.yt-facade:hover i, .yt-facade:focus-visible i { background: var(--accent); border-color: var(--accent); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.np { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 2px; }
.np-label { color: var(--accent); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .22em; width: 100%; }
.np strong { font-family: var(--serif); font-weight: 650; font-size: 20px; }
.np #np-artist { color: var(--muted); }
.btn { margin-inline-start: auto; display: inline-block; padding: 9px 20px; border-radius: 2px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.btn:hover { filter: brightness(1.1); }
@media (min-width: 900px) {
  .hero { grid-template-columns: 340px 1fr; align-items: start; gap: 32px; padding-top: 40px; }
  .hero-text { padding-top: 12px; }
}

.sect-h { margin: 36px 0 12px; font-family: var(--serif); font-weight: 650; font-size: 22px; }
.sect-h + .chart { margin-top: 0; }
.chart { list-style: none; margin: 8px 0 56px; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 38px 44px 64px 1fr auto auto; align-items: center; gap: 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); border-inline-start: 2px solid transparent; }
.row:hover { background: var(--panel); }
.row.active { border-inline-start-color: var(--accent); background: var(--panel); }
.rk { font-family: var(--serif); font-size: 24px; font-weight: 650; text-align: end; font-variant-numeric: tabular-nums; color: var(--accent2); }
.tr { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tr.up { color: var(--up); } .tr.down { color: var(--down); } .tr.same { color: var(--muted); font-size: 9px; } .tr.new { color: var(--new); font-size: 11px; }
.th { position: relative; padding: 0; border: 0; background: #000; border-radius: 2px; overflow: hidden; cursor: pointer; aspect-ratio: 1; }
.th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-style: normal; background: #0007; opacity: 0; transition: opacity .15s; }
.th:hover i, .th:focus-visible i, .row.active .th i { opacity: 1; }
.info { min-width: 0; display: flex; flex-direction: column; }
.ti { font-family: var(--serif); font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti:hover { color: var(--accent2); }
.ar { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw { font-variant-numeric: tabular-nums; font-weight: 600; text-align: end; }
.vw small, .wk { color: var(--muted); font-size: 12px; font-weight: 400; }
.wk { min-width: 44px; text-align: end; }
@media (max-width: 640px) {
  .row { grid-template-columns: 28px 60px 1fr; gap: 4px 12px; }
  .row .tr { display: none; }
  .row .vw, .row .wk { display: none; }
  .th { width: 60px; }
}

.post { padding: 32px 0 64px; max-width: 820px; }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 32px; align-items: start; }
.post-grid .post { max-width: none; min-width: 0; }
.side { position: sticky; top: 16px; padding: 32px 0 24px; }
.side .card { margin: 0; padding: 18px; }
.side .card h2 { font-size: 18px; margin-bottom: 12px; }
.side .mini { grid-template-columns: minmax(0, 1fr); }
.side .mini a { min-width: 0; }
@media (max-width: 900px) { .post-grid { display: block; } .side { position: static; padding: 0 0 48px; } }
.crumbs { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; margin: 0 8px; opacity: .6; }
.crumbs a:hover { color: var(--accent2); }
.crumbs [aria-current] { color: var(--text); overflow-wrap: anywhere; }
.page h2 { margin: 32px 0 10px; font-family: var(--serif); font-weight: 650; font-size: 22px; }
.page h3 { margin: 22px 0 6px; font-size: 17px; }
.page p, .page li { color: var(--text); }
.page ul, .page .steps { padding-inline-start: 22px; }
.page li { margin: 6px 0; }
.updated { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.notfound { padding: 72px 0 96px; text-align: start; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 14px; }
.foot-nav a, .linklike { color: var(--muted); font: inherit; font-size: 13px; letter-spacing: .06em; }
.foot-nav a:hover, .linklike:hover { color: var(--accent2); }
.linklike { padding: 0; border: 0; background: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
button.btn { font-family: inherit; border: 0; cursor: pointer; margin-inline-start: 0; }
button.btn.ghost { border: 1px solid var(--line); }
.consent { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto; padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 18px 50px #0007; }
.consent[hidden] { display: none; }
.consent p { flex: 1 1 320px; margin: 0; font-size: 14px; color: var(--muted); }
.consent p a { color: var(--accent2); text-decoration: underline; }
.consent-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.post h1 { font-size: clamp(30px, 5vw, 44px); }
.by { display: block; color: var(--accent2); font-family: var(--serif); font-size: .55em; font-weight: 500; letter-spacing: 0; margin-top: 6px; }
.converter { margin: 20px 0 0; background: var(--panel); border-radius: 2px; overflow: hidden; }
.converter iframe { display: block; width: 100%; height: var(--dh, 700px); margin-top: var(--dm, -238px); border: 0; color-scheme: light; }
.converter { height: 462px; }
@media (prefers-color-scheme: dark) { .converter iframe { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; } }
@media (max-width: 600px) { .converter iframe { height: var(--mh, 740px); margin-top: var(--mm, -268px); } .converter { height: 475px; } }
.yt-link { margin: 14px 0 0; } .yt-link .btn { margin: 0; background: transparent; color: var(--text); border: 1px solid var(--line); } .yt-link .btn:hover { border-color: var(--accent); color: var(--accent2); }
.text { margin: 20px 0; color: var(--text); } .text p { margin: 0 0 10px; }
.card { margin: 24px 0; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; }
.card h2 { margin: 0 0 16px; font-family: var(--serif); font-weight: 650; font-size: 21px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; background: var(--panel2); border-radius: 2px; }
.stat span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; } .stat strong { font-family: var(--serif); font-weight: 650; font-size: 24px; }
.spark { width: 100%; max-width: 420px; height: 70px; margin-top: 12px; } .spark path { stroke: var(--accent); stroke-width: 1.5; } .spark circle { fill: var(--accent2); }
details { margin-top: 12px; } summary { cursor: pointer; color: var(--muted); font-size: 14px; }
table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 8px; text-align: start; border-bottom: 1px solid var(--line); } th { color: var(--muted); font-weight: 500; }
.mini { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.mini a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 2px; background: var(--panel2); }
.mini a:hover { outline: 1px solid var(--accent); }
.mini img { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 2px; }
.mini span { min-width: 0; display: flex; flex-direction: column; } .mini b, .mini small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mini small { color: var(--muted); }
.foot { padding: 24px 16px 48px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }



/* right-to-left languages (Arabic, Hebrew): mirror what logical properties do not cover */
[dir="rtl"] .crumbs li + li::before { content: "‹"; }
[dir="rtl"] .search input { padding: 0 38px 0 14px; background-position: calc(100% - 14px) 50%; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.actions .yt-link { margin: 0; }
.share { display: flex; gap: 8px; }
.sh { display: grid; place-items: center; width: 38px; height: 38px; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 2px; }
.sh:hover { border-color: var(--accent); color: var(--accent2); }

.post > .share { margin: 14px 0 12px; }

.post > .actions { margin: 14px 0 12px; }
