/* PEXim Developer Dashboard - Light Theme (Modo Energy-inspired) */

[x-cloak] { display: none !important; }

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

body {
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--text-primary);
    /* UI-430: the mock's base — 14px/1.5, antialiased. Without the size the
       app ran at the 16px browser default; without the smoothing macOS
       renders Raleway about a weight heavier than the mock. */
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* UI-430: the mock's heading scale. Before this, h2/h3 fell back to the
   browser's bold (700) at 1.5em/1.17em. Component rules (.card-h h3, .sec h2,
   .ph h1) still refine these. */
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; }

a { color: var(--accent); text-decoration: none; }
/* Buttons rendered as links are excluded: `a:hover` (element + pseudo-class)
   outranks the `.btn-*` class selectors that own the label colour, so without
   the :not() a solid button's text turned accent green on its accent-green
   hover background and disappeared. */
a:hover:not(.btn) { color: var(--accent-hover); }

/* Layout */

main { padding: var(--sp-6); flex: 1; min-width: 0; overflow-x: hidden; }

/* Sidebar */

.sidebar-org {
    /* Even on all four sides: the switcher is a full-width row like the nav
       items below it, not an inset card, and the wider box gives the org name
       (and the menu under it) the whole column to use. */
    padding: var(--sp-2);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
/* width/height/font-size/color are literals, not --sp-* tokens, on purpose:
   --sp-1..--sp-8 is a SPACING scale (4/8/12/16/20/24/32px, no --sp-7), not a
   dimension scale, and there is no token for component box sizes or this
   fallback's text color. Using a spacing token here would mean a future
   spacing retune silently resizes every org avatar. These values instead
   deliberately mirror the existing .sidebar-user-avatar rule below (same kind
   of element, same 24-28px/12px/var(--card) idiom) rather than invent a new one. */
.org-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: var(--bg-input);
    flex-shrink: 0;
}
.org-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--on-primary);
    font-size: 12px;
    font-weight: 600;
}
/* The org settings page reuses the org-avatar define for its larger
   preview instead of teaching that define a size parameter (see the comment
   in components/org-avatar.html) — it wraps the {{template}} call in this
   container class, and the descendant rules below re-size the shared
   img/monogram markup to fit it. 64px/24px are the same kind of raw-literal
   component-box sizing as .org-avatar above, not --sp-* spacing tokens. */
.org-avatar-lg {
    width: 64px;
    height: 64px;
}
.org-avatar-lg .org-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
}
.org-avatar-lg .org-avatar-fallback {
    font-size: 24px;
}

/* Organization switcher. It lives in the sidebar, which carries
 * overflow-y:auto — so the panel is in normal flow, NOT an absolutely
 * positioned overlay: an overlay child would be clipped by that scroll
 * container. Below 768px the topbar shows only a read-only link
 * (.topbar-org-mobile), never a dropdown. */
/* The trigger carries the active org name in both shapes the sidebar renders:
 * a <summary> when the user has more than one membership, an <a> when they have
 * one. Neither carries .btn.btn-ghost — a sidebar row is not a button; padding,
 * radius and hover come from .sidebar-org .org-switcher-current below. */
