/* dashboard.css: Command Post (dashboard). */
/* ---- Command Post (dashboard) ---- */
.command-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 768px) {
    .command-grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
}

/* Deliberately a sibling of .command-grid, not a child: see the template comment
   above its markup for why a fourth section can't join the Living Orbit grid. */
.dashboard-news { margin-top: 18px; }
.dashboard-news .news-card-list { margin-top: 4px; gap: 0; }
.dashboard-news .news-card { padding: 14px 0; }
.dashboard-news .news-card + .news-card { border-top: 1px solid var(--border-subtle); }

/* "Today's Dailies" reminder strip, same sibling-of-.command-grid placement and
   reasoning as .dashboard-news above. Each item reuses .state-chip for its status,
   so the house rule (status is never colour alone) applies for free. */
.dailies-brief { margin-bottom: 18px; }
.dailies-brief-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 4px 0 0; padding: 0; }
.dailies-brief-item a {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-md);
    color: inherit; text-decoration: none; font-size: 0.88rem; background: var(--bg-surface);
    transition: border-color var(--dur) var(--ease);
}
@media (hover: hover) {
    .dailies-brief-item a:hover { border-color: var(--color-primary); }
}

/* The dismiss button inside the Command Post news chip (world strip). */
.news-strip__dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    cursor: pointer;
}
.news-strip__dismiss:focus-visible { color: var(--text-primary); border-color: var(--border-color); }
@media (hover: hover) {
    .news-strip__dismiss:hover { color: var(--text-primary); border-color: var(--border-color); }
}
@media (pointer: coarse) {
    .news-strip__dismiss { width: 44px; height: 44px; }
}

.conditions-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 15px 20px;
    margin-bottom: 20px;
    background: var(--bg-cool);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}
.conditions-strip__icon { font-size: 1.9rem; line-height: 1; }
.conditions-strip__body { flex: 1; min-width: 0; }
.conditions-strip__name { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; margin: 3px 0 0; }
.conditions-strip__note { color: var(--text-secondary); font-size: 0.88rem; margin: 3px 0 0; }
/* Collapsed keeps the icon + current name (still glanceable while scrolling past)
   and drops only the note/detail: never fully hidden, since the strip re-expands
   itself the moment its own fingerprint changes (see dismissibleConditions). */
.conditions-strip--collapsed { padding-top: 10px; padding-bottom: 10px; }
.conditions-strip--collapsed .conditions-strip__icon { font-size: 1.4rem; }
.conditions-strip__collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    align-self: flex-start;
}
.conditions-strip__collapse-btn:focus-visible { color: var(--text-primary); border-color: var(--border-color); }
@media (hover: hover) {
    .conditions-strip__collapse-btn:hover { color: var(--text-primary); border-color: var(--border-color); }
}
@media (pointer: coarse) {
    .conditions-strip__collapse-btn { width: 44px; height: 44px; }
}

/* The Now / Soon / Recently stack. On wide screens the same three sections become a
   quiet orbit around the player's current work; below the wide line they retain the
   straightforward reading order that is faster on a phone and tablet. */
.command-column { display: grid; gap: 18px; align-content: start; }

@media (min-width: 1280px) {
    .command-grid {
        position: relative;
        grid-template-columns: minmax(15rem, .8fr) minmax(24rem, 1.35fr) minmax(15rem, .8fr);
        grid-template-areas: "soon now glance" "recently now glance";
        align-items: start;
        gap: 22px;
    }
    .command-grid::before {
        content: '';
        position: absolute;
        z-index: 0;
        inset: 7% 23% 7% 23%;
        border: 1px solid color-mix(in srgb, var(--color-primary) 18%, transparent);
        border-radius: 50%;
        pointer-events: none;
    }
    .command-column { display: contents; }
    .command-column > section { position: relative; z-index: 1; }
    .command-recently { grid-area: now; align-self: center; }
    .command-column > section:nth-child(2) { grid-area: soon; }
    .command-column > section:nth-child(3) { grid-area: recently; }
    .command-glance { grid-area: glance; position: relative; z-index: 1; align-self: center; }
}

