:root {
    color: #172033;
    background: #f4f7fb;
    font-family: system-ui, sans-serif;
}

body {
    margin: 0;
}

.rich-text-editor {
    margin-bottom: 0.5rem;
}

.rich-text-editor .ql-toolbar,
.rich-text-editor .ql-container {
    border-color: var(--form-input-border-color, #ced4da);
}

.rich-text-editor .ql-editor {
    min-height: 8rem;
    background: var(--form-input-bg, #fff);
    color: var(--text-color, #212529);
    font-size: 1rem;
}

.rich-text-editor[data-rich-text-profile="full"] .ql-editor {
    min-height: 18rem;
}

.site-placeholder,
.login-shell {
    display: grid;
    min-height: 100vh;
    place-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.site-placeholder {
    text-align: center;
}

.site-placeholder nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.login-card {
    display: grid;
    width: min(26rem, calc(100vw - 4rem));
    gap: 0.75rem;
    padding: 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1rem 3rem rgb(23 32 51 / 12%);
}

input,
button {
    padding: 0.75rem;
    font: inherit;
}

button {
    color: white;
    background: #1346a8;
    border: 0;
    border-radius: 0.35rem;
    cursor: pointer;
}

.alert {
    padding: 0.75rem;
    color: #8b1020;
    background: #fff0f2;
}

/* Public page shells and block styling live in assets/styles/themes/<key>.css,
   loaded by the active theme's page template. */

.builder-shell {
    margin: 0 auto;
    max-width: 70rem;
    padding: 2rem;
}

.builder-section {
    margin-bottom: 2.5rem;
}

.builder-section__title {
    color: #2c4363;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    margin: 0 0 .9rem;
    text-transform: uppercase;
}

.builder-list {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0 0 0 1.5rem;
}

.builder-list--plain {
    list-style: none;
    padding-left: 0;
}

.builder-card {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: .6rem;
    box-shadow: 0 1px 2px rgb(23 32 51 / 5%);
    display: grid;
    gap: .85rem;
    padding: 1rem 1.15rem;
}

.builder-card--row {
    align-items: center;
    grid-auto-flow: column;
    justify-content: space-between;
}

.builder-card__head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.builder-card__name {
    font-size: 1rem;
    margin-right: .25rem;
}

.builder-card--disabled {
    background: #f7f9fc;
    opacity: .7;
}

.badge--notice {
    background: #fdf1dc;
    color: #7a5312;
}

.badge--muted {
    background: #e8ecf2;
    color: #5a6b80;
}

.empty-state {
    color: #5a6b80;
}

.media-card__meta,
.media-card__alt {
    color: #5a6b80;
    font-size: .85rem;
    margin: .25rem 0 0;
}

.media-card__alt {
    color: #172033;
}

.builder-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.builder-actions__divider {
    background: #dbe3ec;
    height: 1.4rem;
    width: 1px;
}

.builder-shell .builder-actions button.button--danger {
    border-color: #e2c3c8;
    color: #8b1020;
}

.builder-shell .builder-actions button.button--danger:hover {
    background: #fdf0f2;
}

.builder-actions form,
.inline-form {
    display: inline;
    margin: 0;
}

.flash--success {
    background: #eef5f3;
    border-left: .3rem solid #005c4b;
    padding: 1rem;
}

/* Page chrome */

.breadcrumb {
    color: #5a6b80;
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    gap: .5rem;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: inherit;
}

.page-head {
    align-items: baseline;
    border-bottom: 1px solid #dbe3ec;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
}

.page-head h1 {
    font-size: 1.6rem;
    letter-spacing: -.02em;
    margin: 0;
}

.page-head__lead {
    color: #5a6b80;
    flex-basis: 100%;
    font-size: .92rem;
    line-height: 1.6;
    margin: 0;
    max-width: 64ch;
}

.builder-card__pages {
    color: #5a6b80;
    font-size: .85rem;
    margin: .35rem 0 .75rem;
}

.builder-card__pages a {
    color: #2c4363;
}

.page-head__meta {
    align-items: center;
    color: #5a6b80;
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    gap: .75rem;
    margin: 0;
}

.page-head__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0;
}

.badge {
    background: #e6edf7;
    border-radius: 999px;
    color: #2c4363;
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .02em;
    padding: .25rem .6rem;
}

.callout {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-left: .25rem solid #5a6b80;
    border-radius: .5rem;
    margin-bottom: 1.75rem;
    padding: 1rem 1.25rem;
}

.callout--warning {
    background: #fff8e8;
    border-color: #e6d5ac;
    border-left-color: #b7791f;
}

.callout h2 {
    font-size: 1rem;
    margin: 0 0 .35rem;
}

.callout p {
    margin: 0 0 .75rem;
}

.callout form {
    margin: 0;
}

/* The block editor form */

.editor-card {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgb(23 32 51 / 6%);
    padding: 1.75rem;
}

.form-section {
    border: 0;
    border-top: 1px solid #e4eaf2;
    margin: 2rem 0 0;
    min-width: 0;
    padding: 1.5rem 0 0;
}

.form-section__legend {
    color: #2c4363;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    padding: 0;
    text-transform: uppercase;
}

.form-section__help {
    color: #5a6b80;
    font-size: .85rem;
    margin: -.25rem 0 1rem;
}

.form-field,
.form-check {
    margin-block: 1.1rem;
}

.form-field > label,
.form-check label {
    color: #172033;
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .35rem;
}

.form-field__help {
    color: #5a6b80;
    font-size: .82rem;
    margin: .4rem 0 0;
}

.form-errors {
    color: #8b1020;
    font-size: .85rem;
    list-style: none;
    margin: .4rem 0 0;
    padding: 0;
}

.form-check__control {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.form-check__control label {
    margin: 0;
}

.form-check input[type="checkbox"] {
    height: 1.05rem;
    margin: 0;
    width: 1.05rem;
}

.form-actions {
    background: #fff;
    border-top: 1px solid #e4eaf2;
    bottom: 0;
    margin: 2rem -1.75rem -1.75rem;
    padding: 1.25rem 1.75rem;
    position: sticky;
}

.builder-shell input[type="text"],
.builder-shell input[type="url"],
.builder-shell input[type="number"],
.builder-shell input[type="email"],
.builder-shell input[type="password"],
.builder-shell select,
.builder-shell textarea {
    background: #fff;
    border: 1px solid #c3cede;
    border-radius: .4rem;
    box-sizing: border-box;
    color: inherit;
    font: inherit;
    max-width: 48rem;
    padding: .55rem .7rem;
    width: 100%;
}

.builder-shell input:focus-visible,
.builder-shell select:focus-visible,
.builder-shell textarea:focus-visible {
    border-color: #2c6ecb;
    outline: 2px solid #b7cdf1;
    outline-offset: 0;
}

.builder-shell button,
.builder-shell .button {
    background: #1f3d63;
    border: 1px solid transparent;
    border-radius: .4rem;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 600;
    padding: .55rem 1rem;
    text-decoration: none;
}

.builder-shell button:hover,
.builder-shell .button:hover {
    background: #16304f;
}

.builder-shell .button--quiet,
.builder-shell .builder-actions button,
.builder-shell .inline-form button {
    background: #fff;
    border-color: #c3cede;
    color: #1f3d63;
    font-weight: 550;
}

.builder-shell .button--quiet:hover,
.builder-shell .builder-actions button:hover,
.builder-shell .inline-form button:hover {
    background: #eef3fa;
}

.builder-shell .form-actions button {
    padding-inline: 1.5rem;
}

/* One media slot per card, so twelve of them read as a grid rather than a wall. */
.media-slot-grid {
    display: grid;
    gap: .75rem 1rem;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.media-slot-grid > div {
    margin: 0;
    min-width: 0;
}

.media-slot-grid select {
    max-width: none;
}

.column-editor-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(var(--column-editor-count), minmax(0, 1fr));
}

.column-editor-grid--1 {
    --column-editor-count: 1;
}

.column-editor-grid--2 {
    --column-editor-count: 2;
}

.column-editor-grid--3 {
    --column-editor-count: 3;
}

.column-editor-grid--4 {
    --column-editor-count: 4;
}

.column-editor-grid > div {
    background: #fff;
    border: 1px solid #ccd5db;
    border-radius: .5rem;
    box-sizing: border-box;
    min-width: 0;
    padding: 1rem;
}

.column-editor-grid input[type="text"],
.column-editor-grid textarea {
    max-width: none;
}

@media (max-width: 64rem) {
    .column-editor-grid--3,
    .column-editor-grid--4 {
        --column-editor-count: 2;
    }
}

@media (max-width: 44rem) {
    .column-editor-grid {
        --column-editor-count: 1;
    }
}

.admin-heading-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.media-library {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.media-card {
    background: #fff;
    border: 1px solid #ccd5db;
    border-radius: .5rem;
    overflow: hidden;
}

.media-card > img {
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    width: 100%;
}

.media-card > div {
    padding: 0 1rem 1rem;
}

.media-card h2 {
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.media-form-preview {
    display: block;
    height: auto;
    max-height: 24rem;
    max-width: min(100%, 40rem);
    object-fit: contain;
}

.builder-shell textarea.trusted-code-editor {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    max-width: none;
    min-height: 20rem;
    tab-size: 4;
    white-space: pre;
}

/* Translation status — a page/locale matrix, scrollable rather than squeezed. */

.matrix-scroll {
    overflow-x: auto;
}

.matrix {
    border-collapse: collapse;
    min-width: 100%;
    width: max-content;
}

.matrix th,
.matrix td {
    border: 1px solid #dbe3ec;
    padding: .75rem .85rem;
    text-align: left;
    vertical-align: top;
}

.matrix thead th {
    background: #eef3f9;
    font-size: .78rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.matrix tbody th {
    background: #fff;
    max-width: 16rem;
    min-width: 12rem;
}

.matrix tbody th a {
    font-weight: 650;
}

.matrix__cell {
    background: #fff;
    max-width: 22rem;
    min-width: 14rem;
}

.matrix__cell--complete {
    background: #f2faf5;
}

.matrix__cell--problem {
    background: #fdf3f3;
}

.status-pill {
    border-radius: 999px;
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    margin: 0 0 .5rem;
    padding: .2rem .6rem;
    text-transform: uppercase;
}

.status-pill--complete {
    background: #d8f0e2;
    color: #14603a;
}

.status-pill--partial {
    background: #fdefd2;
    color: #7a4d06;
}

.status-pill--untranslated {
    background: #e6edf7;
    color: #2c4363;
}

.status-pill--problem {
    background: #f8d7da;
    color: #7d1f28;
}

.matrix__gaps {
    color: #4c5b6e;
    font-size: .82rem;
    line-height: 1.5;
    margin: 0;
    padding-left: 1.1rem;
}

.matrix__problem {
    color: #7d1f28;
    font-size: .82rem;
    margin: 0;
}

.matrix__actions {
    display: flex;
    flex-wrap: wrap;
    font-size: .8rem;
    gap: .75rem;
    margin: .65rem 0 0;
}

/* FAQ editor — fifteen pairs, kept compact so the used ones stay near the top. */

/* Radio and checkbox groups: one option per line, labels at their normal weight. */
.choice-list {
    display: grid;
    gap: .45rem;
    margin-top: .5rem;
}

.choice-list label {
    font-weight: 500;
    margin: 0;
}

.choice-list input[type="checkbox"],
.choice-list input[type="radio"] {
    height: 1.05rem;
    margin: 0;
    width: 1.05rem;
}

/* File library — no thumbnail to show, so the copyable link is the card's main affordance. */

.file-library {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
}

.file-card {
    background: #fff;
    border: 1px solid #ccd5db;
    border-radius: .5rem;
    display: grid;
    gap: .75rem;
    padding: 1rem;
}

.file-card__head {
    display: flex;
    gap: .75rem;
}

.file-card__type {
    align-self: start;
    text-transform: uppercase;
}

.file-card h2 {
    font-size: 1rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.file-card__meta {
    color: #5a6b80;
    font-size: .8rem;
    margin: .25rem 0 0;
    overflow-wrap: anywhere;
}

.file-card__link-label {
    color: #5a6b80;
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
}

.file-card__link-row {
    display: flex;
    gap: .5rem;
    margin-top: .25rem;
}

.builder-shell input.file-card__url {
    flex: 1 1 auto;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: .8rem;
    max-width: none;
    min-width: 0;
}
