:root {
    --cn2-color: #e9967a;
    --page-background: #171b20;
    --page-gradient-center: #343c46;
    --page-gradient-midpoint: #303338;
    --surface-overlay: rgb(20 24 29 / 87%);
    --surface-form: rgb(23 27 32 / 20%);
    --surface-input: rgb(28 33 40 / 75%);
    --content-accent: #b8bcc2;
    --content-accent-subtle: #b8bcc21a;
    --text-primary: #f5f1e8;
    --text-muted: #a6a9ad;
    --text-secondary: #c0c2c5;
    --text-placeholder: #a6a9ad;
    --action-color: #81b1cb;
    --link-hover: #71a6c3;
    --action-color-bright: #98aac7;
    --navigation-accent: var(--action-color);
    --border-color: #9ebeb7;
    --border-subtle: var(--border-color);
    --focus-ring: var(--action-color);
    --article-surface: #fff;
    --article-text: #171b20;
    --article-accent: #555d66;
    --article-link: #91482d;
    --warning-color: #91482d;
    --font-family: "Segoe UI", sans-serif;
    --shell-navigation-surface: var(--surface-overlay);
    --shell-navigation-accent: var(--navigation-accent);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    background-color: var(--page-background);
    background-image: radial-gradient(ellipse at 50% 30%, var(--page-gradient-center) 0%, var(--page-gradient-midpoint) 40%, var(--page-background) 80%);
    background-repeat: no-repeat;
    color: var(--text-primary);
    font-family: var(--font-family);
}

a {
    color: var(--action-color);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    color: var(--link-hover);
    text-decoration: none;
}

blockquote {
    border-left: 2px solid var(--content-accent);
    padding-left: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

/* Above mobile screen sizes */
.desktop-bullet {
  display: inline;
}

.mobile-break {
  display: none;
}

/* Mobile screen sizes, including exactly 768px */
@media (max-width: 768px) {
  .desktop-bullet {
    display: none;
  }

  .mobile-break {
    display: inline;
  }
}

.project-logo {
    color: #71a6c3;
}

.translation-entry {
    margin-block: 1rem;
    padding: 1.25rem;
    background: var(--surface-form);
    border-radius: 4px;
    overflow-wrap: anywhere;
}

.translation-source {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.translation-term {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--action-color);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: .15em;
    cursor: pointer;
}

.translation-term:focus-visible {
    outline: 2px solid var(--action-color);
    outline-offset: 3px;
}

dialog.translation-help-modal {
    box-sizing: border-box;
    background: var(--page-background);
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.translation-entry .text-muted,
.translation-entry .text-muted h3 {
    color: var(--text-muted);
}

.translation-metadata {
    font-style: italic;
    margin-block: 1rem;
}

.translation-metadata > summary {
    cursor: pointer;
}

.translation-metadata > summary:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.translation-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-block: 1rem;
}

.translation-review-controls {
    justify-content: space-around;
    align-items: center;
}

.translation-review-controls > .form-field {
    min-width: 0;
    margin: 0;
}

@media (max-width: 768px) {
    .translation-review-controls {
        flex-direction: column;
        justify-content: center;
    }
}

.translation-review-status {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    border: 0;
    padding: 0;
    margin: 0;
}

.form-field .translation-review-status label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.translation-review-status input[type="radio"] {
    width: auto;
    accent-color: var(--action-color);
}

.translation-actions .button {
    margin: 0;
}

/* Tab rows stay left-aligned, independently of centered action groups. */
[role="tablist"],
.control-panel-tabs {
    justify-content: left;
}

[role="tablist"] > .button,
.control-panel-tabs > .button {
    margin-inline: 0;
}

#translation-tabs [aria-selected="true"] {
    background: var(--action-color);
    color: var(--page-background);
}

#translation-filter-details > summary {
    cursor: pointer;
    color: var(--content-accent);
    margin-block: 1rem;
}

#translation-filter-details > summary:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.translation-actions .button:disabled {
    color: var(--text-muted);
    background: var(--surface-input);
    cursor: not-allowed;
}

#translation-filters .language-switcher,
#invitation-form .language-switcher {
    width: fit-content;
    padding: .75rem;
    border: 0;
    border-radius: 4px;
    background: var(--surface-input);
    color: var(--text-primary);
    font: inherit;
    color-scheme: dark;
}

#translation-filters .language-switcher:focus-visible,
#invitation-form .language-switcher:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

#translation-edit-form input[type="checkbox"] { width: auto; }

#translation-exports,
#translation-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-block: 1.5rem;
}

hr {
    --hr-color: var(--text-primary);
    border: 0;
    border-top: 1px solid transparent;
    border-image: linear-gradient(to right, transparent, var(--hr-color), transparent) 1;
    margin: 2rem 0;
}

.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    .mobile-break {
        display: inline;
    }
}

