/* ===== Hermes — grow an agent (typography matches drones / site Inter) ===== */

.hm-page {
    max-width: 1500px;
    margin: 0 auto;
    padding: 1rem 1.5rem 3rem;
    font-variant-numeric: tabular-nums;
}

/* ---- Top bar ---- */
.hm-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0 1rem;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hm-logo {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 0.25em;
    background: linear-gradient(135deg, #38bdf8, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hm-tagline {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.85rem;
    margin-left: 0.8rem;
}

.hm-session {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.9rem;
}

/* ---- Layout ---- */
.hm-layout {
    display: grid;
    grid-template-columns: 340px minmax(320px, 1fr) 320px;
    gap: 1rem;
    align-items: start;
}

.hm-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.hm-panel {
    background: var(--bg-card, #1a2235);
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 1rem;
}

.hm-panel h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary, #94a3b8);
    margin: 0.8rem 0 0.5rem;
}

.hm-panel h3:first-child {
    margin-top: 0;
}

.hm-muted {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.82rem;
}

/* ---- Stats ---- */
.hm-money {
    font-size: 2.1rem;
    font-weight: 800;
    color: #34d399;
}

/* Company level, XP bar and unspent skill points. */
.hm-level {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.35rem 0 0.15rem;
}

.hm-level-badge {
    font-size: 0.78rem;
    font-weight: 800;
    color: #c4b5fd;
    white-space: nowrap;
}

.hm-level-bar {
    flex: 1;
    height: 5px;
    background: #070b16;
    border-radius: 3px;
    overflow: hidden;
}

.hm-level-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6d28d9, #a78bfa);
    border-radius: 3px;
}

.hm-level-pts {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary, #94a3b8);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
    white-space: nowrap;
}

.hm-level-pts.on {
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.55);
}

.hm-rep {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fbbf24;
    margin-top: 0.1rem;
}

.hm-substats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0.3rem 0 0.9rem;
}

/* Trust with the four customer segments: one compact row each. */
.hm-segs {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0.5rem 0 0.7rem;
    padding: 0.45rem 0.55rem;
    background: #0d1424;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
}

.hm-seg-row {
    display: grid;
    grid-template-columns: 1.2rem 5rem 4.4rem 1fr 2.4rem;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    margin: 0;
    padding: 0.15rem 0.1rem;
    font: inherit;
    font-size: 0.7rem;
    color: var(--text-secondary, #94a3b8);
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.hm-seg-row:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.35);
    color: #e2e8f0;
}

.hm-seg-name { font-weight: 600; color: #dce6f5; }

.hm-seg-level {
    font-style: italic;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-seg-level.on { font-style: normal; font-weight: 700; color: #fbbf24; }

.hm-seg-bar {
    height: 4px;
    background: #070b16;
    border-radius: 2px;
    overflow: hidden;
}

.hm-seg-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #b45309, #fbbf24);
    border-radius: 2px;
    transition: width 0.25s linear;
}

.hm-seg-rep { text-align: right; font-variant-numeric: tabular-nums; }

/* Customer-segment chip on contract cards. */
.hm-seg-chip {
    font-weight: 700;
    color: #dce6f5;
    white-space: nowrap;
}

.hm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
}

.hm-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
}

.hm-badge.gold {
    color: #fde68a;
    border-color: rgba(250, 204, 21, 0.5);
}

/* Fixed-height alert strip: storms, night and empty credits come and go,
   but the panel below (and the PILOT button under it) must not jump
   around while the player is clicking. */
.hm-alerts {
    height: 3.6rem;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}

