:root {
    color-scheme: light;
    --admin-color-primary: #e34829;
    --admin-color-surface: #ffffff;
    --admin-color-surface-muted: #f4f6f9;
    --admin-color-border: #d8dee8;
    --admin-color-focus: #315fbc;
    --admin-color-text-muted: #6b778a;
    --admin-shadow-overlay: 0 1.25rem 3rem rgba(24, 34, 53, .22);
    --admin-radius: .65rem;
    --admin-spacing-xs: .5rem;
    --admin-spacing-sm: .75rem;
    --admin-spacing-md: 1rem;
    --admin-spacing-lg: 1.5rem;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #182235;
    background: #f4f6f9;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    background: #f4f6f9;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f4f6f9;
    color: #182235;
    line-height: 1.5;
}

.auth-shell {
    display: grid;
    place-content: center;
    min-height: 100vh;
    padding: 1.25rem;
}

.auth-brand {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin: 0 auto 1rem;
    color: #182235;
}

.auth-brand .brand-mark {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .65rem;
    background: #e34829;
    color: white;
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .06em;
}

.auth-brand strong,
.auth-brand small {
    display: block;
}

.auth-brand small {
    color: #6b778a;
    font-size: .72rem;
}

.auth-card {
    display: grid;
    width: min(28rem, calc(100vw - 2.5rem));
    gap: 1.25rem;
    padding: clamp(1.25rem, 4vw, 2rem);
}

.auth-card p {
    margin-bottom: 0;
    color: #6b778a;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.alert {
    padding: .75rem;
    border: 1px solid;
    border-radius: .5rem;
    font-size: .86rem;
}

.alert-error {
    border-color: #efb7aa;
    background: #fff8f6;
    color: #8f2e1a;
}

.alert-success {
    border-color: #a9d5bb;
    background: #eaf6ef;
    color: #247145;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: .35rem;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.15;
    letter-spacing: -.035em;
}

h2 {
    margin-bottom: .3rem;
    font-size: 1.08rem;
    line-height: 1.3;
}

.page-heading {
    display: flex;
    min-width: 0;
    max-width: 100%;
    gap: 1.5rem;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 1.6rem;
}

.page-heading > div {
    min-width: 0;
}

.page-heading p,
.section-title p {
    margin-bottom: 0;
    color: #6b778a;
}

.eyebrow {
    display: block;
    margin-bottom: .45rem;
    color: #d7472b;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.panel {
    min-width: 0;
    max-width: 100%;
    border: 1px solid #e1e6ed;
    border-radius: .75rem;
    background: white;
    box-shadow: 0 1px 2px rgba(16, 24, 39, .035);
}

