/* The Tech Briefing - network console (homepage dashboard layer)
   Sits on the existing systems-console identity: near-black ground,
   thin borders, monospace metadata, restrained cyan-green accent. */

.console {
  padding: 44px 0 60px;
  border-bottom: 1px solid var(--line);
}

.console-sub {
  max-width: 72ch;
  margin: -8px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

/* ---------- filter bar ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 20px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(11, 15, 18, .6);
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.filter-label {
  color: #536267;
  font: 800 .56rem ui-monospace, monospace;
  letter-spacing: .16em;
  margin-right: 2px;
}
.f-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font: 700 .58rem ui-monospace, monospace;
  letter-spacing: .1em;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.f-chip:hover { border-color: var(--accent); color: var(--accent); }
.f-chip.is-active {
  border-color: var(--accent);
  color: #04100c;
  background: var(--accent);
}
.filter-readout {
  margin-left: auto;
  color: #66777b;
  font: 700 .58rem ui-monospace, monospace;
  letter-spacing: .12em;
}

/* ---------- panels ---------- */

.panel {
  position: relative;
  margin-top: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), #080b0d);
}
.panel:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  opacity: .35;
  pointer-events: none;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  color: var(--text);
  font: 800 .62rem ui-monospace, monospace;
  letter-spacing: .16em;
}
.panel-note {
  color: #5c6c71;
  font: 600 .56rem ui-monospace, monospace;
  letter-spacing: .1em;
  text-align: right;
}
.panel-foot {
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: #5c6c71;
  font: 600 .56rem/1.7 ui-monospace, monospace;
  letter-spacing: .06em;
}
.panel-foot a { color: var(--accent); }
.mini-label {
  margin: 0 0 10px;
  color: #536267;
  font: 800 .56rem ui-monospace, monospace;
  letter-spacing: .16em;
}
.detail-hint {
  margin: 0;
  color: #4c5b60;
  font: 600 .58rem/1.8 ui-monospace, monospace;
  letter-spacing: .08em;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: 14px;
}
.console-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.console-grid .panel { min-width: 0; }

/* ---------- network snapshot ---------- */

.snapshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 430px;
}
.snapshot-main {
  padding: 12px 0 10px;
}
#panel-map .mini-label {
  padding: 0 16px;
  margin-bottom: 8px;
}
#chart-landscape {
  padding-top: 0;
  padding-bottom: 6px;
}
.verify-list {
  margin-bottom: 4px;
}
#chart-landscape-status {
  padding-top: 0;
}
.snapshot-side {
  border-left: 1px solid var(--line);
  padding: 12px 0;
}
.snapshot-stats {
  margin: 0;
}
.snapshot-stats > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.snapshot-stats > div:first-child {
  border-top: 0;
}
.snapshot-stats dt {
  color: #536267;
  font: 800 .56rem ui-monospace, monospace;
  letter-spacing: .12em;
}
.snapshot-stats dd {
  margin: 0;
  color: var(--text);
  font: 700 .7rem ui-monospace, monospace;
  letter-spacing: .06em;
}

/* ---------- extracted events ---------- */

.evt-list { display: grid; }
.evt-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  align-items: start;
}
.evt-row:first-child { border-top: 0; }
.evt-flag {
  color: #5c6c71;
  font: 600 .56rem/1.7 ui-monospace, monospace;
  letter-spacing: .08em;
}
.evt-flag b { display: block; font-weight: 800; color: var(--accent2); }
.evt-body h3 { margin: 0 0 3px; font-size: .9rem; line-height: 1.4; font-weight: 700; }
.evt-body h3 a:hover { color: var(--accent); }
.evt-meta {
  margin: 0;
  color: #5c6c71;
  font: 600 .56rem ui-monospace, monospace;
  letter-spacing: .1em;
}

.info-list { display: grid; max-height: 520px; overflow: auto; }
.info-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  align-items: start;
}
.info-row.is-hidden { display: none; }
.info-row:first-child { border-top: 0; }
.info-flag {
  color: #5c6c71;
  font: 600 .56rem/1.7 ui-monospace, monospace;
  letter-spacing: .08em;
}
.info-flag b { display: block; font-weight: 800; color: var(--accent2); }
.info-body h3 { margin: 0 0 3px; font-size: .9rem; line-height: 1.4; font-weight: 700; }
.info-body h3 a:hover { color: var(--accent); }
.info-meta {
  margin: 0;
  color: #5c6c71;
  font: 600 .56rem ui-monospace, monospace;
  letter-spacing: .1em;
}
.info-filter-bar { margin-top: 0; border-top: 0; border-left: 0; border-right: 0; }