.org-switcher-current {
    max-width: 200px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 0;
}
.org-switcher-current .badge { flex-shrink: 0; }
.org-switcher-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.org-switcher { position: relative; }
.org-switcher > summary { list-style: none; cursor: pointer; }
.org-switcher > summary::-webkit-details-marker { display: none; }
.org-switcher > summary::after {
    content: '\25BE';
    margin-left: auto;
    padding-left: var(--sp-1);
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1;
    transition: transform 0.15s;
}
.org-switcher[open] > summary::after { transform: rotate(180deg); }
.org-switcher-menu {
    /* In normal flow and taking the width it is given: the sidebar column is
       narrower than an overlay panel would be, and its overflow would clip
       both a fixed min-width and an absolutely positioned child. */
    width: 100%;
    margin-top: var(--sp-2);
    max-height: 40vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: var(--sp-1);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.org-switcher-menu form { margin: 0; }
.org-switcher-label {
    padding: var(--sp-2) var(--sp-3) var(--sp-1);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.org-switcher-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    width: 100%;
    padding: var(--sp-2) var(--sp-3);
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    font: inherit;
    font-size: 13px;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
}
/* A fixed marker slot keeps every name on the same left edge, checked or not. */
.org-switcher-item::before {
    content: '';
    flex-shrink: 0;
    width: 12px;
    color: var(--accent);
    font-size: 11px;
}
.org-switcher-item > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
button.org-switcher-item:hover { background: var(--bg-hover); }
button.org-switcher-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.org-switcher-active {
    background: var(--accent-light);
    color: var(--accent-text);
    font-weight: 600;
    cursor: default;
}
.org-switcher-active::before { content: '\2713'; color: var(--accent-text); }
/* In the sidebar the menu is IN NORMAL FLOW, not an overlay: .sidebar carries
   overflow-y:auto, which clips absolutely positioned children. The cap stops a
   user with twenty memberships from pushing the nav off screen. */
.sidebar-org .org-switcher-current {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    width: 100%;
    /* The 200px cap belongs to the topbar shape; in the sidebar it left the
       chip short of the column's right edge while the left edge sat on it. */
    max-width: none;
    padding: var(--sp-2);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
}
.sidebar-org .org-switcher-current:hover { background: var(--bg-hover); }
.topbar-org-mobile {
    display: none;
}

/* Cards. The .card box itself lives in components.css (UI-204) — border,
 * 12px radius, 18/20 padding. Only the children this vocabulary adds on top of
 * the mock's card stay here: the mock has no .card-header / .card-title. */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-4);
}
.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
/* Danger zone: a .card modifier, not a card of its own — it keeps the padding,
 * radius and shadow and only changes what the border and heading say. Used on
 * the last card of /app/org (irreversible organization close), so it must read
 * as a different KIND of section at a glance, not merely as a red button.
 *
 * The border is the whole signal, so it is drawn rather than tinting the
 * background: a filled panel would fight the .banner-danger flash that appears
 * above it when an action is refused. */
.danger-zone {
    border: 1px solid var(--danger);
}
.danger-zone .card-title {
    color: var(--danger);
}

/* Grid */
.grid { display: grid; gap: var(--gap-card); }

/* Tables */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
thead th {
    text-align: left;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}
tbody td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
tbody tr:hover td { background: var(--bg-hover); }

/* The viewer's OWN row on a ranking table — "which of these is mine" is the
   first question anyone asks of a leaderboard. It was used by
   app/leaderboard.html and defined by nothing, so it was recorded as a known
   gap and rendered as an ordinary row for as long as that board has existed.
   The left rule carries the meaning; the tint alone is too close to :hover. */

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-active { background: var(--accent-light); color: var(--accent-text); }

.badge-success { background: var(--accent-light); color: var(--accent-text); }

.badge-info { background: var(--info-bg); color: var(--info-fg); }

/* Buttons. The .btn base lives in components.css (UI-201): 1px border,
 * --r radius, 13.5px/600. Only the -primary/-secondary/-danger/-ghost naming
 * this vocabulary adds is here — the mock spells the same variants .pri /
 * .destruct / .ghost, and Phase 4 pages switch over page by page.
 *
 * Each filled variant now also states border-colour: the shared base draws a
 * --border ring, which would otherwise outline a solid button in grey. Each
 * one restates `color` on hover so the label survives any ambient link styling
 * the page brings with it, whatever the element is. */
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: var(--sp-1) 10px; font-size: 12px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

/* Forms */

/* A row of controls that share a baseline: wrap each in a plain <div>, not a
 * .form-group, whose bottom margin would drop the row's button by 16px. */
.form-inline { display: flex; gap: var(--sp-3); align-items: flex-end; flex-wrap: wrap; }
/* The stretchy field keeps a usable width; the row wraps below it rather than
 * squeezing a text input down to a few characters on a narrow viewport. */
.form-inline > .flex-1 { min-width: 14rem; }

/* Warning banner */
.banner {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: var(--sp-5);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.banner-warning {
    background: var(--warn-bg);
    color: var(--tip-fg);
    border: 1px solid var(--tip-bd);
}
.banner-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-bd);
}
.banner-success {
    background: var(--primary-soft);
    color: var(--primary-dk);
    border: 1px solid var(--hi-bd);
}
/* UI-408: the two banner tones three pages already used and no sheet defined. */
.banner-info {
    background: var(--info-bg);
    color: var(--info-fg);
    border: 1px solid var(--info-bd);
}
.banner-accent {
    border-left: 3px solid var(--primary);
}

/* Compare layout */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }

/* Stat cards */

/* Key display (show once) */
.key-display {
    background: var(--bg-input);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: var(--sp-3);
    font-family: var(--font-mono);
    font-size: 13px;
    word-break: break-all;
    margin: var(--sp-3) 0;
    color: var(--text-primary);
}

