/* ==========================================================================
   HyperHat design system — warm stone marketing + product UI.
   Loaded after tailwind.css. Tokens + shared components for every page
   except Studio. Cream stone neutrals, oxblood accent, modest radius.
   ========================================================================== */

:root {
    /* Palette — shared with the landing page (html.cr). */
    --color-brand: #7A2E2E;
    --color-brand-tint: #efe0d8;
    --color-brand-light: #9b3c3c;
    --color-brand-strong: #9b3c3c;

    --cr-bg: #e4ddd4;
    --cr-bg-2: #efe9e2;
    --cr-bg-3: #d8d0c6;
    --cr-bg-4: #c9c0b5;
    --cr-line: rgba(28, 23, 20, 0.08);
    --cr-line-2: rgba(28, 23, 20, 0.11);
    --cr-line-3: rgba(28, 23, 20, 0.16);
    --cr-line-4: rgba(28, 23, 20, 0.22);
    --cr-text: #1c1714;
    --cr-text-2: #5c554e;
    --cr-text-3: #7a736b;
    --cr-text-4: #9a9289;
    --cr-on-accent: #f7f1ea;
    --cr-accent: #7A2E2E;
    --cr-accent-strong: #9b3c3c;
    --cr-accent-fill: #7A2E2E;
    --cr-green: #0e7d5f;
    --cr-add: #1a8f6c;
    --cr-add-bg: #d4eee4;
    --cr-del: #c4473d;
    --cr-del-bg: #f3d6d2;
    --cr-amber: #b56b00;
    --cr-blue: #2d5aaf;
    --cr-indigo: #3d4ea8;
    --cr-cream: #d7ccc1;
    --cr-cream-2: #e8e0d6;
    --cr-container: 75rem;
    --cr-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --cr-radius: 0.5rem;
    --cr-radius-lg: 0.75rem;
    /* Bottom edge of raised (chonky) buttons and fields. */
    --hh-edge: rgba(28, 23, 20, 0.26);

    /* Neutrals (legacy names) */
    --color-ink: #1c1714;
    --color-ink-muted: #5c554e;
    --color-ink-faint: #7a736b;
    --color-border: rgba(28, 23, 20, 0.11);
    --color-border-strong: rgba(28, 23, 20, 0.22);
    --color-surface: #e4ddd4;
    --color-surface-raise: #efe9e2;

    /* Status: product UI only */
    --color-status-fail: #c4473d;
    --color-status-pass: #1a8f6c;
    --color-status-warn: #b56b00;

    --background: var(--cr-bg);
    --foreground: var(--cr-text);
    --muted: var(--cr-bg-2);
    --muted-foreground: var(--cr-text-2);
    --popover: var(--cr-bg-2);
    --popover-foreground: var(--cr-text);
    --card: var(--cr-bg-2);
    --card-foreground: var(--cr-text);
    --border: var(--cr-line-2);
    --border-strong: var(--cr-line-4);
    --input: var(--cr-bg-2);
    --primary: var(--cr-accent-fill);
    --primary-foreground: var(--cr-on-accent);
    --primary-hover: var(--cr-accent-strong);
    --secondary: var(--cr-bg-3);
    --secondary-foreground: var(--cr-text);
    --accent: var(--cr-bg-3);
    --accent-foreground: var(--cr-text);
    --ring: var(--cr-accent);
    --glow: color-mix(in srgb, var(--cr-accent) 18%, transparent);

    --brand: var(--cr-accent);
    --brand-soft: #efe0d8;
    /* Interactive surfaces (cards, tiles, options). Hover strengthens the
       hairline on the same light surface; selected gets a brand ring and a
       pale oxblood wash (#F6ECEC) so it stays distinct from the page beige.
       Never a darker fill: that reads as disabled. */
    --hh-hover-line: var(--cr-line-4);
    --hh-selected-ring: var(--brand);
    --hh-selected-bg: #F6ECEC;
    --brand-tint: #efe0d8;
    --brand-ink: var(--cr-accent);
    --brand-light: var(--cr-accent-strong);
    --brand-2: var(--cr-accent-strong);
    --brand-3: var(--cr-text-2);

    --success: var(--cr-add);
    --success-soft: var(--cr-add-bg);
    --warning: #b56b00;
    --warning-soft: #f6ead0;
    --info: var(--cr-blue);
    --info-soft: #dce6f5;
    --destructive: var(--cr-del);
    --destructive-soft: var(--cr-del-bg);
    --destructive-foreground: #ffffff;

    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --display-ink: var(--cr-text);
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --nav-h: 3.5rem;
    --grid-cell: 96px;
    color-scheme: light;
}
@media (min-width: 48rem) { :root { --nav-h: 4.75rem; } }

/* Light app chrome. Keep `.dark` unused so `dark:` logo swaps show the black mark. */
.dark { color-scheme: light; }

/* Display lives at zero specificity so Tailwind utilities (.hidden, sm:flex …) can override it */
:where(.hh-btn) { display: inline-flex; }
:where(.tab) { display: inline-flex; }
:where(.hh-link) { display: inline-flex; }
:where(.hh-back) { display: inline-flex; }
:where(.hh-eyebrow) { display: inline-flex; }
:where(.nav-cta-block) { display: inline-flex; }
:where(.hh-notice) { display: grid; }
:where(.hh-check) { display: inline-flex; }
:where(.hh-cells) { display: grid; }
:where(#notif-bell) { display: inline-flex; }
:where(.hh-label) { display: block; }
:where(.hh-tag, .badge) { display: inline-flex; }

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { border-color: var(--border); }

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

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-feature-settings: "ss01" 1, "cv11" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.font-sans,
.font-sans { font-family: var(--font-sans); }
.font-display { font-family: var(--font-display); }

html { background: var(--background); }
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}
img, svg, video, canvas { max-width: 100%; }
input, select, textarea, button { min-width: 0; font-family: inherit; }
main, main * { overflow-wrap: break-word; }

dialog { border: 0; background: transparent; }

