:root {
    --paper: #f5efe3;
    --paper-2: #ece3d1;
    --ink: #1d1a16;
    --muted: #6b6257;
    --rule: #cfc3ae;
    --accent: #9b2c2c;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
        Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI",
        Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    min-height: 100dvh;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    overflow-x: hidden;
    overflow-wrap: break-word;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

::selection {
    background: #f1d3c2;
}

/* ── Шапка газеты ──────────────────────────────────────────────── */
.masthead {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 22px;
    text-align: center;
}

.masthead__meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding-bottom: 10px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--ink);
}

.masthead__title {
    display: block;
    margin: 16px 0 4px;
    font-size: clamp(58px, 12vw, 128px);
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
}

.masthead__tagline {
    font-style: italic;
    font-size: 17px;
    color: var(--muted);
}

.masthead__nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 30px;
    margin-top: 14px;
    padding-block: 10px;
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-top: 3px double var(--ink);
    border-bottom: 1px solid var(--ink);
}

.masthead__nav a {
    color: var(--ink);
    text-decoration: none;
}

.masthead__nav a:hover,
.masthead__nav a.is-active {
    color: var(--accent);
}

.masthead__nav a.is-active {
    border-bottom: 2px solid var(--accent);
}

/* ── Общая типографика ─────────────────────────────────────────── */
.kicker {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.headline {
    margin-top: 10px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.deck {
    margin-top: 16px;
    font-size: 21px;
    line-height: 1.5;
    font-style: italic;
    color: var(--muted);
}

.byline {
    margin-top: 18px;
    padding-block: 10px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.dropcap::first-letter {
    float: left;
    padding: 6px 10px 0 0;
    font-size: 4.2em;
    line-height: 0.82;
    font-weight: 700;
    color: var(--accent);
}

.pull {
    margin: 34px 0;
    padding: 18px 0;
    font-size: 26px;
    line-height: 1.35;
    font-style: italic;
    text-align: center;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
}

.pull cite {
    display: block;
    margin-top: 8px;
    font-family: var(--sans);
    font-size: 12px;
    font-style: normal;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.section-label {
    margin-top: 44px;
    padding-bottom: 6px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--ink);
}

/* ── Первая полоса ─────────────────────────────────────────────── */
.front {
    max-width: 1100px;
    margin: 0 auto;
    padding-block: 40px 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
}

.lead-story {
    padding-right: 48px;
    border-right: 1px solid var(--rule);
}

.columns {
    margin-top: 26px;
    columns: 2;
    column-gap: 36px;
    column-rule: 1px solid var(--rule);
}

.columns p + p {
    text-indent: 1.5em;
}

.contents {
    list-style: none;
}

.contents li {
    border-bottom: 1px solid var(--rule);
}

.contents a {
    display: grid;
    grid-template-columns: 3ch minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 14px;
    padding: 14px 0;
    color: var(--ink);
    text-decoration: none;
}

.contents a:hover .contents__title {
    color: var(--accent);
}

.contents__num {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--muted);
}

.contents__title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.contents__meta {
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--muted);
}

/* ── Вход ──────────────────────────────────────────────────────── */
.signin {
    padding-left: 48px;
}

.signin h2 {
    margin-top: 8px;
    font-size: 30px;
    line-height: 1.15;
}

.signin__intro {
    margin-top: 8px;
    font-size: 16px;
    font-style: italic;
    color: var(--muted);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 26px;
}

.field__label {
    display: block;
    font-family: var(--sans);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.field__wrap {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    border-bottom: 1px solid var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field__wrap:focus-within {
    border-bottom-color: var(--accent);
    box-shadow: 0 1px 0 var(--accent);
}

.field__input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 8px 0 6px;
    font: inherit;
    font-size: 20px;
    color: var(--ink);
    background: transparent;
    border: none;
    border-radius: 0;
    outline: none;
}

.field__input::placeholder {
    color: #b3a894;
}

.field__toggle {
    flex: none;
    padding: 4px 0 9px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
}

.form__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-family: var(--sans);
    font-size: 14px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    cursor: pointer;
}

.check input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
}

