:root {
    color-scheme: light;
    --background: #f3f0e8;
    --surface: #fffdf8;
    --surface-raised: #ffffff;
    --text: #211f1b;
    --muted: #67635b;
    --border: #d8d1c4;
    --accent: #8a692d;
    --accent-hover: #6f5221;
    --focus: #8a692d;
    --error: #8b2d24;
}

* {
    box-sizing: border-box;
}

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

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

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

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.site-nav {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
nav,
button,
.primary-button,
.secondary-button,
.eyebrow,
.article-meta,
.transparency-details {
    font-family: Inter, system-ui, sans-serif;
}

.brand {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

nav,
.actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-nav form,
.actions form {
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    color: var(--accent);
    background: transparent;
    font-size: inherit;
    text-decoration: underline;
    cursor: pointer;
}

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

.page-heading {
    margin-bottom: 32px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

h1 {
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    line-height: 1;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.muted,
.help {
    color: var(--muted);
}

.panel,
.narrow-panel,
.abstract,
.disclosures {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-raised);
}

.narrow-panel {
    max-width: 520px;
    margin: 0 auto;
}

.primary-button,
.secondary-button {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    color: #fffaf0;
    background: #745724;
}

.primary-button:hover {
    background: #5f461d;
}

.secondary-button {
    color: var(--accent-hover);
    background: var(--surface);
}

.messages p {
    padding: 12px 16px;
    border-left: 4px solid var(--accent);
    background: var(--surface);
}

.error,
.errorlist {
    color: var(--error);
}

.article-form {
    max-width: 860px;
}

.form-section + .form-section {
    margin-top: 44px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
}

.form-section h2 {
    margin: 0 0 28px;
    font-size: 1.55rem;
}

.field {
    margin: 0 0 28px;
}

.field-label,
.choice-group legend {
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: Inter, system-ui, sans-serif;
    font-weight: 700;
}

.field-label label {
    margin: 0;
}

.help-control {
    width: 2rem;
    height: 2rem;
    margin: -0.35rem;
    padding: 0.35rem;
    border: 0;
    border-radius: 50%;
    color: var(--accent-hover);
    background: transparent;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    line-height: 1;
    cursor: pointer;
    appearance: none;
}

.help-control span {
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.help-control:hover span,
.help-control[aria-expanded="true"] span {
    color: var(--surface-raised);
    background: var(--accent);
}

.field-help,
.responsibility-statement {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.6;
}

.responsibility-statement {
    max-width: 72ch;
    margin-bottom: 28px;
    padding: 16px 18px;
    border-left: 4px solid var(--accent);
    background: var(--surface);
}

.section-instruction {
    max-width: 68ch;
    margin: -12px 0 28px;
    color: var(--muted);
    line-height: 1.65;
}

.reference-card {
    min-width: 0;
    margin: 0 0 22px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.reference-card legend {
    padding: 0 8px 0 0;
    font-family: Inter, system-ui, sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.reference-field-wide,
.reference-order-field {
    grid-column: 1 / -1;
}

.reference-order-field input {
    max-width: 9rem;
}

.reference-card .field {
    min-width: 0;
    margin-bottom: 22px;
}

.reference-card textarea {
    min-height: 6.5rem;
}

.reference-remove {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
}

.reference-remove label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.reference-remove input {
    width: auto;
    margin: 0;
    accent-color: var(--accent);
}

.reference-card.is-marked-for-deletion {
    opacity: 0.62;
    border-style: dashed;
}

.reference-card.is-marked-for-deletion .reference-grid {
    text-decoration: line-through;
    text-decoration-color: var(--border);
}

.disclosure-card {
    min-width: 0;
    margin: 0 0 22px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.disclosure-card legend {
    max-width: 100%;
    margin: 0;
    padding: 0 8px 0 0;
    font-size: 1.08rem;
}

.group-instruction {
    max-width: 68ch;
    margin: 2px 0 14px;
    color: var(--muted);
    line-height: 1.55;
}

.choice-group > [id^="id_"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
}

.choice-group > [id^="id_"] > div {
    min-width: 0;
}

.choice-group label {
    width: 100%;
    margin: 0;
    padding: 5px 7px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    cursor: pointer;
}

.choice-group label:hover {
    background: var(--background);
}

.choice-group input[type="checkbox"],
.choice-group input[type="radio"] {
    width: 1rem;
    height: 1rem;
    margin: 0.2em 0 0;
    padding: 0;
    flex: 0 0 1rem;
    accent-color: var(--accent);
}

.details-field {
    margin: 20px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.details-field .field-label {
    margin-bottom: 7px;
}

.field-guidance {
    max-width: 68ch;
    margin: 0 0 10px;
    line-height: 1.55;
}

.details-field textarea {
    min-height: 7.5rem;
    padding: 12px 14px;
    border-radius: 8px;
    line-height: 1.55;
}

.field:not(.choice-group) label,
.narrow-panel label {
    display: block;
    margin-bottom: 7px;
    font-family: Inter, system-ui, sans-serif;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    background: var(--surface);
    font: inherit;
}

textarea {
    resize: vertical;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: Inter, system-ui, sans-serif;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.preview-toolbar {
    margin-bottom: 40px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-family: Inter, system-ui, sans-serif;
}

.status {
    margin-left: 8px;
    color: var(--muted);
}

.published-article {
    width: min(760px, 100%);
    margin: 0 auto;
}

.article-header {
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
}

.subtitle {
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1.65;
}

.article-meta,
.disclosures dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
    margin-top: 28px;
}

.article-meta div,
.disclosures dl div {
    display: grid;
    gap: 4px;
}

dt {
    color: var(--muted);
    font-weight: 700;
}

dd {
    margin: 0;
}

.abstract,
.article-body,
.disclosures {
    margin-top: 44px;
}

.published-article p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-references {
    margin-top: 44px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.reference-list {
    margin: 24px 0 0;
    padding-left: 1.6rem;
}

.reference-list > li {
    padding-left: 0.35rem;
}

.reference-list > li + li {
    margin-top: 24px;
}

.published-article .reference-citation,
.published-article .reference-link,
.published-article .reference-accessed,
.published-article .reference-notes {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.92rem;
    line-height: 1.65;
}

.published-article .reference-link,
.published-article .reference-accessed,
.published-article .reference-notes {
    margin-top: 5px;
}

.reference-link a {
    overflow-wrap: anywhere;
}

.reference-accessed,
.reference-notes {
    color: var(--muted);
}

.disclosure-list {
    margin: 0;
    padding-left: 1.25rem;
}

.disclosure-list li + li {
    margin-top: 5px;
}

.disclosures dd p {
    margin: 12px 0 0;
    font-size: inherit;
    line-height: 1.6;
}

.legacy-disclosure {
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

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

@media (max-width: 700px) {
    .site-nav,
    .page-heading,
    .preview-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        flex-wrap: wrap;
    }

    .article-meta,
    .disclosures dl,
    .reference-grid {
        grid-template-columns: 1fr;
    }

    .reference-field-wide,
    .reference-order-field {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .article-form.panel {
        padding: 18px;
    }

    .disclosure-card,
    .reference-card {
        padding: 17px;
    }

    .disclosure-card legend {
        font-size: 1rem;
    }

    .choice-group label {
        padding-right: 3px;
        padding-left: 3px;
    }
}

.editorial-notices {
    display: grid;
    gap: 14px;
    margin-bottom: 32px;
}

.editorial-notice {
    padding: 22px;
    border: 2px solid var(--accent);
    border-radius: 10px;
    background: var(--surface);
}

.editorial-notice h2,
.editorial-notice p {
    margin-top: 0;
}

.editorial-notice-retraction {
    border-color: var(--error);
    border-width: 4px;
}

.editorial-notice-retraction .eyebrow {
    color: var(--error);
}

.notice-date {
    margin-bottom: 0;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.88rem;
}

.retracted-body-note,
.report-concern {
    margin-top: 44px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.report-concern {
    border-left: 4px solid var(--accent);
}

.report-email-fallback {
    margin-top: 16px;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem !important;
}

.public-contact-footer {
    width: min(760px, 100%);
    margin: 36px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
}

.report-concern p {
    font-size: 1rem;
}

.report-form .visually-hidden {
    position: absolute;
}

.report-queues {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.report-queues a {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.84rem;
    text-decoration: none;
}

.report-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
    margin-bottom: 24px;
}

.report-filters label {
    display: grid;
    gap: 5px;
    font-family: Inter, system-ui, sans-serif;
}

.report-review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 22px;
}

.report-review-grid dd {
    margin: 4px 0 18px;
    overflow-wrap: anywhere;
}

.report-history {
    margin-top: 22px;
}

@media (max-width: 760px) {
    .report-review-grid {
        grid-template-columns: 1fr;
    }
}


.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.tag-pill {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.82rem;
    text-decoration: none;
}

select:focus-visible,
.tag-pill:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.tag-selection {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* Progressive tokenized tag selector. The original Django controls remain 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: 46px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--text);
    background: var(--surface);
}

.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.84rem;
    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: 11rem;
    min-height: 32px;
    padding: 4px;
    border: 0;
    flex: 1 1 11rem;
    color: var(--text);
    background: transparent;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.92rem;
    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 / 14%);
}

.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);
}

.tag-suggestion-create {
    border-top: 1px solid var(--border);
    border-radius: 0 0 5px 5px;
    color: var(--accent-hover);
    font-weight: 700;
}

.tag-empty-state {
    margin: 12px 0 0;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Compact public discovery form shared by Django-rendered Journal pages. */
.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;
}

.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: #fffaf0;
    background: #745724;
    font-weight: 700;
    cursor: pointer;
}

.journal-discovery button:hover {
    background: #5f461d;
}

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

@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 Django publishing refinements: public pages and staff tools. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

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

pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.page-shell,
.panel,
.published-article,
.article-form,
.report-review-grid > *,
.table-wrap {
    min-width: 0;
}

.published-article a,
.report-review-grid a,
.public-contact-footer a,
td,
dd {
    overflow-wrap: anywhere;
}

.table-wrap {
    width: 100%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table {
    min-width: 680px;
}

.site-nav nav a,
.site-nav nav button,
.primary-button,
.secondary-button,
.report-queues 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;
}

select {
    max-width: 100%;
    min-height: 44px;
    color: var(--text);
    background: var(--surface);
    font: inherit;
}

.cf-turnstile {
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 1024px) {
    .site-nav {
        flex-wrap: wrap;
        row-gap: 14px;
    }

    .site-nav > nav {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

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

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

    .page-shell {
        padding-top: 44px;
        padding-bottom: 60px;
    }

    .report-filters > label {
        min-width: min(12rem, 100%);
        flex: 1 1 12rem;
    }
}

@media (max-width: 767px) {
    .site-nav,
    .journal-discovery,
    .page-shell {
        width: calc(100% - 24px);
    }

    .site-nav {
        padding: 14px 0;
        gap: 12px;
    }

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

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

    .site-nav > nav a,
    .site-nav .link-button {
        padding: 7px 2px;
    }

    .journal-discovery {
        margin: 0 auto 12px;
        flex-wrap: wrap;
    }

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

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

    .journal-discovery button {
        min-height: 44px;
        flex: 0 0 auto;
    }

    .page-shell {
        padding: 36px 0 48px;
    }

    .page-heading,
    .preview-toolbar {
        gap: 16px;
    }

    h1 {
        font-size: clamp(2.15rem, 11vw, 3.5rem);
        overflow-wrap: anywhere;
    }

    .panel,
    .narrow-panel,
    .abstract,
    .disclosures,
    .editorial-notice,
    .retracted-body-note,
    .report-concern {
        padding: 20px;
    }

    .published-article p {
        font-size: 1.04rem;
        line-height: 1.72;
    }

    .subtitle {
        font-size: 1.12rem;
    }

    .article-meta,
    .disclosures dl,
    .reference-grid,
    .report-review-grid {
        grid-template-columns: 1fr;
    }

    .article-meta,
    .disclosures dl {
        gap: 16px;
    }

    .reference-list {
        padding-left: 1.2rem;
    }

    .report-concern .secondary-button,
    .article-form > .primary-button,
    .report-form > .primary-button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .report-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .report-filters > label,
    .report-filters input,
    .report-filters select,
    .report-filters button {
        width: 100%;
    }

    .actions {
        flex-wrap: wrap;
    }

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

    .public-contact-footer {
        line-height: 1.75;
    }
}

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

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

    .site-nav > nav {
        font-size: 0.9rem;
    }

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

    .panel,
    .narrow-panel,
    .abstract,
    .disclosures,
    .editorial-notice,
    .retracted-body-note,
    .report-concern,
    .article-form.panel,
    .reference-card,
    .disclosure-card,
    .tag-selection {
        padding: 16px;
    }

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

    .field-label,
    .choice-group legend {
        align-items: flex-start;
    }

    .preview-toolbar .actions,
    .page-heading .primary-button {
        width: 100%;
    }
}

/* Match the public light/dark palette on Django-rendered article and report pages. */
: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;
    --focus: #d0ad63;
    --error: #d98278;
}


/* 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;
}

.related-articles {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
}

.related-articles-header > p {
    margin: 6px 0 24px;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.related-article-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.related-article-card h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.35;
}

.published-article .related-article-excerpt {
    margin: 12px 0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.published-article .related-article-meta {
    margin: 0 0 12px;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.78rem;
    line-height: 1.5;
}

.related-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.related-article-tags li {
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.72rem;
}

.related-article-link {
    margin-top: auto;
}

@media (max-width: 700px) {
    .related-articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
}

.content-block-card {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.content-block-card > legend {
    padding: 0 8px;
    font-family: Inter, system-ui, sans-serif;
    font-weight: 800;
}

.content-block-controls {
    display: grid;
    grid-template-columns: minmax(100px, 0.35fr) minmax(180px, 1fr);
    gap: 16px;
}

.content-block-image-fields {
    display: grid;
    gap: 12px;
}

.content-block-card [hidden] {
    display: none;
}

.content-block-empty-state {
    margin: 16px 0 0;
    color: var(--muted);
}

.content-block-preview {
    display: block;
    width: auto;
    max-width: min(100%, 420px);
    max-height: 280px;
    margin: 12px 0;
    object-fit: contain;
    border: 1px solid var(--border);
}

.content-block-decorative > .help {
    margin: 2px 0 0;
}

.content-block-checkbox {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-family: Inter, system-ui, sans-serif;
    cursor: pointer;
}

.content-block-checkbox input[type="checkbox"] {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

.content-block-checkbox span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.content-block-delete {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--error);
}

.content-block-card.is-marked-for-deletion {
    opacity: 0.55;
}

.legacy-content-warning {
    padding: 12px 16px;
    border-left: 4px solid var(--accent);
    background: var(--surface);
}

.article-figure {
    margin: 36px 0;
}

.article-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.article-figure figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.86rem;
    line-height: 1.55;
}

.article-image-credit {
    display: block;
    margin-top: 3px;
    font-size: 0.78rem;
}

.article-body blockquote {
    margin: 32px 0;
    padding-left: 22px;
    border-left: 3px solid var(--accent);
    color: var(--muted);
}

.article-body hr {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

@media (max-width: 520px) {
    .content-block-controls {
        grid-template-columns: 1fr;
    }

    .content-block-card {
        padding: 16px;
    }
}
