/* ==========================================================================
   World Yoga School
   Single stylesheet — auth + dashboard.

   1. Tokens
   2. Base
   3. Components   (buttons, fields, links, alerts, tags)
   4. Auth         (centered login card)
   5. Dashboard    (sidebar, topbar, stats, panels, tables)
   6. Utilities
   ========================================================================== */


/* 1. Tokens
   ========================================================================== */

:root {
    --brand:        #003944;
    --brand-deep:   #00272f;
    --brand-mid:    #0a4c59;
    --brand-line:   #1b5a66;

    --gold:         #ffcf76;
    --gold-deep:    #e8b451;
    --gold-ink:     #3d2a05;

    --canvas:       #f5f5f2;
    --surface:      #ffffff;
    --ink:          #14262b;
    --ink-soft:     #5f6f74;
    --line:         #e3e5e3;
    --field-line:   #ccd3d4;
    --danger:       #9d3423;

    --radius:       8px;
    --field-h:      2.875rem;
    --sidebar-w:    16.25rem;

    --sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
}


/* 2. Base
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}


/* 3. Components
   ========================================================================== */

/* --- Buttons -------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4375rem;
    height: 2.375rem;
    padding: 0 0.9375rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: var(--radius);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
}

.btn:focus-visible {
    outline: 2px solid var(--gold-deep);
    outline-offset: 2px;
}

.btn:active {
    background: #001c22;
}

.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn--block {
    width: 100%;
    height: var(--field-h);
    font-size: 0.9375rem;
}

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

.btn--ghost:hover {
    background: #eceeec;
    border-color: #d3d6d3;
}

/* --- Fields --------------------------------------------------------------- */

.field {
    margin-bottom: 1.125rem;
}

.field__label {
    display: block;
    margin-bottom: 0.4375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.field__input {
    width: 100%;
    height: var(--field-h);
    padding: 0 0.875rem;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--field-line);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input::placeholder {
    color: #9aa5a7;
}

.field__input:hover {
    border-color: #aeb9ba;
}

.field__input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 57, 68, 0.14);
}

.field__input[aria-invalid="true"] {
    border-color: var(--danger);
}

.field__input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(157, 52, 35, 0.15);
}

.field__error {
    display: block;
    margin-top: 0.4375rem;
    font-size: 0.8125rem;
    color: var(--danger);
}

.field__control {
    position: relative;
}

.field__control .field__input {
    padding-right: 4.25rem;
}

.field__toggle {
    position: absolute;
    top: 50%;
    right: 0.4375rem;
    transform: translateY(-50%);
    padding: 0.375rem 0.5rem;
    font: inherit;
    font-size: 0.8125rem;
    color: var(--ink-soft);
    background: none;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
}

.field__toggle:hover {
    color: var(--ink);
    background: #eef1f1;
}

.field__toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

.field-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.25rem 0 1.5rem;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.checkbox input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--brand);
    cursor: pointer;
}

/* --- Links ---------------------------------------------------------------- */

.link {
    color: var(--brand);
    font-size: 0.875rem;
    text-decoration: underline;
    text-decoration-color: #b9c6c8;
    text-underline-offset: 3px;
}

.link:hover {
    text-decoration-color: var(--gold-deep);
}

.link:focus-visible {
    outline: 2px solid var(--gold-deep);
    outline-offset: 2px;
    border-radius: 3px;
}

/* --- Alerts --------------------------------------------------------------- */

.alert {
    margin-bottom: 1.25rem;
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid;
    border-radius: var(--radius);
}

.alert--error {
    color: var(--danger);
    background: #fdf1ee;
    border-color: #f0cec5;
}

.alert--ok {
    color: #10443b;
    background: #e6f2ed;
    border-color: #c2ddd2;
}

/* --- Tags ----------------------------------------------------------------- */

.tag {
    display: inline-block;
    padding: 0.1875rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 999px;
}

.tag--live {
    color: #10443b;
    background: #d9ece4;
}

.tag--draft {
    color: #66502a;
    background: #f7ecd4;
}


/* 4. Auth — centered card
   ========================================================================== */

.auth {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.5rem 1.25rem 2.5rem;
    background: var(--brand);
}

.auth__box {
    width: min(25rem, 100%);
}

