/* Contract workspace, provider profile and the fee-schedule shelf's
   intelligence pieces. Shared vocabulary (.panel, table.data, .kpis,
   .tabs, .btn, .gate-note, .fs-*) comes from styles.css; this sheet
   owns only the layouts and controls those pages add. Colours are the
   theme variables, so light and dark both hold. */

/* ---------- fee-schedule shelf ---------- */
.fs-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.fs-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.fs-views { margin-bottom: var(--s-3); }
.fs-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s-3); }
.fs-toolbar .fs-search { flex: 2; min-width: 240px; padding: 9px 12px; font-size: 13.5px; }
.fs-select {
  flex: 1; min-width: 140px; padding: 9px 12px; font-size: 13.5px; font-family: var(--font);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.fs-select:focus, .fs-toolbar .fs-search:focus { outline: none; border-color: var(--ink); }
.fs-pager { display: flex; align-items: center; gap: 12px; margin-top: var(--s-3); }
.fs-cohort { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line-strong); }
.fs-h3 { font-family: var(--font-display); font-size: 15px; margin: 0 0 4px; color: var(--ink); }
.fs-evd { white-space: nowrap; }
.fs-evd:empty { padding: 0; }

/* ---------- provider profile ---------- */
.pv-crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.pv-crumb a { color: var(--muted); }
.pv-crumb a:hover { color: var(--ink); }
.pv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-top: var(--s-4); }
.pv-pos { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line-strong); }
.pv-pos-cell { padding: 14px 16px; background: var(--pane-strong); display: flex; flex-direction: column; gap: 4px; }
.pv-pos-val { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pv-headline { font-family: var(--font-display); font-size: 16px; color: var(--ink); margin: var(--s-4) 0; max-width: 78ch; }
.pv-tabs { margin-bottom: var(--s-3); }
.pv-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.pv-vol-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.pv-volumes, .ct-text {
  width: 100%; font-family: var(--font-mono); font-size: 12.5px; padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); resize: vertical;
}
.pv-volumes:focus, .ct-text:focus { outline: none; border-color: var(--ink); }

