/* ============================================================
   Hermes — brand.css (Accadema design system)
   Verbatim tokens from docs/Accadema-Lab/design/accadema-design-manual.html
   Sections 04 (Color), 05 (Typography), 06 (Spacing),
            07 (Radii/borders/shadows), 11 (Buttons), 12 (Badges),
            13 (Cards), 21 (Forms), 23 (Tables), 37/38 (Navbar)
   Used only for static UI mockups in this folder.
   ============================================================ */

:root {
    /* ── Color · neutrals ── */
    --primary:     #0F172A;
    --text:        #1E293B;
    --text-muted:  #64748B;
    --border:      #E2E8F0;
    --bg:          #FFFFFF;
    --bg-alt:      #F8FAFC;

    /* ── Color · accent (links, focus, Athena) ── */
    --accent:      #3B82F6;

    /* ── Color · status ── */
    --success:     #22C55E;
    --warning:     #F59E0B;
    --danger:      #EF4444;
    --info:        #3B82F6;

    /* ── Color · dark surface ── */
    --hero-from:   #0A0E1A;
    --hero-to:     #1A1F35;

    /* ── Radius ── */
    --radius-sharp: 2px;
    --radius-pill:  999px;

    /* ── Border ── */
    --border-w:    1px;

    /* ── Spacing (rem) ── */
    --space-1:     .25rem;
    --space-2:     .5rem;
    --space-3:     .75rem;
    --space-4:     1rem;
    --space-5:     1.5rem;
    --space-6:     2rem;
    --space-7:     3rem;
    --space-8:     4rem;
    --space-9:     6rem;

    /* ── Typography ── */
    --font-sans:   -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:   Monaco, 'Courier New', monospace;
    --line-body:   1.7;
    --line-tight:  1.25;

    /* ── Motion ── */
    --dur-fast:    200ms;
    --dur-base:    300ms;
    --ease:        cubic-bezier(.2,.6,.2,1);

    /* ── Shadow (Accadema is mostly flat) ── */
    --shadow-sticky: 0 2px 10px rgba(0,0,0,.05);

    /* ── Page layout — container width matrix per design manual §31 ── */
    --page-inset:    clamp(1.25rem, 3vw, 3rem);
    --container-max: 1320px;  /* default tier (1200–1439, BS container-xxl) */

    /* ── Bootstrap5 variable overrides (sharp 2px everywhere) ── */
    --bs-primary:            #0F172A;
    --bs-primary-rgb:        15, 23, 42;
    --bs-link-color:         #3B82F6;
    --bs-link-hover-color:   #1D4ED8;
    --bs-border-color:       #E2E8F0;
    --bs-border-radius:      2px;
    --bs-border-radius-sm:   2px;
    --bs-border-radius-lg:   2px;
    --bs-border-radius-xl:   2px;
    --bs-border-radius-pill: 2px;
    --bs-body-font-family:   var(--font-sans);
    --bs-body-color:         var(--text);
    --bs-body-bg:            var(--bg);
}

/* ── Global baseline ────────────────────────────────────────── */
* { box-sizing: border-box; }
/* Scrollbar gutter — povinné per design manual §31 v1.13.2.
   Reserves space for vertical scrollbar so content doesn't shift
   horizontally when scrollbar appears/disappears. */
html { scrollbar-gutter: stable; background: var(--bg); }
@supports not (scrollbar-gutter: stable) {
    html { overflow-y: scroll; }
}
body { background: var(--bg); }
body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: var(--line-body);
    font-size: 16px;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary);
    line-height: var(--line-tight);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mono, code, pre, .num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* Kill Bootstrap rounded utilities */
.rounded, .rounded-1, .rounded-2, .rounded-3,
.rounded-pill, .rounded-circle { border-radius: 2px !important; }

/* Page wrapper — capped at design manual §31 container tiers.
   Navbar + footer stay full-bleed (with --page-inset gutter);
   only main content area is capped. */
.hermes-page {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding: var(--space-6) var(--page-inset) var(--space-8);
}
.hermes-page > * + * { margin-top: var(--space-5); }

/* Footer respects same cap so it aligns with content above */
.hermes-footer {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
}

/* Hide Bootstrap navbar (we use .nav-acc) */
.navbar { display: none; }

