/* =========================================================
   DGE Content Studio — admin styles
   ========================================================= */

:root {
    --ink: #0b0d12;
    --ink-2: #161a24;
    --primary: #4f46e5;
    --accent: #c8f751;
    --surface: #f5f3ee;

    /* Sidebar paint, rebased on the saved branding colours at render time. */
    --sidebar-bg: #0b0d12;
    --sidebar-bg-deep: #090b0f;
    --sidebar-fg: rgba(255, 255, 255, 0.72);
    --sidebar-fg-strong: #ffffff;
    --sidebar-fg-faint: rgba(255, 255, 255, 0.34);
    --sidebar-line: rgba(255, 255, 255, 0.12);
    --sidebar-hover: rgba(255, 255, 255, 0.07);
    --sidebar-hover-strong: rgba(255, 255, 255, 0.13);
    --sidebar-accent: #c8f751;
    --sidebar-accent-contrast: #0b0d12;
    --sidebar-accent-deep: #87b52a;
    --sidebar-primary: #4f46e5;
    --sidebar-primary-contrast: #ffffff;
    --sidebar-primary-deep: #241d6b;
    --sidebar-primary-glow: rgba(79, 70, 229, 0.45);
    --paper: #ffffff;
    --muted: #6b7080;
    --line: #e2e4e9;
    --line-strong: #cfd3db;
    --danger: #d64545;
    --success: #2e9e63;
    --display: "Space Grotesk", "Inter", system-ui, sans-serif;
    --body: "Inter", system-ui, -apple-system, sans-serif;
    --serif: "Instrument Serif", Georgia, serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--body);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
    margin: 0;
}

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

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---------- shared controls ---------- */

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-family: var(--display);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
    white-space: nowrap;
}

.admin-btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.admin-btn--primary {
    background: var(--ink);
    color: #fff;
}

.admin-btn--primary:hover {
    background: var(--primary);
}

.admin-btn--ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.admin-btn--ghost:hover {
    border-color: var(--line-strong);
    background: #fafbfc;
}

.admin-btn--xs {
    padding: 7px 11px;
    font-size: 11.5px;
    border-radius: 7px;
}

.input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    font-size: 13.5px;
    line-height: 1.5;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input:hover {
    border-color: var(--line-strong);
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.input--area {
    min-height: 104px;
    resize: vertical;
}

.input--compact {
    padding: 8px 10px;
    font-size: 13px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field__label {
    font-family: var(--display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #3b4050;
}

.field__hint {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--muted);
}

/* ---------- login ---------- */

.login-page {
    background: var(--surface);
}

.login {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    min-height: 100vh;
}

.login__aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(32px, 5vw, 56px);
    background:
        radial-gradient(ellipse 60% 50% at 80% 20%, var(--sidebar-primary-glow), transparent 70%),
        linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-deep));
    color: var(--sidebar-fg-strong);
    overflow: hidden;
}

.login__aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--sidebar-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--sidebar-line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
    pointer-events: none;
}

.login__brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
}

.admin-brand__mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--sidebar-accent), var(--sidebar-accent-deep));
    color: var(--sidebar-accent-contrast);
    font-family: var(--display);
    font-size: 15px;
    font-weight: 700;
}

.admin-brand__img {
    display: block;
    flex: none;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.login__brand strong {
    display: block;
    font-family: var(--display);
    font-size: 15px;
    font-weight: 600;
}

.login__brand small {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sidebar-fg-faint);
}

.login__pitch {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.login__eyebrow {
    font-family: var(--display);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
}

.login__aside .login__eyebrow {
    color: var(--sidebar-accent);
}

.login__pitch h1 {
    margin-top: 18px;
    font-family: var(--display);
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.login__pitch h1 em {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    color: var(--sidebar-accent);
}

.login__pitch p {
    max-width: 380px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--sidebar-fg);
}

.login__foot {
    position: relative;
    z-index: 1;
    font-size: 11px;
    color: var(--sidebar-fg-faint);
}

.login__main {
    display: grid;
    place-items: center;
    padding: 40px 24px;
    background:
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(79, 70, 229, 0.06), transparent 70%),
        var(--surface);
}

