:root {
    color-scheme: light;
    --background: #f5f3ee;
    --surface: #fcfbf8;
    --ink: #20271f;
    --muted: #50594c;
    --line: #d9dcd1;
    --accent: #40583c;
    --accent-light: #e7ebdf;
    font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; }
button:focus-visible, a:focus-visible, iframe:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { max-width: 1264px; width: calc(100% - 96px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-content { display: flex; justify-content: space-between; align-items: center; min-height: 72px; gap: 24px; }
.wordmark { font-weight: 750; font-size: 18px; letter-spacing: .16em; text-decoration: none; }
.header-label { color: var(--muted); font-size: 14px; }

.intro { margin: 52px 0 56px; display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1fr); align-items: stretch; }
.intro-text { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(20px, 4vw, 56px) clamp(22px, 4vw, 54px) clamp(20px, 4vw, 56px) 0; }
h1, h2, p, figure { margin: 0; }
h1 { font-weight: 580; font-size: clamp(39px, 5.3vw, 77px); line-height: 1.03; letter-spacing: -.062em; }
.intro-text p { margin-top: 20px; max-width: 29ch; font-size: clamp(16px, 1.55vw, 21px); line-height: 1.55; color: var(--muted); }
.intro-figure { position: relative; min-height: 262px; overflow: hidden; background: var(--accent-light); }
.intro-figure img { display: block; width: 100%; height: 100%; max-height: 346px; object-fit: cover; object-position: 50% 57%; }
.intro-figure figcaption { position: absolute; bottom: 15px; right: 15px; padding: 7px 12px; color: white; background: #20271fe6; font-size: 13px; }

.catalog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(244px, .43fr); gap: clamp(20px, 3.2vw, 48px); align-items: start; padding-bottom: 54px; }
.section-heading { margin: 0 0 16px; font-size: 25px; font-weight: 600; letter-spacing: -.025em; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-height: 112px; }
.project { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 112px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; padding: 19px 20px; transition: border-color .16s ease, background-color .16s ease; }
.project strong { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.project-detail { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.35; }
.project-arrow { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 19px; line-height: 1; width: 31px; height: 31px; flex: none; }
.project:hover:not(:disabled), .project.is-selected { border-color: var(--accent); background: var(--accent-light); }
.project:disabled { cursor: default; }
.project:disabled:not(.is-selected) .project-arrow { color: #637260; background: #edf0e7; }
.download { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 12px; font-weight: 600; font-size: 15px; text-underline-offset: 4px; color: var(--accent); }
.download:hover { color: var(--ink); }

.queue { border: 1px solid var(--line); padding: 22px; background: #eaece3; }
.queue h2 { font-size: 20px; font-weight: 630; letter-spacing: -.03em; margin-bottom: 18px; }
.queue-state { display: flex; gap: 9px; align-items: flex-start; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #6d8167; margin-top: 7px; flex: none; }
.status-label { font-size: 16px; font-weight: 650; line-height: 1.4; }
.status-detail { font-size: 14px; line-height: 1.5; margin-top: 6px; color: var(--muted); }
.secondary { border: 1px solid #6d8167; background: transparent; padding: 9px 14px; min-height: 42px; color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 600; }
.secondary:hover:not(:disabled) { background: var(--accent-light); }
.queue .secondary { margin-top: 18px; }
.error { border-left: 2px solid #823b2e; padding: 10px 13px; margin: 0 0 24px; color: #692e24; }

.watch { margin: 26px 0 56px; }
.watch-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.watch-header h2 { font-size: 28px; font-weight: 600; }
.watch-header p { font-size: 14px; margin-top: 4px; color: var(--muted); }
.clock { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); }
.player { width: 100%; background: #151a15; }
.player iframe { display: block; border: 0; width: 100%; height: min(68vh, 760px); min-height: 260px; }

@media (max-width: 850px) {
    .shell { width: calc(100% - 54px); }
    .intro { margin-top: 32px; margin-bottom: 34px; }
    h1 { font-size: clamp(36px, 6vw, 56px); }
    .catalog { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .queue { grid-row: 1; }
}
@media (max-width: 540px) {
    .shell { width: calc(100% - 32px); }
    .header-content { min-height: 56px; }
    .intro { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 25px; margin-bottom: 22px; }
    .intro-text { padding: 0; }
    .intro-text p { margin-top: 13px; }
    .intro-figure { min-height: 0; }
    .intro-figure img { aspect-ratio: 1.75; height: auto; }
    .project { padding: 13px 12px; min-height: 86px; }
    .project strong { font-size: 19px; }
    .project-detail { font-size: 12px; }
    .project-arrow { width: 25px; height: 25px; font-size: 15px; }
    .queue { padding: 16px; }
    .player iframe { height: 60svh; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