/* ---------- intelligence page ---------- */

.intel-list {
  margin: 0;
  padding: 12px 16px 16px;
  list-style: none;
  display: grid;
  gap: 8px;
}
.intel-list li {
  font: 600 .72rem/1.5 ui-monospace, monospace;
  color: var(--muted);
}
.intel-tag {
  color: #536267;
  font: 700 .54rem ui-monospace, monospace;
  letter-spacing: .1em;
}
.intel-events { display: grid; }
.intel-event {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.intel-event:first-child { border-top: 0; }
.intel-event header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font: 800 .58rem ui-monospace, monospace;
  letter-spacing: .12em;
}
.intel-type { color: var(--accent2); }
.intel-facts {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--text);
  font-size: .88rem;
  line-height: 1.5;
}
.intel-meta {
  margin: 0;
  display: grid;
  gap: 8px;
}
.intel-meta dt {
  color: #536267;
  font: 800 .54rem ui-monospace, monospace;
  letter-spacing: .14em;
}
.intel-meta dd { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }

/* ---------- signals panel ---------- */

.sig-list { display: grid; }
.sig-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  align-items: start;
}
.sig-row:first-child { border-top: 0; }
.sig-row:hover { background: rgba(97, 246, 197, .025); }
.sig-row.is-hidden { display: none; }
.sig-flag {
  color: #5c6c71;
  font: 600 .56rem/1.7 ui-monospace, monospace;
  letter-spacing: .08em;
}
.sig-flag b { display: block; font-weight: 800; }
.sig-flag .flag-verified { color: var(--accent); }
.sig-flag .flag-reported { color: var(--accent2); }
.sig-body h3 {
  margin: 0 0 3px;
  font-size: .94rem;
  line-height: 1.4;
  font-weight: 700;
}
.sig-body h3 a:hover { color: var(--accent); }
.sig-topics {
  margin: 0;
  color: #5c6c71;
  font: 600 .56rem ui-monospace, monospace;
  letter-spacing: .1em;
}

/* ---------- system status ---------- */

.stat-list { margin: 0; }
.stat-list > div {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.stat-list > div:first-child { border-top: 0; }
.stat-list dt {
  color: #536267;
  font: 800 .56rem ui-monospace, monospace;
  letter-spacing: .12em;
}
.stat-list dd {
  margin: 0;
  color: var(--text);
  font: 600 .66rem ui-monospace, monospace;
  letter-spacing: .06em;
}
.stat-list .ok { color: var(--accent); }
#panel-status .bar-chart { margin: 4px 0 12px; }
#panel-status .mini-label { padding: 12px 16px 0; }

/* ---------- bar charts ---------- */

.bar-chart { display: grid; padding: 8px 0 10px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 132px) minmax(0, 1fr) 36px;
  gap: 12px;
  align-items: center;
  padding: 7px 16px;
  cursor: pointer;
}
.bar-row:hover { background: rgba(97, 246, 197, .03); }
.bar-row:hover .bar-label { color: var(--accent); }
.bar-row.is-active .bar-label { color: var(--accent); }
.bar-row.is-active .bar-fill { background: var(--accent); }
.bar-label {
  color: var(--muted);
  font: 700 .6rem ui-monospace, monospace;
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-label a:hover { color: var(--accent); }
.bar-track {
  height: 9px;
  border: 1px solid var(--line);
  background: #070a0c;
  position: relative;
}
.bar-fill {
  position: absolute;
  inset: 1px auto 1px 1px;
  width: 0;
  background: #2c8f74;
  transition: width .45s ease;
}
.bar-value {
  color: var(--text);
  font: 800 .62rem ui-monospace, monospace;
  text-align: right;
}

/* ---------- trend / data states ---------- */

.day-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 130px;
  padding: 16px 16px 12px;
}
.day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  min-width: 0;
}
.day-fill { display: block; background: #2c8f74; min-height: 3px; }
.day-label {
  color: #536267;
  font: 600 .5rem ui-monospace, monospace;
  letter-spacing: .04em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}
.data-state {
  margin: 14px 16px;
  padding: 16px;
  border: 1px dashed var(--line);
}
.data-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font: 800 .6rem ui-monospace, monospace;
  letter-spacing: .14em;
}
.data-state p { margin: 0 0 10px; color: var(--muted); font-size: .86rem; }
.data-state ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #66777b;
  font: 600 .6rem/1.9 ui-monospace, monospace;
}
.data-state b { color: var(--text); }