.panel--default {
    padding: 1rem;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 2.55rem;
    padding: .6rem .95rem;
    border: 1px solid transparent;
    border-radius: .48rem;
    font-size: .86rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.button:disabled {
    cursor: wait;
    opacity: .62;
}

.button-primary {
    background: #e34829;
    color: white;
}

.button-primary:hover {
    background: #c83c21;
}

.button-secondary {
    border-color: #ccd4df;
    background: white;
    color: #243349;
}

.button-secondary:hover,
.button-ghost:hover {
    background: #f2f5f8;
}

.button-danger {
    background: #b42318;
    color: white;
}

.button-ghost {
    border-color: transparent;
    background: transparent;
    color: #526176;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    min-height: 9.3rem;
    padding: 1.1rem;
    border: 1px solid #e1e6ed;
    border-radius: .7rem;
    background: white;
    color: #253247;
    text-decoration: none;
}

.stat-card > span {
    color: #667489;
    font-size: .78rem;
    font-weight: 700;
}

.stat-card strong {
    margin: .45rem 0 auto;
    font-size: 2.1rem;
    line-height: 1;
}

.stat-card small {
    color: #8793a4;
    font-size: .72rem;
}

.stat-card-primary {
    border-color: #efb7aa;
    background: #fff8f6;
}

.stat-card-primary:hover {
    border-color: #e34829;
}

.getting-started {
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem;
}

.getting-started p {
    max-width: 46rem;
    margin-bottom: 0;
    color: #657286;
}

.filters {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(11rem, .4fr) auto;
    gap: .9rem;
    align-items: end;
    padding: 1rem;
    border-bottom: 1px solid #e7ebf0;
}

.filters-single {
    grid-template-columns: minmax(14rem, 1fr) auto;
}

.submission-filters {
    grid-template-columns: minmax(13rem, 1fr) repeat(3, minmax(10rem, .55fr)) auto;
}

.submission-unread > td:first-child {
    border-left: .25rem solid var(--color-primary, #125a9c);
}

.pagination,
.submission-summary,
.submission-statuses,
.submission-actions .actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.pagination {
    justify-content: space-between;
    padding: 1rem;
}

.submission-summary {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.submission-answers {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.submission-answer {
    display: grid;
    gap: .35rem;
    overflow-wrap: anywhere;
}

.submission-answer dt {
    font-weight: 700;
}

.submission-answer dd {
    margin: 0;
    white-space: pre-wrap;
}

.inbox-template-frame {
    width: 100%;
    min-height: 18rem;
    border: 0;
}

.submission-help,
.submission-empty {
    color: var(--color-text-muted, #657286);
}

.filters label,
.field {
    display: grid;
    gap: .38rem;
}

.filters label > span,
.field > span,
.field-label-row label {
    color: #3d4a5e;
    font-size: .78rem;
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd3de;
    border-radius: .45rem;
    background: white;
    color: #172135;
}

input,
select {
    min-height: 2.55rem;
    padding: .55rem .68rem;
}

textarea {
    min-height: 8rem;
    padding: .7rem;
    line-height: 1.55;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #4d6d96;
    outline: 3px solid rgba(55, 92, 139, .13);
}

.valid.modified:not([type=checkbox]) {
    border-color: #218739;
}

.invalid {
    border-color: #c62828;
}

.validation-message {
    color: #b42318;
    font-size: .76rem;
}

.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 58rem;
    border-collapse: collapse;
    font-size: .84rem;
}

.compact-table {
    min-width: 42rem;
}

th,
td {
    padding: .9rem 1rem;
    border-bottom: 1px solid #e7ebf0;
    text-align: left;
    vertical-align: middle;
}

th {
    color: #68758a;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

td strong,
td small {
    display: block;
}

td strong {
    max-width: 29rem;
    margin-bottom: .18rem;
}

td small {
    max-width: 29rem;
    overflow: hidden;
    color: #7b8799;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actions-column {
    width: 10rem;
}

.actions {
    white-space: nowrap;
}

.text-link {
    padding: 0;
    border: 0;
    background: none;
    color: #285f9c;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.text-link + .text-link {
    margin-left: .7rem;
}

.text-link.danger {
    color: #b42318;
}

.status-badge,
.featured-label {
    display: inline-flex;
    padding: .22rem .48rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 750;
}

.status-draft {
    background: #edf0f4;
    color: #536073;
}

.status-review {
    background: #fff0cd;
    color: #805800;
}

.status-published {
    background: #dcf5e2;
    color: #17652a;
}

.featured-label {
    margin-top: .35rem;
    background: #f1e8ff;
    color: #6c3ca1;
}

.delete-confirmation td {
    padding: .65rem 1rem;
    background: #fff7f5;
}

.delete-confirmation td > div {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    color: #7a271a;
}

.confirmation-actions {
    display: flex;
    gap: .4rem;
    flex-shrink: 0;
}

.loading-state,
.empty-state {
    padding: 3rem 1.25rem;
    color: #69768a;
    text-align: center;
}

.empty-state.compact {
    padding: 2.5rem 1rem;
}

.empty-state h1,
.empty-state h2 {
    color: #1a2638;
}

.empty-state .button {
    margin-top: .5rem;
}

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

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 1.25rem;
    align-items: start;
}

.repeater-heading,
.nested-editor-toolbar {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
}

.nested-editor {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e1e6ed;
    border-radius: .65rem;
    background: #f8fafc;
}

.nested-editor + .nested-editor {
    margin-top: 1rem;
}

.nested-editor-toolbar .confirmation-actions {
    justify-content: flex-end;
}

.danger-zone {
    border-color: #efb7aa;
}

.site-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24rem;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    align-items: start;
    min-height: 100vh;
}

.site-builder.is-sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr) 3.75rem;
}

.site-builder-toolbar {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
}

.builder-sidebar {
    position: sticky;
    top: 4.5rem;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    min-width: 0;
}

.builder-sidebar-shell {
    display: grid;
    align-content: start;
    gap: 1rem;
    height: calc(100vh - 4.5rem);
    overflow: auto;
    padding: .9rem;
    border-left: 1px solid #e1e6ed;
    background: white;
    box-shadow: 1px 0 2px rgba(16, 24, 39, .035);
}

.builder-canvas {
    display: grid;
    grid-column: 1;
    grid-row: 2;
    gap: 1.25rem;
    min-width: 0;
    padding: 2rem;
}

.builder-sidebar-header {
    display: flex;
    min-height: 2.1rem;
    gap: .75rem;
    justify-content: space-between;
    align-items: center;
}

.builder-sidebar-header strong {
    font-size: .82rem;
}

.site-builder.is-sidebar-collapsed .builder-sidebar-shell {
    justify-items: center;
    padding: .65rem;
}

.builder-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
    padding: .25rem;
    border: 1px solid #e1e6ed;
    border-radius: .55rem;
    background: #f4f6f9;
}