.attention-deck { display: grid; gap: 12px; }
/* Deck/panel empty copy. Not .empty-state: that's the full-page treatment with
   60px of padding, far too tall for a card slot. */
.deck-empty { color: var(--text-secondary); font-size: 0.88rem; margin: 2px 0; }
/* An empty state that offers a way out rather than only reporting emptiness. */
.deck-empty--actionable { display: grid; gap: 10px; }
.deck-empty--actionable p { margin: 0; }

.glance-block { display: grid; gap: 12px; margin-top: 16px; }

/* Shared event banner: the counter is a fact, while the colour is only a supporting
   cue. The text and progressbar carry the meaning when colour is unavailable. */
.void-surge-card { display: grid; gap: 10px; margin-bottom: 20px; }
.void-surge-card__head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.void-surge-card__description { color: var(--text-secondary); margin: 0; max-width: 72ch; }
.void-surge-card__meter { height: 10px; overflow: hidden; background: var(--bg-cool); border: 1px solid var(--border-subtle); border-radius: 999px; }
.void-surge-card__meter-fill { display: block; height: 100%; background: var(--color-primary); border-radius: inherit; }
.void-surge-card__progress { display: flex; justify-content: space-between; gap: 12px; color: var(--text-secondary); font-size: .82rem; }
.void-surge-card__progress strong { color: var(--text-primary); font-family: var(--font-mono); }
.void-surge-card__reward { margin: 0; color: var(--color-reward); font-weight: 700; }
.void-surge-card__reward .hint { font-weight: 400; }
.void-surge-card--complete { border-color: color-mix(in srgb, var(--color-primary) 45%, var(--border-color)); }

/* Void Flux consequence markers. Each pairs a glyph with its label, so the
   up/down/sealed distinction never rests on colour alone. */
.flux-effect { font-weight: 700; white-space: nowrap; }
.flux-effect--up { color: var(--color-reward); }
.flux-effect--down { color: var(--color-warning); }
.flux-effect--sealed { color: var(--text-muted); }

/* "Recently": domain-derived activity entries. */
.activity-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.activity-entry {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.89rem;
}
.activity-entry:last-child { border-bottom: 0; }
.activity-entry__icon { flex-shrink: 0; }
.activity-entry__verb {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.activity-entry__text { flex: 1 1 14rem; min-width: 0; }
.activity-entry__when { color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; }
/* Outcome tone. The verb is always a word ("Extracted" / "Failed"); this only tints the
   word it already says, so the distinction survives colour being unavailable. */
.activity-entry__verb--good { color: var(--color-reward); }
.activity-entry__verb--bad { color: var(--color-warning); }

/* Command Post only. The Recently panel sits in a 276px orbit column (and full-width
   but narrow on a phone), where the default flex row wraps icon, verb, text and time
   onto four lines each: measured at 143px per entry, 913px for six. A fixed two-row
   grid puts the metadata on one line and the text on the next at every width, so an
   entry costs what it should. `_activity_log.html` is shared with the Command Log
   page, which has the full page width and keeps the default. minmax(0, 1fr), never a
   bare 1fr: a long entry would otherwise push its min-content out of the column. */
[data-surface="command-post"] .activity-entry {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-areas:
        "icon verb when"
        "text text text";
    align-items: baseline;
    gap: 2px 8px;
    padding: 8px 4px;
}
[data-surface="command-post"] .activity-entry__icon { grid-area: icon; }
[data-surface="command-post"] .activity-entry__verb { grid-area: verb; }
[data-surface="command-post"] .activity-entry__when { grid-area: when; justify-self: end; }
[data-surface="command-post"] .activity-entry__text { grid-area: text; flex: none; }
.command-glance__summary { cursor: pointer; list-style: none; }
.command-glance__summary::-webkit-details-marker { display: none; }
.command-glance__summary::after {
    content: '⌄';
    margin-left: auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}
.command-glance[open] .command-glance__summary::after { content: '⌃'; }
.command-glance__toggle { display: none; color: var(--text-muted); font-size: 0.78rem; }
@media (min-width: 768px) {
    .command-glance__summary { cursor: default; }
    .command-glance__summary::after { display: none; }
}
@media (width < 768px) {
    .command-glance__toggle { display: inline; margin-left: auto; }
    /* The Recently panel, not `.command-recently`: that class is on the *Now* panel
       and contains no .activity-entry, so this rule was a no-op for two releases. */
    .command-activity .activity-entry:nth-child(n + 4) { display: none; }
}
.attention-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 15px 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}
a.attention-card { color: inherit; text-decoration: none; transition: border-color var(--dur) var(--ease); }
@media (hover: hover) { a.attention-card:hover { border-color: var(--color-primary); text-decoration: none; } }
.attention-card--ready {
    border-color: color-mix(in srgb, var(--color-reward) 55%, var(--border-color));
    box-shadow: var(--glow-reward);
}
.attention-card--faction {
    border-left: 4px solid var(--faction-accent, var(--border-color));
}
/* flex-direction is explicit because this class is also used on a <label>, and the
   global `label` rule sets flex-direction:column; a class beats a type selector on
   display but the column direction still won, stacking the Mutation Workshop's
   "Recolour the overlay" checkbox above its own text. A no-op on div/span users. */