/* Pricing / plan cards */
.plan-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--sp-6);
    text-align: center;
}
.plan-card.current { border: 2px solid var(--accent); }
.plan-name { font-size: 18px; font-weight: 600; margin-bottom: var(--sp-1); color: var(--text-primary); }
.plan-price { font-size: 28px; font-weight: 700; color: var(--accent); margin-bottom: var(--sp-2); }
.plan-price span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.plan-features { list-style: none; font-size: 13px; color: var(--text-secondary); margin-bottom: var(--sp-4); }
.plan-features li { padding: var(--sp-1) 0; }

/* Auth pages: only what internal/authz/orgrole.go's bare "Not available"
 * document still needs. It serves its own HTML off app.css alone, with no
 * tokens.css or auth.css link. Everything else moved to static/auth.css with
 * the UI-305 redesign — do not add auth rules back here. */

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-8);
    width: 100%;
    max-width: 400px;
}
/* Heading and body copy for an auth card. The global reset zeroes every margin,
 * so a card built from bare <h1>/<p> renders as one unreadable block — these are
 * the spacing for that copy. */
.auth-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--sp-4);
}

/* Loading / HTMX indicators */
.htmx-indicator {
    display: none;
    color: var(--text-muted);
    font-size: 13px;
    padding: var(--sp-5);
    text-align: center;
}
.htmx-request .htmx-indicator { display: block; }

/* The utility scale (text-*, mb-*, mt-*, flex, gap-*, mono, …) lives in
   components.css since UI-417 — one definition, one 4px scale. */

/* Stat value size variants */

/* Block-level buttons. .btn is inline-flex with no justify-content, so a
 * full-width button left-aligns its label unless it centres it here. */
.btn-block { width: 100%; justify-content: center; }

/* Chart area sizing */
.chart-area { width: 100%; height: 300px; }
.chart-area-sm { height: 250px; }
.chart-area-xs { height: 200px; }

/* Empty state padding */
.empty-state { padding: var(--sp-6); }
.empty-state-sm { padding: var(--sp-4); }

/* CTA section padding (landing pages) */
.cta-section { padding: 3rem 0; }

/* Skip navigation link (a11y) */
.skip-link { position: absolute; top: -9999px; left: 0; z-index: 9999; padding: 0.5rem 1rem; background: var(--primary); color: var(--on-primary); font-size: 0.875rem; border-radius: 0 0 var(--radius, 0.375rem) 0; text-decoration: none; }
.skip-link:focus { top: 0; }

/* Badge muted */
.badge-muted { background: var(--border-light); color: var(--text-muted); }

/* Button large */
.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.05rem;
}

/* ------------------------------------------------------------------ */
/* Environments                                                       */
/* ------------------------------------------------------------------ */

/* Env detail: one card per agent (partials/env_overview). */
.env-pad { padding: 10px 14px; }
.env-net { font-family: var(--head); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Create-evaluation form */

/* ── Docs page tabs + styling ──────────────────────────────── */

.docs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1.5rem;
}
.docs-nav-item {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.docs-nav-item:hover, .docs-nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--hi-bd);
}
.docs-section { margin-bottom: 2.5rem; }
.docs-section h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.docs-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin: 1rem 0 0.5rem;
}
/* No .docs-section pre rule: since UI-412 every snippet on /app/docs is a
   ui/code block, and app.css loads AFTER components.css — a rule here would
   repaint .code's dark panel light and leave its light text on it. Inline
   <code> is still styled below. */
.docs-section .code { margin: 0.75rem 0; }
.docs-section code {
    font-family: var(--mono);
    font-size: 0.8125rem;
}
.docs-section p code {
    background: var(--primary-soft);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    color: var(--primary-dk);
}
.docs-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.8125rem;
}
.docs-section th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-muted);
}
.docs-section td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.8125rem;
}
.docs-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-muted);
}
.docs-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.docs-callout {
    background: var(--primary-soft);
    border: 1px solid var(--hi-bd);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    font-size: 0.875rem;
}
.docs-callout a {
    color: var(--primary);
    font-weight: 600;
}

/* Docs: step walkthrough */
.docs-step {
    display: flex;
    gap: 1rem;
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.docs-step-num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 50%;
}
.docs-step-body {
    flex: 1;
    min-width: 0;
}
.docs-step-body h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--text);
}
.docs-step-body p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Docs: response JSON samples */
.docs-response {
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0.75rem 0;
}
.docs-response code {
    font-family: var(--mono);
    font-size: 0.8125rem;
}