.login__card {
    width: min(420px, 100%);
}

.login__card h2 {
    margin-top: 10px;
    font-family: var(--display);
    font-size: clamp(26px, 3vw, 32px);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.login__sub {
    margin-top: 8px;
    margin-bottom: 26px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.login__form {
    display: grid;
    gap: 16px;
}

.login__submit {
    margin-top: 6px;
    width: 100%;
    padding-block: 13px;
}

.login__back {
    display: inline-block;
    margin-top: 24px;
    font-size: 12px;
    color: var(--muted);
}

.login__back:hover {
    color: var(--ink);
}

.alert {
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid rgba(214, 69, 69, 0.25);
    border-radius: 9px;
    background: rgba(214, 69, 69, 0.07);
    color: #9c2f2f;
    font-size: 12.5px;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
}

.checkline input {
    width: 15px;
    height: 15px;
    accent-color: var(--ink);
}

/* ---------- admin shell ---------- */

.admin-page {
    background: #f1f2f5;
}

.admin {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 22px 16px 16px;
    background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-deep));
    color: var(--sidebar-fg);
    overflow-y: auto;
    z-index: 20;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 2px 8px 20px;
    border-bottom: 1px solid var(--sidebar-line);
    margin-bottom: 18px;
}

.admin-brand__text strong {
    display: block;
    font-family: var(--display);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--sidebar-fg-strong);
}

.admin-brand__text small {
    display: block;
    margin-top: 2px;
    font-size: 8.5px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sidebar-fg-faint);
}

.admin-sidebar__label {
    padding: 8px 10px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sidebar-fg-faint);
}

.admin-nav {
    display: grid;
    gap: 2px;
    margin-bottom: 14px;
}

.admin-nav__item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--sidebar-fg);
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav__item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-fg-strong);
}

.admin-nav__item.is-active {
    background: var(--sidebar-accent);
    color: var(--sidebar-accent-contrast);
    font-weight: 600;
}

.admin-nav__icon {
    width: 18px;
    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;
    opacity: 0.5;
}

.admin-nav__item.is-active .admin-nav__icon {
    opacity: 0.7;
}

.admin-nav__item--danger:hover {
    background: rgba(214, 69, 69, 0.16);
    color: #ffb4b4;
}

.admin-sidebar__foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--sidebar-line);
}

.admin-sidebar__view {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 8px;
    background: var(--sidebar-hover);
    font-size: 11.5px;
    color: var(--sidebar-fg);
}

.admin-sidebar__view:hover {
    background: var(--sidebar-hover-strong);
    color: var(--sidebar-fg-strong);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 0 6px;
}

.admin-user__avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--sidebar-primary), var(--sidebar-primary-deep));
    color: var(--sidebar-primary-contrast);
    font-family: var(--display);
    font-size: 11px;
    font-weight: 600;
}

.admin-user__meta {
    min-width: 0;
    flex: 1;
}

.admin-user__meta strong {
    display: block;
    overflow: hidden;
    font-size: 11px;
    font-weight: 600;
    color: var(--sidebar-fg-strong);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user__meta small {
    display: block;
    overflow: hidden;
    margin-top: 1px;
    font-size: 9.5px;
    color: var(--sidebar-fg-faint);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user form {
    flex: none;
}

.admin-user__logout {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--sidebar-line);
    border-radius: 7px;
    background: transparent;
    color: var(--sidebar-fg-faint);
    font-size: 13px;
    cursor: pointer;
}

.admin-user__logout:hover {
    color: var(--sidebar-fg-strong);
    border-color: var(--sidebar-fg-faint);
}

.admin-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 13px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
}

.admin-menu-btn {
    display: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    cursor: pointer;
}

.admin-topbar__title {
    min-width: 0;
}

