/* =========================================================
   ATTRI SHELL CHROME  ·  attri-web-owned
   Replicates the Command-Center Shell.dc.html mockup (masthead band + scrolling
   marquee + full-height rail) in plain CSS. Colours are ALWAYS kit tokens
   (tokens.css) — no hardcoded hex. Reuses kit keyframes: `edt-marquee`, `pulse`.
   The kit's own CSS is never edited; this is the sanctioned shell layer only.
   ========================================================= */

/* Paper-alpha hairlines for the dark band (no token exists for on-ink dividers) */
:root { --attri-band-h: 36px; --attri-rail-w: 304px; --attri-rail-wc: 76px; }

/* [hidden] must beat the overlays' display:flex — the vanilla shell controller
   (attri-shell.js) shows/hides everything via the hidden attribute. */
[hidden] { display: none !important; }

.attri-app {
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
}

/* ===== MASTHEAD BAND ===== */
.attri-band {
    position: sticky;
    top: 0;
    z-index: var(--z-dropdown);
    height: var(--attri-band-h);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: var(--ink);
    color: var(--paper);
    border-bottom: 2px solid var(--ink);
}

.attri-band-label {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    border-right: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
    background: transparent;
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}
.attri-band-label:hover { background: color-mix(in srgb, var(--paper) 9%, transparent); }
.attri-band-pip {
    width: 7px;
    height: 7px;
    background: var(--acid);
    display: inline-block;
    animation: pulse 2s infinite;
}

.attri-band-marquee {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.attri-band-track {
    display: flex;
    gap: 3rem;
    width: max-content;
    padding-left: 1.5rem;
    white-space: nowrap;
    /* Own keyframes (defined below) — no dependency on a kit-internal name. The track
       is rendered as two identical runs, so translateX(-50%) loops seamlessly. */
    animation: attri-marquee 40s linear infinite;
}
/* Seamless marquee loop: shift by exactly one run width (-50% of the doubled track). */
@keyframes attri-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.attri-band-marquee:hover .attri-band-track { animation-play-state: paused; }
.attri-tick {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper);
}
.attri-tick-star { color: var(--accent); }
.attri-tick-dot {
    width: 6px;
    height: 6px;
    background: var(--acid);
    display: inline-block;
    animation: pulse 2s infinite;
}

.attri-band-env {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0 16px;
    border-left: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--paper);
}
.attri-band-env b { color: var(--acid); font-weight: 700; }
.attri-band-sep { opacity: 0.4; }

/* ===== FLOATING ACTION BUTTONS (bell + search), bottom-right — mockup Funnels.dc.html ===== */
.attri-fabs {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    gap: 11px;
    z-index: var(--z-dropdown);
}
.attri-fab {
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: transform var(--dur-instant), box-shadow var(--dur-instant);
}
.attri-fab .icon { width: 17px; height: 17px; }
.attri-fab--bell {
    background: var(--paper);
    color: var(--ink);
    box-shadow: 3px 3px 0 var(--accent);
}
.attri-fab--bell:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--accent); }
.attri-fab--search {
    background: var(--ink);
    color: var(--paper);
    box-shadow: 3px 3px 0 var(--accent-2);
}
.attri-fab--search:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--accent-2); }
.attri-fab-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--paper);
    border: 2px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 800;
    line-height: 1;
}

/* ===== MASTHEAD ACCOUNT CELL + DROPDOWN ===== */
.attri-band-acct-wrap { position: relative; flex-shrink: 0; display: flex; align-items: stretch; }
.attri-band-acct {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    background: transparent;
    border: none;
    border-left: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
    color: var(--paper);
    cursor: pointer;
    transition: background var(--dur-instant);
}
.attri-band-acct:hover { background: color-mix(in srgb, var(--paper) 9%, transparent); }
.attri-band-caret {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--paper);
    transition: transform var(--dur-fast);
}
.attri-band-caret.is-open { transform: rotate(180deg); }

/* Account dropdown. MUST be position:fixed — the parent .attri-band has
   `overflow:hidden` (to clip the marquee), which would otherwise CLIP an
   absolutely-positioned menu to the 36px band and make it invisible. Fixed
   positioning escapes that clip. z-index sits above the band + FABs. */
