/* ==========================================================================
   Manch — design system
   Dark editorial surface, one accent, hairline rules, no ornament.
   ========================================================================== */

@font-face { font-family: "Switzer"; src: url("../fonts/switzer-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../fonts/switzer-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../fonts/switzer-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../fonts/switzer-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
    --ink-900: #07080a;
    --ink-800: #0c0e10;
    --ink-700: #121517;
    --ink-600: #191d20;
    --ink-500: #23282c;

    --text:    #eeece7;
    --text-2:  #9ba2a8;
    --text-3:  #6d747a;

    --line:      rgba(255, 255, 255, 0.09);
    --line-soft: rgba(255, 255, 255, 0.05);
    --line-hard: rgba(255, 255, 255, 0.16);

    --accent:      #ff5a2c;
    --accent-soft: rgba(255, 90, 44, 0.14);
    --good:        #5fbf87;
    --warn:        #e0b356;
    --bad:         #e2685c;

    --shell:   1320px;
    --radius:  4px;
    --radius-lg: 8px;

    --step--1: clamp(0.75rem, 0.73rem + 0.1vw, 0.8125rem);
    --step-0:  clamp(0.9375rem, 0.92rem + 0.1vw, 1rem);
    --step-1:  clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
    --step-2:  clamp(1.5rem, 1.3rem + 0.9vw, 2.125rem);
    --step-3:  clamp(2.125rem, 1.6rem + 2.4vw, 3.75rem);
    --step-4:  clamp(2.75rem, 1.7rem + 4.6vw, 5.75rem);

    --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

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

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

/* --- scrollbars -----------------------------------------------------------
   Every surface here is dark, so the platform's light scrollbar reads as a
   white stripe down the page. One quiet treatment for the document and for
   anything that scrolls inside it. Firefox takes the two properties; Chrome,
   Edge and Safari take the ::-webkit- rules below. */

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    /* Inset from the track, so the thumb reads as a slim pill. */
    border: 3px solid transparent;
    background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.26); background-clip: content-box; }
*::-webkit-scrollbar-corner { background: transparent; }
/* Windows draws stepper arrows at each end; the track is enough. */
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

body {
    margin: 0;
    background: var(--ink-900);
    color: var(--text);
    font-family: "Switzer", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: var(--step-0);
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #0a0a0a; }

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

/* --- layout ------------------------------------------------------------- */

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.shell--narrow { max-width: 780px; }
.shell--mid    { max-width: 1040px; }

main { flex: 1 0 auto; padding-bottom: clamp(4rem, 9vw, 7rem); }

.section { margin-top: clamp(3rem, 7vw, 5.5rem); }
.section--tight { margin-top: clamp(2rem, 4vw, 3rem); }

.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: 0.5rem; }
.stack-lg > * + * { margin-top: 2rem; }

.row { display: flex; align-items: center; gap: 0.75rem; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* --- type helpers ------------------------------------------------------- */

.eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.display  { font-size: var(--step-3); font-weight: 900; letter-spacing: -0.035em; }
.title-lg { font-size: var(--step-2); }
.title    { font-size: var(--step-1); }
.lede     { font-size: clamp(1rem, 0.96rem + 0.25vw, 1.1875rem); color: var(--text-2); line-height: 1.6; max-width: 62ch; }
.muted    { color: var(--text-2); }
.dim      { color: var(--text-3); }
.small    { font-size: var(--step--1); }
.nums     { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
    border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: var(--step-1); letter-spacing: -0.02em; }
.section-head a { font-size: var(--step--1); color: var(--text-2); transition: color 0.15s var(--ease); }
.section-head a:hover { color: var(--text); }

/* --- header ------------------------------------------------------------- */

.masthead {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(7, 8, 10, 0.82);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.masthead__inner {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.25rem);
    height: 64px;
}

.wordmark {
    font-size: 1.0625rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
}
.wordmark::before {
    content: "";
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
    font-size: 0.875rem;
    color: var(--text-2);
    padding: 0.25rem 0;
    position: relative;
    transition: color 0.15s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a[aria-current] { color: var(--text); }
.nav a[aria-current]::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -21px;
    height: 1px;
    background: var(--text);
}

.masthead__search { flex: 1; max-width: 340px; margin-left: auto; }
.masthead__actions { display: flex; align-items: center; gap: 0.75rem; flex: none; }

.burger {
    display: none;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    background: none; border: 1px solid var(--line); border-radius: var(--radius);
    cursor: pointer;
}
.burger span { display: block; width: 16px; height: 1px; background: var(--text); position: relative; }
.burger span::before, .burger span::after {
    content: ""; position: absolute; left: 0; width: 16px; height: 1px; background: var(--text);
}
.burger span::before { top: -5px; }
.burger span::after  { top: 5px; }

/* --- search ------------------------------------------------------------- */

.search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ink-700);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 0.875rem;
    height: 38px;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.search:focus-within { border-color: var(--line-hard); background: var(--ink-600); }
