/* Circle dials feature (src/features/dials). Every class here is prefixed dials-. Light surfaces only. */

/* ---------- the circle: four pillars in a row with the arcs between them ---------- */
.dials-circle { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; margin-bottom: 8px; }
.dials-pillar { text-align: center; padding: 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dials-pillar b { color: var(--navy); font-size: 14px; line-height: 1.25; }
.dials-pillar small { display: block; }
.dials-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--teal); background: #fff; color: var(--navy); font-weight: 700; font-size: 13px; }
.dials-arc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 96px; padding: 6px 8px; border-radius: 8px; border: 1px dashed transparent; color: var(--slate); text-align: center; line-height: 1.25; }
.dials-arc:hover { background: #fff; text-decoration: none; border-color: var(--g1); }
.dials-arc b { color: var(--navy); font-size: 13px; }
.dials-arc small { display: block; font-size: 12px; }
.dials-arrow { font-size: 22px; line-height: 1; color: var(--muted); }
.dials-arc.dials-slow { border-color: var(--bad); background: #fff; }
.dials-arc.dials-slow .dials-arrow, .dials-flag { color: var(--bad); }
.dials-flag { font-weight: 700; }
.dials-closing { font-size: 13px; margin: 0 0 18px; }
.dials-closing.dials-slow { border: 1px dashed var(--bad); border-radius: 8px; padding: 6px 10px; background: #fff; }

/* ---------- one card per arc ---------- */
.dials-dial { border-top: 4px solid var(--teal); scroll-margin-top: 12px; }
.dials-dial.dials-slowest { border-top-color: var(--bad); }
.dials-head { flex-wrap: wrap; }
.dials-head h2 small { font-weight: 500; margin-left: 6px; }
.dials-pills { margin-left: auto; display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dials-pills .pill { margin-left: 0; }
.dials-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.dials-kpis .kpi { box-shadow: none; }
.dials-bar { margin: 8px 0 6px; }
.dials-sub { font-size: 14px; margin: 16px 0 8px; }
.dials-note { font-size: 13px; margin: 8px 0 0; }
.dials-table { font-size: 13px; }
.dials-table th[scope="row"] b { color: var(--navy); }
.dials-loop { scroll-margin-top: 12px; }

/* density ladder: a filled track with a mark at each license-fee threshold */
.dials-ladder-cell { min-width: 120px; }
.dials-ladder { position: relative; height: 14px; border-radius: 7px; background: var(--g1); }
.dials-ladder i { display: block; height: 100%; border-radius: 7px; background: var(--teal); }
.dials-tick { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px solid var(--slate); }

/* five-quarter trend: bars with the same numbers as text underneath */
.dials-trend { margin: 16px 0 0; }
.dials-trend figcaption { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.dials-trend svg { display: block; width: 100%; max-width: 330px; height: 56px; }
.dials-trend rect { fill: #b5dadb; }
.dials-trend rect.dials-sel { fill: var(--teal-dark); }
.dials-trend line { stroke: #cfd7de; stroke-width: 1; }
.dials-trend-list { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; max-width: 330px; margin: 4px 0 0; padding: 0; text-align: center; }
.dials-trend-list li small { display: block; font-size: 11px; line-height: 1.2; }
.dials-trend-list li b { display: block; color: var(--navy); font-size: 14px; }
.dials-trend-list li.dials-sel b { text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 3px; }

/* "How these are calculated" */
.dials-how { margin-top: 14px; border-top: 1px solid var(--g1); padding-top: 10px; font-size: 13px; }
.dials-how summary { color: var(--teal-dark); font-weight: 600; }
.dials-how summary::before { content: "▸"; display: inline-block; width: 14px; }
.dials-how[open] summary::before { content: "▾"; }
.dials-how ul { margin: 8px 0 0; padding-left: 18px; }
.dials-how li + li { margin-top: 6px; }

/* ---------- targets form ---------- */
.dials-targets { max-width: 860px; }
.dials-fieldset { margin: 0 0 16px; min-width: 0; }
.dials-fieldset > legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font-weight: 700; font-size: 16px; color: var(--navy); }
.dials-fieldset > legend + * { clear: both; }
.dials-fieldset .field { margin-bottom: 4px; }
.dials-hint { display: block; font-weight: 400; }

@media (max-width: 1100px) {
  .dials-circle { grid-template-columns: minmax(0, 1fr); }
  .dials-arc { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .dials-arrow { transform: rotate(90deg); }
}
@media print {
  body:has(.dials-circle) .topbar, body:has(.dials-circle) .sidenav, body:has(.dials-circle) .help-fab, .dials-noprint { display: none !important; }
  body:has(.dials-circle) .app { display: block; min-height: 0; }
  body:has(.dials-circle) .content { padding: 0; }
  body:has(.dials-circle) .card { box-shadow: none; break-inside: avoid; }
  body:has(.dials-circle) .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