article hr,
.article-body hr {
    --hr-color: var(--surface-overlay);
}

small {
    font-size: 0.7rem;
}

.app-shell {
    min-height: 100vh;
    padding-inline: 4.25rem;
}

.sidebar {
    display: flex;
    justify-content: center;
    position: fixed;
    z-index: 10;
    top: .75rem;
    left: 0;
    width: 5.5rem;
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
    background: transparent;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: flex-start;
    width: 100%;
    gap: .5rem;
    padding: .75rem;
    justify-content: center;
    border-radius: 0 .85rem .85rem 0;
}

.sidebar-icon {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
}

.sidebar-llc {
    width: 1.9rem;
    height: auto;
}

.main-content {
    min-width: 0;
    background: transparent;
}

.site-footer {
    padding: 1.5rem clamp(1rem, 4vw, 3rem);
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.footer-wordmark-link {
    display: grid;
    align-items: center;
    width: 12rem;
    max-width: 100%;
    min-height: 44px;
    margin: 1.5rem auto 1rem;
    touch-action: manipulation;
}

.footer-wordmark {
    display: block;
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
}

.footer-wordmark-hover {
    opacity: 0;
}

.footer-wordmark-link:is(:focus-visible, :active) .footer-wordmark {
    opacity: 0;
}

.footer-wordmark-link:is(:focus-visible, :active) .footer-wordmark-hover {
    opacity: 1;
}

.footer-wordmark-link:focus-visible {
    outline: 2px solid var(--navigation-accent);
    outline-offset: 4px;
}

@media (hover: hover) {
    .footer-wordmark-link:hover .footer-wordmark {
        opacity: 0;
    }

    .footer-wordmark-link:hover .footer-wordmark-hover {
        opacity: 1;
    }
}

.sidebar-brand,
.menu-button {
    color: var(--navigation-accent);
    border: 0;
    background: var(--surface-overlay);
}


.menu-button {
    position: fixed;
    z-index: 10;
    top: .75rem;
    right: 0;
    display: grid;
    width: 4rem;
    height: 3.5rem;
    padding: .5rem;
    place-items: center;
    border-radius: .85rem 0 0 .85rem;
    cursor: pointer;
}

.menu-button:focus-visible {
    outline: 2px solid var(--navigation-accent);
    outline-offset: -3px;
}

.menu-button img {
    display: block;
    width: 2.25rem;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem);
    gap: clamp(3rem, 4vw, 9rem);
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    padding: clamp(2rem, 4vw, 8rem) clamp(2rem, 7vw, 8rem);
    place-items: center start;
    overflow: hidden;
}

.contact-privacy-disclosure {
    margin-top: 1.25rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    font-size: 0.65rem;
}

.contact-privacy-disclosure summary {
    color: var(--action-color);
    cursor: pointer;
}

.contact-privacy-disclosure summary:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.contact-privacy-disclosure p {
    margin: .75rem 0 0;
}

#public-article-navigation {
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .app-shell {
        padding-inline: 0;
        padding-top: 4.25rem;
    }

    .sidebar {
        width: 4rem;
        height: 3.5rem;
    }

    .sidebar-brand {
        height: 100%;
        justify-content: center;
        padding: .5rem;
        gap: 0;
    }

    .sidebar-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    #home-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    #home-hero-copy {
        width: 100%;
    }
}

.hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    /* background: url("../img/assets/cn2data-dark-background-full.svg") center / cover no-repeat; */
    content: "";
    opacity: 0.6;
}

.hero h1 {
    /* max-width: 10ch; */
    margin: 0;
    font-size: clamp(3rem, 3vw, 4rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 0.95;
}

.hero-copy p {
    margin: 2rem 0 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.hero-copy {
    align-self: start;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    justify-items: center;
    max-width: 29.5rem;
    margin-top: 2rem;
    margin-inline: auto;
    gap: 2rem 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 0 1rem;
    border: 0;
    border-radius: 4px;
    color: var(--action-color);
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    filter: grayscale(100%);
    max-width: 12rem;
    justify-content: center;
}

.project-card:is(:hover, :focus-visible) {
    filter: none;
}

.project-card:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 4px;
}

.project-logomark {
    display: block;
    width: 4rem;
    height: 4rem;
    max-width: 100%;
    margin-inline: auto;
    object-fit: contain;
}

.small-caps {
    font-variant: small-caps;
}

.project-card h2 {
    width: 100%;
    margin: .75rem 0 0;
    line-height: 1;
}

.project-card > h2:first-child {
    margin-top: 0;
}

.project-wordmark {
    display: block;
    width: 7rem;
    max-width: 100%;
    height: 1.5rem;
    margin-inline: auto;
    object-fit: contain;
}

.project-logo {
    display: block;
    width: 100%;
    height: auto;
    margin-inline: auto;
}

.cn2-color {
    color: var(--content-accent);
}

.hero-copy .project-card p {
    text-align: left;
    margin: 1rem 0 0;
    color: var(--text-primary);
    font-size: .75rem;
    line-height: 1.6;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .5rem .5rem;
    border: 0;
    border-radius: 4px;
    color: var(--action-color);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-decoration: none;
    background: var(--surface-form);
    text-transform: uppercase;
}

#home-about-button {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 1.5rem auto;
    text-align: center;
}

