/* Section landing (6a/8c) and topic page (13a) — mobile-first, tokens only. */

.section-layout,
.topic-layout {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--gutter) var(--space-8);
}

.section-layout__main,
.topic-layout__main {
    min-width: 0;
}

.section-header,
.topic-header {
    padding: var(--space-6) 0 var(--space-5);
    border-bottom: var(--rule-hairline) solid var(--rule);
}

.section-breadcrumb,
.topic-breadcrumb {
    margin: 0 0 var(--space-3);
    font: 400 var(--text-meta) / 1.4 var(--font-sans);
    color: var(--meta);
}

.section-breadcrumb a,
.topic-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.section-breadcrumb a:hover,
.section-breadcrumb a:focus-visible,
.topic-breadcrumb a:hover,
.topic-breadcrumb a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.section-title,
.topic-title {
    margin: 0;
    font-size: var(--text-h1);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-headline);
    color: var(--ink);
}

.section-description {
    margin: var(--space-3) 0 0;
    max-width: var(--measure);
    font-size: var(--text-lead);
    line-height: 1.6;
    color: var(--body);
}

.section-description p {
    margin: 0 0 var(--space-2);
}

.section-description p:last-child {
    margin-bottom: 0;
}

.section-chips-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
}

/* Phones: one row that scrolls sideways (8c). From 900px it wraps (6a). */
.section-chips {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    gap: 7px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--space-1);
}

.section-chips::-webkit-scrollbar {
    display: none;
}

/* 44px on phones: README's touch-target floor overrides 8c's shorter chips. */
.section-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: var(--target-min);
    padding: 7px 12px;
    border: var(--rule-hairline) solid var(--rule);
    background: var(--paper);
    color: var(--body);
    font: 400 var(--text-kicker) / 1 var(--font-sans);
    text-decoration: none;
    white-space: nowrap;
}

.section-chip:hover,
.section-chip:focus-visible {
    border-color: var(--ink);
    color: var(--ink);
}

.section-chip--active {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--on-ink);
    font-weight: 600;
}

.section-chips__more {
    position: relative;
    flex: none;
}

.section-chips__more-summary {
    display: flex;
    align-items: center;
    min-height: var(--target-min);
    padding: 0 4px;
    font: 400 var(--text-meta) / 1 var(--font-sans);
    color: var(--meta);
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}

.section-chips__more-summary::-webkit-details-marker {
    display: none;
}

.section-chips__more-panel {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    width: min(320px, 80vw);
    padding: var(--space-3);
    background: var(--paper);
    border: var(--rule-hairline) solid var(--rule);
    box-shadow: var(--shadow-dropdown);
}

.section-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    padding-top: var(--space-6);
}

/* The `.section-featured*` hero rules that used to sit here are gone, along
   with the `.article-image--section-featured` heights further down: the section
   landing page now renders its front through the shared {% section_block %}
   container (blocks.css) instead of a bespoke hero (owner ruling 2026-09-18,
   docs/decisions-log.md). `category_list.html` was their only caller — grepped,
   not assumed — so they are removed by the change that orphaned them rather
   than left behind. The `section_featured` *image slot* is deliberately still
   in image_slots.py: get_section_featured_article uses its aspect to decide
   whether a candidate's image would render as an emblem, so the slot is now a
   selection rule rather than a rendering target. */