.admin-topbar__title strong {
    display: block;
    font-family: var(--display);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.admin-topbar__title span {
    display: block;
    margin-top: 1px;
    font-size: 10.5px;
    color: var(--muted);
}

.admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* The published visibility state, so maintenance mode is never a surprise. */
.site-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
}

.site-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

.site-status.is-offline {
    border-color: rgba(180, 122, 18, 0.35);
    background: rgba(212, 160, 23, 0.12);
    color: #8a5a00;
}

.site-status.is-offline::before {
    background: #c1871c;
}

.save-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-right: 4px;
    font-size: 11px;
    color: var(--success);
}

.save-state::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.save-state.is-dirty {
    color: #b47a12;
}

.admin-body {
    width: 100%;
    max-width: 980px;
    margin-inline: auto;
    padding: 30px 28px 80px;
}

/* ---------- editor ---------- */

.editor__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.editor__eyebrow {
    font-family: var(--display);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
}

.editor__head h1 {
    margin-top: 7px;
    font-family: var(--display);
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 600;
    letter-spacing: -0.035em;
}

.editor__desc {
    max-width: 560px;
    margin-top: 7px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--muted);
}

.editor__badge {
    flex: none;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(11, 13, 18, 0.03);
}

.fields > .field,
.fields > .group {
    grid-column: 1 / -1;
}

.field {
    padding: 0;
}

.field--array {
    padding: 6px 0;
}

.field:has(textarea) {
    grid-column: 1 / -1;
}

.group {
    margin: 4px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafbfc;
}

.group__title {
    padding: 0 6px;
    font-family: var(--display);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #3b4050;
}

.group__body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.group__body > .field,
.group__body > .group {
    grid-column: 1 / -1;
}

.group .group {
    background: #fff;
}

/* ---------- live brand preview ---------- */

.brand-preview {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(11, 13, 18, 0.03);
}

.brand-preview__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.brand-preview__eyebrow {
    font-family: var(--display);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
}

.brand-preview__title {
    margin-top: 4px;
    font-family: var(--display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-preview__state {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef7f1;
    color: #22794b;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.brand-preview__state::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.brand-preview__state.is-dirty {
    background: #fff4e5;
    color: #9a5b00;
}

.brand-preview__canvas {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(190px, 1fr);
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #f4f5f8;
}

.bp-site {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.bp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 10px 16px;
    border-radius: 10px;
    box-shadow: 0 10px 24px -18px rgba(11, 13, 18, 0.55);
}

.bp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 64%;
}

.bp-logo {
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.bp-logo-error {
    font-size: 10px;
    font-weight: 600;
    color: #b42318;
}

.bp-mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-family: var(--display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.bp-brand__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.1;
}

.bp-brand__name {
    font-family: var(--display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.bp-brand__sub {
    margin-top: 2px;
    font-family: var(--display);
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.55;
}

.bp-nav {
    display: flex;
    gap: 12px;
    font-size: 9.5px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.7;
}

.bp-cta {
    flex: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.bp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 14px 16px;
    border-radius: 10px;
    color: #fff;
}

.bp-footer .bp-brand {
    max-width: 58%;
}

.bp-footer__meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: right;
    font-size: 8.5px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.55);
}

.bp-side {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.bp-label {
    font-family: var(--display);
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.bp-label:not(:first-child) {
    margin-top: 6px;
}

.bp-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(11, 13, 18, 0.04);
}

.bp-tab__dots {
    display: inline-flex;
    gap: 3px;
    margin-right: 2px;
}

.bp-tab__dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d7dae1;
}

.bp-tab__icon {
    flex: none;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: contain;
}

.bp-tab__icon--mark {
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-size: 7px;
    font-weight: 700;
}

.bp-tab__title {
    flex: 1;
    overflow: hidden;
    font-size: 9px;
    color: #4a4f5e;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-tab__close {
    font-size: 12px;
    line-height: 1;
    color: #a3a8b4;
}

.bp-swatches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.bp-swatch {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    min-height: 52px;
    padding: 7px 8px;
    border: 1px solid rgba(11, 13, 18, 0.06);
    border-radius: 7px;
}

.bp-swatch__name {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.8;
}

.bp-swatch__hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8.5px;
}

.bp-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bp-size {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 8.5px;
    font-weight: 600;
    color: #4a4f5e;
    white-space: nowrap;
}

.brand-preview__note {
    margin-top: 10px;
    font-size: 10px;
    line-height: 1.5;
    color: var(--muted);
}

@media (max-width: 720px) {
    .brand-preview__canvas {
        grid-template-columns: 1fr;
    }

    .bp-nav {
        display: none;
    }
}

/* ---------- live section colour preview ---------- */

.tone-preview {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(11, 13, 18, 0.03);
}

.tone-preview__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.tone-preview__eyebrow {
    font-family: var(--display);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
}

.tone-preview__title {
    margin-top: 4px;
    font-family: var(--display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tone-preview__lede {
    margin-top: 3px;
    max-width: 62ch;
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--muted);
}

.tone-preview__state {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef0f4;
    color: #4a4f5e;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.tone-preview__state::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.tone-preview__state.is-custom {
    background: #ececfd;
    color: #3f37b8;
}

.tone-preview__canvas {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(180px, 0.85fr);
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    background: #f4f5f8;
}

.tone-preview__note {
    margin-top: 10px;
    font-size: 10px;
    line-height: 1.5;
    color: var(--muted);
}

.tp-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 152px;
    align-items: start;
    gap: 16px;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 14px 30px -24px rgba(11, 13, 18, 0.7);
}

.tp-copy {
    min-width: 0;
}

.tp-eyebrow {
    font-family: var(--display);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--tp-accent);
}