.hm-alert {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.hm-alert-night {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(129, 140, 248, 0.45);
    color: #c7d2fe;
}

.hm-alert-ok {
    background: rgba(52, 211, 153, 0.06);
    border-color: rgba(52, 211, 153, 0.25);
    color: #6ee7b7;
    font-weight: 500;
}

.hm-stat-row {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.82rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.hm-stat-row:last-child { border-bottom: none; }
.hm-stat-row span:first-child { color: var(--text-secondary, #94a3b8); }
.hm-stat-row em {
    font-style: normal;
    color: var(--text-muted, #64748b);
    font-size: 0.75rem;
}

/* ---- Meters ---- */
.hm-meter-bar {
    height: 7px;
    background: #0d1424;
    border-radius: 4px;
    overflow: hidden;
}

.hm-meter-fill {
    height: 100%;
    background: #38bdf8;
    border-radius: 4px;
    transition: width 0.25s linear;
}

.hm-meter-fill.run { background: linear-gradient(90deg, #38bdf8, #fbbf24); }

/* ---- Focus button (same pattern as drones PILOT) ---- */
.hm-focus {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    width: 100%;
    padding: 0.9rem;
    font: inherit;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #1f1503;
    background: linear-gradient(135deg, #38bdf8, #fbbf24);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.05s, filter 0.15s;
}

.hm-focus:hover { filter: brightness(1.12); }
.hm-focus:active { transform: scale(0.97); }

/* Out of stamina: the button still responds, it just has nothing to give. */
.hm-focus.tired {
    filter: grayscale(0.75) brightness(0.8);
    cursor: progress;
}

.hm-focus-sub {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.hm-focus-meter {
    width: 70%;
    height: 5px;
    margin-top: 0.3rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    overflow: hidden;
}

.hm-focus-fill {
    display: block;
    height: 100%;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    transition: width 0.2s linear;
}

.hm-focus-fill.tired { background: #b91c1c; }

.hm-previewing { border-color: #fbbf24; }

/* ---- Contracts (center) ---- */
/* Grow with content so every offer and in-delivery contract stays
   visible — no panel-level or per-card scroll. */
.hm-contracts { max-height: none; overflow: visible; }

.hm-con {
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.5rem;
}

.hm-offer {
    display: flex;
    flex-direction: column;
}

.hm-offer .hm-accept {
    margin-top: 0.15rem;
    align-self: stretch;
}

.hm-offer-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.hm-offer-actions .hm-btn { flex: 1; }

.hm-con.selected {
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.hm-btn-rush {
    border-color: rgba(251, 191, 36, 0.55) !important;
    color: #fbbf24 !important;
}

.hm-con-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.hm-con-pay { color: #34d399; white-space: nowrap; }
.hm-con-eta { color: var(--text-secondary, #94a3b8); font-size: 0.75rem; white-space: nowrap; }

.hm-con-meta {
    font-size: 0.72rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 0.35rem;
}

.hm-disc { font-style: normal; font-weight: 700; }
.hm-disc-setup { color: #f9a8d4; }
.hm-disc-core { color: #a5b4fc; }
.hm-disc-tools { color: #86efac; }
.hm-disc-memory { color: #fcd34d; }
.hm-disc-messaging { color: #7dd3fc; }
.hm-disc-media { color: #fda4af; }
.hm-disc-automation { color: #c4b5fd; }
.hm-disc-integrations { color: #67e8f9; }
.hm-disc-clients { color: #fbbf24; }
.hm-disc-any { color: #94a3b8; }

.hm-con-tags {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.3rem;
    margin-bottom: 0.45rem;
}

.hm-tag {
    font-size: 0.66rem;
    font-weight: 600;
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
}

.hm-tag.missing {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
}

/* Not learned, but not blocking either — starter slack is covering for it. */
.hm-tag.soft {
    color: var(--text-muted, #64748b);
    border-color: rgba(148, 163, 184, 0.3);
    border-style: dashed;
}

/* Delivery deadline chip on running contracts. */
.hm-con-deadline {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    margin-top: 0.3rem;
}

.hm-con-deadline.late {
    color: #fca5a5;
    font-weight: 700;
}

.hm-substats-bad span { color: #fca5a5; }

.hm-accept { width: 100%; }

.hm-empty {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.82rem;
    font-style: italic;
    padding: 0.3rem 0;
}

/* ---- Skill trees (center summary) ---- */
.hm-trees-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.hm-trees-head h3 { margin: 0; flex: 1; }

/* Unspent-skill-point chip in the trees header. */
.hm-tree-pts {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-secondary, #94a3b8);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    white-space: nowrap;
}

.hm-tree-pts.on {
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.55);
}

.hm-tree-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
    margin: 0.55rem 0 0.35rem;
}

.hm-tab-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: #f0f4f8;
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.5rem 0.3rem;
}

.hm-tab-summary.gold { border-color: rgba(250, 204, 21, 0.45); }

.hm-tree-hint {
    margin: 0.2rem 0 0;
    font-size: 0.74rem;
    font-style: italic;
    color: var(--text-secondary, #94a3b8);
}

.hm-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.7rem;
}

.hm-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    font: inherit;
    color: #f0f4f8;
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.5rem 0.3rem;
    cursor: pointer;
    transition: border-color 0.15s, filter 0.15s;
}

.hm-tab:hover { filter: brightness(1.25); }
.hm-tab.active { border-color: #38bdf8; box-shadow: 0 0 0 1px #38bdf8; }

.hm-tab-name { font-size: 0.76rem; font-weight: 700; text-align: center; }
.hm-tab-count { font-size: 0.68rem; color: var(--text-secondary, #94a3b8); }
.hm-tab-count.gold { color: #fde68a; font-weight: 700; }

.hm-tree-blurb {
    font-size: 0.78rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0 0 0.7rem;
    line-height: 1.5;
}

.hm-tree-blurb .gold, strong.gold { color: #fde68a; }

.hm-tree { display: flex; flex-direction: column; gap: 0.35rem; }

.hm-skill {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    text-align: left;
    font: inherit;
    color: #f0f4f8;
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    margin-left: calc(var(--depth, 0) * 14px);
    width: calc(100% - var(--depth, 0) * 14px);
    cursor: pointer;
    transition: border-color 0.15s, filter 0.15s;
    box-sizing: border-box;
}

.hm-skill:hover:not(:disabled):not(.locked) { filter: brightness(1.25); }
.hm-skill:disabled { opacity: 0.45; cursor: not-allowed; }

.hm-skill.owned {
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(52, 211, 153, 0.06);
}

.hm-skill.owned .hm-skill-name { color: #6ee7b7; }

.hm-skill.locked {
    opacity: 0.45;
    cursor: default;
}

.hm-skill-name { font-size: 0.84rem; font-weight: 600; }
.hm-skill-desc { font-size: 0.7rem; color: var(--text-secondary, #94a3b8); }
.hm-skill-cost { font-size: 0.76rem; font-weight: 700; color: #c4b5fd; }

/* Footer chips per skill: customer segments won + payload-module note. */
.hm-skill-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.6rem;
    margin-top: 0.1rem;
}

.hm-skill-segs {
    font-size: 0.66rem;
    color: var(--text-muted, #64748b);
    letter-spacing: 0.06em;
}

.hm-skill-mod {
    font-size: 0.62rem;
    font-weight: 700;
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    padding: 0.02rem 0.4rem;
    white-space: nowrap;
}

.hm-tree-legend {
    font-size: 0.68rem;
    color: var(--text-muted, #64748b);
    margin: -0.2rem 0 0.6rem;
    letter-spacing: 0.02em;
}

/* Cross-tree prerequisite tag on locked skills */
.hm-cross {
    font-style: normal;
    font-size: 0.64rem;
    font-weight: 700;
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 999px;
    padding: 0.02rem 0.4rem;
    white-space: nowrap;
}

/* ---- Full skill map overlay ---- */
#hm-skillmap-root { display: none; }
#hm-skillmap-root.open {
    display: block;
    position: fixed;
    inset: 0;
    /* Same layer as the sticky site navbar and the modal root: DOM order
       puts the navbar below this overlay and modals above it. */
    z-index: 1000;
    background: rgba(4, 7, 14, 0.9);
    backdrop-filter: blur(4px);
}

.hm-map {
    position: absolute;
    inset: 1rem;
    display: flex;
    flex-direction: column;
    background: #0a0f1c;
    border: 1px solid #33466b;
    border-radius: 16px;
    overflow: hidden;
}

.hm-map-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #1e293b;
    background: #0d1424;
}

.hm-map-title {
    font-weight: 800;
    letter-spacing: 0.18em;
    background: linear-gradient(135deg, #38bdf8, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hm-map-sub {
    margin-left: 0.7rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
}

.hm-map-segs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.hm-map-segs-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
    margin-right: 0.15rem;
}

.hm-map-seg {
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    color: #dce6f5;
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.hm-map-seg:hover {
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(251, 191, 36, 0.08);
}

.hm-map-seg.active {
    color: #0a0f1c;
    background: #fbbf24;
    border-color: #fbbf24;
}

.hm-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    font-size: 0.7rem;
    color: var(--text-secondary, #94a3b8);
}

.hm-map-key::before {
    content: '';
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    border-radius: 3px;
    margin-right: 0.35em;
    vertical-align: -0.05em;
    border: 1px solid #33466b;
    background: #131c2e;
}

.hm-map-key.owned::before { border-color: rgba(52, 211, 153, 0.8); background: rgba(52, 211, 153, 0.25); }
.hm-map-key.avail::before { border-color: #38bdf8; }
.hm-map-key.locked::before { opacity: 0.4; }
.hm-map-key.doctrine::before { border-style: dashed; border-color: #c4b5fd; }
.hm-map-key.capstone::before { border-width: 2px; border-color: rgba(250, 204, 21, 0.7); }
.hm-map-key.seghl::before {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.55);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.75);
}
.hm-map-key.cross::before {
    height: 0;
    border: none;
    border-top: 2px dashed #fbbf24;
    border-radius: 0;
    background: none;
    vertical-align: 0.25em;
}

.hm-map-tools { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.hm-map-tools .hm-btn.active {
    color: #0a0f1c;
    background: #fbbf24;
    border-color: #fbbf24;
}

.hm-map-seg:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.hm-map-viewport {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    background:
        radial-gradient(circle at 20% 15%, rgba(56, 189, 248, 0.06), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.05), transparent 45%),
        #0a0f1c;
}

.hm-map-viewport:active { cursor: grabbing; }

.hm-map-canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
}

.hm-map-edges {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.hm-map-edge {
    stroke-width: 1.5;
    opacity: 0.18;
    transition: opacity 0.2s;
}

.hm-map-edge.cross { stroke-dasharray: 6 5; }
.hm-map-edge.half { opacity: 0.5; }
.hm-map-edge.on { opacity: 0.85; stroke-width: 2; }
.hm-map-edge.hl { opacity: 1; stroke-width: 3; }
.hm-map-edge.seg-hl {
    opacity: 1;
    stroke-width: 3.5;
    stroke: #fbbf24;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.7));
}

.hm-map-divider {
    position: absolute;
    left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.hm-map-band-head {
    position: absolute;
    transform: translateY(-0.2em);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hm-map-band-count {
    margin-left: 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #94a3b8);
}

.hm-map-band-count.gold { color: #fde68a; }

.hm-map-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    width: 172px;
    height: 56px;
    padding: 0.3rem 0.55rem;
    box-sizing: border-box;
    text-align: left;
    font: inherit;
    color: #f0f4f8;
    background: #131c2e;
    border: 1px solid #1e293b;
    border-left: 3px solid var(--tc, #38bdf8);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, filter 0.15s, box-shadow 0.15s, opacity 0.2s, transform 0.15s;
}

.hm-map-node:hover { filter: brightness(1.3); }

.hm-map-canvas.seg-filter .hm-map-node:not(.seg-hl) {
    opacity: 0.1;
    filter: grayscale(0.85) brightness(0.55);
    box-shadow: none;
}

.hm-map-canvas.seg-filter .hm-map-edge:not(.seg-hl) {
    opacity: 0.03;
}

.hm-map-canvas.seg-filter .hm-map-band-head {
    opacity: 0.35;
}

.hm-map-node.seg-hl {
    border-color: #fbbf24;
    border-left-color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.28), rgba(19, 28, 46, 0.95));
    box-shadow:
        0 0 0 2px rgba(251, 191, 36, 0.55),
        0 0 22px rgba(251, 191, 36, 0.55),
        0 0 8px rgba(251, 191, 36, 0.35);
    z-index: 3;
    opacity: 1;
    filter: none;
    transform: scale(1.04);
}

.hm-map-node.seg-hl::after {
    content: 'needed';
    position: absolute;
    top: -0.45rem;
    right: 0.4rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0a0f1c;
    background: #fbbf24;
    border-radius: 999px;
    padding: 0.08rem 0.4rem;
    line-height: 1.2;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.hm-map-node.owned {
    border-color: rgba(52, 211, 153, 0.55);
    border-left-color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.18);
}

.hm-map-node.owned.seg-hl {
    border-color: #fbbf24;
    border-left-color: #34d399;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(52, 211, 153, 0.18));
    box-shadow:
        0 0 0 2px rgba(251, 191, 36, 0.6),
        0 0 22px rgba(251, 191, 36, 0.5),
        0 0 10px rgba(52, 211, 153, 0.35);
}

.hm-map-node.owned.seg-hl::after {
    content: 'needed · learned';
    background: linear-gradient(90deg, #fbbf24, #34d399);
}

.hm-map-node.owned .hm-map-node-name { color: #6ee7b7; -webkit-text-fill-color: #6ee7b7; }
.hm-map-node.owned .hm-map-node-sub { color: rgba(110, 231, 183, 0.75); }

.hm-map-node.locked { opacity: 0.42; }

/* Full-tree browse: every node and edge fully readable */
.hm-map-canvas.full-tree .hm-map-node.full-show {
    opacity: 1;
    filter: none;
    transform: none;
    box-shadow: none;
    border-color: #33466b;
    border-left-color: var(--tc, #38bdf8);
    background: #131c2e;
}

.hm-map-canvas.full-tree .hm-map-node.full-show .hm-map-node-name {
    color: #f0f4f8;
    -webkit-text-fill-color: #f0f4f8;
}

.hm-map-canvas.full-tree .hm-map-node.full-show .hm-map-node-sub {
    color: var(--text-secondary, #94a3b8);
}

.hm-map-canvas.full-tree .hm-map-edge.full-show {
    opacity: 0.55;
    stroke-width: 1.8;
    filter: none;
}

.hm-map-canvas.full-tree .hm-map-band-head {
    opacity: 1;
}

/* Customer filter wins over the usual locked dimming so needed skills stay obvious. */
.hm-map-canvas.seg-filter .hm-map-node.seg-hl {
    opacity: 1;
    filter: none;
}

.hm-map-node.afford {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.hm-map-node.afford.seg-hl {
    border-color: #fbbf24;
    box-shadow:
        0 0 0 2px rgba(251, 191, 36, 0.55),
        0 0 22px rgba(251, 191, 36, 0.55),
        0 0 8px rgba(251, 191, 36, 0.35);
}

.hm-map-node.selected {
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.6), 0 0 16px rgba(251, 191, 36, 0.3);
    opacity: 1;
}

.hm-map-node-name {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    color: #f0f4f8;
    -webkit-text-fill-color: #f0f4f8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hm-map-node-sub {
    font-size: 0.62rem;
    font-weight: 600;
    color: #34d399;
}

.hm-map-node.locked .hm-map-node-sub { color: var(--text-secondary, #94a3b8); }

.hm-map-hint {
    position: absolute;
    right: 0.9rem;
    bottom: 0.7rem;
    font-size: 0.72rem;
    color: var(--text-secondary, #94a3b8);
    pointer-events: none;
}

.hm-map-hint.seg-active {
    left: 0.9rem;
    right: auto;
    bottom: auto;
    top: 0.85rem;
    max-width: min(420px, calc(100% - 2rem));
    font-size: 0.82rem;
    font-weight: 700;
    color: #0a0f1c;
    background: #fbbf24;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.45);
    line-height: 1.35;
}

.hm-map-inspector {
    position: absolute;
    left: 0.9rem;
    bottom: 0.9rem;
    width: min(400px, calc(100% - 2rem));
    max-height: min(340px, 60%);
    overflow-y: auto;
    background: rgba(13, 20, 36, 0.96);
    border: 1px solid #33466b;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    cursor: auto;
}

.hm-map-ins-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.hm-map-ins-head .hm-modal-close { position: static; }

.hm-map-ins-tree {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hm-map-inspector h4 { margin: 0 0 0.35rem; font-size: 1rem; }

.hm-map-ins-desc {
    margin: 0 0 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #7dd3fc;
}

.hm-map-ins-segs {
    margin: 0 0 0.4rem;
    font-size: 0.74rem;
    color: #fcd34d;
}

.hm-map-ins-slot {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    color: #7dd3fc;
}

.hm-map-ins-req {
    margin: 0 0 0.5rem;
    font-size: 0.74rem;
    color: var(--text-secondary, #94a3b8);
}

.hm-map-pre-ok { color: #6ee7b7; }
.hm-map-pre-missing { color: #fca5a5; }

.hm-map-ins-learn {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary, #94a3b8);
}

.hm-map-ins-actions { display: flex; justify-content: flex-end; }

.hm-map-ins-owned { font-size: 0.85rem; font-weight: 700; color: #34d399; }
.hm-map-ins-locked { font-size: 0.85rem; font-weight: 600; color: #fca5a5; }

@media (max-width: 700px) {
    .hm-map { inset: 0.4rem; }
    .hm-map-legend { display: none; }
}

/* ---- Buttons ---- */
.hm-btn {
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: #f0f4f8;
    background: #263650;
    border: 1px solid #33466b;
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: filter 0.15s;
}

a.hm-btn {
    display: inline-block;
    text-decoration: none;
}

.hm-btn:hover:not(:disabled) { filter: brightness(1.2); }
.hm-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.hm-btn-primary { background: linear-gradient(135deg, #0369a1, #b45309); border: none; }
.hm-btn-small { font-size: 0.75rem; padding: 0.3rem 0.7rem; }
.hm-btn-block { display: block; width: 100%; margin-bottom: 0.6rem; }

/* ---- Log ---- */
.hm-log {
    height: 170px;
    overflow-y: auto;
    font-size: 0.78rem;
    line-height: 1.5;
}

.hm-log-line { color: var(--text-secondary, #94a3b8); }
.hm-log-earn { color: #34d399; }
.hm-log-buy { color: #7dd3fc; }
.hm-log-milestone { color: #facc15; font-weight: 600; }

/* ---- Shop ---- */
.hm-shop {
    max-height: 80vh;
    overflow-y: auto;
}

.hm-shop-section { margin-bottom: 0.9rem; }

.hm-shop-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    width: 100%;
    text-align: left;
    font: inherit;
    color: #f0f4f8;
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: border-color 0.15s, filter 0.15s;
}

.hm-shop-item:hover:not(:disabled) { filter: brightness(1.25); }
.hm-shop-item:disabled { opacity: 0.45; cursor: not-allowed; }
.hm-shop-special { border-color: #38bdf8; }

.hm-current {
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(52, 211, 153, 0.06);
}

.hm-shop-name { font-size: 0.85rem; font-weight: 600; }
.hm-owned { font-style: normal; color: #34d399; font-size: 0.72rem; }
.hm-shop-desc { font-size: 0.7rem; color: var(--text-secondary, #94a3b8); }
.hm-shop-cost { font-size: 0.78rem; font-weight: 700; color: #34d399; }

/* ---- Modals ---- */
#hm-modal-root { display: none; }
#hm-modal-root.open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.hm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 15, 0.75);
    backdrop-filter: blur(3px);
}

.hm-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100vw - 2rem));
    max-height: 85vh;
    overflow-y: auto;
    background: var(--bg-card, #1a2235);
    border: 1px solid #33466b;
    border-radius: 16px;
    padding: 1.6rem;
}

.hm-modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.9rem;
    font: inherit;
    font-size: 1rem;
    line-height: 1;
    color: var(--text-secondary, #94a3b8);
    background: none;
    border: none;
    padding: 0.3rem;
    cursor: pointer;
}

.hm-modal-close:hover { color: #f0f4f8; }

.hm-modal h2 { margin: 0 0 0.7rem; font-size: 1.25rem; }
.hm-modal p { color: var(--text-secondary, #94a3b8); font-size: 0.9rem; line-height: 1.6; }

.hm-learn-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.5);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.7rem;
}

.hm-field {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 0.8rem;
}

.hm-field input,
.hm-start-lookup input {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    font: inherit;
    font-size: 0.9rem;
    color: #f0f4f8;
    background: #0d1424;
    border: 1px solid #33466b;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    box-sizing: border-box;
}

.hm-hint { font-size: 0.78rem; color: var(--text-secondary, #94a3b8); }

.hm-seg-cap-list {
    margin: 0.4rem 0 0.8rem;
    padding-left: 1.15rem;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.86rem;
    line-height: 1.55;
}

.hm-seg-cap-list strong { color: #e2e8f0; }

.hm-seg-skill {
    color: #94a3b8;
    font-size: 0.82rem;
}

.hm-seg-skill.owned { color: #6ee7b7; }

.hm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1rem;
}

.hm-modal-error { color: #fca5a5; font-size: 0.8rem; margin-top: 0.6rem; }

















/* ---- Start screen ---- */
.hm-start-logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    text-align: center;
    background: linear-gradient(135deg, #38bdf8, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.hm-start-sub { text-align: center; margin-bottom: 1.4rem; }

.hm-start-divider {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary, #94a3b8);
    margin: 1rem 0 0.6rem;
}

.hm-start-lookup {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.hm-start-lookup input { margin-top: 0; flex: 1; }

.hm-session-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    width: 100%;
    text-align: left;
    font: inherit;
    color: #f0f4f8;
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
}

.hm-session-row:hover { border-color: #38bdf8; }
.hm-session-name { font-weight: 600; font-size: 0.9rem; }
.hm-session-meta { font-size: 0.75rem; color: var(--text-secondary, #94a3b8); }

/* ---- Ranking page ---- */
.hm-ranking {
    max-width: 640px;
    margin: 1.5rem auto 0;
}

.hm-ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hm-ranking-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card, #1a2235);
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 0.8rem 1.1rem;
    margin-bottom: 0.5rem;
}

.hm-ranking-first {
    border-color: #facc15;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35);
}

.hm-ranking-pos {
    flex: 0 0 2rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-secondary, #94a3b8);
    text-align: center;
}

.hm-ranking-first .hm-ranking-pos { color: #facc15; }

.hm-ranking-name {
    flex: 1;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-ranking-score {
    font-weight: 800;
    color: #34d399;
    white-space: nowrap;
}

.hm-ranking-hint {
    text-align: center;
    margin-top: 1rem;
}

/* ---- Toast ---- */
.hm-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translate(-50%, 20px);
    background: #263650;
    border: 1px solid #33466b;
    color: #f0f4f8;
    font-size: 0.85rem;
    border-radius: 999px;
    padding: 0.55rem 1.2rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1100;
    pointer-events: none;
}

.hm-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Shop rows ---- */
.hm-shop-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.9rem; }

.hm-shop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
}

.hm-shop-row strong { font-size: 0.83rem; font-weight: 600; }
.hm-shop-row .hm-muted { font-size: 0.7rem; line-height: 1.4; }
.hm-shop-row .hm-btn { white-space: nowrap; }

.hm-shop-row.active {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.06);
}

.hm-shop-row.owned {
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.05);
}

/* ---- Compute meter ---- */
.hm-compute {
    margin: 0.55rem 0 0.5rem;
    padding: 0.45rem 0.55rem;
    background: #0d1424;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
}

.hm-compute-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #67e8f9;
    margin-bottom: 0.25rem;
}

.hm-compute-bar {
    display: block;
    height: 6px;
    background: #070b16;
    border-radius: 3px;
    overflow: hidden;
}

.hm-compute-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #0e7490, #67e8f9);
    border-radius: 3px;
    transition: width 0.2s linear;
}

.hm-compute-flow {
    font-size: 0.66rem;
    color: var(--text-muted, #64748b);
    margin-top: 0.22rem;
    font-variant-numeric: tabular-nums;
}

.hm-compute-flow.over { color: #fbbf24; font-weight: 700; }

.hm-throttle {
    margin-top: 0.28rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 6px;
    padding: 0.18rem 0.4rem;
}

/* ---- Streak + passive income line ---- */
.hm-runline {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.2rem;
}

.hm-streak.on { color: #fbbf24; font-weight: 700; }
.hm-idle { color: #34d399; font-weight: 600; }

/* ---- Offer freshness + delivery clocks ---- */
.hm-offer-age {
    height: 3px;
    background: #070b16;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.35rem;
}

.hm-offer-age span {
    display: block;
    height: 100%;
    background: #38bdf8;
    border-radius: 2px;
    transition: width 0.3s linear;
}

.hm-offer-age span.cold { background: #ef4444; }

.hm-clock-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.3rem;
}

.hm-con-clock {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary, #94a3b8);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hm-con-clock.warn { color: #fbbf24; }
.hm-con-clock.late { color: #fca5a5; }

.hm-clock-bar {
    flex: 1;
    height: 4px;
    background: #070b16;
    border-radius: 2px;
    overflow: hidden;
}

.hm-clock-fill {
    display: block;
    height: 100%;
    background: #38bdf8;
    border-radius: 2px;
    transition: width 0.25s linear;
}

.hm-clock-fill.warn { background: #fbbf24; }
.hm-clock-fill.late { background: #ef4444; }

/* A job held up by an unanswered incident earns nothing while it waits. */
.hm-con.stalled {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

/* ---- Agent roster ---- */
.hm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.hm-panel-head h3 { margin: 0; white-space: nowrap; }
.hm-panel-head .hm-btn-small { white-space: nowrap; flex: none; }

.hm-agents { max-height: 40vh; overflow-y: auto; }

.hm-agent-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.hm-agent {
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
}

.hm-agent.busy { border-color: rgba(56, 189, 248, 0.35); }

.hm-agent-head {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.hm-agent-level { color: var(--text-secondary, #94a3b8); font-weight: 600; font-size: 0.7rem; }

.hm-agent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.45rem;
    font-size: 0.68rem;
    margin: 0.1rem 0 0.25rem;
}

.hm-agent-affinity { font-weight: 700; }
.hm-agent-trait { color: var(--text-muted, #64748b); }

.hm-agent-bar {
    display: block;
    height: 3px;
    background: #070b16;
    border-radius: 2px;
    overflow: hidden;
}

.hm-agent-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a5b4fc);
    border-radius: 2px;
    transition: width 0.25s linear;
}

.hm-agent-job {
    font-size: 0.66rem;
    color: var(--text-secondary, #94a3b8);
    margin-top: 0.22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-btn.active {
    border-color: rgba(52, 211, 153, 0.6);
    color: #6ee7b7;
}

/* ---- Directives ---- */
.hm-directive-list { display: flex; flex-direction: column; gap: 0.4rem; }

.hm-directive {
    background: #131c2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
}

.hm-directive-text { font-size: 0.76rem; font-weight: 600; margin-bottom: 0.3rem; }

.hm-directive-bar {
    display: block;
    height: 4px;
    background: #070b16;
    border-radius: 2px;
    overflow: hidden;
}

.hm-directive-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #c4b5fd);
    border-radius: 2px;
    transition: width 0.25s linear;
}

.hm-directive-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.66rem;
    color: var(--text-muted, #64748b);
    margin-top: 0.22rem;
    font-variant-numeric: tabular-nums;
}

.hm-directive-reward { color: #34d399; font-weight: 700; }

/* ---- Incident modal ---- */
.hm-learn-tag.alert {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

.hm-inc-job {
    font-size: 0.78rem;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 0.4rem;
}

.hm-inc-options { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.8rem 0 0.6rem; }

.hm-inc-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    width: 100%;
    text-align: left;
    font: inherit;
    color: #f0f4f8;
    background: #131c2e;
    border: 1px solid #33466b;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    cursor: pointer;
    transition: border-color 0.15s, filter 0.15s;
}

.hm-inc-option:hover:not(:disabled) { filter: brightness(1.3); border-color: #38bdf8; }

.hm-inc-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
    border-style: dashed;
}

.hm-inc-option-label { font-size: 0.82rem; font-weight: 600; }

.hm-inc-req {
    font-size: 0.66rem;
    font-weight: 700;
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
    white-space: nowrap;
}

.hm-inc-req.locked { color: #fca5a5; border-color: rgba(239, 68, 68, 0.45); }

.hm-inc-timer {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.hm-inc-timer.urgent { color: #fca5a5; font-weight: 800; }

/* ---- Recruitment & assignment ---- */
.hm-recruit-list { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.7rem 0; }

.hm-recruit {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    width: 100%;
    text-align: left;
    font: inherit;
    color: #f0f4f8;
    background: #131c2e;
    border: 1px solid #33466b;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    cursor: pointer;
    transition: border-color 0.15s, filter 0.15s;
}

.hm-recruit:hover { filter: brightness(1.3); border-color: #38bdf8; }
.hm-recruit.best { border-color: rgba(251, 191, 36, 0.6); }

.hm-recruit-name { font-size: 0.86rem; font-weight: 700; }
.hm-recruit-meta { font-size: 0.72rem; color: #7dd3fc; }
.hm-recruit-blurb { font-size: 0.7rem; font-style: italic; color: var(--text-secondary, #94a3b8); }

/* ---- Doctrine & capstone nodes ---- */
.hm-tab-mark { margin-left: 0.22rem; font-size: 0.7rem; }
.hm-tab-mark.doctrine { color: #c4b5fd; }
.hm-tab-mark.capstone { color: #fde68a; }

.hm-map-node.doctrine { border-style: dashed; }
.hm-map-node.capstone { border-width: 2px; }

.hm-map-node.capstone.avail,
.hm-map-node.capstone.locked { border-color: rgba(250, 204, 21, 0.45); }

.hm-map-node.closed {
    opacity: 0.3;
    text-decoration: line-through;
}

.hm-map-node.closed .hm-map-node-sub { color: #fca5a5; }

.hm-map-ins-cost {
    font-size: 0.72rem;
    font-weight: 700;
    color: #c4b5fd;
    margin-left: auto;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.hm-map-ins-kind {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin: 0.1rem 0 0.35rem;
}

.hm-map-ins-kind.doctrine { color: #c4b5fd; }
.hm-map-ins-kind.capstone { color: #fde68a; }

.hm-map-ins-rank {
    font-size: 0.72rem;
    color: #fca5a5;
    margin: 0.25rem 0;
}

.hm-map-ins-rank.ok { color: #6ee7b7; }

.hm-map-ins-closed {
    font-size: 0.72rem;
    font-weight: 600;
    color: #fca5a5;
    margin: 0.25rem 0;
}

.hm-seg-perk { color: #fbbf24; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .hm-layout { grid-template-columns: 1fr 1fr; }
    .hm-col-center { order: -1; grid-column: 1 / -1; }
    .hm-tabs, .hm-tree-summary { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
    .hm-layout { grid-template-columns: 1fr; }
    .hm-shop { max-height: none; }
    .hm-tabs, .hm-tree-summary { grid-template-columns: repeat(2, 1fr); }
}