/* Geo-Autopilot — app console styles.
   Shares the exact design tokens and component language of the marketing
   site (public/marketing.css) so the product UI matches the landing page. */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Schibsted+Grotesk:wght@400;500;600;700;800;900&display=swap");

:root {
    --green-50: #e8fcef;
    --green-100: #c6f8d9;
    --green-200: #97f2be;
    --green-300: #5deda0;
    --green-400: #1fe786;
    --green-500: #00e27a;
    --green-600: #00c76c;
    --green-700: #00a85b;
    --green-800: #0a7a47;
    --green-900: #0c5635;
    --ink-950: #0a0b0d;
    --ink-900: #14161a;
    --ink-800: #1f232a;
    --ink-700: #2c313a;
    --ink-600: #474d58;
    --ink-500: #687078;
    --ink-400: #969ca6;
    --ink-300: #c2c7cf;
    --ink-200: #e2e5ea;
    --ink-150: #eaedf1;
    --ink-100: #f1f3f6;
    --ink-50: #f7f8fa;
    --white: #fff;
    --surface-canvas: var(--ink-50);
    --surface-card: var(--white);
    --text-strong: var(--ink-950);
    --text-body: var(--ink-800);
    --text-muted: var(--ink-500);
    --border-hairline: var(--ink-200);
    --font-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extra: 800;
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-pill: 999px;
    --shadow-xs: 0 1px 2px rgba(10, 11, 13, 0.05);
    --shadow-sm: 0 1px 2px rgba(10, 11, 13, 0.06), 0 2px 6px rgba(10, 11, 13, 0.05);
    --shadow-md: 0 2px 4px rgba(10, 11, 13, 0.05), 0 8px 20px rgba(10, 11, 13, 0.07);
    --shadow-lg: 0 6px 14px rgba(10, 11, 13, 0.07), 0 22px 48px rgba(10, 11, 13, 0.10);
    --shadow-accent: 0 6px 20px color-mix(in srgb, var(--green-500) 38%, transparent);
    --ring-accent: 0 0 0 3px color-mix(in srgb, var(--green-500) 38%, transparent);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 120ms;
    --dur-base: 200ms;
    --dur-slow: 320ms;
    --z-sticky: 100;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-body);
    background:
        radial-gradient(1100px 520px at 100% -8%, color-mix(in srgb, var(--green-500) 7%, transparent), transparent 60%),
        var(--surface-canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--text-strong);
    font-weight: var(--fw-extra);
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 2.4vw, 2.6rem); }

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--green-200); color: var(--ink-950); }
:focus-visible { outline: none; box-shadow: var(--ring-accent); }

/* Keyboard skip link: jump past the nav straight to the page content */
.skip-link {
    position: absolute;
    left: 12px;
    top: -100px;
    z-index: 1000;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--ink-950);
    color: var(--white);
    font-weight: var(--fw-semibold);
    text-decoration: none;
    transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus-visible { top: 12px; box-shadow: var(--ring-accent); }

/* ---------- App shell: persistent left sidebar + content column ----------
   The sidebar hugs the left viewport edge (no centered frame, so it never
   floats inward on wide monitors); the content column fills the rest and
   centres its own .app-main, keeping line lengths comfortable. */
.app-frame { display: flex; align-items: stretch; min-height: 100vh; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: var(--fw-extra);
    letter-spacing: -0.03em;
    color: var(--ink-950);
    white-space: nowrap;
}
.brand b { color: var(--green-600); }
.brand-mark { width: 30px; height: 30px; flex: none; border-radius: 8px; display: block; }

.app-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    z-index: var(--z-sticky);
    height: 100vh;
    width: 256px;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 16px;
    border-right: 1px solid var(--ink-150);
    background: color-mix(in srgb, var(--white) 70%, transparent);
    backdrop-filter: blur(14px) saturate(1.4);
}
.app-sidebar__brand { padding: 6px 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-sidebar__toggle {
    display: inline-grid;
    place-items: center;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    flex: none;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--ink-600);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.app-sidebar__toggle .icon { width: 18px; height: 18px; color: var(--ink-400); }
.app-sidebar__toggle:hover { background: var(--ink-50); border-color: var(--ink-300); color: var(--ink-950); }
.app-nav { display: flex; flex-direction: column; gap: 3px; }
.app-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--ink-600);
    font-size: 14.5px;
    font-weight: var(--fw-semibold);
    cursor: pointer;
    transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.app-nav__link .icon { width: 18px; height: 18px; flex: none; color: var(--ink-400); transition: color var(--dur-base) var(--ease-out); }
.app-nav__link:hover { background: var(--ink-100); color: var(--ink-950); }
.app-nav__link:hover .icon { color: var(--ink-600); }
.app-nav__link[aria-current="page"] { background: var(--green-50); color: var(--green-900); }
.app-nav__link[aria-current="page"] .icon { color: var(--green-700); }

.app-sidebar__foot { display: block; margin: 0; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--ink-150); }
.app-nav__logout { width: 100%; justify-content: flex-start; border: none; background: none; box-shadow: none; min-height: 0; font: inherit; }
.app-nav__logout:hover { background: var(--ink-100); }

.app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.nav-collapsed .app-sidebar,
.app-frame--nav-collapsed .app-sidebar { width: 76px; padding-left: 10px; padding-right: 10px; }
.nav-collapsed .app-sidebar__brand,
.app-frame--nav-collapsed .app-sidebar__brand {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 4px 0 18px;
}
.nav-collapsed .app-sidebar__brand .brand,
.app-frame--nav-collapsed .app-sidebar__brand .brand {
    width: 38px;
    height: 38px;
    justify-content: center;
    border-radius: var(--radius-md);
}
.nav-collapsed .app-sidebar__brand .brand span,
.nav-collapsed .app-nav__link span,
.app-frame--nav-collapsed .app-sidebar__brand .brand span,
.app-frame--nav-collapsed .app-nav__link span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nav-collapsed .app-sidebar__toggle,
.nav-collapsed .app-nav__link,
.app-frame--nav-collapsed .app-sidebar__toggle,
.app-frame--nav-collapsed .app-nav__link { justify-content: center; padding-left: 0; padding-right: 0; }
.nav-collapsed .app-sidebar__foot,
.app-frame--nav-collapsed .app-sidebar__foot { align-self: stretch; }

/* Sidebar collapses to a sticky top bar on narrow screens. */
@media (max-width: 860px) {
    .app-frame { flex-direction: column; }
    .app-sidebar {
        flex-direction: row;
        align-items: center;
        gap: 4px;
        width: auto;
        height: auto;
        padding: 10px 14px;
        border-right: none;
        border-bottom: 1px solid var(--ink-150);
        box-shadow: var(--shadow-xs);
    }
    .app-sidebar__brand { padding: 0 10px 0 4px; }
    .app-nav { flex-direction: row; gap: 2px; }
    .app-sidebar__foot { margin: 0 0 0 auto; padding-top: 0; border-top: none; }
    .app-nav__logout { width: auto; padding: 10px 12px; }
    .nav-collapsed .app-sidebar,
    .app-frame--nav-collapsed .app-sidebar { width: auto; padding: 10px 14px; }
    .nav-collapsed .app-sidebar__brand,
    .app-frame--nav-collapsed .app-sidebar__brand { flex-direction: row; gap: 8px; padding: 0 4px; }
    .nav-collapsed .app-sidebar__brand .brand,
    .app-frame--nav-collapsed .app-sidebar__brand .brand { width: auto; height: auto; }
}
/* Phones: icon-only nav so brand + 3 links + logout fit 360px. Labels stay in
   the accessibility tree (visually hidden), so screen readers keep the names. */
@media (max-width: 560px) {
    .app-sidebar__toggle { display: none; }
    .app-sidebar__brand .brand span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    .app-nav__link span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    .app-nav__link { padding: 10px; }
}

/* ---------- Buttons ---------- */
.btn, .button-link, .topbar__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    background: var(--green-500);
    color: var(--ink-950);
    cursor: pointer;
    font-weight: var(--fw-semibold);
    letter-spacing: -0.005em;
    white-space: nowrap;
    transition: transform var(--dur-fast) var(--ease-out), background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.btn:hover { background: var(--green-600); box-shadow: var(--shadow-accent); }
.btn:active, .button-link:active, .topbar__logout:active { transform: translateY(1px); }

.btn--secondary, .button-link, .topbar__logout {
    background: var(--white);
    border-color: var(--ink-200);
    color: var(--ink-950);
    box-shadow: var(--shadow-xs);
}
.btn--secondary:hover, .button-link:hover, .topbar__logout:hover {
    background: var(--ink-50);
    border-color: var(--ink-300);
    box-shadow: var(--shadow-sm);
}
.btn--danger {
    background: #fff5f6;
    border-color: color-mix(in srgb, #dc3a45 26%, var(--ink-200));
    color: #a61f2a;
}
.btn--danger:hover {
    background: #ffecee;
    border-color: color-mix(in srgb, #dc3a45 42%, var(--ink-200));
    box-shadow: 0 6px 16px rgba(220, 58, 69, 0.12);
}
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-800); }
.btn--ghost:hover { background: var(--ink-100); }
.btn--sm, .topbar__logout { min-height: 34px; padding: 0 13px; font-size: 13px; border-radius: var(--radius-sm); }
.btn--block { width: 100%; }
.btn:disabled,
.btn:disabled:hover,
.btn:disabled:active {
    background: var(--ink-100);
    border-color: var(--ink-200);
    color: var(--ink-400);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}
.btn:disabled .icon { color: var(--ink-400); }

.icon { display: inline-block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.btn .icon, .button-link .icon { width: 1.05em; height: 1.05em; }

/* ---------- Layout shells ---------- */
.app-main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 40px 64px; }
.app-main--article { max-width: 1680px; padding-left: 32px; padding-right: 32px; }
@media (max-width: 640px) { .app-main { padding: 24px 18px 48px; } }

/* Discreet legal footer — present on every console page, kept muted and below
   the fold so it never competes with the main path. */
.app-foot { border-top: 1px solid var(--ink-150); margin-top: 8px; }
.app-foot__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 22px 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    font-size: 13px;
}
.app-foot__copy { color: var(--ink-500); font-weight: var(--fw-medium); }
.app-foot__links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.app-foot__links a { color: var(--ink-500); font-weight: var(--fw-medium); }
.app-foot__links a:hover { color: var(--ink-900); }
@media (max-width: 720px) { .app-foot__inner { padding: 18px 16px; } }

.support-chat {
    position: fixed;
    right: 22px;
    bottom: 20px;
    z-index: calc(var(--z-sticky) + 20);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 304px;
    max-width: calc(100vw - 32px);
    min-height: 56px;
    padding: 8px 10px 8px 8px;
    border: 1px solid color-mix(in srgb, var(--green-700) 22%, transparent);
    border-radius: var(--radius-lg);
    background: var(--green-500);
    color: var(--ink-950);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.support-chat:hover {
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--green-500) 88%, var(--white));
    box-shadow: 0 10px 22px rgba(10, 11, 13, 0.12), 0 24px 52px rgba(10, 11, 13, 0.14);
}
.support-chat--hidden { display: none; }
.support-chat__avatar {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: var(--radius-pill);
    border: 2px solid color-mix(in srgb, var(--white) 70%, transparent);
    background: var(--green-50);
}
.support-chat__copy { display: grid; gap: 1px; min-width: 0; flex: 1; }
.support-chat__line { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.support-chat__name {
    overflow: hidden;
    color: var(--ink-950);
    font-size: 14px;
    font-weight: var(--fw-bold);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.support-chat__role { color: var(--ink-700); font-size: 12px; font-style: normal; font-weight: var(--fw-medium); }
.support-chat__hint { color: var(--ink-800); font-size: 13px; line-height: 1.2; }
.support-chat__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: var(--ink-950);
    color: var(--white);
    font-size: 13px;
    font-weight: var(--fw-bold);
}
@media (max-width: 640px) {
    .support-chat {
        right: 12px;
        bottom: 12px;
        min-width: 0;
        width: auto;
        max-width: calc(100vw - 24px);
        gap: 8px;
        padding: 7px 8px 7px 7px;
        border-radius: var(--radius-pill);
    }
    .support-chat__copy { display: none; }
    .support-chat__hint { display: none; }
    .support-chat__role { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    .support-chat__pill { min-width: 42px; padding: 0 12px; }
}

/* ---------- Auth (login / register) ---------- */
.auth-shell {
    background:
        radial-gradient(900px 480px at 50% -10%, color-mix(in srgb, var(--green-500) 10%, transparent), transparent 62%),
        var(--surface-canvas);
}
.auth-main { min-height: 100vh; display: grid; align-items: center; justify-items: center; padding: 32px 16px; }
.auth-stage { width: min(440px, 100%); display: grid; justify-items: center; gap: 22px; }
.auth-stage .brand { margin: 0; }
.auth-stage .auth-panel { width: 100%; margin-top: 0; padding: 30px 28px; box-shadow: var(--shadow-md); }
.auth-foot { font-size: 13.5px; }
.auth-foot a { color: var(--ink-500); transition: color var(--dur-base) var(--ease-out); }
.auth-foot a:hover { color: var(--ink-950); }
/* Discreet legal links so Impressum/Datenschutz are reachable from auth too. */
.auth-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: -8px; font-size: 12.5px; }
.auth-legal a { color: var(--ink-500); font-weight: var(--fw-medium); }
.auth-legal a:hover { color: var(--ink-900); }
.auth-panel__lede { margin: 10px 0 0; color: var(--ink-600); font-size: 14.5px; }

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, #dc3a45 32%, var(--ink-200));
    border-radius: var(--radius-md);
    background: #fff5f6;
    color: #a61f2a;
    font-size: 14px;
    font-weight: var(--fw-medium);
}
.form-alert .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* ---------- Eyebrow ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: var(--fw-medium);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: var(--radius-pill);
    background: var(--green-500);
    flex: none;
}