/* ── .nav-acc (standard Accadema navbar) ────────────────────── */
.nav-acc {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: .95rem var(--page-inset);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    min-height: 64px;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;                        /* §38 flex contract — only search shrinks */
}
.module-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 2px;
    font-size: 1rem;
    flex-shrink: 0;
}
.nav-context {
    display: flex;
    flex-direction: column;
    font-size: .75rem;
    color: var(--text-muted);
    line-height: 1.2;
    flex-shrink: 0;                        /* §38 — context never compresses (would collide with search) */
    min-width: 140px;                      /* fits "PUBLISHING" + breathing room */
    max-width: 220px;                      /* cap so it doesn't steal search space */
    overflow: hidden;                      /* clip children that exceed; ellipsis below */
}
.nav-context .label {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.nav-context .name {
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;                       /* fits parent; ellipsis when exceeding */
}
.nav-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
    flex-shrink: 0;
}
.nav-search {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 0 1 320px;                       /* §38 — base 320px, shrink OK, no grow (no eating context space) */
    min-width: 200px;                      /* never crush below readable */
    max-width: 560px;
    padding: 0 .8rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 2px;
    height: 38px;
}
.nav-search-ico { color: var(--text-muted); font-size: .95rem; flex-shrink: 0; }
.nav-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: .9rem;
    color: var(--text);
    font-family: var(--font-sans);
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-actions {
    display: flex; align-items: center; gap: .4rem;
    margin-left: auto;
    flex-shrink: 0;                        /* §38 flex contract — only search shrinks */
}
.nav-actions > .nav-icon-btn,
.nav-actions > .nav-user,
.nav-actions > .nav-divider             { flex-shrink: 0; }
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: .45rem .8rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    transition: color var(--dur-fast), background var(--dur-fast);
    border-radius: 2px;
    white-space: nowrap;                   /* §38 white-space contract — never wrap link label */
    flex-shrink: 0;                        /* keep link width; navbar shrinks search first */
}
.nav-link:hover { color: var(--primary); background: rgba(15,23,42,.05); text-decoration: none; }
.nav-link.active { color: var(--primary); font-weight: 600; }

/* "More ▾" overflow dropdown trigger (§38 nav-link-count budget pattern).
   Used when a module has >4 nav-links — last 2-3 group under one dropdown. */
.nav-more { position: relative; flex-shrink: 0; }
.nav-link-more {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}
.nav-link-more::after {
    display: inline-block;
    margin-left: .35rem;
    vertical-align: middle;
    content: "";
    border-top: 4px solid currentColor;
    border-right: 4px solid transparent;
    border-bottom: 0;
    border-left: 4px solid transparent;
    transition: transform var(--dur-fast) var(--ease);
}
.nav-link-more[aria-expanded="true"]::after { transform: rotate(180deg); }
.nav-more .dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: .25rem 0;
    margin-top: .35rem;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(15,23,42,.08);
    background: var(--bg);
}
.nav-more .dropdown-item {
    padding: .5rem .85rem;
    font-size: .88rem;
    color: var(--text);
    display: block;
    text-decoration: none;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-more .dropdown-item:hover,
.nav-more .dropdown-item:focus {
    background: var(--bg-alt);
    color: var(--primary);
}
.nav-more .dropdown-item.active {
    background: var(--bg-alt);
    color: var(--primary);
    font-weight: 600;
}
.nav-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color var(--dur-fast);
    border-radius: 2px;
}
.nav-icon-btn:hover { color: var(--primary); }
.nav-pip {
    position: absolute;
    top: .15rem; right: .1rem;
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
}
.nav-user {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: .35rem .65rem;
    color: var(--text);
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 2px;
}
.nav-user:hover { background: rgba(15,23,42,.05); color: var(--text); text-decoration: none; }
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: var(--primary);
    color: #fff;
    border-radius: 2px;
    font-size: .72rem;
    font-weight: 700;
}
.athena-ring {
    width: 16px; height: 16px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: inline-block;
}

/* ── §38 Priority+ cascade collapse states (JS-toggled) ──
   When Priority+ JS detects overflow after moving all nav-links,
   it cascades to (b) collapse search → icon, then (c) hide user name → initials only.
   Each step adds a class on .nav-acc; CSS below activates that step's collapse.
   Same visual contract as ≤991 burger collapse, but triggered at variable widths. */