/* ---------- network ---------- */

.net-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 440px;
}
.net-stage { position: relative; min-width: 0; min-height: 440px; }
#net-canvas {
  display: block;
  width: 100%;
  height: 440px;
  min-width: 280px;
  min-height: 320px;
  cursor: crosshair;
}
.net-legend {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 14px;
  color: #5c6c71;
  font: 700 .54rem ui-monospace, monospace;
  letter-spacing: .1em;
  pointer-events: none;
}
.net-legend .lg-topic { color: var(--accent); }
.net-legend .lg-entity { color: #a9b8bc; }
.net-legend .lg-briefing { color: var(--accent2); }
.net-detail {
  border-left: 1px solid var(--line);
  padding: 14px 16px;
  min-width: 0;
}
.net-detail h3 {
  margin: 0 0 2px;
  font-size: 1rem;
  letter-spacing: .02em;
  word-break: break-word;
}
.net-detail .node-kind {
  color: var(--accent);
  font: 800 .56rem ui-monospace, monospace;
  letter-spacing: .14em;
}
.net-detail .node-status { color: #5c6c71; }
.net-detail dl { margin: 12px 0 0; display: grid; gap: 10px; }
.net-detail dt {
  color: #536267;
  font: 800 .54rem ui-monospace, monospace;
  letter-spacing: .14em;
}
.net-detail dd { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.net-detail dd a { color: var(--text); }
.net-detail dd a:hover { color: var(--accent); }
.net-detail .detail-go {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font: 800 .6rem ui-monospace, monospace;
  letter-spacing: .1em;
}
.top-links {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.top-links li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font: 600 .58rem ui-monospace, monospace;
  letter-spacing: .04em;
}
.top-links i { color: var(--accent); font-style: normal; }
.top-links b { margin-left: auto; color: #5c6c71; font-weight: 700; }

/* ---------- editorial bridge ---------- */

.console-cta {
  color: var(--accent);
  font: 800 .68rem ui-monospace, monospace;
  letter-spacing: .12em;
}
.lead-cta { margin-top: 18px; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .console-grid.three { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .console-grid,
  .console-grid.three,
  .snapshot-grid,
  .net-grid { grid-template-columns: 1fr; }
  .snapshot-side, .net-detail { border-left: 0; border-top: 1px solid var(--line); }
  #net-canvas { height: 380px; }
}

@media (max-width: 800px) {
  main { display: flex; flex-direction: column; }
  #console { display: contents; }
  .console-grid, .console-grid.three { display: contents; }
  .masthead { order: 1; }
  .console-head { order: 2; padding-top: 40px; }
  #panel-map { order: 3; }
  #panel-signals { order: 4; }
  #panel-status { order: 5; }
  #panel-topics { order: 6; }
  #panel-trend { order: 7; }
  #panel-sources { order: 8; }
  #lead { order: 9; }
  #panel-net { order: 10; margin-bottom: 0; }
  #why { order: 11; }
  #topics { order: 12; }
  #timeline { order: 13; }
  #connected { order: 14; }
  #lab { order: 15; }
  #method { order: 16; }
  .console { padding: 0; border-bottom: 0; }
  .console-head { padding-inline: 0; }
  .filter-readout { margin-left: 0; width: 100%; }
  .snapshot-main { padding-top: 10px; }
  .snapshot-side { padding-top: 10px; }
  #net-canvas { height: 340px; cursor: default; }
  .sig-row { grid-template-columns: 1fr; gap: 4px; }
  .bar-row { grid-template-columns: minmax(80px, 110px) minmax(0, 1fr) 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .ttb-marker:before { animation: none; display: none; }
  .bar-fill { transition: none; }
}