/* ---------- Cards ---------- */
.console-card, .preview-panel, .action-panel, .error-panel, .empty-state {
    margin-top: 16px;
    background: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}
.console-card + .console-card { margin-top: 20px; }
/* Base card typography. Wrapped in :where() so it stays zero-specificity:
   these are defaults that must never beat a component's own class
   (e.g. .billing-state__lead). See AGENTS.md → "CSS-Spezifität". */
:where(.console-card, .hero-card) h1 { margin: 14px 0 10px; }
:where(.console-card, .hero-card) > p { margin: 10px 0 0; color: var(--ink-600); font-size: 15.5px; }

.hero-card {
    padding: 32px;
    background:
        radial-gradient(130% 130% at 96% -10%, color-mix(in srgb, var(--green-500) 16%, transparent), transparent 48%),
        radial-gradient(90% 120% at 4% 110%, color-mix(in srgb, var(--green-700) 7%, transparent), transparent 55%),
        linear-gradient(180deg, color-mix(in srgb, #fff 60%, transparent), transparent 120px),
        var(--surface-card);
    box-shadow: var(--shadow-md);
}
.hero-card h1 { font-size: clamp(2rem, 3vw, 2.8rem); }
.hero-card__lede { margin: 12px 0 0; max-width: 60ch; color: var(--ink-600); font-size: 16.5px; }
.hero-card__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Dashboard overview hero: greeting + CTA up top, an inventory scoreboard along
   the bottom — the page leads with weight and status instead of a bare line. */
.hero-card--overview { padding-bottom: 0; }
.hero-card__head { min-width: 0; }
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 30px -32px 0;
    padding: 24px 32px 28px;
    border-top: 1px solid var(--ink-150);
}
.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px 26px;
    border-left: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    color: inherit;
    transition: transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.hero-stat:first-child { border-left: none; padding-left: 0; }
.hero-stat:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--green-500) 5%, transparent); }
.hero-stat__k { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-medium); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.hero-stat__k .icon {
    width: 28px; height: 28px; flex: none; padding: 6px; border-radius: 8px;
    color: var(--green-700);
    background: color-mix(in srgb, var(--green-500) 12%, transparent);
    transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.hero-stat:hover .hero-stat__k .icon { background: color-mix(in srgb, var(--green-500) 20%, transparent); color: var(--green-800); }
.hero-stat__v { font-size: 34px; font-weight: var(--fw-extra); letter-spacing: -0.03em; line-height: 1; color: var(--ink-950); font-variant-numeric: tabular-nums; transition: color var(--dur-base) var(--ease-out); }
.hero-stat:hover .hero-stat__v { color: var(--green-800); }
.hero-stat__delta {
    display: inline-flex; align-self: flex-start; align-items: center;
    padding: 2px 9px; border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--green-500) 16%, transparent);
    color: var(--green-800); font-family: var(--font-mono); font-size: 10.5px; font-weight: var(--fw-semibold); letter-spacing: 0.02em;
}
/* Match the hero's 18px padding at this breakpoint so the full-bleed top border
   lines up with the card edges instead of overflowing. */
@media (max-width: 720px) {
    .hero-stats { margin: 24px -18px 0; padding: 20px 18px 20px; }
    .hero-stat { padding: 2px 14px; gap: 6px; }
    .hero-stat__v { font-size: 25px; }
}
@media (max-width: 520px) {
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    .hero-stat {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px 12px;
        padding: 10px 0;
        border-left: none;
        border-top: 1px solid var(--ink-150);
        border-radius: 0;
    }
    .hero-stat:first-child {
        padding-left: 0;
        border-top: none;
    }
    .hero-stat__k {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .hero-stat__v {
        grid-column: 2;
        grid-row: 1;
        font-size: 26px;
    }
    .hero-stat__delta {
        grid-column: 1 / -1;
        max-width: 100%;
        white-space: normal;
    }
}

/* Two-column work grid on the dashboard: queues sit side by side on wide
   screens, collapse to one column when the cards can no longer fit. */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(358px, 1fr)); gap: 20px; margin-top: 20px; align-items: start; }
.dash-grid > .console-card { margin-top: 0; }
/* The "Neueste Artikel" card carries the most weight and gets the full row.
   A card left alone in the second row (or as the grid's only card) spans
   too — a lone half-width card next to empty space looks broken. */
.dash-grid > .dash-grid__span,
.dash-grid > .console-card:only-child,
.dash-grid > .dash-grid__span + .console-card:last-child { grid-column: 1 / -1; }
@media (max-width: 460px) { .dash-grid { grid-template-columns: 1fr; } }

/* Staggered entrance on the dashboard: hero, then quick-links, then the work
   grid settle in sequence — a premium first impression. Motion-safe only. */
@media (prefers-reduced-motion: no-preference) {
    @keyframes dash-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
    .hero-card--overview, .recent-sites, .dash-grid { animation: dash-rise var(--dur-slow) var(--ease-out) both; }
    .recent-sites { animation-delay: 70ms; }
    .dash-grid { animation-delay: 140ms; }
}

/* "Zuletzt aktiv": favicon chips for quick re-entry into a site. Lives on the
   canvas (no card wrapper) so the favicons add colour without another box. */
.recent-sites { margin-top: 24px; }
.recent-sites .section-head { margin-bottom: 14px; }
.recent-sites__row { display: flex; flex-wrap: wrap; gap: 12px; }
.recent-site {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 9px 16px 9px 9px;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    box-shadow: var(--shadow-xs);
    color: var(--ink-800);
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.recent-site:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--green-300); color: var(--green-800); }
.recent-site:hover .site-card__favicon { color: var(--green-300); }
.recent-site__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; font-size: 14px; font-weight: var(--fw-semibold); }
.recent-site .site-card__favicon { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.recent-site .site-card__favicon .icon { width: 18px; height: 18px; }
.recent-site .site-card__favicon-img { width: 20px; height: 20px; }
@media (max-width: 520px) {
    .recent-sites__row { display: grid; grid-template-columns: 1fr; gap: 10px; }
    .recent-site { width: 100%; }
    .recent-site__name { max-width: none; min-width: 0; }
}

/* ---------- Page hero (list pages) ---------- */
.page-hero {
    margin-top: 8px;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.9fr);
    gap: 28px;
    align-items: start;
}
.page-hero__copy { max-width: 680px; }
/* List/detail page titles read as a focused console header, not a landing-page
   hero — confident but tighter than the dashboard's welcome, so working pages
   lead with their content instead of a wall of display type. */
.page-hero h1 { margin: 10px 0 0; font-size: clamp(1.75rem, 2.4vw, 2.15rem); }
.page-hero__lede { max-width: 56ch; margin-top: 10px; color: var(--ink-600); font-size: 15.5px; }
.page-hero--single { grid-template-columns: 1fr; }
.site-form__head { grid-column: 1 / -1; margin-bottom: 2px; }

/* Websites list: the page leads with the user's actual sites, so "add a
   website" becomes one calm compose-bar — header copy full width on top, then
   domain · country · button on a single row — instead of a big form card that
   floats opposite the title and leaves an awkward empty L. */
.page-hero--compose { grid-template-columns: 1fr; gap: 20px; }
.page-hero--compose .site-form {
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 16px;
}
.page-hero--compose .site-form button { grid-column: auto; min-width: max-content; }
@media (max-width: 720px) {
    .page-hero--compose .site-form { grid-template-columns: 1fr 1fr; }
    .page-hero--compose .site-form button { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
    .page-hero--compose .site-form { grid-template-columns: 1fr; }
}

/* ---------- Console breadcrumbs ---------- */
.console-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-500);
}
.console-crumbs a { color: var(--ink-500); transition: color var(--dur-base) var(--ease-out); }
.console-crumbs a:hover { color: var(--ink-950); }
.console-crumbs [aria-current="page"] {
    color: var(--ink-800);
    max-width: 46ch;
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.console-crumbs__sep { color: var(--ink-300); }

/* ---------- Article detail ---------- */
.article-hero { margin-top: 10px; }
.article-hero__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 11px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-pill);
    background: var(--ink-50);
    color: var(--ink-600);
    font-family: var(--font-mono);
    font-size: 11.5px;
    overflow-wrap: anywhere;
}
.meta-chip .icon { width: 13px; height: 13px; color: var(--green-700); }

/* ---------- Forms ---------- */
form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; gap: 14px; }
.auth-panel form, .topbar form, .action-panel form, .action-stack form { display: block; }
label { display: block; font-size: 14px; font-weight: var(--fw-semibold); color: var(--ink-800); }
input, .field-select {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 7px;
    padding: 10px 14px;
    border: 1.5px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--ink-950);
    box-shadow: inset 0 1px 2px rgba(10, 11, 13, 0.03);
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
input:focus, .field-select:focus { border-color: var(--green-500); box-shadow: var(--ring-accent); }
/* Country picker: native <select> styled like the inputs, with a custom caret
   so it matches the form instead of the OS default control. */
.field-select {
    appearance: none;
    cursor: pointer;
    padding-right: 38px;
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--fw-medium);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23687078' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.field-hint { display: block; margin-top: 6px; font-size: 12.5px; font-weight: var(--fw-medium); color: var(--ink-500); }

/* Field label with an on-demand help hint: the text stays hidden behind a
   small "?" so inputs keep an even baseline and the form reads as
   self-explanatory. Mouse users get it on hover, touch users on tap (focus);
   the absolutely positioned popover never reflows the layout. */
.field-head { display: inline-flex; align-items: center; gap: 7px; }
.field-help { position: relative; display: inline-flex; }
.field-help__btn {
    width: 16px;
    height: 16px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--ink-300);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-500);
    font-size: 11px;
    font-weight: var(--fw-bold);
    line-height: 1;
    cursor: help;
    transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.field-help__btn:focus-visible { outline: none; box-shadow: var(--ring-accent); }
.field-help:hover .field-help__btn,
.field-help:focus-within .field-help__btn { border-color: var(--green-500); color: var(--green-800); }
.field-help__pop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 8;
    width: max-content;
    max-width: 220px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    background: var(--ink-950);
    color: var(--white);
    font-size: 12.5px;
    font-weight: var(--fw-medium);
    line-height: 1.45;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base) var(--ease-out);
}
.field-help:hover .field-help__pop,
.field-help:focus-within .field-help__pop { opacity: 1; visibility: visible; transform: none; }

/* Password field with reveal toggle */
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; padding-right: 92px; }
/* Scoped under .pw-field to beat the auth panel's full-width button rule. */
.pw-field .pw-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    bottom: auto;
    width: auto;
    margin: 0;
    transform: translateY(-50%);
    border: 0;
    background: none;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: var(--fw-medium);
    color: var(--ink-500);
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.pw-field .pw-toggle:hover { color: var(--green-800); }
.pw-field .pw-toggle:focus-visible { outline: none; box-shadow: var(--ring-accent); }

.site-form {
    margin-top: 0;
    padding: 20px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--green-500) 9%, transparent), transparent 42%),
        var(--ink-50);
    box-shadow: var(--shadow-xs);
}
.site-form label { font-size: 14px; }
.site-form button { grid-column: 1 / -1; align-self: end; }