.attri-menu {
    position: fixed;
    top: calc(var(--attri-band-h) + 6px);
    right: 8px;
    width: 244px;
    z-index: var(--z-modal);
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
}
.attri-menu-head {
    padding: 11px 14px;
    border-bottom: 2px solid var(--ink);
    background: var(--surface);
}
.attri-menu-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.attri-menu-sub {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-top: 2px;
}
.attri-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--hairline);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
    transition: background var(--dur-instant), color var(--dur-instant);
}
.attri-menu-item:last-child { border-bottom: none; }
.attri-menu-item .icon { width: 16px; height: 16px; flex-shrink: 0; }
.attri-menu-item:not(.is-inert):hover { background: var(--bg-deep); }
.attri-menu-item.is-danger:not(.is-inert):hover { background: var(--accent); color: var(--paper); }
.attri-menu-item.is-inert { color: var(--ink-faint); cursor: not-allowed; }
.attri-menu-div { height: 2px; background: var(--ink); }
.attri-band-mark {
    width: 22px;
    height: 22px;
    background: var(--accent);
    border: 1.5px solid var(--paper);
    color: var(--paper);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.6rem;
    flex-shrink: 0;
}
.attri-band-name {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--paper);
}

/* ===== SHELL GRID ===== */
.attri-shell {
    display: grid;
    grid-template-columns: var(--attri-rail-w) 1fr;
    min-height: calc(100vh - var(--attri-band-h));
    transition: grid-template-columns var(--dur-smooth) var(--ease-snap);
}
/* Collapsed = icon-only rail (mockup collapse mode). The rail STAYS visible and the
   logo stays clickable, so collapsing is never a trap — click the "A" or press ⌘. to reopen. */
.attri-app--collapsed .attri-shell { grid-template-columns: var(--attri-rail-wc) 1fr; }
.attri-app--collapsed .attri-wordmark,
.attri-app--collapsed .attri-ws-body,
.attri-app--collapsed .attri-ws-caret,
.attri-app--collapsed .attri-group-label,
.attri-app--collapsed .attri-group-rule,
.attri-app--collapsed .attri-group-fold,
.attri-app--collapsed .attri-foot-build,
.attri-app--collapsed .attri-kbd { display: none; }
/* Collapse mode = ONE icon per GROUP, centered + larger. All items are hidden;
   clicking a group icon expands the rail and opens that group (see attri-shell.js). */
.attri-app--collapsed .attri-group-items { display: none; }
.attri-app--collapsed .attri-group { padding-bottom: 0; border-bottom: 1px solid var(--hairline); }
.attri-app--collapsed .attri-rail-head { padding: 16px 0 20px; justify-content: center; }
.attri-app--collapsed .attri-ws { grid-template-columns: 1fr; justify-items: center; padding: 12px 0; }
.attri-app--collapsed .attri-group-head { padding: 15px 0; justify-content: center; }
.attri-app--collapsed .attri-group-head:hover { background: var(--bg-deep); }
.attri-app--collapsed .attri-group-ic { width: 34px; height: 34px; }
.attri-app--collapsed .attri-group-ic .icon { width: 30px; height: 30px; }
/* The group that owns the active page gets an accent bar + acid icon while collapsed. */
.attri-app--collapsed .attri-group--active { box-shadow: inset 4px 0 0 var(--accent); }
.attri-app--collapsed .attri-group--active .attri-group-ic { color: var(--accent); }
.attri-app--collapsed .attri-rail-foot { justify-content: center; padding: 13px 0; }

/* ===== RAIL ===== */
.attri-rail {
    position: sticky;
    top: var(--attri-band-h);
    height: calc(100vh - var(--attri-band-h));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--paper);
    border-right: 2px solid var(--ink);
}