.section-rail {
    padding-top: var(--space-6);
    border-top: var(--rule-strong) solid var(--ink);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.section-rail__title {
    margin: 0 0 var(--space-3);
    font: 700 var(--text-kicker) / 1 var(--font-sans);
    letter-spacing: var(--tracking-kicker);
    text-transform: uppercase;
    color: var(--ink);
}

.section-rail__list {
    margin: 0;
    padding: 0;
    list-style: none;
    font: 400 14px / 1.95 var(--font-serif);
    color: var(--ink);
}

/* Phones (8c): names and years run inline, " · " between items, and an item
   never breaks across a line. From 900px (6a) each gets its own line. */
.section-rail__list li,
.section-rail__years li {
    display: inline;
    white-space: nowrap;
}

.section-rail__list li + li::before,
.section-rail__years li + li::before {
    content: " · ";
}

.section-rail__list a {
    color: inherit;
    text-decoration: none;
}

.section-rail__list a:hover,
.section-rail__list a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.section-rail__years {
    margin: 0;
    padding: 0;
    list-style: none;
    font: 400 13px / 1.85 var(--font-sans);
    color: var(--body);
}

/* Article index only: years are real filter links there (category's own
   rail use of this list is informational-only text, unchanged). */
.section-rail__years a {
    color: inherit;
    text-decoration: none;
}

.section-rail__years a:hover,
.section-rail__years a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.section-rail__years-active {
    font-weight: 700;
    color: var(--accent);
}

/* The selected year's months: its own line under the year, in the same run of links. */
.section-rail__years li.section-rail__year--open {
    display: block;
}

.section-rail__years li.section-rail__year--open + li::before {
    content: none;
}

.section-rail__months {
    margin: 0 0 0 1em;
    padding: 0;
    list-style: none;
}

.section-rail__months li {
    display: inline;
    white-space: nowrap;
}

.section-rail__months li + li::before {
    content: " · ";
}

.section-rail__months a {
    color: inherit;
    text-decoration: none;
}

.section-rail__months a:hover,
.section-rail__months a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.section-empty {
    margin: 0;
    padding: var(--space-6) 0;
    font-size: var(--text-lead);
    color: var(--body);
}

/* --- Topic page ---------------------------------------------------------- */

.topic-header__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
}

.topic-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

.topic-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--ink);
    color: var(--on-ink);
    font: 600 var(--text-kicker-small) / 1 var(--font-sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topic-since {
    font: 400 var(--text-meta) / 1.4 var(--font-sans);
    color: var(--meta);
}

.topic-stats {
    padding-top: var(--space-4);
    border-top: var(--rule-hairline) solid var(--rule);
}

.topic-stats__label {
    margin: 0 0 var(--space-2);
    font: 700 var(--text-kicker-small) / 1 var(--font-sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
}

.topic-stats__count {
    margin: 0;
    font: 700 30px / 1 var(--font-serif);
    color: var(--ink);
}

.topic-stats__unit {
    font: 400 var(--text-ui) / 1 var(--font-sans);
    color: var(--body);
}

.topic-stats__lines {
    margin: var(--space-1) 0 0;
    font: 400 var(--text-ui) / 1.9 var(--font-sans);
    color: var(--body);
}

.topic-dossier-start {
    margin-top: var(--space-6);
    padding: var(--space-5);
    border: var(--rule-strong) solid var(--ink);
}

.topic-dossier-start__label {
    margin: 0;
    font: 600 var(--text-kicker-small) / 1 var(--font-sans);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.topic-dossier-start__title {
    margin: var(--space-2) 0 0;
    font-size: var(--text-h2);
    line-height: 1.18;
    color: var(--ink);
}

.topic-dossier-start__title a {
    color: inherit;
    text-decoration: none;
}

.topic-dossier-start__title a:hover,
.topic-dossier-start__title a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.topic-dossier-start__excerpt {
    margin: var(--space-2) 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--body);
}

.topic-dossier-start__meta {
    margin: var(--space-2) 0 0;
    font: 400 var(--text-meta) / 1.4 var(--font-sans);
    color: var(--meta);
}

.topic-flow-heading {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-7) 0 var(--space-4);
}

.topic-flow-heading__label {
    font: 700 var(--text-kicker) / 1 var(--font-sans);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink);
}

.topic-flow-heading__rule {
    flex: 1;
    height: var(--rule-strong);
    background: var(--ink);
}

.topic-flow-heading__hint {
    font: 400 var(--text-meta) / 1 var(--font-sans);
    color: var(--meta);
}

.topic-year {
    border-top: var(--rule-strong) solid var(--ink);
    padding-top: var(--space-4);
    margin-top: var(--space-5);
}

.topic-year:first-of-type {
    margin-top: 0;
}

.topic-year__summary {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    cursor: pointer;
    list-style: none;
}

.topic-year__summary::-webkit-details-marker {
    display: none;
}

.topic-year__label {
    font: 700 22px / 1 var(--font-serif);
    color: var(--ink);
}