.button-small {
    font-size: .6rem !important;
}

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

.button:focus-visible {
    outline: 2px solid var(--action-color);
    outline-offset: 3px;
}

.button-dark:hover,
.button-dark:focus-visible {
    background: var(--action-color);
    color: var(--page-background);
}

.button-dark:focus-visible {
    outline: 2px solid var(--action-color);
    outline-offset: 3px;
}

.button-dark {
    background: var(--page-background);
}

.button-danger {
    background: var(--article-link);
    color: var(--article-surface);
}

.button-danger:hover {
    color: var(--article-text);
}

.form {
    width: 100%;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    border: 0;
    background: var(--surface-form);
    border-radius: 4px;
}

.form-eyebrow {
    margin: 0 0 1rem;
    color: var(--content-accent);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.form h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.05;
}

.form-intro {
    margin: 1rem 0 2rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-field {
    margin-top: 1.25rem;
}

.form-disclosure {
    margin-top: 1.25rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.form-disclosure summary {
    color: var(--action-color);
    cursor: pointer;
}

.form-disclosure summary:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.form-disclosure p {
    margin: .75rem 0 0;
    font-size: 0.65rem;
}

.form-field label {
    display: block;
    margin-bottom: .55rem;
    color: var(--content-accent);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.form-field input,
.form-field .language-switcher,
.form-field textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 0;
    border-radius: 4px;
    background: var(--surface-overlay);
    color: var(--text-primary);
    font: inherit;
}

.language-switcher {
    width: fit-content;
}

.form-field textarea {
    min-height: 7rem;
    resize: vertical;
}

.form-field .language-switcher {
    color-scheme: dark;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-placeholder);
}

.form-field input:focus,
.form-field .language-switcher:focus,
.form-field textarea:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.form-submit {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    margin-top: 2rem;
    text-align: center;
    padding: 1rem;
    border: 0;
    border-radius: 4px;
    background: var(--surface-overlay);
    color: var(--action-color);
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
}

.form-submit:hover,
.form-submit:focus-visible {
    background: var(--action-color);
    color: var(--page-background);
}

.form-submit:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 2rem;
    }

    .sidebar-llc {
        width: 1.4rem;
    }
}
/* Shared allauth layouts retain the package's translated forms and validation. */
.account-section {
    width: min(100%, 46rem);
    margin-inline: auto;
    padding: 5rem clamp(1rem, 4vw, 3rem) 3rem;
}

.account-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.account-section a {
    color: var(--action-color);
    overflow-wrap: anywhere;
}

.account-panel {
    overflow-wrap: anywhere;
}

.account-panel h1 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-top: 0;
}

.account-panel p,
.account-panel li {
    line-height: 1.6;
}

.account-panel label {
    display: block;
    margin-bottom: .55rem;
    color: var(--action-color);
    font-weight: 700;
}

.account-panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    width: 100%;
    padding: .85rem 1rem;
    border: 0;
    border-radius: 4px;
    background: var(--page-background);
    color: var(--text-primary);
    font: inherit;
}

.account-panel input[type="checkbox"],
.account-panel input[type="radio"] {
    accent-color: var(--action-color);
}

.account-field {
    margin-block: 1rem;
}

/* Keep each checkbox or radio beside its label, even when the label wraps. */
:where(p, div, li):has(> input:is([type="checkbox"], [type="radio"]) + label) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: .5rem;
}

:where(p, div, li) > input:is([type="checkbox"], [type="radio"]) + label {
    display: block;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    text-transform: none;
    letter-spacing: normal;
}

label:has(> input:is([type="checkbox"], [type="radio"])) {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

:where(p, div, li, label) > input:is([type="checkbox"], [type="radio"]) {
    width: auto;
    flex: none;
    padding: 0;
    margin: .3em 0 0;
}

:where(p, div, li):has(> input:is([type="checkbox"], [type="radio"]) + label) > :not(input, label) {
    grid-column: 1 / -1;
}

.account-panel .button {
    max-width: 100%;
    margin-block: 1.5rem;
    cursor: pointer;
}

.account-panel button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.account-section :focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.account-panel .errorlist {
    padding-inline-start: 1.5rem;
}

.site-messages {
    margin: 4rem 1rem 1rem;
    padding: 1rem 2rem;
    border: 0;
    border-radius: 4px;
}

/* Article surface roles are documented in the UI documentation. */
.standard-page {
    width: min(100%, 64rem);
    margin-inline: auto;
    padding: clamp(5rem, 8vw, 8rem) clamp(1rem, 4vw, 3rem) 4rem;
    overflow-wrap: anywhere;
}

/* Reference documents begin at the same viewport offset as the Dashboard. */
.reference-document-page {
    padding-top: clamp(2rem, 5vw, 4rem);
}

#translation-workspace,
#translation-catalog {
    padding-top: 2rem;
}