.search input {
    flex: 1; min-width: 0;
    background: none; border: 0; outline: none;
    font-size: 0.875rem;
}
.search input::placeholder { color: var(--text-3); }
.search svg { width: 15px; height: 15px; stroke: var(--text-3); flex: none; }

/* --- buttons ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 40px;
    padding: 0 1.125rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--ink-600);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease), opacity 0.15s var(--ease);
}
.btn:hover { background: var(--ink-500); }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--text); color: #0a0b0c; }
.btn--primary:hover { background: #fff; }

.btn--accent { background: var(--accent); color: #120603; }
.btn--accent:hover { filter: brightness(1.06); }

.btn--ghost { background: transparent; border-color: var(--line); }
.btn--ghost:hover { background: var(--ink-700); border-color: var(--line-hard); }

.btn--quiet { background: transparent; color: var(--text-2); padding-inline: 0.5rem; }
.btn--quiet:hover { background: transparent; color: var(--text); }

.btn--danger { background: transparent; border-color: rgba(226, 104, 92, 0.4); color: var(--bad); }
.btn--danger:hover { background: rgba(226, 104, 92, 0.12); }

.btn--sm { height: 32px; padding: 0 0.75rem; font-size: 0.8125rem; }
.btn--lg { height: 48px; padding: 0 1.5rem; font-size: 0.9375rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* --- chips / tags ------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 30px;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 0.8125rem;
    color: var(--text-2);
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-hard); }
.chip[aria-current], .chip--on { background: var(--text); border-color: var(--text); color: #0a0b0c; }

.tag { font-size: 0.75rem; color: var(--text-3); }
.tag::before { content: "#"; opacity: 0.6; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 22px;
    padding: 0 0.5rem;
    border-radius: 3px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--ink-600);
    color: var(--text-2);
}
.badge--live      { background: var(--accent-soft); color: var(--accent); }
.badge--good      { background: rgba(95, 191, 135, 0.14); color: var(--good); }
.badge--warn      { background: rgba(224, 179, 86, 0.14); color: var(--warn); }
.badge--bad       { background: rgba(226, 104, 92, 0.14); color: var(--bad); }

/* --- video cards -------------------------------------------------------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: clamp(1rem, 2vw, 1.75rem) clamp(0.75rem, 1.5vw, 1.25rem);
}
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card { display: block; position: relative; }

.card__poster {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--ink-700);
    border: 1px solid var(--line-soft);
}
.card--wide .card__poster { aspect-ratio: 16 / 9; }

.card__poster img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease), opacity 0.3s var(--ease);
}
.card:hover .card__poster img { transform: scale(1.03); }

.card__duration {
    position: absolute;
    right: 8px; bottom: 8px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(6, 7, 8, 0.78);
    backdrop-filter: blur(4px);
    font-size: 0.6875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.card__flag {
    position: absolute;
    left: 8px; top: 8px;
    padding: 3px 7px;
    border-radius: 3px;
    background: rgba(6, 7, 8, 0.72);
    backdrop-filter: blur(4px);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card__body { padding-top: 0.75rem; }
.card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.32;
    transition: color 0.15s var(--ease);
}
.card:hover .card__title { color: #fff; }
.card__meta {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.card__meta .sep { opacity: 0.4; }

/* --- avatars ------------------------------------------------------------ */