::selection { background: var(--cr-accent-fill); color: var(--cr-on-accent); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground); }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.hh-display,
.hh-h1,
.hh-h2,
.hh-h3,
.hh-section-title {
    font-family: var(--font-display);
    color: var(--display-ink);
    text-wrap: balance;
    font-optical-sizing: auto;
}
.hh-display {
    font-size: clamp(2.5rem, 4.2vw, 4.25rem);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.035em;
}
.hh-display__lead { color: var(--display-ink); }
.hh-h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.75rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.03em;
}
.hh-h1 {
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.025em;
}
.hh-h3 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
}
.hh-section-title {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.hh-lede {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--muted-foreground);
    text-wrap: pretty;
}
@media (min-width: 640px) {
    .hh-lede { font-size: 1.125rem; }
}
.hh-eyebrow {
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--cr-text-3);
    line-height: 1.2;
}
.hh-eyebrow--brand { color: var(--cr-green); }
.hh-eyebrow__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.hh-mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
.hh-gradient-text {
    color: var(--cr-accent-strong);
}
.gradient-text {
    background: linear-gradient(135deg, var(--foreground) 0%, var(--muted-foreground) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.hh-container {
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1.25rem;
}
@media (min-width: 640px) { .hh-container { padding-inline: 2rem; } }
@media (min-width: 1024px) { .hh-container { padding-inline: 2.5rem; } }

.hh-section { padding-block: 4.5rem; }
@media (min-width: 768px) { .hh-section { padding-block: 6.5rem; } }
@media (min-width: 1024px) { .hh-section { padding-block: 8rem; } }

.hh-rule { height: 1px; background: var(--border); }

/* Decorative hairline grid */
.hh-grid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, var(--border) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border) 1px, transparent 1px);
    background-size: var(--grid-cell) var(--grid-cell);
    background-position: -1px -1px;
    opacity: 0.9;
}
.hh-grid-bg--fade-left {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 45%);
    mask-image: linear-gradient(to right, transparent 0%, #000 45%);
}
.hh-grid-bg--fade-bottom {
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
.hh-grid-bg--fade-radial {
    -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 72%);
    mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 72%);
}

/* Cells: raised panels in a gap grid (no hairline frame) */
.hh-cells {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    background: transparent;
    border: 0;
}
.hh-cells > * {
    background: var(--cr-bg-2);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
}
.hh-cells--card > * { background: var(--cr-bg-2); }
.hh-cells { border-radius: 0; overflow: visible; }
@media (min-width: 640px) {
    .hh-cells--2, .hh-cells--3, .hh-cells--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .hh-cells--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hh-cells--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hh-cells--tight-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) {
    .hh-cells--tight-2.hh-cells--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Corner markers (Render-style + at grid intersections) */
.hh-corner {
    position: relative;
}
.hh-corner::before,
.hh-corner::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    border: 1px solid var(--muted-foreground);
    background: var(--background);
    z-index: 2;
    pointer-events: none;
}
.hh-corner::before { top: -5px; left: -5px; }
.hh-corner::after { bottom: -5px; right: -5px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.hh-btn {
    /* Raised ("chonky") control: a 1px border plus a solid 2px bottom edge.
       Hover lifts it 1px, press sinks it onto the edge. */
    --hh-btn-edge: var(--hh-edge);
    position: relative;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 2.25rem;
    padding: 0 0.875rem;
    border: 1px solid transparent;
    border-radius: 0.4375rem;
    box-shadow: 0 3px 0 0 var(--hh-btn-edge);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.005em;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    transform: translateY(0);
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.08s ease, opacity 0.12s ease, transform 0.08s ease;
}
.hh-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 0 var(--hh-btn-edge); }
.hh-btn:active { transform: translateY(3px); box-shadow: 0 0 0 0 var(--hh-btn-edge); }
.hh-btn:focus-visible {
    outline: none;
    box-shadow: 0 3px 0 0 var(--hh-btn-edge), 0 0 0 3px color-mix(in srgb, var(--cr-accent) 30%, transparent);
}
.hh-btn:disabled,
.hh-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 3px 0 0 var(--hh-btn-edge);
}
.hh-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.hh-btn--sm { min-height: 2rem; padding: 0 0.75rem; font-size: 0.8125rem; gap: 0.375rem; }
.hh-btn--sm svg { width: 0.875rem; height: 0.875rem; }
.hh-btn--lg { min-height: 2.75rem; padding: 0 1.25rem; font-size: 0.9375rem; }
.hh-btn--block { width: 100%; }
.hh-btn--icon { padding: 0; width: 2.25rem; min-width: 2.25rem; }
.hh-btn--icon.hh-btn--sm { width: 2rem; min-width: 2rem; }

