:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #e2e8f0;
    --text-heading: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --border-strong: #475569;
    --accent: #0ea5e9;
    --accent-text: #0f172a;
    --link: #7dd3fc;
    --danger: #f87171;
    --ok: #4ade80;
    --flash-bg: #14532d;
    --err-bg: #7f1d1d;
    --focus: #38bdf8;
    --radius: 12px;
    --font: Vazirmatn, Tahoma, sans-serif;
}

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

html {
    font-family: var(--font);
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    background-image: radial-gradient(1200px 520px at 100% -8%, rgba(14, 165, 233, 0.14), transparent 55%);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
    min-height: 100vh;
}

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

a:hover {
    text-decoration: underline;
}

.top a:hover,
.btn:hover,
button:hover {
    text-decoration: none;
}

h1,
h2 {
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.35;
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

h2 {
    font-size: 1.15rem;
    margin: 0 0 0.75rem;
}

.top {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 40;
}

.top .brand {
    color: var(--text-heading);
    margin-inline-end: 4px;
    white-space: nowrap;
}

.top a {
    color: var(--text-muted);
    padding: 10px 12px;
    border-radius: 8px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: background 180ms ease, color 180ms ease;
}

.top a.active,
.top a:hover {
    background: var(--accent);
    color: var(--accent-text);
}

.top .logout {
    margin-right: auto;
    margin-bottom: 0;
}

.wrap {
    padding: 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stat .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-top: 8px;
    line-height: 1.2;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    text-align: right;
    vertical-align: middle;
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

tbody tr:hover {
    background: rgba(14, 165, 233, 0.08);
}

input,
select,
textarea,
button,
.btn {
    font-family: inherit;
    font-size: 1rem;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--text);
}

input,
select,
textarea {
    min-height: 44px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    background: #162033;
    outline: none;
}

textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    line-height: 1.7;
}

textarea.js-ckeditor {
    min-height: 280px;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    min-height: 0;
    padding: 0;
    accent-color: var(--accent);
}

button,
.btn {
    background: var(--accent);
    border: none;
    cursor: pointer;
    color: var(--accent-text);
    font-weight: 600;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: filter 180ms ease, transform 120ms ease;
}

button:hover,
.btn:hover {
    filter: brightness(1.08);
}

button:active,
.btn:active {
    transform: translateY(1px);
}

.btn-danger,
button.btn-danger {
    background: var(--danger);
    color: #111827;
}

.btn-ghost,
.top .logout button {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
}

.btn-ghost:hover,
.top .logout button:hover {
    background: var(--bg);
    color: var(--text);
    filter: none;
}

.ok { color: var(--ok); }
.bad { color: var(--danger); }
.muted { color: var(--text-muted); }

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

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; }
    .wrap { padding: 16px; }
}

label {
    display: block;
    margin: 12px 0 6px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

label:first-child {
    margin-top: 0;
}

.check,
.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 8px 0;
    color: var(--text);
}

.check input,
.check-row input {
    flex-shrink: 0;
}