/* ---------- Auth ---------- */
.auth-panel { width: 100%; }
.auth-panel form { margin-top: 20px; }
.auth-panel label + label { margin-top: 14px; }
.auth-panel button { width: 100%; margin-top: 18px; }
.auth-panel > p { margin-top: 16px; font-size: 14px; color: var(--ink-600); }
.auth-panel > p a { color: var(--green-800); font-weight: var(--fw-semibold); }
.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    font-size: 13.5px;
    font-weight: var(--fw-medium);
    color: var(--ink-700);
}
/* The legal copy holds long German compounds ("Auftragsverarbeitungsvertrag");
   let them break so they can't inflate the auth panel past a small viewport. */
/* The consent text is one wrapping paragraph (a single flex item), so links
   like "AGB" stay intact instead of shattering per character; min-width:0 lets
   it shrink in the flex row, overflow-wrap is a safety net for very long words. */
.consent-check__text { min-width: 0; overflow-wrap: anywhere; }
.auth-panel .field-hint { overflow-wrap: anywhere; }
.consent-check input {
    display: inline-block;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 2px 0 0;
    box-shadow: none;
}
.consent-check a, .auth-panel .field-hint a { color: var(--green-800); font-weight: var(--fw-semibold); }

/* ---------- Sites ---------- */
.site-list { display: grid; gap: 18px; margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }
.site-card {
    padding: 22px;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-xl);
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.site-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--green-300); }
.site-card:hover .site-card__favicon { color: var(--green-300); }

.site-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.site-card__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.site-card__favicon {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 12px;
    background: var(--ink-950);
    color: var(--green-400);
}
.site-card__favicon .icon { width: 22px; height: 22px; }
/* Favicon or globe, never both: while the image exists the globe stays
   hidden; onerror removes the image and the globe takes over. */
.site-card__favicon-img { grid-area: 1 / 1; width: 26px; height: 26px; border-radius: 6px; }
.site-card__favicon-img ~ .icon { display: none; }
.site-hero__id .site-card__favicon-img { width: 30px; height: 30px; }
.site-card__idtext { min-width: 0; }
.site-card__title { font-size: clamp(1.2rem, 1.6vw, 1.5rem); line-height: 1.15; overflow-wrap: anywhere; transition: color var(--dur-base) var(--ease-out); }
.site-card:hover .site-card__title { color: var(--green-700); }
.site-card__meta { margin-top: 5px; color: var(--ink-500); font-family: var(--font-mono); font-size: 11.5px; overflow-wrap: anywhere; }

a.site-card { display: block; color: inherit; text-decoration: none; }

.site-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 20px; align-items: stretch; }
.site-fact { min-height: 84px; padding: 11px 13px; border: 1px solid var(--ink-150); border-radius: var(--radius-md); background: var(--ink-50); }
.site-fact--next { background: var(--green-50); border-color: var(--green-200); }
/* The "Erstellt" fact doubles as a jump-link to the article list on the detail
   page — hover lifts it and nudges the arrow so it reads as clickable. */
a.site-fact--link { display: block; cursor: pointer; transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out); }
a.site-fact--link:hover { border-color: var(--green-300); background: var(--white); }
.site-fact--link .site-fact__detail .icon { width: 12px; height: 12px; vertical-align: -1px; transition: transform var(--dur-base) var(--ease-out); }
.site-fact--link:hover .site-fact__detail { color: var(--green-800); }
.site-fact--link:hover .site-fact__detail .icon { transform: translateX(2px); }
.site-fact__k { display: flex; align-items: center; gap: 7px; color: var(--ink-500); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; }
.site-fact__k .icon { width: 13px; height: 13px; color: var(--green-700); stroke-width: 2; }
.site-fact__v { display: block; margin-top: 8px; font-size: 17px; font-weight: var(--fw-bold); line-height: 1.2; color: var(--ink-950); }
.site-fact__detail {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 3px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--ink-600);
}
.site-card__open {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--ink-150);
    font-size: 13px;
    font-weight: var(--fw-semibold);
    color: var(--ink-500);
    transition: color var(--dur-base) var(--ease-out);
}
.site-card:hover .site-card__open { color: var(--green-800); }
.site-card__open .icon { width: 15px; height: 15px; transition: transform var(--dur-base) var(--ease-out); }
.site-card:hover .site-card__open .icon { transform: translateX(3px); }
.site-card__delete { margin-left: auto; min-width: 0 !important; color: var(--ink-500); }
.site-card__delete:hover { background: #fff0f1; color: #a61f2a; }

/* ---------- Website detail ---------- */
.site-hero { margin-top: 10px; }
.site-hero .page-hero__copy { max-width: none; }
.site-hero__id { display: flex; align-items: center; gap: 16px; }
.site-hero__id h1 { margin: 4px 0 6px; font-size: clamp(1.7rem, 2.6vw, 2.3rem); overflow-wrap: anywhere; }
.site-hero__id .site-card__favicon { width: 54px; height: 54px; border-radius: 14px; }
.site-hero__id .site-card__favicon .icon { width: 26px; height: 26px; }
.site-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.site-hero__actions form { margin: 0; display: block; }

.site-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
    margin-top: 20px;
}
.site-layout > .site-main { min-width: 0; }
.site-main > .console-card { margin-top: 0; }
.site-main > .console-card + .console-card { margin-top: 20px; }
.site-side { display: grid; gap: 20px; position: sticky; top: 86px; }
.site-side__card .brand-profile { margin-top: 12px; }
.site-side .site-facts { grid-template-columns: 1fr; margin-top: 12px; }

/* Calendar overview rows on the website detail page */
.site-cal { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.site-cal__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    background: var(--ink-50);
    transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.site-cal__item:hover {
    border-color: var(--green-300);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.site-cal__item--drafted { background: var(--green-50); border-color: var(--green-200); }

/* Approval/rework queues: the whole row opens the article (one real <a> the
   keyboard reaches, stretched across the row), so the click target is the
   full row — not just the small button. The hover lift signals it. */
.site-cal--rowlink .site-cal__item { cursor: pointer; }
.site-cal--rowlink .site-cal__item:hover { transform: translateY(-1px); }
.site-cal--rowlink .site-cal__action::after { content: ""; position: absolute; inset: 0; }
.site-cal__date { flex: none; min-width: 84px; color: var(--ink-500); font-family: var(--font-mono); font-size: 11.5px; }
.site-cal__topic { min-width: 0; flex: 1; font-size: 14px; font-weight: var(--fw-semibold); color: var(--ink-950); overflow-wrap: anywhere; }
.site-cal__item form { margin: 0; display: block; }
.site-cal__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 6px 10px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--ink-800);
    font-size: 12.5px;
    font-weight: var(--fw-semibold);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
/* Hovering anywhere on a row fills its action with the brand accent — the clear
   "do this next". Identical whether the row is a whole-row link (approval queue)
   or carries a form button (planned slots), so the panels behave the same. */
.site-cal__action:hover,
.site-cal__item:hover .site-cal__action { background: var(--green-500); border-color: var(--green-500); color: var(--ink-950); box-shadow: var(--shadow-accent); }
.site-cal__action .icon { width: 13px; height: 13px; transition: transform var(--dur-base) var(--ease-out); }
.site-cal__item:hover .site-cal__action .icon { transform: translateX(2px); }
.site-cal__more { margin: 12px 2px 0; font-size: 13px; }
.site-cal__more a { color: var(--green-800); font-weight: var(--fw-semibold); }
.site-cal__domain { display: block; margin-top: 2px; color: var(--ink-500); font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-regular); }
.site-cal__pill { flex: none; display: inline-flex; }
.site-cal__schedule {
    flex: none;
    min-width: 96px;
    justify-self: end;
    color: var(--ink-600);
    font-family: var(--font-mono);
    font-size: 11.5px;
    white-space: nowrap;
    text-align: right;
}
.site-cal--dashboard .site-cal__item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 132px 144px;
    align-items: center;
    column-gap: 14px;
}
.site-cal--dashboard .site-cal__topic { width: 100%; }
.site-cal--dashboard .site-cal__pill { justify-self: end; width: 132px; justify-content: flex-end; }
.site-cal--dashboard .site-cal__pill .status-pill { width: 122px; }
.site-cal--dashboard .site-cal__item > form { justify-self: end; }
.site-cal--dashboard .site-cal__action { width: 144px; justify-content: center; }

/* Phones: stack each row — date + action on top, the full topic on its own line.
   Otherwise the fixed date column and action button starve the topic, which
   then breaks one character per line. */
@media (max-width: 560px) {
    .site-cal__item { flex-wrap: wrap; row-gap: 8px; }
    .site-cal__date {
        min-width: 0;
        max-width: calc(100% - 104px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .site-cal__topic { order: 3; flex-basis: 100%; }
    .site-cal__item > form,
    .site-cal__item > .site-cal__action {
        order: 2;
        max-width: 100%;
        margin-left: auto;
    }
    .site-cal__action {
        min-width: 0;
        white-space: nowrap;
    }
    /* Status pill would crowd the stacked phone row; the action label
       ("Prüfen"/"Ansehen") already carries the state. */
    .site-cal__pill { display: none; }
}

@media (max-width: 720px) {
    .site-cal--dashboard .site-cal__item {
        grid-template-columns: 22px minmax(0, 1fr);
        row-gap: 8px;
    }
    .site-cal--dashboard .site-cal__pill,
    .site-cal--dashboard .site-cal__schedule {
        grid-column: 1 / 2;
        justify-self: start;
        width: auto;
        min-width: 0;
    }
    .site-cal--dashboard .site-cal__item > form,
    .site-cal--dashboard .site-cal__item > .site-cal__action {
        grid-column: 2 / 3;
        justify-self: end;
    }
    .site-cal--dashboard .site-cal__action { width: auto; }
}

/* Dashboard work queues (reuse the site-cal row look) */
.queue-empty { display: flex; align-items: center; gap: 9px; margin: 14px 0 2px; color: var(--ink-600); font-size: 14px; }
.queue-empty .icon { width: 17px; height: 17px; color: var(--green-700); flex: none; }
.queue-hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-500); }
.compact-site { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; vertical-align: middle; }
.compact-site__domain { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-site__favicon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 6px;
    background: var(--white);
    border: 1px solid var(--border-hairline);
    color: var(--ink-400);
    overflow: hidden;
}
.compact-site__favicon img { grid-area: 1 / 1; width: 17px; height: 17px; border-radius: 4px; }
.compact-site__favicon img ~ .icon { display: none; }
.compact-site__favicon .icon { width: 13px; height: 13px; }
.site-cal__site-icon { display: grid; place-items: center; flex: none; }
.site-cal__date--site { min-width: 190px; max-width: 220px; }
.site-cal__date .compact-site { width: 100%; }
.site-cal__domain .compact-site { margin-top: 3px; }

.site-card__pills { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }

/* ---------- Website settings ---------- */
.settings-color { display: flex; align-items: center; gap: 12px; }
.settings-color input[type="color"] {
    width: 52px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    cursor: pointer;
}
.settings-color code { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-600); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head__count { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-500); }
.section-head__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: var(--fw-semibold);
    color: var(--ink-600);
    transition: color var(--dur-base) var(--ease-out);
}
.section-head__link:hover { color: var(--ink-950); }
.section-head__link .icon { width: 14px; height: 14px; }

.table-shell--flush { margin-top: 14px; }
.table-shell--flush table { box-shadow: none; }
.kw-term { font-weight: var(--fw-semibold); color: var(--ink-950); }
.kw-num { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.kw-intent { font-size: 11.5px; }
.kw-diff { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-700); }
.kw-diff__bar {
    display: inline-block;
    width: 72px;
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--ink-150);
    overflow: hidden;
}
.kw-diff__bar > span { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--green-500); }
.kw-diff--mid .kw-diff__bar > span { background: #f0b429; }
.kw-diff--high .kw-diff__bar > span { background: #e2574c; }

.empty-inline { display: grid; gap: 8px; justify-items: start; margin-top: 14px; }
.empty-inline strong { color: var(--ink-950); }
.empty-inline p { color: var(--ink-600); }
.empty-inline form { margin-top: 6px; display: block; }

/* ---------- AI progress overlay ---------- */
.ai-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: color-mix(in srgb, var(--ink-950) 78%, transparent);
    backdrop-filter: blur(6px);
    animation: ai-fade 0.25s var(--ease-out);
}
.ai-overlay__card {
    width: min(420px, 100%);
    padding: 34px 30px;
    border-radius: var(--radius-2xl);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 6px;
}
.ai-overlay__card .brand-mark { width: 44px; height: 44px; border-radius: 11px; }
.ai-overlay__title { margin-top: 10px; font-size: 21px; letter-spacing: -0.02em; }
.ai-overlay__spinner {
    width: 30px;
    height: 30px;
    margin-top: 12px;
    border-radius: var(--radius-pill);
    border: 3px solid var(--ink-150);
    border-top-color: var(--green-500);
    animation: ap-spin 0.8s linear infinite;
}
.ai-overlay__step {
    margin-top: 12px;
    min-height: 1.4em;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-800);
}
.ai-overlay__hint { margin-top: 2px; font-size: 12.5px; color: var(--ink-500); }
@keyframes ai-fade { from { opacity: 0; } }