.hh-btn--primary,
.hh-btn--brand {
    --hh-btn-edge: #3f1515;
    background: var(--cr-accent-fill);
    color: var(--cr-on-accent);
    border-color: #5e2121;
}
.hh-btn--primary:hover,
.hh-btn--brand:hover { background: var(--cr-accent-strong); border-color: #5e2121; }

.hh-btn--secondary,
.hh-btn--ghost {
    background: #fffdfa;
    color: var(--cr-text);
    border-color: var(--cr-line-3);
}
.hh-btn--secondary:hover,
.hh-btn--ghost:hover { background: #ffffff; border-color: var(--cr-line-4); }

.hh-btn--quiet {
    background: transparent;
    color: var(--muted-foreground);
    border-color: transparent;
    box-shadow: none;
}
.hh-btn--quiet:hover,
.hh-btn--quiet:active { color: var(--foreground); background: rgba(28, 23, 20, 0.06); box-shadow: none; transform: none; }

.hh-btn--danger {
    --hh-btn-edge: color-mix(in srgb, var(--destructive) 45%, transparent);
    background: #fffdfa;
    color: var(--destructive);
    border-color: color-mix(in srgb, var(--destructive) 40%, transparent);
}
.hh-btn--danger:hover { background: var(--destructive); border-color: #9e332b; color: #fff; --hh-btn-edge: #7e2620; }

.hh-btn--link {
    min-height: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    color: var(--brand);
    font-weight: 600;
}
.hh-btn--link:hover,
.hh-btn--link:active { text-decoration: underline; text-underline-offset: 3px; box-shadow: none; transform: none; }

/* Joined control bar, like a page-filter strip: [All Projects][All Envs][14D] */
.hh-btn-group {
    display: inline-flex;
    align-items: stretch;
    border-radius: 0.4375rem;
    box-shadow: 0 3px 0 0 var(--hh-edge);
}
.hh-btn-group > .hh-btn { border-radius: 0; box-shadow: none; transform: none; }
.hh-btn-group > .hh-btn + .hh-btn { margin-left: -1px; }
.hh-btn-group > .hh-btn:first-child { border-radius: 0.4375rem 0 0 0.4375rem; }
.hh-btn-group > .hh-btn:last-child { border-radius: 0 0.4375rem 0.4375rem 0; }
.hh-btn-group > .hh-btn:hover { z-index: 1; }
.hh-btn-group > .hh-btn:active { background: var(--cr-bg-2); }

/* Chevron glyph */
.hh-btn__chev {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 0.125rem;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.hh-btn:hover .hh-btn__chev { transform: rotate(45deg) translate(2px, -2px); }
.hh-btn__icon {
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.hh-btn:hover .hh-btn__icon { transform: translateX(2px); }

/* Keep old helper working: chevrons slide on hover */
.arrow-slide-btn svg { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.arrow-slide-btn:hover svg { transform: translateX(3px); }

/* Accent link with arrow */
.hh-link {
    align-items: center;
    gap: 0.375rem;
    color: var(--brand);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
}
.hh-link::after {
    content: "";
    width: 0.875rem;
    height: 0.875rem;
    flex: none;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' fill-rule='evenodd' d='M2 8a.75.75 0 0 1 .75-.75h8.69L8.22 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06-1.06l3.22-3.22H2.75A.75.75 0 0 1 2 8Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' fill-rule='evenodd' d='M2 8a.75.75 0 0 1 .75-.75h8.69L8.22 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06-1.06l3.22-3.22H2.75A.75.75 0 0 1 2 8Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s var(--cr-ease);
}
.hh-link:hover { color: var(--brand-light); }
.hh-link:hover::after { transform: translateX(2px); }
.hh-link--plain::after { content: none; display: none; }

.hh-back {
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
}
.hh-back svg { width: 0.875rem; height: 0.875rem; }
.hh-back:hover { color: var(--foreground); }

/* --------------------------------------------------------------------------
   Cards, notices, empty states
   -------------------------------------------------------------------------- */
.hh-card {
    background: var(--cr-bg-2);
    border: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 1.25rem;
}
@media (min-width: 640px) { .hh-card { padding: 1.5rem; } }
.hh-card--flush {
    padding: 0;
    border: 1px solid var(--border);
}
.hh-card--muted { background: var(--cr-bg-3); }
.hh-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 0;
}
.hh-card__body { padding: 1.25rem; }
@media (min-width: 640px) { .hh-card__body { padding: 1.5rem; } }
.hh-card__footer {
    padding: 0.875rem 1.25rem;
    border-top: 0;
    background: var(--cr-bg-3);
}

.hh-notice {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.875rem 1rem;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}
.hh-notice > svg { width: 1rem; height: 1rem; margin-top: 0.1rem; flex-shrink: 0; }
.hh-notice--info { background: var(--info-soft); }
.hh-notice--info > svg { color: var(--info); }
.hh-notice--success { background: var(--success-soft); }
.hh-notice--success > svg { color: var(--success); }
.hh-notice--warning { background: var(--warning-soft); }
.hh-notice--warning > svg { color: var(--warning); }
.hh-notice--danger { background: var(--destructive-soft); }
.hh-notice--danger > svg { color: var(--destructive); }
.hh-notice--brand { background: var(--brand-soft); }
.hh-notice--brand > svg { color: var(--brand); }

.hh-empty {
    border: 0;
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--cr-bg-2);
}
.hh-empty__title {
    margin-top: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.hh-empty__hint {
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    max-width: 28rem;
    margin-inline: auto;
}
.hh-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--cr-bg-3);
    color: var(--muted-foreground);
}
.hh-empty__icon svg { width: 1.125rem; height: 1.125rem; }

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */
.hh-stat { padding: 1rem 1.25rem; }
.hh-stat__label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}
.hh-stat__value {
    margin-top: 0.375rem;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--foreground);
}
.hh-stat__value small,
.hh-stat__value span {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--muted-foreground);
    letter-spacing: 0;
}
.hh-stat__hint {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.hh-bar {
    width: 100%;
    height: 4px;
    background: var(--cr-bg-4);
    border-radius: 2px;
    overflow: hidden;
}
.hh-bar__fill {
    height: 100%;
    border-radius: inherit;
    background: var(--cr-add);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hh-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius);
    background: var(--cr-accent-fill);
    color: var(--cr-on-accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Tags & badges
   -------------------------------------------------------------------------- */
.hh-tag,
.badge {
    align-items: center;
    gap: 0.3rem;
    height: 1.375rem;
    padding: 0 0.4375rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--cr-bg-3);
    color: var(--muted-foreground);
    font-family: var(--font-mono);
    font-size: 0.65625rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    width: auto !important;
    max-width: max-content;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}
.hh-tag > svg, .badge > svg { width: 0.75rem; height: 0.75rem; flex-shrink: 0; stroke-width: 2; }
.hh-tag > img, .badge > img { width: 0.95rem; height: 0.95rem; object-fit: contain; }
.hh-tag--brand, .badge-info {
    color: var(--cr-accent-strong);
    border-color: #5a2f2e;
    background: #2a1717;
}
.hh-tag--success, .badge-success {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 35%, transparent);
    background: var(--success-soft);
}
.hh-tag--warning {
    color: var(--warning);
    border-color: color-mix(in srgb, var(--warning) 35%, transparent);
    background: var(--warning-soft);
}
.hh-tag--danger, .badge-danger {
    color: var(--destructive);
    border-color: color-mix(in srgb, var(--destructive) 35%, transparent);
    background: var(--destructive-soft);
}
.hh-tag--info {
    color: var(--info);
    border-color: color-mix(in srgb, var(--info) 35%, transparent);
    background: var(--info-soft);
}
.hh-tag--neutral, .badge-neutral {
    color: var(--muted-foreground);
    border-color: var(--border);
    background: var(--muted);
}
.hh-tag--solid {
    color: var(--background);
    background: var(--foreground);
    border-color: var(--foreground);
}
.hh-tag--lg { height: 1.625rem; padding: 0 0.625rem; font-size: 0.71875rem; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.hh-label {
    margin-bottom: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}
.hh-input,
.hh-select,
.hh-textarea {
    display: block;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--cr-line-3);
    border-radius: 0.4375rem;
    background: #fffdfa;
    box-shadow: inset 0 1px 2px rgba(28, 23, 20, 0.06);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hh-textarea { min-height: 6rem; resize: vertical; line-height: 1.5; }
.hh-input::placeholder,
.hh-textarea::placeholder { color: color-mix(in srgb, var(--muted-foreground) 75%, transparent); }
.hh-input:focus,
.hh-input:focus-visible,
.hh-select:focus,
.hh-select:focus-visible,
.hh-textarea:focus,
.hh-textarea:focus-visible {
    border-color: var(--cr-accent);
    /* Soft wash only — a solid 1px + 4px double ring read as a heavy halo. */
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cr-accent) 16%, transparent);
    outline: none;
}
.hh-input[aria-invalid="true"],
.hh-input.is-invalid {
    border-color: var(--destructive);
    box-shadow: 0 0 0 3px var(--destructive-soft);
}
.hh-select {
    appearance: none;
    cursor: pointer;
    font-weight: 500;
    background-color: #fffdfa;
    box-shadow: 0 3px 0 0 var(--hh-edge);
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e8895' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}
.hh-input--mono { font-family: var(--font-mono); }
.hh-input--lg {
    min-height: 2.75rem;
    padding: 0 1.25rem;
    font-size: 0.9375rem;
    line-height: 1;
}
.hh-help { margin-top: 0.4rem; font-size: 0.75rem; color: var(--muted-foreground); }
.hh-error { margin-top: 0.4rem; font-size: 0.75rem; color: var(--destructive); }
.hh-field + .hh-field { margin-top: 1.25rem; }

.hh-check {
    position: relative;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}
.hh-check input[type="checkbox"],
.hh-check input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
}
.hh-check__box {
    display: grid;
    place-items: center;
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    box-sizing: border-box;
    border: 1.5px solid var(--cr-line-4);
    border-radius: 0.25rem;
    background: var(--cr-bg);
    color: var(--cr-on-accent);
    pointer-events: none;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}