#glossary-format-example {
    margin-bottom: 1rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-header h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.12;
}

.article-body {
    padding: clamp(1.25rem, 4vw, 3rem);
    border-radius: 4px;
    background: var(--article-surface);
    color: var(--article-text);
    font-size: 1.0625rem;
    line-height: 1.75;
}

.article-body > :first-child { margin-top: 0; }
.article-body > :last-child { margin-bottom: 0; }
.article-body :is(h1, h2, h3, h4, h5, h6) {
    margin-block: 2rem 1rem;
    line-height: 1.3;
    color: var(--article-accent);
}
.article-body :is(ul, ol) { padding-inline-start: 1.5rem; }
.article-body li + li { margin-top: .4rem; }
.article-body a { color: var(--action-color); text-underline-offset: .2em; }
.article-body a:hover { text-decoration: none; }
.article-body blockquote {
    margin-inline: 0;
    padding-inline-start: 1.25rem;
}
.article-body img { max-width: 100%; height: auto; }
.article-body pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem;
    border-radius: 4px;
    background: var(--page-background);
    color: var(--text-primary);
}
.article-body code { font-size: .9em; overflow-wrap: anywhere; }
.article-body pre code { overflow-wrap: normal; }
.article-body table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.article-body table {
    margin-top: 1rem;
}

.article-body :is(th, td) {
    padding: .65rem 1rem;
    text-align: start;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
}
.article-body :is(th, td) * {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
}
.article-body th {
    color: var(--article-accent);
}
.standard-page :focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}
.reference-index {
    margin-top: 3rem;
    padding-top: 1.5rem;
}
.reference-index h2 { margin-top: 0; }
.reference-folder { margin-top: 1.5rem; }
.reference-folder :is(h3, h4, h5, h6) {
    margin-block: 0 .5rem;
    color: var(--content-accent);
}
.reference-folder .reference-folder { margin-inline-start: 1rem; }
.reference-index p { line-height: 1.7; }
.reference-index ul {
    display: grid;
    gap: .5rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}
.reference-index a {
    display: inline-block;
    padding-block: .5rem;
    color: var(--action-color);
    text-underline-offset: .25em;
    line-height: 1.5;
}
.reference-index a:hover { color: #71a6c3; text-decoration: none; }

.control-panel-card a {
    color: var(--action-color);
    text-underline-offset: .25em;
    overflow-wrap: anywhere;
}

.control-panel {
    padding-top: clamp(2rem, 5vw, 4rem);
}

.control-panel-intro {
    max-width: 42rem;
    margin-block: 1.25rem 1.5rem;
    line-height: 1.7;
}

.control-panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.control-panel-card {
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 0;
    border-radius: 4px;
    background: var(--surface-form);
}

.control-panel-tabs:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.control-panel-tabs .button {
    font-family: inherit;
    overflow-wrap: anywhere;
    max-width: 100%;
    cursor: pointer;
}

.control-panel-tabs .button[aria-selected="true"] {
    background: var(--action-color);
    color: var(--page-background);
}

.control-panel-card[role="tabpanel"]:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.control-panel-card h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.3;
}

.control-panel-card p {
    margin-block: 1rem;
    line-height: 1.7;
}

.control-panel-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.control-panel-card a {
    display: inline-block;
    padding-block: .65rem;
    line-height: 1.5;
}

.control-panel-card a:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.sidebar-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.sidebar-home:focus-visible {
    outline: 2px solid var(--navigation-accent);
    outline-offset: 3px;
}

.menu-button-panel {
    top: 4.75rem;
    color: var(--navigation-accent);
}

.menu-button-panel img {
    width: 2.25rem;
    height: 2.25rem;
}

.sidebar-home:is(:hover, :focus-visible) .sidebar-icon {
    content: url("../img/CN2_logomark-hover.ece9822c7d1b.svg");
}

.menu-button:is(:hover, :focus-visible) img {
    content: url("../img/login-hover.749860b01327.svg");
}

.menu-button-logout:is(:hover, :focus-visible) img {
    content: url("../img/logout-hover.128bffd9c9f2.svg");
}

.menu-button-panel:is(:hover, :focus-visible) img {
    content: url("../img/gear-hover.4c35b425cfbd.svg");
}

