:root {
    --rmt-green: #005542;
    --rmt-green-dark: #003f32;
    --rmt-green-pale: #edf4f2;
    --text: #1d1d1d;
    --muted: #686868;
    --line: #dedede;
    --panel: #f5f7f6;
    --highlight: #ffe78a;
    --white: #ffffff;
    --max-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fff;
    color: var(--text);
    font-family: "Open Sans", Arial, sans-serif;
    line-height: 1.55;
}

.page-shell {
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
}


/* HEADER */

.site-header {
    background: var(--rmt-green);
    color: #fff;
    padding: 52px 0 48px;
}

.site-header-inner {
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
}

.eyebrow {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    opacity: 0.82;
}

.site-header h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -1.8px;
}

.intro {
    max-width: 700px;
    margin: 18px 0 24px;
    font-size: 20px;
    opacity: 0.94;
}

.archive-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 15px;
    opacity: 0.9;
}


/* MAIN SEARCH */

.search-panel {
    margin-top: -24px;
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.section-label {
    color: var(--rmt-green);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.search-form {
    margin: 0;
}

.search-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.search-row input {
    flex: 1;
}

input[type="text"],
select {
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #bcbcbc;
    border-radius: 5px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

input[type="text"] {
    font-size: 18px;
}

input[type="text"]:focus,
select:focus {
    outline: 3px solid rgba(0, 85, 66, 0.16);
    border-color: var(--rmt-green);
}

button {
    min-height: 48px;
    padding: 11px 20px;
    border: 0;
    border-radius: 5px;
    background: var(--rmt-green);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

button:hover {
    background: var(--rmt-green-dark);
}

.primary-button {
    min-width: 120px;
}

.filter-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.filter-group {
    min-width: 190px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.filter-group select {
    width: 100%;
}


/* BROWSE */

.browse-box {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
    margin: 32px 0;
    padding: 25px 28px;
    border-left: 6px solid var(--rmt-green);
    background: var(--rmt-green-pale);
}

.browse-intro {
    margin: 4px 0 0;
    color: var(--muted);
}

.browse-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.browse-form select {
    min-width: 165px;
}


/* RESULTS */

.results-section {
    margin: 44px 0 70px;
}

.results-heading {
    margin-bottom: 16px;
}

.results-heading h2 {
    margin: 4px 0 0;
    font-size: 32px;
    line-height: 1.2;
}

.results-context {
    margin: 6px 0 0;
    color: var(--muted);
}

.result-card {
    padding: 25px 0 28px;
    border-top: 1px solid var(--line);
}

.result-title {
    margin: 0;
    font-size: 23px;
    line-height: 1.25;
}

.result-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 13px;
    color: var(--muted);
    font-size: 14px;
}

.meta-separator {
    opacity: 0.55;
}

.result-snippet {
    max-width: 850px;
    font-size: 16px;
}

.pdf-link,
.back-link {
    display: inline-block;
    color: var(--rmt-green);
    font-weight: 800;
    text-decoration: none;
}

.pdf-link {
    margin-top: 14px;
}

.pdf-link:hover,
.back-link:hover {
    text-decoration: underline;
}

mark {
    padding: 1px 2px;
    background: var(--highlight);
}

.no-results {
    padding: 28px;
    border: 1px solid var(--line);
    background: var(--panel);
}


/* ISSUE PAGE */

body > .back-link {
    margin-top: 34px;
}

body > h1,
body > .meta,
body > .article-row {
    width: min(950px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

body > h1 {
    margin-top: 18px;
    margin-bottom: 6px;
    color: var(--rmt-green);
    font-size: 42px;
}

body > .meta {
    margin-bottom: 30px;
    color: var(--muted);
}

.article-row {
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.article-row .title {
    font-size: 21px;
    font-weight: 800;
}

.page {
    margin: 5px 0 8px;
    color: var(--muted);
}


/* FOOTER */

.site-footer {
    margin-top: 60px;
    padding: 28px 0;
    background: #f1f1f1;
    color: var(--muted);
    font-size: 14px;
}


/* MOBILE */

@media (max-width: 760px) {

    .site-header {
        padding: 38px 0 42px;
    }

    .intro {
        font-size: 18px;
    }

    .archive-stats {
        gap: 12px 20px;
    }

    .search-panel {
        margin-top: -18px;
        padding: 22px;
    }

    .search-row,
    .browse-form {
        display: block;
    }

    .search-row input,
    .search-row button,
    .browse-form select,
    .browse-form button {
        width: 100%;
        margin-bottom: 10px;
    }

    .browse-box {
        display: block;
    }

    .browse-form {
        margin-top: 16px;
    }

    .filter-group {
        width: 100%;
    }

    .results-heading h2 {
        font-size: 27px;
    }

    .result-title {
        font-size: 21px;
    }
}


/* PAGINATION */

.result-count {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.pagination a {
    color: var(--rmt-green);
    font-weight: 800;
    text-decoration: none;
}

.pagination a:last-child {
    text-align: right;
}

.pagination a:hover {
    text-decoration: underline;
}

.page-status {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 600px) {
    .pagination {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pagination a:last-child {
        text-align: center;
    }
}


/* YEAR BROWSING */

.year-browser {
    margin: 34px 0 10px;
}

.year-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.year-links a {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--rmt-green);
    background: #fff;
    font-weight: 800;
    text-decoration: none;
}

.year-links a:hover {
    border-color: var(--rmt-green);
    background: var(--rmt-green-pale);
}


/* YEAR PAGE */

.compact-header {
    padding: 38px 0 36px;
}

.year-navigation {
    margin: 28px 0 10px;
}

.year-issues {
    margin: 20px 0 70px;
}

.year-issues h2 {
    margin: 5px 0 22px;
    font-size: 30px;
}

.issue-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.issue-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--rmt-green);
    border-radius: 5px;
    background: #fff;
}

.issue-card-label {
    color: var(--rmt-green);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.issue-card h3 {
    margin: 6px 0 10px;
    font-size: 23px;
}

.issue-card-meta {
    min-height: 48px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.issue-button {
    color: var(--rmt-green);
    font-weight: 800;
    text-decoration: none;
}

.issue-button:hover {
    text-decoration: underline;
}

@media (max-width: 850px) {
    .issue-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .issue-grid {
        grid-template-columns: 1fr;
    }
}


/* ISSUE COVERS */

.issue-card {
    overflow: hidden;
}

.cover-link {
    display: block;
    margin: -22px -22px 20px;
    background: #e9e9e9;
    text-decoration: none;
}

.issue-cover {
    display: block;
    width: 100%;
    aspect-ratio: 0.72;
    object-fit: cover;
    object-position: top center;
    background: #eee;
}

.cover-link:hover .issue-cover {
    opacity: 0.94;
}


/* IMPROVED ISSUE PAGE */

.issue-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 42px;
    align-items: start;
    margin: 30px 0 50px;
}

.issue-cover-column {
    min-width: 0;
}

.issue-page-cover {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #d5d5d5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.issue-details h2 {
    margin-top: 8px;
    margin-bottom: 14px;
    font-size: 2rem;
}

.issue-summary {
    margin-bottom: 16px;
    color: #555;
    font-size: 1.05rem;
}

.issue-note {
    display: inline-block;
    margin-bottom: 22px;
    padding: 6px 10px;
    border-radius: 4px;
    background: #eef4f1;
    color: #005542;
    font-size: 0.9rem;
    font-weight: 600;
}

.primary-button {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 5px;
    background: #005542;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.primary-button:hover {
    opacity: 0.92;
}

.issue-contents {
    margin-top: 30px;
}

.article-list {
    margin-top: 20px;
}

.article-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e3e3e3;
}

.article-main {
    min-width: 0;
}

.article-title {
    margin: 0 0 7px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.article-page {
    color: #666;
    font-size: 0.92rem;
}

.article-actions {
    flex-shrink: 0;
}

@media (max-width: 760px) {
    .issue-hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .issue-cover-column {
        max-width: 320px;
    }

    .article-row {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ARTICLE PERMALINK PAGE */

.article-record {
    display: grid;
    grid-template-columns: minmax(180px, 250px) 1fr;
    gap: 42px;
    align-items: start;
    margin: 30px 0 50px;
}

.article-record-cover {
    min-width: 0;
}

.article-cover {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #d5d5d5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.article-record-main h2 {
    margin: 8px 0 18px;
    font-size: 2rem;
    line-height: 1.2;
}

.article-record-meta {
    margin-bottom: 24px;
    color: #555;
    font-size: 1.05rem;
    line-height: 1.6;
}

.article-record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 34px;
}

.secondary-button {
    display: inline-block;
    padding: 11px 17px;
    border: 1px solid #005542;
    border-radius: 5px;
    color: #005542;
    text-decoration: none;
    font-weight: 600;
}

.secondary-button:hover {
    background: #eef4f1;
}

.citation-box {
    padding: 22px;
    border: 1px solid #dfe5e2;
    border-radius: 6px;
    background: #f7f9f8;
}

.citation-box p {
    margin: 8px 0 16px;
    line-height: 1.6;
}

.permalink-label {
    color: #666;
    font-size: 0.9rem;
}

.permalink-label code {
    color: #333;
}

@media (max-width: 760px) {
    .article-record {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .article-record-cover {
        max-width: 260px;
    }
}


/* ARTICLE TITLE LINKS */

.article-title-link {
    color: inherit;
    text-decoration: none;
}

.article-title-link:hover {
    color: #005542;
    text-decoration: underline;
}

/* ARTICLE SHARING CONTROLS */

.share-box {
    margin-bottom: 22px;
    padding: 18px 22px;
    border: 1px solid #dfe5e2;
    border-radius: 6px;
    background: #fff;
}

.share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.share-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border: 1px solid #005542;
    border-radius: 5px;
    background: #fff;
    color: #005542;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.share-button:hover {
    background: #eef4f1;
}

.native-share-button {
    background: #005542;
    color: #fff;
}

.native-share-button:hover {
    background: #004536;
}

.share-box .copy-status {
    margin-top: 10px;
    margin-bottom: 0;
}
/* CITATION COPY CONTROLS */

.citation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.copy-button {
    appearance: none;
    padding: 9px 13px;
    border: 1px solid #005542;
    border-radius: 5px;
    background: #fff;
    color: #005542;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.copy-button:hover {
    background: #eef4f1;
}

.copy-status {
    min-height: 1.4em;
    margin-bottom: 10px;
    color: #005542;
    font-size: 0.88rem;
    font-weight: 600;
}


/* CLEAR SEARCH / FILTERS */

.clear-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border: 1px solid #005542;
    border-radius: 5px;
    background: #fff;
    color: #005542;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.clear-search-button:hover {
    background: #eef4f1;
}


/* SEARCH RESULT MATCH HIGHLIGHTING */

.result-snippet mark {
    background: #dcece7;
    color: #003d30;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 3px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}


/* ARTICLE PREVIOUS / NEXT NAVIGATION */

.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #d9e2df;
}

.article-navigation a {
    display: block;
    padding: 18px 20px;
    border: 1px solid #d9e2df;
    border-radius: 6px;
    background: #fff;
    color: #005542;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.article-navigation a:hover {
    background: #f3f7f5;
    border-color: #005542;
}

.article-navigation-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-navigation-title {
    display: block;
    color: #222;
    font-weight: 600;
    line-height: 1.35;
}

.article-navigation-next {
    text-align: right;
}

@media (max-width: 700px) {
    .article-navigation {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .article-navigation-next {
        text-align: left;
    }
}


/* ARTICLE POSITION WITHIN ISSUE */

.article-position {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #005542;
}


/* ARCHIVE BREADCRUMBS */

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 18px;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #66736f;
}

.breadcrumbs a {
    color: #005542;
    text-decoration: none;
    font-weight: 600;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #9aa5a1;
}

.breadcrumb-current {
    color: #66736f;
}

@media (max-width: 700px) {
    .breadcrumb-current {
        flex-basis: 100%;
        margin-top: 2px;
    }
}


/* RETURN TO SEARCH RESULTS */

.search-return-navigation {
    margin-bottom: 12px;
}


/* SEARCH WITHIN ISSUE */

.issue-search {
    margin: 30px 0 36px;
    padding: 24px;
    border: 1px solid #d9e2df;
    border-radius: 7px;
    background: #f6f9f8;
}

.issue-search h2 {
    margin-top: 4px;
    margin-bottom: 16px;
}

.issue-search-form {
    margin: 0;
}

.issue-search-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.issue-search-input {
    flex: 1;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #aebbb7;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 1rem;
}

.issue-search-input:focus {
    outline: 2px solid #005542;
    outline-offset: 1px;
    border-color: #005542;
}

.issue-search-row .primary-button {
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .issue-search-row {
        flex-direction: column;
    }

    .issue-search-row .primary-button {
        width: 100%;
        text-align: center;
    }
}


/* SEARCH WITHIN ISSUE */

.issue-search {
    margin: 30px 0 36px;
    padding: 24px;
    border: 1px solid #d9e2df;
    border-radius: 7px;
    background: #f6f9f8;
}

.issue-search h2 {
    margin-top: 4px;
    margin-bottom: 16px;
}

.issue-search-form {
    margin: 0;
}

.issue-search-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.issue-search-input {
    flex: 1;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #aebbb7;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 1rem;
}

.issue-search-input:focus {
    outline: 2px solid #005542;
    outline-offset: 1px;
    border-color: #005542;
}

.issue-search-row .primary-button {
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .issue-search-row {
        flex-direction: column;
    }

    .issue-search-row .primary-button {
        width: 100%;
        text-align: center;
    }
}


/* YEAR OVERVIEW AND SEARCH */

.year-overview {
    margin: 24px 0 20px;
}

.year-overview h2 {
    margin-top: 4px;
    margin-bottom: 8px;
}

.year-summary {
    color: #66736f;
    font-weight: 600;
}

.year-search {
    margin: 24px 0 36px;
    padding: 24px;
    border: 1px solid #d9e2df;
    border-radius: 7px;
    background: #f6f9f8;
}

.year-search h2 {
    margin-top: 4px;
    margin-bottom: 16px;
}

.year-search-form {
    margin: 0;
}

.year-search-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.year-search-input {
    flex: 1;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #aebbb7;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 1rem;
}

.year-search-input:focus {
    outline: 2px solid #005542;
    outline-offset: 1px;
    border-color: #005542;
}

.year-search-row .primary-button {
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .year-search-row {
        flex-direction: column;
    }

    .year-search-row .primary-button {
        width: 100%;
        text-align: center;
    }
}


/* ARCHIVE YEAR TIMELINE */

.archive-timeline {
    margin: 34px 0 42px;
}

.archive-timeline-heading {
    margin-bottom: 18px;
}

.archive-timeline-heading h2 {
    margin-top: 4px;
    margin-bottom: 6px;
}

.archive-timeline-heading p {
    margin: 0;
    color: #66736f;
}

.timeline-years {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 10px;
}

.timeline-year {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid #d9e2df;
    border-radius: 6px;
    background: #fff;
    color: #005542;
    text-decoration: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.timeline-year:hover {
    background: #f3f7f5;
    border-color: #005542;
    transform: translateY(-1px);
}

.timeline-year-number {
    display: block;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.2;
}

.timeline-year-count {
    display: block;
    margin-top: 4px;
    color: #66736f;
    font-size: 0.82rem;
}

.timeline-year-first,
.timeline-year-last {
    border-color: #005542;
}

.timeline-year-first::before,
.timeline-year-last::before {
    position: absolute;
    top: -7px;
    right: 8px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #005542;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.timeline-year-first::before {
    content: "First";
}

.timeline-year-last::before {
    content: "Latest";
}

@media (max-width: 700px) {
    .timeline-years {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline-year {
        min-height: 64px;
        padding: 10px;
    }
}

@media (max-width: 440px) {
    .timeline-years {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* SEARCH RESULTS EXPORT */

.results-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 22px;
}

.export-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid #005542;
    border-radius: 5px;
    background: #fff;
    color: #005542;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.export-button:hover {
    background: #005542;
    color: #fff;
}

.export-note {
    color: #66736f;
    font-size: 0.84rem;
}

@media (max-width: 600px) {
    .results-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* SHAREABLE SEARCH */

.copy-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid #005542;
    border-radius: 5px;
    background: #fff;
    color: #005542;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.copy-search-button:hover {
    background: #f3f7f5;
}

.copy-search-button.copied {
    background: #005542;
    color: #fff;
}

/* TOPIC EXPLORER */

.topic-explorer-header,
.topic-results {
    margin-bottom: 34px;
}

.topic-explorer-header h1 {
    margin-top: 4px;
    margin-bottom: 8px;
}

.topic-explorer-header > p {
    color: #66736f;
}

.topic-explorer-form {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid #d9e2df;
    border-radius: 7px;
    background: #f8faf9;
}

.topic-explorer-search-row {
    display: flex;
    gap: 10px;
}

.topic-explorer-search-row input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #bccbc6;
    border-radius: 5px;
    font: inherit;
}

.topic-explorer-options {
    display: grid;
    grid-template-columns: 1.4fr 1.6fr 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.topic-explorer-options label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #43504c;
    font-size: 0.82rem;
    font-weight: 700;
}

.topic-explorer-options select,
.topic-explorer-options input {
    width: 100%;
    padding: 8px 9px;
    border: 1px solid #bccbc6;
    border-radius: 5px;
    background: #fff;
    font: inherit;
}

.topic-summary {
    margin-bottom: 22px;
}

.topic-summary h2 {
    margin: 4px 0 6px;
}

.topic-summary p {
    margin: 0;
    color: #66736f;
}

.topic-year-list {
    border-top: 1px solid #d9e2df;
}

.topic-year-row {
    display: grid;
    grid-template-columns: 58px minmax(100px, 1fr) 55px;
    align-items: center;
    gap: 14px;
    min-height: 43px;
    border-bottom: 1px solid #e4ebe8;
}

.topic-year-label {
    color: #34423e;
    font-weight: 700;
}

.topic-year-bar-track {
    height: 10px;
    overflow: hidden;
    border-radius: 5px;
    background: #edf2f0;
}

.topic-year-bar {
    height: 100%;
    min-width: 3px;
    border-radius: 5px;
    background: #005542;
}

.topic-year-count {
    text-align: right;
    font-weight: 700;
}

.topic-year-count a {
    color: #005542;
    text-decoration: none;
}

.topic-year-count a:hover {
    text-decoration: underline;
}

.topic-explorer-note {
    margin-top: 16px;
    color: #66736f;
    font-size: 0.84rem;
}

@media (max-width: 700px) {
    .topic-explorer-options {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .topic-explorer-search-row {
        flex-direction: column;
    }

    .topic-explorer-options {
        grid-template-columns: 1fr;
    }
}

/* TOPIC EXPLORER ACTION */

.explore-topic-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid #005542;
    border-radius: 5px;
    background: #005542;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.explore-topic-button:hover {
    background: #003f32;
    border-color: #003f32;
}

/* TOPIC COMPARISON */

.topic-compare-row {
    margin-top: 14px;
}

.topic-compare-row label {
    display: block;
    margin-bottom: 5px;
    color: #43504c;
    font-size: 0.82rem;
    font-weight: 700;
}

.topic-compare-row input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 11px;
    border: 1px solid #bccbc6;
    border-radius: 5px;
    background: #fff;
    font: inherit;
}

.topic-comparison-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 8px;
    color: #66736f;
}

.topic-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0 0 16px 72px;
    font-size: 0.86rem;
    font-weight: 700;
}

.topic-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.topic-legend-swatch {
    display: inline-block;
    width: 20px;
    height: 8px;
    border-radius: 4px;
}

.topic-legend-primary {
    background: #005542;
}

.topic-legend-comparison {
    background: #7b8f89;
}

.topic-year-row-comparison {
    min-height: 62px;
}

.topic-year-bars {
    min-width: 0;
}

.topic-year-series {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) 45px;
    align-items: center;
    gap: 10px;
    min-height: 24px;
}

.topic-year-bar-primary {
    background: #005542;
}

.topic-year-bar-comparison {
    background: #7b8f89;
}

@media (max-width: 500px) {
    .topic-chart-legend {
        margin-left: 0;
    }
}

/* RESEARCH INSIGHTS */

.research-insights {
    margin: 26px 0 30px;
    padding: 22px;
    border: 1px solid #d9e2df;
    border-radius: 7px;
    background: #f8faf9;
}

.research-insights h3 {
    margin: 4px 0 18px;
    color: #24332f;
}

.research-insight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.research-insight-grid-comparison {
    grid-template-columns: 1fr 1fr;
}

.research-insight-topic {
    padding: 18px;
    border-left: 4px solid #005542;
    border-radius: 4px;
    background: #fff;
}

.research-insight-topic-comparison {
    border-left-color: #7b8f89;
}

.research-insight-topic-name {
    margin-bottom: 15px;
    color: #24332f;
    font-size: 1.05rem;
    font-weight: 700;
}

.research-insight-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.research-insight-stat {
    min-width: 0;
}

.research-insight-value {
    display: block;
    color: #005542;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.research-insight-topic-comparison
.research-insight-value {
    color: #596d67;
}

.research-insight-label {
    display: block;
    margin-top: 5px;
    color: #6b7773;
    font-size: 0.74rem;
    line-height: 1.25;
}

.research-comparison-note {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #dce5e2;
    color: #4d5b57;
    font-size: 0.88rem;
}

@media (max-width: 900px) {
    .research-insight-grid-comparison {
        grid-template-columns: 1fr;
    }

    .research-insight-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 500px) {
    .research-insight-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* RESEARCH COLLECTIONS */

.result-research-actions {
    margin: 13px 0 8px;
}

.save-collection-button {
    padding: 7px 11px;
    border: 1px solid #005542;
    border-radius: 5px;
    background: #fff;
    color: #005542;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.save-collection-button:hover {
    background: #f3f7f5;
}

.save-collection-button.saved {
    background: #005542;
    color: #fff;
}

.research-collection-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid #d2ddd9;
    border-radius: 5px;
    background: #fff;
    color: #005542;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.research-collection-link:hover {
    background: #f3f7f5;
}

/* RESEARCH COLLECTION PAGE */

.collection-header {
    margin-bottom: 30px;
}

.collection-header h1 {
    margin: 4px 0 8px;
}

.collection-header > p {
    color: #66736f;
}

.collection-summary {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 18px;
    color: #53615d;
}

.collection-summary strong {
    color: #005542;
    font-size: 1.8rem;
}

.collection-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.collection-clear-button,
.collection-remove-button,
.collection-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.collection-clear-button,
.collection-remove-button {
    border: 1px solid #b7c4c0;
    background: #fff;
    color: #4c5955;
}

.collection-clear-button:hover,
.collection-remove-button:hover {
    background: #f3f6f5;
}

.collection-clear-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.collection-view-button {
    border: 1px solid #005542;
    background: #005542;
    color: #fff;
}

.collection-view-button:hover {
    background: #003f32;
}

.collection-list {
    border-top: 1px solid #d9e2df;
}

.collection-article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid #d9e2df;
}

.collection-article h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.collection-article h2 a {
    color: #005542;
    text-decoration: none;
}

.collection-article h2 a:hover {
    text-decoration: underline;
}

.collection-article-meta {
    color: #66736f;
    font-size: 0.88rem;
}

.collection-article-reference {
    margin-top: 8px;
    color: #7a8581;
    font-size: 0.78rem;
}

.collection-article-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.collection-empty {
    padding: 38px 24px;
    border: 1px solid #d9e2df;
    border-radius: 7px;
    background: #f8faf9;
    text-align: center;
}

.collection-empty h2 {
    margin-top: 0;
}

@media (max-width: 650px) {
    .collection-article {
        grid-template-columns: 1fr;
    }

    .collection-article-actions {
        justify-content: flex-start;
    }
}

.collection-export-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #005542;
    border-radius: 5px;
    background: #fff;
    color: #005542;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.collection-export-button:hover {
    background: #f3f7f5;
}

.collection-export-button:disabled {
    cursor: default;
    opacity: 0.45;
}

/* v31 — Collection Research Insights */

.collection-insights {
    margin: 34px 0 38px;
    padding: 30px;
    border: 1px solid #d7e3df;
    border-radius: 8px;
    background: #f8fbfa;
}

.collection-insights[hidden] {
    display: none;
}

.collection-insights-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.collection-insights-heading h2 {
    margin: 4px 0 8px;
}

.collection-insights-heading p {
    margin: 0;
    color: #687772;
}

.collection-insight-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0 30px;
}

.collection-insight-stat {
    padding: 18px;
    border: 1px solid #d7e3df;
    border-radius: 6px;
    background: #ffffff;
}

.collection-insight-stat strong {
    display: block;
    margin-bottom: 5px;
    color: #005542;
    font-size: 1.65rem;
    line-height: 1.1;
    font-weight: 600;
}

.collection-insight-stat span {
    color: #687772;
    font-size: 0.9rem;
}

.collection-year-distribution {
    border-top: 1px solid #d7e3df;
    padding-top: 24px;
}

.collection-year-distribution h3 {
    margin: 0 0 18px;
    font-size: 1rem;
    font-weight: 600;
}

.collection-year-chart {
    display: grid;
    gap: 10px;
}

.collection-year-row {
    display: grid;
    grid-template-columns: 58px 1fr 32px;
    align-items: center;
    gap: 12px;
}

.collection-year-label {
    color: #52625d;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.collection-year-bar-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e3ece9;
}

.collection-year-bar {
    height: 100%;
    border-radius: inherit;
    background: #005542;
}

.collection-year-count {
    color: #005542;
    font-size: 0.9rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
    .collection-insights {
        padding: 22px;
    }

    .collection-insight-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .collection-insight-stats {
        grid-template-columns: 1fr;
    }
}

/* v32 — Collection Topic Analysis */

.collection-topic-analysis {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #d7e3df;
}

.collection-topic-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 18px;
}

.collection-topic-heading h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
}