.nav-acc.is-search-collapsed .nav-search       { display: none; }
.nav-acc.is-search-collapsed .nav-search-trigger { display: inline-flex; align-items: center; justify-content: center; }
.nav-acc.is-user-name-collapsed .nav-user .user-name { display: none; }
.nav-acc.is-user-name-collapsed .nav-user      { padding: .35rem; }

/* ── Responsive collapse: burger + search-trigger + drawer (sekcia 38) ── */
/* Desktop ≥992px: burger + search-trigger hidden, inline search + nav-links visible */
.nav-acc .nav-burger,
.nav-acc .nav-search-trigger {
    display: none;
    background: transparent;
    border: 0;
    padding: .5rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    border-radius: 2px;
    line-height: 1;
}
.nav-acc .nav-burger:hover,
.nav-acc .nav-search-trigger:hover { color: var(--primary); }
.nav-acc .nav-burger:focus-visible,
.nav-acc .nav-search-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Off-canvas drawer — box-shadow only when open
   (otherwise the right-edge shadow leaks into the viewport
   from translateX(-100%) and appears as a persistent left-side tint). */
.nav-drawer {
    position: fixed; top: 0; left: 0;
    height: 100vh; width: min(320px, 85vw);
    background: #fff;
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform .25s ease, box-shadow .25s ease;
    z-index: 1050;
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.nav-drawer[data-open="true"] {
    transform: translateX(0);
    box-shadow: 2px 0 24px rgba(15,23,42,.18);
}
.nav-drawer .nav-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: #fff; z-index: 1;
}
.nav-drawer .nav-drawer-head h3 {
    margin: 0; font-size: 1rem; font-weight: 700;
    color: var(--primary); letter-spacing: -.2px;
}
.nav-drawer .nav-drawer-close {
    background: transparent; border: 0; font-size: 1.4rem;
    cursor: pointer; color: var(--text-muted);
    padding: .25rem .5rem; line-height: 1; border-radius: 2px;
}
.nav-drawer .nav-drawer-close:hover { color: var(--primary); }
.nav-drawer .nav-drawer-body { padding: .5rem 0; flex: 1; }
.nav-drawer .nav-drawer-body a {
    display: flex; align-items: center; gap: .65rem;
    padding: .85rem 1.25rem;
    color: var(--text); text-decoration: none;
    font-size: .95rem;
    border-bottom: 1px solid var(--border);
}
.nav-drawer .nav-drawer-body a:hover { background: var(--bg-alt); color: var(--primary); }
.nav-drawer .nav-drawer-body a i { width: 1.1rem; color: var(--text-muted); }

/* Search drawer */
.nav-drawer.nav-search-drawer .nav-drawer-body { padding: 1rem 1.25rem; }
.nav-drawer.nav-search-drawer .nav-drawer-search-wrap { position: relative; }
.nav-drawer.nav-search-drawer .nav-drawer-search-wrap i {
    position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: .95rem;
}
.nav-drawer.nav-search-drawer .nav-drawer-search-input {
    width: 100%; height: 42px;
    padding: 0 .85rem 0 2.5rem;
    border: 1px solid var(--border); border-radius: 2px;
    background: var(--bg-alt); font-size: 1rem; color: var(--text);
}
.nav-drawer.nav-search-drawer .nav-drawer-search-input:focus {
    outline: none; border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 3px rgba(15,23,42,.06);
}
.nav-drawer.nav-search-drawer .nav-drawer-recent {
    margin-top: 1.25rem; font-size: .78rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: .5rem;
}
.nav-drawer.nav-search-drawer .nav-drawer-recent-list a {
    padding: .65rem .25rem; border-bottom: 1px solid var(--border);
    font-size: .9rem; display: flex; gap: .6rem; align-items: center;
    color: var(--text); text-decoration: none;
}
.nav-drawer.nav-search-drawer .nav-drawer-recent-list a:hover { color: var(--primary); }
.nav-drawer.nav-search-drawer .nav-drawer-recent-list a i { color: var(--text-muted); font-size: .8rem; }

