/* YASLOGIST operator console and explainable decision brief */
.command-palette[hidden] { display: none; }
.command-palette { position: fixed; inset: 0; z-index: 10000; }
.command-palette-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 10, .82);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.command-palette-dialog {
    position: relative;
    width: min(640px, calc(100vw - 32px));
    margin: 12vh auto 0;
    padding: 20px;
    color: var(--text-primary);
    background: #0a1118;
    border: 1px solid var(--panel-border-cyan);
    border-block-start: 2px solid var(--yas-cyan);
    border-radius: 4px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .58);
}
.command-palette-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}
.command-palette h2 {
    margin-top: 3px;
    font: 650 18px var(--font-headline);
    letter-spacing: .04em;
}
.eyebrow {
    color: var(--yas-cyan);
    font: 650 9px var(--font-mono);
    letter-spacing: .13em;
}
.command-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--panel-border);
    border-radius: 3px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.command-close:hover { color: var(--text-primary); border-color: var(--panel-border-cyan); }
.command-search {
    width: 100%;
    min-height: 42px;
    padding: 11px 13px;
    border: 1px solid var(--panel-border);
    border-radius: 3px;
    outline: 0;
    background: #050a0f;
    color: var(--text-primary);
    font: 12px var(--font-mono);
}
.command-search:focus {
    border-color: var(--yas-cyan);
    box-shadow: 0 0 0 2px var(--yas-cyan-wash);
}
.command-list {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    max-height: 310px;
    overflow: auto;
    scrollbar-gutter: stable;
}
.command-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    text-align: start;
    cursor: pointer;
    font: 11px var(--font-mono);
}
.command-item:hover,
.command-item.selected {
    color: var(--text-primary);
    background: var(--yas-cyan-wash);
    border-color: var(--panel-border-cyan);
}
.command-item kbd {
    color: var(--yas-gold);
    border: 1px solid var(--panel-border-gold);
    border-radius: 2px;
    padding: 2px 6px;
    font-size: 9px;
}
.command-item:focus-visible,
.command-search:focus-visible {
    outline: 2px solid var(--yas-cyan);
    outline-offset: 1px;
}
.command-empty,
.command-hint { color: var(--text-muted); font: 9px var(--font-mono); }
.command-empty { padding: 22px 12px; text-align: center; }
.command-hint { margin-top: 14px; text-align: end; letter-spacing: .055em; }

.operator-toast {
    position: fixed;
    inset-inline-end: 18px;
    bottom: 18px;
    z-index: 10001;
    max-width: min(380px, calc(100vw - 36px));
    padding: 10px 13px;
    color: var(--text-primary);
    background: #0b1b20;
    border: 1px solid var(--panel-border-cyan);
    border-inline-start: 2px solid var(--yas-cyan);
    border-radius: 3px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .42);
    font: 10px var(--font-mono);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.operator-toast.visible { opacity: 1; transform: translateY(0); }
#live-connection-badge.offline { border-color: var(--panel-border-crimson); color: var(--yas-crimson); }

/* The brief leads with one decision, then exposes the evidence behind it. */
.smart-briefing-panel {
    margin: 0;
    padding: 15px 16px;
    border: 1px solid var(--panel-border);
    border-inline-start: 3px solid var(--yas-gold);
    border-radius: 4px;
    background: rgba(10, 16, 23, .96);
    box-shadow: none;
}
.smart-briefing-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--panel-border);
}
.smart-briefing-panel h2 {
    margin-top: 3px;
    font: 650 15px var(--font-headline);
    letter-spacing: .035em;
}
.smart-score-wrap {
    display: grid;
    min-width: 120px;
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--panel-border);
    text-align: end;
    gap: 1px;
}
.smart-score-label,
.smart-section-label {
    color: var(--text-muted);
    font: 650 8px var(--font-mono);
    letter-spacing: .11em;
}
.smart-score-wrap strong {
    color: var(--text-primary);
    font: 650 22px var(--font-mono);
    text-shadow: none;
}
#smart-risk-trend { color: var(--yas-cyan); font-size: 9px; }
#smart-risk-trend[data-level="critical"] { color: var(--yas-crimson); }
#smart-risk-trend[data-level="high"] { color: var(--yas-gold); }
.smart-briefing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.smart-signal-list,
.smart-recommendation {
    padding: 10px 12px;
    border: 1px solid var(--panel-border);
    border-radius: 3px;
    background: rgba(3, 8, 13, .30);
}
.smart-signal {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 29px;
    color: var(--text-secondary);
    font: 10px var(--font-mono);
    border-bottom: 1px solid rgba(172, 190, 204, .09);
}
.smart-signal:last-child { border-bottom: 0; }
.smart-signal-dot {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: var(--yas-green);
    box-shadow: none;
}
.smart-signal-dot.high { background: var(--yas-gold); color: var(--yas-gold); }
.smart-signal-dot.critical { background: var(--yas-crimson); color: var(--yas-crimson); }
.smart-recommendation p {
    min-height: 35px;
    margin: 7px 0 9px;
    color: var(--text-primary);
    font-size: 11px;
    line-height: 1.55;
}
.smart-confidence { color: var(--yas-cyan); font-size: 9px; }
.smart-briefing-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 9px;
    color: var(--text-muted);
    font: 8px var(--font-mono);
}
.smart-timeline {
    position: relative;
    margin-top: 8px;
    padding: 9px 12px 7px;
    border: 1px solid var(--panel-border);
    border-radius: 3px;
    background: rgba(3, 8, 13, .30);
}
.smart-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}
#smart-timeline-delta { color: var(--yas-cyan); font-size: 9px; letter-spacing: .04em; }
#smart-timeline-delta[data-direction="up"] { color: var(--yas-crimson); }
#smart-timeline-delta[data-direction="down"] { color: var(--yas-green); }
#smart-sparkline { display: block; width: 100%; height: 56px; }
.smart-recommendation .smart-confidence { display: inline-block; margin-top: 2px; }