.attri-rail-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 24px;
    border-bottom: 2px solid var(--ink);
    background: var(--paper);
}
.attri-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--accent);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    color: var(--paper);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
    transition: transform var(--dur-instant), box-shadow var(--dur-instant);
}
.attri-logo:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--accent); }
.attri-logo:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
/* The "A" glyph carries the idle motion so it never fights the tile's :hover transform.
   anime.js drives it at runtime; this CSS keyframe is the no-JS fallback (disabled once
   anime takes over via .anime-idle, and under prefers-reduced-motion). */
.attri-logo-glyph { display: inline-block; will-change: transform; }
@keyframes attri-logo-idle {
    0%, 100% { transform: translateY(0) rotate(0); }
    50%      { transform: translateY(-3px) rotate(-3deg); }
}
.attri-logo-glyph { animation: attri-logo-idle 3.4s ease-in-out infinite; }
.anime-idle .attri-logo-glyph { animation: none; }
.attri-wordmark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: -0.06em;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1;
    margin-left: -2px;
}
.attri-wordmark-dot { color: var(--accent); }

.attri-ws {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 14px 20px;
    border: none;
    border-bottom: 2px solid var(--ink);
    background: var(--surface);
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: background var(--dur-instant);
}
.attri-ws:hover { background: var(--bg-deep); }
.attri-ws-mark {
    width: 32px;
    height: 32px;
    background: var(--accent-2);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    color: var(--paper);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.92rem;
}
.attri-ws-body { line-height: 1; min-width: 0; }
.attri-ws-cap {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 4px;
}
.attri-ws-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.025em;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attri-ws-caret {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--ink-muted);
    font-size: 1rem;
    line-height: 1;
}

/* Nav scroller — hide scrollbar (kit convention: [data-scroll]) */
.attri-nav { flex: 1; overflow-y: auto; overflow-x: hidden; }
.attri-nav[data-scroll] { scrollbar-width: none; -ms-overflow-style: none; }
.attri-nav[data-scroll]::-webkit-scrollbar { width: 0; height: 0; display: none; }

.attri-group { padding-bottom: 6px; }
/* Group head is a click-to-collapse button (accordion). Larger label + icon than
   items (mockup: WEB · BEHAVIOR head vs FUNNELS item). */
.attri-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 20px 20px 10px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    user-select: none;
    transition: background var(--dur-instant);
}
.attri-group-head:hover { background: var(--surface); }
.attri-group-ic {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ink);
}
.attri-group-ic .icon { width: 27px; height: 27px; stroke-width: 1.6; }
.attri-group-label {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
}
.attri-group-rule { flex: 1; height: 2px; background: var(--ink); }
.attri-group-fold {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--ink);
    transform: rotate(-90deg);
    transition: transform var(--dur-fast) var(--ease-snap);
}
.attri-group.is-open > .attri-group-head .attri-group-fold { transform: rotate(0deg); }
/* Active group's icon gets an accent tick so it reads even when collapsed. */
.attri-group--active .attri-group-ic { color: var(--accent); }

/* Smooth height collapse (grid-rows 0fr↔1fr — no plugin, matches mockup). */
.attri-group-items {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--dur-smooth) var(--ease-snap);
}
.attri-group.is-open > .attri-group-items { grid-template-rows: 1fr; }
.attri-group-items-inner { overflow: hidden; min-height: 0; }

.attri-item {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    border-bottom: 1px solid var(--hairline);
    text-decoration: none;
    position: relative;
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 var(--accent);
    transition: box-shadow var(--dur-instant), background var(--dur-instant);
}
.attri-item:hover { box-shadow: inset 4px 0 0 var(--accent); }
.attri-item--active {
    background: var(--ink);
    color: var(--paper);
    box-shadow: inset 4px 0 0 var(--accent);
}
.attri-item-ic {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}
.attri-item-ic .icon { width: 20px; height: 20px; }
.attri-item--active .attri-item-ic { color: var(--paper); }
.attri-item-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: -0.005em;
    text-transform: uppercase;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attri-item-chips {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    justify-self: end;
}
.attri-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}
.attri-chip--badge {
    font-size: 0.56rem;
    background: var(--accent);
    color: var(--paper);
    border: 1.5px solid var(--ink);
    padding: 2px 6px;
}
.attri-item--active .attri-chip--badge { border-color: var(--paper); }
.attri-chip--lock {
    padding: 1px;
    color: var(--ink);
}
.attri-chip--lock .icon { width: 14px; height: 14px; }
.attri-item--active .attri-chip--lock { color: var(--paper); }