/* Backdrop */
.nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.5);
    z-index: 1040; opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
}
.nav-backdrop[data-open="true"] { opacity: 1; pointer-events: auto; }
body.nav-drawer-open { overflow: hidden; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: .75rem 2rem;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--dur-fast), background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
    border: 1px solid transparent;
    line-height: 1;
}
.btn:focus-visible { outline: 3px solid rgba(15,23,42,.06); outline-offset: 2px; }
.btn-sm { padding: .5rem 1.25rem; font-size: .85rem; }
.btn-xs { padding: .3rem .75rem; font-size: .78rem; }

.btn-dark {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-dark:hover {
    background: #fff;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-outline-dark {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}
.btn-outline-dark:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn[disabled], .btn:disabled { opacity: .5; transform: none; cursor: not-allowed; }

.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.btn-row.tight { gap: .5rem; }
.btn-row.loose { gap: 1rem; }

/* ── Badges & chips ─────────────────────────────────────────── */
.b-badge {
    display: inline-block;
    padding: .25rem .65rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-radius: 2px;
    white-space: nowrap;
    line-height: 1.4;
}
.b-badge.dark   { background: var(--primary); color: #fff; }
.b-badge.muted  { background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border); }
.b-badge.accent { background: rgba(59,130,246,.1); color: var(--accent); }
.b-badge.ok     { background: rgba(34,197,94,.1); color: var(--success); }
.b-badge.warn   { background: rgba(245,158,11,.1); color: var(--warning); }
.b-badge.danger { background: rgba(239,68,68,.1); color: var(--danger); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: .45rem .75rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: .85rem;
    color: var(--text);
}
.chip i { color: var(--text-muted); }

/* Status dot (single exception to sharp corners) */
.dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: var(--radius-pill);
    margin-right: var(--space-1);
}
.dot.ok { background: var(--success); }
.dot.warn { background: var(--warning); }
.dot.danger { background: var(--danger); }
.dot.muted { background: var(--text-muted); }

/* ── Cards ──────────────────────────────────────────────────── */
.card-clean {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: var(--space-5);
    height: 100%;
    transition: border-color var(--dur-fast);
}
.card-clean:hover { border-color: var(--text-muted); }
.card-clean.compact { padding: var(--space-4); height: auto; }
/* In sidebar stacks, cards should not stretch to full column height */
.card-stack > .card-clean { height: auto; }
.card-stack > .card-clean + .card-clean { margin-top: var(--space-4); }
.card-clean.rail-accent { border-left: 3px solid var(--accent); }
.card-clean.rail-primary { border-left: 3px solid var(--primary); }
.card-clean.rail-warning { border-left: 3px solid var(--warning); }
.card-clean.rail-danger { border-left: 3px solid var(--danger); }

.os-tag {
    display: inline-block;
    padding: .18rem .45rem;
    background: var(--bg-alt);
    color: var(--primary);
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-radius: 2px;
    border: 1px solid var(--border);
}

.icon-simple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 2px;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: .35rem;
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control, .form-select, textarea.form-control {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #fff;
    font-family: var(--font-sans);
    font-size: .95rem;
    color: var(--text);
    line-height: 1.4;
    outline: none;
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15,23,42,.06);
}
.form-help {
    display: block;
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .3rem;
}
.form-error {
    display: block;
    font-size: .8rem;
    color: var(--danger);
    margin-top: .3rem;
}
.form-group + .form-group { margin-top: var(--space-3); }

/* ── Tables ─────────────────────────────────────────────────── */
.tbl {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: .92rem;
    background: #fff;
}
.tbl thead { background: var(--bg-alt); }
.tbl th {
    text-align: left;
    padding: .6rem 1rem;
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.tbl td {
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--bg-alt); }
.tbl .col-actions { text-align: right; white-space: nowrap; }
.tbl .col-num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-dense th, .tbl-dense td { padding: .45rem .8rem; font-size: .86rem; }

/* ── Tabs (Bootstrap override — sharp corners, dark active) ──── */
.nav-tabs {
    border-bottom: 1px solid var(--border);
    gap: 0;
}
.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    padding: .65rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: .9rem;
    border-radius: 0;
    background: transparent;
}
.nav-tabs .nav-link:hover {
    color: var(--primary);
    background: transparent;
    border-bottom-color: var(--border);
}
.nav-tabs .nav-link.active {
    color: var(--primary);
    background: transparent;
    border-bottom-color: var(--primary);
}