/* ---------- contract workspace ---------- */
.ct-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.ct-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line-strong); }
.ct-list button {
  text-align: left; background: var(--pane-strong); border: none; padding: 12px 14px; cursor: pointer;
  font: inherit; color: var(--text); display: flex; flex-direction: column; gap: 2px;
}
.ct-list button:hover { background: var(--tile-hover); }
.ct-list button.on { background: var(--wash); box-shadow: inset 3px 0 0 var(--ink); }
.ct-list b { color: var(--ink); font-size: 13.5px; font-family: var(--font-display); }
.ct-list span { font-size: 11.5px; color: var(--muted); }
.ct-list .ct-empty { padding: 14px; font-size: 13px; color: var(--muted); background: var(--pane-strong); }
.ct-steps { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.ct-step-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: var(--s-3); }
.ct-step-head .num-mark { margin: 0; }
.ct-step-head .sub { font-size: 13px; }
.ct-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3) var(--s-4); }
.ct-form .wide { grid-column: 1 / -1; }
.ct-field { display: flex; flex-direction: column; gap: 5px; }
.ct-field label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ct-field input, .ct-field select {
  width: 100%; padding: 10px 12px; font-size: 13.5px; font-family: var(--font);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.ct-field input:focus, .ct-field select:focus { outline: none; border-color: var(--ink); }
.ct-field .hint { font-size: 11.5px; color: var(--muted); }
.ct-drop {
  border: 1px dashed var(--line-strong); padding: 18px; text-align: center; font-size: 13px; color: var(--muted);
  background: var(--pane);
}
.ct-drop.on { border-color: var(--ink); color: var(--ink); }
.ct-drop input { display: none; }
.ct-drop label { cursor: pointer; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.ct-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: var(--s-3); }
.ct-progress { font-size: 12.5px; color: var(--muted); }
.ct-terms td.src { font-family: var(--font-mono); font-size: 11px; color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-terms td.src:hover { white-space: normal; }
.ct-notes { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.ct-note { font-size: 12px; padding: 4px 9px; border: 1px solid var(--line-strong); background: var(--pane); color: var(--text); }
.ct-note b { color: var(--ink); }
.ct-warn { font-size: 12.5px; color: var(--flag); margin: 8px 0 0; }
.ct-tabs { margin: var(--s-3) 0; }
.ct-headline { font-family: var(--font-display); font-size: 17px; color: var(--ink); margin: var(--s-3) 0; max-width: 80ch; }
.ct-method { font-size: 12.5px; color: var(--muted); max-width: 90ch; margin-top: var(--s-3); }
.ct-conflict { padding: 10px 12px; border-left: 3px solid var(--flag); background: var(--flag-bg); margin-bottom: 8px; font-size: 13px; color: var(--text); }
.ct-conflict b { color: var(--ink); }
.ct-conflict i { color: var(--muted); font-style: normal; font-size: 12px; }
.ct-scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line-strong); }
.ct-scenario { background: var(--pane-strong); padding: 14px 16px; }
.ct-scenario b { display: block; font-family: var(--font-display); color: var(--ink); font-size: 13.5px; }
.ct-scenario .v { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; color: var(--ink); }
.ct-scenario .s { font-size: 11.5px; color: var(--muted); }
.ct-locked { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.ct-group-label { font-size: 12.5px; font-weight: 600; color: var(--ink); margin: var(--s-4) 0 var(--s-2); }
.ct-step-head + .ct-group-label { margin-top: 0; }
.ct-group-label span, .ct-more summary span { font-weight: 400; color: var(--muted); margin-left: 6px; }
.ct-more { margin-top: var(--s-4); border-top: 1px solid var(--line); padding-top: var(--s-3); }
.ct-more summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: var(--s-2); }
.ct-more[open] summary { margin-bottom: var(--s-3); }
.ct-nowrap, .ct-terms td.code-cell, #ct-analysis td.code-cell { white-space: nowrap; }
.ct-tabs { overflow-x: auto; flex-wrap: nowrap; }
.ct-tabs .tab-btn { flex: none; white-space: nowrap; }
.ct-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.ct-toggle input { width: auto; }

/* ---------- executive report ---------- */
.rp-page { max-width: 900px; margin: 0 auto; padding: 32px 24px 60px; color: var(--ink); }
.rp-head { border-bottom: 1.5px solid var(--ink); padding-bottom: 14px; margin-bottom: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.rp-head h1 { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.03em; margin: 0 0 4px; }
.rp-head .meta { font-size: 12.5px; color: var(--muted); }
.rp-section { margin: 26px 0; }
.rp-section h2 { font-family: var(--font-display); font-size: 16px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; color: var(--ink); }
.rp-headline { font-family: var(--font-display); font-size: 20px; line-height: 1.35; margin: 0 0 14px; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1.5px solid var(--ink); margin-bottom: 14px; }
.rp-kpi { padding: 12px 14px; background: var(--page); }
.rp-kpi .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rp-kpi .v { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rp-page table.data { font-size: 12px; }
.rp-page table.data td, .rp-page table.data th { padding: 7px 8px; }
.rp-foot { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 30px; }
.rp-print { float: right; }
@media print {
  #site-nav, #site-footer, .rp-print, .cookie-bar { display: none !important; }
  body, main { padding-left: 0 !important; margin-left: 0 !important; }
  .rp-page .tbl-scroll { overflow: visible !important; }
  .rp-page { max-width: none; padding: 0; }
  .rp-section { break-inside: avoid; }
  body { background: #fff; color: #000; }
}

@media (max-width: 900px) {
  .ct-layout, .fs-two, .pv-grid { grid-template-columns: 1fr; }
  .ct-form { grid-template-columns: 1fr 1fr; }
  .rp-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .ct-form { grid-template-columns: 1fr; }
  .fs-cohort, .pv-pos { grid-template-columns: 1fr; }
}