/* ---------- Chips ---------- */
.chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 10px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--ink-700);
    font-size: 12.5px;
    font-weight: var(--fw-medium);
    white-space: nowrap;
}
.chip--outline { background: transparent; border-style: dashed; color: var(--ink-500); }
.chip--accent { background: var(--green-50); border-color: var(--green-200); color: var(--green-900); }

/* ---------- Brand profile (analyzed voice on the site card) ---------- */
.brand-profile {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid var(--green-200);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(140% 140% at 100% 0%, color-mix(in srgb, var(--green-500) 9%, transparent), transparent 48%),
        var(--white);
}
.brand-profile__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-profile__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.brand-profile__audience { margin: 11px 0 0; font-size: 13.5px; color: var(--ink-700); }
.brand-profile__audience strong { font-weight: var(--fw-semibold); color: var(--ink-950); }
.brand-profile__themes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 11px; }
.brand-profile__k {
    margin-right: 2px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: var(--fw-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-500);
}

/* ---------- Profile overview (read-only onboarding distillate) ---------- */
.profile-overview { margin-top: 16px; }
.profile-overview__hint { margin: 9px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-600); }
.profile-overview__list { margin: 13px 0 0; display: flex; flex-direction: column; gap: 11px; }
.profile-overview__row { display: flex; flex-direction: column; gap: 4px; }
.profile-overview__row dt {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: var(--fw-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-500);
}
.profile-overview__row dd {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink-800);
    overflow-wrap: anywhere;
}
.profile-overview__row dd:has(.chip) { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-overview__edit {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: var(--fw-medium);
    color: var(--green-700);
}
.profile-overview__edit .icon { width: 14px; height: 14px; }

/* ---------- Dashboard flight plan ---------- */
.flight-plan {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
}
.flight-plan__step {
    flex: 1 1 200px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-xs);
}
.flight-plan__node {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: var(--radius-pill);
    border: 1px solid var(--ink-200);
    background: var(--ink-50);
    color: var(--ink-500);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: var(--fw-semibold);
}
.flight-plan__node .icon { width: 15px; height: 15px; }
.flight-plan__text { display: grid; gap: 1px; min-width: 0; }
.flight-plan__text strong { font-size: 13.5px; font-weight: var(--fw-semibold); color: var(--ink-800); letter-spacing: -0.01em; }
.flight-plan__text small { font-size: 12px; color: var(--ink-500); }
.flight-plan__step.is-done .flight-plan__node { background: var(--green-500); border-color: var(--green-500); color: var(--ink-950); }
.flight-plan__step.is-done { border-color: var(--green-200); }
.flight-plan__step.is-current { border-color: var(--green-400); box-shadow: var(--ring-accent); }
.flight-plan__step.is-current .flight-plan__node { background: var(--ink-950); border-color: var(--ink-950); color: var(--green-400); }
.flight-plan__step.is-current .flight-plan__text strong { color: var(--ink-950); }

/* ---------- Tables ---------- */
.table-shell { margin-top: 16px; overflow-x: auto; border-radius: var(--radius-xl); }

/* Scroll affordance: a non-scrolling wrapper carries edge fades that appear
   only when the table can scroll horizontally (set by tableScrollShadowScript). */
.table-frame { position: relative; }
.table-frame::before,
.table-frame::after {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    width: 40px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease-out);
}
.table-frame::before {
    left: 1px;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    background: linear-gradient(to right, var(--surface-card), transparent);
}
.table-frame::after {
    right: 1px;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    background: linear-gradient(to left, var(--surface-card), transparent);
}
.table-frame.can-scroll-left::before { opacity: 1; }
.table-frame.can-scroll-right::after { opacity: 1; }
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
th {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-500);
}
thead th { background: var(--ink-50); }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--ink-150); text-align: left; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: color-mix(in srgb, var(--green-50) 40%, var(--white)); }
tbody td a { font-weight: var(--fw-semibold); color: var(--ink-950); }
tbody td a:hover { color: var(--green-800); }
td:last-child { width: 184px; }

/* Whole-row links: the first cell's anchor stretches across the row so a click
   anywhere opens it, matching the existing row hover. Keeps one real <a> for
   keyboard/screen-reader access — no JS, no duplicate links. */
.table--rowlink tbody tr { position: relative; cursor: pointer; }
.table--rowlink tbody td:first-child a::after { content: ""; position: absolute; inset: 0; }

/* "Öffnen →" affordance in the website's article rows: an outlined pill that
   fills with the brand accent when the row is hovered — the same "do this next"
   button language as the dashboard queue rows (.site-cal__action). */
.art-open { text-align: right; }
.row-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--ink-800);
    font-size: 12.5px;
    font-weight: var(--fw-semibold);
    white-space: nowrap;
    transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.row-open .icon { width: 13px; height: 13px; transition: transform var(--dur-base) var(--ease-out); }
.table--rowlink tbody tr:hover .row-open { background: var(--green-500); border-color: var(--green-500); color: var(--ink-950); box-shadow: var(--shadow-accent); }
.table--rowlink tbody tr:hover .row-open .icon { transform: translateX(2px); }

/* ---------- Data table: search / filter / sort ---------- */
/* A reusable toolbar above a table; client-side enhanced by dataTableScript. */
.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.table-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 240px;
    min-width: 200px;
    height: 44px;
    padding: 0 14px;
    background: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    color: var(--ink-400);
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.table-search:focus-within { border-color: var(--green-300); box-shadow: 0 0 0 3px var(--green-100); color: var(--ink-600); }
.table-search .icon { width: 16px; height: 16px; flex: none; }
.table-search input {
    flex: 1;
    border: none;
    outline: none;
    background: none;
    padding: 11px 0;
    font: inherit;
    font-size: 14px;
    color: var(--ink-950);
}
/* The pill carries the focus ring (:focus-within); suppress the input's own
   global focus ring so we don't get a box-in-a-box. */
.table-search input:focus { box-shadow: none; border: none; }
.table-search input::placeholder { color: var(--ink-400); }
.table-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.table-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.table-filter {
    appearance: none;
    -webkit-appearance: none;
    height: 44px;
    padding: 0 36px 0 14px;
    background-color: var(--surface-card);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 15px;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    font: inherit;
    font-size: 13.5px;
    font-weight: var(--fw-medium);
    color: var(--ink-800);
    cursor: pointer;
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.table-filter:hover { border-color: var(--ink-200); }
.table-filter:focus-visible { outline: none; border-color: var(--green-300); box-shadow: 0 0 0 3px var(--green-100); }

/* Sortable headers: the whole th is clickable; an arrow reflects aria-sort. */
th[data-sort-key] { cursor: pointer; user-select: none; }
th[data-sort-key]:hover { color: var(--ink-700); background: var(--ink-100); }
th[data-sort-key]:focus-visible { outline: 2px solid var(--green-300); outline-offset: -2px; }
.th-sort { display: inline-flex; align-items: center; gap: 6px; }
.th-sort__arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease-out);
}
th[data-sort-key]:hover .th-sort__arrow { opacity: 0.4; border-top: 5px solid currentColor; }
th[aria-sort="ascending"] .th-sort__arrow { opacity: 1; border-bottom: 5px solid var(--green-700); border-top: none; }
th[aria-sort="descending"] .th-sort__arrow { opacity: 1; border-top: 5px solid var(--green-700); border-bottom: none; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--ink-700); }

/* Favicon + domain inside a table cell. Favicon over a globe fallback, like
   the website cards — the globe shows only when no real favicon loads. */
.cell-site { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.cell-site__domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-favicon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: none;
    border-radius: 6px;
    background: var(--ink-50);
    border: 1px solid var(--border-hairline);
    color: var(--ink-400);
    overflow: hidden;
}
.cell-favicon img { grid-area: 1 / 1; width: 18px; height: 18px; border-radius: 4px; }
.cell-favicon img ~ .icon { display: none; }
.cell-favicon .icon { width: 14px; height: 14px; }

.datatable__empty {
    margin: 16px 0 0;
    padding: 28px 16px;
    text-align: center;
    color: var(--ink-500);
    background: var(--surface-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

/* ---------- Status pills ---------- */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--ink-100);
    color: var(--ink-700);
    white-space: nowrap;
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
}
.status-pill--active, .status-pill--approved, .status-pill--ready, .status-pill--exported {
    background: var(--green-500);
    color: var(--ink-950);
}
.status-pill--drafted, .status-pill--qa-passed {
    background: var(--green-100);
    color: var(--green-900);
}
.status-pill--not-crawled, .status-pill--no-keyword-metrics {
    background: var(--ink-100);
    border-color: var(--ink-200);
    color: var(--ink-500);
}
.status-pill--qa-failed {
    background: #fdecec;
    border-color: #f5c6c6;
    color: #8c2f2f;
}

/* ---------- Panels & states ---------- */
.empty-state { box-shadow: var(--shadow-sm); }
.empty-state strong { font-size: 16px; color: var(--ink-950); }
.empty-state p { margin: 8px 0 0; color: var(--ink-600); }
.empty-state .btn { margin-top: 16px; }
.error-panel__back { margin-top: 18px; }