/* ── Breadcrumbs (subtle) ───────────────────────────────────── */
.crumbs {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: .8rem;
    color: var(--text-muted);
    list-style: none;
    padding: 0;
    margin: 0;
}
.crumbs li + li::before { content: "/"; margin-right: var(--space-1); color: var(--border); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--primary); text-decoration: none; }
.crumbs li:last-child { color: var(--text); }

/* ── Alert (informational, sharp 2px) ───────────────────────── */
.alert-clean {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    background: var(--bg-alt);
    border-radius: 2px;
    font-size: .9rem;
    color: var(--text);
}
.alert-clean i { color: var(--accent); margin-top: 2px; }

/* ── Wizard / step indicator ────────────────────────────────── */
.wizard-steps {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.wizard-step {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: .85rem;
    color: var(--text-muted);
    padding: .25rem .5rem;
}
.wizard-step.done { color: var(--success); }
.wizard-step.active { color: var(--primary); font-weight: 600; }
.wizard-step-num {
    display: inline-block;
    min-width: 1.35rem;
    text-align: center;
    padding: .05rem .25rem;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 2px;
    font-size: .78rem;
    font-weight: 700;
}
.wizard-step.active .wizard-step-num { border-color: var(--primary); }
.wizard-step.done .wizard-step-num { border-color: var(--success); color: var(--success); }
.wizard-divider { flex: 1; height: 1px; background: var(--border); min-width: 12px; }

/* ── Kanban (production tracker) ────────────────────────────── */
.kanban {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-3);
}
.kanban-col {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: var(--space-3);
    min-height: 360px;
}
.kanban-col h6 {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kanban-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: var(--space-3);
    margin-bottom: var(--space-2);
    transition: border-color var(--dur-fast);
    cursor: pointer;
}
.kanban-card:hover { border-color: var(--text-muted); }
.kanban-card.blocked { border-left: 3px solid var(--danger); }
.kanban-card .ms-code {
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}
.kanban-card .ms-label {
    font-weight: 600;
    font-size: .92rem;
    color: var(--primary);
    margin: .15rem 0 var(--space-2);
    line-height: 1.3;
}
.kanban-card .ms-meta {
    font-size: .78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-1);
}
.kanban-card .ms-meta i { width: 12px; }
.kanban-card .ms-badges { margin-top: var(--space-2); display: flex; flex-wrap: wrap; gap: .25rem; }

/* ── Progress bar (budget) ──────────────────────────────────── */
.progress-clean {
    height: 6px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.progress-clean > div {
    height: 100%;
    background: var(--primary);
    transition: width var(--dur-base) var(--ease);
}
.progress-clean.over > div { background: var(--danger); }

/* ── KPI stat tiles (sharp, hairline) ───────────────────────── */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-3);
}
.stat-tile {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: var(--space-3) var(--space-4);
}
.stat-tile .label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    font-weight: 700;
}
.stat-tile .value {
    display: block;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    margin-top: .2rem;
    font-variant-numeric: tabular-nums;
}
.stat-tile .delta {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .25rem;
}
.stat-tile .delta.up { color: var(--success); }
.stat-tile .delta.down { color: var(--danger); }

/* ── Vertical timeline ──────────────────────────────────────── */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 6px; bottom: 6px;
    width: 1px;
    background: var(--border);
}
.timeline > li {
    position: relative;
    padding-left: 32px;
    padding-bottom: var(--space-5);
}
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    width: 12px; height: 12px;
    background: #fff;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
}
.timeline > li.done::before { border-color: var(--success); background: var(--success); }
.timeline > li.active::before { border-color: var(--primary); background: var(--primary); }
.timeline > li.blocked::before { border-color: var(--danger); background: var(--danger); }
.timeline-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-1);
}
.timeline-head .ts {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-muted);
}
.timeline-head .actor { font-size: .85rem; color: var(--text); font-weight: 600; }

/* ── Workflow pipeline (unified Hermes spine) ───────────────── */
/* Single component, three zoom levels: mini / default / full.
   Reference: ui-mockups/_reference/workflow-pipeline.html
   Replaces wizard-steps, P0-P8 accordion, milestone checklist,
   and vertical action/wait alternation across all surfaces. */