.tp-title {
    margin-top: 6px;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.tp-lede {
    margin-top: 7px;
    max-width: 36ch;
    font-size: 10px;
    line-height: 1.5;
    color: var(--tp-soft);
}

.tp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tp-btn,
.tp-ghost {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.tp-ghost {
    border-color: color-mix(in srgb, currentColor 30%, transparent);
    background: color-mix(in srgb, currentColor 8%, transparent);
}

.tp-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 12px;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 10px 22px -18px rgba(11, 13, 18, 0.8);
}

.tp-card__kicker {
    font-family: var(--display);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.5;
}

.tp-card__title {
    font-family: var(--display);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.2;
}

.tp-card__body {
    font-size: 9px;
    line-height: 1.45;
    opacity: 0.7;
}

.tp-card__link {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 600;
}

.tp-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tp-label {
    font-family: var(--display);
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.tp-fact {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 9.5px;
}

.tp-fact__swatch {
    flex: none;
    width: 12px;
    height: 12px;
    border: 1px solid rgba(11, 13, 18, 0.14);
    border-radius: 4px;
}

.tp-fact__label {
    color: var(--muted);
}

.tp-fact__hex {
    overflow: hidden;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    color: #2b3040;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-fact__note {
    margin-left: auto;
    font-size: 7.5px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a90a0;
}

.tp-contrast {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 2px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 8.5px;
    line-height: 1.4;
}

.tp-contrast strong {
    font-family: var(--display);
    font-size: 11px;
    letter-spacing: -0.01em;
}

.tp-contrast.is-pass {
    background: #eef7f1;
    color: #22794b;
}

.tp-contrast.is-warn {
    background: #fff4e5;
    color: #9a5b00;
}

.tp-side__note {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.45;
    color: var(--muted);
}

.tp-side .admin-btn {
    margin-top: 2px;
    width: fit-content;
}

@media (max-width: 720px) {
    .tone-preview__canvas {
        grid-template-columns: 1fr;
    }

    .tp-band {
        grid-template-columns: 1fr;
    }

    .tp-card {
        max-width: 220px;
    }
}

/* ---------- switches, colors, images ---------- */

.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    width: fit-content;
}

.switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch__track {
    position: relative;
    width: 38px;
    height: 21px;
    flex: none;
    border-radius: 999px;
    background: #d7dae1;
    transition: background 0.18s ease;
}

.switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.18s ease;
}