/* Markdown features adapted from KontextOS. */
.article-body { display: flow-root; }
.article-body .checklist-paragraph { display: flex; gap: .6rem; align-items: baseline; }
.article-body .component-inline-image--right { float: right; width: min(40%, 22rem); margin: 0 0 1rem 1rem; }
.article-body .component-inline-image--full-width { display: block; width: 100%; }
.article-body .markdown-math--display { display: block; overflow-x: auto; padding-block: .25rem; }
.article-body .markdown-math--display > .katex-display { width: max-content; min-width: 100%; }
.article-body .markdown-diagram { overflow-x: auto; margin-block: 1rem; }
.markdown-modal { max-width: min(42rem, 90vw); max-height: 85vh; overflow: auto; border: 0; border-radius: 4px; padding: 1.5rem; background: var(--article-surface); color: var(--article-text); }
.markdown-modal::backdrop { background: var(--page-background); opacity: .8; }
.article-body :is(.markdown-modal-link, [data-markdown-close]) { font: inherit; cursor: pointer; border: 0; border-radius: 4px; padding: .35rem .65rem; background: var(--article-surface); color: var(--article-link); }
.article-body :focus-visible { outline: 2px solid var(--article-link); outline-offset: 3px; }
@media (max-width: 640px) {
    .article-body .component-inline-image--right { float: none; display: block; width: 100%; margin: 1rem 0; }
}

/* Translation UI only */
.translation-editor {
    width: min(100% - 2.5rem, 100rem);
    margin: 0 auto;
    padding: 1.75rem 0 2rem;
}

#translation-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: start;
    padding: 0 1rem 1.4rem;
}

#translation-editor-title h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

#translation-editor-title p { margin: .35rem 0 0; color: var(--text-secondary); }

#translation-progress { width: min(100%, 14rem); flex: 0 0 14rem; color: var(--text-secondary); }
#translation-progress p { margin: .25rem 0 .55rem; text-align: end; }
#translation-progress progress { width: 100%; height: .65rem; accent-color: var(--action-color); }

#translation-editor-controls {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    padding: 1.25rem 1rem;
    /* background: var(--surface-overlay); */
}

#translation-filters, #translation-segment-navigation, #translation-segment-jump {
    display: flex;
    align-items: end;
    gap: .75rem;
    margin: 0;
}

#translation-filters .form-field { margin: 0; }
#translation-filters label, #translation-segment-jump label { display: block; margin-bottom: .4rem; color: var(--content-accent); }
#translation-search-field { width: min(28rem, 42vw); }
#translation-filters input, #translation-filters select, #translation-segment-number {
    width: 100%;
    min-height: 3rem;
    padding: .6rem .8rem;
    border: 0;
    border-radius: 4px;
    background: var(--surface-input);
    color: var(--text-primary);
    font: inherit;
}
#translation-status-field { min-width: 11rem; }
#translation-filters .language-switcher { width: 100%; min-height: 3rem; padding: .6rem .8rem; }
#translation-filters .button, #translation-segment-jump .button { min-height: 3rem; margin: 0; }
#translation-segment-navigation { align-items: center; }
#translation-segment-navigation > a { white-space: nowrap; }
#translation-segment-jump { align-items: center; }
#translation-segment-jump label { margin: 0; white-space: nowrap; }
#translation-segment-number { width: 5rem; }
#translation-bookmarks { margin: .85rem 1rem; }

#translation-entries {
    overflow-x: auto;
    border-radius: 4px;
    background: var(--surface-overlay);
}

#translation-entry-headings, .translation-entry {
    display: grid;
    grid-template-columns: 4.75rem minmax(18rem, 1fr) minmax(22rem, 1fr) minmax(14rem, .55fr);
    min-width: 62rem;
}

#translation-entry-headings {
    color: var(--content-accent);
    font-weight: 600;
}

#translation-entry-headings > span { padding: 1rem 1.35rem; }