.error-panel { border-color: color-mix(in srgb, #dc3a45 30%, var(--ink-200)); }
.error-panel h1 { color: #c0303a; }
.action-hint {
    margin-top: 12px;
    padding: 10px 14px;
    border-left: 3px solid var(--green-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--green-50);
    font-weight: var(--fw-semibold);
    color: var(--ink-800);
}

.action-panel { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.action-panel form, .action-panel .eyebrow { margin: 0; }
.button-link { min-height: 42px; }

.preview-panel { margin-top: 20px; }
.preview-chrome {
    margin-top: 14px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.preview-chrome__bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ink-150);
    background: var(--ink-50);
}
.preview-chrome__dot { width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--ink-200); }
.preview-chrome__title {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.preview-chrome__frame {
    display: block;
    width: 100%;
    height: clamp(420px, 62vh, 760px);
    border: 0;
    background: var(--white);
}

.action-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.action-row form { margin: 0; }

/* ---------- Article workspace: big stage + sticky sidebar ---------- */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}
.article-layout:has(.article-side__details:not([open])) { grid-template-columns: minmax(0, 1fr) 42px; }
.article-main { min-width: 0; }
/* The stage is the preview chrome itself — no extra card around it. */
.article-stage { min-width: 0; }
.article-stage .preview-chrome { margin-top: 0; }
/* The article surface uses (almost) the full viewport height for reading and editing. */
.article-stage .preview-chrome__frame,
.article-stage .article-editor { height: max(480px, calc(100vh - 240px)); }
/* Fact chips above the article: status, website, slug, length */
.article-topbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.article-topbar .meta-chip { max-width: 100%; min-width: 0; }
.article-main > .next-article { margin-top: 16px; }
.article-side { position: sticky; top: 84px; min-width: 0; }
.article-side__details { display: block; }
.article-side__summary {
    display: inline-grid;
    place-items: center;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-xs);
    color: var(--ink-700);
    cursor: pointer;
    font-size: 13px;
    font-weight: var(--fw-semibold);
    list-style: none;
}
.article-side__summary::-webkit-details-marker { display: none; }
.article-side__summary .icon { width: 16px; height: 16px; color: var(--ink-500); }
.article-side__details:not([open]) .article-side__card { display: none; }
.article-side__title { font-size: 19px; line-height: 1.3; margin: 6px 0 14px; overflow-wrap: anywhere; }
.article-side__actions { margin-top: 0; }

/* Briefing context: what the article was written for */
.article-brief { margin-top: 22px; }
.article-brief__rows { margin: 10px 0 0; display: grid; gap: 9px; }
.article-brief__rows div { display: grid; gap: 1px; }
.article-brief__rows dt { color: var(--ink-500); font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.article-brief__rows dd { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-800); }

/* Hand-off to the next article awaiting approval */
.next-article {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: none;
    text-decoration: none;
    color: var(--ink-600);
    transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.next-article:hover { background: var(--ink-50); border-color: var(--ink-200); color: var(--ink-950); }
.next-article__k { flex: none; color: var(--ink-400); font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.next-article strong { flex: 1; min-width: 0; font-size: 13px; font-weight: var(--fw-semibold); line-height: 1.4; color: var(--ink-700); overflow-wrap: anywhere; }
.next-article:hover strong { color: var(--ink-950); }
.next-article .icon { width: 15px; height: 15px; flex: none; color: var(--ink-400); transition: transform var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.next-article:hover .icon { color: var(--green-700); transform: translateX(3px); }

/* Collapsible sidebar section (SEO & URL): advanced detail, calm by default */
.side-disclosure { margin-top: 22px; border-top: 1px solid var(--border-hairline); padding-top: 16px; }
.side-disclosure__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    user-select: none;
}
.side-disclosure__summary::-webkit-details-marker { display: none; }
.side-disclosure__summary .eyebrow { cursor: pointer; }
.side-disclosure__summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 3px;
    border-right: 2px solid var(--ink-400);
    border-bottom: 2px solid var(--ink-400);
    transform: rotate(45deg);
    transition: transform var(--dur-base) var(--ease-out);
    flex: none;
}
.side-disclosure[open] .side-disclosure__summary::after { transform: rotate(-135deg); }
.side-disclosure__summary:hover::after { border-color: var(--green-800); }
.side-disclosure .meta-form { margin-top: 12px; }

.meta-form { display: block; margin-top: 22px; }
.meta-form label { margin-top: 12px; font-size: 13px; }
.meta-form input, .meta-form textarea { width: 100%; font-size: 13.5px; }
.meta-form textarea { resize: vertical; }
.meta-form .field-hint { font-size: 12px; }
.meta-form button { margin-top: 12px; }
/* QA findings: one summary line, the long list opens on hover/focus */
.qa-findings { position: relative; margin-top: 22px; outline: none; }
.qa-findings__summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #f3d9a4;
    border-radius: var(--radius-md);
    background: #fdf6e7;
    color: #7a5a16;
    font-size: 13px;
    font-weight: var(--fw-semibold);
    cursor: default;
}
.qa-findings__summary .icon { width: 15px; height: 15px; flex: none; }
.qa-findings__pop {
    display: none;
    position: absolute;
    right: 0;
    left: 0;
    top: calc(100% + 6px);
    z-index: 30;
    padding: 14px 16px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-md);
    max-height: 50vh;
    overflow: auto;
}
.qa-findings:hover .qa-findings__pop,
.qa-findings:focus .qa-findings__pop,
.qa-findings:focus-within .qa-findings__pop { display: block; }
.qa-findings__list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-700);
}
.qa-findings__list li::marker { color: var(--ink-500); }
.qa-findings .action-hint { margin-top: 12px; }
.article-side__actions .action-stack { margin-top: 10px; }
.article-side__actions .action-hint { margin-top: 12px; }
@media (max-width: 1180px) {
    .article-layout { grid-template-columns: minmax(0, 1fr) 300px; }
    .article-layout:has(.article-side__details:not([open])) { grid-template-columns: minmax(0, 1fr) 42px; }
}
@media (max-width: 960px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-side { position: static; order: -1; }
}

/* ---------- Article WYSIWYG editor ---------- */
.preview-chrome__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.preview-chrome__actions[hidden] { display: none; }
.editor-toolbar[hidden] { display: none; }
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    padding: 7px 10px;
    border-bottom: 1px solid var(--ink-150);
    background: var(--ink-50);
}
.editor-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm, 8px);
    background: none;
    font-size: 13px;
    font-weight: var(--fw-medium);
    color: var(--ink-600);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.editor-toolbar button:hover { background: var(--white); border-color: var(--ink-200); color: var(--ink-950); }
/* Active formatting at the caret (bold/italic/list) lights up green so the
   current state is visible while editing. */
.editor-toolbar button.is-active { background: var(--green-50); border-color: var(--green-300); color: var(--green-900); }
/* Square icon-only buttons — all glyphs the same size, so nothing balloons. */
.editor-toolbar__icon { width: 30px; padding: 0; }
.editor-toolbar button .icon { width: 16px; height: 16px; }
.editor-toolbar button strong, .editor-toolbar button em { font-size: 14px; line-height: 1; }
.editor-toolbar__sep { width: 1px; height: 20px; background: var(--ink-200); margin: 0 5px; flex: none; }
/* Live word count, pushed to the right of the toolbar. */
.editor-toolbar__count { margin-left: auto; padding: 0 4px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-500); white-space: nowrap; }
.editor-toolbar__count:empty { display: none; }

/* Edit mode is visually distinct from reading: the chrome bar turns green and
   the title reads "Bearbeiten", so it is always clear which mode you are in. */
.article-stage.is-editing .preview-chrome { border-color: var(--green-300); box-shadow: 0 0 0 1px var(--green-200), var(--shadow-sm); }
.article-stage.is-editing .preview-chrome__bar { background: var(--green-50); border-bottom-color: var(--green-200); }
.article-stage.is-editing .preview-chrome__title { color: var(--green-900); font-weight: var(--fw-semibold); }
.article-stage.is-editing .preview-chrome__dot { background: var(--green-300); }

/* Inline link editor popover (shown when clicking a link while editing). */
.link-pop {
    position: fixed;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: min(380px, 92vw);
    padding: 6px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}
.link-pop[hidden] { display: none; }
.link-pop__input {
    width: 230px;
    max-width: 52vw;
    min-width: 0;
    padding: 6px 9px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink-900);
}
.link-pop__input:focus-visible { outline: none; border-color: var(--green-400); box-shadow: var(--ring-accent); }
.link-pop__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--ink-600);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.link-pop__btn:hover { background: var(--ink-100); color: var(--ink-950); }
.link-pop__btn .icon { width: 16px; height: 16px; }
.link-pop__remove:hover { background: #fff0f1; color: #a61f2a; }

/* Transient "saved" confirmation toast after an edit reload. */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    background: var(--ink-950);
    color: var(--white);
    font-size: 14px;
    font-weight: var(--fw-semibold);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 14px);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { width: 17px; height: 17px; color: var(--green-400); }
@media (prefers-reduced-motion: reduce) { .toast { transform: translate(-50%, 0); transition: opacity var(--dur-base) var(--ease-out); } }

.article-editor {
    height: clamp(420px, 62vh, 760px);
    overflow: auto;
    background: var(--white);
}
.article-editor article {
    max-width: 54rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
    font-size: 1rem;
    line-height: 1.65;
    color: #1c1e21;
}
.article-editor article:focus, .article-editor article:focus-visible { outline: none; box-shadow: none; }
.article-editor article h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 1rem; }
.article-editor article h2 { font-size: 1.4rem; line-height: 1.3; margin: 2.2rem 0 .6rem; }
.article-editor article h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
.article-editor article h4 { font-size: 1rem; margin: 1.4rem 0 .4rem; }
.article-editor article p { margin: 0 0 1rem; font-size: inherit; color: inherit; }
.article-editor article a { color: #0b66c3; }
.article-editor article table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: .95rem; }
.article-editor article th, .article-editor article td { border: 1px solid #d7dade; padding: .55rem .7rem; text-align: left; vertical-align: top; }
.article-editor article th { background: #f4f5f7; }
.article-editor article ul, .article-editor article ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.article-editor article li { margin: .25rem 0; }
.article-editor article blockquote { margin: 1.25rem 0; padding: .25rem 1rem; border-left: 3px solid #d7dade; color: #454a50; }
.article-editor article code { background: #f4f5f7; border-radius: 4px; padding: .1em .35em; font-family: var(--font-mono); font-size: .9em; }
.article-editor article pre { background: #f4f5f7; border-radius: 8px; padding: 1rem; overflow: auto; margin: 1.25rem 0; font-family: var(--font-mono); font-size: .85rem; }
.article-editor article pre code { background: none; padding: 0; }
.article-editor article hr { border: 0; border-top: 1px solid #d7dade; margin: 2rem 0; }
.article-editor article img {
    display: block;
    max-width: min(100%, 720px);
    max-height: 460px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 1.5rem auto;
    border-radius: 12px;
}
/* Mirrors the .cta callout of the rendered preview, so the CTA stays
   recognizable while editing. */
.article-editor article .cta {
    margin: 1.75rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid #0b66c3;
    border-radius: 0 10px 10px 0;
    background: color-mix(in srgb, #0b66c3 7%, #fff);
}

/* ---------- Article markdown editor ---------- */
.editor-panel { margin-top: 20px; }
.editor-panel__hint { margin: 6px 0 0; font-size: 14px; color: var(--ink-500); }
.editor-form { display: block; margin-top: 14px; }
.editor-form__textarea {
    width: 100%;
    min-height: 420px;
    resize: vertical;
    padding: 14px 16px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--ink-800);
}
.editor-form__textarea:focus-visible { outline: none; box-shadow: var(--ring-accent); }
.editor-form__actions { display: flex; justify-content: flex-end; margin-top: 12px; }

/* ---------- Not found ---------- */
.notfound { display: grid; justify-items: start; gap: 4px; }
.notfound .btn { margin-top: 16px; }

.action-stack { display: grid; gap: 8px; }
.action-stack form { margin: 0; }
.action-stack button, .action-stack a { width: 100%; text-align: left; }
.delete-form { display: block; max-width: 520px; margin-top: 18px; }
.delete-form label { margin-top: 14px; }
.delete-form .action-stack { margin-top: 20px; }
.delete-form__ack {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: var(--fw-medium);
    color: var(--ink-700);
}
.delete-form__ack input {
    display: inline-block;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 2px 0 0;
    box-shadow: none;
}

/* ---------- Autopilot launch ---------- */
.autopilot { overflow: hidden; position: relative; }
.autopilot::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green-500), color-mix(in srgb, var(--green-500) 20%, transparent));
    opacity: 0.9;
}
.autopilot__head h1 { margin: 10px 0 6px; }
.autopilot__domain {
    font-family: var(--font-mono);
    color: var(--green-800);
    background: var(--green-50);
    padding: 1px 8px;
    border-radius: var(--radius-sm);
}
.autopilot__lede { color: var(--text-muted); margin: 0 0 18px; max-width: 56ch; }
.autopilot__progress {
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--ink-150);
    overflow: hidden;
}
.autopilot__bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--green-400), var(--green-600));
    box-shadow: var(--shadow-accent);
    transition: width var(--dur-slow) var(--ease-out);
}
.autopilot__status {
    margin: 10px 0 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-muted);
}
.autopilot__steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 0; }

.ap-step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 4px 0; }
.ap-step__rail { display: flex; flex-direction: column; align-items: center; }
.ap-step__rail::after {
    content: "";
    flex: 1;
    width: 2px;
    margin-top: 6px;
    background: var(--border-hairline);
    border-radius: 2px;
}
.ap-step:last-child .ap-step__rail::after { display: none; }
.ap-step__node {
    position: relative;
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-hairline);
    background: var(--surface-card);
    color: var(--ink-500);
    transition: all var(--dur-base) var(--ease-out);
}
.ap-step__node .icon { width: 17px; height: 17px; }
.ap-step__node .ap-step__spin, .ap-step__node .ap-step__tick { position: absolute; opacity: 0; }
.ap-step__spin { animation: ap-spin 0.9s linear infinite; }

.ap-step__body { padding-bottom: 18px; min-width: 0; }
.ap-step__head { display: flex; align-items: center; gap: 10px; }
.ap-step__title { color: var(--text-strong); font-weight: var(--fw-semibold); }
.ap-step__badge {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--ink-100);
    color: var(--text-muted);
}
.ap-step__desc { margin: 3px 0 0; color: var(--text-muted); font-size: 13.5px; }
.ap-step__log {
    margin: 8px 0 0;
    min-height: 18px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink-500);
}
.ap-step__result {
    margin: 8px 0 0;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    background: var(--green-50);
    border: 1px solid var(--green-100);
    color: var(--green-900);
    font-size: 13px;
}
.ap-step__retry { margin-top: 10px; }

