/* Puhivo web · "video catalogue" design (Öneri 2): a dark stage band on top (header + billboard or player),
   a light catalogue / practice area below. Colours follow the iOS app (Theme.swift). System font. */
:root {
  color-scheme: light;
  --ground: #f4f5f7;
  --surface: #ffffff;
  --raised: #eceef2;
  --line: #e4e6eb;
  --line-strong: #c9ced8;
  --ink: #0f1217;
  --on-ink: #ffffff;
  --body: #3d434d;
  --muted: #5a606b;
  --accent: #2448c8;
  --accent-fill: #2d5be3;
  --accent-fill-hover: #2448c8;
  --accent-soft: #e8edfb;
  --on-accent: #ffffff;
  --success: #1e7f55;
  --success-soft: #e6f4ee;
  --danger: #c0321b;
  --danger-soft: #fbece9;
  --warm: #94501a;
  --lv-a1: #2448c8; --lv-a1-soft: #e8edfb;
  --lv-a2: #4a3fd6; --lv-a2-soft: #eeecfc;
  --lv-b1: #94501a; --lv-b1-soft: #f7ede4;
  --filterbar: rgba(244, 245, 247, 0.94);

  /* the stage (dark band) looks the same in light and dark mode */
  --stage: #0b0e16;
  --stage-line: rgba(255, 255, 255, 0.12);
  --stage-ink: #f4f6fb;
  --stage-body: #c3c9d6;
  --stage-muted: #9aa3b5;
  --stage-accent: #9db2ff;
  --brand: linear-gradient(120deg, #2d5be3 0%, #4a3fd6 100%);

  --pad: clamp(16px, 4.45vw, 64px);
  --max: 1440px;
  --r: 10px;
  --r-s: 6px;
  --font: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Tamil", "Noto Sans Sinhala", "Noto Sans Thai", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0e1116;
    --surface: #171b23;
    --raised: #222733;
    --line: #2a303b;
    --line-strong: #3d4453;
    --ink: #f3f4f6;
    --on-ink: #0e1116;
    --body: #c9ced8;
    --muted: #a0a7b4;
    --accent: #8ea6ff;
    --accent-fill: #3558e0;
    --accent-fill-hover: #4466ea;
    --accent-soft: #1e2846;
    --success: #3dd39b;
    --success-soft: #14302a;
    --danger: #ff7a66;
    --danger-soft: #3a1f1b;
    --warm: #f0a868;
    --lv-a1: #a9bbff; --lv-a1-soft: #1e2846;
    --lv-a2: #b9b2ff; --lv-a2-soft: #262247;
    --lv-b1: #f0b27a; --lv-b1-soft: #3a2a1c;
    --filterbar: rgba(14, 17, 22, 0.94);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.loading body { opacity: 0; animation: reveal 0s 1.2s forwards; }
@keyframes reveal { to { opacity: 1; } }
body { margin: 0; background: var(--ground); color: var(--body); font: 16px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.15; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 2px; }
.stage :focus-visible { outline-color: #9db2ff; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
.skip { position: absolute; inset-inline-start: 12px; top: -100px; z-index: 50; padding: 10px 16px; border-radius: 8px; background: #fff; color: #0f1217; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- stage + header ---------- */
.stage { background: var(--stage); color: var(--stage-body); }
.top { position: relative; z-index: 3; display: flex; align-items: center; gap: 28px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--stage-ink); text-decoration: none; font-weight: 750; font-size: 1.1875rem; letter-spacing: -0.01em; }
.logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 4px; margin-inline-end: auto; }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 22px 10px; color: var(--stage-muted); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--stage-ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 10px; bottom: 12px; height: 2px; border-radius: 2px; background: var(--brand); }
.nav svg.i { width: 14px; height: 14px; }
.lang { position: relative; display: inline-flex; align-items: center; color: var(--stage-body); }
.lang svg { position: absolute; inset-inline-start: 11px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; pointer-events: none; }
.lang select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  min-height: 40px; max-width: 46vw; padding-block: 8px; padding-inline: 38px 32px; border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.07); border: 1px solid var(--stage-line); color: var(--stage-ink); font-size: 0.9375rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--stage-muted) 50%), linear-gradient(135deg, var(--stage-muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
[dir="rtl"] .lang select { background-position: 11px 52%, 16px 52%; }
.lang select option { color: #0f1217; background: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-weight: 650; text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-fill-hover); }
.btn.primary.is-done { background: var(--success); border-color: var(--success); }
.btn.on-dark { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.24); color: var(--stage-ink); }
.btn.on-dark:hover { background: rgba(255, 255, 255, 0.14); }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 0.9375rem; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.link-button { background: none; border: 0; padding: 8px 0; color: var(--accent); font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button.quiet { color: var(--muted); font-weight: 500; }
.textlink { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; font-weight: 650; font-size: 0.9375rem; text-decoration: none; color: var(--accent); }
.textlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.textlink svg.i { width: 15px; height: 15px; }
[dir="rtl"] .textlink svg.i, [dir="rtl"] .arrows svg { transform: scaleX(-1); }
/* Finnish text keeps dir="ltr" but sits on the right edge of an RTL page */
[dir="rtl"] .info h1, [dir="rtl"] .phrases ul, [dir="rtl"] .tile-fi, [dir="rtl"] .q-info strong, [dir="rtl"] .pager strong, [dir="rtl"] .speak-list .sentence, [dir="rtl"] .sentences .sentence { text-align: right; }

/* ---------- level tag ---------- */
.lv { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; font-size: 0.75rem; font-weight: 750; letter-spacing: 0.01em; }
.lv.a1 { color: var(--lv-a1); background: var(--lv-a1-soft); }
.lv.a2 { color: var(--lv-a2); background: var(--lv-a2-soft); }
.lv.b1 { color: var(--lv-b1); background: var(--lv-b1-soft); }
.stage .lv { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- episode tile ---------- */
.cv { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-s); overflow: hidden; background: var(--raised); }
.cv img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.cv-video { position: absolute; inset-inline-end: 6px; bottom: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: rgba(8, 10, 16, 0.78); color: #fff; }
.cv-video svg.i { width: 12px; height: 12px; margin-inline-start: 2px; }
.tile { display: grid; gap: 10px; align-content: start; min-width: 0; text-decoration: none; color: var(--body); }
a.tile:hover .cv { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.tile-text { display: grid; gap: 2px; min-width: 0; }
.tile-fi { color: var(--ink); font-weight: 700; font-size: 1rem; line-height: 1.25; }
.tile-tr { color: var(--body); font-size: 0.9375rem; line-height: 1.3; }
.tile-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.8125rem; color: var(--muted); }
.tile.soon .cv { background: repeating-linear-gradient(135deg, var(--raised) 0 8px, var(--ground) 8px 16px); border: 1px solid var(--line); }
.soon-label { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 0.875rem; font-weight: 650; color: var(--body); }

/* ========== HOME ========== */
.bill { position: relative; overflow: hidden; margin-top: -68px; }
.bill-plain { margin-top: 0; }
.bill-media { position: absolute; inset-block: 0; inset-inline-end: 0; width: 64%; }
.bill-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; }
.bill-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--stage) 0%, rgba(11, 14, 22, 0.8) 13%, rgba(11, 14, 22, 0.18) 36%, rgba(11, 14, 22, 0) 58%),
              linear-gradient(0deg, var(--stage) 0%, rgba(11, 14, 22, 0) 30%),
              linear-gradient(180deg, rgba(11, 14, 22, 0.7) 0%, rgba(11, 14, 22, 0) 22%);
}
[dir="rtl"] .bill-media::after { transform: scaleX(-1); }
.bill-in { position: relative; display: grid; align-content: center; min-height: 600px; padding-block: 100px 60px; }
.bill-plain .bill-in { min-height: 0; padding-block: 32px 56px; }
.bill-copy { max-width: 560px; }
.bill h1 { color: var(--stage-ink); font-size: clamp(2rem, 3.6vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; text-wrap: balance; }
.bill-lede { margin-top: 16px; font-size: 1.0625rem; color: var(--stage-body); max-width: 46ch; }
.feature { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--stage-line); }
.feature-label { font-size: 0.875rem; color: var(--stage-muted); font-weight: 600; }
.feature-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.feature-title strong { color: var(--stage-ink); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.feature-title span { color: var(--stage-body); font-size: 1.0625rem; }
.feature-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 0.875rem; color: var(--stage-muted); }
.feature-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.bill-channel { margin-top: 18px; }
.bill-channel a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--stage-accent); font-weight: 650; text-decoration: none; }
.bill-channel a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bill-channel svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bill-channel svg.i { width: 14px; height: 14px; }