.translation-entry {
    position: relative;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.translation-entry:target { background: color-mix(in srgb, var(--action-color) 12%, transparent); }

.translation-segment-header {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    margin: 0;
    padding: 1.3rem .5rem;
}
.translation-segment-heading { margin: 0; color: var(--text-primary); font-size: 1.15rem; }
.translation-bookmark { padding: 0; border: 0; background: none; color: var(--content-accent); font: 1.6rem/1 var(--font-family); cursor: pointer; }
.translation-bookmark[aria-pressed="true"] { color: var(--action-color); }
.translation-source-cell { grid-column: 2; padding: 1.3rem; color: var(--text-primary); white-space: pre-wrap; }
.translation-source-cell p { margin: 0; }

.translation-inline-form { display: contents; }
.translation-target-cell { grid-column: 3; padding: 1rem .75rem; }
.translation-target-cell label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.translation-target-field + .translation-target-field { margin-top: .5rem; }
.is-active .translation-target-field label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; display: block; }
.translation-target-cell textarea { min-height: 5.25rem; width: 100%; resize: vertical; }
.translation-status-cell { grid-column: 4; padding: 1.25rem; }
.translation-review-status { display: grid; justify-content: start; gap: .7rem; }
.translation-review-status label { justify-content: start; }
.translation-notes { grid-column: 3 / 5; padding: 0 1.25rem 1rem; }
.translation-notes textarea { width: 100%; }
.translation-entry-tools { grid-column: 2 / 5; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .8rem 1.3rem; background: rgb(0 0 0 / 8%); }
.translation-entry-tools .translation-metadata { margin: 0; }
.translation-entry-tools .translation-source, .translation-entry-tools .translation-entry-state { margin: 0; }
.translation-inline-form [data-autosave-status] { grid-column: 2 / 5; margin: .35rem 1.3rem .8rem; color: var(--content-accent); }

@media (max-width: 900px) {
    .translation-editor { width: min(100% - 1rem, 100rem); }
    #translation-editor-header, #translation-editor-controls { flex-direction: column; align-items: stretch; }
    #translation-progress { align-self: end; }
    #translation-filters { flex-wrap: wrap; }
    #translation-search-field { width: min(100%, 30rem); flex: 1 1 16rem; }
    #translation-segment-navigation { justify-content: space-between; }
}

@media (max-width: 640px) {
    .translation-editor { width: 100%; }
    #translation-editor-header { padding-inline: 1rem; }
    #translation-progress { width: 100%; flex-basis: auto; align-self: auto; }
    #translation-progress p { text-align: start; }
    #translation-editor-controls { padding-inline: 1rem; }
    #translation-filters, #translation-segment-navigation { align-items: stretch; flex-direction: column; }
    #translation-status-field { min-width: 0; }
    #translation-segment-jump { justify-content: space-between; }
}

[id^="id_inline_"][id$="_source"] {
    background: var(--content-accent-subtle);
    color: var(--text-muted);
}

.katex {
    font: var(--font-family) !important;  
}



/* Numbered segments remain distinct without component borders. */
.translation-entry {
    margin-block: 2rem;
    scroll-margin-block-start: 5rem;
}

.translation-entry:target {
    background: var(--surface-overlay);
}

.translation-entry:focus-visible {
    outline: 2px solid var(--action-color);
    outline-offset: 4px;
}

.translation-segment-heading {
    color: var(--content-accent);
    font-size: 1.1rem;
    margin-block: 0 1rem;
}

#translation-segment-navigation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-block: 1rem;
    padding: .75rem 1rem;
    border: 1px solid var(--content-accent);
    border-radius: 4px;
}

#translation-segment-jump {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0;
    margin-inline-start: auto;
}

#translation-segment-number {
    width: 6rem;
    max-width: 100%;
    padding: .4rem .6rem;
    border: 0;
    border-radius: 4px;
    background: var(--surface-overlay);
    color: var(--text-primary);
    font: inherit;
}

#translation-segment-number:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    #translation-segment-navigation-row {
        flex-direction: column;
        align-items: flex-start;
    }

    #translation-segment-jump {
        margin-inline-start: 0;
    }
}

.translation-segment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-block-end: 1rem;
}

.translation-segment-header .translation-segment-heading,
.translation-segment-header form {
    margin: 0;
}

.translation-segment-header .button[aria-pressed="true"] {
    background: var(--action-color);
    color: var(--page-background);
}

/* The translator defaults to its own sky-blue and white workspace theme. */
body.translator-light {
    color-scheme: light;
    --page-background: #e6f3fc;
    --page-gradient-center: #ffffff;
    --page-gradient-midpoint: #d8edfc;
    --surface-overlay: #ffffff;
    --surface-form: rgb(255 255 255 / 94%);
    --surface-input: #edf7fe;
    --content-accent: #315f7b;
    --content-accent-subtle: #e0f0fc;
    --text-primary: #173b54;
    --text-muted: #41657d;
    --text-secondary: #315f7b;
    --text-placeholder: #526e81;
    --action-color: #17628f;
    --link-hover: #10496d;
    --action-color-bright: #17628f;
    --navigation-accent: var(--action-color);
    --border-color: #81b1cb;
    --border-subtle: var(--border-color);
    --focus-ring: #17628f;
    --article-surface: #ffffff;
    --article-text: var(--text-primary);
    --article-accent: var(--content-accent);
    --article-link: var(--action-color);
    background-color: var(--page-background);
    background-position: center top;
    background-size: 100% 100vh, 100% auto;
    background-repeat: no-repeat;
}

.translator-light #translation-segment-navigation-row {
    border-color: var(--border-color);
}

.translator-light .standard-page,
.translator-light #translation-workspace,
.translator-light #translation-catalog {
    border-radius: 4px;
}