/* Running */
.ap-step.is-running .ap-step__node { border-color: var(--green-400); color: var(--green-600); box-shadow: var(--ring-accent); }
.ap-step.is-running .ap-step__node > .icon:first-child { opacity: 0; }
.ap-step.is-running .ap-step__spin { opacity: 1; }
.ap-step.is-running .ap-step__log { color: var(--text-body); }

/* Done */
.ap-step.is-done .ap-step__node { border-color: var(--green-500); background: var(--green-500); color: var(--ink-950); }
.ap-step.is-done .ap-step__node > .icon:first-child { opacity: 0; }
.ap-step.is-done .ap-step__tick { opacity: 1; }
.ap-step.is-done .ap-step__rail::after { background: var(--green-300); }
.ap-step.is-done .ap-step__badge { background: var(--green-100); color: var(--green-800); }
.ap-step.is-done .ap-step__log { color: var(--text-strong); font-weight: var(--fw-medium); }

/* Error */
.ap-step.is-error .ap-step__node { border-color: #e2574c; color: #e2574c; }
.ap-step.is-error .ap-step__badge { background: #fdecea; color: #c23b30; }
.ap-step.is-error .ap-step__log { color: #c23b30; }

.autopilot__done {
    margin-top: 18px;
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--green-200);
    background: linear-gradient(180deg, var(--green-50), var(--surface-card));
    text-align: center;
    animation: ap-rise var(--dur-slow) var(--ease-out);
}
.autopilot__done h2 { margin: 8px 0 4px; }
.autopilot__done p { margin: 0 auto 16px; color: var(--text-muted); max-width: 46ch; }
.autopilot__done-ico {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-pill);
    background: var(--green-500);
    color: var(--ink-950);
}
.autopilot__done-ico .icon { width: 24px; height: 24px; }
.autopilot__cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.autopilot__cta form { margin: 0; display: contents; }

@keyframes ap-spin { to { transform: rotate(360deg); } }
@keyframes ap-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .ap-step__spin { animation-duration: 2.4s; }
    .autopilot__done { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .topbar__inner { flex-wrap: wrap; gap: 10px; }
    /* The nav drops to its own row; let it wrap so the links + logout never
       push past the viewport on small phones (≤360px). */
    .topbar__links { order: 3; flex-basis: 100%; flex-wrap: wrap; row-gap: 8px; }
    .page-hero { grid-template-columns: 1fr; align-items: stretch; }
    .site-layout { grid-template-columns: 1fr; }
    .site-side { position: static; }
}

@media (max-width: 720px) {
    .topbar__inner { padding: 12px 16px; }
    .app-main { padding: 24px 16px 48px; }
    .console-card, .preview-panel, .action-panel, .error-panel, .empty-state, .hero-card { padding: 18px; }
    form { grid-template-columns: 1fr; }
    .site-form, .site-card { padding: 18px; }
    .site-card__top { flex-direction: column; }
    .site-facts { grid-template-columns: 1fr; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
    td:last-child { width: auto; min-width: 176px; }
    /* Keep the first column (the keyword/title) pinned while the metric columns
       scroll sideways, so each row stays identifiable. Row-link tables are
       excluded — their stretched link relies on the cell's own positioning. */
    table:not(.table--rowlink) th:first-child,
    table:not(.table--rowlink) td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: var(--surface-card);
        box-shadow: 1px 0 0 var(--ink-150);
    }
    table:not(.table--rowlink) thead th:first-child { background: var(--ink-50); }
}

/* ---------- Entrance motion ---------- */
@media (prefers-reduced-motion: no-preference) {
    .app-main > * { animation: rise-in 0.45s var(--ease-out) backwards; }
    .app-main > :nth-child(2) { animation-delay: 60ms; }
    .app-main > :nth-child(3) { animation-delay: 120ms; }
    .app-main > :nth-child(4) { animation-delay: 180ms; }
    .app-main > :nth-child(n + 5) { animation-delay: 240ms; }
}
@keyframes rise-in {
    from { opacity: 0; transform: translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Content calendar ----------
   One flat Monday–Sunday sheet: hairline dividers separate the days, so the
   only "cards" on screen are the topic chips themselves. */
.cal-head { gap: 18px; }
.cal-head__domain { color: var(--green-700); }
.cal-head__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; align-self: end; }
.cal-status {
    margin: 0 0 4px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink-500);
    min-height: 1.2em;
}
.cal-empty { display: grid; gap: 12px; justify-items: start; }

.calendar { margin-top: 4px; }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--ink-150);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.cal-dow {
    padding: 9px 10px 8px;
    background: var(--ink-50);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-500);
}
.cal-day {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 124px;
    padding: 8px;
    background: var(--surface-card);
}
.cal-day--weekend { background: var(--ink-50); }
.cal-day--past > * { opacity: 0.55; }
.cal-day--today { box-shadow: inset 0 3px 0 var(--green-500); }
.cal-day__head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 2px 0;
}
.cal-day__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    font-weight: var(--fw-semibold);
    color: var(--ink-500);
    font-variant-numeric: tabular-nums;
}
.cal-day--today .cal-day__num { background: var(--green-700); color: var(--white); }
.cal-day__month {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-strong);
}
.cal-day__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 52px;
    border-radius: var(--radius-sm);
    transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.cal-day__list.is-over {
    background: var(--green-50);
    box-shadow: inset 0 0 0 2px var(--green-300);
}
.cal-day__empty { display: none; }

.cal-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 7px 8px 6px 10px;
    background: var(--ink-100);
    border-radius: var(--radius-sm);
    box-shadow: inset 3px 0 0 var(--ink-300);
    cursor: grab;
    transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.cal-item:hover {
    background: var(--white);
    box-shadow: inset 3px 0 0 var(--ink-400), var(--shadow-sm);
    transform: translateY(-1px);
}
.cal-item.is-dragging { opacity: 0.5; cursor: grabbing; }
.cal-item--drafted { background: var(--green-50); box-shadow: inset 3px 0 0 var(--green-500); }
.cal-item--drafted:hover { background: var(--green-50); box-shadow: inset 3px 0 0 var(--green-500), var(--shadow-sm); }
.cal-item__topic {
    font-size: 12.5px;
    line-height: 1.35;
    font-weight: var(--fw-medium);
    color: var(--text-strong);
    border-radius: var(--radius-xs);
    padding: 2px 4px;
    margin: -2px -4px;
    outline: none;
    word-break: break-word;
    cursor: text;
}
.cal-item__topic:hover { background: var(--white); }
.cal-item__topic:focus { background: var(--white); box-shadow: var(--ring-accent); }
.cal-item__vol {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--ink-500);
    white-space: nowrap;
}
.cal-item__vol .icon { width: 10px; height: 10px; stroke-width: 2.2; }
/* The "why this topic?" affordance: the opportunity reasoning the autopilot
   planned by, revealed on hover/focus so the plan never looks arbitrary. */
.cal-item__why {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--ink-500);
    cursor: help;
    border-bottom: 1px dotted var(--ink-150);
    white-space: nowrap;
}
.cal-item__why:hover,
.cal-item__why:focus-visible { color: var(--green-500); border-bottom-color: var(--green-500); }
/* The action group wraps as one unit instead of shrinking, so in narrow day
   columns it drops onto its own line and never slides under the volume badge. */