.pipe {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #fff;
}
.pipe > li {
    position: relative;
    border-bottom: 1px solid var(--border);
}
.pipe > li:last-child { border-bottom: 0; }
.pipe::before {
    content: "";
    position: absolute;
    left: calc(var(--space-4) + 14px);
    top: var(--space-4);
    bottom: var(--space-4);
    width: 1px;
    background: var(--border);
    z-index: 0;
}

.pipe-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-4);
    position: relative;
    z-index: 1;
}
.pipe-disc {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.pipe > li.done .pipe-disc    { background: var(--success); border-color: var(--success); color: #fff; }
.pipe > li.active .pipe-disc  { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(15,23,42,.08); }
.pipe > li.blocked .pipe-disc { background: var(--danger);  border-color: var(--danger);  color: #fff; }
.pipe > li.pending .pipe-disc { color: var(--text-muted); }

.pipe-body { min-width: 0; }
.pipe-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: .15rem;
}
.pipe-num {
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .05em;
    text-transform: uppercase;
}
.pipe-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
}
.pipe > li.pending .pipe-title { color: var(--text-muted); font-weight: 500; }
.pipe-meta {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.pipe-meta strong { color: var(--text); font-weight: 600; }
.pipe-side {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

/* Full-zoom sub-steps */
.pipe-sub {
    list-style: none;
    margin: 0;
    padding: 0 var(--space-4) var(--space-4) calc(var(--space-4) + 32px + var(--space-3));
    border-top: 1px dashed var(--border);
    background: var(--bg-alt);
}
.pipe-sub > li {
    display: grid;
    grid-template-columns: 3.5rem 1fr auto auto;
    gap: var(--space-3);
    align-items: center;
    padding: .55rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: .85rem;
}
.pipe-sub > li:last-child { border-bottom: 0; }
.pipe-sub .sub-code {
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .04em;
}
.pipe-sub .sub-action { color: var(--text); }
.pipe-sub > li.done .sub-action { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--text-muted); }
.pipe-sub .mode-i { width: 18px; text-align: center; font-size: .7rem; }

/* Mini variant (compact, fits list rows) */
.pipe-mini {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem 0;
}
.pipe-mini .mini-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--text-muted);
    flex-shrink: 0;
}
.pipe-mini .mini-line {
    width: 14px; height: 1px;
    background: var(--border);
    flex-shrink: 0;
}
.pipe-mini .mini-dot.done    { background: var(--success); border-color: var(--success); }
.pipe-mini .mini-dot.active  { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,23,42,.08); }
.pipe-mini .mini-dot.blocked { background: var(--danger);  border-color: var(--danger); }
.pipe-mini .mini-label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-left: .25rem;
    white-space: nowrap;
}
.pipe-mini .mini-label strong { color: var(--text); font-weight: 600; }

/* Actor role badges (consistent vocabulary across all surfaces) */
.actor-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem .5rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-radius: 2px;
    border: 1px solid;
    white-space: nowrap;
}
.actor-badge i { font-size: .6rem; }
.actor-badge.desk    { color: var(--primary); border-color: var(--primary); background: rgba(15,23,42,.04); }
.actor-badge.author  { color: var(--accent);  border-color: var(--accent);  background: rgba(59,130,246,.06); }
.actor-badge.prod    { color: var(--warning); border-color: var(--warning); background: rgba(245,158,11,.08); }
.actor-badge.system  { color: var(--text-muted); border-color: var(--border); background: var(--bg-alt); }
.actor-badge.board   { color: var(--primary); border-color: var(--primary); background: rgba(15,23,42,.04); }
.actor-badge.printer { color: var(--warning); border-color: var(--warning); background: rgba(245,158,11,.08); }

/* ── Process strip (handoff chain) ──────────────────────────── */
.process-strip {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    background: #fff;
}
.process-step {
    flex: 1;
    padding: var(--space-3);
    border-right: 1px solid var(--border);
    font-size: .82rem;
    min-width: 0;
}
.process-step:last-child { border-right: none; }
.process-step .role {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    font-weight: 700;
    display: block;
    margin-bottom: .25rem;
}
.process-step .name {
    color: var(--text);
    font-weight: 600;
    display: block;
    margin-bottom: .2rem;
}
.process-step .when {
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--text-muted);
}
.process-step.done { background: rgba(34,197,94,.06); }
.process-step.active { background: rgba(59,130,246,.06); }
.process-step.pending { background: var(--bg-alt); color: var(--text-muted); }