.inline-row { display: flex; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.attention-card__icon {
    font-size: 1.5rem;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    flex-shrink: 0;
}
.attention-card__body { flex: 1 1 12rem; min-width: 0; }
.attention-card__title { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; margin: 0; }
/* chrome.css also styles .attention-card__meta (the notification Attention cards) as a mono,
   flex-wrapped chip row. Left alone here, it turned every sentence on these cards into
   separate flex items ("Streak 0 days · longest" then "0" on its own line). The body
   selector outranks it, so a Command Post card reads as a flowing sentence again. */
.attention-card__body .attention-card__meta { display: block; gap: 0; font-family: inherit; color: var(--text-secondary); font-size: 0.85rem; margin: 3px 0 0; }
/* The milestone track makes this card tall, so its icon sits with the title, not mid-card. */
#daily-bonus-card .attention-card__icon { align-self: flex-start; }
.attention-card__meta .mono { color: var(--text-primary); }
.attention-card__action { flex-shrink: 0; }

/* Barracks capacity: collapsed by default (see _barracks_capacity.html). The summary
   button states every figure that matters, so it reads correctly closed; #barracks-
   capacity-body (a plain .stat-readout-row) only adds the purchase forms and the squad
   link. */
.barracks-capacity { margin: 16px 0; }
.barracks-capacity__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    background: var(--bg-cool);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}
@media (hover: hover) { .barracks-capacity__summary:hover { border-color: var(--color-primary); } }
.barracks-capacity__summary-item { display: flex; align-items: baseline; gap: 6px; font-size: 0.88rem; color: var(--text-secondary); }
.barracks-capacity__summary-item .mono { color: var(--text-primary); font-weight: 700; }
.barracks-capacity__summary-item--warn { color: var(--color-warning); }
.barracks-capacity__chevron { margin-left: auto; color: var(--text-muted); }
#barracks-capacity-body { margin-top: 10px; }

.stat-readout-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.stat-readout {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
}
.stat-readout__value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-top: 5px;
    font-variant-numeric: tabular-nums;
}
.stat-readout__value small { color: var(--text-muted); font-size: 0.72rem; font-weight: 400; }
.stat-readout__value--warn { color: var(--color-warning); }

.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.starter-cta {
    position: relative;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid color-mix(in srgb, var(--color-reward) 45%, var(--border-color));
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--glow-reward);
    margin-bottom: 20px;
}
.starter-cta h2 { margin: 0 0 6px; }
.starter-cta p { color: var(--text-secondary); margin: 0 0 14px; }