.cal-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; min-height: 22px; }
.cal-item__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.cal-item__draftform { margin: 0; display: block; }
.cal-item__draft,
.cal-item__open {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: var(--fw-semibold);
    padding: 3px 6px;
    border: 0;
    border-radius: var(--radius-xs);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.cal-item__draft { color: var(--ink-600); }
.cal-item__draft .icon, .cal-item__open .icon { width: 12px; height: 12px; }
.cal-item__draft:hover { background: var(--green-100); color: var(--green-900); }
.cal-item__open { color: var(--green-800); }
.cal-item__open:hover { background: var(--green-100); }
.cal-item__reject,
.cal-item__del {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: var(--radius-xs);
    color: var(--ink-500);
    cursor: pointer;
    opacity: 0;
    transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.cal-item:hover .cal-item__reject,
.cal-item:focus-within .cal-item__reject,
.cal-item:hover .cal-item__del,
.cal-item:focus-within .cal-item__del { opacity: 1; }
.cal-item__reject .icon,
.cal-item__del .icon { width: 13px; height: 13px; }
.cal-item__reject:hover { color: var(--green-900); background: var(--green-100); }
.cal-item__del:hover { color: #c8322f; background: #fdecec; }

@media (max-width: 720px) {
    .cal-head__actions { align-self: stretch; }
    /* Phones get an agenda: one row per day, empty days collapse away. */
    .cal-grid { display: flex; flex-direction: column; }
    .cal-dow { display: none; }
    .cal-day { flex-direction: row; align-items: flex-start; gap: 12px; min-height: 0; padding: 10px 12px; }
    .cal-day:not(.cal-day--today):not(:has(.cal-item)) { display: none; }
    .cal-day--today { box-shadow: inset 3px 0 0 var(--green-500); }
    .cal-day__head { flex: 0 0 84px; padding: 0; flex-wrap: wrap; }
    .cal-day__head::after {
        content: attr(data-dow);
        font-family: var(--font-mono);
        font-size: 10.5px;
        font-weight: var(--fw-semibold);
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--ink-500);
    }
    .cal-day__list { min-height: 0; }
}

/* ---------------------------------------------------------------------------
   Onboarding wizard
--------------------------------------------------------------------------- */
.onboarding { max-width: 760px; margin: 0 auto; }

/* Stepper: dots joined by connector lines, centered above the wizard. */
.ob-steps { display: flex; justify-content: center; align-items: center; list-style: none; margin: 10px 0 34px; padding: 0; }
.ob-steps__item { display: flex; align-items: center; gap: 8px; color: var(--ink-500); font-size: 13.5px; font-weight: var(--fw-medium); white-space: nowrap; }
.ob-steps__item + .ob-steps__item::before {
    content: ""; display: inline-block; width: 34px; height: 1.5px;
    background: var(--ink-200); margin: 0 12px;
}
.ob-steps__dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; flex: none;
    border: 1.5px solid var(--ink-300); background: var(--white);
}
.ob-steps__num { width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.ob-steps__dot .icon { width: 12px; height: 12px; stroke: var(--white); stroke-width: 3; fill: none; }
.ob-steps__item.is-active { color: var(--ink-900); }
.ob-steps__item.is-active .ob-steps__dot { border-color: var(--green-600); }
.ob-steps__item.is-active .ob-steps__num { background: var(--green-600); }
/* green-800 (not -700) for the completed-step label: -700 fails WCAG AA 4.5:1
   for this 13.5px text; -800 is 5.4:1 and still clearly the "done" green. */
.ob-steps__item.is-done { color: var(--green-800); }
.ob-steps__item.is-done .ob-steps__dot { border-color: var(--green-600); background: var(--green-600); }
.ob-steps__item.is-done + .ob-steps__item::before { background: var(--green-300); }
@media (max-width: 720px) {
    .ob-steps__label { display: none; }
    .ob-steps__item.is-active .ob-steps__label { display: inline; min-width: 0; overflow-wrap: anywhere; }
    /* Let the one visible (active) label wrap instead of forcing a horizontal
       scroll when it's long ("Zielgruppen & Wettbewerber"). */
    .ob-steps__item.is-active { white-space: normal; }
    /* Tighter connectors so 4 dots + the active label fit a small phone. */
    .ob-steps__item + .ob-steps__item::before { width: 16px; margin: 0 7px; }
}

.ob-head { text-align: center; margin-bottom: 26px; }
.ob-head h1 { margin: 0 0 8px; }
.ob-head__sub { color: var(--ink-500); margin: 0 auto; max-width: 56ch; }

.ob-form { display: block; }
.ob-card { margin-bottom: 18px; padding: 26px 28px; }

/* textarea/select share the global input look inside the wizard;
   chip editors keep their hidden store textareas invisible. */
.ob-card textarea[hidden] { display: none; }
.ob-card textarea:not([hidden]), .ob-card select {
    display: block; width: 100%; margin-top: 7px; padding: 10px 14px;
    border: 1.5px solid var(--ink-200); border-radius: var(--radius-md);
    background: var(--white); color: var(--ink-950); font: inherit;
    box-shadow: inset 0 1px 2px rgba(10, 11, 13, 0.03);
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.ob-card textarea { line-height: 1.55; resize: vertical; min-height: 190px; }
.ob-card select { min-height: 44px; cursor: pointer; }
.ob-card textarea:focus, .ob-card select:focus { border-color: var(--green-500); box-shadow: var(--ring-accent); outline: none; }

/* "Analyse abgeschlossen" strip on step 1 */
.ob-analyzed {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 14px 18px; margin-bottom: 18px;
    border: 1px solid var(--green-200); background: var(--green-50); border-radius: 12px;
}
.ob-analyzed__icon { flex: none; width: 28px; height: 28px; border-radius: 7px; background: var(--white); padding: 2px; border: 1px solid var(--green-200); }
.ob-analyzed__text strong { display: block; font-size: 14.5px; color: var(--ink-900); }
.ob-analyzed__text small { color: var(--ink-600); font-size: 13px; }
.ob-analyzed__badge {
    margin-left: auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    color: var(--green-800); background: var(--white); border: 1px solid var(--green-300);
    border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: var(--fw-semibold);
}
.ob-analyzed__badge .icon { width: 13px; height: 13px; stroke: var(--green-700); stroke-width: 3; fill: none; }
@media (max-width: 560px) { .ob-analyzed__badge { margin-left: 40px; } }

.ob-field-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 6px; }
.ob-field-meta .field-hint { margin-top: 0; }
.ob-charcount { flex: none; font-size: 12.5px; font-weight: var(--fw-medium); color: var(--ink-500); }
.ob-card__head { display: flex; align-items: center; gap: 10px; }
.ob-card__head h2 { margin: 0; font-size: 19px; }
.ob-card__hint { color: var(--ink-500); font-size: 14px; margin: 6px 0 4px; max-width: 64ch; }
.settings-finder {
    margin: 16px 0 8px;
    padding: 14px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-xs);
}
.settings-finder__search {
    position: relative;
    display: block;
}
.settings-finder__label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink-700);
    font-size: 13px;
    font-weight: var(--fw-semibold);
}
.settings-finder__input {
    width: 100%;
    min-height: 42px;
    padding: 0 106px 0 13px;
    border: 1.5px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--ink-50);
    color: var(--ink-950);
    font: inherit;
}
.settings-finder__input:focus {
    border-color: var(--green-500);
    box-shadow: var(--ring-accent);
    outline: none;
}
.settings-finder__status {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: var(--ink-500);
    font-size: 12.5px;
    font-weight: var(--fw-medium);
    pointer-events: none;
}
.settings-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.settings-menu__group {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--ink-50);
}
.settings-menu__group[hidden] { display: none; }
.settings-menu__heading {
    margin: 0 0 9px;
    color: var(--ink-500);
    font-size: 11.5px;
    font-weight: var(--fw-semibold);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.settings-menu__items {
    display: grid;
    gap: 7px;
}
.settings-menu__link {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 9px 10px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink-800);
    box-shadow: var(--shadow-xs);
}
.settings-menu__link[hidden] { display: none; }
.settings-menu__link:hover {
    border-color: var(--green-300);
    background: var(--green-50);
    color: var(--green-900);
}
.settings-menu__link .icon { width: 16px; height: 16px; }
.settings-menu__link .icon:last-child { color: var(--ink-400); }
.settings-menu__copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.settings-menu__title {
    color: var(--ink-950);
    font-size: 13.5px;
    font-weight: var(--fw-semibold);
}
.settings-menu__hint {
    overflow: hidden;
    color: var(--ink-500);
    font-size: 12.5px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 900px) {
    .settings-menu { grid-template-columns: 1fr; }
    .settings-menu__hint { white-space: normal; }
}
.settings-section-head {
    scroll-margin-top: 18px;
    margin: 28px 0 12px;
    padding-top: 6px;
}
.settings-section-head__title {
    margin: 3px 0 0;
    font-size: 18px;
    line-height: 1.25;
}
.settings-save-notice {
    align-items: center;
    border-width: 1.5px;
    box-shadow: 0 10px 24px rgba(28, 122, 73, .08);
}
.settings-save-notice__title { color: var(--green-900); }
.settings-save-actions .btn .icon { width: 15px; height: 15px; }
.setup-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0;
}
.setup-download__file {
    color: var(--ink-600);
    font-family: var(--font-mono);
    font-size: 12.5px;
}
.ob-card label { display: block; margin-top: 14px; }
.ob-card input, .ob-card textarea { width: 100%; }
.ob-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Chip editor: input + add button, removable tags in a two-column grid. */
.ob-chipcount {
    font-size: 12.5px; font-weight: var(--fw-medium); color: var(--green-800);
    border: 1px solid var(--green-300); background: var(--green-50);
    border-radius: 999px; padding: 2px 10px;
}
.ob-chipinput { display: flex; gap: 10px; margin-top: 14px; }
.ob-chipinput input { flex: 1; }
.ob-chipinput .btn { flex: none; }
.ob-chips { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; padding: 0; }
.ob-chips:empty { margin: 0; }
.ob-chip {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px 10px 14px; border: 1px solid var(--green-200);
    background: var(--green-50); border-radius: 10px;
    font-size: 14px; color: var(--ink-800); min-width: 0;
}
.ob-chip span { overflow-wrap: anywhere; flex: 1; }
.ob-chip__icon { flex: none; width: 18px; height: 18px; border-radius: 4px; }
.ob-chip__remove {
    flex: none; border: 0; background: transparent; cursor: pointer;
    color: var(--ink-500); font-size: 17px; line-height: 1; padding: 2px 4px; border-radius: 6px;
}
.ob-chip__remove:hover { color: var(--ink-900); background: var(--green-100); }
@media (max-width: 640px) { .ob-chips { grid-template-columns: 1fr; } .ob-chipinput { flex-direction: column; } }

/* Preference switches: selectable option cards — the whole card reflects the
   state, the switch itself stays clearly visible in both states. */
.ob-switches { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
label.ob-switch {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-top: 0; padding: 16px 18px; cursor: pointer; position: relative;
    border: 1.5px solid var(--ink-200); border-radius: 12px; background: var(--white);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.ob-switch:hover { border-color: var(--ink-300); box-shadow: 0 2px 10px rgba(10, 11, 13, .05); }
.ob-switch:has(input:checked) { border-color: var(--green-500); background: var(--green-50); }
.ob-switch:has(input:checked):hover { border-color: var(--green-600); }
.ob-switch__text strong { display: block; font-weight: var(--fw-semibold); font-size: 14.5px; color: var(--ink-900); }
.ob-switch__text small { display: block; margin-top: 2px; color: var(--ink-500); font-size: 13px; line-height: 1.45; }
.ob-switch:has(input:checked) .ob-switch__text small { color: var(--ink-600); }
.ob-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ob-switch__track {
    flex: none; width: 44px; height: 26px; border-radius: 999px;
    background: var(--ink-300); border: 1px solid var(--ink-400);
    position: relative; transition: background .18s ease, border-color .18s ease;
}
.ob-switch__track::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
    border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(10, 11, 13, .35);
    transition: transform .18s ease;
}
.ob-switch input:checked + .ob-switch__track { background: var(--green-600); border-color: var(--green-700); }
.ob-switch input:checked + .ob-switch__track::after { transform: translateX(18px); }
.ob-switch input:focus-visible + .ob-switch__track { outline: 2px solid var(--green-400); outline-offset: 2px; }
@media (max-width: 640px) { .ob-switches { grid-template-columns: 1fr; } }

.cadence { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cadence__day { cursor: pointer; }
.cadence__day input { position: absolute; opacity: 0; pointer-events: none; }
.cadence__chip {
    display: flex; align-items: center; justify-content: center;
    min-width: 52px; padding: 12px 14px; font-weight: var(--fw-semibold);
    font-size: 14px; color: var(--ink-700);
    border: 1.5px solid var(--ink-200); border-radius: 12px; background: var(--white);
    transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.cadence__day:hover .cadence__chip { border-color: var(--ink-300); box-shadow: 0 2px 10px rgba(10, 11, 13, .05); }
.cadence__day input:checked + .cadence__chip { border-color: var(--green-600); background: var(--green-600); color: var(--white); }
.cadence__day input:focus-visible + .cadence__chip { outline: 2px solid var(--green-400); outline-offset: 2px; }
.cadence__summary { margin-top: 14px; font-size: 13.5px; color: var(--ink-600); }
.cadence__window { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ink-100); }
.cadence__window-hint { font-size: 13.5px; color: var(--ink-600); margin: 0 0 10px; }
.cadence__window-row { display: flex; flex-wrap: wrap; gap: 14px; }
.cadence__window-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-700); }
.cadence__window-field select { padding: 6px 10px; }

.ob-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.ob-actions .btn { width: auto; }
.ob-actions .btn:disabled { pointer-events: none; }
.ob-actions .btn.is-disabled { pointer-events: none; opacity: .55; }
.btn-spinner {
    flex: none;
    width: 15px;
    height: 15px;
    border-radius: var(--radius-pill);
    border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
    border-top-color: currentColor;
    animation: ap-spin 0.7s linear infinite;
}
.ob-pending { margin: 12px 0 0; font-size: 13px; color: var(--ink-600); text-align: right; }
.ob-analyze__bar { width: 6%; position: relative; overflow: hidden; transition: width 1.1s linear; }
.ob-analyze__bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
    transform: translateX(-100%);
    animation: ob-analyze-sheen 2.4s ease-in-out infinite;
}
.ob-analyze.is-error .ob-analyze__bar { width: 100%; background: #d4452c; transition-duration: .3s; }
.ob-analyze.is-error .ob-analyze__bar::after { animation: none; }
.ob-analyze [data-retry] { margin-top: 14px; }
@keyframes ob-analyze-sheen { to { transform: translateX(100%); } }

/* Publishing targets — settings card (manage) + article sidebar panel (act) */
.pub-targets { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.pub-target {
    padding: 14px 16px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--white);
}
.pub-target__bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pub-target__info { min-width: 0; flex: 1 1 240px; display: grid; gap: 5px; }
.pub-target__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pub-target__name { font-weight: var(--fw-semibold); color: var(--ink-900); font-size: 15px; }
.pub-target__type { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.06em; }
.pub-target__where { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-500); font-size: 13px; overflow-wrap: anywhere; }
.pub-target__where .icon { width: 13px; height: 13px; flex: none; }
.pub-target__badge { font-size: 10.5px; font-weight: var(--fw-semibold); letter-spacing: 0.04em; text-transform: uppercase; color: var(--green-800); background: var(--green-50); border: 1px solid var(--green-200); border-radius: 999px; padding: 1px 8px; }
.pub-target__ok { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: var(--fw-semibold); color: var(--green-800); }
.pub-target__ok .icon { width: 13px; height: 13px; }
.pub-target__actions { margin: 0 0 0 auto; display: flex; gap: 8px; flex: none; }
.pub-target__actions form { margin: 0; }

/* Per-target edit form, tucked under the row in a quiet disclosure. */
.pub-edit { margin-top: 4px; }
.pub-edit__toggle {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
    margin-top: 10px; padding: 6px 0; font-size: 13px; font-weight: var(--fw-semibold); color: var(--ink-600);
}
.pub-edit__toggle::-webkit-details-marker { display: none; }
.pub-edit__toggle:hover { color: var(--ink-900); }
.pub-edit__toggle-label { display: inline-flex; align-items: center; gap: 7px; }
.pub-edit__toggle-label .icon { width: 14px; height: 14px; }
.pub-edit__toggle::after {
    content: ""; flex: none; width: 8px; height: 8px;
    border-right: 2px solid var(--ink-400); border-bottom: 2px solid var(--ink-400);
    transform: translateY(-2px) rotate(45deg); transition: transform .15s ease;
}
.pub-edit[open] > .pub-edit__toggle { color: var(--ink-900); }
.pub-edit[open] > .pub-edit__toggle::after { transform: translateY(1px) rotate(-135deg); }
.pub-edit[open] {
    margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--ink-150);
}
.pub-edit .pub-form { margin-top: 6px; }

/* Empty state — explains the value and points at the action below. */
.pub-empty {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 18px 20px; margin-top: 4px;
    border: 1px dashed var(--ink-200); border-radius: var(--radius-md);
    background: var(--ink-50);
}
.pub-empty > .icon { flex: none; width: 22px; height: 22px; color: var(--green-700); margin-top: 1px; }
.pub-empty__text strong { display: block; font-size: 14.5px; color: var(--ink-900); }
.pub-empty__text p { margin: 4px 0 0; color: var(--ink-600); font-size: 13.5px; line-height: 1.5; max-width: 62ch; }

/* Add-target area. With no targets the form shows inline under a heading; once
   targets exist it collapses into a clearly-expandable row (chevron, not a
   button) so it never reads as a submit action. */
