/* Operator summary; shared portal tokens retain both shell themes. */
.tc-header.card{margin:12px 0;padding:12px 16px;border:1px solid var(--line);background:var(--surface)}
.tc-summary-main{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.tc-head-metric{display:flex;flex-direction:column;gap:3px;min-width:180px}
.tc-head-value{font:600 22px var(--font-mono);color:var(--ink)}
.tc-head-status{font:500 15px var(--font-sans);color:var(--ink-2)}
.tc-daily{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.tc-daily-metric{display:flex;align-items:baseline;gap:5px 12px;flex-wrap:wrap}
.tc-daily-metric .tc-label{flex-basis:100%}.tc-daily-value{font:600 16px var(--font-mono);color:var(--ink)}
.tc-daily-metric .tc-meta,.tc-daily-metric .tc-warning,.tc-daily-metric .tc-note{margin:0}
.tc-daily-chart{position:relative;display:grid;grid-template-columns:repeat(30,minmax(0,1fr));gap:2px;height:80px;border-bottom:1px solid var(--line-2);margin-top:8px}
.tc-daily-point{position:relative;display:flex;align-items:flex-end;justify-content:center;min-width:0;padding-bottom:4px}
.tc-daily-bar{display:block;width:100%;background:var(--ink-3);opacity:.65;min-height:2px}.tc-daily-gap{width:100%;border-bottom:1px dashed var(--ink-3)}
.tc-daily-mark{position:absolute;top:0;font-size:11px;color:var(--ink);line-height:12px}.tc-daily-chart svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.tc-daily-line{fill:none;stroke:var(--accent);stroke-width:2;vector-effect:non-scaling-stroke}.tc-daily-details{margin-top:6px;font-size:12px}.tc-daily-details summary{cursor:pointer;min-height:32px;padding:6px 0}.tc-daily-details .tc-note{margin:4px 0}
.tc-summary-main .to-launch{margin:0 0 0 auto;min-height:44px}
.tc-conditions{display:flex;gap:6px 16px;flex:1;flex-wrap:wrap}
.tc-conditions .tc-warning{margin:0;font-size:12px}
.tc-summary-foot{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:8px}
.tc-summary-foot .tc-meta{margin:0;font-size:11px}
.tc-header-details{font-size:12px;min-width:52px}
.tc-header-details summary{cursor:pointer;min-height:32px;padding:6px 0}
.tc-header-details[open]{flex-basis:100%}
.tc-summary-foot:has(.tc-header-details[open]){flex-wrap:wrap}
.tc-card{padding:10px 12px;border-top:1px solid var(--line);background:var(--surface)}
.tc-line{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:7px 0}
.tc-label{color:var(--ink-3);font-size:12px;min-width:0}
.tc-value{color:var(--ink);font:600 14px var(--font-mono);white-space:nowrap}
.tc-note,.tc-meta,.tc-guide,.tc-trend,.tc-warning,.tc-use,.tc-unknown,.tc-pending,.tc-command-status,.tc-coverage{margin:6px 0;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.tc-meta,.tc-note,.tc-coverage{color:var(--ink-3)}
.tc-warning{color:var(--ink-2);font-weight:600}
.tc-warning:before,.tc-use:before{content:'';display:inline-block;width:5px;height:5px;margin:0 5px 2px 0;border-radius:50%;background:var(--warn)}
.tc-unknown{color:var(--ink-2);font-weight:600}
.tc-use{color:var(--ink-2);font-weight:600}
.tc-details{margin-top:8px;border-top:1px solid var(--line)}
.tc-details summary{cursor:pointer;min-height:36px;padding:8px 0;font-size:12px}
.tc-comparison{margin:7px 0;color:var(--ink-2);font:500 11px/1.35 var(--font-sans);overflow-wrap:anywhere}
.tc-compare-basis{display:block;color:var(--ink-3);font-size:10px;font-weight:400}
.tc-history-window{padding:7px 0;border-bottom:1px solid var(--line)}
.tc-history-window-head{display:flex;align-items:baseline;justify-content:space-between;gap:6px}
.tc-history-rate{font:600 12px var(--font-mono);white-space:nowrap}
.tc-history-window .tc-note{font-size:11px;margin:4px 0}
.tc-compare-note{color:var(--ink-2);font:500 11px/1.4 var(--font-mono);margin:8px 0;overflow-wrap:anywhere}
.tc-history-chart-head,.tc-history-chart-dates{display:flex;justify-content:space-between;align-items:center;gap:4px;margin:8px 0 3px}
.tc-history-chart-head .tc-label,.tc-history-chart-head .tc-note{font-size:10px;margin:0}
.tc-history-chart{display:grid;grid-template-columns:repeat(30,minmax(0,1fr));gap:1px;height:80px;border-bottom:1px solid var(--line-2)}
.tc-history-day{display:flex;flex-direction:column;justify-content:flex-end;min-width:0}
.tc-history-marker,.tc-history-refill{height:14px;font-size:12px;line-height:12px;text-align:center;color:var(--ink-2)}
.tc-history-track{display:flex;height:64px;align-items:flex-end;justify-content:center;min-width:0}
.tc-history-bar{display:block;width:100%;max-height:62px;background:var(--ink-2);min-height:2px}
.tc-history-provisional{opacity:.55}
.tc-history-gap{border-bottom:1px dashed var(--ink-3);background:repeating-linear-gradient(135deg,transparent,transparent 4px,var(--line) 4px,var(--line) 5px)}
.tc-history-small{color:var(--ink-3);font-size:13px;line-height:16px}
.tc-history-chart-dates{font:400 9px var(--font-mono);color:var(--ink-3)}
.tc-daily-values,.tc-technical{border-top:1px solid var(--line);margin-top:10px}
.tc-history-daily-row{padding:6px 0;border-bottom:1px solid var(--line)}
.tc-history-day-label{font:500 11px var(--font-mono)}
.tc-history-daily-row .tc-note{font-size:11px;margin:3px 0}
.tc-history-check{border-top:1px solid var(--line);margin-top:10px;padding-top:8px}
.tc-history-check h4{font-size:12px;margin:0 0 5px}
.tc-history-check .tc-line{display:block}
.tc-history-check .tc-value{display:block;font-size:12px;white-space:normal}
.tc-technical summary{color:var(--ink-3)}
.tc-form{display:grid;gap:8px}
.tc-input,.tc-button{width:100%;min-height:44px;border:1px solid var(--line-2);border-radius:var(--radius-sm);background:var(--surface);color:var(--ink);font:inherit;padding:10px}
.tc-button{cursor:pointer;text-align:center;font-weight:600}.tc-button:disabled{opacity:.55}
.tc-button:focus-visible,.tc-input:focus-visible,.tc-details summary:focus-visible,.tc-header-details summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tank-monitor .tank-feed-status{font-size:12px;margin:0 0 6px;color:var(--ink-3)}
.tank-monitor .tank-manual-zone{padding:12px;gap:12px;min-height:100px}
.tank-monitor .tank-vessel{height:68px;width:32px;flex:none}
.tank-monitor .tank-card-head{padding:10px 12px;min-height:42px}
.tank-monitor .tank-card-head h3{font-size:14px;line-height:1.3}
.tank-monitor .tank-volume{font-size:24px;line-height:1.2}
.tank-monitor .tank-alarm{font-size:11px;margin-top:5px}
.tank-monitor .tank-sensor-details{padding:0 12px;margin:0;border-top:1px solid var(--line)}
.tank-sensor-details>summary{min-height:36px;padding:8px 0;font-size:12px}
.tank-monitor .tank-quality{margin:6px 12px;font-size:12px}
.tank-system-details{padding:8px 0;margin-top:12px;border-top:1px solid var(--line);font-size:12px}
.tank-system-details>summary{min-height:36px;padding:8px 0;cursor:pointer}
.tank-monitor .tank-footer{font-size:11px;margin-top:12px}
.mt-screen .tc-header.card{padding:12px;margin:10px 0}
.mt-screen .tc-summary-main{gap:10px;align-items:flex-start}
.mt-screen .tc-head-metric{min-width:0;flex:1}
.mt-screen .tc-conditions{order:3;flex-basis:100%}
.mt-screen .tc-summary-main .to-launch{order:2;padding:8px 12px}
.mt-screen .tc-summary-foot{flex-wrap:wrap;gap:4px}
.mt-screen .tc-summary-foot .tc-meta{flex:1;min-width:180px}
.mt-screen .mt-measures{display:block}
.mt-screen .mt-measures .mt-note:empty{display:none}
.mt-screen .mt-card-head .mt-muted{display:none}
.mt-screen .mt-status{font-size:12px;margin:6px 0}
.mt-screen .mt-card .tc-card{padding:10px 0}
.mt-screen .mt-details summary,.mt-screen .tc-details summary{min-height:44px}
.mt-screen .mt-counter{padding:8px 0}
.tank-monitor [hidden],.mt-screen [hidden]{display:none!important}
@media(max-width:600px){.tc-summary-main{gap:12px}.tc-head-metric{min-width:150px}.tc-summary-foot{flex-wrap:wrap}.tc-conditions{flex-basis:100%;order:3}.tc-head-value{font-size:21px}}
@media(max-width:480px){.tank-grid{grid-template-columns:minmax(0,1fr)}}

/* Restore the existing first-row visibility requirement on wide desktop screens.
   All content, chart height, calculations, smaller desktop and phone layouts stay intact. */
@media(min-width:1400px){
  .tank-monitor .tc-header.card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);grid-template-areas:"summary daily" "foot daily";column-gap:20px;align-items:start}
  .tank-monitor .tc-header>.tc-summary-main{grid-area:summary;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px}
  .tank-monitor .tc-header>.tc-summary-main>.tc-head-metric{grid-column:1;grid-row:1;min-width:0}
  .tank-monitor .tc-header>.tc-summary-main>.tc-conditions{grid-column:1/-1;grid-row:2;min-width:0}
  .tank-monitor .tc-header>.tc-summary-main>.to-launch{grid-column:2;grid-row:1;align-self:start;margin:0}
  .tank-monitor .tc-header>.tc-daily{grid-area:daily;min-width:0;margin-top:0;padding-top:0;border-top:0;border-left:1px solid var(--line);padding-left:20px}
  .tank-monitor .tc-header>.tc-summary-foot{grid-area:foot;min-width:0}
}

/* Preserve live first-row visibility at wide desktop sizes. */
@media(min-width:1400px){
  .tank-monitor .tc-header.card{margin:6px 0;padding-top:10px;padding-bottom:10px}
  .tank-monitor .tc-daily>.tc-history-chart-dates{margin:4px 0 2px}
  .tank-monitor .tc-daily>.tc-note{margin:4px 0}
  .tank-monitor .tc-daily>.tc-daily-details{margin-top:4px}
}