.flash,
.err {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.flash { background: var(--flash-bg); }
.err { background: var(--err-bg); }

.grow { width: 100%; }

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

.actions form {
    margin: 0;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.field-row .field-submit {
    display: flex;
    align-items: flex-end;
}

pre {
    overflow: auto;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

code {
    font-family: ui-monospace, Consolas, monospace;
}

button:focus-visible,
.btn:focus-visible,
.top a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.page-head h1 {
    margin: 0;
}

.page-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: -8px 0 16px;
}

.fieldset {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin: 0 0 16px;
    background: rgba(15, 23, 42, 0.35);
}

.fieldset legend {
    color: var(--text-heading);
    font-weight: 600;
    padding: 0 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
}

.form-grid .span-2 {
    grid-column: 1 / -1;
}

.form-grid .field-submit {
    display: flex;
    align-items: flex-end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    margin: 0;
}

.field input,
.field select,
.field textarea {
    width: 100%;
}

.choice-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.choice-list .check {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #334155;
    color: var(--text);
    white-space: nowrap;
}

.badge-queued,
.badge-scheduled,
.badge-pending,
.badge-pending_review {
    background: rgba(14, 165, 233, 0.2);
    color: #7dd3fc;
}

.badge-failed_ai,
.badge-failed,
.badge-failed_quality,
.badge-down,
.badge-rejected,
.badge-expired,
.badge-dispatch_error {
    background: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
}

.badge-published,
.badge-ok,
.badge-active,
.badge-dispatched {
    background: rgba(74, 222, 128, 0.18);
    color: #86efac;
}

.badge-draft,
.badge-unknown,
.badge-rewriting,
.badge-unpublished,
.badge-yoast_missing {
    background: #334155;
    color: #cbd5e1;
}

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

.empty {
    text-align: center;
    color: var(--text-muted);
    padding: 28px 8px !important;
}

.pager {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.form-actions form {
    margin: 0;
}

.prose-box {
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    line-height: 1.8;
}

.route-row {
    display: grid;
    grid-template-columns: 1fr minmax(180px, 240px);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.route-row:last-of-type {
    border-bottom: none;
}

.route-row label {
    margin: 0;
    color: var(--text);
}

.card > h2:first-child {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

body.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background-image: radial-gradient(800px 420px at 50% 0%, rgba(14, 165, 233, 0.2), transparent 62%);
}

.login-card {
    width: min(420px, 92vw);
    padding: 32px;
    margin: 0;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.login-card h1 {
    margin-bottom: 0.4rem;
}

.login-lede {
    color: var(--text-muted);
    margin: 0 0 1.25rem;
}

@media (max-width: 700px) {
    .form-grid,
    .route-row {
        grid-template-columns: 1fr;
    }
}

.login-card input[type="email"],
.login-card input[type="password"],
.login-card button[type="submit"] {
    width: 100%;
}

.ck.ck-editor {
    width: 100%;
    margin: 4px 0 8px;
}

.ck.ck-toolbar {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

.ck.ck-toolbar .ck-button,
.ck.ck-toolbar .ck-dropdown__button {
    color: var(--text) !important;
}

.ck.ck-content.ck-editor__editable {
    font-family: var(--font) !important;
    direction: rtl;
    text-align: right;
    min-height: 280px;
    background: var(--bg) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
    line-height: 1.75;
}

.ck.ck-editor__main > .ck-editor__editable:not(.ck-focused) {
    border-color: var(--border-strong) !important;
}

.ck.ck-editor__editable.ck-focused {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 1px var(--accent) !important;
}

.ck.ck-content h2,
.ck.ck-content h3 {
    color: var(--text-heading);
}

.ck.ck-content a {
    color: var(--link);
}

/* ---------- shared bits ---------- */

.small { font-size: 0.85rem; }
.req { color: var(--danger); }

.btn-sm,
button.btn-sm {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.88rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.toolbar input[type="search"] {
    flex: 1 1 220px;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.row-actions form { margin: 0; }

.err-list { margin: 0; padding-inline-start: 18px; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-head h2 { margin: 0; }

.badge-generating,
.badge-publishing,
.badge-ready,
.badge-ready_for_manual {
    background: rgba(250, 204, 21, 0.16);
    color: #fde68a;
}

.badge-partially_published {
    background: rgba(251, 146, 60, 0.18);
    color: #fdba74;
}

.badge-paused,
.badge-inactive {
    background: #334155;
    color: #cbd5e1;
}

/* ---------- reportage studio ---------- */

.studio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.studio-side {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.studio-actions {
    grid-column: 1 / -1;
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.94);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.studio-actions #autosave-note { margin-inline-end: auto; }

@media (max-width: 1100px) {
    .studio { grid-template-columns: 1fr; }
    .studio-side { position: static; max-height: none; overflow: visible; }
}

.label-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.label-row label { flex: 1; }

.counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.counter.ok { color: var(--ok); }
.counter.warn { color: #fbbf24; }
.counter.bad { color: var(--danger); }

.ai-btn {
    background: linear-gradient(135deg, #8b5cf6, #0ea5e9);
    color: #fff;
}

.ai-btn-lg { padding: 10px 18px; }

.btn-ai-sm {
    min-height: 34px;
    padding: 4px 12px;
    font-size: 0.85rem;
    background: rgba(139, 92, 246, 0.16);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.btn-ai-sm:hover { background: rgba(139, 92, 246, 0.28); filter: none; }

.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.is-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #c4b5fd;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.ai-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.chip {
    justify-content: flex-start;
    text-align: right;
    background: var(--bg);
    color: var(--text);
    border: 1px dashed rgba(139, 92, 246, 0.5);
    font-weight: 500;
}

.chip:hover { border-style: solid; filter: none; background: rgba(139, 92, 246, 0.12); }

.more {
    margin-top: 12px;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
}

.more summary {
    cursor: pointer;
    color: var(--text-muted);
    min-height: 32px;
}

.more .form-grid { margin-top: 10px; }

.editor-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.editor-stats strong { color: var(--text); font-variant-numeric: tabular-nums; }

textarea.editor-fallback {
    min-height: 420px;
    font-family: ui-monospace, Consolas, monospace;
    direction: ltr;
    text-align: left;
}

.repeater { display: flex; flex-direction: column; gap: 10px; }

.repeater-row {
    display: grid;
    gap: 8px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
}

.faq-row { grid-template-columns: 1fr 36px; }
.faq-row textarea { grid-column: 1; min-height: 64px; }
.faq-row .icon-btn { grid-column: 2; grid-row: 1; }
.link-row { grid-template-columns: 1fr 1.4fr 120px auto 36px; align-items: center; }

@media (max-width: 700px) {
    .link-row { grid-template-columns: 1fr; }
}

.icon-btn {
    min-height: 36px;
    width: 36px;
    padding: 0;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.icon-btn:hover { color: var(--danger); border-color: var(--danger); filter: none; }

.site-pick { max-height: 520px; overflow: auto; }
.site-pick thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.site-pick select { min-width: 200px; min-height: 38px; padding: 6px 10px; }
.site-label { margin: 0; color: var(--text); cursor: pointer; direction: ltr; text-align: right; }
.w-check { width: 36px; }
.cat-hint { display: block; font-size: 0.78rem; color: #c4b5fd; min-height: 1em; }

.score-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.score-wrap h2 { margin: 0; font-size: 1rem; }
.score-wrap p { margin: 2px 0 0; }

.score {
    --p: 0;
    --c: var(--danger);
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--border) 0);
}

.score span {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-heading);
}

.score.ok { --c: var(--ok); }
.score.warn { --c: #fbbf24; }

.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.86rem;
}

.checklist li {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 3px 0;
}

.checklist li::before {
    flex: 0 0 auto;
    width: 1.1em;
    text-align: center;
    font-weight: 700;
}

.checklist li.ok::before { content: "✓"; color: var(--ok); }
.checklist li.warn::before { content: "!"; color: #fbbf24; }
.checklist li.bad::before { content: "✕"; color: var(--danger); }
.checklist li.ok { color: var(--text-muted); }

.serp {
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-family: Arial, Vazirmatn, sans-serif;
    direction: rtl;
}

.serp-url { color: #202124; font-size: 0.8rem; direction: ltr; text-align: right; }
.serp-title { color: #1a0dab; font-size: 1.1rem; line-height: 1.35; margin: 4px 0; }
.serp-desc { color: #4d5156; font-size: 0.86rem; line-height: 1.55; }

.img-preview {
    aspect-ratio: 16 / 9;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--bg);
    margin-bottom: 10px;
}

.img-preview img { width: 100%; height: 100%; object-fit: cover; }

.input-group { display: flex; gap: 6px; }
.input-group input { flex: 1; }
.upload-btn { margin: 0; cursor: pointer; white-space: nowrap; }

.studio-side .check { margin: 4px 0; font-size: 0.92rem; }

.danger-zone {
    display: flex;
    justify-content: flex-start;
    margin-top: 16px;
}

.ai-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(3px);
}

.ai-overlay[hidden] { display: none; }

.ai-overlay-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
    max-width: 90vw;
}

.spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(139, 92, 246, 0.25);
    border-top-color: #8b5cf6;
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toast {
    position: fixed;
    bottom: 88px;
    left: 24px;
    z-index: 110;
    max-width: min(420px, 90vw);
    padding: 12px 16px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid var(--border-strong);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.toast-ok { border-color: var(--ok); }
.toast-warn { border-color: #fbbf24; }
.toast-error { border-color: var(--danger); }

/* CKEditor 5 (v43) dark theme */
.studio .ck {
    --ck-color-base-background: var(--bg);
    --ck-color-base-foreground: var(--surface);
    --ck-color-base-border: var(--border-strong);
    --ck-color-text: var(--text);
    --ck-color-toolbar-background: var(--surface);
    --ck-color-toolbar-border: var(--border);
    --ck-color-button-default-hover-background: #273449;
    --ck-color-button-on-background: #0c4a6e;
    --ck-color-button-on-hover-background: #075985;
    --ck-color-button-on-color: #e0f2fe;
    --ck-color-dropdown-panel-background: var(--surface);
    --ck-color-dropdown-panel-border: var(--border);
    --ck-color-panel-background: var(--surface);
    --ck-color-panel-border: var(--border);
    --ck-color-input-background: var(--bg);
    --ck-color-input-border: var(--border-strong);
    --ck-color-input-text: var(--text);
    --ck-color-labeled-field-label-background: var(--surface);
    --ck-color-list-background: var(--surface);
    --ck-color-list-button-hover-background: #273449;
    --ck-color-list-button-on-background: #0c4a6e;
    --ck-color-list-button-on-text: #e0f2fe;
    --ck-color-tooltip-background: #020617;
    --ck-color-focus-border: var(--accent);
    --ck-font-face: var(--font);
}

.studio .ck.ck-editor__editable {
    min-height: 460px;
    max-height: 75vh;
    overflow-y: auto;
}

.studio .ck-content p,
.studio .ck-content li { line-height: 1.95; }

.studio .ck input,
.studio .ck textarea { min-height: 0; }

.studio .ck.ck-sticky-panel__content_sticky { top: 64px !important; }

/* ---------- campaign progress ---------- */

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin: 8px 0 4px;
}

.progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--ok));
    transition: width 400ms ease;
}

.target-error { color: #fca5a5; font-size: 0.82rem; max-width: 360px; }

/* ---------- backlinks ---------- */

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-row .card { margin: 0; }

.placements { display: flex; flex-wrap: wrap; gap: 4px; }

.bulk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
}

.bulk-bar[hidden] { display: none; }

.link-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }

.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.site-override {
    display: grid;
    grid-template-columns: auto 1fr minmax(160px, 1fr);
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
}

.site-override label { margin: 0; color: var(--text); }
.all-sites-on .site-override [data-site-box] { opacity: 0.35; }
.field .label { color: var(--text-muted); font-size: 0.92rem; }
a.card.stat { color: inherit; text-decoration: none; }
a.card.stat:hover { border-color: var(--accent); }
details.card > summary { cursor: pointer; list-style-position: inside; }
.site-override input[type="text"] { min-height: 36px; padding: 6px 10px; }

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