/* The dark "console" dashboard, shared by the Security Check-up, the
   Inheritance Plan and the Executor Kit.
   The console is a navy instrument panel in both light and dark mode, like the
   navy bands elsewhere, with a severity scale that only appears here. */

.sc-console {
  --c-bg: #08111f;
  --c-panel: #0d1a2e;
  --c-panel-2: #11213a;
  --c-line: #1d2f4c;
  --c-grid: #22365a;
  --c-text: #e8ecf1;
  --c-muted: #8d9bb3;
  --t-critical: #f27a9b;
  --t-high: #f0a35e;
  --t-medium: #d9c27a;
  --t-low: #8fb8d8;
  --t-ok: #79c9a2;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(242, 122, 155, 0.07), transparent 60%),
    linear-gradient(180deg, #0b1628, var(--c-bg));
  color: var(--c-text);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  line-height: 1.5;
  container-type: inline-size;
}
.sc-console .tone-critical { --tone: var(--t-critical); }
.sc-console .tone-high { --tone: var(--t-high); }
.sc-console .tone-medium { --tone: var(--t-medium); }
.sc-console .tone-low { --tone: var(--t-low); }
.sc-console .tone-ok { --tone: var(--t-ok); }

.sc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 2px 4px 14px; border-bottom: 1px solid var(--c-line); margin-bottom: 14px; }
.sc-title { margin: 0; font: 650 16px/1.3 var(--body); color: #fff; display: flex; align-items: center; gap: 9px; }
.sc-live { width: 8px; height: 8px; border-radius: 50%; background: var(--t-ok); box-shadow: 0 0 0 4px rgba(121, 201, 162, 0.16); }
.sc-meta { margin: 4px 0 0; color: var(--c-muted); font-size: 13px; }
.sc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-chips span { font: 600 12px/1 var(--body); color: var(--c-muted); border: 1px solid var(--c-line); padding: 6px 8px; border-radius: var(--radius-sm); background: var(--c-panel); }

.sc-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 10px; }
.sc-tile { position: relative; background: var(--c-panel); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 12px 12px 11px; overflow: hidden; }
.sc-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tone); }
.sc-tile-label { display: block; font: 600 12px/1.3 var(--body); color: var(--c-muted); }
.sc-tile b { display: block; font: 400 30px/1.1 var(--display); color: #fff; margin: 6px 0 2px; }
.sc-tile b small { font: 500 13px var(--body); color: var(--c-muted); margin-left: 2px; }
.sc-tile-sub { font-size: 12.5px; color: var(--tone); font-weight: 600; }

.sc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.sc-grid-matrix { grid-template-columns: 1.1fr 0.9fr; }
.sc-panel { background: var(--c-panel); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 14px 16px 16px; margin-bottom: 10px; min-width: 0; }
.sc-grid-2 .sc-panel { margin-bottom: 0; }
.sc-panel h3 { font: 650 13px/1.3 var(--body); color: var(--c-text); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.sc-panel h3::before { content: ""; width: 6px; height: 6px; border: 1.5px solid var(--t-critical); border-radius: 1px; }
.sc-empty { color: var(--c-muted); margin: 6px 0; }

.sc-score-row { display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 8px; }
.sc-ring { width: 100%; max-width: 190px; }
.sc-ticks line { stroke: var(--c-grid); stroke-width: 1.4; }
.sc-ring-bg { fill: none; stroke: var(--c-panel-2); stroke-width: 12; }
.sc-ring-fg { fill: none; stroke: var(--tone); stroke-width: 12; stroke-linecap: butt; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tone) 50%, transparent)); }
.sc-ring-num { font: 400 40px var(--display); fill: #fff; text-anchor: middle; }
.sc-ring-sub { font: 500 10.5px var(--body); fill: var(--c-muted); text-anchor: middle; }
.sc-radar { width: 100%; overflow: visible; }
.sc-grid { fill: none; stroke: var(--c-grid); stroke-width: 1; }
.sc-radar-shape { fill: rgba(242, 122, 155, 0.16); stroke: var(--t-critical); stroke-width: 1.6; }
.sc-radar-dot { fill: var(--tone); stroke: var(--c-panel); stroke-width: 1.5; }
.sc-radar-label { font: 600 10.5px var(--body); fill: var(--c-muted); }
.sc-radar-label tspan { fill: #fff; }

.sc-exposure { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 14px; align-items: center; }
.sc-meter-box { text-align: center; }
.sc-meter { width: 100%; max-width: 220px; }
.sc-seg { fill: none; stroke: var(--tone); stroke-width: 12; opacity: 0.35; }
.sc-meter .sc-seg.tone-critical { stroke: var(--t-critical); }
.sc-meter.tone-ok .sc-seg.tone-ok, .sc-meter.tone-medium .sc-seg.tone-medium, .sc-meter.tone-high .sc-seg.tone-high, .sc-meter.tone-critical .sc-seg.tone-critical { opacity: 1; }
.sc-needle { stroke: #fff; stroke-width: 2.5; stroke-linecap: round; }
.sc-hub { fill: #fff; }
.sc-meter-box p { margin: 2px 0 0; }
.sc-meter-box b { display: block; font: 400 26px/1.1 var(--display); color: var(--tone); }
.sc-meter-box span { font-size: 12.5px; color: var(--c-muted); }

.sc-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.sc-bars li { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) 26px; align-items: center; gap: 10px; font-size: 12.5px; }
.sc-bar-label { color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-bar { height: 8px; background: var(--c-panel-2); border-radius: 1px; overflow: hidden; }
.sc-bar i { display: block; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 55%, transparent), var(--tone)); }
.sc-bars b { font: 650 12.5px var(--body); color: #fff; text-align: right; }
.sc-area-bars { gap: 12px; margin-top: 6px; }
.sc-area-bars li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 30px; font-size: 13.5px; }
.sc-area-bars .sc-bar { height: 12px; }

.sc-pg { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 4px; align-items: stretch; }
.sc-pg-col { font: 600 11px/1.2 var(--body); color: var(--c-muted); text-align: center; align-self: end; padding-bottom: 2px; }
.sc-pg-row { font: 600 11px/1.2 var(--body); color: var(--c-muted); writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.sc-pg-cell { position: relative; min-height: 64px; border-radius: 2px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.sc-pg-cell em { font: 700 10px var(--body); font-style: normal; color: var(--t-critical); text-transform: uppercase; letter-spacing: 0.06em; }
.sc-pr-first { background: rgba(242, 122, 155, 0.24); }
.sc-pr-soon { background: rgba(240, 163, 94, 0.14); }
.sc-pr-watch { background: rgba(143, 184, 216, 0.06); }
.sc-pg-chip { display: flex; gap: 5px; align-items: baseline; font-size: 11.5px; line-height: 1.25; color: var(--c-text); }
.sc-pg-chip b { flex: none; display: inline-grid; place-items: center; min-width: 17px; height: 17px; border-radius: 50%; background: var(--tone); color: #08111f; font: 700 10px var(--body); }
.sc-pg-key { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; margin: 10px 0 0; color: var(--c-muted); font-size: 12px; }
.sc-pg-key span { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: -8px; }
.sc-routes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.sc-routes li { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--c-line); font-size: 13px; }
.sc-route-state { font: 700 10.5px/1 var(--body); text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 0; text-align: center; border-radius: 2px; }
.is-open .sc-route-state { color: var(--t-critical); background: rgba(242, 122, 155, 0.14); }
.is-blocked .sc-route-state { color: var(--t-ok); background: rgba(121, 201, 162, 0.12); }
.is-blocked .sc-route-title { color: var(--c-muted); }
.sc-route-steps { display: flex; gap: 3px; }
.sc-route-steps i { width: 14px; height: 6px; border-radius: 1px; }
.sc-route-steps i.o { background: var(--t-critical); }
.sc-route-steps i.x { background: var(--t-ok); }

.sc-curve { width: 100%; height: 170px; display: block; }
.sc-tick { font: 500 10px var(--body); fill: var(--c-muted); }
.sc-curve-area { fill: rgba(121, 201, 162, 0.12); }
.sc-curve-line { fill: none; stroke: var(--t-ok); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sc-step-dot { fill: var(--t-ok); }

.sc-table-wrap { overflow-x: auto; }
.sc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sc-table th { text-align: left; font: 650 11.5px var(--body); color: var(--c-muted); padding: 0 10px 8px 0; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.sc-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.sc-table strong { color: #fff; font-weight: 650; }
.sc-why { display: block; color: var(--c-muted); margin-top: 3px; max-width: 46ch; }
.sc-fix { color: var(--c-text); min-width: 220px; }
.sc-num { color: var(--c-muted); font-weight: 650; }
.sc-area { color: var(--c-muted); white-space: nowrap; }
.sc-li { white-space: nowrap; color: var(--c-muted); }
.sc-tag { display: inline-block; font: 700 11px/1 var(--body); color: var(--tone); border: 1px solid color-mix(in srgb, var(--tone) 60%, transparent); background: color-mix(in srgb, var(--tone) 12%, transparent); padding: 4px 6px; border-radius: 2px; white-space: nowrap; }

@container (max-width: 900px) {
  .sc-tiles { grid-template-columns: repeat(3, 1fr); }
  .sc-grid-2, .sc-grid-matrix { grid-template-columns: 1fr; }
  .sc-grid-2 .sc-panel { margin-bottom: 0; }
  .sc-routes { grid-template-columns: 1fr; }
}
@container (max-width: 520px) {
  .sc-tiles { grid-template-columns: repeat(2, 1fr); }
  .sc-score-row, .sc-exposure { grid-template-columns: 1fr; justify-items: center; }
  .sc-exposure .sc-bars { width: 100%; }
  .sc-table .sc-area, .sc-table th:nth-child(4) { display: none; }
  .sc-routes { grid-template-columns: 1fr; }
  .sc-pg-chip { font-size: 10.5px; }
}

/* Printed: one dark A4 page */
@media print {
  .sc-console { container-type: normal; box-shadow: none; padding: 4mm; font-size: 8pt; break-after: page; border-radius: 1mm; }
  .sc-console .sc-tiles { grid-template-columns: repeat(6, 1fr); gap: 2mm; }
  .sc-console .sc-tile b { font-size: 16pt; }
  .sc-console .sc-grid-2 { grid-template-columns: 1fr 1fr; gap: 2mm; margin-bottom: 2mm; }
  .sc-console .sc-grid-matrix { grid-template-columns: 1fr; }
  .sc-console .sc-grid-matrix > .sc-panel:last-child { display: none; }
  .sc-console .sc-pg-cell { min-height: 9mm; }
  .sc-console .sc-pg-key { display: none; }
  .sc-console .sc-tile { padding: 2mm; }
  .sc-console .sc-panel { padding: 3mm; margin-bottom: 2mm; }
  .sc-console .sc-score-row { grid-template-columns: 0.8fr 1.2fr; }
  .sc-console .sc-exposure { grid-template-columns: 0.85fr 1.15fr; }
  .sc-console .sc-curve { height: 32mm; }
  .sc-console .sc-routes { grid-template-columns: 1fr 1fr; gap: 0 4mm; }
  .sc-console .sc-routes li { padding: 1mm 0; font-size: 7pt; grid-template-columns: 11mm minmax(0, 1fr) auto; gap: 2mm; }
  .sc-console .sc-route-state { font-size: 6pt; padding: 0.8mm 0; }
  .sc-console .sc-route-steps i { width: 2.6mm; height: 1.2mm; }
  .sc-console .sc-pg-cell { min-height: 12mm; padding: 1mm; gap: 0.6mm; }
  .sc-console .sc-pg-chip { font-size: 6.2pt; }
  .sc-console .sc-pg-chip b { min-width: 3.2mm; height: 3.2mm; font-size: 5.5pt; }
  .sc-console .sc-pg-col, .sc-console .sc-pg-row, .sc-console .sc-pg-key { font-size: 6.5pt; }
  .sc-console .kc-values .sc-bar-label, .sc-console .kit-look .sc-bar-label { white-space: normal; overflow: visible; line-height: 1.2; }
  .sc-console .sc-register, .sc-console .sc-curve-panel { display: none; }
}

/* ---------- Executor Kit dashboard ---------- */
.kc-progress { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 14px; align-items: center; }
.kc-pipe { display: grid; gap: 7px; font-size: 12.5px; min-width: 0; }
.kc-pipe-head, .kc-pipe-row { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 4px; align-items: center; }
.kc-pipe-head span { font: 600 10.5px/1.2 var(--body); color: var(--c-muted); text-align: center; }
.kc-pipe-name { color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-pipe-row i { height: 10px; border-radius: 1px; background: var(--c-panel-2); }
.kc-pipe-row i.is-done { background: var(--tone); box-shadow: 0 0 6px color-mix(in srgb, var(--tone) 40%, transparent); }
.kc-pipe-row i.is-locked { background: repeating-linear-gradient(135deg, var(--t-critical) 0 3px, transparent 3px 6px); opacity: 0.7; }
.kc-values .sc-bar-label small { display: block; color: var(--c-muted); font-size: 11px; }
.kc-total { max-width: none; display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--c-line); color: var(--c-muted); font-size: 13px; }
.kc-total b { font: 400 24px var(--display); color: #fff; }
.kc-next { margin: 0; padding: 0; list-style: none; counter-reset: kc; display: grid; gap: 2px; }
.kc-next li { counter-increment: kc; display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--c-line); font-size: 13.5px; }
.kc-next li:last-child { border-bottom: 0; }
.kc-next li::before { content: counter(kc); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--t-critical); color: var(--t-critical); font: 700 11px var(--body); }
.kc-next a { color: var(--c-text); text-decoration: none; }
.kc-next a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--t-critical); }
@container (max-width: 520px) {
  .kc-progress { grid-template-columns: 1fr; justify-items: center; }
  .kc-pipe { width: 100%; }
}
@media print {
  .sc-console .kc-progress { grid-template-columns: 0.42fr 1.58fr; gap: 3mm; }
  .sc-console .kc-pipe-head, .sc-console .kc-pipe-row { grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 1mm; }
  .sc-console .kc-pipe-head span { font-size: 6pt; }
  .sc-console .kc-pipe-name { white-space: normal; line-height: 1.15; }
  .sc-console .kc-next li { padding: 1.5mm 0; }
}