.attri-rail-foot {
    border-top: 2px solid var(--ink);
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
}
.attri-foot-build {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--ink);
}
.attri-foot-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    background: var(--success);
    border: 1.5px solid var(--ink);
    animation: pulse 2.4s infinite;
}
.attri-foot-live { color: var(--ink-muted); font-weight: 600; }
.attri-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    background: var(--bg);
    border: 1.5px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--ink);
}

/* ===== CONTENT WELL ===== */
.attri-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 28px 40px 48px;
}

/* Breadcrumb strip (mockup pattern) */
.attri-crumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.attri-crumb-pip {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
    animation: pulse 2s infinite;
}
.attri-crumb-sep { color: var(--ink-faint); }
.attri-crumb-here {
    color: var(--ink);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
}

/* ===== RESPONSIVE: stack the rail above the well on narrow viewports ===== */
@media (max-width: 900px) {
    .attri-shell { grid-template-columns: 1fr; }
    .attri-rail {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 2px solid var(--ink);
    }
    .attri-nav { max-height: 60vh; }
    .attri-band-env { display: none; }
    .attri-main { padding: 20px 20px 40px; }
}
@media (max-width: 480px) {
    .attri-band-name { display: none; }
}

/* ===== MOTION SWITCH: app-level, overrides the OS preference =====
   Motion is gated on <html data-motion> (see base.html / attri-shell.js), NOT the OS
   setting. data-motion="on" (the default) plays every micro-animation; data-motion="off"
   disables the DISCRETE, attention-grabbing motion below (pulses, the logo idle, panel/rail
   transitions). The scrolling marquee is chrome and stays alive either way — matching the
   kit's own reduced-motion policy (voidsys.css keeps .edt-ticker-track running). */
html[data-motion="off"] .attri-band-pip,
html[data-motion="off"] .attri-tick-dot,
html[data-motion="off"] .attri-foot-dot,
html[data-motion="off"] .attri-crumb-pip,
html[data-motion="off"] .attri-logo-glyph { animation: none; }
html[data-motion="off"] .attri-shell { transition: none; }
html[data-motion="off"] .attri-logo { transition: none; }
html[data-motion="off"] .attri-group-items { transition: none; }
html[data-motion="off"] .attri-group-fold { transition: none; }

/* Re-assert motion under the OS reduced-motion setting when data-motion="on".
   The kit's voidsys.css global reset forces `animation-duration:0.001s !important` and
   `transition-duration:0.001s !important` on EVERY element whenever the OS asks for reduced
   motion — that zeroes our CSS transitions and stops the marquee. Because data-motion="on"
   deliberately defies that OS setting, we re-assert — with a more specific selector +
   !important (the same technique the kit uses for .edt-ticker-track) — every transition and
   keyframe the reset would otherwise kill. */
@media (prefers-reduced-motion: reduce) {
    /* Marquee — live pipeline chrome, scrolls regardless of data-motion. */
    .attri-band-track {
        animation: attri-marquee 40s linear infinite !important;
        animation-iteration-count: infinite !important;
    }
    /* Rail width tween (sidebar collapse/expand). */
    html[data-motion="on"] .attri-shell {
        transition: grid-template-columns var(--dur-smooth) var(--ease-snap) !important;
    }
    /* Accordion height (grid-rows 0fr↔1fr) + fold-caret rotation. */
    html[data-motion="on"] .attri-group-items {
        transition: grid-template-rows var(--dur-smooth) var(--ease-snap) !important;
    }
    html[data-motion="on"] .attri-group-fold {
        transition: transform var(--dur-fast) var(--ease-snap) !important;
    }
    /* Account dropdown caret rotation. */
    html[data-motion="on"] .attri-band-caret {
        transition: transform var(--dur-fast) !important;
    }
    /* Overlay backdrop + Alpine x-transition.opacity fades (cmd · ws · notif · evidence). */
    html[data-motion="on"] .attri-ov {
        transition-duration: 200ms !important;
    }
    /* FAB hover lifts + narration action-button hovers. */
    html[data-motion="on"] .attri-fab,
    html[data-motion="on"] .attri-narr-ev,
    html[data-motion="on"] .attri-narr-refresh {
        transition: transform var(--dur-instant), box-shadow var(--dur-instant) !important;
    }
    /* Logo idle keyframe — the no-JS fallback (anime.js drives it otherwise). */
    html[data-motion="on"] .attri-logo-glyph {
        animation: attri-logo-idle 3.4s ease-in-out infinite !important;
    }
    html[data-motion="on"].anime-idle .attri-logo-glyph { animation: none !important; }
}