.hh-check__box::after {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    opacity: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.3 6.5 11.5 12.8 4.4' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.3 6.5 11.5 12.8 4.4' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hh-check:has(input[type="radio"]) .hh-check__box { border-radius: 9999px; }
.hh-check:has(input[type="radio"]) .hh-check__box::after {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 9999px;
    background: var(--cr-on-accent);
    -webkit-mask: none;
    mask: none;
}
.hh-check:hover .hh-check__box { border-color: var(--cr-text-3); }
.hh-check:has(input:focus-visible) .hh-check__box {
    outline: 2px solid var(--cr-accent);
    outline-offset: 2px;
}
.hh-check:has(input:checked) .hh-check__box {
    background: var(--cr-accent);
    border-color: var(--cr-accent);
}
.hh-check:has(input:checked) .hh-check__box::after { opacity: 1; }
.hh-check:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Switch */
.hh-switch {
    position: relative;
    display: inline-block;
    width: 2.25rem;
    height: 1.25rem;
    background: var(--cr-bg-4);
    border: 1px solid var(--cr-line-3);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}
.hh-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 9999px;
    background: #fff;
    transition: transform 0.15s ease;
}
.hh-switch.is-on,
input:checked + .hh-switch { background: var(--cr-add); border-color: var(--cr-add); }
.hh-switch.is-on::after,
input:checked + .hh-switch::after { transform: translateX(1rem); }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.hh-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    -webkit-overflow-scrolling: touch;
}
.hh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.hh-table th {
    padding: 0.625rem 1rem;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    background: var(--muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.hh-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--foreground);
}
.hh-table tbody tr:last-child td { border-bottom: 0; }
.hh-table tbody tr:hover td { background: var(--accent); }
.hh-table td.is-muted { color: var(--muted-foreground); }
.hh-table .is-num { font-variant-numeric: tabular-nums; text-align: right; }

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.tab {
    align-items: center;
    height: 2.25rem;
    padding: 0 0.875rem;
    font-size: 0.9375rem;
    font-weight: 450;
    color: var(--cr-text-2);
    border-radius: var(--radius);
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.tab:hover { color: var(--cr-text); background: rgba(28, 23, 20, 0.05); }
.tab.active { color: var(--cr-text); background: rgba(28, 23, 20, 0.07); }

#main-nav {
    background: rgba(228, 221, 212, 0.86);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--cr-line);
}
#main-nav-shell { max-width: var(--cr-container); padding-inline: 1.5rem !important; }
#main-nav-inner > div:last-child { padding-right: 0 !important; }
/* Local band sits flush under the sticky nav. Extra scroll margin was a dark strip. */
#local {
    scroll-margin-top: var(--nav-h);
    border-top: 0;
}
#main-nav-inner {
    position: relative;
    height: var(--nav-h);
}
.main-nav-desktop-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    gap: 0.25rem;
}

.brand-lockup { text-decoration: none; color: inherit; }
.brand-lockup__name {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    color: var(--cr-text);
}
.brand-lockup__mark { width: 2rem !important; height: 2rem !important; }

/* The nav's right-edge CTA block */
.nav-cta-block {
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    height: 2.25rem;
    padding: 0 0.875rem;
    margin-left: 0.5rem;
    border: 1px solid #5e2121;
    border-radius: 0.4375rem;
    box-shadow: 0 3px 0 0 #3f1515;
    background: var(--cr-accent-fill);
    color: var(--cr-on-accent);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease;
}
.nav-cta-block:hover { background: var(--cr-accent-strong); transform: translateY(-1px); box-shadow: 0 4px 0 0 #3f1515; }
.nav-cta-block:active { transform: translateY(3px); box-shadow: none; }
.nav-cta-block .hh-btn__chev { display: none; }
.nav-cta-block::after {
    content: "";
    width: 1rem;
    height: 1rem;
    flex: none;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' fill-rule='evenodd' d='M2 8a.75.75 0 0 1 .75-.75h8.69L8.22 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06-1.06l3.22-3.22H2.75A.75.75 0 0 1 2 8Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' fill-rule='evenodd' d='M2 8a.75.75 0 0 1 .75-.75h8.69L8.22 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06-1.06l3.22-3.22H2.75A.75.75 0 0 1 2 8Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s var(--cr-ease);
}
.nav-cta-block:hover::after { transform: translateX(2px); }
.landing-nav-login {
    height: 2.25rem;
    padding: 0 0.875rem;
    border: 1px solid var(--cr-line-3);
    background: #fffdfa;
    color: var(--cr-text);
    font-weight: 600;
    border-radius: 0.4375rem;
    box-shadow: 0 3px 0 0 var(--hh-edge);
    transition: border-color 0.12s ease, background-color 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease;
}
.landing-nav-login:hover { background: #fff; border-color: var(--cr-line-4); transform: translateY(-1px); box-shadow: 0 4px 0 0 var(--hh-edge); }
.landing-nav-login:active { transform: translateY(3px); box-shadow: none; }
#main-nav .hh-btn--primary.hh-btn--sm {
    background: var(--cr-accent-fill);
    color: var(--cr-on-accent);
    border-color: #5e2121;
}

#user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 2.25rem;
    padding: 0 0.5rem 0 0.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
#user-menu-btn:hover,
#user-menu-btn[aria-expanded="true"] {
    border-color: transparent;
    background: rgba(28, 23, 20, 0.05);
    color: var(--cr-text);
}
#user-menu-btn img { width: 1.625rem; height: 1.625rem; border-radius: 9999px; object-fit: cover; }
#user-menu-btn svg { color: var(--cr-text-3); }

#user-dropdown {
    border: 1px solid var(--cr-line-3);
    background: var(--popover);
    padding: 0;
    width: 15rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 0.5rem 1.25rem rgba(28, 23, 20, 0.1), 0 0.125rem 0.375rem rgba(28, 23, 20, 0.06);
}
#user-dropdown .hh-menu-head { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
#user-dropdown .hh-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5625rem 1rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    transition: background-color 0.12s ease, color 0.12s ease;
}
#user-dropdown .hh-menu-item svg { width: 0.9375rem; height: 0.9375rem; }
#user-dropdown .hh-menu-item:hover { background: var(--accent); color: var(--foreground); }
#user-dropdown .hh-menu-item--danger { color: var(--brand); }
#user-dropdown .hh-menu-item--danger:hover { color: var(--brand); background: var(--brand-soft); }
#user-dropdown .hh-menu-item--brand { color: var(--brand); }
#user-dropdown .hh-menu-sep { height: 1px; background: var(--border); }