.translator-light .translation-entry {
    background: var(--surface-input);
}

.translator-light .translation-entry:target {
    background: var(--content-accent-subtle);
}

.translator-light .form-field .language-switcher,
.translator-light #translation-filters .language-switcher {
    color-scheme: light;
}

.translator-light .button-dark {
    background: var(--border-color);
    color: var(--content-accent);
}

.translator-light .button-dark:hover,
.translator-light .button-dark:focus-visible {
    background: var(--action-color);
    color: var(--surface-overlay);
}

.translator-light .button:hover,
.translator-light .button:focus-visible,
.translator-light #translation-tabs [aria-selected="true"],
.translator-light .translation-segment-header .button[aria-pressed="true"],
.translator-light .form-submit:hover,
.translator-light .form-submit:focus-visible {
    color: var(--surface-overlay);
}

.translator-light .sidebar-brand,
.translator-light .menu-button {
    --surface-overlay: var(--shell-navigation-surface);
    --navigation-accent: var(--shell-navigation-accent);
    background: var(--surface-overlay);
}

.translator-light .footer-wordmark-link {
    background: none;
}

.translator-light .footer-wordmark-link::before {
    content: "";
    grid-area: 1 / 1;
    width: 100%;
    aspect-ratio: 696 / 108;
    background-color: var(--action-color);
    -webkit-mask: url("../img/CN2_wordmark.ece6a3b18cad.svg") center / contain no-repeat;
    mask: url("../img/CN2_wordmark.ece6a3b18cad.svg") center / contain no-repeat;
}

.translator-light .footer-wordmark-link:is(:hover, :focus-visible, :active)::before {
    background-color: var(--border-color);
}

.translator-light input,
.translator-light progress {
    accent-color: var(--action-color);
}

.translator-light .footer-wordmark {
    visibility: hidden;
}

/* Theme control aligns with the shell tabs without a background. */
#translation-theme-toggle {
    top: 8.75rem;
    background: transparent;
}

#translation-theme-toggle[hidden],
#translation-theme-toggle .translation-theme-dark-icon,
.translator-light #translation-theme-toggle .translation-theme-light-icon {
    display: none;
}

.translator-light #translation-theme-toggle .translation-theme-dark-icon {
    display: block;
}

#translation-theme-toggle img {
    width: 2.25rem;
    height: 2.25rem;
}

#translation-theme-toggle:is(:hover, :focus-visible) .translation-theme-light-icon {
    content: url("../img/light-mode-hover.47a7236cee13.svg");
}

#translation-theme-toggle:is(:hover, :focus-visible) .translation-theme-dark-icon {
    content: url("../img/dark-mode-hover.b1c28bac0292.svg");
}

.translator-light #translation-upload,
.translator-light #translation-material-upload,
.translator-light #translation-manage,
.translator-light #translation-filters {
    background-color: var(--content-accent-subtle);
}