.collection-topic-heading p {
    margin: 0;
    color: #687772;
    font-size: 0.9rem;
}

.collection-topic-status {
    flex: 0 0 auto;
    color: #687772;
    font-size: 0.82rem;
    white-space: nowrap;
}

.collection-topic-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.collection-topic-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #d7e3df;
    border-radius: 6px;
    background: #ffffff;
}

.collection-topic-term {
    min-width: 0;
    overflow: hidden;
    color: #005542;
    font-size: 0.92rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-topic-articles,
.collection-topic-frequency {
    color: #687772;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.collection-topic-frequency {
    padding-left: 10px;
    border-left: 1px solid #d7e3df;
}

@media (max-width: 760px) {
    .collection-topic-list {
        grid-template-columns: 1fr;
    }

    .collection-topic-heading {
        display: block;
    }

    .collection-topic-status {
        display: block;
        margin-top: 8px;
    }
}

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

    .collection-topic-frequency {
        display: none;
    }
}

/* v32 — Interactive Topic Exploration */

button.collection-topic-row {
    width: 100%;
    margin: 0;
    font: inherit;
    text-align: left;
    appearance: none;
    cursor: pointer;
}

button.collection-topic-row:hover {
    border-color: #9dbbb3;
    background: #f5faf8;
}

button.collection-topic-row:focus-visible {
    outline: 2px solid #005542;
    outline-offset: 2px;
}