#notif-bell {
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--muted-foreground);
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: color 0.15s ease, background-color 0.15s ease;
}
#notif-bell:hover, #notif-bell.notif-bell--active {
    color: var(--cr-text);
    background: rgba(28, 23, 20, 0.05);
}
[data-notif-badge] {
    border-radius: 9999px;
}

@media (max-width: 40rem) {
    :root { --nav-h: 3.25rem; }
    #main-nav-shell { padding-inline: 1rem !important; }
    #main-nav-inner { min-height: var(--nav-h); height: var(--nav-h); }
    #user-menu-btn svg { display: none; }
    #user-menu-btn { padding-inline: 0.25rem; }
    .hh-h1 { font-size: clamp(1.65rem, 8vw, 2.1rem); }
    .cr-container { padding-inline: 1rem; }
    .hh-modal-panel { margin-inline: 0.75rem; max-width: calc(100vw - 1.5rem); }
}

/* Mobile drawer sits above the sticky nav; overlay covers the rest */
#mobile-menu-overlay { z-index: 55; }
.mobile-menu {
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--background);
    border-right: 1px solid var(--border);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu .hh-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--muted-foreground);
    border-radius: var(--radius);
}
.mobile-menu .hh-mobile-link svg { width: 1.125rem; height: 1.125rem; }
.mobile-menu .hh-mobile-link:hover { color: var(--foreground); background: var(--accent); }
.mobile-menu .hh-mobile-link.is-active { color: var(--foreground); background: var(--accent); }
.mobile-menu .hh-mobile-link--danger { color: var(--brand); }