.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    flex: none;
    object-fit: cover;
    display: grid;
    place-items: center;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.82);
    overflow: hidden;
    border: 1px solid var(--line);
}
.avatar--lg { width: 64px; height: 64px; font-size: 1rem; }
.avatar--xl { width: 96px; height: 96px; font-size: 1.5rem; }
.avatar--sm { width: 26px; height: 26px; font-size: 0.625rem; }

/* --- hero --------------------------------------------------------------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
    border-bottom: 1px solid var(--line);
}
.hero__title {
    font-size: var(--step-4);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 0.94;
    margin-block: 1.25rem 1.5rem;
}
.hero__poster {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
}
.hero__poster img { width: 100%; height: 100%; object-fit: cover; }
.hero__meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; color: var(--text-2); font-size: 0.875rem; }

/* --- rails (horizontal scroll) ------------------------------------------ */

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 1fr);
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--ink-500); border-radius: 3px; }

/* --- watch page --------------------------------------------------------- */

.watch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.player {
    position: relative;
    background: #000;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    place-items: center;
}
.player--vertical { aspect-ratio: 9 / 16; max-height: 78vh; margin-inline: auto; width: auto; }
.player--horizontal { aspect-ratio: 16 / 9; width: 100%; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.player__missing {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.75rem;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(rgba(7, 8, 10, 0.55), rgba(7, 8, 10, 0.88));
}

.watch__title { font-size: var(--step-2); letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.watch__stats { display: flex; gap: 0.75rem; align-items: center; color: var(--text-3); font-size: 0.875rem; flex-wrap: wrap; }

.creator-bar {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 0;
    margin: 1.25rem 0;
    border-block: 1px solid var(--line);
}

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 38px;
    padding: 0 0.875rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.action:hover { border-color: var(--line-hard); background: var(--ink-700); }
.action[aria-pressed="true"] { color: var(--accent); border-color: rgba(255, 90, 44, 0.35); background: var(--accent-soft); }
.action svg { width: 16px; height: 16px; }
.action__count { font-variant-numeric: tabular-nums; color: var(--text-2); }
.action[aria-pressed="true"] .action__count { color: inherit; }

.comment { display: flex; gap: 0.75rem; padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.comment:last-child { border-bottom: 0; }
.comment__body { min-width: 0; flex: 1; }
.comment__head { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.2rem; }
.comment__author { font-weight: 600; font-size: 0.875rem; }

.up-next { display: flex; flex-direction: column; gap: 1rem; }
.up-next__item { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 0.75rem; }
.up-next__poster { aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; background: var(--ink-700); }
.up-next__poster img { width: 100%; height: 100%; object-fit: cover; }
.up-next__title { font-size: 0.875rem; font-weight: 600; line-height: 1.3; }

/* --- forms -------------------------------------------------------------- */

.field { display: block; margin-bottom: 1.25rem; }
.field__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    letter-spacing: -0.005em;
}
.field__hint { display: block; font-size: 0.8125rem; color: var(--text-3); margin-top: 0.4rem; }
.field__error { display: block; font-size: 0.8125rem; color: var(--bad); margin-top: 0.4rem; }

.input, .textarea, .select {
    width: 100%;
    background: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.65rem 0.875rem;
    font-size: 0.9375rem;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--line-hard);
    background: var(--ink-700);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: rgba(226, 104, 92, 0.55); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.25rem; }

.checkbox { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.875rem; cursor: pointer; }
.checkbox input { margin-top: 0.2rem; accent-color: var(--accent); width: 15px; height: 15px; }

.dropzone {
    border: 1px dashed var(--line-hard);
    border-radius: var(--radius-lg);
    background: var(--ink-800);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--ink-700); }
