:root {
    color-scheme: light;
    --background: #f3f0e8;
    --surface: #fffdf8;
    --surface-raised: #ffffff;
    --text: #211f1b;
    --muted: #67635b;
    --border: #d8d1c4;
    --accent: #8a692d;
    --accent-hover: #6f5221;
    --action-background: #745724;
    --action-hover: #5f461d;
    --action-text: #fffaf0;
    --focus: #8a692d;
    --notice: #ece5d7;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --background: #121313;
    --surface: #1a1c1c;
    --surface-raised: #202222;
    --text: #e7e2d8;
    --muted: #aaa49a;
    --border: #343533;
    --accent: #c2a15e;
    --accent-hover: #d2b574;
    --action-background: #9c7b3e;
    --action-hover: #b08d49;
    --action-text: #18140c;
    --focus: #d0ad63;
    --notice: #24231f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Georgia, "Times New Roman", serif;
}

.article-page > .back,
.article-page > main,
.article-page > .article-license {
    width: min(760px, calc(100% - 32px));
    margin-right: auto;
    margin-left: auto;
}

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

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.home-page a,
.article-page > header a {
    color: inherit;
}

.home-page header,
.article-page > header,
.submit-page header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.home-page .nav,
.article-page .nav,
.submit-page .nav {
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.home-page .nav,
.article-page .nav {
    width: min(1100px, calc(100% - 32px));
}

.submit-page .nav {
    width: min(860px, calc(100% - 32px));
}

.brand {
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.92rem;
}

.primary-nav a {
    text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    background: var(--surface);
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
    background: var(--surface-raised);
}

.theme-toggle::before {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    box-shadow: inset -5px -2px 0 0 currentColor;
    content: "";
}

:root[data-theme="dark"] .theme-toggle::before {
    width: 9px;
    height: 9px;
    background: currentColor;
    box-shadow:
        0 -7px 0 -3px currentColor,
        0 7px 0 -3px currentColor,
        7px 0 0 -3px currentColor,
        -7px 0 0 -3px currentColor,
        5px 5px 0 -3px currentColor,
        -5px -5px 0 -3px currentColor,
        5px -5px 0 -3px currentColor,
        -5px 5px 0 -3px currentColor;
}

.primary-nav .support-link {
    padding: 10px 14px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--action-text);
    background: var(--action-background);
    font-weight: 700;
}

.primary-nav .support-link:hover,
.primary-nav .support-link:focus-visible {
    color: var(--action-text);
    background: var(--action-hover);
    text-decoration: underline;
}