/* ── Mockup semantic marker .live (no visual rendering) ──────
   Originally rendered an asterisk to flag "this link works".
   Removed 2026-05-16 — class kept as semantic marker for future
   testing/automation but no visual indicator. */

/* ============================================================
   Skeleton loaders (§22 Status & feedback — canonical pattern)
   Used on async lists, tables, cards, covers, KPI tiles while
   data is fetching. Layout MUST mimic incoming content shape
   so the page doesn't jump on data arrival.
   ============================================================ */
@keyframes acc-skeleton-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.skel {
    background: linear-gradient(90deg, var(--bg-alt) 25%, rgba(15,23,42,.06) 50%, var(--bg-alt) 75%);
    background-size: 200% 100%;
    animation: acc-skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: 2px;
    display: block;
}
@media (prefers-reduced-motion: reduce) {
    .skel { animation: none; background: var(--bg-alt); }
}
.skel-line       { height: .75rem; }
.skel-line.lg    { height: 1rem; }
.skel-h          { height: 1.5rem; }
.skel-h.lg       { height: 2rem; }
.skel-chip       { height: 1.1rem; width: 4.5rem; display: inline-block; vertical-align: middle; }
.skel-avatar     { height: 26px; width: 26px; border-radius: 50%; }
.skel-avatar.lg  { height: 44px; width: 44px; }
.skel-cover      { aspect-ratio: 2 / 3; width: 100%; }
.skel-btn        { height: 38px; width: 140px; }
.skel-stack > * + * { margin-top: .65rem; }
.skel-w-40 { width: 40%; }
.skel-w-50 { width: 50%; }
.skel-w-60 { width: 60%; }
.skel-w-70 { width: 70%; }
.skel-w-80 { width: 80%; }
.skel-w-90 { width: 90%; }


/* ── App footer · light, "by Accadema" bottom-right only ──── */
.hermes-footer {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding: var(--space-5) var(--page-inset) var(--space-4);
    background: transparent;
    text-align: right;
    font-size: .75rem;
    color: var(--text-muted);
    letter-spacing: .02em;
}
.hermes-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}
.hermes-footer a:hover { color: var(--primary); text-decoration: none; }