.builder-tab {
    min-height: 2.25rem;
    padding: .45rem .55rem;
    border: 0;
    border-radius: .4rem;
    background: transparent;
    color: #526176;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.builder-tab.is-active {
    background: white;
    color: #172135;
    box-shadow: 0 1px 2px rgba(16, 24, 39, .06);
}

.builder-tab-panel {
    display: grid;
    gap: 1rem;
}

.properties-title {
    margin-top: .45rem;
}


.builder-workspace {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.builder-section-list {
    display: grid;
    gap: 0;
}

.builder-section-boundary {
    position: relative;
    z-index: 6;
    min-height: 1rem;
}

.builder-section-insert {
    display: block;
    width: fit-content;
    margin: 0 auto;
    border: 1px dashed var(--color-border, #ccd3dd);
    border-radius: var(--radius-sm, .35rem);
    background: var(--color-surface, #fff);
    color: var(--color-text-muted, #5e6b7c);
    opacity: .45;
}

.builder-section-insert:hover,
.builder-section-insert:focus-visible {
    opacity: 1;
}

.builder-page-section {
    position: relative;
    outline: 1px solid transparent;
}

.builder-page-section.is-selected {
    outline: 3px solid rgba(36, 91, 159, .85);
    outline-offset: -3px;
}

.builder-page-section-toolbar {
    position: absolute;
    z-index: 20;
    display: flex;
    gap: .25rem;
    border-radius: var(--radius-sm, .35rem);
    background: var(--color-surface, #fff);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(16, 24, 39, .16));
}

.builder-page-section-toolbar {
    top: 0;
    left: -1.2em;
    padding: 0.1rem;
    flex-direction: column;
    background-color: rgba(36, 91, 159, .85);
    border-radius: 0;
    display: none;
}

.builder-page-section.is-selected .builder-page-section-toolbar {
    display: flex;
}

.builder-content-block-list {
    min-width: 0;
}

.builder-content-block {
    position: relative;
    min-width: 0;
    outline: 1px solid transparent;
}

.builder-content-block.is-selected {
    outline: 1px solid rgba(227, 72, 41, .58);
    outline-offset: 2px;
    background: rgba(227, 72, 41, .018);
}

.builder-page-section-toolbar .icon-button {
    font-size: 1em;
    border: 0 none transparent;
    border-radius: 0;
    background: transparent;
    padding: 0;
    color: #fefefe;
    width: auto;
    height: auto;
    font-weight: normal;
}

.builder-page-section-toolbar .icon-button:hover:not(:disabled) {
    background: #f2f5f8;
    color: #1b293d;
}

.field-readonly {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    border: 1px solid #d9e0e9;
    border-radius: .45rem;
    background: #f4f6f9;
    padding: .65rem .75rem;
    color: #526176;
}

.inline-text-value,
.inline-text-editor {
    display: inline-block;
    width: 100%;
    min-width: 2ch;
    border: 1px solid transparent;
    border-radius: .25rem;
    background: transparent;
    color: inherit;
    padding: .08em .16em;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    white-space: pre-wrap;
}

.inline-text-value {
    cursor: text;
}

.inline-text-value:hover,
.inline-text-value:focus-visible {
    border-color: rgba(36, 91, 159, .45);
    outline: none;
    box-shadow: 0 0 0 3px rgba(36, 91, 159, .12);
}

.inline-text-value.is-empty {
    color: #748196;
    font-style: italic;
}

.inline-text-editor.is-active {
    border-color: #245b9f;
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(36, 91, 159, .16);
}

textarea.inline-text-editor {
    min-height: 5rem;
    resize: vertical;
}

.preview-action {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    border-radius: var(--sbh-radius, .375rem);
    background: var(--sbh-brand, #e31e24);
    color: white;
    padding: .45rem .75rem;
    font-weight: 750;
}

.preview-action .inline-text-value,
.preview-action .inline-text-editor {
    color: inherit;
}

.inspector-note {
    margin: 0;
    border-radius: .45rem;
    background: #eef4fb;
    color: #40536c;
    padding: .7rem .8rem;
    font-size: .78rem;
    line-height: 1.5;
}

.page-editor-toolbar {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1rem;
    min-height: 4.5rem;
    border: 0;
    border-bottom: 1px solid #dfe5ed;
    border-radius: 0;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 .2rem .8rem rgba(16, 24, 39, .06);
    backdrop-filter: blur(12px);
}

.page-editor-toolbar__identity,
.page-editor-toolbar__actions {
    display: flex;
    min-width: 0;
    gap: .75rem;
    align-items: center;
}

.page-editor-toolbar__identity {
    flex: 1 1 15rem;
}

.page-editor-toolbar__actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.canvas-viewport-switcher {
    display: inline-flex;
    gap: .2rem;
    border: 1px solid #dfe5ed;
    border-radius: .45rem;
    background: #f4f6f9;
    padding: .2rem;
}

.canvas-viewport-switcher button {
    min-width: 2.4rem;
    min-height: 2.4rem;
    border: 0;
    border-radius: .32rem;
    background: transparent;
    color: #526176;
    font-size: 1.05rem;
    cursor: pointer;
}

.canvas-viewport-switcher button.is-active,
.canvas-viewport-switcher button:focus-visible {
    outline: none;
    background: white;
    color: #172135;
    box-shadow: 0 1px 3px rgba(16, 24, 39, .14);
}

.builder-workspace.canvas-viewport--desktop {
    width: 100%;
}

.builder-workspace.canvas-viewport--tablet {
    width: min(100%, 64rem);
    margin-inline: auto;
}

.builder-workspace.canvas-viewport--mobile {
    width: min(100%, 30rem);
    margin-inline: auto;
}

.builder-workspace {
    transition: width 180ms ease;
    border-radius: 0;
}

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

.page-editor-toolbar__identity > div {
    display: grid;
    min-width: 0;
}

.page-editor-toolbar__identity strong,
.page-editor-toolbar__identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-editor-toolbar__identity .back-link {
    margin: 0;
}

.page-editor-toolbar small {
    color: #748196;
}

.editor-dirty-status {
    border-radius: 999px;
    background: #eaf6ef;
    padding: .35rem .65rem;
    color: #247145;
    font-size: .72rem;
    font-weight: 850;
}

.editor-dirty-status.is-dirty {
    background: #fff0db;
    color: #925612;
}

.builder-preview {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.preview-page-header,
.preview-rich-text,
.preview-card-grid,
.preview-embed,
.preview-cta {
    padding: 1rem;
}

.preview-page-header {
    background: #172135;
    color: white;
}

.preview-page-header h2,
.preview-image-text h3,
.preview-card-grid h3,
.preview-cta h3,
.preview-rich-text p {
    margin-bottom: .35rem;
}

.preview-rich-text p:last-child,
.preview-image-text p,
.preview-card-grid p,
.preview-cta p {
    margin-bottom: 0;
}

.preview-image-text {
    display: grid;
    grid-template-columns: minmax(6rem, .34fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
}

.preview-image-slot {
    display: grid;
    place-items: center;
    min-height: 6rem;
    border-radius: .45rem;
    background: #edf1f6;
    color: #778499;
    font-size: .78rem;
    font-weight: 750;
}

.preview-image-slot img {
    width: 100%;
    height: 6rem;
    border-radius: .45rem;
    object-fit: cover;
}

.preview-card-grid {
    background: #f7f9fc;
}

.preview-embed {
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    align-items: center;
    border-left: .28rem solid #4d6d96;
}

.preview-embed span {
    color: #6b778a;
    font-size: .76rem;
    font-weight: 750;
}

.preview-cta {
    display: grid;
    gap: .6rem;
    background: #fff8f6;
}

.preview-cta span {
    justify-self: start;
    padding: .45rem .65rem;
    border-radius: .4rem;
    background: #e34829;
    color: white;
    font-size: .76rem;
    font-weight: 800;
}

.nested-title {
    padding-bottom: .55rem;
}

.code-editor {
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
    font-size: .82rem;
}

.html-content-preview {
    max-height: 30rem;
    overflow: auto;
    padding: 1rem;
    border: 1px solid #e1e6ed;
    border-radius: .5rem;
    background: #fbfcfe;
    font-size: .86rem;
}

.html-content-preview *:last-child {
    margin-bottom: 0;
}

.editor-main,
.editor-sidebar {
    display: grid;
    gap: 1.25rem;
}

.editor-sidebar {
    position: sticky;
    top: 1.25rem;
}

.form-section {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.section-title {
    padding-bottom: .8rem;
    border-bottom: 1px solid #edf0f4;
}

.section-title-row {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.section-title p {
    font-size: .8rem;
}

.field small {
    color: #7b8798;
    font-size: .72rem;
}

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

.inline-action {
    padding: 0;
    border: 0;
    background: none;
    color: #285f9c;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
}

.checkbox-field {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    color: #344156;
    font-size: .8rem;
}

.checkbox-field input {
    width: 1rem;
    min-height: 1rem;
    margin-top: .12rem;
}

.editor-actions {
    display: grid;
    gap: .4rem;
}

.nested-editor {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e3e8ef;
    border-radius: .55rem;
    background: #fbfcfe;
}

.nested-editor + .nested-editor {
    margin-top: .85rem;
}

.nested-editor-compact {
    background: white;
}

.nested-editor-header {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.two-column-fields,
.three-column-fields {
    display: grid;
    gap: .85rem;
}

.two-column-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faq-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 1.25rem;
    align-items: start;
}

.faq-editor-main {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.faq-editor-actions {
    position: sticky;
    top: 1.25rem;
}

.faq-items-heading {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: end;
    padding: .25rem 0;
}

.faq-items-heading h2,
.faq-items-heading p {
    margin-bottom: 0;
}

.faq-items-heading p {
    color: #768397;
    font-size: .78rem;
}

.faq-item-editor {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
}

.menu-item-editor {
    display: grid;
    gap: 1rem;
    margin-left: min(calc(var(--menu-depth) * 1.5rem), 6rem);
    padding: 1.1rem;
    border-left: .2rem solid #dbe3ec;
}

.menu-item-title {
    display: grid;
    gap: .08rem;
}

.menu-item-title small {
    color: #7b8798;
    font-size: .68rem;
    font-weight: 600;
}

.provider-badges {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

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

.preview-heading {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.preview-heading h2,
.preview-heading p {
    margin-bottom: 0;
}

.map-preview {
    display: grid;
    gap: .55rem;
}

.map-preview > strong {
    color: #3d4a5e;
    font-size: .78rem;
}

.map-preview iframe {
    width: 100%;
    min-height: 22rem;
    border: 1px solid #d7dee7;
    border-radius: .55rem;
}

.comparison-editor-section {
    min-width: 0;
    overflow: hidden;
}

.comparison-editor-heading {
    padding: 1.1rem;
    border-bottom: 1px solid #edf0f4;
}

.comparison-product-editor {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
    border-bottom: 1px solid #edf0f4;
}

.comparison-product-editor:last-child {
    border-bottom: 0;
}

.comparison-groups-editor {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.comparison-group-editor {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
}

.comparison-feature-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: .3rem;
    color: #667489;
    font-size: .78rem;
    font-weight: 700;
}

.comparison-feature-editor {
    display: grid;
    min-width: 0;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e1e6ed;
    border-radius: .55rem;
    background: #f9fafc;
}

.comparison-feature-editor textarea {
    min-height: 4.5rem;
}

.comparison-matrix-scroll {
    border: 1px solid #e1e6ed;
    border-radius: .45rem;
    background: white;
}

.comparison-value-table {
    min-width: 36rem;
    table-layout: fixed;
}

.comparison-value-table th,
.comparison-value-table td {
    min-width: 11rem;
    padding: .65rem;
    vertical-align: top;
}

.comparison-value-table select + input {
    margin-top: .45rem;
}

.vacancy-list-editor {
    min-width: 0;
    overflow: hidden;
}

.vacancy-list-editor > .faq-items-heading {
    padding: 1.1rem;
    border-bottom: 1px solid #edf0f4;
}

.vacancy-text-item {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
    border-bottom: 1px solid #edf0f4;
}

.vacancy-text-item:last-child {
    border-bottom: 0;
}

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

.ordering-actions {
    display: flex;
    gap: .3rem;
}

.faq-item-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: .65rem;
    border-bottom: 1px solid #edf0f4;
}

.faq-item-toolbar > span {
    display: flex;
    gap: .3rem;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #d5dce5;
    border-radius: .38rem;
    background: white;
    color: #314058;
    font-weight: 800;
    cursor: pointer;
}

.icon-button:hover:not(:disabled) {
    background: #f2f5f8;
}

.icon-button:disabled {
    cursor: default;
    opacity: .35;
}

.icon-button.danger {
    color: #b42318;
}

.alert {
    margin-bottom: 1rem;
    padding: .8rem 1rem;
    border-radius: .5rem;
    font-size: .84rem;
}

.alert-error {
    border: 1px solid #f2b8b2;
    background: #fff4f2;
    color: #8f2017;
}

.alert-success {
    border: 1px solid #a9ddb4;
    background: #effbf2;
    color: #17652a;
}

.alert ul {
    margin: .55rem 0 0;
    padding-left: 1.2rem;
}

.media-upload-panel {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1.25rem;
}

.media-upload-grid {
    display: grid;
    grid-template-columns: minmax(12rem, .4fr) minmax(16rem, 1fr);
    gap: 1rem;
}

.media-upload-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.selected-files {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}

.selected-files span {
    padding: .3rem .55rem;
    border-radius: .35rem;
    background: #edf1f6;
    color: #536073;
    font-size: .72rem;
}

.media-filters {
    grid-template-columns: minmax(14rem, 1fr) minmax(12rem, .35fr) auto;
}

.media-table {
    min-width: 72rem;
}

.media-asset-name {
    display: flex;
    gap: .7rem;
    align-items: center;
}

.media-asset-name img,
.media-file-icon {
    width: 3.25rem;
    height: 3.25rem;
    flex: 0 0 3.25rem;
    border: 1px solid #dce2e9;
    border-radius: .4rem;
    background: #f4f6f9;
}

.media-asset-name img {
    object-fit: cover;
}

.media-file-icon {
    display: grid;
    place-items: center;
    color: #617087;
    font-size: .62rem;
    font-weight: 850;
}

.media-table code {
    color: #3d4a5e;
    font-size: .75rem;
    overflow-wrap: anywhere;
}

.back-link {
    display: inline-block;
    margin-bottom: .75rem;
    color: #526b8b;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
}

h1:focus {
    outline: none;
}

#blazor-error-ui {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 1000;
    display: none;
    padding: .8rem 1rem;
    border-radius: .5rem;
    background: #9e2a20;
    color: white;
    box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .2);
}

#blazor-error-ui a {
    color: white;
    font-weight: 700;
}

#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
}

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

    .editor-grid,
    .site-builder {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-builder.is-sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-builder {
        width: 100%;
        min-height: 0;
        margin: 0;
        gap: 0;
    }

    .page-editor-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .page-editor-toolbar__identity,
    .page-editor-toolbar__actions {
        flex-basis: 100%;
    }

    .page-editor-toolbar__actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .editor-sidebar,
    .faq-editor-actions {
        position: static;
    }

    .builder-sidebar {
        position: fixed;
        top: auto;
        right: 1rem;
        bottom: 1rem;
        z-index: 50;
        width: min(24rem, calc(100vw - 2rem));
        max-height: min(70vh, 44rem);
    }

    .site-builder.is-sidebar-collapsed .builder-sidebar {
        width: 3.75rem;
    }

    .builder-sidebar-shell {
        height: auto;
        max-height: min(70vh, 44rem);
        border: 1px solid #e1e6ed;
        border-radius: .75rem;
    }

    .builder-canvas {
        grid-column: 1;
        grid-row: 2;
        padding: 1.25rem;
    }

    .faq-editor-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    body {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .page-heading,
    .getting-started,
    .delete-confirmation td > div {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading {
        display: flex;
    }

    .repeater-heading,
    .nested-editor-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .nested-editor-toolbar .confirmation-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .submission-summary,
    .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .faq-items-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .form-columns {
        grid-template-columns: 1fr;
    }

    .preview-image-text {
        grid-template-columns: 1fr;
    }

    .menu-item-editor {
        margin-left: min(calc(var(--menu-depth) * .55rem), 1.65rem);
    }

    .coordinate-grid {
        grid-template-columns: 1fr;
    }

    .media-upload-grid,
    .media-filters {
        grid-template-columns: 1fr;
    }

    .media-upload-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .preview-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .confirmation-actions {
        flex-wrap: wrap;
    }

    .page-editor-toolbar,
    .page-editor-toolbar__actions {
        align-items: stretch;
        flex-direction: column;
    }
}
