/* Extensions reuse Miri's typography, cards, palette and spacing. */
.tool-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:-2px 0 18px;font-size:.73rem;color:var(--muted,#6d7b90)}
.tool-toolbar-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.tool-toolbar label{display:flex;align-items:center;gap:8px}.tool-toolbar select{border:1px solid var(--border,#e1e5ee);border-radius:9px;padding:7px 10px;background:var(--surface,#fff);color:inherit;font:inherit}.tool-save{display:flex;align-items:center;gap:7px}.tool-save i{height:6px;width:6px;border-radius:50%;background:#0a7a62}
.tool-detailnav{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 18px}.tool-price-summary{padding:0 0 20px;border-bottom:1px solid var(--border,#e1e5ee)}.tool-price-summary h2{margin:7px 0 10px;font-size:1.65rem}.tool-price-summary p{line-height:1.65}.tool-caption,.tool-method{font-size:.76rem;line-height:1.6;color:var(--muted,#6d7b90)}.tool-method{padding:14px 18px;margin:12px 0 20px;border-radius:12px;background:var(--surface,#fff);border:1px solid var(--border,#e1e5ee)}
.tool-terms{display:grid;grid-template-columns:1fr 1fr;gap:0 26px}.tool-terms>div{padding:18px 0;border-bottom:1px solid var(--border,#e1e5ee)}.tool-terms>div>span{font-weight:700;font-size:.77rem}.tool-terms p{font-size:.84rem;line-height:1.65;margin:7px 0}.tool-terms a{font-size:.72rem}.tool-details{margin-top:20px;padding:16px;border-radius:10px;background:var(--bg,#f7f8fb)}.tool-details summary{cursor:pointer;font-weight:600}.tool-details p{line-height:1.65}.tool-document-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.tool-document-grid>div{min-width:0;border:1px solid var(--border,#e1e5ee);border-radius:12px;padding:15px}.tool-document-grid h3{font-size:.85rem;overflow-wrap:anywhere;margin:10px 0}.tool-document-grid .pill{white-space:normal;font-size:.65rem}.tool-empty{padding:26px 18px;color:var(--muted,#6d7b90);line-height:1.65}.tool-empty h3,.tool-empty b{color:var(--navy,#244568)}.tool-row{display:flex;align-items:center;gap:16px;padding:17px 0;border-bottom:1px solid var(--border,#e1e5ee)}.tool-row>div{flex:1;min-width:0}.tool-row p{font-size:.79rem;line-height:1.55;margin:6px 0 0}.tool-row>button{flex-shrink:0}.tool-history{max-height:350px;overflow:auto}.tool-history p{padding:10px 0;border-bottom:1px solid var(--border,#e1e5ee);font-size:.85rem}.tool-history small{color:var(--muted,#6d7b90)}.tool-form-error{background:#fff0f4;border:1px solid #ffd0dc;color:#ad244c;border-radius:10px;padding:12px;line-height:1.5}.tool-form-error[hidden]{display:none}.tool-expanded{display:grid;grid-template-columns:1fr 1fr;gap:24px}.tool-expanded p{white-space:normal;line-height:1.6}.tool-wrap{max-width:360px;white-space:normal!important}.tool-import-result{margin-top:24px}.tool-import-result>h2{overflow-wrap:anywhere}.tool-import-result form{margin:20px 0}.tool-progress:not(:empty){padding:16px;text-align:center;font-weight:600}.tool-impact-row{display:flex;justify-content:space-between;gap:16px;font-size:.78rem;line-height:1.5;padding:11px 0;border-bottom:1px solid var(--border,#e1e5ee)}.tool-impact-row b{white-space:nowrap}.tool-big{font-size:2rem;font-weight:700;margin:8px 0 15px}.tool-organization{display:flex;gap:40px;flex-wrap:wrap}.tool-guide{padding-left:22px;line-height:1.8}.tool-guide li{padding-bottom:12px}.tool-plan-choices{display:flex;gap:12px;margin-top:24px}
.tool-plan-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding-bottom:26px}.tool-plan-summary>div{border:1px solid var(--border,#e1e5ee);border-radius:14px;padding:20px}.tool-plan-summary small,.tool-plan-summary span{display:block;color:var(--muted,#6d7b90);font-size:.76rem}.tool-plan-summary b{display:block;font-size:1.5rem;margin:9px 0;color:var(--navy,#244568)}.tool-scenario-fields{display:grid;grid-template-columns:1fr 1fr 1fr 2fr;gap:14px}.tool-scenario-fields .field{min-width:0}.tool-scenario-fields input{width:100%}.tool-projection-chart{height:340px;margin-top:20px}.tool-site-costs>div{padding:16px 0;border-bottom:1px solid var(--border,#e1e5ee);display:grid;grid-template-columns:1fr auto;gap:8px}.tool-site-costs small{grid-column:1/-1;color:var(--muted,#6d7b90)}.tool-site-costs i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:8px}.tool-unit-list>div{padding:15px 0;display:grid;grid-template-columns:1fr auto;gap:8px;border-bottom:1px solid var(--border,#e1e5ee)}.tool-unit-list small{grid-column:1/-1;color:var(--muted,#6d7b90);line-height:1.6}.tool-timeline-point{position:absolute;top:76px;transform:translateX(-50%);background:var(--navy,#244568);color:white;border:0;padding:10px;border-radius:12px;max-width:135px;font:inherit;font-size:.72rem;cursor:pointer}.tool-timeline-point small{display:block;margin-top:5px}.kpis .kpi .sub{line-height:1.45;min-height:2.9em}.kpis .kpi .num{white-space:nowrap}.card .cdmini .btn{margin-top:6px}.tool-unit-list .linkbtn{text-align:left}.tool-import-result .cdfacts{padding:16px 0}.tool-import-result .cdfacts b{overflow-wrap:anywhere}.qtab.active{border-bottom:3px solid var(--magenta,#fd3a68)}.local-details td{white-space:normal}.card.c7 .chartbox.xl{min-height:300px}#valueChartCard .role-caption{padding:0 5px;margin:8px 0 0}#mgmtSavNote{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
@media(max-width:1050px){.tool-scenario-fields{grid-template-columns:1fr 1fr}.tool-document-grid{grid-template-columns:1fr 1fr}.tool-plan-summary b{font-size:1.2rem}.tool-toolbar{margin-top:0}.tool-terms{grid-template-columns:1fr}}
@media(max-width:720px){.tool-toolbar-actions{width:100%}.tool-toolbar-actions label{flex:1}.tool-toolbar .btn{flex:1;white-space:nowrap}.tool-plan-summary,.tool-scenario-fields,.tool-document-grid,.tool-expanded{grid-template-columns:1fr}.tool-row{flex-wrap:wrap}.tool-row>div{flex-basis:70%}.tool-plan-summary{gap:10px}.tool-plan-summary>div{padding:14px}.tool-projection-chart{height:280px}.tool-price-summary h2{font-size:1.3rem}}
.tool-check-summary{margin:24px 0;padding:20px;border:1px solid var(--border,#e1e5ee);border-radius:14px}.tool-check-summary>div{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0}.tool-check-summary p{font-size:.78rem}.tool-check-summary .btn{margin-top:12px}.tool-check-edit{display:grid;grid-template-columns:1fr 1.6fr;gap:14px;margin-bottom:16px}
@media(min-width:1100px){#finHero{display:flex;flex-direction:row;align-items:center;justify-content:space-between}#finHero>div:first-child{max-width:58%}#finHero .hero-stats{margin:0}}@media(max-width:720px){.tool-check-edit{grid-template-columns:1fr}}
@media(min-width:1100px){#finHero,#supHero{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,1fr);gap:24px}#finHero>div:first-child,#supHero>div:first-child{max-width:none}#finHero .herostats,#supHero .herostats{flex-wrap:nowrap;min-width:0;margin:0}#finHero .herostat,#supHero .herostat{flex:1;min-width:0;padding:14px}#finHero .herostat b,#supHero .herostat b{font-size:1.35rem}}

/* Compact desktop spacing keeps Miri's card hierarchy and chart proportions. */
.qtab.active,.qtab.active:hover,.qtab.active:focus-visible{
  background:#244568;color:#fff;border-color:#244568;
  border-bottom-color:var(--magenta,#fd3a68);
}
.qtab:focus-visible{outline:2px solid var(--magenta,#fd3a68);outline-offset:3px}
.chartbox{height:220px}
.chartbox.sm{height:160px}
.chartbox.md{height:190px}
.chartbox.lg{height:240px}
.chartbox.xl{height:300px}
.chartbox:has(#spendChart){height:220px}
.donutwrap{height:164px}
.mbchart{height:190px}
.tool-projection-chart{height:280px}
#renewals{max-height:300px}
@media(min-width:900px){
  html{font-size:90%}
  body{font-size:.94rem}
  .sidebar:not(.collapsed){width:224px}
  .sidebar{padding:12px 10px}
  .sb-top{height:42px;margin-bottom:12px}
  .sb-logo{height:32px}
  .persona{padding:8px 10px;margin-bottom:14px}
  .avatar{width:30px;height:30px}
  .sb-nav{margin-bottom:12px}
  .navitem{height:37px;padding:0 12px;gap:10px}
  .navitem svg{width:17px;height:17px}
  .premium-wrap{margin-bottom:12px}
  .appmain{padding-inline:24px;padding-top:14px}
  .topbar{gap:16px;margin-bottom:16px}
  .grid,.kpis{gap:14px}
  .cardhead{padding:14px 16px 10px;gap:12px}
  .cardbody{padding:4px 16px 16px}
  .hero{padding:20px 22px;gap:20px}
  .heroacts{margin-top:12px}
  .herostat{padding:12px 14px;min-width:135px}
  #finHero,#supHero{gap:20px}
  #finHero .herostat,#supHero .herostat{padding:12px}
  .kpi{padding:12px 14px}
  .kpi-lbl{gap:7px}
  .kpi-ico{width:26px;height:26px;flex-shrink:0}
  .kpi .num{font-size:1.8rem}
  .kpi .viz{height:28px;margin-top:8px}
  .kpi .viz svg{height:28px}
  .btn{min-height:40px;padding:9px 18px}
  .btn-sm{min-height:32px;padding:6px 12px}
  .queuetabs{padding:0 16px 12px}
  .qtab{padding:6px 14px}
  .sctable th{padding:9px 10px}
  .sctable td{padding:10px}
  .tool-row{padding:13px 0}
  .tool-toolbar{margin-bottom:14px}
  .scopebar{margin-bottom:14px}
}
/* Keep the original paired finance cards on ordinary laptop displays. */
@media(min-width:1180px){
  .kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
  .c8{grid-column:span 8}
  .c7{grid-column:span 7}
  .c6{grid-column:span 6}
  .c5{grid-column:span 5}
  .c4{grid-column:span 4}
}@media(min-width:900px){
  .donutwrap{height:140px}
  .donutcenter b{font-size:1.3rem}
  .hosprows{gap:6px;margin-top:10px}
  .hosprow{gap:8px;padding:8px 10px;border-radius:10px}
  .hosprow .sw{width:6px;height:30px}
  .hosprow b{font-size:.8rem;line-height:1.35}
  .hosprow span{font-size:.7rem;line-height:1.4}
  .hosprow .hv{font-size:.95rem;white-space:nowrap}
  /* The shared annual basis is already stated in the card heading. */
  #hospitals .hv span{display:none}
}@media(min-width:900px){
  .finding{padding:16px;margin:12px 0}
  .finding .panel-head{margin-bottom:10px}
  .finding h2{font-size:1.15rem;margin:0 0 10px}
  .finding p{margin:10px 0}
  .finding .sources{margin:12px 0}
  .finding .actions{flex-direction:row;justify-content:flex-start;gap:8px;margin-top:12px}
}
/* Long labels stay inside their navigation item, card or table cell. */
.sidebar:not(.collapsed) .navitem{
  height:auto;min-height:42px;padding-block:9px;
  white-space:normal;line-height:1.35;
}
.sidebar:not(.collapsed) .navitem>span:not(.navbadge){min-width:0;overflow-wrap:anywhere}
.navitem svg{flex-shrink:0}
.tright{min-width:0;max-width:100%;flex-wrap:wrap}
.topbar>div,.titlerow,.orgblock,.orgtext{min-width:0}
.orgblock{max-width:100%}
.orgavatar{flex-shrink:0}
.titlerow h1,.crumbs{overflow-wrap:anywhere}
.cardhead>div,.tool-terms>div,.tool-expanded>div,.tool-plan-summary>div,
.cdfacts>div,.finding,.tool-document-grid>div{min-width:0;overflow-wrap:anywhere}
.cardhead .btn,.tool-row>.btn{max-width:100%;white-space:normal}
.tablewrap,.table-wrap{min-width:0;max-width:100%}
.sctable th,.sctable td{overflow-wrap:anywhere}
.sctable .linkbtn{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}
.sources a{max-width:100%;overflow-wrap:anywhere}
@media(min-width:900px){.sidebar:not(.collapsed) .navitem{min-height:37px}}
@media(max-width:900px){
  .tright .search{min-width:0!important;max-width:100%}
  .orgtext b,.orgtext span{white-space:normal;overflow-wrap:anywhere}
  .tool-check-summary>div,.tool-impact-row{flex-wrap:wrap}
}.sidebar.collapsed .navitem{justify-content:center;padding-inline:0}
.sidebar.collapsed .persona{width:100%;justify-content:center;padding:8px 0}.sidebar.collapsed{padding-inline:8px}
.sidebar.collapsed .premium-wrap{margin-inline:0;padding-inline:0}.sidebar:not(.collapsed) .premium-wrap .navitem{padding-inline:6px;gap:8px}
/* Contract periods and invoice dates have distinct, explicitly labelled views. */
.tool-cost-body{padding-top:0}
.tool-cost-switch{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.tool-cost-controls{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.tool-cost-controls label{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:.72rem;color:var(--ink-muted)}
.tool-cost-controls label:first-child{flex:1 1 180px}
.tool-cost-controls select{width:100%;max-width:100%;height:32px;min-width:0;border:1px solid var(--border);border-radius:8px;padding:4px 8px;background:var(--surface);color:var(--ink);font:inherit}
.tool-cost-body .hchips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.tool-cost-status{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;padding:8px 10px;margin-bottom:10px;border:1px solid var(--border);border-radius:8px;background:var(--section-alt);font-size:.74rem;color:var(--ink-muted)}
.tool-cost-status b{color:var(--navy)}
.tool-cost-chart{position:relative}
.tool-cost-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:20px;text-align:center;pointer-events:none;background:var(--surface)}
.tool-cost-empty b{font-size:.85rem;color:var(--navy)}
.tool-cost-empty span{font-size:.75rem;color:var(--ink-muted)}
.tool-cost-values{margin-top:12px;font-size:.75rem}
.tool-cost-values summary{cursor:pointer;color:var(--navy);font-weight:600}
.tool-cost-values .tablewrap{margin-top:10px;max-height:280px;overflow:auto}
.tool-cost-values-table{min-width:480px;font-size:.75rem}
.tool-cost-values-table th,.tool-cost-values-table td{padding:8px 10px;white-space:normal;overflow-wrap:anywhere}
.tool-cost-table{min-width:850px;table-layout:fixed}
.tool-cost-table th:nth-child(1){width:21%}
.tool-cost-table th:nth-child(2){width:36%}
.tool-cost-table th:nth-child(3){width:28%}
.tool-cost-table th:nth-child(4){width:15%}
.tool-cost-table td{white-space:normal;vertical-align:top;line-height:1.55}
.tool-cost-table small{display:block;color:var(--ink-muted);font-size:.72rem;margin-top:5px}
.tool-cost-table .btn{margin-top:10px;white-space:normal}
.tool-cost-table p{font-size:.75rem;margin:8px 0}
.tool-cost-table .pill{height:auto;min-height:26px;white-space:normal;padding-block:5px;line-height:1.3}#modal:has(.tool-cost-table){width:1140px}
/* Report annual basis: source notes remain within cards and tables. */
.tool-report-summary{padding:16px 18px;background:var(--light,#f5f7fb);border:1px solid var(--border,#e0e5ee);border-left:3px solid #267d66;border-radius:12px;margin-bottom:18px;min-width:0}
.tool-report-summary h2{margin:7px 0}.tool-report-summary p{margin:6px 0 12px}
.tool-report-total{display:flex;flex-wrap:wrap;gap:7px 18px;align-items:baseline;margin:18px 0}.tool-report-total b{font:700 30px Georgia,serif;color:#244568}.tool-report-total span{font-size:13px}
.tool-report-table{table-layout:fixed;width:100%;min-width:0!important}.tool-report-table th:first-child{width:23%}.tool-report-table th:nth-child(2){width:20%}.tool-report-table td{vertical-align:top;overflow-wrap:anywhere;white-space:normal}.tool-report-table td p{margin:5px 0}.tool-report-table details{margin-top:8px}.tool-report-table .num{white-space:nowrap}.tool-report-table small{overflow-wrap:anywhere}.keyrow i.dot{width:8px;height:8px;border-radius:50%}
@media(max-width:600px){.tool-report-table{font-size:11px}.tool-report-table td,.tool-report-table th{padding:8px 5px}.tool-report-table th:first-child{width:25%}.tool-report-table th:nth-child(2){width:26%}}

/* Prioritized premium findings: compact overview, detailed actions on demand. */
.tool-finding-badges{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.tool-premium-badge{background:#f1edff;color:#6744bc}.tool-priority-high{background:#fff0f3;color:#ae254a}.tool-priority-clarify{background:#fff6e8;color:#8c580d}.tool-priority-watch{background:#edf3fa;color:#355473}
.tool-finding-filters{display:grid;grid-template-columns:2fr 1fr 1.5fr;gap:12px;padding:16px 20px}.tool-finding-filters label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;min-width:0}.tool-finding-filters input,.tool-finding-filters select{width:100%;min-width:0;border:1px solid #dce2ed;border-radius:8px;padding:9px;background:#fff;color:#244568}
.tool-finding-pagination{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:10px 20px;color:#66768c;font-size:12px;border-top:1px solid #edf0f5}.tool-finding-pagination>div{display:flex;flex-wrap:wrap;gap:6px}.tool-finding-next,.tool-premium-intro{background:#f5f7fb;border:1px solid #e0e5ee;border-radius:10px;padding:14px;margin:14px 0}.tool-premium-intro{margin:12px 20px}.tool-finding-next p,.tool-evidence-excerpt p,.tool-evidence-text{white-space:pre-line;overflow-wrap:anywhere}.tool-finding-next details{margin-top:10px}.tool-evidence-excerpt{padding:12px 16px;border-left:3px solid #8055df;background:#f7f6fb;margin:16px 0}.finding .panel-head{gap:10px;flex-wrap:wrap}.finding .actions{flex-wrap:wrap}.finding{min-width:0}.finding h2{overflow-wrap:anywhere}
@media(max-width:760px){.tool-finding-filters{grid-template-columns:1fr}.tool-finding-pagination>div{width:100%}}

/* The editable current price is the shared basis for live cost views. */
.tool-current-cost-editor{padding:16px;border:1px solid var(--border,#e1e6ee);border-radius:12px;background:var(--surface,#f8fafc)}
.tool-current-cost-editor h3{margin:0 0 8px}.tool-current-cost-editor>p{margin:8px 0}.tool-current-cost-editor .formgrid{margin-top:12px}

.tool-current-cost-editor .formgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.tool-current-cost-editor label.field{display:block;text-align:left}
@media(max-width:620px){.tool-current-cost-editor .formgrid{grid-template-columns:1fr}}
/* Compact, source-bound invoice review in the existing Miri visual language. */
.ir-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ir-picker .field{margin:12px 0;max-width:100%}
.ir-picker select{width:100%;min-width:0;max-width:100%;text-overflow:ellipsis}
.ir-picker .tool-caption{margin:10px 0 0}
.ir-alert,.ir-resolved{padding:16px 20px;border-radius:14px;margin:0 0 20px;overflow-wrap:anywhere}
.ir-alert{background:var(--magenta-bg,#fff0f5);border:1px solid #f5b9cc;border-left:4px solid #fa3268;color:var(--text,#294568)}
.ir-resolved{background:var(--teal-bg,#edf7f3);border:1px solid #acd4c7;color:var(--text,#294568)}
.ir-alert p,.ir-resolved p{margin:6px 0}
.ir-row-action{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-top:7px}
.ir-row-action small{max-width:180px;white-space:normal}
/* Upload demonstration: restrained progress display and compact evidence cards. */
.ir-demo-intro{max-width:850px}.ir-demo-intro h2{margin-top:12px}
.ir-demo-steps{display:flex;gap:12px;flex-wrap:wrap;list-style:none;padding:0;margin:20px 0;font-size:.82rem;color:var(--ink-muted)}
.ir-demo-steps li{padding:8px 12px;border:1px solid var(--border);border-radius:9px;background:var(--surface)}
.ir-upload-ready{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface);font-size:.82rem}
.ir-upload-ready>span:last-child{color:var(--ink-muted)}
.ir-progress-card .cardbody{padding:28px}.ir-progress-card h2{margin:26px 0 8px}.ir-progress-card p{max-width:780px}
.ir-clock{display:inline-flex;align-items:center;gap:10px;font-variant-numeric:tabular-nums;color:var(--navy)}
.ir-spinner{width:22px;height:22px;border:2px solid var(--border);border-top-color:var(--magenta,#fa3268);border-radius:50%;animation:ir-spin 1s linear infinite}
@keyframes ir-spin{to{transform:rotate(360deg)}}
.ir-progress-track{height:7px;border-radius:10px;background:var(--border);overflow:hidden;margin:22px 0}
.ir-progress-track>span{display:block;width:0;height:100%;background:linear-gradient(90deg,#294568,#fa3268);transition:width .18s linear}
.ir-running-steps li{display:flex;align-items:center;gap:7px;flex:1 1 140px;min-width:0}
.ir-running-steps li>span{display:inline-grid;place-items:center;border-radius:50%;width:22px;height:22px;background:var(--section-alt);flex:none}
.ir-running-steps li.active{border-color:#f39ab6;color:var(--navy);font-weight:700}.ir-running-steps li.done{border-color:#a9d4c7;color:#247e69}
.ir-findings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.ir-finding{border:1px solid var(--border);border-radius:12px;padding:16px;min-width:0;overflow-wrap:anywhere;background:var(--surface)}
.ir-finding-number{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:8px;background:var(--magenta-light,#fcebf1);color:#e92c64;font-weight:700}
.ir-finding h3{margin:10px 0;font-size:1rem}.ir-finding p{font-size:.82rem;line-height:1.55;margin:10px 0}
.ir-next-step{padding:10px 12px;border-left:2px solid #fa3268;background:var(--section-alt)}.ir-next-step b{display:block;margin-bottom:4px}
.ir-finding .source-links{flex-wrap:wrap}.ir-original-details>summary{padding:17px 20px;cursor:pointer;font-weight:700;color:var(--navy)}
.ir-replay{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0}.ir-replay small{color:var(--ink-muted)}
@media(max-width:760px){.ir-findings-grid{grid-template-columns:1fr}.ir-progress-card .cardbody{padding:18px}}
@media(prefers-reduced-motion:reduce){.ir-spinner{animation:none}.ir-progress-track>span{transition:none}}
.ir-system-picker .field{margin:0}.ir-system-picker input{width:100%;min-width:0}
.ir-system-actions{display:flex;gap:8px;justify-content:flex-end;margin:10px 0}
.ir-system-selected,.ir-system-auto{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:13px 15px;border:1px solid var(--border);border-radius:10px;background:var(--section-alt)}
.ir-system-selected>div{min-width:0}.ir-system-selected p,.ir-system-auto p{font-size:.8rem;margin:5px 0}.ir-system-selected small{color:var(--ink-muted)}
.ir-system-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ir-system-result{text-align:left;white-space:normal;overflow-wrap:anywhere;padding:12px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--ink);font:inherit;font-size:.82rem;line-height:1.5;cursor:pointer}
.ir-system-result:hover,.ir-system-result:focus-visible{border-color:var(--magenta,#fa3268);background:var(--section-alt)}
.ir-assignment-error{margin-top:14px;padding:14px;border:1px solid #eea3ba;border-radius:10px;overflow-wrap:anywhere}.ir-assignment-error p{margin:8px 0}
@media(max-width:760px){.ir-system-results{grid-template-columns:1fr}}
/* Keep system choice and upload close together on desktop. */
.ir-system-picker .cardbody{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.ir-system-picker .ir-system-actions{margin:0 0 2px}
.ir-system-picker #irSystemResults,.ir-system-picker .ir-assignment-error{grid-column:1/-1}
.ir-system-selected,.ir-system-auto{padding:10px 12px}
@media(max-width:760px){.ir-system-picker .cardbody{grid-template-columns:1fr}.ir-system-picker .ir-system-actions{justify-content:flex-start}}
/* Quiet document comparison during the existing thirteen-second review. */
.ir-document-compare{--paper-accent:#294568;display:grid;grid-template-columns:minmax(0,210px) 82px minmax(0,210px);justify-content:center;align-items:center;margin:18px auto 22px;max-width:560px;isolation:isolate}
.ir-paper{position:relative;overflow:hidden;min-width:0;padding:14px 15px 12px;border:1px solid var(--border);border-radius:9px;background:var(--surface);box-shadow:0 6px 20px #2945680c;transform:rotate(-2deg)}
.ir-paper-contract{--paper-accent:#247e69;transform:rotate(2deg)}
.ir-paper-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;color:var(--paper-accent);font-size:.65rem;font-weight:800;letter-spacing:.09em}
.ir-paper-head i{font-style:normal;font-size:.9rem;display:grid;place-items:center;width:23px;height:23px;border-radius:6px;background:var(--section-alt)}
.ir-paper-line{height:4px;border-radius:3px;background:var(--border);margin:5px 0;opacity:.7}.ir-paper-line.wide{width:70%}.ir-paper-line.short{width:40%;margin-bottom:9px}
.ir-paper-row{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:6px 5px;border-radius:4px;font-size:.66rem;white-space:nowrap;color:var(--ink-muted)}
.ir-paper-row b{width:18px;height:3px;border-radius:2px;background:var(--border);flex:none}
.ir-paper-scan{position:absolute;left:0;right:0;top:0;height:26px;background:linear-gradient(transparent,#6686b625);border-bottom:1px solid #6686b675;animation:ir-paper-scan 3.3s ease-in-out infinite;pointer-events:none}
.ir-paper-contract .ir-paper-scan{animation-delay:.5s;border-bottom-color:#247e6975;background:linear-gradient(transparent,#247e6920)}
.ir-document-bridge{position:relative;height:166px;min-width:0}.ir-document-bridge svg{width:100%;height:100%;overflow:visible}.ir-bridge-track{stroke:var(--border);stroke-width:1}.ir-bridge-flow{stroke:#fa3268;stroke-width:1.8;stroke-dasharray:5 28;animation:ir-bridge-flow 2s linear infinite;opacity:.65}
.ir-bridge-icon{position:absolute;left:50%;top:14px;transform:translateX(-50%);width:34px;height:34px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--border);border-radius:50%;font-size:1.2rem;color:var(--navy)}
.ir-document-compare[data-stage="0"] .ir-paper-contract{opacity:.55}.ir-document-compare[data-stage="0"] .ir-bridge-flow{opacity:0}
.ir-document-compare[data-stage="2"] .ir-paper-row,.ir-document-compare[data-stage="3"] .ir-paper-row{animation:ir-row-compare 3.3s ease-in-out infinite}
.ir-document-compare .ir-paper-row.ir-row-2{animation-delay:1.1s}.ir-document-compare .ir-paper-row.ir-row-3{animation-delay:2.2s}
.ir-progress-card:has(.ir-document-compare) .cardbody{padding:22px 26px}.ir-progress-card:has(.ir-document-compare) h2{margin:12px 0 7px;font-size:1.15rem}.ir-progress-system{margin:12px 0 0}.ir-progress-card:has(.ir-document-compare) .ir-progress-track{margin:16px 0}.ir-progress-card:has(.ir-document-compare) .ir-running-steps{margin:15px 0}
@keyframes ir-paper-scan{0%{transform:translateY(-28px)}85%,100%{transform:translateY(180px)}}
@keyframes ir-bridge-flow{to{stroke-dashoffset:-66}}
@keyframes ir-row-compare{0%,65%,100%{background:transparent}15%,45%{background:#fa326815;color:var(--navy)}}
.ir-footer-tools{display:flex;gap:14px;align-items:center;min-width:0}.ir-footer-tools button{font:inherit;font-size:.68rem;color:var(--ink-faint);background:none;border:0;padding:5px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px;opacity:.65}.ir-footer-tools button:hover,.ir-footer-tools button:focus-visible{opacity:1;color:var(--navy)}
.ir-reset-scope{padding-left:20px;line-height:1.6}.ir-reset-scope li{margin:8px 0}.ir-reset-retained{padding:12px;background:var(--section-alt);border-radius:8px}.ir-reset-actions{margin-top:20px}.ir-reset-undo{display:flex;align-items:center;gap:14px;justify-content:space-between;flex-wrap:wrap;border-top:1px solid var(--border);margin-top:20px;padding-top:15px}
@media(max-width:760px){.ir-document-compare{grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr)}.ir-paper{padding:10px 7px}.ir-paper-row{font-size:.58rem;padding:7px 2px;white-space:normal}.ir-paper-row b{display:none}.ir-bridge-icon{width:26px;height:26px;font-size:1rem}.ir-progress-card:has(.ir-document-compare) .cardbody{padding:18px}.ir-footer-tools>span{display:inline!important}}
@media(prefers-reduced-motion:reduce){.ir-paper-scan,.ir-bridge-flow,.ir-document-compare .ir-paper-row{animation:none!important}.ir-paper-scan{display:none}.ir-bridge-flow{stroke-dasharray:none;opacity:.35}.ir-paper{transform:none}}

#modal .ir-reset-actions{display:flex;flex-direction:row;justify-content:flex-end;gap:10px;flex-wrap:wrap}
#supplierMailForm .field{display:block;margin:13px 0}#supplierMailForm input:not([type=hidden]),#supplierMailForm textarea{display:block;width:100%;min-width:0;margin-top:6px}#supplierMailForm textarea{font:inherit;font-size:.86rem;line-height:1.65;resize:vertical;min-height:260px}
.supplier-mail-note{padding:11px 13px;background:var(--section-alt);border:1px solid var(--border);border-radius:9px;font-size:.8rem}.supplier-mail-note span{display:block;font-weight:600}.supplier-mail-note small{display:block;margin-top:5px;line-height:1.5;color:var(--ink-muted)}
#modal .supplier-mail-actions{display:flex;flex-direction:row;gap:9px;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}
.supplier-task-choices{display:grid;gap:10px;margin:18px 0}.supplier-task-choices>label{display:flex;gap:12px;align-items:flex-start;padding:13px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.supplier-task-choices input{margin-top:4px;flex:none}.supplier-task-choices>label>span{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere}.supplier-task-choices small{color:var(--ink-muted)}.supplier-task-choices>label>span>span{font-size:.8rem;line-height:1.5}.supplier-task-choices>label:has(input:disabled){opacity:.65}
.supplier-tasks-table{min-width:0;width:100%;table-layout:fixed}.supplier-tasks-table th:nth-child(1){width:40%}.supplier-tasks-table th:nth-child(2){width:21%}.supplier-tasks-table th:nth-child(3){width:17%}.supplier-tasks-table th:nth-child(4){width:11%}.supplier-tasks-table th:nth-child(5){width:11%}.supplier-tasks-table td{white-space:normal;vertical-align:top;overflow-wrap:anywhere}.supplier-tasks-card .cardhead>.actions{display:flex;flex-direction:row;gap:8px;flex-wrap:wrap;justify-content:flex-end}
#modal:has(#supplierMailForm) h1{font-size:24px;margin:5px 0 8px}#supplierMailForm .field{margin:9px 0}#supplierMailForm textarea{height:220px;min-height:180px;font-weight:400;line-height:1.5}#supplierMailForm .supplier-mail-actions{margin-top:11px}
@media(max-width:700px){.supplier-tasks-table{min-width:640px}}

/* CCC navigation: complete labels, stable active state, no artificial word breaks. */
.sidebar:not(.collapsed) .premium-wrap{margin-inline:0;padding:10px 4px 6px}
.sidebar:not(.collapsed) .premium-wrap .sb-label{padding-inline:8px;font-size:.64rem;letter-spacing:.1em}
.sidebar:not(.collapsed) .premium-wrap .navitem{height:38px;min-height:38px;padding:8px;gap:8px;font-size:.82rem;font-weight:600;line-height:1.3;white-space:nowrap}
.sidebar:not(.collapsed) .premium-wrap .navitem.active{font-weight:600}
.sidebar:not(.collapsed) .premium-wrap .navitem>span:not(.navbadge){white-space:nowrap;overflow-wrap:normal;word-break:normal;hyphens:none}
.sidebar:not(.collapsed) .premium-wrap .navitem svg{width:16px;height:16px}
.sidebar:not(.collapsed) .premium-wrap .navitem.active::before{left:-5px;top:8px;bottom:8px}
.sidebar:not(.collapsed) .premium-wrap .sb-nav{margin-bottom:0}

.support-invoice-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;box-sizing:border-box}.support-invoice-empty p{max-width:360px;line-height:1.5}.support-source-links{margin-bottom:12px}#roleFaultForm textarea[name=sourceNote]{min-height:100px;line-height:1.5}

/* Dedicated amount column prevents labels from colliding with neighbouring bars. */
.support-invoice-card{container-type:inline-size}
.support-volume-head,.support-volume-row{display:grid;grid-template-columns:minmax(135px,1.25fr) minmax(50px,1fr) 108px;align-items:center;gap:14px}
.support-volume-head{font-size:.64rem;font-weight:600;color:var(--ink-faint);padding:0 4px 9px;line-height:1.4}
.support-volume-head>span:last-child{text-align:right}
.support-volume-rows{max-height:438px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable}
.support-volume-row{border:0;border-top:1px solid var(--border);width:100%;padding:11px 4px;background:transparent;text-align:left;font:inherit;color:var(--ink);cursor:pointer;border-radius:0;box-sizing:border-box}
.support-volume-row:hover{background:var(--surface-2,#f4f6fa)}
.support-volume-row:focus-visible{outline:2px solid var(--magenta);outline-offset:-2px;border-radius:6px}
.support-volume-name{min-width:0;line-height:1.35;overflow-wrap:anywhere}
.support-volume-name strong{display:block;font-size:.78rem;font-weight:600;color:var(--navy)}
.support-volume-name small,.support-volume-value small{display:block;font-size:.66rem;font-weight:400;line-height:1.4;color:var(--ink-muted);margin-top:3px}
.support-volume-track{display:block;background:var(--border);border-radius:5px;height:12px;min-width:0;overflow:hidden}
.support-volume-track i{display:block;height:100%;border-radius:5px}
.support-volume-value{min-width:0;text-align:right;font-variant-numeric:tabular-nums}
.support-volume-value strong{display:block;font-size:.79rem;font-weight:600;white-space:nowrap;color:var(--navy)}
.support-volume-note{font-size:.68rem;color:var(--ink-muted);line-height:1.5;margin:10px 4px 0}
@container(max-width:440px){.support-volume-head{grid-template-columns:minmax(0,1fr) 108px;gap:10px}.support-volume-head>span:nth-child(2){display:none}.support-volume-row{grid-template-columns:minmax(0,1fr) 108px;gap:7px 10px}.support-volume-name{grid-column:1;grid-row:1}.support-volume-value{grid-column:2;grid-row:1}.support-volume-track{grid-column:1 / -1;grid-row:2;height:7px}.support-volume-rows{max-height:438px}}

.deadline-summary{display:flex;gap:10px 20px;align-items:center;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--border);font-size:.74rem;color:var(--ink-muted)}
.deadline-summary b{color:var(--navy);font-variant-numeric:tabular-nums}.deadline-summary>small{margin-left:auto;font-size:.68rem}
.deadline-table{table-layout:fixed;min-width:850px;width:100%}.deadline-table td,.deadline-table th{white-space:normal;overflow-wrap:anywhere;vertical-align:top;line-height:1.45}.deadline-table td{padding-top:13px;padding-bottom:13px}.deadline-table td>small{display:block;margin-top:5px;line-height:1.4}.deadline-table .linkbtn{text-align:left;line-height:1.4;overflow-wrap:anywhere}.deadline-table .pill{white-space:normal;line-height:1.4;font-size:.65rem}.deadline-date b{color:var(--navy);font-variant-numeric:tabular-nums}.deadline-footnote{font-size:.72rem;color:var(--ink-muted);line-height:1.5;margin:0;padding:13px 16px;border-top:1px solid var(--border)}
.deadline-detail-dates{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.deadline-detail-dates>div{padding:15px;background:var(--surface-2,#f4f6fa);border:1px solid var(--border);border-radius:10px}.deadline-detail-dates small{display:block;color:var(--ink-muted);font-size:.75rem;margin-bottom:8px}.deadline-detail-dates b{color:var(--navy);font-size:1.15rem}.deadline-facts{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(0,1.5fr);gap:9px 16px;font-size:.82rem;line-height:1.5}.deadline-facts dt{color:var(--ink-muted)}.deadline-facts dd{margin:0;overflow-wrap:anywhere}.deadline-sources{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.deadline-edit{border:1px solid var(--border);padding:13px;border-radius:10px;display:block!important}.deadline-edit summary{font-weight:600;cursor:pointer}.deadline-edit p{font-size:.77rem;color:var(--ink-muted);line-height:1.5}.deadline-edit .formgrid{margin-top:14px}.deadline-confirm{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.deadline-confirm input{width:auto!important;margin-top:3px}.deadline-preview{padding:10px;background:var(--surface-2,#f4f6fa);border-radius:8px}.deadline-table .btn{max-width:100%;white-space:normal;padding-left:9px;padding-right:9px}
@media(max-width:600px){.deadline-detail-dates{grid-template-columns:1fr}.deadline-facts{grid-template-columns:1fr;gap:4px}.deadline-facts dd{margin-bottom:9px}}

/* Searchable entity selectors: shared between service, tasks, assignment and reporting. */
.entity-picker{min-width:0;width:100%;position:relative;font-weight:400}
.entity-picker-trigger{display:flex;align-items:center;gap:12px;justify-content:space-between;width:100%;min-height:38px;border:1px solid var(--border);border-radius:9px;background:var(--surface,#fff);color:var(--navy);padding:9px 12px;font:inherit;font-size:.82rem;line-height:1.45;text-align:left;cursor:pointer}
.entity-picker-trigger span{min-width:0;overflow-wrap:anywhere}.entity-picker-trigger svg{width:17px;height:17px;flex:none;color:var(--ink-muted)}
.entity-picker-trigger:focus-visible,.entity-picker-input:focus-visible{outline:2px solid var(--magenta);outline-offset:2px}.entity-picker-trigger[aria-expanded=true]{border-color:var(--magenta)}.entity-picker-trigger:disabled{opacity:.55;cursor:default}
.entity-picker-panel{margin-top:7px;border:1px solid var(--border);background:var(--surface,#fff);border-radius:10px;padding:9px;box-shadow:0 7px 20px #2945660e;min-width:0}
.entity-picker-panel[hidden],select[data-entity-picker][hidden]{display:none!important}
.entity-picker-input{display:block;width:100%;min-width:0;box-sizing:border-box;margin:0!important;font-size:.8rem!important;line-height:1.5;padding:9px 10px!important}
.entity-picker-count{font-size:.7rem;line-height:1.45;color:var(--ink-muted);padding:8px 2px}
.entity-picker-list{max-height:252px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.entity-picker-option{display:flex;flex-direction:column;gap:2px;padding:10px;border-radius:7px;cursor:pointer;line-height:1.45;overflow-wrap:anywhere;color:var(--navy);font-size:.8rem}
.entity-picker-option strong{font-weight:600}.entity-picker-option small{color:var(--ink-muted);font-size:.71rem}.entity-picker-option .entity-picker-site{font-size:.68rem}
.entity-picker-option+.entity-picker-option{border-top:1px solid var(--border)}
.entity-picker-option:hover,.entity-picker-option.is-active{background:var(--surface-2,#f2f5fa);outline:1px solid var(--border);outline-offset:-1px}.entity-picker-option[aria-selected=true]{box-shadow:inset 3px 0 var(--magenta);background:color-mix(in srgb,var(--magenta) 7%,var(--surface,#fff))}
@media(max-width:550px){.entity-picker-list{max-height:220px}.entity-picker-trigger{font-size:.78rem}.entity-picker-option{padding:9px 7px}}

/* Compact service form and manufacturer correspondence. */
#roleFaultForm textarea.fault-source-note{font-family:inherit;font-size:.8rem;font-weight:400;line-height:1.5;min-height:60px;height:60px;resize:vertical;max-height:200px}
.fault-field-help{display:block;font-size:.72rem!important;color:var(--ink-muted);line-height:1.5;font-weight:400;margin:6px 0 0}
.fault-check{display:flex!important;flex-direction:row!important;gap:10px!important;align-items:flex-start!important;margin:8px 0!important}
.fault-check input[type=checkbox]{appearance:auto;flex:0 0 16px;width:16px!important;height:16px!important;min-height:16px!important;padding:0!important;margin:3px 0 0!important;accent-color:var(--magenta)}
.fault-check span{min-width:0;line-height:1.5}.fault-check b{font-size:.8rem}.fault-check small{display:block;font-size:.71rem;font-weight:400;color:var(--ink-muted);margin-top:3px}
.fault-contact-section{border:1px solid var(--border);border-radius:10px;padding:14px;display:block!important;margin:8px 0 4px}
.fault-contact-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.fault-contact-heading h3{font-size:.95rem;margin:0}.fault-contact-section>.field{margin-top:12px;align-items:stretch!important;flex-direction:column;gap:6px;text-align:left}.fault-contact-section>.btn{margin-top:12px;white-space:normal}.fault-contact-heading .pill{white-space:normal}
.fault-mail-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.fault-mail-actions .btn{white-space:normal}.fault-send-confirm{border:1px solid var(--border);border-radius:10px;padding:13px;margin:18px 0}.fault-send-confirm summary{font-size:.82rem;font-weight:600;cursor:pointer}.fault-send-confirm .formgrid{margin:14px 0}
.fault-communication-history{margin:20px 0}.fault-communication-history h3{font-size:1rem}.fault-communication-history details{border:1px solid var(--border);border-radius:9px;padding:12px;margin-top:8px;font-size:.78rem;overflow-wrap:anywhere}.fault-communication-history summary{cursor:pointer;line-height:1.5}.fault-communication-history summary span{display:block;font-size:.7rem;color:var(--ink-muted)}.fault-communication-history pre{font-family:inherit;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;background:var(--surface);padding:10px}.fault-communication-history small{color:var(--ink-muted)}.fault-mail-back{margin-top:18px}
.fault-contact-indicator{display:flex!important;flex-direction:column;align-items:flex-start;gap:4px;max-width:230px;overflow-wrap:anywhere;white-space:normal!important}.fault-contact-indicator .pill{font-size:.62rem;white-space:normal}.fault-contact-indicator>span:last-child{line-height:1.4}
#faultManufacturerForm textarea{min-height:180px;max-height:360px;resize:vertical}#faultManufacturerForm input[readonly],#faultManufacturerForm textarea[readonly]{background:var(--bg);color:var(--ink-muted)}
