/* Contract Income Forecaster.
 *
 * CIF-C1. Written for this service on the shell's own tokens (`--hs-*`); the monolith's page styled itself with
 * a long sheet plus many `style` attributes, none of which this service's Content Security Policy admits. Every width,
 * colour and state is a class. Show/hide is the `hidden` attribute, kept authoritative below. Tables scroll inside
 * their own box so the document never gains a horizontal scrollbar.
 */
:root {
  --cif-border: var(--hs-border, #dfe4ec);
  --cif-ink: var(--hs-ink, #1f2937);
  --cif-mut: var(--hs-ink-muted, #55637a);
  --cif-surface: var(--hs-surface, #fff);
  --cif-accent: var(--hs-aqua, #0d5bb8);
  --cif-tint: #f0f4ff;
  --cif-good: #166534;
  --cif-bad: #b91c1c;
  --cif-radius: 10px;
}

/* Width: the shell's `.content-inner` already caps the page at 1560px and centres it, as it does for Cloud-Based Telephony
   (`.cbt-wrap { max-width: none; margin: 0; padding: 0 }`), so this wrapper adds no cap of its own. */
.cif-wrap { max-width: none; margin: 0; padding: 0 0 48px; color: var(--cif-ink); }
.cif-wrap [hidden] { display: none !important; }
.cif-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cif-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--cif-accent); margin: 0 0 3px; }
.cif-title { font-size: 1.75rem; font-weight: 800; margin: 0 0 14px; line-height: 1.2; }
.cif-attribution, .cif-basis { background: var(--cif-tint); border-left: 4px solid var(--cif-accent); border-radius: 0 6px 6px 0; padding: 14px 18px; font-size: 13px; color: #374151; margin-bottom: 16px; line-height: 1.55; }
.cif-basis summary { cursor: pointer; font-weight: 700; }
.cif-basis ul { margin: 10px 0 0; padding-left: 18px; }
.cif-basis li { margin: 0 0 6px; }
.cif-card { background: var(--cif-surface); border: 1px solid var(--cif-border); border-radius: var(--cif-radius); box-shadow: 0 1px 6px rgba(0,0,0,0.06); padding: 16px 20px; margin-bottom: 16px; }
.cif-head { font-size: 16px; font-weight: 700; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid #e8edf2; }
.cif-note { font-size: 13px; color: #4b5563; margin: 0 0 10px; line-height: 1.5; }
.cif-status { font-size: 12px; color: #4b5563; margin: 8px 0 0; min-height: 1em; }
.cif-chipwrap { display: block; max-width: 460px; }
.cif-warn { background: #fef3c7; color: #5c3a05; border: 1px solid #e6c34a; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin: 0 0 16px; }
.cif-provisional { background: #fff7ed; color: #7c2d12; border: 1px solid #fdba74; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin: 0 0 14px; line-height: 1.5; }
.cif-error { background: #fff3f3; border: 1px solid #e74c3c; border-radius: 4px; padding: 10px 14px; font-size: 13px; color: #9b1c1c; margin: 10px 0 0; }
.cif-forthcoming { font-size: 13px; color: #4b5563; margin: 12px 0 0; }

/* Positioned, so a visually hidden caption inside the table is contained by this scroll box. */
.cif-scroll { overflow-x: auto; position: relative; margin-bottom: 12px; }
.cif-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cif-table caption { text-align: left; }
.cif-table th, .cif-table td { padding: 8px 10px; border-bottom: 1px solid #eef1f5; text-align: left; vertical-align: top; }
.cif-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #4f5d6b; background: #f8fafc; white-space: nowrap; }
.cif-table tbody th { font-weight: 600; }
.cif-table .cif-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cif-table tfoot th, .cif-table tfoot td { font-weight: 700; background: #f8fafc; border-top: 2px solid var(--cif-border); }
.cif-table .cif-recon th, .cif-table .cif-recon td { font-weight: 400; font-size: 12px; color: #4b5563; background: none; border-top: 0; }
.cif-sub { display: block; font-size: 11px; font-weight: 400; color: #596273; margin-top: 2px; white-space: normal; }
.cif-na { color: #7a4a00; font-weight: 600; white-space: normal; }
.cif-fig { font-weight: 700; }
.cif-inactive th, .cif-inactive td { color: #596273; background: #fafafa; }

.cif-dl { margin: 12px 0 0; display: grid; gap: 10px; }
.cif-dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: baseline; border-top: 1px solid #eef1f5; padding-top: 10px; }
.cif-dl dt { font-size: 13px; color: #374151; }
.cif-dl dd { margin: 0; font-size: 15px; text-align: right; }

.cif-input { width: 100%; padding: 6px 10px; font-size: 13px; border: 1px solid #ced4da; border-radius: 4px; background: #fff; color: var(--cif-ink); box-sizing: border-box; min-height: 34px; }
.cif-beds { width: 110px; }
.cif-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 10px; }
.cif-btn { background: #fff; border: 1px solid #9aa5b5; color: #1f2937; padding: 7px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; min-height: 36px; }
.cif-btn:hover { background: #f3f6fb; }
.cif-btn:focus-visible, .cif-input:focus-visible { outline: 3px solid #0d5bb8; outline-offset: 2px; }
.cif-btn-primary { background: var(--cif-accent); border-color: var(--cif-accent); color: #fff; font-weight: 600; }
.cif-btn-primary:hover { background: #0a4a96; }
.cif-btn-quiet { border-color: transparent; color: #9b1c1c; }
.cif-btn[disabled] { opacity: .6; cursor: progress; }
.cif-stale-note { background: #fef3c7; color: #5c3a05; border: 1px solid #e6c34a; border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 700; margin: 8px 0; }
/* Stale figures stay readable (a dark grey that keeps the contrast ratio, never a faded one) but are struck through, and the
   note beside them says why, so neither colour nor the line is the only cue. */
.cif-stale { color: #4b5563; text-decoration: line-through; }
.cif-stale .cif-fig, .cif-stale .cif-na { color: #4b5563; font-weight: 400; text-decoration: inherit; }
.cif-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: #374151; }

/* Dashboard (UI parity): four separate summary cards, a population strip, a grouped breakdown. Tints are subtle and
   never the only cue: every group also has a text heading. */
.cif-subhead { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cif-mut); margin: 24px 0 10px; }
.cif-pick { padding: 14px 20px; }
.cif-pickrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.cif-pickrow .cif-status { margin: 0; }
.cif-chips { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cif-chip { font-size: 12px; background: #f3f6fb; border: 1px solid var(--cif-border); border-radius: 999px; padding: 3px 10px; color: #374151; }
.cif-chip-warn { background: #fff7ed; border-color: #fdba74; color: #7c2d12; }
.cif-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.cif-kcard { background: var(--cif-surface); border: 1px solid var(--cif-border); border-top: 4px solid var(--cif-accent); border-radius: var(--cif-radius); padding: 12px 14px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); min-width: 0; }
.cif-kcard-npp { border-top-color: #0f766e; }
.cif-kcard-cif { border-top-color: #7c3aed; }
.cif-kcard-care { border-top-color: #b45309; }
.cif-klabel { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #4f5d6b; }
.cif-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border: 1px solid #9aa5b5; border-radius: 999px; font-size: 10px; letter-spacing: 0; text-transform: none; font-weight: 700; color: #374151; background: #f8fafc; }
.cif-kval { font-size: 1.5rem; font-weight: 800; line-height: 1.25; margin: 4px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cif-kval .cif-fig { font-weight: 800; }
.cif-kval .cif-na { font-size: 1rem; }
.cif-ksub { font-size: 12px; color: #4b5563; line-height: 1.4; }
.cif-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cif-kpi { background: #f8fafc; border: 1px solid var(--cif-border); border-radius: 8px; padding: 8px 12px; min-width: 0; }
.cif-kpival { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Column headings may wrap to two lines so the table needs less width before it has to scroll. */
.cif-wrap .cif-note { max-width: none; }
.cif-pick .cif-head { margin: 0; }

@media (max-width: 1100px) {
  .cif-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cif-cards, .cif-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cif-kval { font-size: 1.25rem; }
}
@media (max-width: 420px) {
  .cif-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cif-card { padding: 16px; }
  .cif-dl > div { grid-template-columns: 1fr; }
  .cif-dl dd { text-align: left; }
}
@media print {
  .cif-actions, .cif-chipwrap { display: none; }
  .cif-card { box-shadow: none; break-inside: avoid; }
}


/* Optional sections: a native disclosure that works without scripting. The summary keeps the section's name and its
   "Provisional illustration" tag visible while closed, so the qualification is never hidden with the entry rows. */
.cif-optional > summary { cursor: pointer; list-style: none; }
.cif-optional > summary::-webkit-details-marker { display: none; }
.cif-optional > summary .cif-head { display: inline; margin: 0; padding: 0; border: 0; font-size: 16px; }
.cif-optional > summary::before { content: "\25B8"; display: inline-block; margin-right: 8px; color: var(--cif-accent); font-size: 16px; }
.cif-optional[open] > summary::before { content: "\25BE"; }
.cif-optional > summary:focus-visible { outline: 3px solid #0d5bb8; outline-offset: 3px; border-radius: 4px; }
.cif-optional[open] > summary { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #e8edf2; }
.cif-tag-warn { background: #fff7ed; border-color: #fdba74; color: #7c2d12; }
.cif-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cif-list-cols { column-gap: 28px; }
@media (min-width: 1100px) { .cif-list-cols { columns: 2; } .cif-list-cols li { break-inside: avoid; } }
@media (max-width: 900px) { .cif-two { grid-template-columns: minmax(0, 1fr); } }

/* Contract Income Forecaster. */
.cif-miss { color: #7c2d12; font-weight: 700; white-space: normal; }
.cif-wrap h3.cif-minorhead, .cif-minorhead { font-size: 13px; font-weight: 800; margin: 14px 0 6px; }
.cif-hint-inline { font-weight: 400; font-size: 12px; color: #4b5563; }
.cif-panel { border-top: 1px solid #eef1f5; margin-top: 12px; padding-top: 6px; }
.cif-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; margin-bottom: 8px; }
.cif-levers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 14px 0 8px; }
.cif-lever .cif-hint { max-width: 60ch; }
.cif-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 20px; }
.cif-warnbox { border-left: 6px solid #f59e0b; background: #fffbeb; }
.cif-basisbox { border-left: 6px solid var(--cif-accent); }
.cif-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cif-kcard-baseline { border-top-color: #475569; }
.cif-kcard-final { border-top-color: #0d5bb8; }
.cif-kcard-change { border-top-color: #0f766e; }
.cif-kcard-real { border-top-color: #7c3aed; }
.cif-baserow th, .cif-baserow td { background: #f1f5f9; }
.cif-w-start th, .cif-w-start td, .cif-w-end th, .cif-w-end td { font-weight: 700; background: #f8fafc; }
.cif-w-risk td, .cif-w-risk th { color: #7a3a00; }
.cif-results { scroll-margin-top: 16px; }
#cif-results-head:focus-visible, #cif-errors:focus-visible { outline: 3px solid #0d5bb8; outline-offset: 3px; }
.cif-head-inline { display: inline; margin: 0; padding: 0; border: 0; font-size: 16px; }
.cif-table label { font-weight: 600; }
.cif-short { width: 8rem; }
.cif-mid { width: 11rem; }
@media (max-width: 1100px) { .cif-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cif-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cif-row3, .cif-levers { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .cif-cards, .cif-groups { grid-template-columns: minmax(0, 1fr); } }

/* CIF-C1.5: the manual-baseline notice, provenance, the server-drawn charts and the download row. Every colour and size is a
   class; the SVG is styled here and carries no style attribute. */
.cif-notice { background: #ecfdf5; border: 1px solid #6ee7b7; border-left: 6px solid #059669; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #064e3b; margin: 0 0 16px; line-height: 1.5; }
#cif-notice:focus-visible { outline: 3px solid #0d5bb8; outline-offset: 3px; }
.cif-prov { background: #f0f4ff; border-left: 4px solid var(--cif-accent); padding: 8px 12px; border-radius: 0 6px 6px 0; }
.cif-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.cif-chart { margin: 0; min-width: 0; }
.cif-svg { display: block; width: 100%; min-width: 640px; max-width: 760px; height: auto; }
/* On a narrow screen the drawing keeps its size and scrolls inside its own labelled region, as the wide tables do. */
.cif-chartbox { margin-bottom: 4px; }
.cif-svg text { fill: #1f2937; font: 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; }
.cif-svg .cif-svg-tick, .cif-svg .cif-svg-sub { fill: #4b5563; font-size: 12px; }
.cif-svg .cif-svg-cat { font-weight: 600; }
.cif-svg .cif-svg-val { font-size: 12px; font-weight: 600; }
.cif-svg .cif-svg-miss { fill: #7c2d12; font-size: 12px; font-style: italic; }
.cif-svg-grid { stroke: #dbe3ee; stroke-width: 1; }
.cif-svg-zero { stroke: #475569; stroke-width: 1.5; }
.cif-svg-s1 { fill: #0d5bb8; stroke: #0a3f80; stroke-width: 1; }
.cif-svg-s2 { fill: #f6c26b; stroke: #7c4a00; stroke-width: 1.5; stroke-dasharray: 4 2; }
.cif-svg-c-w { fill: #b45309; stroke: #7c2d12; stroke-width: 1; }
.cif-svg-c-l { fill: #0d5bb8; stroke: #0a3f80; stroke-width: 1; }
.cif-svg-c-b { fill: #0f766e; stroke: #134e4a; stroke-width: 1; }
.cif-legend { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; color: #374151; }
.cif-swatch { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; border-radius: 2px; box-sizing: border-box; }
.cif-swatch.cif-svg-s1 { background: #0d5bb8; border: 1px solid #0a3f80; }
.cif-swatch.cif-svg-s2 { background: #f6c26b; border: 1.5px dashed #7c4a00; }
.cif-chart-data { margin-top: 6px; }
.cif-chart-data > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--cif-accent); }
.cif-chart-data > summary:focus-visible { outline: 3px solid #0d5bb8; outline-offset: 3px; border-radius: 4px; }
.cif-chart-data[open] > summary { margin-bottom: 8px; }
@media (min-width: 1900px) { .cif-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cif-chart:first-child { grid-column: 1 / -1; } }
@media print { .cif-svg { max-width: 100%; } }

/* ------------------------------------------------------------------------------------------------------------------
   Dashboard layout (presentation refinement). A two-column dashboard: the controls on the left, the results on the right
   (six headline cards, then the income projection, then the detail). Every width, colour and state is a class; the
   sliders are revealed by the script and the number box beside each stays the value that is sent. On a narrow screen
   the columns stack, and when a result exists it is shown first.
   ------------------------------------------------------------------------------------------------------------------ */
.cif-title { font-size: 1.6rem; margin-bottom: 10px; }
.cif-attribution { margin-bottom: 18px; border-radius: 0 8px 8px 0; }
.cif-grid { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cif-grid > * { min-width: 0; }
.cif-controls .cif-card, .cif-main .cif-card { margin-bottom: 16px; }
.cif-controls .cif-card { padding: 16px 16px 14px; }
.cif-controls .cif-head { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #1c3461; border-bottom: 0; padding-bottom: 0; margin: 0 0 10px; }
.cif-controls .cif-note, .cif-controls .cif-hint { font-size: 12px; color: #4b5563; line-height: 1.45; margin: 4px 0 8px; }
.cif-hint { font-size: 12px; color: #4b5563; margin: 4px 0 8px; line-height: 1.45; }
.cif-label { display: block; font-size: 12.5px; font-weight: 700; color: #374151; margin: 0 0 4px; }
.cif-fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.cif-controls .cif-short, .cif-controls .cif-mid { width: 100%; max-width: 100%; }
.cif-controls .cif-row3, .cif-controls .cif-levers { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 8px; }
.cif-controls .cif-groups { grid-template-columns: minmax(0, 1fr); gap: 0; }
.cif-controls .cif-panel { border-top: 0; margin-top: 0; padding-top: 0; }

/* Baseline source: a two-option segmented control (real radios, so keyboard and screen readers are unchanged). */
.cif-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #9aa5b5; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.cif-seg-opt { position: relative; margin: 0; cursor: pointer; }
.cif-seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cif-seg-opt span { display: block; text-align: center; font-size: 12.5px; font-weight: 700; padding: 8px 6px; color: #374151; background: #fff; }
.cif-seg-opt + .cif-seg-opt span { border-left: 1px solid #9aa5b5; }
.cif-seg-opt input:checked + span { background: var(--cif-accent); color: #fff; }
.cif-seg-opt input:focus-visible + span { outline: 3px solid #0d5bb8; outline-offset: -3px; }
.cif-yearrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; margin: 10px 0 0; }
.cif-yearrow .cif-label { margin: 0; }
.cif-more > summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--cif-accent); }
.cif-more > summary:focus-visible { outline: 3px solid #0d5bb8; outline-offset: 3px; border-radius: 4px; }
.cif-manual { border-top: 1px solid #e8edf2; margin-top: 12px; padding-top: 10px; }
.cif-manual > summary .cif-head-inline { font-size: 13px; font-weight: 700; }

/* Levers: label and number box on one line, the slider under them, the note small beneath. */
.cif-lever { margin: 0 0 14px; }
.cif-lever-top { display: grid; grid-template-columns: minmax(0, 1fr) 5.2rem; gap: 10px; align-items: center; }
.cif-lever-top .cif-label { margin: 0; line-height: 1.3; }
.cif-controls .cif-lever-top .cif-input { width: 5.2rem; text-align: right; font-variant-numeric: tabular-nums; }
.cif-lever-horizon .cif-lever-top { grid-template-columns: minmax(0, 1fr) 5.2rem; }
.cif-range { display: block; width: 100%; margin: 8px 0 0; accent-color: var(--cif-accent); cursor: pointer; height: 1.3rem; }
.cif-range:focus-visible { outline: 3px solid #0d5bb8; outline-offset: 3px; border-radius: 4px; }
.cif-lever .cif-hint { margin: 4px 0 0; font-size: 11.5px; color: #596273; }
.cif-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; padding: 5px 0; cursor: pointer; }
.cif-check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--cif-accent); flex: 0 0 auto; }
.cif-submit { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; background: var(--cif-surface); border: 1px solid var(--cif-border); border-radius: var(--cif-radius); box-shadow: 0 -2px 10px rgba(0,0,0,0.08); padding: 10px 14px; }
.cif-submit .cif-btn-primary { flex: 1 1 auto; min-height: 42px; font-size: 14px; }

/* Results */
.cif-main .cif-subhead { margin-top: 0; }
.cif-basisline { font-size: 12.5px; color: #374151; margin: 0 0 10px; }
.cif-jump { display: none; margin-left: 8px; font-weight: 700; }
.cif-warnflag { background: #fffbeb; border: 1px solid #e6c34a; border-left: 6px solid #f59e0b; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 0 0 12px; }
.cif-warnflag a { color: #5c3a05; font-weight: 700; }
.cif-stale-banner { background: #fef3c7; color: #5c3a05; border: 1px solid #e6c34a; border-left: 6px solid #f59e0b; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin: 0 0 14px; position: sticky; top: 8px; z-index: 3; }
.cif-is-stale .cif-cards, .cif-is-stale .cif-chartcard { outline: 2px dashed #d4a72c; outline-offset: 4px; }
.cif-main .cif-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.cif-main .cif-kcard { padding: 14px 16px 12px; border-radius: 12px; display: flex; flex-direction: column; }
.cif-main .cif-klabel { font-size: 11px; line-height: 1.3; min-height: 2.6em; }
.cif-main .cif-kval { font-size: clamp(1.25rem, 1.7vw, 1.65rem); margin: 6px 0 4px; overflow-wrap: normal; white-space: nowrap; }
.cif-main .cif-ksub { margin-top: auto; }
.cif-kcard-perweighted { border-top-color: #0f766e; }
.cif-kcard-surplus { border-top-color: #166534; }
.cif-kcard-perregistered { border-top-color: #b45309; }
.cif-chartcard .cif-svg { max-width: none; min-width: 560px; }
.cif-chartcard .cif-head, #cif-charts-more .cif-head { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #1c3461; border-bottom: 0; padding-bottom: 0; }
.cif-chartcard .cif-minorhead { display: none; }
.cif-placeholder { border-style: dashed; }
.cif-main .cif-subhead { color: #1c3461; }

@media (max-width: 1100px) {
  .cif-grid { grid-template-columns: minmax(0, 1fr); }
  .cif-has-results .cif-main { order: -1; }
  .cif-jump { display: inline; }
  .cif-main .cif-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cif-submit { position: static; box-shadow: none; }
}
@media (max-width: 520px) {
  .cif-main .cif-cards { gap: 10px; }
  .cif-main .cif-kval { font-size: clamp(0.9rem, 4.2vw, 1.1rem); white-space: nowrap; overflow-wrap: normal; }
  .cif-main .cif-klabel { min-height: 0; }
  .cif-controls .cif-card, .cif-main .cif-card { padding: 14px; }
}
@media print { .cif-controls, .cif-stale-banner, .cif-jump { display: none; } .cif-grid { display: block; } }