.home-page main {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.home-page .hero {
    max-width: 760px;
    margin-bottom: 72px;
}

.eyebrow,
.submit-page .notice strong {
    font-family: Inter, system-ui, sans-serif;
    font-weight: 800;
    text-transform: uppercase;
}

.home-page .eyebrow {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.home-page h1 {
    margin: 0;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.home-page .intro {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 1.18rem;
    line-height: 1.75;
}

.home-page .section-heading {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--text);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-page .article-list {
    display: grid;
    gap: 18px;
}

.home-page article {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-raised);
}

.home-page article:hover,
.home-page article:focus-within {
    border-color: var(--accent);
}

.home-page article:focus-within {
    box-shadow: 0 0 0 1px var(--accent);
}

.home-page article h2,
.home-page article h3 {
    margin: 0 0 10px;
    font-size: 1.55rem;
}

.home-page article h2 a,
.home-page article h3 a {
    text-decoration: none;
}

.home-page article h2 a:hover,
.home-page article h3 a:hover {
    text-decoration: underline;
}

.home-page article p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.home-page .meta {
    margin-top: 16px;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.82rem;
}

.home-page .home-section {
    margin-top: 72px;
}

.general-contact {
    margin: 10px 0 0;
    font-size: inherit;
    line-height: 1.6;
}

.home-page footer {
    margin-top: 72px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.86rem;
}

.article-page .back {
    display: inline-block;
    margin-top: 32px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
}

.article-page h1 {
    margin: 48px 0 16px;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    line-height: 1;
}

.article-page .meta {
    margin-bottom: 40px;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
}

.article-page p {
    font-size: 1.12rem;
    line-height: 1.8;
}

.article-page h2 {
    margin-top: 48px;
}

.article-page footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.article-page .article-header {
    margin-top: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.article-page .article-header h1 {
    margin: 0;
}

.article-page .article-category {
    margin: 0 0 14px;
    color: var(--accent);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-page .article-subtitle {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1.65;
}

.article-page .article-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 32px;
    margin: 32px 0 0;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.88rem;
}

.article-page .article-details div,
.article-page .transparency-details div {
    display: grid;
    gap: 4px;
}

.article-page .article-details dt,
.article-page .transparency-details dt {
    color: var(--muted);
    font-weight: 700;
}

.article-page .article-details dd,
.article-page .transparency-details dd {
    margin: 0;
}

.article-page .article-section {
    margin-top: 48px;
}

.article-page .article-section h2 {
    margin-top: 0;
}

.article-page .article-section h3 {
    margin-top: 36px;
    font-size: 1.3rem;
}

.article-page .abstract,
.article-page .publication-note {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.article-page .transparency-details {
    display: grid;
    gap: 16px;
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-page .publication-note p:last-child,
.article-page .author-bio p:last-child,
.article-page .abstract p:last-child {
    margin-bottom: 0;
}

.article-page .article-license {
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.86rem;
    line-height: 1.65;
}

.article-page .article-license p {
    font-size: inherit;
    line-height: inherit;
}

.submit-page main {
    width: min(860px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0 72px;
}

.submit-page .eyebrow,
.submit-page .notice strong {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
}

.submit-page .eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
}

.submit-page h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.7rem, 8vw, 5rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.submit-page .intro {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 1.16rem;
    line-height: 1.75;
}

.submit-page .notice {
    margin: 36px 0 56px;
    padding: 20px 22px;
    border-left: 4px solid var(--accent);
    background: var(--notice);
}

.submit-page .notice strong {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
}

.submit-page .notice p {
    margin: 0;
}

.submit-page .notice p + p {
    margin-top: 12px;
}

.submit-page .content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.submit-page section {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-raised);
}

.submit-page .workflow {
    grid-column: 1 / -1;
}

.submit-page h2 {
    margin: 0 0 16px;
    font-size: 1.55rem;
}

.submit-page p,
.submit-page li {
    line-height: 1.7;
}

.submit-page section p {
    color: var(--muted);
}

.submit-page ul,
.submit-page ol {
    margin: 0;
    padding-left: 1.4rem;
}

.submit-page li + li {
    margin-top: 8px;
}

.submit-page .workflow ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 36px;
    margin-top: 22px;
}

.submit-page footer {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
}

.submit-page footer a {
    font-weight: 700;
}

.support-sections {
    display: grid;
    gap: 16px;
    margin-top: 40px;
}

.support-page .support-sections > section {
    padding: 24px;
}

.support-page .funding-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.support-page .funding-groups > div {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.support-page h3 {
    margin: 0 0 10px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 1rem;
}

.support-page .funding-groups ul,
.support-page .priorities-list,
.support-page .independence-list {
    font-size: 0.96rem;
}

.support-page .priorities-list {
    columns: 2;
    column-gap: 36px;
}

.support-page .priorities-list li {
    break-inside: avoid;
}

.support-page .priorities-list + p {
    margin: 18px 0 0;
    font-size: 0.92rem;
}

.support-page .support-clarification {
    border-left: 4px solid var(--accent);
    background: var(--notice);
}

.support-page .support-clarification p {
    color: var(--text);
}

.support-page .support-action {
    text-align: center;
}

.support-page .support-boundary-note {
    max-width: 640px;
    margin: 0 auto 18px;
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    color: var(--text);
    background: var(--notice);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
    text-align: left;
}

.support-payment-button {
    display: inline-block;
    padding: 12px 18px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--action-text);
    background: var(--action-background);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    text-decoration: none;
}

.support-payment-button:hover,
.support-payment-button:focus-visible {
    color: var(--action-text);
    background: var(--action-hover);
}

.support-payment-button:disabled {
    border-color: var(--border);
    color: var(--muted);
    background: var(--surface);
    cursor: not-allowed;
    opacity: 0.8;
}

.support-action .support-payment-button + p {
    margin: 14px 0 0;
}

@media (prefers-reduced-motion: no-preference) {
    body,
    header,
    article,
    section,
    .notice,
    .theme-toggle {
        transition:
            color 160ms ease,
            background-color 160ms ease,
            border-color 160ms ease;
    }

    .home-page article {
        transition:
            transform 160ms ease,
            background-color 160ms ease,
            border-color 160ms ease;
    }

    .home-page article:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 700px) {
    .home-page .nav,
    .article-page .nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .primary-nav {
        flex-wrap: wrap;
    }


    .home-page main {
        padding-top: 48px;
    }
}

@media (max-width: 650px) {
    .submit-page main {
        padding-top: 48px;
    }

    .submit-page .content-grid,
    .submit-page .workflow ol {
        grid-template-columns: 1fr;
    }

    .submit-page .workflow {
        grid-column: auto;
    }

    .support-page .funding-groups,
    .support-page .priorities-list {
        columns: auto;
        grid-template-columns: 1fr;
    }

    .submit-page section {
        padding: 22px;
    }
}

@media (max-width: 600px) {
    .article-page .article-details {
        grid-template-columns: 1fr;
    }
}


.archive-active-filter {
    margin: 28px 0 0;
    color: var(--muted);
}

.archive-toolbar {
    width: fit-content;
    max-width: 100%;
    display: flex;
    align-items: end;
    gap: 12px;
    margin: 24px 0 40px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.archive-control {
    display: grid;
    min-width: 180px;
    gap: 6px;
}

.archive-control label {
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
}

.archive-control select {
    min-width: 0;
    min-height: 44px;
    padding: 9px 34px 9px 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    background: var(--surface-raised);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.92rem;
    line-height: 1.3;
    cursor: pointer;
}

.archive-control select:hover {
    border-color: var(--accent);
}

.archive-apply {
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid var(--accent);
    border-radius: 7px;
    color: var(--action-text);
    background: var(--action-background);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}

.archive-apply:hover {
    background: var(--action-hover);
}

.archive-clear {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
}

.archive-publications {
    margin-top: 0;
}

.archive-control select:focus-visible,
.archive-apply:focus-visible,
.archive-clear:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

@media (max-width: 650px) {
    .archive-toolbar {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .archive-control,
    .archive-control select,
    .archive-apply {
        width: 100%;
    }

    .archive-clear {
        min-height: auto;
        align-self: flex-start;
        padding: 2px 0;
    }
}

/* Progressive tokenized tag filter. The multiple select remains the no-JS fallback. */
.tag-input {
    position: relative;
    min-width: 0;
}

.tag-input:not(.is-enhanced) .tag-token-control,
.tag-input:not(.is-enhanced) .tag-suggestions,
.tag-input:not(.is-enhanced) [data-tag-status] {
    display: none;
}

.tag-input.is-enhanced .tag-input-fallback {
    display: none;
}

.tag-token-control {
    min-height: 44px;
    padding: 5px 7px;
    border: 1px solid var(--border);
    border-radius: 7px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--text);
    background: var(--surface-raised);
}

.tag-token-control:focus-within {
    border-color: var(--accent);
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.tag-chips {
    display: contents;
}

.tag-chip {
    min-height: 30px;
    padding: 4px 5px 4px 9px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text);
    background: var(--background);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.82rem;
    line-height: 1.2;
}

.tag-chip-remove {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.tag-chip-remove:hover {
    color: var(--text);
    background: var(--border);
}

.tag-token-text {
    width: auto;
    min-width: 9rem;
    min-height: 32px;
    padding: 4px;
    border: 0;
    flex: 1 1 9rem;
    color: var(--text);
    background: transparent;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
    outline: 0;
}

.tag-suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 240px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow-y: auto;
    background: var(--surface-raised);
    box-shadow: 0 10px 24px rgb(0 0 0 / 18%);
}

.tag-suggestion {
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 5px;
    display: block;
    color: var(--text);
    background: transparent;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.tag-suggestion:hover,
.tag-suggestion.is-active {
    background: var(--background);
}

.archive-tag-control {
    width: min(390px, 45vw);
    min-width: 280px;
}

.archive-tag-control .tag-input-fallback select {
    width: 100%;
}

@media (max-width: 650px) {
    .archive-tag-control {
        width: 100%;
        min-width: 0;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Compact publication discovery row used by Django and static public headers. */
.journal-discovery {
    width: min(1100px, calc(100% - 32px));
    margin: -4px auto 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    font-family: Inter, system-ui, sans-serif;
}

.article-page > .journal-discovery {
    margin-top: 14px;
}

.journal-discovery input,
.journal-discovery select,
.journal-discovery button {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    background: var(--surface);
    font: inherit;
    font-size: 0.86rem;
}

.journal-discovery input {
    width: min(260px, 34vw);
}

.journal-discovery select {
    width: 150px;
}

.journal-discovery button {
    border-color: var(--accent);
    color: var(--action-text);
    background: var(--action-background);
    font-weight: 700;
    cursor: pointer;
}

.journal-discovery button:hover {
    background: var(--action-hover);
}

.journal-discovery input:focus-visible,
.journal-discovery select:focus-visible,
.journal-discovery button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.archive-search-state {
    margin: 28px 0 0;
    color: var(--muted);
}

.suggested-tags {
    margin: -20px 0 38px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.82rem;
}

.suggested-tags > span {
    margin-right: 3px;
    color: var(--muted);
    font-weight: 700;
}

.suggested-tags a {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    text-decoration: none;
}

.suggested-tags a:hover {
    border-color: var(--accent);
}

@media (max-width: 700px) {
    .journal-discovery {
        margin-top: 0;
        flex-wrap: wrap;
    }

    .journal-discovery input {
        width: 100%;
        flex: 1 0 100%;
    }

    .journal-discovery select {
        min-width: 0;
        flex: 1 1 160px;
    }

    .journal-discovery button {
        flex: 0 0 auto;
    }
}

/* Parent publication identity */
.brand-lockup {
    min-width: max-content;
    display: grid;
    gap: 4px;
}

.parent-brand {
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.72rem;
    line-height: 1.2;
}

.parent-brand a {
    color: inherit;
    font-weight: 700;
    text-underline-offset: 0.16em;
}

/* Responsive public Journal refinements: phones, tablets, and compact laptops. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

img,
video,
iframe,
svg {
    max-width: 100%;
    height: auto;
}

pre,
code,
table {
    max-width: 100%;
}

pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.article-page main,
.article-page article,
.article-page section,
.submit-page main,
.submit-page section,
.home-page main,
.home-page article {
    min-width: 0;
}

.article-page a,
.submit-page a,
.publication-card a,
footer a {
    overflow-wrap: anywhere;
}

.primary-nav a,
.primary-nav button,
.archive-clear,
.suggested-tags a,
.tag-pill {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.theme-toggle {
    width: 44px;
    height: 44px;
}

.tag-chip-remove {
    width: 32px;
    height: 32px;
}

.tag-chip {
    max-width: 100%;
    min-height: 38px;
    overflow-wrap: anywhere;
}

.tag-suggestions {
    max-width: 100%;
    overscroll-behavior: contain;
}

@media (max-width: 1279px) {
    .home-page .nav,
    .article-page .nav,
    .submit-page .nav {
        flex-wrap: wrap;
        row-gap: 14px;
    }

    .primary-nav {
        flex: 1 1 620px;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px 14px;
    }

    .journal-discovery {
        margin-top: 0;
    }
}

@media (max-width: 1024px) {
    .home-page .nav,
    .article-page .nav,
    .submit-page .nav {
        align-items: flex-start;
    }

    .primary-nav {
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .journal-discovery {
        justify-content: stretch;
    }

    .journal-discovery input {
        width: auto;
        flex: 1 1 20rem;
    }

    .home-page main,
    .submit-page main {
        padding-top: 52px;
        padding-bottom: 60px;
    }

    .home-page .hero,
    .home-page .home-section,
    .home-page footer {
        margin-bottom: 0;
        margin-top: 56px;
    }

    .submit-page .content-grid,
    .submit-page .workflow ol {
        gap: 16px;
    }

    .support-page .funding-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .home-page .nav,
    .article-page .nav,
    .submit-page .nav {
        width: calc(100% - 24px);
        padding: 14px 0;
        gap: 12px;
    }

    .brand-lockup {
        min-width: 0;
    }

    .primary-nav {
        width: 100%;
        gap: 4px 12px;
    }

    .primary-nav a:not(.support-link) {
        padding: 7px 2px;
    }

    .primary-nav .support-link {
        padding: 9px 12px;
    }

    .journal-discovery {
        width: calc(100% - 24px);
        margin-bottom: 12px;
        flex-wrap: wrap;
    }

    .journal-discovery input {
        width: 100%;
        min-height: 44px;
        flex: 1 0 100%;
    }

    .journal-discovery select,
    .journal-discovery button {
        min-height: 44px;
    }

    .journal-discovery select {
        width: auto;
        min-width: 0;
        flex: 1 1 12rem;
    }

    .journal-discovery button {
        flex: 0 0 auto;
    }

    .home-page main,
    .submit-page main,
    .article-page > .back,
    .article-page > main,
    .article-page > .article-license {
        width: calc(100% - 24px);
    }

    .home-page main,
    .submit-page main {
        padding: 40px 0 48px;
    }

    .home-page .hero {
        margin: 0 0 48px;
    }

    .home-page h1 {
        font-size: clamp(2.65rem, 15vw, 4rem);
        line-height: 1;
    }

    .home-page .intro,
    .submit-page .intro {
        margin-top: 18px;
        font-size: 1.05rem;
        line-height: 1.65;
    }

    .home-page .home-section,
    .home-page footer {
        margin-top: 48px;
    }

    .home-page article,
    .submit-page section,
    .article-page .abstract,
    .article-page .publication-note {
        padding: 20px;
    }

    .home-page article h2,
    .home-page article h3,
    .submit-page h2 {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .submit-page h1,
    .article-page h1 {
        font-size: clamp(2.25rem, 11vw, 3.5rem);
        overflow-wrap: anywhere;
    }

    .submit-page .content-grid,
    .submit-page .workflow ol,
    .support-page .funding-groups {
        grid-template-columns: 1fr;
    }

    .article-page p {
        font-size: 1.05rem;
        line-height: 1.72;
    }

    .article-page .article-header,
    .article-page .article-section {
        margin-top: 36px;
    }

    .article-page .article-subtitle {
        font-size: 1.12rem;
    }

    .article-page .article-details {
        grid-template-columns: 1fr;
    }

    .archive-toolbar {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .archive-control,
    .archive-tag-control {
        width: 100%;
        min-width: 0;
    }

    .archive-apply,
    .archive-clear {
        width: 100%;
        justify-content: center;
    }

    .suggested-tags {
        margin-top: -20px;
    }

    .suggested-tags > span {
        flex: 1 0 100%;
    }

    .tag-token-text {
        min-width: 7rem;
    }

    footer,
    .general-contact {
        line-height: 1.75;
    }
}

@media (max-width: 479px) {
    .brand {
        font-size: 1rem;
        letter-spacing: 0.09em;
    }

    .parent-brand {
        font-size: 0.76rem;
    }

    .primary-nav {
        font-size: 0.88rem;
    }

    .primary-nav .support-link {
        flex: 1 1 auto;
        justify-content: center;
    }

    .journal-discovery select,
    .journal-discovery button {
        flex: 1 1 calc(50% - 4px);
    }

    .home-page article,
    .submit-page section,
    .article-page .abstract,
    .article-page .publication-note,
    .article-page .report-concern {
        padding: 17px;
    }

    .article-page .article-details,
    .article-page .transparency-details {
        gap: 12px;
    }

    .tag-chip {
        width: 100%;
        justify-content: space-between;
    }

    .archive-toolbar {
        padding: 12px;
    }
}


/* Canonical public header. Keep this component identical in both public stylesheets. */
:root {
    --public-shell: 1100px;
    --public-gutter: 32px;
}

.public-header {
    --header-action-background: #745724;
    --header-action-hover: #5f461d;
    --header-action-text: #fffaf0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    background: var(--surface);
    font-family: Inter, system-ui, sans-serif;
}

:root[data-theme="dark"] .public-header {
    --header-action-background: #9c7b3e;
    --header-action-hover: #b08d49;
    --header-action-text: #18140c;
}

.public-header__inner {
    width: min(var(--public-shell), calc(100% - var(--public-gutter)));
    min-height: 80px;
    margin: 0 auto;
    padding: 14px 0;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 32px;
}

.public-header .brand-lockup {
    min-width: max-content;
    display: grid;
    align-content: center;
    gap: 4px;
    line-height: 1;
}

.public-header .brand {
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.15;
    text-decoration: none;
    text-transform: uppercase;
}

.public-header .parent-brand {
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.7rem;
    line-height: 1.25;
    white-space: nowrap;
}

.public-header .parent-brand a {
    color: var(--muted);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.public-header .primary-nav {
    min-width: 0;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 24px;
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
}

.public-header .primary-links,
.public-header .header-actions {
    min-width: 0;
    display: flex;
    align-items: center;
}

.public-header .primary-links {
    justify-content: center;
    gap: 18px;
}

.public-header .header-actions {
    justify-content: flex-end;
    gap: 12px;
}

.public-header .primary-nav a {
    min-height: 44px;
    padding: 0;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.public-header .primary-links a {
    color: var(--muted);
    font-weight: 600;
}

.public-header .primary-nav a:hover,
.public-header .primary-nav a:focus-visible {
    color: var(--text);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.public-header .theme-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    background: var(--surface);
    display: inline-grid;
    flex: 0 0 44px;
    place-items: center;
    cursor: pointer;
}

.public-header .theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
    background: var(--surface-raised);
}

.public-header .theme-toggle::before {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    box-shadow: inset -5px -2px 0 0 currentColor;
    content: "";
}

:root[data-theme="dark"] .public-header .theme-toggle::before {
    width: 9px;
    height: 9px;
    background: currentColor;
    box-shadow:
        0 -7px 0 -3px currentColor,
        0 7px 0 -3px currentColor,
        7px 0 0 -3px currentColor,
        -7px 0 0 -3px currentColor,
        5px 5px 0 -3px currentColor,
        -5px -5px 0 -3px currentColor,
        5px -5px 0 -3px currentColor,
        -5px 5px 0 -3px currentColor;
}

.public-header .primary-nav .support-link {
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--header-action-text);
    background: var(--header-action-background);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.public-header .primary-nav .support-link:hover,
.public-header .primary-nav .support-link:focus-visible {
    color: var(--header-action-text);
    background: var(--header-action-hover);
}

.public-header .journal-discovery {
    width: min(var(--public-shell), calc(100% - var(--public-gutter)));
    margin: 0 auto;
    padding: 12px 0 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    gap: 8px;
    font-family: Inter, system-ui, sans-serif;
}

.public-header .journal-discovery input,
.public-header .journal-discovery select,
.public-header .journal-discovery button {
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    background: var(--surface);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.88rem;
    line-height: 1.2;
}

.public-header .journal-discovery input {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    background: var(--surface-raised);
}

.public-header .journal-discovery select {
    width: 160px;
    flex: 0 0 160px;
}

.public-header .journal-discovery button {
    width: auto;
    padding-right: 16px;
    padding-left: 16px;
    border-color: var(--accent);
    color: var(--accent-hover);
    background: var(--surface);
    font-weight: 700;
    cursor: pointer;
}

.public-header .journal-discovery button:hover {
    color: var(--header-action-text);
    background: var(--header-action-background);
}

.public-header a:focus-visible,
.public-header button:focus-visible,
.public-header input:focus-visible,
.public-header select:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.staff-nav {
    width: min(var(--public-shell), calc(100% - var(--public-gutter)));
    margin: 10px auto 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-family: Inter, system-ui, sans-serif;
}

.staff-nav form {
    margin: 0;
}

@media (max-width: 1024px) {
    .public-header__inner {
        padding-bottom: 10px;
        grid-template-columns: 1fr;
        align-items: start;
        gap: 8px;
    }

    .public-header .primary-nav {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 16px;
    }

    .public-header .primary-links {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px 14px;
    }

    .public-header .journal-discovery input {
        flex-basis: 20rem;
    }
}

@media (max-width: 767px) {
    :root {
        --public-gutter: 24px;
    }

    .public-header__inner {
        min-height: 0;
        padding: 14px 0 10px;
    }

    .public-header .brand-lockup {
        min-width: 0;
    }

    .public-header .primary-nav {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .public-header .primary-links {
        width: 100%;
        gap: 4px 12px;
    }

    .public-header .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .public-header .primary-links a {
        padding: 0 2px;
    }

    .public-header .journal-discovery {
        flex-wrap: wrap;
    }

    .public-header .journal-discovery input {
        width: 100%;
        flex: 1 0 100%;
    }

    .public-header .journal-discovery select {
        width: auto;
        min-width: 0;
        flex: 1 1 12rem;
    }

    .public-header .journal-discovery button {
        flex: 0 0 auto;
    }
}

@media (max-width: 479px) {
    .public-header .brand {
        font-size: 1rem;
        letter-spacing: 0.09em;
    }

    .public-header .parent-brand {
        font-size: 0.74rem;
    }

    .public-header .primary-nav {
        font-size: 0.88rem;
    }

    .public-header .header-actions .support-link {
        flex: 1 1 auto;
        justify-content: center;
    }

    .public-header .journal-discovery select,
    .public-header .journal-discovery button {
        flex: 1 1 calc(50% - 4px);
    }
}

/* Align public page shells to the same outer grid without widening reading columns. */
.submit-page > main {
    width: min(var(--public-shell), calc(100% - var(--public-gutter)));
}

.submit-page > main > :not(footer) {
    width: min(860px, 100%);
}

.article-page > main {
    width: min(var(--public-shell), calc(100% - var(--public-gutter)));
}

.article-page > main > article {
    width: min(760px, 100%);
    margin-right: auto;
    margin-left: auto;
}
