/* Week 8 prediction and structure components. Colors stay in tokens.css. */

.score-row {
  display: grid; grid-template-columns: minmax(92px, 150px) 1fr 58px;
  gap: 9px; align-items: center; margin: 7px 0;
}
.score-row .word { font: 12.5px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-secondary); }
.score-row .track { height: 10px; background: var(--grid); border-radius: 7px; overflow: hidden; position: relative; }
.score-row .track .pos { position: absolute; left: 50%; top: 0; bottom: 0; background: var(--series-1); }
.score-row .track .neg { position: absolute; right: 50%; top: 0; bottom: 0; background: var(--series-2); }
.score-row .number { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-secondary); }

.sentiment-meter { position: relative; height: 20px; border-radius: 9px; background: var(--grid); overflow: hidden; margin: 10px 0 4px; }
.sentiment-meter .mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--baseline); z-index: 2; }
.sentiment-meter .fill { position: absolute; top: 0; bottom: 0; background: var(--series-1); }
.sentiment-meter .fill.neg { background: var(--series-2); }

.feature-list { display: grid; gap: 7px; }
.feature {
  display: grid; grid-template-columns: 120px 1fr 72px;
  gap: 9px; align-items: center; font-size: 12.5px;
}
.feature .name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-secondary); }
.feature .track { height: 10px; background: var(--grid); border-radius: 6px; position: relative; overflow: hidden; }
.feature .track::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--baseline); }
.feature .bar { position: absolute; top: 0; bottom: 0; }
.feature .bar.pos { left: 50%; background: var(--series-1); }
.feature .bar.neg { right: 50%; background: var(--series-2); }
.feature .value { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-secondary); }

.pipeline {
  display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 8px; align-items: stretch; margin-top: 10px;
}
.pipeline-step {
  border: 1px solid var(--grid); border-radius: 8px; padding: 9px;
  background: var(--page); min-height: 78px;
}
.pipeline-step.active { border-color: var(--accent); background: var(--accent-wash); }
.pipeline-step .k { color: var(--text-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.pipeline-step .v { margin-top: 5px; color: var(--text-primary); font-size: 12.5px; line-height: 1.35; }
.pipeline-arrow { display: none; }

.token-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.token-chip {
  border: 1px solid var(--grid); border-radius: 6px; padding: 5px 7px;
  background: var(--page); color: var(--text-secondary);
  font: 12.5px/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  position: relative;
}
.token-chip.target { border-color: var(--accent); background: var(--accent-wash); color: var(--text-primary); font-weight: 600; }
.token-chip.person { border-color: var(--series-1); background: var(--series-1-wash); color: var(--text-primary); }
.token-chip.org { border-color: var(--series-2); background: var(--series-2-wash); color: var(--text-primary); }
.token-chip.place { border-color: var(--accent); background: var(--accent-wash); color: var(--text-primary); }
.token-chip.date { border-color: var(--baseline); background: var(--grid); color: var(--text-primary); }
.token-chip .tag { display: block; margin-top: 3px; font: 9.5px/1.1 system-ui, sans-serif; color: var(--text-muted); text-align: center; }

.context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.context-card { border: 1px solid var(--grid); border-radius: 9px; padding: 11px; background: var(--page); }
.context-card.active { border-color: var(--accent); background: var(--accent-wash); }
.context-card h3 { margin: 0 0 7px; font-size: 13px; color: var(--text-primary); }
.vector-readout { font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-secondary); }
.attn-list { display: grid; grid-template-columns: 90px 1fr 42px; gap: 7px; align-items: center; margin: 5px 0; }
.attn-list .track { height: 8px; background: var(--grid); border-radius: 5px; overflow: hidden; }
.attn-list .track span { display: block; height: 100%; background: var(--series-1); }

.ner-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
.ner-table th, .ner-table td { padding: 6px 8px; border-bottom: 1px solid var(--grid); text-align: left; }
.ner-table th { color: var(--text-muted); font-weight: 600; }
.ner-table td { color: var(--text-secondary); }

svg.entity-net { width: 100%; height: 390px; display: block; }
.entity-edge { stroke: var(--baseline); stroke-width: 1.5; opacity: 0.75; }
.entity-edge.strong { stroke-width: 4; }
.entity-node { stroke: var(--surface-1); stroke-width: 2; }
.entity-node.person { fill: var(--series-1); }
.entity-node.org { fill: var(--series-2); }
.entity-node.place { fill: var(--accent); }
.entity-label { fill: var(--text-secondary); font-size: 11.5px; font-weight: 600; }

.doc-list { display: grid; gap: 7px; }
.doc-check {
  display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start;
  border: 1px solid var(--grid); border-radius: 7px; padding: 8px; background: var(--page);
  color: var(--text-secondary); font-size: 12.5px; line-height: 1.4;
}
.doc-check input { margin-top: 3px; accent-color: var(--accent); }

.arc { display: grid; gap: 7px; grid-template-columns: repeat(8, minmax(80px, 1fr)); margin: 10px 0 14px; }
.arc button {
  min-height: 72px; padding: 7px; font-size: 11.5px; line-height: 1.25;
  border-color: var(--grid); background: var(--page);
}
.arc button.on { border-color: var(--accent); background: var(--accent-wash); color: var(--text-primary); }
.arc-detail { border: 1px solid var(--grid); border-radius: 9px; background: var(--page); padding: 11px 12px; }
.arc-detail h3 { margin: 0 0 5px; font-size: 14px; }
.arc-detail p { margin: 3px 0; color: var(--text-secondary); font-size: 12.5px; line-height: 1.45; }
.next-token-list { display: grid; gap: 5px; margin-top: 8px; }
.next-token { display: grid; grid-template-columns: 85px 1fr 46px; gap: 8px; align-items: center; }
.next-token .track { height: 8px; background: var(--grid); border-radius: 5px; overflow: hidden; }
.next-token .track span { display: block; height: 100%; background: var(--series-1); }

@media (max-width: 760px) {
  .pipeline { grid-template-columns: 1fr; }
  .context-grid { grid-template-columns: 1fr; }
  .arc { grid-template-columns: repeat(2, 1fr); }
}

.arc-field { color: var(--text-muted); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 6px; }
