/* NaraOps 1.17.6 — interaction + visual consistency */

/* Badges are status labels, not prose. Never let a narrow flex row turn them vertical. */
.badge,
.panel-head>.badge,
.page-head>.badge,
.related-source-head>.badge,
#mappingScore,#executiveBadge,#overallStatus,#briefConfidenceBadge,#relatedMappingBadge{
  display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 auto!important;
  width:auto!important;min-width:max-content;max-width:none!important;white-space:nowrap!important;
  overflow-wrap:normal!important;word-break:normal!important;writing-mode:horizontal-tb!important;line-height:1.2
}
.panel-head>div,.page-head>div,.related-source-head>div{min-width:0}

/* Tap-friendly semantic help. */
.sem-help{cursor:pointer;touch-action:manipulation;flex:0 0 auto}
.nara-help-popover{position:fixed;z-index:12000;width:min(360px,calc(100vw - 24px));padding:16px 42px 16px 16px;background:#132130;color:#fff;border:1px solid #32495d;border-radius:14px;box-shadow:0 18px 48px rgba(7,20,32,.28);font-size:13px;line-height:1.5}
.nara-help-popover.hidden{display:none!important}.nara-help-kicker{font-size:10px;text-transform:uppercase;letter-spacing:.08em;font-weight:900;color:#a8cfb1;margin-bottom:6px}.nara-help-copy{color:#edf3f7}.nara-help-close{position:absolute;right:9px;top:7px;width:30px;height:30px;border:0;border-radius:50%;background:transparent;color:#fff;font-size:24px;line-height:1;cursor:pointer}

/* One semantic visual language for good / bad / caution across cards. */
.metric-good{--metric:#176b43;--metric-bg:#f1f9f4;--metric-line:#8fc6a5}
.metric-bad{--metric:#a53131;--metric-bg:#fff4f4;--metric-line:#d88a8a}
.metric-warn{--metric:#8a5a00;--metric-bg:#fff9eb;--metric-line:#d2aa55}
.metric-neutral{--metric:#536b7d;--metric-bg:#f7fafc;--metric-line:#b9c7d1}
.kpi.metric-good,.kpi.metric-bad,.kpi.metric-warn,
.brief-summary-strip>div.metric-good,.brief-summary-strip>div.metric-bad,.brief-summary-strip>div.metric-warn,
.history-trend-kpi.metric-good,.history-trend-kpi.metric-bad,.history-trend-kpi.metric-warn,
.example-report-metric.metric-good,.example-report-metric.metric-bad,.example-report-metric.metric-warn{
  border-left:4px solid var(--metric-line)!important;background:var(--metric-bg)!important
}
.kpi.metric-good .value,.kpi.metric-bad .value,.kpi.metric-warn .value,
.brief-summary-strip>div.metric-good strong,.brief-summary-strip>div.metric-bad strong,.brief-summary-strip>div.metric-warn strong,
.history-trend-kpi.metric-good strong,.history-trend-kpi.metric-bad strong,.history-trend-kpi.metric-warn strong,
.example-report-metric.metric-good strong,.example-report-metric.metric-bad strong,.example-report-metric.metric-warn strong,
.horizon-card.metric-good strong,.horizon-card.metric-bad strong,.horizon-card.metric-warn strong{color:var(--metric)!important}
.horizon-card.metric-good,.horizon-card.metric-bad,.horizon-card.metric-warn{background:var(--metric-bg)!important}

/* Briefs should read like a management report, not a wall of text. */
.nara-report-visuals{padding-bottom:10px!important}.report-visual-title{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:10px}.report-visual-title>div>span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.08em;font-weight:900;color:#71808e}.report-visual-title h3{margin:3px 0 0!important}.report-visual-title small{max-width:310px;color:var(--muted);font-size:10px;line-height:1.4;text-align:right}.report-visual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.report-chart-card{border:1px solid var(--line);border-top:4px solid var(--metric-line,#7d8d98);border-radius:12px;padding:12px;background:linear-gradient(180deg,var(--metric-bg,#fff),#fff)}.report-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.report-chart-head span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:900}.report-chart-head strong{display:block;font-size:14px;margin-top:2px}.report-chart-head b{color:var(--metric,#536b7d);font-size:13px;white-space:nowrap}.report-chart{width:100%;height:auto;min-height:170px;margin-top:6px;overflow:visible}.report-gridline{stroke:#dfe7ed;stroke-width:1}.report-axis{fill:#71808e;font-size:10px}.report-line{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.report-line.good{stroke:#2f7b58}.report-line.bad{stroke:#b43b3b}.report-line.neutral{stroke:#526f8a}.report-point{stroke:#fff;stroke-width:2}.report-point.good{fill:#2f7b58}.report-point.bad{fill:#b43b3b}.report-point.neutral{fill:#526f8a}.report-bar.arrivals{fill:#526f8a}.report-bar.cleared{fill:#4f8d69}.report-chart-foot{font-size:10px;color:var(--muted);margin-top:-3px}.report-chart-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:#526575;margin-top:4px}.report-chart-legend span{display:inline-flex;align-items:center;gap:5px}.report-chart-legend i{display:inline-block;width:9px;height:9px;border-radius:2px}.report-chart-legend i.arrivals{background:#526f8a}.report-chart-legend i.cleared{background:#4f8d69}

@media(max-width:700px){
  .panel-head>.badge,.page-head>.badge,.related-source-head>.badge{margin-left:6px!important;font-size:9.5px!important;padding:5px 7px!important}
  #mappingScore,#executiveBadge,#overallStatus,#briefConfidenceBadge{align-self:flex-start}
  .sem-help{width:30px!important;height:30px!important;line-height:28px!important;font-size:14px!important}
  .nara-help-popover{left:12px!important;right:12px!important;top:auto!important;bottom:82px!important;width:auto!important;border-radius:16px}
  .report-visual-title{align-items:flex-start;flex-direction:column}.report-visual-title small{text-align:left;max-width:none}
  .report-visual-grid{grid-template-columns:1fr}.report-chart-card{padding:11px}.report-chart{min-height:160px}
}

@media(max-width:430px){
  #mappingScore{font-size:9px!important;padding:5px 6px!important}
  .panel-head{gap:8px}
}

@media print{
  .nara-help-popover{display:none!important}.nara-report-visuals{break-inside:avoid}.report-chart-card{break-inside:avoid;box-shadow:none}
}