.pub-add { margin-top: 20px; border-top: 1px solid var(--ink-150); }
.pub-add--inline { padding-top: 6px; }
.pub-add__title { margin: 18px 0 0; font-size: 15.5px; font-weight: var(--fw-semibold); color: var(--ink-900); }
.pub-add__summary {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    margin-top: 14px; padding: 12px 2px; list-style: none;
    font-size: 14.5px; font-weight: var(--fw-semibold); color: var(--ink-800);
}
.pub-add__summary::-webkit-details-marker { display: none; }
.pub-add__summary:hover { color: var(--ink-950); }
.pub-add__summary-label { display: inline-flex; align-items: center; gap: 8px; }
.pub-add__summary-label .icon { width: 16px; height: 16px; color: var(--green-700); }
.pub-add__summary::after {
    content: ""; margin-left: auto; flex: none; width: 9px; height: 9px;
    border-right: 2px solid var(--ink-400); border-bottom: 2px solid var(--ink-400);
    transform: translateY(-2px) rotate(45deg); transition: transform .15s ease;
}
.pub-add[open] > .pub-add__summary::after { transform: translateY(1px) rotate(-135deg); }

/* Explainer callout inside the Custom-API group: what the endpoint must accept. */
.pub-help {
    margin-top: 14px; padding: 14px 16px;
    border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--ink-50);
    font-size: 13px; line-height: 1.6; color: var(--ink-700);
}
.pub-help strong { color: var(--ink-900); }
.pub-help code {
    font-family: var(--font-mono); font-size: 11.5px; padding: 1px 5px;
    border-radius: 5px; background: var(--white); border: 1px solid var(--ink-200); color: var(--ink-800);
}
.pub-copydoc {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 10px; padding: 12px 14px;
    border: 1px solid var(--green-200); border-radius: var(--radius-md); background: var(--green-50);
}
.pub-copydoc .btn { display: inline-flex; align-items: center; gap: 7px; }
.pub-copydoc .btn .icon { width: 14px; height: 14px; }
.pub-copydoc .btn.is-copied { border-color: var(--green-500); color: var(--green-800); }
.pub-copydoc__hint { color: var(--ink-600); font-size: 13px; line-height: 1.45; flex: 1 1 260px; }
.pub-examples {
    margin-top: 10px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--white);
}
.pub-examples__summary {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    min-width: 0; padding: 12px 14px; list-style: none;
    font-size: 13.5px; font-weight: var(--fw-semibold); color: var(--ink-800);
}
.pub-examples__summary::-webkit-details-marker { display: none; }
.pub-examples__summary:hover { color: var(--ink-950); }
.pub-examples__summary-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pub-examples__summary-label .icon { width: 15px; height: 15px; color: var(--green-700); flex: none; }
.pub-examples__summary-note { margin-left: auto; color: var(--ink-500); font-size: 12px; font-weight: var(--fw-medium); white-space: nowrap; }
.pub-examples__summary::after {
    content: ""; flex: none; width: 8px; height: 8px;
    border-right: 2px solid var(--ink-400); border-bottom: 2px solid var(--ink-400);
    transform: translateY(-2px) rotate(45deg); transition: transform .15s ease;
}
.pub-examples[open] > .pub-examples__summary {
    border-bottom: 1px solid var(--ink-150);
}
.pub-examples[open] > .pub-examples__summary::after { transform: translateY(1px) rotate(-135deg); }
.pub-examples__intro {
    margin: 12px 14px 0;
    color: var(--ink-600);
    font-size: 13px;
    line-height: 1.5;
}
.pub-examples__intro code {
    font-family: var(--font-mono); font-size: 11.5px; padding: 1px 5px;
    border-radius: 5px; background: var(--ink-50); border: 1px solid var(--ink-200); color: var(--ink-800);
}
.pub-examples__grid { display: grid; gap: 8px; padding: 12px 14px 14px; }
.pub-code {
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-sm);
    background: var(--ink-50);
    overflow: hidden;
}
.pub-code__summary {
    cursor: pointer; list-style: none;
    padding: 9px 11px;
    font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--ink-800);
}
.pub-code__summary::-webkit-details-marker { display: none; }
.pub-code__summary:hover { color: var(--ink-950); }
.pub-code__block {
    margin: 0; padding: 12px;
    max-height: 360px; overflow: auto;
    border-top: 1px solid var(--ink-150);
    background: #111827; color: #f8fafc;
    font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55;
    white-space: pre;
}
.pub-code__block code { font: inherit; color: inherit; }
@media (max-width: 560px) {
    .pub-examples__summary { align-items: flex-start; flex-wrap: wrap; }
    .pub-examples__summary-note { margin-left: 23px; white-space: normal; }
    .pub-examples__summary::after { margin-left: auto; }
}

/* Inline feedback banner — success after saving, error on a failed submit.
   Server-rendered so it's reliable and persists (no disappearing toast). */
.form-notice {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 16px 0 0; padding: 13px 16px;
    border: 1px solid var(--ink-200); border-radius: var(--radius-md);
    font-size: 14px; font-weight: var(--fw-medium); line-height: 1.45;
}
.form-notice .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.form-notice--ok { border-color: var(--green-300); background: var(--green-50); color: var(--green-800); }
.form-notice--ok .icon { color: var(--green-700); }
.form-notice--info { border-color: #b8d7f4; background: #eef7ff; color: #174a78; }
.form-notice--info .icon { color: #1f6fb2; }
.form-notice--error { border-color: #f5c6c6; background: #fdecec; color: #8c2f2f; }
.form-notice--error .icon { color: #c23b30; }
.form-notice__action { color: inherit; font-weight: var(--fw-semibold); text-decoration: underline; white-space: nowrap; }
.form-notice__action .icon { width: 13px; height: 13px; margin: 0 0 -2px 2px; }
.pub-form .form-notice { margin-top: 0; margin-bottom: 4px; }
.form-notice--banner { margin: 18px 0 22px; }

/* The guided add-form: a plain vertical stack. (The global form{display:grid}
   would otherwise scatter every group into auto-fit columns.) */
.pub-form { display: block; margin-top: 10px; }
.pub-field { display: block; margin-top: 18px; border: 0; padding: 0; min-width: 0; }
.pub-form > .pub-field:first-child, .pub-form > .pub-type:first-child { margin-top: 0; }
.pub-field__label { display: block; font-size: 14px; font-weight: var(--fw-semibold); color: var(--ink-800); padding: 0; }
.pub-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pub-pair .pub-field { margin-top: 14px; }
@media (max-width: 560px) { .pub-pair { grid-template-columns: 1fr; } }

/* Platform picker — selectable cards, radio hidden, :checked highlights. */
.pub-type__opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
@media (max-width: 960px) { .pub-type__opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pub-type__opts { grid-template-columns: 1fr; } }
.pub-type__opt {
    display: block; cursor: pointer; padding: 14px 16px; margin: 0;
    border: 1.5px solid var(--ink-200); border-radius: 12px; background: var(--white);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.pub-type__opt:hover { border-color: var(--ink-300); box-shadow: 0 2px 10px rgba(10, 11, 13, .05); }
.pub-type__opt:has(input:checked) { border-color: var(--green-500); background: var(--green-50); box-shadow: var(--ring-accent); }
.pub-type__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pub-type__name { display: block; font-weight: var(--fw-semibold); font-size: 14.5px; color: var(--ink-900); }
.pub-type__desc { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-500); line-height: 1.45; }

/* Type-specific field groups: only the picked platform's group shows. */
.pub-group { display: none; }
.pub-form:has(input[value="wordpress"]:checked) .pub-group--wordpress,
.pub-form:has(input[value="webflow"]:checked) .pub-group--webflow,
.pub-form:has(input[value="shopify"]:checked) .pub-group--shopify,
.pub-form:has(input[value="custom_api"]:checked) .pub-group--custom_api { display: block; }
/* Edit mode has no platform picker (type is fixed) → its one group is always shown. */
.pub-group--show { display: block; }
.pub-switches { margin-top: 18px; }
.pub-actions { margin-top: 20px; justify-content: flex-end; }
.pub-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.pub-actions .btn .icon { width: 15px; height: 15px; }

.pub-panel { margin-top: 22px; }
.pub-panel__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.pub-panel__row { display: grid; gap: 6px; }
.pub-panel__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pub-panel__name { font-weight: var(--fw-semibold); color: var(--ink-800); font-size: 13.5px; }
.pub-panel__row form { margin: 0; }
.pub-panel__actions { display: grid; gap: 6px; }
.pub-panel__row button { width: 100%; }
.pub-panel__status { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: var(--fw-semibold); }
.pub-panel__status .icon { width: 13px; height: 13px; }
.pub-panel__status--ok { color: var(--green-800); }
.pub-panel__status--err { color: #a61f2a; }
.pub-panel__status--scheduled { color: var(--ink-600); }
.pub-panel__schedule { margin-top: 2px; font-size: 12.5px; }
.pub-panel__schedule > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-600); font-weight: var(--fw-semibold); list-style: none; }
.pub-panel__schedule > summary::-webkit-details-marker { display: none; }
.pub-panel__schedule > summary .icon { width: 13px; height: 13px; }
.pub-panel__schedule[open] > summary { margin-bottom: 8px; }
.pub-panel__schedule-form { display: grid; gap: 8px; }
.pub-panel__schedule-label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-600); }
.pub-panel__schedule-label input { width: 100%; }

/* Search Console performance */
.gsc-stats { display: flex; gap: 28px; margin: 6px 0 16px; flex-wrap: wrap; }
.gsc-stats--compact { gap: 16px; margin: 8px 0 0; }
.gsc-stat { display: grid; gap: 2px; }
.gsc-stat__num { font-size: 22px; font-weight: var(--fw-semibold); color: var(--ink-900); line-height: 1.1; }
.gsc-stats--compact .gsc-stat__num { font-size: 16px; }
.gsc-stat__label { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-500); }
.gsc-url a { overflow-wrap: anywhere; }
.gsc-query { overflow-wrap: anywhere; }
.gsc-delta { width: fit-content; margin-top: 2px; padding: 1px 7px; border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: 10.5px; font-weight: var(--fw-semibold); }
.gsc-delta--up { background: var(--green-100); color: var(--green-800); }
.gsc-delta--down { background: #fdeeee; color: #8f2020; }
.gsc-spark { display: grid; gap: 2px; align-self: end; margin-left: auto; color: var(--green-600); }
.gsc-spark svg { width: 220px; height: 44px; display: block; }
.gsc-spark__label { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-500); }

/* AI visibility (cited by AI answers?) */
.aiv-of { font-size: 14px; font-weight: var(--fw-semibold); color: var(--ink-500); }
.aiv-list { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.aiv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; }
.aiv-row__query { color: var(--ink-800); overflow-wrap: anywhere; }
.aiv-sources { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.aiv-sources__hint { margin: 0; font-size: 13px; color: var(--ink-500); }
.aiv-sources__item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.aiv-sources__domain { color: var(--ink-800); overflow-wrap: anywhere; }
.aiv-sources__count { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); }
.aiv-flag { flex: none; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--ink-100); color: var(--ink-500); font-family: var(--font-mono); font-size: 10.5px; white-space: nowrap; }
.aiv-flag--cited { background: var(--green-100); color: var(--green-800); }
.aiv-flag--brand { background: #fff4d6; color: #8a6100; }
.aiv-meta { margin-top: 12px; color: var(--ink-500); font-size: 12.5px; }
.aiv-loading { display: flex; align-items: center; gap: 8px; color: var(--ink-600); font-size: 13px; font-weight: var(--fw-semibold); }
.aiv-loading__spin {
    width: 16px;
    height: 16px;
    flex: none;
    border-radius: var(--radius-pill);
    border: 2.5px solid var(--ink-150);
    border-top-color: var(--green-500);
    animation: ap-spin 0.8s linear infinite;
}
.gsc-queries-head { margin: 18px 0 8px; }
.gsc-query-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.gsc-query-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.gsc-query-row__term { color: var(--ink-800); overflow-wrap: anywhere; }
.gsc-query-row__meta { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); white-space: nowrap; }
.gsc-refresh { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.gsc-refresh__hint { margin: 0; font-size: 13px; color: var(--ink-500); }
.gsc-refresh__item { display: grid; gap: 2px; font-size: 13px; }
.gsc-refresh__item > a { font-weight: 600; color: var(--ink-800); text-decoration: none; }
.gsc-refresh__item > a:hover { text-decoration: underline; }
.gsc-refresh__meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); }