.switch input:checked + .switch__track {
    background: var(--ink);
}

.switch input:checked + .switch__track::after {
    transform: translateX(17px);
}

.switch__text {
    font-size: 12px;
    color: var(--muted);
}

.color-field {
    display: flex;
    align-items: center;
    gap: 9px;
}

.color-field__swatch {
    width: 42px;
    height: 42px;
    flex: none;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.color-field__swatch.is-empty {
    opacity: 0.35;
    border-style: dashed;
}

.color-field__clear {
    flex: none;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted, #5d6170);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.color-field__clear:hover {
    border-color: var(--sidebar-primary, #4f46e5);
    color: var(--sidebar-primary, #4f46e5);
}

.color-field__clear[hidden] {
    display: none;
}

.image-field {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fafbfc;
}

.image-field__preview {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    overflow: hidden;
    border: 1px dashed var(--line-strong);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.image-field__preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-field__controls {
    display: grid;
    gap: 9px;
    min-width: 0;
    align-content: center;
}

.image-field__buttons {
    display: flex;
    gap: 7px;
}

/* ---------- arrays / repeaters ---------- */

.array-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.array-empty {
    padding: 18px;
    border: 1px dashed var(--line-strong);
    border-radius: 10px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}

.array-list,
.repeat-list {
    display: grid;
    gap: 8px;
}

.repeat-list {
    gap: 10px;
}

.array-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.array-row .input {
    flex: 1;
}

.repeat-item {
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
}

.repeat-item.is-open {
    border-color: var(--line-strong);
    box-shadow: 0 1px 3px rgba(11, 13, 18, 0.04);
}

.repeat-item__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #f7f8fa;
}

.repeat-item.is-open .repeat-item__head {
    border-bottom: 1px solid var(--line);
    background: #f2f4f7;
}

.repeat-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    padding: 7px 6px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.repeat-toggle__index {
    font-family: var(--display);
    font-size: 9px;
    font-weight: 600;
    color: var(--muted);
}

.repeat-toggle__title {
    overflow: hidden;
    font-family: var(--display);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.repeat-toggle__chevron {
    margin-left: auto;
    font-size: 13px;
    color: var(--muted);
    transition: transform 0.18s ease;
}

.repeat-toggle[aria-expanded="true"] .repeat-toggle__chevron {
    transform: rotate(180deg);
}

.repeat-controls {
    display: flex;
    gap: 2px;
    flex: none;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
}

.icon-btn--danger:hover {
    border-color: rgba(214, 69, 69, 0.25);
    background: rgba(214, 69, 69, 0.08);
    color: var(--danger);
}

.icon-btn.is-disabled {
    opacity: 0.28;
    pointer-events: none;
}

.repeat-item__body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    padding: 16px;
    background: #fff;
}

.repeat-item__body > .field,
.repeat-item__body > .group {
    grid-column: 1 / -1;
}

/* ---------- media ---------- */

.media-view {
    display: block;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.media-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.media-card__thumb {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(45deg, #f3f4f7 25%, transparent 25%, transparent 75%, #f3f4f7 75%),
        linear-gradient(45deg, #f3f4f7 25%, #fff 25%, #fff 75%, #f3f4f7 75%);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
}

.media-card__thumb img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.media-card__meta {
    display: grid;
    gap: 2px;
    padding: 11px 12px;
}

.media-card__meta strong {
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-card__meta span {
    font-size: 10px;
    color: var(--muted);
}

.media-card__actions {
    display: flex;
    gap: 6px;
    padding: 0 12px 12px;
    margin-top: auto;
}

.media-empty {
    grid-column: 1 / -1;
    padding: 48px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    background: #fff;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.media-empty__hint {
    margin-top: 6px;
    font-size: 11.5px;
}

.upload-btn {
    cursor: pointer;
}

/* ---------- site updates ---------- */

.update-view {
    display: block;
}

.update-card {
    margin-top: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(11, 13, 18, 0.03);
}

.update-card:first-child {
    margin-top: 0;
}

.update-card--rollback {
    border-color: #dcd8fb;
    background: #f8f7ff;
}

.update-card--rollback .update-card__eyebrow {
    color: var(--primary);
}

.update-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.update-card__eyebrow {
    font-family: var(--display);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
}

.update-card h2 {
    margin-top: 6px;
    font-family: var(--display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.update-card__meta {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

.update-drop {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 30px 22px;
    border: 1px dashed var(--line-strong);
    border-radius: 13px;
    background: #fbfcfd;
    text-align: center;
}

.update-drop__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef1f5;
    color: var(--ink);
    font-size: 16px;
}

.update-drop h2 {
    margin: 0;
}

.update-drop .update-card__meta {
    max-width: 460px;
}

.update-progress {
    width: min(320px, 100%);
    height: 6px;
    margin-top: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8ebf0;
}

.update-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.2s ease;
}

.update-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 18px 0 0;
}

.update-fact {
    display: grid;
    gap: 3px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafbfc;
}

.update-fact__label {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.update-fact__value {
    overflow: hidden;
    font-size: 12.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-note {
    margin-top: 12px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--muted);
}

.update-warnings {
    display: grid;
    gap: 5px;
    margin: 12px 0 0;
    padding: 12px 14px 12px 30px;
    border: 1px solid #f0d9a8;
    border-radius: 10px;
    background: #fffaf0;
    font-size: 11.5px;
    line-height: 1.55;
    color: #8a5b0b;
}

.update-keep {
    display: grid;
    gap: 3px;
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 3px solid #b9e3c6;
    border-radius: 4px 10px 10px 4px;
    background: #f4fbf6;
    font-size: 11.5px;
    line-height: 1.6;
}

.update-keep strong {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #2f6b45;
}

.update-keep span {
    color: #3f6550;
}

.update-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.update-error {
    margin-top: 12px;
    padding: 11px 13px;
    border: 1px solid #efc9c9;
    border-radius: 9px;
    background: #fdf4f4;
    font-size: 11.5px;
    line-height: 1.55;
    color: #8f2727;
}

.update-done {
    display: grid;
    justify-items: start;
    gap: 6px;
    padding: 26px 24px;
    border: 1px solid #cbe8d5;
    border-radius: 16px;
    background: #f6fcf8;
}

.update-done.is-warning {
    border-color: #f0d9a8;
    background: #fffaf0;
}

.update-done__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2f6b45;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.update-done.is-warning .update-done__mark {
    background: #a9740f;
}

.update-done h2 {
    margin-top: 4px;
    font-family: var(--display);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.update-done__lead,
.update-done__hint {
    font-size: 12px;
    line-height: 1.65;
    color: var(--muted);
}

.update-done__hint {
    margin-top: 2px;
    color: #2f6b45;
}

/* ---------- toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 100;
    padding: 11px 18px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-size: 12.5px;
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translate(-50%, 14px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast--error {
    background: #9c2f2f;
}

/* ---------- full-page draft preview ---------- */

body.preview-open {
    overflow: hidden;
}

.admin-main.has-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 46vw);
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    overflow: hidden;
}

.admin-main.has-preview .admin-topbar {
    grid-column: 1 / -1;
}

.admin-main.has-preview .admin-body {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.preview-dock {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #10131a;
}

.preview-dock__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #171b24;
}

.preview-dock__title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.preview-dock__title strong {
    display: block;
    font-family: var(--display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
}

.preview-dock__title span {
    display: block;
    margin-top: 1px;
    font-size: 9.5px;
    color: rgba(255, 255, 255, 0.5);
}

.preview-dock__title span.is-dirty {
    color: #ffc466;
}

.preview-dock__badge {
    flex: none;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: var(--display);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.preview-dock__pages {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.preview-dock__pages button {
    padding: 4px 9px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.preview-dock__pages button:hover {
    color: #fff;
}

.preview-dock__pages button[aria-pressed='true'] {
    background: rgba(255, 255, 255, 0.92);
    color: #11141a;
}

.preview-dock__devices {
    display: flex;
    gap: 2px;
    margin-left: auto;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.preview-dock__devices button {
    padding: 4px 9px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.preview-dock__devices button:hover {
    color: #fff;
}

.preview-dock__devices button[aria-pressed='true'] {
    background: rgba(255, 255, 255, 0.92);
    color: #11141a;
}

.preview-dock__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-dock__live {
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 9.5px;
    font-weight: 600;
    white-space: nowrap;
}

.preview-dock__live:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.preview-dock__icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.preview-dock__icon:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.preview-dock__stage {
    position: relative;
    display: flex;
    flex: 1;
    align-items: stretch;
    justify-content: center;
    justify-content: safe center;
    min-height: 0;
    padding: 12px;
    overflow: auto;
    background: #0b0d12;
}

.preview-dock iframe {
    flex: none;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

.preview-dock__stage[data-device='tablet'] iframe {
    width: 834px;
}

.preview-dock__stage[data-device='phone'] iframe {
    width: 390px;
}

.preview-dock__status {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(11, 13, 18, 0.78);
    color: #fff;
    font-size: 11.5px;
    line-height: 1.5;
    text-align: center;
    backdrop-filter: blur(2px);
}

.preview-dock__status.is-error {
    color: #ffb4b4;
}

.preview-dock__note {
    padding: 7px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    font-size: 9.5px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .admin-main.has-preview {
        display: flex;
        height: auto;
        overflow: visible;
    }

    .preview-dock {
        position: fixed;
        inset: 0;
        z-index: 90;
        grid-column: auto;
        grid-row: auto;
        height: 100%;
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45);
    }
}

/* ---------- responsive ---------- */

@media (max-width: 1040px) {
    .save-state,
    .site-status {
        display: none;
    }
}

@media (max-width: 900px) {
    .login {
        grid-template-columns: 1fr;
    }

    .login__aside {
        padding: 28px 24px;
        min-height: 260px;
    }

    .login__pitch {
        margin-top: 34px;
    }

    .login__pitch h1 {
        font-size: clamp(34px, 8vw, 46px);
    }

    .login__pitch p,
    .login__foot {
        display: none;
    }

    .login__main {
        padding: 36px 20px 56px;
    }

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

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 276px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 20px 0 50px -20px rgba(0, 0, 0, 0.5);
    }

    .admin.sidebar-open .admin-sidebar {
        transform: none;
    }

    .admin-menu-btn {
        display: grid;
        place-items: center;
    }

    .admin-topbar {
        padding: 11px 18px;
        gap: 12px;
    }

    .admin-body {
        padding: 22px 18px 70px;
    }

    .admin-topbar__title span {
        display: none;
    }

    .admin-topbar__actions {
        gap: 7px;
    }

    .admin-topbar__actions .admin-btn--ghost {
        display: none;
    }

    .fields {
        padding: 16px;
    }

    .repeat-item__body,
    .group__body {
        padding: 14px;
    }

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

    .image-field__preview {
        width: 100%;
        height: 120px;
    }
}

@media (max-width: 560px) {
    .admin-topbar__actions .admin-btn--primary {
        padding: 10px 12px;
        font-size: 11.5px;
    }

    .editor__head {
        flex-direction: column;
        gap: 12px;
    }

    .editor__badge {
        display: none;
    }

    .array-row {
        flex-wrap: wrap;
    }

    .repeat-item__head {
        flex-wrap: wrap;
    }

    .repeat-controls {
        margin-left: 4px;
    }

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