/* =========================================================
   PAGE HEADER  (mockup: Web Behavior.dc.html content header)
   ========================================================= */
.attri-phead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--ink);
}
.attri-phead-main { min-width: 0; }
.attri-phead-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 7vw, 5.4rem);
    line-height: 0.86;
    letter-spacing: -0.055em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0;
}
.attri-phead-dot { color: var(--accent); }
/* Serif-italic accent qualifier riding the title (`Overview.<em>‹the P&L book›</em>`)
   — canon §2: 0.28em, accent, serif, italic. Mirrors the kit's own
   `section.hero h1 em` treatment, re-cast at the console title's scale.
   font-variation-settings is reset because the display face is variable and the
   serif is not — the inherited axes would otherwise fight it. */
.attri-phead-title em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 0.28em;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--accent);
    margin-left: var(--space-xs);
    font-variation-settings: normal;
}
.attri-phead-sub {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--ink-muted);
    margin-top: 14px;
    max-width: 660px;
    line-height: 1.4;
}
.attri-phead-side {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: flex-end;
    padding-bottom: 6px;
}
.attri-phead-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.attri-phead-chip--faint { color: var(--ink-faint); }
.attri-phead-chip-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border: 1px solid var(--ink);
    border-radius: 50%;
}

/* =========================================================
   SECTION HEAD SCALE  (canon: the heading scale STEPS DOWN)
   The kit's `.section-header h2` renders display-giant (clamp 2.8–6rem) —
   right for a marketing hero, wrong inside a console page where the ONLY
   giant is the page title. Add `attri-sechead` ALONGSIDE the kit's
   `.section-header` (the kit class stays and keeps supplying the layout);
   this steps the head down to the canon section scale. The `--sub` modifier
   is for a second, nested head inside one section. Composition only — no
   kit rule is edited, this simply lands later in the cascade.
   ========================================================= */
.attri-sechead h2 {
    font-size: clamp(1.5rem, 3vw, 2.15rem);
}
.attri-sechead--sub h2 {
    font-size: 1.5rem;
}

/* =========================================================
   NARRATION BAND  (mockup: "// AI OVERVIEW" verdict band)
   ========================================================= */
.attri-narr {
    border-bottom: 2px solid var(--ink);
    padding: 28px 0 32px;
}
.attri-narr-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.attri-narr-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}
.attri-narr-rule { flex: 0 0 60px; height: 1.5px; background: var(--accent); }
.attri-narr-chip {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    border: 1.5px solid var(--ink);
    background: var(--paper);
    padding: 3px 10px;
    box-shadow: 2px 2px 0 var(--ink);
    white-space: nowrap;
}
.attri-narr-ev {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    border: 1.5px solid var(--ink);
    background: var(--acid);
    padding: 5px 11px;
    box-shadow: 2px 2px 0 var(--ink);
    cursor: pointer;
    transition: transform var(--dur-instant), box-shadow var(--dur-instant);
}
.attri-narr-ev:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.attri-narr-refresh {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    border: 2px solid var(--ink);
    background: var(--paper);
    padding: 6px 12px;
    box-shadow: 2px 2px 0 var(--ink);
    cursor: pointer;
    transition: transform var(--dur-instant), box-shadow var(--dur-instant);
}
.attri-narr-refresh:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--accent); }
.attri-narr-body {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.35rem, 2.6vw, 2.05rem);
    line-height: 1.34;
    color: var(--ink);
    max-width: 1240px;
    letter-spacing: -0.005em;
}
.attri-narr-body em { font-style: italic; color: var(--ink); }
/* Accent-coloured bold metric inside the serif sentence (mockup verdict band). */
.attri-narr-m {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.01em;
}
/* Small numbered evidence chip, superscripted — opens the Evidence drawer. */
.attri-narr-cite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    margin: 0 1px 0 3px;
    transform: translateY(-0.6em);
    font-family: var(--font-mono);
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--paper);
    background: var(--accent);
    border: 1px solid var(--ink);
    cursor: pointer;
    transition: transform var(--dur-instant), background var(--dur-instant);
}
.attri-narr-cite:hover { background: var(--ink); }