/* filter bar */
.filterbar { position: sticky; top: 0; z-index: 10; background: var(--filterbar); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.filter-in { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.filter-label { font-weight: 650; color: var(--ink); font-size: 0.9375rem; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--raised); }
.seg button { display: inline-flex; align-items: baseline; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 16px; border: 0; border-radius: 7px; background: transparent; color: var(--body); font-weight: 650; cursor: pointer; }
.seg button small { font-size: 0.8125rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.seg button[aria-pressed="true"] small { color: inherit; opacity: 0.8; }
.search { position: relative; margin-inline-start: auto; width: min(340px, 100%); }
.search svg.i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; min-height: 42px; padding-inline: 40px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.search input::placeholder { color: var(--muted); }

/* sections */
.sec { padding-block: 44px 8px; }
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 20px; }
.sec-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; }
.sec-head h2 .lv { height: 26px; padding: 0 8px; font-size: 0.875rem; }
.sec-head h2:focus { outline: none; }
.sec-head .note { color: var(--muted); font-size: 0.9375rem; }
.sec-head .tools { margin-inline-start: auto; }

/* this week */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.day { display: grid; gap: 12px; align-content: start; min-width: 0; }
.day-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; padding-top: 10px; border-top: 2px solid var(--line-strong); font-size: 0.875rem; color: var(--muted); font-weight: 600; }
.day-h b { color: var(--ink); font-weight: 750; font-size: 0.9375rem; }
.day.today .day-h { border-top: 3px solid var(--accent-fill); padding-top: 9px; color: var(--accent); }
.day.today .day-h b { color: var(--accent); }
.day-empty { display: block; aspect-ratio: 16 / 9; border-radius: var(--r-s); border: 1px dashed var(--line-strong); }