.auth__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    margin-bottom: 1.375rem;
    color: #fff;
    text-decoration: none;
}

.auth__glyph {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--brand-deep);
    background: var(--gold);
    border-radius: 50%;
}

.auth__wordmark {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.auth__card {
    padding: 1.75rem 1.5rem 1.875rem;
    background: var(--surface);
    border-radius: 12px;
}

.auth__title {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.auth__sub {
    margin: 0.3125rem 0 1.625rem;
    font-size: 0.9375rem;
    color: var(--ink-soft);
}

.auth__alt {
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--ink-soft);
    text-align: center;
    border-top: 1px solid var(--line);
}

.auth__foot {
    margin: 1.25rem 0 0;
    font-size: 0.8125rem;
    color: #7ea3aa;
    text-align: center;
}

@media (min-width: 30rem) {
    .auth__card {
        padding: 2.25rem 2.25rem 2.375rem;
    }
}


/* 5. Dashboard
   ========================================================================== */

.app {
    min-height: 100vh;
    min-height: 100dvh;
}

/* --- Sidebar -------------------------------------------------------------- */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    background: var(--brand);
    color: #d3e2e5;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
}

.sidebar.is-open {
    transform: translateX(0);
}

.sidebar__head {
    display: flex;
    align-items: center;
    gap: 0.6875rem;
    padding: 1.25rem 1.25rem 1.125rem;
    border-bottom: 1px solid var(--brand-line);
}

.sidebar__glyph {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--brand-deep);
    background: var(--gold);
    border-radius: 50%;
}

.sidebar__name {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}

.sidebar__name span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #8fb2b9;
}

.sidebar__nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.125rem;
    font: inherit;
    font-size: 0.9375rem;
    color: #c3d8dc;
    text-decoration: none;
    background: none;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
    color: #fff;
    background: var(--brand-mid);
}

.nav-item:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.nav-item.is-active {
    color: var(--brand-deep);
    font-weight: 500;
    background: var(--gold);
}

.nav-item__icon {
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
}

.nav-group {
    margin-bottom: 0.125rem;
}

.nav-group > summary {
    list-style: none;
}

.nav-group > summary::-webkit-details-marker {
    display: none;
}

.nav-group__caret {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.nav-group[open] .nav-group__caret {
    transform: rotate(90deg);
}

.nav-sub {
    margin: 0.125rem 0 0.5rem 1.375rem;
    padding: 0 0 0 1.0625rem;
    list-style: none;
    border-left: 1px solid var(--brand-line);
}

.nav-sub a {
    display: block;
    padding: 0.4375rem 0.75rem;
    font-size: 0.875rem;
    color: #a9c4c9;
    text-decoration: none;
    border-radius: 6px;
}

.nav-sub a:hover {
    color: #fff;
    background: var(--brand-mid);
}

.nav-sub a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.nav-sub a.is-active {
    color: var(--gold);
    font-weight: 500;
}

.sidebar__foot {
    padding: 0.875rem 1.25rem 1.125rem;
    border-top: 1px solid var(--brand-line);
}

.sidebar__user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
}

.avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 2rem;
    height: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-deep);
    background: #b7ccd0;
    border-radius: 50%;
}