.btn {
    display: inline-block;
    padding: 14px 22px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--paper);
    background: var(--ink);
    border: 1px solid var(--ink);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
    color: var(--paper);
    background: var(--accent);
    border-color: var(--accent);
}

.btn:disabled {
    cursor: progress;
    opacity: 0.7;
}

.note {
    min-height: 1.5em;
    font-size: 15px;
    font-style: italic;
    color: var(--muted);
}

.note.is-error {
    color: var(--accent);
}

.notice {
    margin-top: 30px;
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.5;
    background: var(--paper-2);
    border: 1px solid var(--ink);
}

.notice .kicker {
    display: block;
    margin-bottom: 6px;
}

/* ── Статья ────────────────────────────────────────────────────── */
.article {
    max-width: 1100px;
    margin: 0 auto;
    padding-block: 44px 60px;
}

.article__head {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.article-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 56px;
    margin-top: 40px;
}

.prose {
    max-width: 68ch;
}

.prose h2 {
    margin: 1.8em 0 0.5em;
    font-size: 28px;
    line-height: 1.2;
}

.prose p + p {
    margin-top: 1em;
}

.prose ul,
.prose ol {
    margin: 1em 0 1em 1.3em;
}

.prose li + li {
    margin-top: 0.4em;
}

.prose code,
.box code {
    padding: 1px 5px;
    font-family: var(--mono);
    font-size: 0.82em;
    background: var(--paper-2);
}

.sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.box {
    padding: 20px 22px;
    background: var(--paper-2);
    border: 1px solid var(--ink);
}

.box .kicker {
    margin-bottom: 10px;
}

.box dt {
    font-size: 16px;
    font-weight: 700;
}

.box dd {
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--muted);
}

.box ol {
    margin-left: 1.2em;
    font-size: 16px;
    line-height: 1.5;
}

.box li + li {
    margin-top: 6px;
}

.table-wrap {
    margin: 24px 0;
    overflow-x: auto;
}

.data {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 16px;
}

.data th {
    padding: 8px 10px;
    font-family: var(--sans);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: left;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 2px solid var(--ink);
}

.data td {
    padding: 10px;
    vertical-align: top;
    border-bottom: 1px solid var(--rule);
}

.data td:first-child {
    font-weight: 700;
}

.trio {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 28px 0;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
}

.trio div {
    padding: 18px 16px;
    border-right: 1px solid var(--rule);
}

.trio div:last-child {
    border-right: none;
}

.trio b {
    display: block;
    font-size: 64px;
    line-height: 1;
    color: var(--accent);
}

.trio span {
    display: block;
    margin-top: 6px;
    font-size: 16px;
    line-height: 1.45;
}

.next {
    max-width: 820px;
    margin: 56px auto 0;
    padding-top: 18px;
    text-align: center;
    border-top: 3px double var(--ink);
}

.next a {
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}

.next a:hover {
    color: var(--accent);
}

.colophon {
    max-width: 1100px;
    margin: 0 auto;
    padding-block: 22px 32px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
    color: var(--muted);
    border-top: 1px solid var(--ink);
}

/* ── Адаптив ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .front,
    .article-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .lead-story {
        padding-right: 0;
        border-right: none;
    }

    .signin {
        margin-top: 44px;
        padding-top: 32px;
        padding-left: 0;
        border-top: 3px double var(--ink);
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 17px;
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .columns {
        columns: 1;
    }

    .deck {
        font-size: 19px;
    }

    .pull {
        font-size: 22px;
    }

    .trio {
        grid-template-columns: minmax(0, 1fr);
    }

    .trio div {
        border-right: none;
        border-bottom: 1px solid var(--rule);
    }

    .trio div:last-child {
        border-bottom: none;
    }

    .contents a {
        grid-template-columns: 3ch minmax(0, 1fr);
    }

    .contents__meta {
        grid-column: 2;
    }

    .masthead__meta {
        justify-content: center;
    }
}

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