/* Theme toggle: retired, the app is dark only */
.hh-theme-toggle { display: none !important; }
.hh-theme-toggle--legacy {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.hh-theme-toggle:hover { color: var(--foreground); border-color: var(--foreground); }
.hh-theme-toggle svg { width: 1rem; height: 1rem; }
.hh-theme-toggle .hh-theme-toggle__moon { display: none; }
.dark .hh-theme-toggle .hh-theme-toggle__sun { display: none; }
.dark .hh-theme-toggle .hh-theme-toggle__moon { display: block; }

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */
.app-toast-stack {
    top: max(1rem, env(safe-area-inset-top, 0px));
    left: 1rem;
    right: 1rem;
    width: auto;
}
@media (min-width: 640px) {
    .app-toast-stack {
        left: auto;
        right: max(1rem, env(safe-area-inset-right, 0px));
        width: 100%;
        max-width: 22rem;
    }
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--cr-bg-2);
    color: var(--foreground);
    box-shadow: 0 0.5rem 1.25rem rgba(28, 23, 20, 0.1), 0 0.125rem 0.375rem rgba(28, 23, 20, 0.06);
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast--success { background: var(--success-soft); }
.toast--error { background: var(--destructive-soft); }
.toast--warning { background: var(--warning-soft); }
.toast--info { background: var(--info-soft); }
.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.05rem;
    color: var(--muted-foreground);
}
.toast--success .toast-icon { color: var(--success); }
.toast--error .toast-icon { color: var(--destructive); }
.toast--warning .toast-icon { color: var(--warning); }
.toast--info .toast-icon { color: var(--info); }
.toast-icon svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast-content { min-width: 0; flex: 1; }
.toast-body { font-size: 0.8125rem; font-weight: 500; line-height: 1.4; }
.toast-detail { margin-top: 0.15rem; font-size: 0.75rem; line-height: 1.4; color: var(--muted-foreground); }
.toast-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--muted-foreground);
}
.toast-close:hover { color: var(--foreground); background: var(--accent); }
.toast-close svg { width: 0.875rem; height: 0.875rem; }
@keyframes toastSlideIn {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Modals (alert + auth)
   -------------------------------------------------------------------------- */
.hh-modal-backdrop {
    background: rgba(18, 16, 20, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.hh-modal-panel {
    position: relative;
    background: var(--card);
    border: 1px solid var(--cr-line-3);
    border-radius: var(--cr-radius-lg);
    width: 100%;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.5);
}

/* Confirm / alert dialog */
.hh-alert-modal { overflow: hidden; }
.hh-alert-modal__body { padding: 1.25rem 1.25rem 1.125rem; }
.hh-alert-modal__row {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}
.hh-alert-modal__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--cr-radius, 0.5rem);
    border: 1px solid transparent;
}
.hh-alert-modal__icon[hidden] { display: none !important; }
.hh-alert-modal__icon svg {
    display: block;
    flex-shrink: 0;
}
.hh-alert-modal__icon--info {
    border-color: color-mix(in srgb, var(--info, #3b82f6) 25%, transparent);
    background: var(--info-soft, #eff6ff);
    color: var(--info, #2563eb);
}
.hh-alert-modal__icon--warning {
    border-color: color-mix(in srgb, var(--warning, #d97706) 28%, transparent);
    background: var(--warning-soft, #fff7ed);
    color: var(--warning, #c2410c);
}
.hh-alert-modal__icon--error {
    border-color: color-mix(in srgb, var(--destructive, #dc2626) 28%, transparent);
    background: var(--destructive-soft, #fef2f2);
    color: var(--destructive, #dc2626);
}
.hh-alert-modal__copy { min-width: 0; flex: 1 1 auto; padding-top: 0.125rem; }
.hh-alert-modal__title {
    margin: 0;
    color: var(--foreground, #171717);
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
}
.hh-alert-modal__message {
    margin: 0.375rem 0 0;
    color: var(--muted-foreground, #737373);
    font-size: 0.875rem;
    line-height: 1.5;
}
.hh-alert-modal__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border, var(--cr-line-3));
    background: var(--muted, var(--cr-bg-2, #f5f5f5));
}
.hh-alert-modal__foot .hh-btn[hidden] { display: none !important; }

#auth-modal {
    z-index: 200;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}
#auth-modal-backdrop { background: rgba(18, 16, 20, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#auth-modal-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--card);
    width: 100%;
    max-width: 420px;
    margin-inline: 1rem;
    border: 1px solid var(--cr-line-3);
    border-radius: var(--cr-radius-lg);
    overflow: hidden;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.5);
}
@media (min-width: 768px) {
    #auth-modal-content { max-width: 800px; }
}
.auth-modal-visual {
    display: none;
    position: relative;
    width: 320px;
    flex-shrink: 0;
    align-self: stretch;
    overflow: hidden;
    border-right: 1px solid var(--border);
    background:
        linear-gradient(to right, var(--border) 1px, transparent 1px) -1px -1px / 64px 64px,
        linear-gradient(to bottom, var(--border) 1px, transparent 1px) -1px -1px / 64px 64px,
        linear-gradient(160deg, var(--brand-soft) 0%, var(--background) 60%);
}
@media (min-width: 768px) { .auth-modal-visual { display: flex; flex-direction: column; } }
.auth-modal-visual-overlay {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 1.5rem;
}
.auth-modal-visual-logo { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.auth-modal-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
#auth-modal-legal { margin-top: 0; padding-top: 0; font-size: 11px; line-height: 1.4; }
.auth-modal-footer { padding-top: 0.75rem; }
.auth-mode-switch { margin-top: 0; margin-bottom: 0.375rem; }
#auth-email-input.auth-field-invalid {
    border-color: var(--destructive);
    box-shadow: 0 0 0 3px var(--destructive-soft);
}
#auth-email-input.auth-field-shake { animation: auth-field-shake 180ms ease-in-out; }
@keyframes auth-field-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
/* OTP: 6 single-digit boxes in one horizontal row (do not use .hh-input — it is width:100%) */
#auth-code-boxes.auth-otp,
.auth-otp {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 22rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}
#auth-code-boxes .auth-otp__digit,
#auth-code-boxes .auth-code-digit,
.auth-otp__digit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    flex: 0 0 2.75rem !important;
    width: 2.75rem !important;
    min-width: 2.75rem !important;
    max-width: 2.75rem !important;
    height: 3rem !important;
    min-height: 3rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--cr-line-3) !important;
    border-radius: var(--radius) !important;
    background: var(--input) !important;
    color: var(--foreground) !important;
    text-align: center !important;
    font-family: var(--font-mono) !important;
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    font-variant-numeric: tabular-nums;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#auth-code-boxes .auth-otp__digit:focus,
#auth-code-boxes .auth-code-digit:focus,
.auth-otp__digit:focus {
    border-color: var(--cr-line-4) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
#auth-code-boxes .auth-otp__digit::-webkit-outer-spin-button,
#auth-code-boxes .auth-otp__digit::-webkit-inner-spin-button,
#auth-code-boxes .auth-code-digit::-webkit-outer-spin-button,
#auth-code-boxes .auth-code-digit::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
@media (max-width: 639px) {
    #auth-modal-content { max-width: calc(100vw - 1.5rem); margin-inline: auto; }
    #auth-code-boxes.auth-otp,
    .auth-otp {
        max-width: 100% !important;
        gap: 0.375rem !important;
    }
    #auth-code-boxes .auth-otp__digit,
    #auth-code-boxes .auth-code-digit,
    .auth-otp__digit {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 2.75rem !important;
    }
    #auth-modal > .relative {
        min-height: 100dvh;
        align-items: safe center;
        justify-content: center;
        padding: max(0.75rem, env(safe-area-inset-top, 0px)) 0.75rem max(0.75rem, env(safe-area-inset-bottom, 0px));
    }
    #mobile-menu {
        max-width: min(20rem, 90vw);
    }
}

.cr-container {
    width: 100%;
    max-width: var(--cr-container);
    margin-inline: auto;
    padding-inline: 1.5rem;
}
.cr-kicker { font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; color: var(--cr-text-3); letter-spacing: 0.02em; }
.cr-mono { font-family: var(--font-mono); }

/* --------------------------------------------------------------------------
   Footer (CodeRabbit structure: brand row, 4 columns + newsletter, giant
   outlined wordmark, legal row)
   -------------------------------------------------------------------------- */
.cr-footer { position: relative; background: var(--cr-bg); color: var(--cr-text); font-family: var(--font-sans); }
.cr-footer__inner {
    border-top: 0;
    padding-top: clamp(3rem, 6vw, 5rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
}
.cr-footer__top {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 2.5rem;
}
@media (min-width: 48rem) { .cr-footer__top { flex-direction: row; align-items: center; justify-content: space-between; } }
.cr-footer__brand { display: inline-flex; align-items: center; gap: 0.625rem; height: 2.25rem; width: fit-content; text-decoration: none; color: var(--cr-text); }
.cr-footer__brand img { width: 2rem; height: 2rem; object-fit: contain; }
.cr-footer__brand span { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.cr-footer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.cr-footer__social { display: flex; align-items: center; gap: 0.5rem; }
.cr-footer__social a {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    color: var(--cr-text-2);
    transition: color 0.15s ease, transform 0.15s ease;
}
.cr-footer__social a:hover { color: var(--cr-text); }
.cr-footer__social a:active { transform: scale(0.97); }
.cr-footer__social svg { width: 1.125rem; height: 1.125rem; }
.cr-footer__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 1.5rem;
    margin-top: 2.5rem;
}
@media (min-width: 48rem) { .cr-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .cr-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(20rem, 1.45fr); gap: 2.5rem 3rem; } }
.cr-footer__col { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.cr-footer__head {
    margin: 0 0 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--cr-accent);
}
.cr-footer__col > a, .cr-footer__col > button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--cr-text-2);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
}
.cr-footer__col > a:hover, .cr-footer__col > button:hover { color: var(--cr-text); }
.cr-footer__news { grid-column: span 2; }
@media (min-width: 48rem) and (max-width: 63.98rem) { .cr-footer__news { grid-column: 3 / span 2; } }
@media (min-width: 64rem) { .cr-footer__news { grid-column: auto; } }
.cr-footer__form { display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 40rem) { .cr-footer__form { flex-direction: row; } }
.cr-footer__input {
    flex: 1;
    min-width: 0;
    min-height: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--cr-line-3);
    border-radius: 0.4375rem;
    background: #fffdfa;
    box-shadow: inset 0 1px 2px rgba(28, 23, 20, 0.06);
    color: var(--cr-text);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    line-height: 1.4;
    outline: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.cr-footer__input::placeholder { color: var(--cr-text-3); }
.cr-footer__input:focus,
.cr-footer__input:focus-visible {
    border-color: var(--cr-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cr-accent) 16%, transparent);
    outline: none;
}
.cr-footer__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    height: 2.25rem;
    padding: 0 0.875rem;
    border: 1px solid #5e2121;
    border-radius: 0.4375rem;
    box-shadow: 0 3px 0 0 #3f1515;
    background: var(--cr-accent-fill);
    color: var(--cr-on-accent);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.005em;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease;
}
.cr-footer__submit:hover { background: var(--cr-accent-strong); transform: translateY(-1px); box-shadow: 0 4px 0 0 #3f1515; }
.cr-footer__submit:active { transform: translateY(3px); box-shadow: none; }
.cr-footer__hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.cr-footer__submit:disabled { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }
.cr-footer__status { margin: 0.5rem 0 0; min-height: 1.25rem; font-size: 0.8125rem; line-height: 1.4; }
.cr-footer__status.is-ok { color: var(--cr-green); }
.cr-footer__status.is-error { color: #b42318; }
.cr-footer__legal { margin: 1rem 0 0; font-size: 0.75rem; line-height: 1.5; color: var(--cr-text-2); }
.cr-footer__legal a { color: var(--cr-green); text-decoration: underline; text-underline-offset: 2px; }
.cr-footer__legal a:hover { opacity: 0.8; }
.cr-footer__wordmark { display: block; width: 100%; margin-top: 4rem; overflow: hidden; opacity: 0.85; }
.cr-footer__wm {
    display: block;
    width: max-content;
    font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
    font-weight: 600;
    font-size: var(--wm-size, 15.6vw);
    line-height: 0.82;
    letter-spacing: -0.04em;
    /* Outline via layered shadows: text-stroke exposes Geist's overlapping contours. */
    --wm-c: var(--cr-accent-strong);
    color: var(--cr-bg);
    text-shadow:
        1.4px 0 0 var(--wm-c), -1.4px 0 0 var(--wm-c), 0 1.4px 0 var(--wm-c), 0 -1.4px 0 var(--wm-c),
        1px 1px 0 var(--wm-c), -1px 1px 0 var(--wm-c), 1px -1px 0 var(--wm-c), -1px -1px 0 var(--wm-c);
    padding-top: 0.06em;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0) 100%);
    user-select: none;
    white-space: nowrap;
}
.cr-footer__bottom {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
}
@media (min-width: 48rem) { .cr-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.cr-footer__bottom-links { display: flex; align-items: center; gap: 1.5rem; }
.cr-footer__bottom a { font-size: 0.875rem; font-weight: 500; color: var(--cr-text-2); text-decoration: none; transition: color 0.2s ease; }
.cr-footer__bottom a:hover { color: var(--cr-text); }
.cr-footer__bottom p { margin: 0; font-size: 0.875rem; color: var(--cr-text-2); }

/* --------------------------------------------------------------------------
   Page loader: brand mark + hairline progress
   -------------------------------------------------------------------------- */
.page-loader { background: var(--background); }
.page-loader__inner { display: flex; flex-direction: column; align-items: center; gap: 1.125rem; }
.page-loader__mark {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
    animation: loaderPulse 1.6s ease-in-out infinite;
}
.page-loader__bar {
    position: relative;
    width: 7.5rem;
    height: 2px;
    border-radius: 2px;
    background: var(--cr-line-2);
    overflow: hidden;
}
.page-loader__bar i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 40%;
    border-radius: inherit;
    background: var(--cr-accent);
    animation: loaderSlide 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes loaderSlide { to { left: 100%; } }
@keyframes loaderPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
/* Legacy dots, kept for any page that still renders them */
.page-loader-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--foreground); animation: loaderBlink 1.2s infinite ease-in-out both; }
.page-loader-dot:nth-child(1) { animation-delay: -0.32s; }
.page-loader-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes loaderBlink { 0%, 80%, 100% { opacity: 0.15; } 40% { opacity: 1; } }

/* --------------------------------------------------------------------------
   Misc legacy hooks kept for other templates
   -------------------------------------------------------------------------- */
.card-hover { transition: border-color 0.15s ease; }
.card-hover:hover { border-color: var(--hh-hover-line); }
.focus-ring:focus { outline: none; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }
.social-icon { transition: color 0.15s ease; }
.social-icon:hover { color: var(--foreground); }
.btn-glow { position: relative; }
.noise-overlay::after { content: none; }
.admin-table-wrapper { -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .admin-table-wrapper table { min-width: 600px; } }

/* FAQ rows (marketing + legal pages) */
.hh-faq details { border-top: 1px solid var(--border); }
.hh-faq details:last-child { border-bottom: 1px solid var(--border); }
.hh-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--cr-text);
}
.hh-faq summary::-webkit-details-marker { display: none; }
.hh-faq summary .hh-faq__icon {
    position: relative;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    border: 1px solid var(--border);
    transition: border-color 0.15s ease;
}
.hh-faq summary .hh-faq__icon::before,
.hh-faq summary .hh-faq__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--foreground);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
}
.hh-faq summary .hh-faq__icon::before { width: 0.625rem; height: 1px; }
.hh-faq summary .hh-faq__icon::after { width: 1px; height: 0.625rem; }
.hh-faq details[open] summary .hh-faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.hh-faq details[open] summary .hh-faq__icon { border-color: var(--foreground); }
.hh-faq summary:hover .hh-faq__icon { border-color: var(--foreground); }
.hh-faq .hh-faq__body {
    padding: 0 0 1.5rem;
    max-width: 44rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--muted-foreground);
}