.dropzone input[type="file"] { display: none; }
.dropzone__name { margin-top: 0.75rem; font-size: 0.875rem; color: var(--accent); word-break: break-all; }

.form-actions { display: flex; gap: 0.75rem; align-items: center; padding-top: 0.5rem; }

/* --- panels / tables ---------------------------------------------------- */

.panel {
    background: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 3vw, 1.75rem);
}
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { padding: 1.125rem 1.25rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel__head h3 { font-size: 0.9375rem; letter-spacing: -0.01em; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: var(--ink-800); padding: 1.125rem 1.25rem; }
.stat__value { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 0.75rem; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.25rem; }
.stat__delta { font-size: 0.75rem; color: var(--text-3); margin-top: 0.35rem; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.data th {
    text-align: left;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
table.data td { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.12s var(--ease); }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.cell-title { font-weight: 600; letter-spacing: -0.01em; }
.cell-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }

/* --- sidebar layout (studio / admin) ------------------------------------ */

.console { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); padding-top: 2rem; }
.console__nav { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.console__nav a {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-2);
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.console__nav a:hover { background: var(--ink-800); color: var(--text); }
.console__nav a[aria-current] { background: var(--ink-700); color: var(--text); font-weight: 600; }
.console__nav .eyebrow { padding: 1rem 0.75rem 0.4rem; }

/* --- chart -------------------------------------------------------------- */

.chart { display: flex; align-items: flex-end; gap: 3px; height: 96px; }
.chart__bar { flex: 1; background: var(--ink-500); border-radius: 2px 2px 0 0; min-height: 2px; position: relative; transition: background 0.15s var(--ease); }
.chart__bar:hover { background: var(--accent); }
.chart__axis { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--text-3); margin-top: 0.5rem; }

/* --- flash + alerts ----------------------------------------------------- */

.flash-stack { position: fixed; top: 78px; right: clamp(1rem, 4vw, 2.5rem); z-index: 80; display: flex; flex-direction: column; gap: 0.5rem; max-width: 360px; }
.flash {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--ink-700);
    font-size: 0.875rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    animation: flash-in 0.3s var(--ease);
}
.flash--success { border-color: rgba(95, 191, 135, 0.35); }
.flash--error   { border-color: rgba(226, 104, 92, 0.4); }
.flash__dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 0.5rem; flex: none; background: var(--text-2); }
.flash--success .flash__dot { background: var(--good); }
.flash--error .flash__dot   { background: var(--bad); }

@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.notice {
    padding: 0.875rem 1rem;
    border: 1px solid var(--line);
    border-left: 2px solid var(--text-3);
    border-radius: var(--radius);
    background: var(--ink-800);
    font-size: 0.875rem;
    color: var(--text-2);
}
.notice--warn { border-left-color: var(--warn); }
.notice--bad  { border-left-color: var(--bad); }

.empty { text-align: center; padding: clamp(3rem, 8vw, 5rem) 1rem; border: 1px dashed var(--line); border-radius: var(--radius-lg); }
.empty h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }

/* --- pagination --------------------------------------------------------- */

.pagination { display: flex; gap: 0.35rem; justify-content: center; align-items: center; margin-top: clamp(2rem, 5vw, 3.5rem); flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-2);
    transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.pagination a:hover { border-color: var(--line-hard); color: var(--text); }
.pagination [aria-current] { background: var(--text); border-color: var(--text); color: #0a0b0c; font-weight: 600; }
.pagination .gap { border: 0; color: var(--text-3); min-width: 20px; }

/* --- footer ------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 4rem); background: var(--ink-800); flex: none; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.footer h4 { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 0.875rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer a { font-size: 0.875rem; color: var(--text-2); transition: color 0.15s var(--ease); }
.footer a:hover { color: var(--text); }
.footer__base { margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.8125rem; color: var(--text-3); }

/* --- prose (legal pages) ------------------------------------------------ */

.prose { max-width: 68ch; }
.prose h2 { font-size: var(--step-1); margin: 2.5rem 0 0.875rem; letter-spacing: -0.02em; }
.prose h3 { font-size: 1.0625rem; margin: 1.75rem 0 0.5rem; }
.prose p, .prose li { color: var(--text-2); line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-hard); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* --- auth --------------------------------------------------------------- */

.auth { display: grid; place-items: center; padding-block: clamp(2.5rem, 7vw, 5rem); }
.auth__card { width: 100%; max-width: 420px; }
.auth__switch { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-2); }
.auth__switch a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* --- profile ------------------------------------------------------------ */