button.collection-topic-row.is-active {
    border-color: #005542;
    background: #eef6f3;
}

button.collection-topic-row.is-active
.collection-topic-term {
    color: #003f32;
}

.collection-topic-detail {
    margin-top: 18px;
    padding: 20px 22px;
    border: 1px solid #c6d9d4;
    border-radius: 6px;
    background: #ffffff;
}

.collection-topic-detail[hidden] {
    display: none;
}

.collection-topic-detail-heading {
    margin-bottom: 12px;
    color: #52625d;
    font-size: 0.9rem;
}

.collection-topic-detail-heading strong {
    color: #005542;
    font-weight: 600;
}

.collection-topic-detail ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.collection-topic-detail li {
    border-top: 1px solid #e3ece9;
}

.collection-topic-detail li:first-child {
    border-top: 0;
}

.collection-topic-detail a {
    display: block;
    padding: 10px 0;
    color: #005542;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
}

.collection-topic-detail a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .collection-topic-detail {
        padding: 17px;
    }
}

/* Search results guidance */
.search-results-guidance {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e2e8e5;
    color: #527068;
    font-size: 0.9rem;
}

/* Searchable article text */
.article-text {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #d9e2df;
}

.article-text-content {
    margin-top: 0.5rem;
    max-width: 78ch;
    line-height: 1.65;
}

/* HOMEPAGE LATEST ISSUE */

.site-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 48px;
    align-items: center;
}

.site-header-content {
    min-width: 0;
}

.latest-issue {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 310px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.latest-issue:hover {
    background: rgba(255, 255, 255, 0.14);
}

.latest-issue-cover {
    display: block;
    width: 82px;
    height: auto;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
}

.latest-issue-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.latest-issue-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.8;
}

.latest-issue-details strong {
    font-size: 18px;
    line-height: 1.25;
}

.latest-issue-link {
    margin-top: 3px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 760px) {
    .site-header-inner {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .latest-issue {
        width: min(310px, 100%);
        box-sizing: border-box;
    }
}

/* Slightly larger latest issue panel */
.latest-issue {
    width: 350px;
    padding: 17px;
    gap: 21px;
}

.latest-issue-cover {
    width: 96px;
}

@media (max-width: 760px) {
    .latest-issue {
        width: min(350px, 100%);
    }
}