.topic-year__count {
    font: 400 var(--text-meta) / 1 var(--font-sans);
    color: var(--meta);
}

.topic-year__rule {
    flex: 1;
    height: var(--rule-hairline);
    background: var(--rule);
}

.topic-year__toggle {
    font: 400 var(--text-meta) / 1 var(--font-sans);
    color: var(--accent);
}

.topic-year__articles {
    margin: 0;
    padding: 0;
    list-style: none;
}

.topic-article-row {
    border-bottom: var(--rule-hairline) solid var(--rule);
}

.topic-article-row__link {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-4) 0;
    text-decoration: none;
    color: inherit;
}

.topic-article-row__media {
    line-height: 0;
}

.topic-article-row__kicker {
    margin: 0;
    font: 600 var(--text-kicker) / 1 var(--font-sans);
    letter-spacing: var(--tracking-kicker);
    text-transform: uppercase;
    color: var(--accent);
}

.topic-article-row__title {
    margin: var(--space-1) 0 0;
    font: 700 var(--text-lead) / 1.22 var(--font-serif);
    color: var(--ink);
}

.topic-article-row__meta {
    margin: var(--space-2) 0 0;
    font: 400 var(--text-meta) / 1.4 var(--font-sans);
    color: var(--meta);
}

.topic-article-row__badge {
    display: inline-block;
    margin-left: var(--space-2);
    padding: 2px var(--space-2);
    background: var(--ink);
    color: var(--on-ink);
    font: 600 9.5px / 1 var(--font-sans);
    letter-spacing: 0.06em;
    vertical-align: middle;
}

.topic-article-row__link:hover .topic-article-row__title,
.topic-article-row__link:focus-visible .topic-article-row__title {
    color: var(--accent);
    text-decoration: underline;
}

@media (min-width: 640px) {
    .topic-article-row__link {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: var(--space-4);
    }
}

@media (min-width: 900px) {
    /* 6a: the rail is not a box — a 1px rule runs the full height between
       the column and the rail, so the grid stretches the rail to match. */
    .section-body {
        grid-template-columns: minmax(0, 1fr) var(--rail-width);
        gap: 0;
    }

    .section-layout__main {
        padding-right: var(--space-6);
    }

    .section-rail {
        margin-top: 0;
        padding: 0 0 0 var(--space-6);
        border-top: 0;
        border-left: var(--rule-hairline) solid var(--rule);
        background: none;
        gap: 22px;
    }

    .section-rail__list li,
    .section-rail__years li {
        display: block;
    }

    .section-rail__list li + li::before,
    .section-rail__years li + li::before {
        content: none;
    }

    /* Shrinks to its chips so "+ diğer etiketler ▼" follows the last chip
       (6a) rather than being pushed to the far edge of the row. */
    .section-chips {
        flex: 0 1 auto;
        flex-wrap: wrap;
        overflow: visible;
    }

    /* 6a's compact chips: the touch-target floor is a phone rule. */
    .section-chip {
        min-height: 0;
        padding: 6px 14px;
        font-size: var(--text-meta);
    }

    .topic-header__top {
        grid-template-columns: minmax(0, 1fr) 200px;
        align-items: start;
    }

    .topic-stats {
        border-top: 0;
        border-left: var(--rule-hairline) solid var(--rule);
        padding-top: 0;
        padding-left: var(--space-5);
    }
}

/* ---------------------------------------------------------------------------
   Dossier issues (Topic.issues)

   Listed above the article flow: a dossier that gathers back numbers is
   saying "the paper covered this", which frames the articles rather than
   trailing after them. Rows, not cover cards — the archive shelf owns covers,
   and repeating them here would compete with the dossier's own articles.
   --------------------------------------------------------------------------- */

.topic-issues {
    margin-bottom: var(--space-8);
}

.topic-issues__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.topic-issues__item + .topic-issues__item {
    border-top: var(--rule-hairline) solid var(--rule);
}

.topic-issues__link {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2) var(--space-4);
    /* Keeps the row above the 44px touch-target floor without a fixed height,
     * so a long title may wrap to two lines and still read as one target. */
    min-height: var(--target-min);
    padding: var(--space-3) 0;
    color: inherit;
    text-decoration: none;
}