.profile-head { display: flex; gap: clamp(1rem, 3vw, 2rem); align-items: flex-start; padding-block: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.profile-stats { display: flex; gap: 1.5rem; margin-top: 1rem; font-size: 0.875rem; color: var(--text-3); flex-wrap: wrap; }
.profile-stats b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- responsive --------------------------------------------------------- */

@media (max-width: 1080px) {
    .watch { grid-template-columns: minmax(0, 1fr); }
    .up-next { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: minmax(0, 1fr); }
    .hero__poster { order: -1; aspect-ratio: 16 / 10; }
    .console { grid-template-columns: minmax(0, 1fr); }
    .console__nav { position: static; flex-direction: row; overflow-x: auto; gap: 0.35rem; padding-bottom: 0.5rem; }
    .console__nav .eyebrow { display: none; }
    .console__nav a { white-space: nowrap; border: 1px solid var(--line); }
    .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .masthead__inner { height: 56px; }
    .nav, .masthead__search { display: none; }
    .burger { display: inline-flex; margin-left: auto; }
    .masthead__actions .btn--ghost { display: none; }

    .masthead.is-open .nav {
        display: flex;
        position: absolute;
        top: 56px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem clamp(1rem, 4vw, 2.5rem) 1rem;
        background: var(--ink-900);
        border-bottom: 1px solid var(--line);
    }
    .masthead.is-open .nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--line-soft); }
    .masthead.is-open .nav a[aria-current]::after { display: none; }
    .masthead.is-open .masthead__search { display: block; position: absolute; top: calc(56px + 1px); left: 0; right: 0; max-width: none; padding: 1rem clamp(1rem, 4vw, 2.5rem) 0; background: var(--ink-900); }

    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.25rem 0.75rem; }
    .player--vertical { max-height: none; width: 100%; }
    .up-next { grid-template-columns: minmax(0, 1fr); }
    .up-next__item { grid-template-columns: 92px minmax(0, 1fr); }
    .flash-stack { left: 1rem; right: 1rem; max-width: none; }
    .profile-head { flex-direction: column; }
    .footer__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* --- auth extras: split fields, password toggle, alternate methods ------- */

/* Country code + number. The prefix is a locked box, not an input. */
.field-split { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; }

.field-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 0 0.875rem;
    background: var(--ink-700);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-2);
}

.password-wrap { position: relative; display: block; }
.password-wrap .input { padding-right: 4.5rem; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.375rem;
    transform: translateY(-50%);
    height: 30px;
    padding: 0 0.625rem;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: var(--text-2);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.password-toggle:hover { color: var(--text); background: var(--ink-600); }

/* A field that is visible but not wired up yet. */
.field--soon .input,
.field--soon .field-prefix { opacity: 0.55; cursor: not-allowed; }
.field--soon .field__label::after {
    content: "Soon";
    margin-left: 0.5rem;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--ink-600);
    color: var(--text-3);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: 1px;
}

.rule {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin: 1.75rem 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.methods { display: flex; flex-direction: column; gap: 0.625rem; }
.methods__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }

.method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    height: 46px;
    padding: 0 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.method:hover { border-color: var(--line-hard); background: var(--ink-800); }
.method svg { width: 18px; height: 18px; flex: none; }
.method[disabled] { opacity: 0.42; cursor: not-allowed; }
.method[disabled]:hover { border-color: var(--line); background: transparent; }

.legal {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-soft);
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-3);
    text-align: center;
}
.legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--text); }

@media (max-width: 480px) {
    .methods__pair { grid-template-columns: minmax(0, 1fr); }
}
