/* «Playlists» look: dark like a music app, lime accent, Unbounded headings, colour covers for lessons and decks.
   Loaded after style.css and overrides its tokens in both themes (the site is always dark now). */
:root:root:root {
  --bg: #121212;
  --surface: #181818;
  --surface-2: #242424;
  --text: #ffffff;
  --muted: #b3b3b3;
  --line: #2a2a2a;
  --accent: #c6ff3d;
  --accent-2: #ff5fa2;
  --accent-ink: #121212;
  --accent-soft: rgba(198, 255, 61, .12);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, .14);
  --warn: #fac775;
  --warn-soft: rgba(250, 199, 117, .14);
  --grad: linear-gradient(var(--accent), var(--accent));
  --glow-1: transparent;
  --glow-2: transparent;
  --shadow: none;
  --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .7);
  --radius: 12px;
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: "Unbounded", "Space Grotesk", sans-serif;
  color-scheme: dark;
}
body { background: var(--bg); }
#theme-toggle { display: none; }
h1, h2 { font-family: var(--font-head); letter-spacing: -.02em; }
h1 { font-weight: 800; }
h2 { font-weight: 500; }
a { color: var(--accent); }

/* header */
.top { background: rgba(18, 18, 18, .88); border-bottom: 1px solid var(--line); }
.logo-mark, .lang-toggle span.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.logo b { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
.top nav { background: var(--surface); }
.nav-link.active, .nav-group.active .nav-btn { background: var(--surface-2); color: var(--text); box-shadow: none; }

/* cards and controls */
.card { background: var(--surface); border-color: transparent; }
a.card:hover, .topic:hover, .level:hover { background: var(--surface-2); transform: none; box-shadow: none; }
.btn { background: var(--surface-2); border-color: transparent; color: var(--text); border-radius: 999px; }
.btn:hover { background: #2f2f2f; }
.btn.primary, .chip.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); box-shadow: none; }
.btn.ghost { background: transparent; border: 1px solid #3a3a3a; }
.chip { background: var(--surface-2); border-color: transparent; color: var(--text); }
.answer { background: var(--surface-2); border-color: transparent; color: var(--text); }
.bar { background: #3a3a3a; height: 6px; }
.bar i { background: var(--lv, var(--accent)); }

/* cover colours: one per kind of lesson or deck */
.k-mix { --c: #d4537e; --ci: #fff; }
.k-shadow { --c: #fac775; --ci: #412402; }
.k-dialog { --c: #5dcaa5; --ci: #04342c; }
.k-story { --c: #378add; --ci: #fff; }
.k-interview { --c: #7f77dd; --ci: #fff; }
.k-bad { --c: #e24b4a; --ci: #fff; }
.k-nb { --c: #9b8cf2; --ci: #1a1440; }
.k-course { --c: #378add; --ci: #fff; }
.k-pv { --c: #ba7517; --ci: #fff; }
.k-ch { --c: #1d9e75; --ci: #fff; }
.k-bx { --c: #f0997b; --ci: #4a1b0c; }
.k-it { --c: #0ea5a4; --ci: #fff; }
.k-nt { --c: #c6ff3d; --ci: #121212; }

/* home */
.pl-hello { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pl-hello h1 { margin: 0; }
.pl-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 28px; }
.pl-q { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; color: var(--text); font-size: .92rem; min-width: 0; }
.pl-q:hover { background: #2f2f2f; text-decoration: none; }
.pl-q b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.pl-mini { width: 56px; height: 56px; flex: none; background: var(--c); color: var(--ci); display: grid; place-items: center; font-size: 1.3rem; }
.pl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pl-head h2 { margin: 0; }
.pl-head .today-go { margin-left: auto; }
.pl-done { margin-left: auto; color: var(--accent); font-weight: 500; }
.today { margin-bottom: 28px; }
.pl-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.pl-track > a, a.pl-track { display: block; color: var(--text); padding: 10px; margin: -10px; border-radius: 10px; }
.pl-track > a:hover, a.pl-track:hover { background: var(--surface); text-decoration: none; }
.pl-cover { aspect-ratio: 1; border-radius: 8px; background: var(--c); color: var(--ci); padding: 12px; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: 8px; }
.pl-cover b { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.pl-state { font-size: .78rem; font-weight: 500; }
.pl-track.next .pl-cover { outline: 3px solid var(--accent); outline-offset: 3px; }
.pl-track.done .pl-cover { opacity: .55; }
.pl-title { display: block; font-weight: 500; font-size: .92rem; line-height: 1.3; }
.pl-sub { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-lib { margin-bottom: 28px; }
.pl-lib .pl-row { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.ch-home::before { display: none; }

/* «now playing» bar */
#player-slot { position: fixed; left: 0; right: 0; bottom: 12px; z-index: 40; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.player { pointer-events: auto; width: min(900px, 100%); display: flex; align-items: center; gap: 12px; background: #1f1f1f; border: 1px solid #2f2f2f; border-radius: 12px; padding: 8px 12px 8px 8px; color: var(--text); box-shadow: var(--shadow-lg); }
a.player:hover { background: #262626; text-decoration: none; }
.player .pl-mini { width: 44px; height: 44px; border-radius: 6px; font-size: 1.1rem; }
.pp-text { flex: 1; min-width: 0; }
.pp-text b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-text small { color: var(--muted); font-size: .78rem; }
.pp-bar { height: 4px; background: #3a3a3a; border-radius: 2px; margin-top: 6px; }
.pp-bar i { display: block; height: 4px; background: var(--accent); border-radius: 2px; }
.pp-play { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; font-size: 1rem; }
body.has-player { padding-bottom: 84px; }

@media (max-width: 640px) {
  .pl-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .pl-lib .pl-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.today { background: none; border: 0; padding: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.today::before, .today::after { display: none; }
.pl-cover b { overflow-wrap: anywhere; hyphens: auto; }
.pl-row .pl-cover b { font-size: clamp(.85rem, 1.6vw, 1.05rem); }
.pl-cover b { hyphens: manual; }
.pl-lib .pl-cover b { font-size: .9rem; overflow-wrap: normal; }

/* playlist pages: a topic or a deck */
.pl-hero { --c: #378add; --ci: #fff; display: flex; align-items: flex-end; gap: 22px; padding: 26px; margin: 0 0 18px; border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #121212) 0%, color-mix(in srgb, var(--c) 28%, #121212) 100%); }
.pl-art { width: 168px; height: 168px; flex: none; border-radius: 10px; background: var(--c); color: var(--ci); display: flex; align-items: flex-end; padding: 14px; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .7); }
.pl-art b { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; line-height: 1.1; overflow-wrap: anywhere; }
.pl-hero-text { min-width: 0; color: #fff; }
.pl-hero-text small { font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.pl-hero-text h1 { font-size: clamp(1.6rem, 4vw, 2.8rem); line-height: 1.05; margin: 6px 0 8px; color: #fff; }
.pl-hero-text p { margin: 0; font-size: .92rem; opacity: .85; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 22px; }
.pl-actions .btn { padding: 9px 16px; font-size: .9rem; }
.pl-actions .pl-play { padding: 13px 24px; font-size: 1rem; font-weight: 700; margin-right: 6px; }
.pl-about { padding: 14px 18px; margin: 0 0 22px; }
.pl-about > summary { cursor: pointer; font-weight: 600; }
.pl-about[open] > summary { margin-bottom: 10px; }
.pl-tracks { list-style: none; margin: 0 0 22px; padding: 0; }
.pl-tracks li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 8px; }
.pl-tracks li:hover { background: var(--surface); }
.pl-tracks .n { color: var(--muted); text-align: right; font-size: .85rem; font-variant-numeric: tabular-nums; }
.pl-tracks .tt b { font-weight: 500; }
.pl-tracks .tt small { display: block; color: var(--muted); font-size: .84rem; }
.pl-tracks .st { font-size: .8rem; font-weight: 500; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.pl-tracks .st.good { color: var(--accent); }
.pl-tracks .st.bad { color: var(--bad); }
.pl-tracks .st.new { color: var(--muted); }
.pl-page .topics { gap: 6px; }
.pl-page .topic.card { background: transparent; border-radius: 8px; }
.pl-page .topic.card:hover { background: var(--surface); }
@media (max-width: 640px) {
  .pl-hero { flex-direction: column; align-items: flex-start; padding: 18px; gap: 14px; }
  .pl-art { width: 128px; height: 128px; }
  .pl-tracks li { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .pl-tracks .icon-btn { display: none; }
}

/* training screen = «now playing» */
:where(.pp-screen) { --c: #378add; --ci: #fff; }
.pp-screen { max-width: 1120px; padding: 16px 20px 22px; border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, #121212) 0, #121212 380px); }
.pp-screen .trainer-top .btn { background: rgba(0, 0, 0, .25); border-color: transparent; }
.pp-screen .trainer-title { display: flex; flex-direction: column; line-height: 1.25; font-weight: 600; font-size: .92rem; }
.pp-screen .trainer-title small { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .7); font-weight: 500; }
.pp-screen .counters { color: rgba(255, 255, 255, .85); }
.pp-now { display: flex; justify-content: center; margin: 22px 0 14px; }
.pp-art { width: 200px; height: 200px; border-radius: 10px; background: var(--c); color: var(--ci); display: flex; align-items: flex-end; padding: 16px; box-shadow: 0 18px 44px -12px rgba(0, 0, 0, .75); }
.pp-art b { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; line-height: 1.12; overflow-wrap: anywhere; }
.pp-timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 0; margin: 0 0 6px; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pp-timeline .bar { grid-column: 1 / -1; height: 4px; background: rgba(255, 255, 255, .18); border-radius: 2px; }
.pp-timeline .bar i { background: #fff; border-radius: 2px; }
.pp-timeline span:last-child { text-align: right; }
.pp-screen .train-tools { justify-content: center; margin: 6px 0 4px; }
.pp-screen .train-tools .chip { background: transparent; color: var(--muted); font-size: .78rem; padding: 4px 10px; }
.pp-screen .train-tools .chip.on { background: rgba(255, 255, 255, .1); color: var(--text); }
.pp-screen .card.task { background: transparent; border: 0; padding: 10px 0 0; box-shadow: none; }
.pp-screen .task-label { color: rgba(255, 255, 255, .65); }
.pp-screen .ru { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.35rem, 3.4vw, 1.9rem); line-height: 1.2; letter-spacing: -.01em; }
.pp-screen .answer { font-size: 1.08rem; padding-top: 14px; padding-bottom: 14px; background: #242424; }
.pp-screen .task-actions { align-items: center; margin-top: 16px; }
.pp-screen .task-actions .aux { display: flex; gap: 8px; align-items: center; }
.pp-screen .task-actions .aux .link, .pp-screen .task-actions .aux .btn { background: rgba(255, 255, 255, .08); color: var(--text); border: 0; border-radius: 999px; padding: 9px 14px; font-size: .85rem; text-decoration: none; }
.pp-screen .task-actions .aux .link::before { content: '💡 '; }
.pp-screen .task-actions .aux [data-giveup]::before { content: '⏭ '; }
.pp-screen .task-actions button[type=submit] { padding: 13px 26px; font-size: 1rem; font-weight: 700; }
.pp-screen .feedback { border-radius: 12px; }
.pp-screen .feedback.good { background: rgba(198, 255, 61, .1); }
.pp-screen .feedback.bad { background: rgba(255, 107, 107, .1); }
.pp-screen .feedback.intro, .pp-screen .feedback.checking { background: rgba(255, 255, 255, .06); }
.pp-screen + .small-note, .pp-screen .small-note { opacity: .7; }
@media (max-width: 640px) {
  .pp-screen { padding: 12px 14px 18px; }
  .pp-art { width: 140px; height: 140px; padding: 12px; }
  .pp-art b { font-size: 1rem; }
  .pp-now { margin: 14px 0 10px; }
}
.pp-timeline .bar { margin: 0; }
.pp-screen .task-actions .aux .link, .pp-screen .task-actions .aux .btn { white-space: nowrap; }
@media (max-width: 640px) {
  .pp-screen .trainer-title { display: none; }
  .pp-screen .task-actions { flex-wrap: wrap; }
  .pp-screen .task-actions button[type=submit] { flex: 1 0 100%; }
  .pp-screen .task-actions .aux { flex-wrap: wrap; }
}

/* ---------- step 4: every other page ---------- */
/* deck lists (phrasal levels, «База», IT, Notion) = a grid of album covers */
.levels:has(> .level.deck) { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.level.deck { background: transparent; border: 0; padding: 10px; border-radius: 10px; }
.level.deck:hover { background: var(--surface); }
.level.deck .level-main { flex-direction: column; gap: 10px; padding: 0; }
.level.deck .badge { width: 100%; height: auto; aspect-ratio: 1; border-radius: 8px; background: var(--lv, #378add); color: #fff;
  font-family: var(--font-head); font-size: 2.6rem; box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .7); }
.level.deck h3 { font-size: .95rem; line-height: 1.25; }
.level.deck .level-main p { font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.level.deck .level-foot { padding: 8px 0 0; font-size: .75rem; }
.level.deck .level-foot .bar { height: 3px; }
/* course levels: a cover on the left */
.level:not(.deck) { background: var(--surface); border: 0; }
.level:not(.deck) .badge { background: var(--lv); color: #fff; border-radius: 8px; font-family: var(--font-head); width: 64px; height: 64px; }
.level:not(.deck):hover { background: var(--surface-2); }

/* lists of topics, stories, dialogs, listening blocks = track rows with a mini cover */
.topics { gap: 2px; }
.topic.card { background: transparent; border: 0; border-radius: 8px; padding: 10px 12px; }
.topic.card:hover { background: var(--surface); border: 0; }
.topic .num { width: 48px; height: 48px; border-radius: 6px; background: var(--surface-2); color: var(--text); font-family: var(--font-head); }
.topic .num[style], .topic .num.tag { border-radius: 6px; }
.topic:not(.locked) .num:not([style]):not(.tag) { background: var(--accent); color: var(--accent-ink); }
.topic h3 { font-weight: 500; font-family: var(--font); }
.topic .pill { background: transparent; color: var(--muted); }
.topic .pill.ok { color: var(--accent); }

/* page title blocks: a little more air, like a library section */
main > h1:first-of-type, .cards-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-title { font-family: var(--font-head); font-weight: 500; }

/* marathon: the hero becomes a playlist banner, day tiles become small covers */
.ch-hero { background: linear-gradient(180deg, color-mix(in srgb, #d85a30 60%, #121212) 0, color-mix(in srgb, #d85a30 22%, #121212) 100%) !important; border: 0; }
.ch-hero::before, .ch-hero::after { display: none !important; }
.ch-tile.card { background: var(--surface); border: 0; }
.ch-tile.card:hover { background: var(--surface-2); }
.ch-tile.cur { outline: 2px solid var(--accent); outline-offset: 2px; }
.ch-tile.done { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.ch-skill.card, .ch-goal { background: var(--surface); border: 0; }

/* stories, dialogs, AI chat, sounds: flat dark surfaces, lime for «yours» */
.bubble { border-radius: 16px; }
.story-line, .sent { border-radius: 8px; }
.stat, .stat-row .stat { background: var(--surface); border: 0; }
table th { color: var(--muted); font-weight: 500; }
/* decks of one section get different cover colours, like albums */
.covers-mix > .level.deck:nth-child(8n+1) { --lv: #d4537e !important; }
.covers-mix > .level.deck:nth-child(8n+2) { --lv: #378add !important; }
.covers-mix > .level.deck:nth-child(8n+3) { --lv: #1d9e75 !important; }
.covers-mix > .level.deck:nth-child(8n+4) { --lv: #ba7517 !important; }
.covers-mix > .level.deck:nth-child(8n+5) { --lv: #7f77dd !important; }
.covers-mix > .level.deck:nth-child(8n+6) { --lv: #e24b4a !important; }
.covers-mix > .level.deck:nth-child(8n+7) { --lv: #0ea5a4 !important; }
.covers-mix > .level.deck:nth-child(8n+8) { --lv: #d85a30 !important; }

/* wide screens: the cover and progress on the left, the task on the right */
@media (min-width: 960px) {
  .pp-screen { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 40px; align-items: start; padding: 18px 28px 26px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 40%, #121212) 0, #161616 420px, #161616 100%); }
  .pp-screen > .trainer-top { grid-column: 1 / -1; margin-bottom: 8px; }
  .pp-side > .pp-now { grid-column: 1; grid-row: 2; margin: 10px 0 14px; }
  .pp-side > .pp-timeline { grid-column: 1; grid-row: 3; }
  .pp-side > .train-tools { grid-column: 1; grid-row: 4; flex-direction: column; align-items: stretch; }
  .pp-side > .train-tools .chip { text-align: left; }
  .pp-screen > .card.task { grid-column: 2; grid-row: 2 / span 4; padding-top: 14px; min-height: 360px; }
  .pp-screen > .small-note { grid-column: 2; text-align: left; }
  .pp-art { width: 300px; height: 300px; }
  .pp-art b { font-size: 1.5rem; }
  .pp-screen .ru { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
}
@media (min-width: 960px) {
  .pp-side > .train-tools { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 4px; }
}
/* the training screen fills the window: no empty black area under it */
@media (min-width: 960px) {
  .pp-screen { min-height: calc(100vh - 120px); grid-template-rows: auto auto auto 1fr; }
  .pp-screen > .card.task { align-self: center; min-height: 0; padding-bottom: 40px; }
  .pp-screen .ru { font-size: clamp(1.8rem, 3vw, 2.8rem); }
  .pp-screen .answer { font-size: 1.2rem; padding-top: 18px; padding-bottom: 18px; }
}
main:has(> .pp-screen) { padding-bottom: 16px; }
/* «Верно 0 из 4 раз» sits apart from the answer field */
.pp-screen .card.task > .srs-line, .pp-screen .srs-line { display: block; margin: 14px 0 16px; font-size: .85rem; color: var(--muted); }
.pp-screen #answer-form { margin-top: 6px; }
/* the task is centred in its column */
.pp-screen .card.task { text-align: center; }
.pp-screen .card.task .mix-stage, .pp-screen .card.task .from-notion { margin-left: auto; margin-right: auto; }
.pp-screen .card.task .answer { text-align: left; }
.pp-screen .task-actions { justify-content: center; }
.pp-screen .feedback, .pp-screen .explain { text-align: left; }
.pp-screen .opts { justify-content: center; }
/* the cover block and the task block share one vertical centre (empty rows above and below take the rest) */
@media (min-width: 960px) {
  .pp-screen { grid-template-rows: auto 1fr auto auto auto 1fr; }
  .pp-side > .pp-now { grid-row: 3; margin-top: 0; }
  .pp-side > .pp-timeline { grid-row: 4; }
  .pp-side > .train-tools { grid-row: 5; }
  .pp-screen > .card.task { grid-row: 3 / span 3; align-self: center; padding: 0; }
}

@media (min-width: 960px) {
  .pp-screen { grid-template-rows: auto 1fr auto 1fr; }
  .pp-screen > .pp-side { grid-column: 1; grid-row: 3; align-self: center; }
  .pp-side > .pp-now, .pp-side > .pp-timeline, .pp-side > .train-tools { grid-row: auto; grid-column: auto; }
  .pp-side > .pp-now { margin: 0 0 14px; }
  .pp-screen > .card.task { grid-column: 2; grid-row: 3; align-self: center; }
}

/* wrong answer: your version vs the right one, then the mistakes one by one */
.pp-review .fb-title { margin-bottom: 12px; }
.pp-review .yr { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; align-items: baseline; font-size: 1.08rem; line-height: 1.45; }
.pp-review .yr .lbl { color: var(--muted); font-size: .8rem; }
.pp-review .yr-you s { color: var(--bad); text-decoration-thickness: 2px; }
.pp-review .yr-right > span:first-child { color: var(--accent); }
.pp-review .mk-list { list-style: none; counter-reset: mk; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; gap: 12px; }
.pp-review .mk-list li { counter-increment: mk; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; }
.pp-review .mk-list li::before { content: counter(mk); grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--bad); color: #121212; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.pp-review .mk-list b { font-weight: 600; }
.pp-review .mk-list b s { color: var(--bad); }
.pp-review .mk-list b span { color: var(--accent); }
.pp-review .mk-list small { color: #d3d1c7; font-size: .92rem; line-height: 1.45; }
.pp-review .fb-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: .82rem; color: var(--muted); }
.pp-review .also { margin-top: 10px; font-size: .88rem; color: var(--muted); }
@media (max-width: 640px) { .pp-review .yr { grid-template-columns: 1fr; gap: 2px; } .pp-review .yr .lbl { margin-top: 6px; } }

/* home: «Продолжить» — marathon and course as wide player cards, levels as small covers */
.pl-cont { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pl-card { display: flex; align-items: center; gap: 16px; background: var(--surface); border-radius: 12px; padding: 12px 16px 12px 12px; color: var(--text); }
.pl-card:hover { background: var(--surface-2); text-decoration: none; }
.pl-mini.big { width: 84px; height: 84px; border-radius: 8px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 8px 10px; line-height: 1; }
.pl-mini.big small { font-size: .7rem; opacity: .85; }
.pl-mini.big b { font-family: var(--font-head); font-weight: 800; font-size: 2rem; }
.pc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pc-text small { color: var(--muted); font-size: .78rem; }
.pc-text b { font-family: var(--font-head); font-weight: 500; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-text > span { color: var(--muted); font-size: .85rem; }
.pc-text .pp-bar { margin-top: 6px; }
.pl-levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pl-lv { position: relative; overflow: hidden; background: var(--surface); border-radius: 10px; padding: 12px 14px 16px; color: var(--text); display: flex; justify-content: space-between; align-items: baseline; }
.pl-lv:hover { background: var(--surface-2); text-decoration: none; }
.pl-lv b { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: var(--c); }
.pl-lv small { color: var(--muted); font-size: .8rem; }
.pl-lv i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--c); }
.pl-lv.locked { opacity: .5; }
/* daily goal: a flat strip in the same style */
.goal.card { background: var(--surface); border: 0; padding: 16px 18px; }
.goal-top b { font-family: var(--font-head); font-weight: 500; }
@media (max-width: 640px) { .pl-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pl-cont { grid-template-columns: 1fr; } }

/* daily goal: progress ring + three segmented controls */
.pl-goal { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; background: var(--surface); border-radius: 12px; padding: 16px 20px; margin: 14px 0 24px; }
.pg-main { display: flex; align-items: center; gap: 14px; min-width: 220px; }
.pg-ring { width: 72px; height: 72px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 80%), conic-gradient(var(--accent) calc(var(--p) * 1%), #333 0); }
.pg-ring b { font-family: var(--font-head); font-size: .95rem; }
.pg-main small { display: block; color: var(--muted); font-size: .78rem; }
.pg-main b { display: block; font-family: var(--font-head); font-weight: 500; font-size: 1.2rem; }
.pg-main span { color: var(--accent); font-size: .85rem; }
.pg-set { flex: 1; display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: flex-end; }
.seg { display: flex; flex-direction: column; gap: 6px; }
.seg > span { color: var(--muted); font-size: .76rem; }
.seg-btns { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg-b { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg-b:hover { color: var(--text); }
.seg-b.on { background: #3a3a3a; color: var(--text); }
@media (max-width: 640px) { .pg-set { justify-content: flex-start; } }

/* ---------- marathon day: cover + queue of steps + the open step ---------- */
.chd-hero { align-items: flex-end; }
.chd-hero .pl-art { width: 140px; height: 140px; }
.chd-hero .pl-art b { display: flex; flex-direction: column; font-size: 3.4rem; line-height: .9; }
.chd-hero .pl-art b small { font-family: var(--font); font-size: .8rem; font-weight: 500; opacity: .85; }
.chd-hero .pl-hero-text { flex: 1; }
.chd-hero .ch-nav { display: flex; gap: 6px; align-self: flex-start; }
.chd-hero .ch-nav .btn { background: rgba(0, 0, 0, .25); border-color: transparent; }
.chd-goal { margin: 2px 0 10px; font-size: .9rem; }
.chd-goal summary { cursor: pointer; opacity: .85; }
.chd-goal .ch-text { margin-top: 6px; opacity: .9; }
.chd-segs { display: flex; gap: 4px; max-width: 360px; }
.chd-segs i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.chd-segs i.done { background: var(--accent); }
.chd-segs i.cur { background: #fff; }
.chd-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.chd-queue { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.chd-queue > small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px 8px; }
.chd-q { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text); font: inherit; font-size: .95rem; padding: 10px; border-radius: 8px; cursor: pointer; }
.chd-q:hover { background: var(--surface); }
.chd-q.on { background: var(--surface-2); font-weight: 600; }
.chd-q.done { color: var(--muted); }
.chd-q .qn { width: 22px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.chd-q.done .qn, .chd-q.on .qn { color: var(--accent); }
.chd-panes .ch-grid { display: contents; }
.chd-pane { display: none; background: var(--surface); border: 0; padding: 20px 22px; }
.chd-pane.on { display: block; }
.chd-head small { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.chd-head h2 { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; margin: 4px 0 4px; }
.chd-head p { color: var(--muted); margin: 0 0 16px; }
.chd-how { margin-top: 18px; }
.chd-how > summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.chd-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.chd-pane .ch-row { background: transparent; }
@media (max-width: 860px) {
  .chd-layout { grid-template-columns: 1fr; }
  .chd-queue { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .chd-queue > small { display: none; }
  .chd-q { width: auto; flex: none; background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: .88rem; white-space: nowrap; }
  .chd-hero .pl-art { width: 100px; height: 100px; }
  .chd-hero .pl-art b { font-size: 2.4rem; }
  .chd-hero .ch-nav { align-self: flex-start; }
}
/* the day's task for the step comes first, open */
.chd-how { margin: 0 0 18px; padding: 14px 16px; background: var(--surface-2); border-radius: 10px; border-left: 0; }
.chd-how > small { display: block; color: var(--accent); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.chd-how .ch-text p:first-child, .chd-how > p:first-of-type { margin-top: 0; }
/* words of the day: the answer field looks like a field */
.vw .vw-in { background: #121212; border: 1px solid #3a3a3a; border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 1rem; }
.vw .vw-in::placeholder { color: #8a8a8a; }
.vw .vw-in:hover { border-color: #555; }
.vw .vw-in:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(198, 255, 61, .15); }

.ch-vt .ch-mark { align-self: flex-start; margin-top: 4px; }
.ch-vt .ch-mark.on { background: var(--accent); color: #111; border-color: var(--accent); }

.pp-screen .card.task .from-notion { display: table; margin: 10px auto 8px; color: #b9b9ff; background: rgba(140, 140, 255, .14); }
.pp-screen .card.task .from-notion.fresh { color: #7be0bf; background: rgba(20, 163, 127, .16); }
.from-notion + .focus { margin-top: 6px; }

/* ---------- sign in / sign up ---------- */
body[data-view="auth"] .top nav, body[data-view="auth"] #goal-pill, body[data-view="auth"] #nb-toggle, body[data-view="auth"] #player-slot { display: none !important; }
.auth-screen { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: min(440px, 100%); padding: 32px; display: grid; gap: 14px; }
.auth-brand { font-family: Unbounded, sans-serif; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.auth-brand b { color: var(--accent); }
.auth-brand .logo-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #111; font-weight: 800; }
.auth-card h1 { margin: 6px 0 0; font-size: 2rem; }
.auth-card form { display: grid; gap: 14px; margin-top: 4px; }
.auth-card label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.auth-card input { font: inherit; font-size: 1rem; padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--text); }
.auth-card input:focus { outline: none; border-color: var(--accent); }
.auth-card .btn.primary { justify-self: stretch; padding: 14px; font-size: 1rem; }
.auth-switch { margin: 0; color: var(--muted); text-align: center; }
.legacy-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.account-card { margin-bottom: 18px; }
.account-card p { margin: 6px 0 12px; }
.account-btn { white-space: nowrap; }
.account-btn[hidden] { display: none !important; }
body[data-view="auth"] #account-btn { display: none !important; }
.guest-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.guest-acts { display: inline-flex; gap: 8px; }
/* long titles shrink instead of pushing the page wider than a phone screen */
.pl-cont, .pl-card, .player { min-width: 0; max-width: 100%; }
.pl-card .pc-text, .player > div { flex: 1; min-width: 0; }
.pl-card .pc-text > b, .pl-card .pc-text > span, .player > div > b, .player > div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card .pp-play, .player .pp-play { flex: none; }

/* ---------- account menu (header) and the account page ---------- */
.acct-menu { position: relative; }
.acct-menu[hidden] { display: none !important; }
body[data-view="auth"] .acct-menu { display: none !important; }
.acct-toggle { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.acct-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #111; font-weight: 800; font-size: 1rem; font-family: Unbounded, sans-serif; }
.acct-avatar.big { width: 64px; height: 64px; font-size: 1.6rem; flex: none; }
.acct-toggle:focus-visible .acct-avatar { outline: 2px solid #fff; outline-offset: 2px; }
.acct-pop { display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: #1f1f1f; border: 1px solid #2f2f2f; border-radius: 12px; padding: 8px; box-shadow: var(--shadow-lg); z-index: 60; }
.acct-menu.open .acct-pop { display: grid; }
.acct-pop .acct-email { padding: 8px 10px 10px; color: var(--muted); font-size: .85rem; border-bottom: 1px solid #2f2f2f; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-pop a, .acct-pop button { display: block; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.acct-pop a:hover, .acct-pop button:hover { background: #2a2a2a; text-decoration: none; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.acct-card { padding: 20px; margin-bottom: 16px; }
.acct-card h3 { margin: 0 0 10px; }
.acct-profile { display: flex; align-items: center; gap: 16px; }
.acct-profile > div { display: grid; gap: 4px; min-width: 0; }
.acct-profile b { overflow: hidden; text-overflow: ellipsis; }
.acct-plan { display: inline-block; justify-self: start; margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: rgba(198, 255, 61, .14); color: var(--accent); font-size: .82rem; font-weight: 600; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 12px 0; }
.acct-row + .acct-row { border-top: 1px solid rgba(255, 255, 255, .07); }
.acct-row > div:first-child { display: grid; gap: 2px; }
.acct-row .voice-row { margin: 0; }
.acct-form { display: grid; gap: 12px; max-width: 420px; }
.acct-form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.acct-form input { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--text); }
.acct-form input:focus { outline: none; border-color: var(--accent); }
.acct-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.danger-zone p { margin: 0; }
.acct-card .stack.row { margin-top: 12px; }
@media (max-width: 560px) {
  .top nav { order: 10; } /* the menu takes its own row; the account button stays up with the other icons */
  .acct-pop { position: fixed; top: 64px; right: 16px; left: auto; }
}

/* Home: every row reaches both edges, like the tiles above it; finished steps keep their size (only dimmed) */
.pl-track.done { padding: 0; text-align: left; max-width: none; margin: 0; }
.today .today-row { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
.pl-lib .pl-row { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
@media (max-width: 860px) { .today .today-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .today .today-row, .pl-lib .pl-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g-wrap { display: grid; gap: 14px; margin-top: 4px; }
.g-wrap[hidden] { display: none; }
.g-btn { min-height: 44px; display: flex; justify-content: center; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .12); }
.auth-legal { margin: 0; text-align: center; font-size: .8rem; line-height: 1.5; }
.g-btn iframe { color-scheme: light; }  /* no white corners around Google's button on the dark page */
.g-btn > div { border-radius: 999px; overflow: hidden; }
body.guest #nb-toggle, body.guest #goal-pill { display: none !important; } /* nothing to note or count before signing in */
.gate-note { margin: 0 0 4px; }
body[data-view="gate"] #player-slot { display: none !important; }
