/* Sprint 15 (D6): nothing on a public page renders below 12.5px.
   Anything smaller is uncomfortable on a 1920 display, which is the width
   the Owner actually uses. Enforced here at source AND asserted per page by
   e2e/ui-standards.spec.js -- do not reintroduce a 0.6-0.72rem badge or tag. */
/* Sprint 15: was 1100px while header was 1000px, which put the panels 62px
   left of the page's own header. It follows the shared shell now. */
main#dash-main { max-width: var(--shell); }

/* Zone dividers -- group the 15 panels into scannable sections instead
   of one undifferentiated vertical list. */
.zone-title {
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
}
.zone-title:first-of-type { margin-top: 0; }

/* Executive summary stat tiles -- the "30 second" answer, before detail. */
.exec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.exec-stat { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.1rem; background: rgba(255,255,255,0.02); }
.exec-value { font-size: 1.6rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.exec-label { font-size: 12.5px; color: var(--muted); margin-top: 0.2rem; }
.exec-note { font-size: 12.5px; color: var(--muted); margin-top: 0.35rem; opacity: 0.85; }

/* AI Strategy two-column contrast */
.ai-strategy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.ai-strategy-col { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.1rem; }
.ai-strategy-col h3 { margin: 0 0 0.6rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.ai-strategy-col.used-for { border-left: 3px solid var(--accent); }
.ai-strategy-col.used-for h3 { color: var(--accent); }
.ai-strategy-col.not-trusted { border-left: 3px solid var(--amber); }
.ai-strategy-col.not-trusted h3 { color: var(--amber); }
.ai-strategy-col ul { margin: 0; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.6; color: var(--text); }
@media (max-width: 640px) { .ai-strategy-grid { grid-template-columns: 1fr; } }

/* Collapsed raw-state / long-text blocks -- keeps big text out of the
   primary visual hierarchy without deleting it. */
details.raw-state { margin-top: 0.5rem; }
details.raw-state summary { cursor: pointer; font-size: 0.82rem; color: var(--accent); font-weight: 600; padding: 0.3rem 0; }
details.raw-state summary:hover { text-decoration: underline; }
.raw-state-body { margin-top: 0.5rem; padding: 0.85rem 1rem; background: #0d0f14; border: 1px solid var(--border); border-radius: 6px; font-size: 0.82rem; line-height: 1.6; color: var(--muted); max-height: 320px; overflow-y: auto; }
.raw-state-body p { margin: 0 0 0.6rem; }
.raw-state-body p:last-child { margin-bottom: 0; }

.kv {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; font-weight: 500; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}
.badge.st-ok { background: rgba(62,207,142,0.12); color: var(--green); border-color: rgba(62,207,142,0.3); }
.badge.st-partial { background: rgba(230,180,80,0.12); color: var(--amber); border-color: rgba(230,180,80,0.3); }
.badge.st-gap { background: rgba(139,147,167,0.1); color: var(--muted); border-color: var(--border); }

.run-list { list-style: none; margin: 0; padding: 0; }
.run-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.run-list li:last-child { border-bottom: none; }
.tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(139,147,167,0.1);
  color: var(--muted);
}
.tag.real { background: var(--accent-soft); color: #8fb4ff; }
.kv-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.1rem; color: var(--muted); margin-top: 0.4rem; font-size: 0.82rem; }

/* Sprint 14: this table is wider than its column on narrow viewports and was
   pushing the WHOLE PAGE sideways -- measured against production on
   2026-09-29: /usage overflowed at 390px and /dashboard at 1280, 768 and 390.
   A recruiter on a phone met a page that scrolled horizontally. The table now
   scrolls inside its own box instead of dragging the document with it.
   `display: block` is what makes overflow-x apply to a <table>. */
.cap-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
  display: block; overflow-x: auto; max-width: 100%;
  /* table-layout:fixed keeps the internal table box from sizing to its widest
     cell, which is what still pushed the document sideways at 390px even with
     the element itself scrolling. Long values then wrap instead of forcing
     width -- better on a phone than a horizontal scrollbar anyway. */
  table-layout: fixed;
}
.cap-table th, .cap-table td { overflow-wrap: anywhere; word-break: break-word; }
/* Belt and braces: no panel may size itself to content wider than the column. */
.panel { max-width: 100%; }
/* THE ACTUAL CAUSE of the 56px mobile overflow, found 2026-09-29 by walking
   the tree comparing scrollWidth to clientWidth: it was never the table. A
   .hint paragraph carries an unbreakable string (scrollWidth 397 against a
   292px column) that no amount of table fixing would have helped. Long
   tokens now wrap instead of widening the document. */
.panel .hint, .hint { overflow-wrap: anywhere; word-break: break-word; }
/* Same class of defect, found the same way on /dashboard: .econ-note (397px
   of content in a 292px column) and .kv (327px) also carried unbreakable
   strings. Applied to the text blocks rather than globally, so table columns
   and deliberate layout are untouched. */
.econ-note, .kv, .panel p, .panel li { overflow-wrap: anywhere; }
.cap-table th, .cap-table td { text-align: left; padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.cap-table tbody tr:hover { background: var(--panel-hover); }
.cap-table th { color: var(--muted); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; }

.limits { margin: 0; padding-left: 0; list-style: none; font-size: 0.88rem; color: var(--text); }
.limits li { margin-bottom: 0.6rem; padding-left: 1.35rem; position: relative; line-height: 1.5; }
.limits li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }

/* Economics / consumption section */
.econ-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; }
.econ-card { border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; background: rgba(255,255,255,0.015); }
.econ-card .econ-label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; margin-bottom: 0.4rem; }
.econ-card .econ-value { font-size: 1.05rem; font-weight: 700; }
.econ-note { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px dashed var(--border); font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* Visual charts (hand-rolled SVG, see dashboard.js's svgBarChart) — same
   numbers already shown as text elsewhere on this page, rendered once
   more as a bar so a pattern is visible at a glance. */
.chart-block { margin-top: 1rem; }
.chart-title { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; margin: 0 0 0.5rem; }
.chart-label { font-size: 12.5px; fill: var(--muted); dominant-baseline: middle; }
.chart-value { font-size: 12.5px; fill: var(--text); font-variant-numeric: tabular-nums; dominant-baseline: middle; }
.chart-track { fill: rgba(255,255,255,0.04); }
.chart-fill { fill: var(--accent); }
.chart-fill.chart-good { fill: var(--green); }
.chart-fill.chart-partial { fill: var(--amber); }

.activity-note { border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem; background: rgba(255,255,255,0.015); font-size: 0.88rem; line-height: 1.6; }
.activity-note .activity-kicker { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin-bottom: 0.5rem; }

/* Engineering Problems Solved — problem-first, not a technology badge list */
.problem-list { list-style: none; margin: 0; padding: 0; }
.problem-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.problem-list li:last-child { border-bottom: none; }
.problem-text { font-size: 0.95rem; font-weight: 600; }
.problem-arrow { color: var(--muted); font-size: 0.87rem; margin-top: 0.3rem; }
.problem-links { margin-top: 0.4rem; }
.problem-links a { color: var(--accent); text-decoration: none; font-size: 12.5px; font-weight: 700; margin-right: 0.75rem; }
.problem-links a:hover { text-decoration: underline; }

/* AI Engineering Learning — condensed ledger highlights */
.ledger-list { display: grid; gap: 0.9rem; }
.ledger-item { border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; background: rgba(255,255,255,0.015); }
.ledger-title { font-size: 0.9rem; margin-bottom: 0.5rem; }
.ledger-row { display: grid; grid-template-columns: 150px 1fr; gap: 0.75rem; font-size: 0.82rem; padding: 0.3rem 0; color: var(--text); }
.ledger-row .ledger-k { color: var(--muted); }
@media (max-width: 640px) {
  .ledger-row { grid-template-columns: 1fr; gap: 0.15rem; }
}