/* level rows */
.levels { padding-block: 28px 8px; }
.row { padding-block: 22px 18px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; }
.row-head h3 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; }
.row-head h3 .lv { height: 26px; padding: 0 8px; font-size: 0.875rem; }
.row-head .tools { margin-inline-start: auto; display: flex; align-items: center; gap: 16px; }
.arrows { display: inline-flex; gap: 6px; }
.arrows button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.arrows button:disabled { color: var(--line-strong); border-color: var(--line); cursor: default; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 20px) / 5.35); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad);
  list-style: none; margin-block: 0; padding-block: 4px 6px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > li { scroll-snap-align: start; min-width: 0; }
.seo-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* earlier weeks */
.archive { list-style: none; margin: 0; padding: 0; }
.wk { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding-block: 22px; border-top: 1px solid var(--line); }
.wk:first-child { border-top: 0; padding-top: 0; }
.wk-h strong { display: block; color: var(--ink); font-size: 1.0625rem; font-weight: 750; }
.wk-h span { display: block; color: var(--muted); font-size: 0.875rem; margin-top: 2px; }
.mini { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.mini .tile { gap: 7px; }
.mini .tile-fi { font-size: 0.875rem; font-weight: 650; }
.mini .tile-meta { margin-top: 0; }
.wk.closed { align-items: baseline; }
.closed-list { color: var(--body); font-size: 0.9375rem; }
.closed-list a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

/* filtered results */
.result-week + .result-week { margin-top: 28px; }
.result-week h3 { font-size: 1.0625rem; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 20px; list-style: none; margin: 0; padding: 0; }
.empty { padding: 24px 0; color: var(--muted); }

/* app band (home) */
.appband { margin-top: 56px; background: var(--brand); color: #fff; }
.app-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; padding-block: 44px; }
.app-in .app-icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.app-in h2 { color: #fff; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.app-in p { margin-top: 8px; color: rgba(255, 255, 255, 0.94); max-width: 62ch; font-size: 1.0625rem; }
.app-in .app-soon { margin: 0; display: inline-flex; padding: 12px 18px; border-radius: 10px; background: #0f1217; color: #fff; font-weight: 700; }
.app-in .btn.app-more { background: #fff; border-color: #fff; color: #1d2f8f; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 20px 10px 16px; border-radius: 10px; background: #0f1217; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.0625rem; }
.store .store-logo { width: 22px; height: 22px; fill: #fff; }

/* mistake report */
.report { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; padding-block: 48px; align-items: start; scroll-margin-top: 16px; }
.report-copy { display: flex; gap: 12px; align-items: flex-start; }
.report-copy .flag { width: 24px; height: 24px; color: var(--warm); margin-top: 1px; }
.report h2 { font-size: 1.375rem; font-weight: 800; }
.ai-note { margin-top: 10px; max-width: 54ch; }
.form { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; scroll-margin-top: 16px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label { font-weight: 650; color: var(--ink); font-size: 0.9375rem; }
.field input, .field textarea, .field select { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 1rem; }
.field textarea { min-height: 104px; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-foot .fine { margin: 0; flex: 1 1 260px; }
.fine { font-size: 0.8125rem; color: var(--muted); margin-top: 12px; }
.trap { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.form-status { font-weight: 650; }
.form-status:empty { display: none; }
.form-status.good { color: var(--success); }
.form-status.bad { color: var(--danger); }

.foot { background: var(--stage); color: var(--stage-muted); font-size: 0.875rem; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; min-height: 64px; padding-block: 16px; }
.foot a { color: var(--stage-body); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot .spacer { margin-inline-end: auto; }
.legal { display: contents; }

.notfound { padding-block: 40px 64px; }
.notfound h1 { color: var(--stage-ink); font-size: 2rem; }
.notfound .btn { margin-top: 20px; }

/* ========== EPISODE ========== */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 2px 0 18px; margin: 0; font-size: 0.875rem; color: var(--stage-muted); list-style: none; }
.crumbs a { color: var(--stage-body); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-inline-end: 8px; color: #6b7386; }
.watch {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr;
  grid-template-areas: "player info" "player phrases"; column-gap: 48px; align-items: start; padding-bottom: 44px;
}
.player { grid-area: player; position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
.player img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player.has-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 10, 16, 0.75) 0%, rgba(8, 10, 16, 0) 45%); pointer-events: none; }
.play-video {
  position: absolute; inset: 0; z-index: 2; margin: auto; width: max-content; height: max-content;
  display: inline-flex; align-items: center; gap: 14px; padding-block: 10px; padding-inline: 10px 24px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(8, 10, 16, 0.76); color: #fff; font-weight: 700; font-size: 1.0625rem;
}
.play-video:hover { background: rgba(8, 10, 16, 0.9); }
.play-video i { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #fff; color: #0f1217; }
.play-video svg.i { width: 22px; height: 22px; margin-inline-start: 3px; }
.video-note { position: absolute; z-index: 2; inset-inline: 16px; bottom: 12px; margin: 0; max-width: 60ch; font-size: 0.8125rem; line-height: 1.4; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.video-note a { color: #fff; font-weight: 650; text-underline-offset: 2px; }
[dir="rtl"] .play-video svg.i { transform: scaleX(-1); margin-inline: 0 3px; }
.info { grid-area: info; display: grid; align-content: start; }
.info .meta { display: flex; align-items: center; gap: 10px; color: var(--stage-muted); font-size: 0.9375rem; font-weight: 600; }
.info h1 { color: var(--stage-ink); font-size: clamp(2.25rem, 3.4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin-top: 12px; line-height: 1.04; }
.info .sub { color: var(--stage-body); font-size: 1.25rem; margin-top: 6px; }
.goal { margin-top: 20px; padding-inline-start: 14px; border-inline-start: 3px solid #6f7cff; color: var(--stage-ink); line-height: 1.55; }
.info-actions { display: grid; gap: 10px; margin-top: 24px; }
.info-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; }
.info-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; color: var(--stage-accent); font-weight: 600; text-decoration: none; font-size: 0.9375rem; }
.info-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.info-links svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.phrases { grid-area: phrases; align-self: end; padding-top: 24px; }
.phrases h2 { color: var(--stage-muted); font-size: 0.875rem; font-weight: 650; letter-spacing: 0; padding-bottom: 8px; border-bottom: 1px solid var(--stage-line); }
.phrases ul { list-style: none; margin: 0; padding: 0; }
.phrases li { padding-block: 9px; border-bottom: 1px solid var(--stage-line); color: var(--stage-ink); font-weight: 700; }

.below { display: grid; grid-template-columns: minmax(0, 820px) 360px; justify-content: space-between; gap: 48px; padding-block: 36px 24px; align-items: start; }
.flow { min-width: 0; }
.flow .report { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 40px 24px; margin-top: 40px; border-top: 1px solid var(--line); }

/* practice */
.practice { scroll-margin-top: 8px; }
.prac-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.prac-head h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.progress { display: grid; gap: 6px; justify-items: end; font-size: 0.9375rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 180px; }
.progress-bar i { height: 6px; border-radius: 3px; background: var(--line); }
.progress-bar i.on { background: var(--success); }

.tabs-wrap { position: sticky; top: 0; z-index: 5; margin-top: 14px; background: var(--ground); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line-strong); }
.tabs [role="tab"] {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 4px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 700; font-size: 1.0625rem; border-bottom: 3px solid transparent; margin-bottom: -1px; text-align: start;
}
.tabs [role="tab"]:hover { color: var(--ink); }
.step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--raised); color: var(--muted); font-style: normal; font-size: 0.8125rem; font-weight: 750; flex: none; }
.tab-count { font-weight: 500; font-size: 0.8125rem; color: var(--muted); margin-inline-start: auto; padding-inline-end: 14px; font-variant-numeric: tabular-nums; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent-fill); }
.tabs [role="tab"][aria-selected="true"] .step-n { background: var(--accent-fill); color: #fff; }
.tabs [role="tab"][data-done="true"] .step-n { background: var(--success); color: #fff; }

.panel { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 28px 8px; }
.panel-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.panel-head h2 { font-size: 1.25rem; font-weight: 800; }
.panel-head p { color: var(--muted); }
.exercise { margin-top: 14px; }
.question { border: 0; margin: 0; padding: 18px 0 20px; border-top: 1px solid var(--line); min-width: 0; }
.question:first-child { border-top: 0; padding-top: 4px; }
.question legend { float: left; width: 100%; display: flex; gap: 10px; color: var(--ink); font-weight: 650; font-size: 1.0625rem; padding: 0; margin-bottom: 12px; }
[dir="rtl"] .question legend { float: right; }
.question legend + * { clear: both; }
.num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--raised); color: var(--muted); font-size: 0.8125rem; font-weight: 750; margin-top: 1px; line-height: 1; }

.clip { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.clip-button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent-fill); color: #fff; cursor: pointer; }
.clip-button:hover { background: var(--accent-fill-hover); }
.clip-button .icon { display: grid; place-items: center; }
.clip-button svg { width: 18px; height: 18px; fill: currentColor; }
.clip-button[aria-pressed="false"] svg { margin-inline-start: 2px; }
.clip-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.clip-bar span { display: block; height: 100%; width: calc(var(--value, 0) * 100%); background: var(--accent-fill); border-radius: 3px; }
[dir="rtl"] .clip-bar { transform: scaleX(-1); }
.clip-time { flex: none; min-width: 2.5em; color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.option { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; color: var(--ink); background: var(--surface); font-weight: 550; line-height: 1.3; }
.option:hover { border-color: var(--muted); }
.option input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-fill); flex: none; }
.option:has(input:checked) { border-color: var(--accent-fill); background: var(--accent-soft); }
.option:has(input:focus-visible) { outline: 3px solid var(--accent-fill); outline-offset: 2px; }
.feedback { margin-top: 10px; font-weight: 650; font-size: 0.9375rem; }
.feedback:empty { display: none; }
.feedback.good { color: var(--success); }
.feedback.bad { color: var(--danger); }
.check-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 0 18px; border-top: 1px solid var(--line); }
.score { font-weight: 700; }
.score:empty { display: none; }
.score.good { color: var(--success); }
.score.bad { color: var(--danger); }

.bank { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding: 12px 14px; border-radius: 8px; background: var(--raised); }
.bank-title { font-size: 0.875rem; font-weight: 650; color: var(--muted); margin-inline-end: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 650; cursor: pointer; }
.chip:hover { border-color: var(--muted); }
.chip.used { background: transparent; color: var(--muted); text-decoration: line-through; border-style: dashed; }
.sentences { list-style: none; margin: 8px 0 0; padding: 0; }
.sentences li { display: flex; gap: 12px; align-items: baseline; padding-block: 14px; border-top: 1px solid var(--line); }
.sentences li:first-child { border-top: 0; }
.sentences li > div { flex: 1; min-width: 0; }
.sentence { color: var(--ink); font-size: 1.125rem; line-height: 2.3; }
.blank {
  display: inline-block; max-width: 100%; min-height: 40px; margin: 0 4px; padding: 4px 10px; vertical-align: baseline;
  border: 0; border-bottom: 2px solid var(--line-strong); border-radius: 6px 6px 0 0; background: var(--raised); color: var(--ink);
  font-size: 1rem; font-weight: 650; line-height: 1.5;
}
.blank:focus { outline: none; border-bottom-color: var(--accent-fill); background: var(--accent-soft); }
.blank:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 1px; }
.blank.good { border-bottom-color: var(--success); background: var(--success-soft); }
.blank.bad { border-bottom-color: var(--danger); background: var(--danger-soft); }
.blank.wide { width: 13em; max-width: calc(100% - 1.5em); font-weight: 500; }
.nowrap { white-space: nowrap; }
.hidden-note { min-width: 6em; color: var(--muted); letter-spacing: 0.2em; }
.speak-list .sentence { font-size: 1.1875rem; font-weight: 650; }
.example { margin-top: 12px; }
.example summary { cursor: pointer; color: var(--accent); font-weight: 650; min-height: 40px; display: flex; align-items: center; }
.example p { margin-top: 4px; padding: 12px 14px; border-radius: 8px; background: var(--raised); color: var(--ink); }
.speak-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 16px 6px; }
.panel-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; border-top: 1px solid var(--line); margin-top: 12px; padding: 4px 0; }
.panel-foot .quiet { margin-inline-start: auto; }

/* after 3/3: keep going in the app */
.app-after { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 22px; margin-top: 20px; padding: 24px; border-radius: var(--r); background: var(--brand); color: #fff; }
.app-after .app-icon { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.app-after h2 { color: #fff; font-size: 1.375rem; font-weight: 800; }
.app-after p { margin-top: 6px; color: rgba(255, 255, 255, 0.94); }
.app-after .btn.primary { background: #fff; border-color: #fff; color: #1d2f8f; }
.app-after .app-soon { margin: 0; display: inline-flex; padding: 10px 16px; border-radius: 10px; background: #0f1217; color: #fff; font-weight: 700; }

/* previous / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.pager > a, .pager > span { display: grid; gap: 2px; align-content: start; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--body); }
.pager > a:hover { border-color: var(--accent-fill); }
.pager small { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.pager strong { color: var(--ink); font-size: 1.0625rem; }
.pager .next { text-align: end; }
.pager .none { background: transparent; border-style: dashed; border-color: var(--line-strong); }

/* side column */
.side { display: grid; gap: 28px; align-content: start; }
.side h2 { font-size: 1.125rem; font-weight: 800; }
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.side-head a { font-size: 0.875rem; font-weight: 650; text-decoration: none; }
.side-head a:hover { text-decoration: underline; }
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.queue a { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: start; padding: 8px; margin-inline: -8px; border-radius: 8px; text-decoration: none; color: var(--body); }
.queue a:hover { background: var(--raised); }
.queue a.now { background: var(--accent-soft); }
.queue .cv { border-radius: 5px; }
.q-info { display: grid; gap: 1px; min-width: 0; }
.q-info small { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.q-info small.playing { color: var(--accent); }
.q-info strong { color: var(--ink); font-size: 0.9375rem; line-height: 1.3; }
.q-info span { font-size: 0.875rem; color: var(--body); line-height: 1.35; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.pdf { display: grid; gap: 16px; }
.pdf-top { display: flex; gap: 14px; align-items: flex-start; }
.pdf-top > svg { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.5; }
.pdf-top p { font-size: 0.9375rem; margin-top: 2px; }
.pdf-row { display: flex; gap: 8px; align-items: end; }
.pdf-row .field { flex: 1; }
.pdf-row .btn { flex: none; min-height: 44px; }
.side-app { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
.side-app .app-icon { width: 56px; height: 56px; border-radius: 13px; grid-row: span 2; }
.side-app h2 { font-size: 1rem; }
.side-app p { font-size: 0.9375rem; margin-top: 4px; }
.side-app .app-action { grid-column: 2; margin-top: 8px; }
.side-app .app-soon { font-weight: 700; color: var(--accent); }
.side-app .btn.app-more { min-height: 40px; padding: 6px 14px; font-size: 0.9375rem; }
.side-app .store { min-height: 44px; font-size: 1rem; }

/* ---------- 1399 and below: phrases go under the video ---------- */
@media (max-width: 1399px) {
  .watch { grid-template-rows: auto auto; grid-template-areas: "player info" "phrases info"; }
  .phrases { align-self: start; padding-top: 20px; }
  .phrases ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
}

@media (max-width: 1180px) {
  .week { grid-template-columns: repeat(7, 168px); overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
  .week::-webkit-scrollbar { display: none; }
  .rail { grid-auto-columns: calc((100% - 3 * 20px) / 4.3); }
  .mini { grid-template-columns: repeat(7, 132px); overflow-x: auto; scrollbar-width: none; }
  .watch { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 36px; }
  .below { grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .top { justify-content: space-between; }
  .bill { margin-top: 0; }
  .bill-media { position: relative; width: auto; aspect-ratio: 3 / 2; margin-inline: 0; }
  .bill-media::after { background: linear-gradient(0deg, var(--stage) 0%, rgba(11, 14, 22, 0) 40%); }
  [dir="rtl"] .bill-media::after { transform: none; }
  .bill-in { min-height: 0; padding-block: 0 36px; }
  .bill-copy { margin-top: -28px; position: relative; }
  .bill-plain .bill-copy { margin-top: 0; }
  .filter-in { flex-wrap: wrap; gap: 10px 14px; padding-block: 12px; }
  .search { width: 100%; margin-inline-start: 0; order: 3; }
  .wk, .wk.closed { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mini { margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
  .app-in { grid-template-columns: auto minmax(0, 1fr); }
  .app-in .app-action { grid-column: 1 / -1; }
  .report { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .watch { grid-template-columns: minmax(0, 1fr); grid-template-areas: "player" "info" "phrases"; row-gap: 22px; }
  .player { margin-inline: calc(var(--pad) * -1); border-radius: 0; }
  .below { grid-template-columns: minmax(0, 1fr); }
  .flow { display: contents; }
  .practice { order: 1; }
  .side { order: 2; }
  .flow .report { order: 3; margin-top: 0; }
  .app-after { grid-template-columns: auto minmax(0, 1fr); }
  .app-after .app-action { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .top { min-height: 60px; gap: 12px; }
  .bill h1 { font-size: 2rem; }
  .bill-lede { font-size: 1rem; }
  .feature-title strong { font-size: 1.5rem; }
  .feature-actions .btn { flex: 1 1 auto; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding-inline: 6px; }
  .filter-label { display: none; }
  .sec { padding-block: 32px 4px; }
  .sec-head h2 { font-size: 1.375rem; }
  .sec-head .tools { margin-inline-start: 0; width: 100%; }
  .row-head .arrows { display: none; }
  .rail { grid-auto-columns: 72%; gap: 14px; }
  .mini { grid-template-columns: repeat(7, 128px); }
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 14px; }
  .appband { margin-top: 36px; }
  .app-in { gap: 18px; padding-block: 32px; }
  .app-in .app-icon { width: 64px; height: 64px; border-radius: 15px; }
  .app-in h2 { font-size: 1.375rem; }
  .report { padding-block: 36px; }
  .form { padding: 16px; }
  .form-pair { grid-template-columns: minmax(0, 1fr); }

  .crumbs { display: none; }
  .watch { padding-top: 0; padding-bottom: 28px; row-gap: 16px; }
  .player:not(.has-video) { aspect-ratio: 2 / 1; }
  .play-video { padding-block: 8px; padding-inline: 8px 18px; font-size: 1rem; }
  .play-video i { width: 44px; height: 44px; }
  .video-note { inset-inline: var(--pad); bottom: 8px; font-size: 0.6875rem; }
  .info h1 { font-size: 2.25rem; margin-top: 6px; }
  .info .sub { font-size: 1.125rem; }
  .goal { margin-top: 14px; }
  .info-actions { margin-top: 18px; }
  .phrases { padding-top: 4px; }
  .phrases ul { grid-template-columns: minmax(0, 1fr); }
  .below { padding-block: 20px 8px; gap: 32px; }
  .prac-head h2 { font-size: 1.5rem; }
  .tabs-wrap { margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
  .tabs [role="tab"] { flex-direction: column; justify-content: center; gap: 4px; min-height: 64px; font-size: 0.9375rem; text-align: center; }
  .tab-count { display: none; }
  .panel { padding: 18px 16px 6px; margin-inline: calc(var(--pad) * -1); border-radius: 0; border-inline: 0; }
  .options { grid-template-columns: minmax(0, 1fr); }
  .sentence { font-size: 1.0625rem; }
  .speak-actions .btn { flex: 1 1 auto; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .none { display: none; }
  .queue a { grid-template-columns: 120px minmax(0, 1fr); }
  .app-after { margin-inline: calc(var(--pad) * -1); border-radius: 0; padding: 22px var(--pad); }
  .app-after .app-icon { width: 56px; height: 56px; border-radius: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- /uygulama (app page) ---------- */
.app-page { padding-top: 32px; padding-bottom: 40px; }
.app-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 32px; }
.app-hero-icon { width: 96px; height: 96px; border-radius: 22px; }
.app-hero h1 { color: var(--ink); font-size: clamp(1.75rem, 5vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
.app-lead { font-size: 1.125rem; max-width: 60ch; margin: 0 0 18px; }
.app-cta { margin-bottom: 12px; }
.app-pricing { color: var(--muted); font-size: 0.9375rem; max-width: 60ch; }
.app-features { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.app-feature { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.app-feature h2 { color: var(--ink); font-size: 1.125rem; margin: 0 0 6px; }
.app-feature p { margin: 0; }
.screens h2 { color: var(--ink); font-size: 1.25rem; margin: 0 0 14px; }
.screen-list { list-style: none; margin: 0 0 32px; padding: 0 0 8px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; }
.screen-list li { flex: 0 0 auto; scroll-snap-align: start; }
.screen-list img { height: min(560px, 70vh); width: auto; border-radius: 24px; border: 1px solid var(--line); display: block; }
@media (max-width: 600px) { .app-hero { grid-template-columns: 1fr; } .app-hero-icon { width: 72px; height: 72px; border-radius: 17px; } }
