:root {
    color-scheme: light dark;
    --bg: #fffdfa;
    --fg: #1e1c1a;
    --muted: #6b6560;
    --accent: #c2410c;
    --line: #e8e2da;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16151a;
        --fg: #eceaf0;
        --muted: #a09aa8;
        --accent: #fb923c;
        --line: #2e2c35;
    }
}

* { box-sizing: border-box; }

/* Header, footer and wide pages (hub tables) use the full width; running text keeps
   a readable line length of about 46rem. */
body {
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
    max-width: 64rem;
    background: var(--bg);
    color: var(--fg);
    font: 1.05rem/1.65 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

main { max-width: 46rem; margin: 0 auto; }
main.wide { max-width: none; }

a { color: var(--accent); }
a:hover { text-decoration: none; }

.site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.site-logo {
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--fg);
}

.site-nav a { margin-left: 1rem; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 0.8rem; }

.lead { font-size: 1.15rem; color: var(--muted); }
.muted { color: var(--muted); }

.card-list { list-style: none; padding: 0; }
.card-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    text-align: left;
    vertical-align: top;
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid var(--line);
}

th { width: 40%; font-weight: 600; color: var(--muted); }

.hub-table th { width: auto; white-space: nowrap; }
.hub-table td { padding-top: 0.8rem; padding-bottom: 0.8rem; }
.hub-year { margin-left: 0.35rem; font-size: 0.85rem; }
.hub-read {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.85rem;
}
.hub-more { margin-left: 0.25rem; white-space: nowrap; }

/* Same column widths in both premiere tables, so "Скоро" and "Недавно вышло" line up. */
@media (min-width: 40.01rem) {
    .premiere-table { table-layout: fixed; }
    .premiere-table th:nth-child(1) { width: 10.5rem; }
    .premiere-table th:nth-child(2) { width: 30%; }
    .premiere-table th:nth-child(3) { width: 30%; }
    .premiere-table td:first-child { white-space: nowrap; }
}

/* Phones: every row becomes a small card with labelled lines instead of a squeezed table. */
@media (max-width: 40rem) {
    .hub-table thead { display: none; }
    .hub-table, .hub-table tbody, .hub-table tr, .hub-table td { display: block; }
    .hub-table tr { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
    .hub-table td { padding: 0.15rem 0; border: 0; }
    .hub-table td:first-child { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.3rem; }
    .hub-table td + td::before {
        content: attr(data-label) ": ";
        color: var(--muted);
        font-size: 0.85rem;
    }
    .hub-table td + td .hub-read { margin-left: 0; }
}

.lang-pill {
    display: inline-block;
    padding: 0 0.35rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.6;
    text-decoration: none;
}
a.lang-pill:hover { border-color: var(--accent); }
.reading ul { padding-left: 1.2rem; }

.watch p { margin: 0.5rem 0; }
.watch-region { font-weight: 600; margin-top: 1rem !important; }
.watch-abroad { margin: 0.3rem 0; padding-left: 1.2rem; }
.watch-label { color: var(--muted); }

.watch-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.watch-logo {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    vertical-align: middle;
}

.watch-credit { font-size: 0.85rem; margin-top: 0.9rem; }

.page-updated { font-size: 0.9rem; margin-top: 2rem; }

.site-footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}