/* ── Section header (between tabs and content) ──────────────── */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}
.section-head h2 {
    font-size: 1.05rem;
    margin: 0;
}
.section-head .lede {
    font-size: .85rem;
    color: var(--text-muted);
    margin: .2rem 0 0 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
.foot-clean {
    border-top: 1px solid var(--border);
    padding: var(--space-4) var(--page-inset);
    font-size: .8rem;
    color: var(--text-muted);
    background: var(--bg);
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Container width matrix tiers (design manual §31) */
@media (min-width: 1440px) and (max-width: 1599.98px) {
    :root { --container-max: 1440px; }
}
@media (min-width: 1600px) and (max-width: 1919.98px) {
    :root { --container-max: 1600px; }
}
@media (min-width: 1920px) and (max-width: 2559.98px) {
    :root { --container-max: 1680px; }
}
@media (min-width: 2560px) {
    :root { --container-max: 1840px; }
}
/* Kiosk vertical (portrait + touch + tablet+): full-bleed */
@media (orientation: portrait) and (min-width: 768px) and (pointer: coarse) {
    :root { --container-max: 100%; --page-inset: 0px; }
}

/* Notebook+ tier (≤1439): tighten search + truncate context name to label */
@media (max-width: 1439.98px) {
    .nav-acc { gap: 1rem; }                                /* tighter internal gap */
    .nav-acc .nav-search { max-width: 360px; }
    .nav-acc .nav-context .name { max-width: 14ch; }       /* "University Press" → "Universit…" if needed */
}

/* Notebook tier (≤1199): hide context name; nav-link count already capped at 4+More (§38) */
@media (max-width: 1199.98px) {
    .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-acc .nav-search { flex: 1 1 200px; max-width: 280px; }
    .nav-acc .nav-context .name { display: none; }
}
@media (max-width: 991.98px) {
    /* Tablet/mobile navbar collapse — burger + search-trigger replace inline items */
    .nav-acc { padding: .75rem 1rem; min-height: 0; flex-wrap: nowrap; gap: .75rem; }
    .nav-acc .nav-search { display: none; }
    .nav-acc .nav-actions .nav-link { display: none; }
    .nav-acc .nav-actions .nav-divider { display: none; }
    .nav-acc .nav-burger { display: inline-flex; align-items: center; justify-content: center; order: -1; }
    .nav-acc .nav-search-trigger { display: inline-flex; align-items: center; justify-content: center; }
    .nav-acc .nav-context { display: none; }
    .nav-acc .nav-actions { margin-left: auto; flex-wrap: nowrap; gap: .4rem; }
    /* kanban stacks */
    .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .btn { padding: .65rem 1.25rem; }
}

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

/* ── Mockup helpers (used by calls/editorial-board/contributors/titles/budgets pages) ── */

/* Page header — title + actions row */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
}
.page-head .title-block { flex: 1 1 320px; min-width: 0; }
.page-head .title-block h1 { margin: 0 0 .25rem; font-size: 1.6rem; line-height: 1.2; }
.page-head .page-sub { margin: 0; color: var(--text-muted); font-size: .92rem; line-height: 1.55; max-width: 70ch; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; flex-shrink: 0; }

/* KPI grid — alias of stat-row but 4-column-friendly */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}
@media (max-width: 991.98px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
}
.kpi .label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    font-weight: 700;
}
.kpi .value {
    display: block;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    margin-top: .2rem;
}
.kpi .delta {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

/* Form-row — vertical stacked input block (used in wizards & settings pages) */
.form-row { margin-bottom: var(--space-4); }
.form-row > label,
.form-row label:first-child {
    display: block;
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .35rem;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="search"],
.form-row input[type="number"],
.form-row input[type="date"],
.form-row input[type="color"],
.form-row select,
.form-row textarea {
    display: block;
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: .92rem;
    line-height: 1.4;
}
.form-row textarea { font-family: var(--font-sans); resize: vertical; min-height: 5.5rem; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}
.form-row .hint,
.hint {
    display: block;
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .35rem;
    line-height: 1.45;
}

/* Input with prefix (e.g. CALL-2026- code field) */
.input-with-prefix { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.input-with-prefix .prefix {
    background: var(--bg-alt);
    border-right: 1px solid var(--border);
    padding: .55rem .75rem;
    font-family: var(--font-mono);
    font-size: .88rem;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.input-with-prefix input { border: 0 !important; flex: 1; padding: .55rem .75rem; font-family: var(--font-mono); font-size: .88rem; }

/* Wizard layout (call creation) */
.wizard {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-6);
    align-items: start;
}
@media (max-width: 991.98px) {
    .wizard { grid-template-columns: 1fr; gap: var(--space-4); }
}
.wizard-steps ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}
.wizard-steps ol li {
    counter-increment: step;
    padding: .65rem .85rem;
    border-left: 2px solid var(--border);
    color: var(--text-muted);
    font-size: .92rem;
    line-height: 1.35;
    position: relative;
}
.wizard-steps ol li::before {
    content: counter(step);
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
    line-height: 1.4rem;
    text-align: center;
    background: var(--bg-alt);
    color: var(--text-muted);
    border-radius: 50%;
    margin-right: .5rem;
    font-size: .75rem;
    font-weight: 700;
    font-family: var(--font-mono);
}
.wizard-steps ol li.current {
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}
.wizard-steps ol li.current::before {
    background: var(--primary);
    color: #fff;
}
.wizard-body { min-width: 0; }
.wizard-body h2 { font-size: 1.2rem; color: var(--primary); margin: 0 0 .35rem; }
.step-intro { color: var(--text-muted); font-size: .92rem; margin: 0 0 var(--space-5); max-width: 65ch; line-height: 1.55; }
.wizard-nav {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* Code-inline (e.g. paths in callouts) */
code.inline {
    background: var(--bg-alt);
    padding: .1rem .35rem;
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: .85em;
    color: var(--primary);
}

/* Card .compact variant */
.card-clean.compact { padding: var(--space-3) var(--space-4); }

/* Generic text helpers used in mockups */
.text-link { color: var(--accent); text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.col-actions { text-align: right; white-space: nowrap; }

/* Tighter button group inside table rows */
.btn-row.tight { gap: .35rem; }