/* =========================================================
   OVERLAYS  (palette · modal · drawers) — shared scaffold
   ========================================================= */
.attri-ov {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: color-mix(in srgb, var(--ink) 42%, transparent);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 11vh 20px 20px;
}
.attri-ov--right {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
}
.attri-ov-sec {
    padding: 12px 18px 8px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}
.attri-ov-sec--rule {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-muted);
    padding: 14px 20px 8px;
}
.attri-ov-sec-star { color: var(--accent); }
.attri-ov-sec-line { flex: 1; height: 1.5px; background: var(--hairline-strong); }
.attri-ov-sec-count {
    background: var(--ink);
    color: var(--paper);
    padding: 1px 6px;
    font-size: 0.56rem;
}
.attri-ov-empty { padding: 44px 24px; text-align: center; }
.attri-ov-empty-ic {
    width: 44px;
    height: 44px;
    margin: 0 auto 13px;
    border: 2px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    box-shadow: 3px 3px 0 var(--ink);
}
.attri-ov-empty-ic .icon { width: 20px; height: 20px; color: var(--ink-muted); }
.attri-ov-empty-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-transform: uppercase;
}
.attri-ov-empty-sub {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    margin-top: 6px;
}
.attri-ov-empty-sub--serif {
    font-family: var(--font-serif);
    font-size: 1.02rem;
    letter-spacing: 0;
    line-height: 1.4;
    max-width: 300px;
    margin: 8px auto 0;
    text-transform: none;
}
.attri-ov-motto,
.attri-ov-hints { color: var(--ink-faint); }

/* Command palette + workspace modal share the input row look */
.attri-cmd-ic { color: var(--ink); display: inline-flex; }
.attri-cmd-ic .icon { width: 18px; height: 18px; }
.attri-cmd-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--ink);
}