/* Compact rows expand when selected or reached by keyboard. */
#translation-entries .translation-entry { margin: 0; padding: 0; }
#translation-entries .translation-entry > .translation-segment-header,
#translation-entries .translation-source-cell,
#translation-entries .translation-target-cell,
#translation-entries .translation-status-cell { grid-row: 1; align-self: start; }
#translation-entries .translation-entry-tools { grid-row: 2; }
#translation-entries :is(.translation-notes, .translation-detail-panel) { grid-column: 2 / 5; grid-row: 3; padding: 0 1.3rem 1rem; }
#translation-entries .translation-notes textarea { display: block; width: 100%; border: 0; border-radius: 4px; padding: .75rem; background: var(--surface-input); color: var(--text-primary); font: inherit; }
#translation-entries .translation-notes textarea:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
#translation-entries .translation-note-audiences { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin: 1rem 0; padding: 0; border: 0; }
#translation-entries .translation-note-audiences legend { margin-bottom: .5rem; }
#translation-entries .translation-note-audiences label { display: inline-flex; align-items: center; gap: .5rem; }
#translation-entries .translation-detail-panel[hidden] { display: none; }
#translation-entries [data-autosave-status] { grid-row: 4; }
#translation-entries .translation-entry + .translation-entry { border-top: 1px solid var(--content-accent-subtle); }
#translation-entries .translation-entry:not(.is-active) :is(.translation-entry-tools, .translation-notes, .translation-detail-panel, .translation-bookmark) { display: none; }
#translation-entries [data-autosave-status]:empty { display: none; }
#translation-entries .translation-entry:not(.is-active) .translation-target-cell textarea { display: block; min-height: 0; height: 1.5em; padding-block: 0; resize: none; background: transparent; }
#translation-entries .translation-entry:not(.is-active) .translation-target-field + .translation-target-field { margin-top: 0; }
#translation-entries .translation-target-cell textarea { border: 0; border-radius: 4px; padding: .5rem; color: var(--text-primary); background: var(--surface-input); font: inherit; line-height: 1.5; }
#translation-entries .translation-bookmark { color: var(--action-color); font: inherit; }
#translation-entries .translation-entry.is-active { background: var(--content-accent-subtle); }
#translation-entries .translation-segment-header { flex-direction: column; margin: 0; }
#translation-entries .translation-target-cell textarea:focus-visible, #translation-entries .translation-bookmark:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.lucide-icon { display: inline-block; width: 1.2rem; height: 1.2rem; flex: none; background: currentColor; vertical-align: middle; mask: var(--icon) center / contain no-repeat; }
.icon-bookmark { --icon: url("../img/lucide/bookmark.5dc8b0cb5e85.svg"); }
.translation-bookmark[aria-pressed="true"] .icon-bookmark { --icon: url("../img/lucide/bookmark-filled.3595cdbf8209.svg"); }
.icon-sparkles { --icon: url("../img/lucide/sparkles.f5976fdfe68a.svg"); }
.icon-notes { --icon: url("../img/lucide/message-square.27df422f3a01.svg"); }
.icon-metadata { --icon: url("../img/lucide/file-text.1205d0faa556.svg"); }
.icon-saved { --icon: url("../img/lucide/circle-check.72ac0ac535c5.svg"); }
#translation-search-field { position: relative; }
#translation-search-field::after { content: ''; position: absolute; inset-inline-start: .75rem; bottom: .9rem; width: 1.2rem; height: 1.2rem; background: var(--content-accent); mask: url("../img/lucide/search.846c0f13c20b.svg") center / contain no-repeat; pointer-events: none; }
#translation-filters #translation-search { padding-inline-start: 2.5rem; }
.translation-entry-tools :is(button, summary) { display: inline-flex; align-items: center; gap: .5rem; }
.translation-tool { border: 0; background: transparent; color: var(--action-color); font: inherit; cursor: pointer; }
.translation-tool:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
#translation-entries .translation-entry-tools { background: transparent; color: var(--action-color); }
#translation-entries .translation-entry-tools :is(button, summary) { margin: 0; padding: .4rem; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; letter-spacing: normal; text-transform: none; cursor: pointer; }
#translation-entries .translation-entry-tools button { font-size: 1em !important; }
#translation-entries .translation-entry-tools .translation-metadata { color: inherit; font: inherit; }
#translation-entries .translation-entry-tools summary { list-style: none; }
#translation-entries .translation-entry-tools summary::-webkit-details-marker { display: none; }
#translation-entries .translation-entry-tools :is(button, summary):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
#translation-entries .translation-entry-tools button:disabled { opacity: .55; cursor: not-allowed; }
body:not(.translator-light) #translation-entries .translation-entry-tools button[aria-expanded="true"] { color: var(--text-primary); }
.translator-light #translation-entries .translation-entry-tools button[aria-expanded="true"] { color: #000; }
.translator-light #translation-entries .translation-entry-tools .translation-bookmark { color: var(--action-color); }
#translation-entries .translation-entry-tools .translation-entry-state { display: none; }
#translation-entries .translation-review-status { display: flex; align-items: center; gap: .65rem; }
#translation-entries .translation-status-display { display: inline-flex; align-items: center; gap: .65rem; }
#translation-entries .translation-status-display::before { content: ''; width: .65rem; height: .65rem; flex: none; border-radius: 50%; background: #ed6a70; }
#translation-entries .translation-status-display[data-status='review']::before { background: #f4bf4f; }
#translation-entries .translation-status-display[data-status='approved']::before { background: #60d394; }
#translation-entries .translation-review-status label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#translation-entries .translation-review-status select { min-width: 0; max-width: 100%; padding: .5rem; border: 0; border-radius: 4px; background: var(--surface-input); color: var(--text-primary); font: inherit; }
#translation-entries .translation-review-status select { color-scheme: dark; }
.translator-light #translation-entries .translation-review-status select { color-scheme: light; }
#translation-entries .translation-review-status option { background: var(--page-background); color: var(--text-primary); }
#translation-entries .translation-review-status select:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
#translation-entries .translation-entry-tools .translation-review-status select { background: transparent; color: inherit; }

#translation-editor-footer {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    padding: 1rem 2rem;
    background: var(--page-background);
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}
#translation-panel { padding-bottom: 5rem; }
#translation-footer-status { display: inline-flex; align-items: center; gap: .5rem; }
#translation-footer-saved-icon[hidden] { display: none; }
#translation-footer-saved-icon:not([hidden]) { color: #60d394; }
@media (max-width: 640px) {
    #translation-editor-footer { padding: .75rem 1rem; }
    #translation-panel { padding-bottom: 7rem; }
}