/* Prose (blog, legal) */
.hh-prose { font-size: 1rem; line-height: 1.75; color: var(--foreground); }
.hh-prose > * + * { margin-top: 1.1em; }
.hh-prose h2, .hh-prose h3, .hh-prose h4 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--foreground);
    margin-top: 2em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}
.hh-prose h2 { font-size: 1.75rem; }
.hh-prose h3 { font-size: 1.35rem; }
.hh-prose h4 { font-size: 1.1rem; }
.hh-prose p { color: var(--foreground); }
.hh-prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.hh-prose ul, .hh-prose ol { padding-left: 1.4em; }
.hh-prose ul { list-style: disc; }
.hh-prose ol { list-style: decimal; }
.hh-prose li + li { margin-top: 0.4em; }
.hh-prose blockquote {
    border-left: 0;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    background: var(--cr-bg-3);
    color: var(--muted-foreground);
}
.hh-prose code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--cr-bg-3);
    padding: 0.1em 0.35em;
    border: 1px solid var(--border);
    border-radius: 0.2rem;
}
.hh-prose pre {
    background: var(--cr-bg-2);
    color: var(--cr-text);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    border: 1px solid var(--cr-line-2);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
}
.hh-prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.hh-prose img { border: 1px solid var(--border); }
.hh-prose hr { border: 0; height: 1px; background: var(--border); margin: 2.5em 0; }
.hh-prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.hh-prose th, .hh-prose td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.hh-prose th { background: var(--muted); font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Report board — landing session-replay card: score + mix bar + dims + moments */
.hh-rpt-board { padding: 1.25rem 1.25rem 1.375rem; }
@media (min-width: 640px) { .hh-rpt-board { padding: 1.25rem 1.5rem 1.5rem; } }
.hh-rpt-board-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.875rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--cr-bg-2);
}
@media (min-width: 640px) { .hh-rpt-board-bar { padding: 0.75rem 1.5rem; } }
.hh-rpt-board-bar h1 {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--foreground);
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.hh-rpt-board-bar .hh-rpt-board-meta {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
}
.hh-rpt-board-bar .sp { flex: 1; min-width: 0.5rem; }
.hh-rpt-board-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
@media (max-width: 40rem) {
    .hh-rpt-board-head { flex-direction: column; align-items: stretch; }
}
.hh-rpt-board-score { min-width: 0; }
.hh-rpt-board-score .hh-rpt-kicker,
.hh-rpt-board-col > .hh-rpt-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}
.hh-rpt-board-score .hh-rpt-score-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}
.hh-rpt-board-score .hh-rpt-score-num {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.75rem, 7vw, 3.75rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--hh-score-ink, var(--foreground));
}
.hh-rpt-board-score .hh-rpt-score-den {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    white-space: nowrap;
}
.hh-rpt-mix-col { min-width: 0; flex: 1; max-width: 26rem; }
@media (max-width: 40rem) { .hh-rpt-mix-col { max-width: none; } }
.hh-rpt-mix,
.hh-tl-mix {
    position: relative;
    display: flex;
    height: 2.75rem;
    gap: 2px;
    border-radius: 0.375rem;
    overflow: hidden;
    background: var(--cr-bg-3);
}
.hh-rpt-mix > i,
.hh-tl-mix > i {
    display: block;
    height: 100%;
    min-width: 0;
    background: var(--cr-bg-4);
}
.hh-rpt-mix > i.prompt, .hh-tl-mix > i.prompt { background: var(--cr-add); }
.hh-rpt-mix > i.plan, .hh-tl-mix > i.plan { background: var(--cr-accent); }
.hh-rpt-mix > i.explore, .hh-tl-mix > i.explore { background: var(--cr-indigo); }
.hh-rpt-mix > i.agent, .hh-tl-mix > i.agent { background: var(--cr-amber); }
.hh-rpt-mix > i.manual, .hh-tl-mix > i.manual { background: color-mix(in srgb, var(--cr-accent) 55%, var(--cr-amber)); }
.hh-rpt-mix > i.tool, .hh-tl-mix > i.tool { background: var(--cr-text-3); }
.hh-rpt-mix > i.verify, .hh-tl-mix > i.verify { background: var(--cr-blue); }
.hh-rpt-mix > i.drift, .hh-tl-mix > i.drift { background: var(--cr-del); }
.hh-rpt-mix > i.idle, .hh-tl-mix > i.idle { background: var(--cr-bg-4); }
.hh-rpt-legend,
.hh-tl-mix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.625rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--muted-foreground);
}
.hh-rpt-legend i,
.hh-tl-mix-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 0.375rem;
    vertical-align: -1px;
}
.hh-rpt-board-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.25rem 1.5rem;
    margin-top: 1.125rem;
}
@media (max-width: 40rem) { .hh-rpt-board-grid { grid-template-columns: 1fr; } }
.hh-rpt-board-grid.is-solo { grid-template-columns: minmax(0, 1fr); }
.hh-rpt-dims {
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    overflow: hidden;
}
.hh-rpt-dim {
    display: grid;
    grid-template-columns: minmax(7.25rem, 11rem) minmax(0, 1fr) 2.5rem;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0.875rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--muted-foreground);
}
.hh-rpt-dim:first-child { border-top: 0; }
.hh-rpt-dim .n {
    text-align: right;
    color: var(--foreground);
    font-variant-numeric: tabular-nums;
}
.hh-rpt-dim-bar {
    height: 5px;
    background: var(--cr-bg-4);
    border-radius: 2px;
    overflow: hidden;
}
.hh-rpt-dim-bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--cr-add);
    min-width: 0;
}
.hh-rpt-dim-bar.is-warn > i { background: var(--cr-amber); }
.hh-rpt-dim-bar.is-poor > i { background: var(--cr-del); }
@media (max-width: 40rem) {
    .hh-rpt-dim { grid-template-columns: 7.25rem minmax(0, 1fr) 2.25rem; gap: 0.5rem; padding: 0.5rem 0.75rem; }
}
.hh-rpt-moments { margin-top: 0.25rem; }
.hh-rpt-moments.is-collapsed .hh-rpt-moment-row:nth-child(n + 5) { display: none; }
.hh-rpt-moment-row {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0;
    border: 0;
    border-top: 1px solid var(--border);
    background: transparent;
    text-align: left;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--muted-foreground);
    border-radius: 0;
}
.hh-rpt-moment-row:first-child { border-top: 0; }
.hh-rpt-moment-row .t {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    padding-top: 0.1rem;
    font-variant-numeric: tabular-nums;
}
.hh-rpt-moment-row b {
    color: var(--foreground);
    font-weight: 600;
    display: block;
}
.hh-rpt-moment-row b.is-warn { color: var(--warning); }
.hh-rpt-moment-row b.is-good { color: var(--success); }
button.hh-rpt-moment-row { cursor: pointer; }
button.hh-rpt-moment-row:hover { color: var(--foreground); }
button.hh-rpt-moment-row:hover b { color: var(--cr-text); }
button.hh-rpt-moment-row:hover b.is-warn { color: var(--warning); }
button.hh-rpt-moment-row:hover b.is-good { color: var(--success); }
.hh-rpt-moment-row.is-active {
    background: var(--cr-bg-3);
    margin-inline: -0.5rem;
    padding-inline: 0.5rem;
    border-radius: 0.25rem;
}
.hh-rpt-moments-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.12s ease;
}
.hh-rpt-moments-more:hover { color: var(--foreground); }
.hh-rpt-moments-more::after {
    content: "";
    width: 0.35rem;
    height: 0.35rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -0.15rem;
    transition: transform 0.15s ease;
}
.hh-rpt-moments-more[aria-expanded="true"]::after {
    transform: rotate(225deg);
    margin-top: 0.15rem;
}
.hh-rpt-board-blurb {
    margin: 0.75rem 0 0;
    max-width: 40rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted-foreground);
}
.hh-rpt-board-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   Media skeleton (blog covers + lazy images)
   -------------------------------------------------------------------------- */
.hh-blog-cover {
    background: var(--cr-bg-4);
}
.hh-media {
    position: relative;
    overflow: hidden;
    background: var(--cr-bg-4);
}
.hh-media > img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.35s ease;
}
.hh-media.absolute > img,
.hh-media.is-fill > img {
    height: 100%;
}
.hh-media.is-loading {
    background: var(--cr-bg-4);
}
.hh-media.is-loading > img { opacity: 0; }
/* Light blog / document glyph while the cover is loading */
.hh-media.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%237a736b' stroke-width='1.25'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6v-3z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 2.5rem 2.5rem;
    opacity: 0.55;
    pointer-events: none;
}
.hh-media.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(255, 255, 255, 0.28) 45%,
        transparent 70%
    );
    background-size: 200% 100%;
    animation: hh-skel 1.15s ease-in-out infinite;
    pointer-events: none;
}
@keyframes hh-skel {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hh-media.is-loading::after { animation: none; opacity: 0.35; background: rgba(255, 255, 255, 0.2); }
}