@media (max-width: 700px) {
    .command-palette-dialog { margin-top: 7vh; padding: 15px; }
    .operator-toast { inset-inline-end: 12px; bottom: 12px; }
    .smart-briefing-grid { grid-template-columns: 1fr; }
    .smart-briefing-foot { flex-direction: column; }
    .smart-score-wrap { min-width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
    .operator-toast { transition: none; }
}

/* -------------------------------------------------------------------------
   Evidence Vector — a compact three-axis readout for the decision brief.
   The polygon is data-driven; the rings are a quiet spatial metaphor for
   triangulation, not a decorative radar sweep.
   ------------------------------------------------------------------------- */
.smart-field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
#smart-vector-state {
    color: var(--yas-cyan);
    font-size: 8px;
    letter-spacing: .08em;
}
.smart-field-body {
    display: grid;
    grid-template-columns: minmax(105px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}
.smart-orbit {
    position: relative;
    width: min(100%, 138px);
    aspect-ratio: 1;
    justify-self: center;
    border: 1px solid rgba(6, 182, 212, .16);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(6, 182, 212, .09), rgba(3, 8, 13, .18) 48%, transparent 72%);
}
.smart-orbit::before,
.smart-orbit::after {
    content: '';
    position: absolute;
    inset: 10%;
    border: 1px solid rgba(234, 179, 8, .16);
    border-radius: 50%;
    pointer-events: none;
}
.smart-orbit::after {
    inset: 34%;
    border-color: rgba(241, 245, 249, .14);
}
.smart-orbit svg { display: block; width: 100%; height: 100%; overflow: visible; }
.orbit-ring {
    fill: none;
    stroke: rgba(148, 163, 184, .18);
    stroke-width: .65;
    stroke-dasharray: 2 4;
}
.orbit-ring-outer { stroke: rgba(6, 182, 212, .34); stroke-dasharray: 1 3; }
.orbit-ring-inner { stroke: rgba(234, 179, 8, .2); }
.orbit-axis { fill: none; stroke: rgba(148, 163, 184, .12); stroke-width: .55; }
#smart-vector-shape {
    fill: rgba(6, 182, 212, .13);
    stroke: var(--yas-cyan);
    stroke-width: 1;
    stroke-linejoin: round;
    transition: points .5s var(--ease-expressive);
}
.vector-point { stroke: #05090e; stroke-width: 1.5; }
.point-cyber { fill: var(--yas-crimson); }
.point-maritime { fill: var(--yas-gold); }
.point-recency { fill: var(--yas-cyan); }
.orbit-core { fill: var(--text-primary); }
.evidence-channel {
    display: grid;
    gap: 5px;
    min-height: 42px;
    padding: 7px 0 8px;
    border-bottom: 1px solid rgba(172, 190, 204, .09);
}
.evidence-channel:last-child { border-bottom: 0; padding-bottom: 2px; }
.evidence-channel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.evidence-channel-name {
    min-width: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font: 650 9px var(--font-mono);
    letter-spacing: .045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.evidence-channel-value {
    margin-inline-start: auto;
    color: var(--text-primary);
    font-size: 10px;
}
.evidence-channel-track {
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, .12);
}
.evidence-channel-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--yas-cyan);
    box-shadow: 0 0 8px rgba(6, 182, 212, .4);
    transition: width .55s var(--ease-expressive);
}
.channel-cyber .evidence-channel-track span { background: var(--yas-crimson); box-shadow: 0 0 8px rgba(239, 68, 68, .38); }
.channel-maritime .evidence-channel-track span { background: var(--yas-gold); box-shadow: 0 0 8px rgba(234, 179, 8, .36); }
.evidence-channel-detail {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 8px;
    letter-spacing: .025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.smart-recommendation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 178px;
}
.smart-recommendation p { max-width: 48ch; }

@media (max-width: 540px) {
    .smart-field-body { grid-template-columns: 1fr; }
    .smart-orbit { width: 118px; }
    .smart-recommendation { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    #smart-vector-shape,
    .evidence-channel-track span { transition: none; }
}