.sidebar__user-name {
    overflow: hidden;
    font-size: 0.875rem;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar__user-name span {
    display: block;
    font-size: 0.75rem;
    color: #8fb2b9;
}

.linkout {
    padding: 0;
    font: inherit;
    font-size: 0.8125rem;
    color: #8fb2b9;
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.linkout:hover {
    color: var(--gold);
}

.scrim {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(0, 30, 36, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.scrim.is-open {
    opacity: 1;
    visibility: visible;
}

/* --- Main column ---------------------------------------------------------- */

.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    background: rgba(245, 245, 242, 0.9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}

.topbar__toggle {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.topbar__toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.topbar__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.topbar__actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.content {
    flex: 1;
    padding: 1.5rem 1.25rem 3rem;
}

.content__inner {
    max-width: 72rem;
    margin: 0 auto;
}

/* --- Stat strip ----------------------------------------------------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.stat {
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.stat + .stat {
    border-left: 1px solid var(--line);
}

.stat:nth-child(odd) {
    border-left: 0;
}

.stat:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.stat__value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat__label {
    margin-top: 0.1875rem;
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

/* Stat cells that link somewhere */

a.stat {
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

a.stat:hover {
    background: #fafbfa;
}

a.stat:hover .stat__label {
    color: var(--brand);
}

a.stat:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

/* --- Panels + tables ------------------------------------------------------ */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.panel__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink-soft);
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}

.table td {
    padding: 0.8125rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

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

.table tbody tr:hover {
    background: #fafaf8;
}

.table__title {
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
}

.table__title:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.empty {
    padding: 2.5rem 1.25rem;
    text-align: center;
    color: var(--ink-soft);
}

/* --- Dashboard breakpoint ------------------------------------------------- */

@media (min-width: 64rem) {
    .sidebar {
        transform: none;
    }

    .main {
        margin-left: var(--sidebar-w);
    }

    .topbar {
        padding: 1rem 2rem;
    }

    .topbar__toggle {
        display: none;
    }

    .content {
        padding: 2rem 2rem 4rem;
    }

    .scrim {
        display: none;
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .stat {
        border-bottom: 0;
    }

    .stat:nth-child(odd) {
        border-left: 1px solid var(--line);
    }

    .stat:first-child {
        border-left: 0;
    }
}


/* 6. Forms + CRUD pages
   ========================================================================== */

.form-page {
    max-width: 60rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

.panel__body {
    padding: 1.25rem;
}

.panel__body .field:last-child {
    margin-bottom: 0;
}

.field__help {
    display: block;
    margin-top: 0.4375rem;
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

/* Slug field with a fixed prefix */

.field__prefixed {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--field-line);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__prefixed:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 57, 68, 0.14);
}

.field__prefix {
    display: grid;
    place-items: center;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    color: var(--ink-soft);
    background: #f1f3f3;
    border-right: 1px solid var(--field-line);
    border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
}

.field__prefixed .field__input {
    border: 0;
    border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0;
}

.field__prefixed .field__input:hover,
.field__prefixed .field__input:focus {
    box-shadow: none;
}

/* Image uploader */

.uploader {
    display: grid;
    place-items: center;
    gap: 0.875rem;
    padding: 1.25rem;
    text-align: center;
    background: #fafbfb;
    border: 1px dashed var(--field-line);
    border-radius: var(--radius);
}

.uploader__preview {
    display: block;
    width: 100%;
    max-height: 13rem;
    object-fit: cover;
    border-radius: 6px;
}

.uploader__empty {
    display: grid;
    place-items: center;
    gap: 0.375rem;
    padding: 1rem 0 0.25rem;
    color: var(--ink-soft);
}

.uploader__empty p {
    margin: 0;
    font-size: 0.8125rem;
}

.uploader__pick {
    cursor: pointer;
}

#image:focus-visible + .uploader__pick,
.uploader input[type="file"]:focus-visible ~ .uploader__pick {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.uploader__remove {
    margin-top: 0.875rem;
}

.uploader__alt {
    margin-top: 1.125rem;
    margin-bottom: 0;
}

/* Form footer */

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 1.25rem;
}

/* Extra button variants */

.btn--sm {
    height: 2.125rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
}

.btn--danger {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}

.btn--danger:hover {
    background: #83291a;
    border-color: #83291a;
}

.linkbtn {
    padding: 0;
    font: inherit;
    font-size: 0.875rem;
    color: var(--danger);
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.linkbtn:hover {
    color: #83291a;
}

.linkbtn:focus-visible {
    outline: 2px solid var(--danger);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Search in a panel head */

.search {
    display: flex;
    gap: 0.5rem;
}

.search__input {
    width: min(15rem, 45vw);
    height: 2.125rem;
    font-size: 0.875rem;
}

/* Table extras */

.table__thumb-col {
    width: 4.5rem;
}

.thumb {
    display: block;
    width: 2.75rem;
    height: 2.75rem;
    object-fit: cover;
    border-radius: 6px;
}

.thumb--empty {
    display: grid;
    place-items: center;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--brand);
    background: #e8eded;
}

.slug {
    padding: 0.125rem 0.375rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--ink-soft);
    background: #f1f3f3;
    border-radius: 4px;
}

.table__actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    justify-content: flex-end;
    white-space: nowrap;
}

.table__actions form {
    display: inline;
}

/* Pagination */

.pagination-wrap {
    margin-top: 1.25rem;
}

.pagination-wrap svg {
    width: 1rem;
    height: 1rem;
}

@media (min-width: 60rem) {
    .form-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}


/* 7. Post editor
   ========================================================================== */

.editor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

.editor-main,
.editor-side {
    display: grid;
    gap: 1.25rem;
    align-content: start;
}

.field__input--lg {
    height: 3.125rem;
    font-size: 1.0625rem;
    font-weight: 500;
}

.field__input--area {
    height: auto;
    padding: 0.6875rem 0.875rem;
    line-height: 1.55;
    resize: vertical;
}

.field__select {
    appearance: none;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none' stroke='%235f6f74' stroke-width='2'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8125rem center;
    cursor: pointer;
}

/* --- SEO meters ----------------------------------------------------------- */

.meter {
    margin-top: 0.5rem;
}

.meter__track {
    height: 4px;
    background: #e8ebeb;
    border-radius: 999px;
    overflow: hidden;
}

.meter__fill {
    display: block;
    width: 0;
    height: 100%;
    background: #c3c9c9;
    border-radius: 999px;
    transition: width 0.15s ease, background-color 0.15s ease;
}

.meter__label {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

.meter__verdict {
    font-weight: 500;
}

.meter[data-state="poor"] .meter__fill    { background: var(--danger); }
.meter[data-state="okay"] .meter__fill    { background: var(--gold-deep); }
.meter[data-state="good"] .meter__fill    { background: #2e7d5b; }

.meter[data-state="poor"] .meter__verdict { color: var(--danger); }
.meter[data-state="okay"] .meter__verdict { color: #8a6413; }
.meter[data-state="good"] .meter__verdict { color: #2e7d5b; }

/* --- Tag tokens ----------------------------------------------------------- */

.tokens {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    min-height: var(--field-h);
    padding: 0.4375rem 0.5rem;
    background: #fff;
    border: 1px solid var(--field-line);
    border-radius: var(--radius);
    cursor: text;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tokens:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 57, 68, 0.14);
}

.tokens__list {
    display: contents;
}

.token {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.25rem 0.1875rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--brand);
    background: #e6eeef;
    border-radius: 4px;
}

.token__x {
    padding: 0 0.1875rem;
    font: inherit;
    font-size: 0.9375rem;
    line-height: 1;
    color: var(--ink-soft);
    background: none;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}

.token__x:hover {
    color: var(--danger);
}

.token__x:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

.tokens__input {
    flex: 1;
    min-width: 8rem;
    padding: 0.25rem;
    font: inherit;
    font-size: 0.875rem;
    color: var(--ink);
    background: none;
    border: 0;
    outline: none;
}

/* --- FAQ repeater --------------------------------------------------------- */

.faq-list {
    display: grid;
    gap: 0.875rem;
}

.faq {
    padding: 1rem;
    background: #fafbfb;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.faq__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}

.faq__num {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand);
    background: #e6eeef;
    border-radius: 50%;
}

.faq-empty {
    margin: 0;
    padding: 1.5rem 0.5rem;
    font-size: 0.875rem;
    color: var(--ink-soft);
    text-align: center;
}

.faq-list:not(:empty) + .faq-empty {
    display: none;
}

/* --- Sticky save bar ------------------------------------------------------ */

.form-actions--sticky {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: 1.25rem;
    padding: 0.875rem 0;
    background: linear-gradient(to top, var(--canvas) 70%, rgba(245, 245, 242, 0));
}

/* --- TinyMCE trim --------------------------------------------------------- */

.tox-tinymce {
    border: 1px solid var(--field-line) !important;
    border-radius: var(--radius) !important;
}

.tox .tox-statusbar {
    border-top: 1px solid var(--line) !important;
}

.search__select {
    width: auto;
    height: 2.125rem;
    font-size: 0.875rem;
}

@media (min-width: 68rem) {
    .editor-grid {
        grid-template-columns: minmax(0, 1.9fr) minmax(18rem, 1fr);
    }
}


/* 8. Utilities
   ========================================================================== */

.muted {
    color: var(--ink-soft);
}

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}