/* ---- Command palette ---- */
.attri-cmd {
    width: 100%;
    max-width: 580px;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    max-height: 78vh;
    display: flex;
    flex-direction: column;
}
.attri-cmd-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-bottom: 2px solid var(--ink);
    background: var(--surface);
}
.attri-cmd-list { overflow-y: auto; padding: 6px 0 8px; }
.attri-cmd-row {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    width: 100%;
    gap: 12px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-left: 0 solid var(--accent);
    text-align: left;
    cursor: pointer;
    transition: background var(--dur-instant), border-left-width var(--dur-instant), padding-left var(--dur-instant);
}
.attri-cmd-row.is-sel { background: var(--bg-deep); border-left-width: 4px; padding-left: 14px; }
.attri-cmd-row-ic { color: var(--ink); display: inline-flex; }
.attri-cmd-row-ic .icon { width: 18px; height: 18px; }
.attri-cmd-row-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.attri-cmd-row-hint {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.attri-cmd-foot,
.attri-modal-foot,
.attri-drawer-foot {
    border-top: 2px solid var(--ink);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* ---- Workspace modal ---- */
.attri-modal {
    width: 100%;
    max-width: 620px;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 10px 10px 0 var(--ink);
    max-height: 82vh;
    display: flex;
    flex-direction: column;
}
.attri-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 20px;
    border-bottom: 2px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
}
.attri-modal-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}
.attri-modal-title em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: var(--acid);
    text-transform: none;
}
.attri-modal-x {
    width: 30px;
    height: 30px;
    border: 1.5px solid var(--paper);
    background: transparent;
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--dur-instant), border-color var(--dur-instant);
}
.attri-modal-x:hover { background: var(--accent); border-color: var(--accent); }
.attri-modal-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 2px solid var(--ink);
    background: var(--surface);
}
.attri-modal-list { overflow-y: auto; padding: 4px 0 8px; }
.attri-ws-row {
    display: grid;
    grid-template-columns: 36px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    transition: background var(--dur-instant);
}
.attri-ws-row:hover { background: var(--bg-deep); }
.attri-ws-row-mark {
    width: 36px;
    height: 36px;
    border: 2px solid var(--ink);
    background: var(--accent-2);
    color: var(--paper);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.92rem;
    box-shadow: 2px 2px 0 var(--ink);
}
.attri-ws-row-body { line-height: 1.2; min-width: 0; }
.attri-ws-row-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attri-ws-row-sub {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.attri-ws-row-current {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--success);
    color: var(--paper);
    padding: 2px 8px;
    border: 1.5px solid var(--ink);
}
.attri-ws-row-star { font-size: 1.05rem; line-height: 1; color: var(--accent); padding: 4px; }
.attri-ws-row-star.is-faint { color: var(--ink-faint); }
.attri-ws-empty {
    padding: 22px 20px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.attri-modal-new {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: not-allowed;
}

/* ---- Right-side drawers (notifications · evidence) ---- */
.attri-drawer {
    width: 404px;
    max-width: 92vw;
    height: 100vh;
    background: var(--paper);
    border-left: 2px solid var(--ink);
    box-shadow: -8px 0 0 color-mix(in srgb, var(--ink) 12%, transparent);
    display: flex;
    flex-direction: column;
}
.attri-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 2px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
}
.attri-drawer-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
.attri-drawer-title em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: var(--acid);
    text-transform: none;
}
/* Notifications header reads "NOTIFICATIONS · 3 UNREAD" on one line (mockup: Shell.dc.html).
   Sized down from the display default so it fits beside the Mark-all-read + close actions. */
.attri-drawer-title--notif {
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.attri-drawer-title--notif em { text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.92em; }
/* Right-aligned header actions: inert "Mark all read" + close (mockup notif panel). */
.attri-drawer-head-acts { display: flex; align-items: center; gap: 14px; }
.attri-drawer-mark {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--paper);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--ink-faint);
    padding: 0 0 1px;
    cursor: pointer;
    transition: color var(--dur-instant);
}
.attri-drawer-mark:hover { color: var(--acid); border-bottom-color: var(--acid); }
.attri-drawer-body { flex: 1; overflow-y: auto; padding: 4px 0; }
.attri-drawer-foot { justify-content: flex-start; }
.attri-drawer-foot--motto { font-size: 0.58rem; letter-spacing: 0.06em; color: var(--ink-muted); }

/* ---- Notification rows (fixture) ---- */
.attri-notif {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--hairline);
}
.attri-notif-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    flex-shrink: 0;
    border: 1.5px solid var(--ink);
    background: var(--ink-muted);
}
.attri-notif--crit .attri-notif-dot { background: var(--accent); }
.attri-notif--ok .attri-notif-dot { background: var(--success); }
.attri-notif--warn .attri-notif-dot { background: var(--warning); }
.attri-notif-body { min-width: 0; }
.attri-notif-title {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.attri-notif-text {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--ink-muted);
    line-height: 1.4;
    margin-top: 2px;
}
.attri-notif-meta {
    display: block;
    margin-top: 5px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* ---- Evidence source rows (fixture) ---- */
.attri-ev-row {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 13px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--hairline);
}
.attri-ev-n {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--paper);
    border: 1.5px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 800;
}
.attri-ev-body { min-width: 0; }
.attri-ev-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.attri-ev-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.attri-ev-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent);
    white-space: nowrap;
}
.attri-ev-src {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.attri-ev-meta {
    margin-top: 3px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* Collapsed-rail responsive already handled; keep drawers usable on small screens */
@media (max-width: 480px) {
    .attri-ov { padding: 8vh 10px 10px; }
}