/* Docs: HTTP method badges */
.docs-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--mono);
    letter-spacing: 0.025em;
    vertical-align: middle;
    margin-right: 0.375rem;
}

.docs-badge-post {
    background: var(--info-bg);
    color: var(--secondary);
    border: 1px solid var(--info-bd);
}

/* Docs: endpoint URL display */
.docs-endpoint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-soft);
    border: 1px solid var(--hi-bd);
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    margin: 0.75rem 0;
    font-family: var(--mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-dk);
    overflow-x: auto;
}

/* Docs: callout variants */
.docs-callout-info {
    background: var(--info-bg);
    border: 1px solid var(--info-bd);
    border-left: 4px solid var(--secondary);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    font-size: 0.8125rem;
    color: var(--info-fg);
}

/* Docs: two-column left-nav layout (UI-412). The nav is sticky under the
   56px topbar; below 860 it collapses to a "Jump to" select, because a
   sticky sidebar on a phone is a sticky nothing. */
.docs {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.docs-side {
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 96px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8125rem;
}
.docs-side a {
    padding: 0.375rem 0.625rem;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
}
.docs-side a:hover { background: var(--input); color: var(--fg); }
.docs-side b {
    padding: 0.75rem 0.625rem 0.25rem;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-2);
}
.docs-jump { display: none; }
.docs-body { min-width: 0; }
.docs-body .docs-section:target h2 { color: var(--primary); }
@media (max-width: 860px) {
    /* A table of long endpoint paths scrolls inside the column instead of
       being clipped at its right edge. */
    .docs-section table, .docs-table { display: block; overflow-x: auto; }
    .docs { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .docs-side { display: none; }
    .docs-jump { display: block; }
}

/* Filter bar */

/* Responsive */

@media (max-width: 768px) {

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

/* Mobile */
@media (max-width: 768px) {
    main {
        padding: var(--sp-4);
    }
    .topbar-org-mobile {
        display: flex;
        align-items: center;
        gap: var(--sp-2);
        max-width: 45vw;
        padding: var(--sp-1) var(--sp-2);
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 13px;
    }
    /* Charts */
    .chart-container {
        margin: 0 calc(-1 * var(--sp-4));
        border-radius: 0;
    }
    .chart-area {
        height: 250px !important;
        min-height: 250px !important;
    }
    .chart-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-wrap {
        -webkit-overflow-scrolling: touch;
    }
}

/* Theme toggle (UI-103). One button, two glyphs; CSS picks the one that says
   what a click will do. */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.theme-toggle-dark { display: none; }
:root[data-theme="dark"] .theme-toggle-light { display: none; }
:root[data-theme="dark"] .theme-toggle-dark { display: inline; }

/* Density mode (UI-105). Set by the head-theme script from
   localStorage['pexim-dense']; no UI toggle until Phase 3 Preferences.
   Paddings come from the mock's :root[data-dense="1"] block, mapped onto the
   classes this stylesheet actually has. */
:root[data-dense="1"] tbody td { padding: 5px 14px; }
:root[data-dense="1"] thead th { padding: 6px 14px; }
:root[data-dense="1"] .card { padding: 12px 14px; }
:root[data-dense="1"] .card-header { margin-bottom: var(--sp-3); }

/* Onboarding coach-mark tour (components/onboarding.html). */
.ob-root { position:fixed; inset:0; z-index:9999; pointer-events:none; }
.ob-dim { position:absolute; inset:0; background:var(--scrim, rgba(0,0,0,0.35)); pointer-events:none; }
.ob-tooltip { position:absolute; background:var(--card); border-radius:12px; padding:1.5rem; max-width:340px; box-shadow:0 8px 30px rgba(0,0,0,0.2); z-index:10000; pointer-events:auto; }
.ob-step-badge { display:inline-block; background:var(--primary); color:var(--on-primary); font-size:.7rem; font-weight:700; padding:.15rem .5rem; border-radius:100px; margin-bottom:.5rem; }
.ob-title { font-size:1.05rem; font-weight:700; color:var(--fg); margin-bottom:.35rem; }
.ob-desc { font-size:.85rem; color:var(--fg-2); line-height:1.5; margin-bottom:1rem; }
.ob-actions { display:flex; justify-content:space-between; align-items:center; }
.ob-highlight { box-shadow:0 0 0 4px var(--primary), 0 0 20px color-mix(in srgb, var(--primary) 30%, transparent); border-radius:8px; }