.topic-issues__link:hover,
.topic-issues__link:focus-visible {
    color: var(--accent);
}

.topic-issues__number {
    font-family: var(--font-sans);
    font-size: var(--text-meta);
    font-weight: 700;
    letter-spacing: var(--tracking-kicker);
    color: var(--accent);
}

.topic-issues__title {
    font-weight: 700;
    /* Takes the slack so the date sits hard right on a wide row and wraps
     * underneath on a narrow one, with no media query. */
    flex: 1 1 auto;
}

.topic-issues__date {
    font-family: var(--font-sans);
    font-size: var(--text-meta);
    color: var(--meta);
}

/* --- Topic index (no design comp; agent 20) -------------------------------- */

.topic-index__intro {
    margin: var(--space-3) 0 0;
    font: 400 var(--text-meta) / 1.55 var(--font-sans);
    color: var(--meta);
}

.topic-index__list {
    margin: 0;
    padding: var(--space-6) 0 0;
    list-style: none;
}

.topic-index-row {
    border-bottom: var(--rule-hairline) solid var(--rule);
}

.topic-index-row__link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    color: inherit;
    text-decoration: none;
}

.topic-index-row__link:hover,
.topic-index-row__link:focus-visible {
    color: var(--accent);
}

.topic-index-row__link:hover .topic-index-row__name,
.topic-index-row__link:focus-visible .topic-index-row__name {
    text-decoration: underline;
}

.topic-index-row__name {
    font-size: var(--text-lead);
    line-height: 1.35;
    color: var(--ink);
}

.topic-index-row__count {
    flex: none;
    font: 400 var(--text-meta) / 1.4 var(--font-sans);
    color: var(--meta);
}

/* Same ink follow box as the author page rail, inlined because this page
   does not load author.css. White on #1A73A8 is 5.2:1. */
.topic-follow {
    margin-top: var(--space-7);
    padding: var(--space-5);
    background: var(--ink);
    color: var(--on-ink);
}

.topic-follow__title {
    margin: 0 0 var(--space-3);
    font: 700 var(--text-kicker) / 1 var(--font-sans);
    letter-spacing: var(--tracking-kicker);
    text-transform: uppercase;
    color: var(--on-ink);
}

.topic-follow__copy {
    margin: 0 0 var(--space-3);
    font: 400 var(--text-meta) / 1.6 var(--font-sans);
    color: var(--on-ink-secondary);
}

.topic-follow__btn {
    display: block;
    width: 100%;
    padding: var(--space-3);
    border: 0;
    background: var(--accent);
    color: var(--on-ink);
    font: 600 var(--text-ui) / 1.2 var(--font-sans);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.topic-follow__btn:hover {
    background: var(--accent-on-dark);
    color: var(--ink);
}

.topic-follow__note {
    margin: var(--space-3) 0 0;
    font: 400 var(--text-meta) / 1.5 var(--font-sans);
    color: var(--on-ink-secondary);
}

/* Section page date filter (plan 11e): year and month selects stacked in the
   rail, full width so the long Turkish month names never wrap. */
.section-date-filter {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    font: 400 13px / 1.4 var(--font-sans);
    color: var(--body);
}

.section-date-filter__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-date-filter select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--rule);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

.section-date-filter__submit {
    align-self: flex-start;
    padding: 6px 14px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font: 700 13px / 1.4 var(--font-sans);
    cursor: pointer;
}

.section-date-filter__submit:hover,
.section-date-filter__submit:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
}


/* Section icon beside the title (owner 2026-11-02). Keeps its own proportions. */
.section-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-icon {
    display: block;
    flex: none;
    width: auto;
    max-width: 112px;
    height: auto;
    max-height: 64px;
}

@media (min-width: 900px) {
    .section-icon {
        max-width: 160px;
        max-height: 96px;
    }
}

/* Phone touch targets (design-principles section 6: hit targets at least 44px).
   Found under 44px by the 2026-11-02 UI audit at 390px; from 900px the old
   compact sizes stand (pointer, and the utility bar is fixed at 34px there). */
@media (max-width: 899px) {
    .section-date-filter__submit,
    .section-date-filter select {
        min-height: var(--target-min);
    }
}
