/* TCC Control — component styles. Every color, radius and size comes from tokens.css. */
body { margin: 0; font-family: var(--font-sans); background: var(--ground); color: var(--text-1); font-size: 13px; line-height: 1.35; }
* { box-sizing: border-box; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
.tc-row { display: flex; gap: var(--space-12); align-items: center; flex-wrap: wrap; padding: var(--space-16); }
.tc-col { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-16); }
.tc-card-ground { background: var(--card); border-radius: var(--radius-card); }
.tc-nums { font-variant-numeric: tabular-nums; }

/* icons */
.tc-icon { width: 18px; height: 18px; flex-shrink: 0; }
.tc-icon-lg { width: 20px; height: 20px; }
.tc-icon-nav { width: 22px; height: 22px; }
.tc-iconbox { width: 36px; height: 36px; border-radius: var(--radius-control); background: var(--control); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: inherit; }
.tc-iconbox.lg { width: 44px; height: 44px; }
.tc-iconbox.lg .tc-icon { width: 20px; height: 20px; }
.tc-iconbox.nested { background: var(--control-nested); }
.tc-iconbox.warn { color: var(--warning); }
.tc-iconbox.crit { color: var(--critical); }
.tc-iconbox.accent { color: var(--accent-text); }

/* buttons */
.tc-btn { height: 36px; padding: 0 var(--space-14); border-radius: var(--radius-control); border: 0; background: var(--control); color: var(--text-1); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); white-space: nowrap; flex-shrink: 0; }
.tc-btn.lit { background: var(--lit); color: var(--on-lit); }
.tc-btn.nested { background: var(--control-nested); }
.tc-btn.ghost { background: transparent; color: var(--text-2); }
.tc-btn.critical { background: var(--critical-fill); color: var(--on-accent); }
.tc-btn.xl { height: 48px; font-size: 14px; }
.tc-btn.lg { height: 44px; font-size: 14px; }
.tc-btn.md { height: 40px; font-size: 13px; }
.tc-btn.xs { height: 32px; padding: 0 var(--space-12); }
.tc-btn.full { width: 100%; }
.tc-btn:focus-visible, .tc-toggle:focus-visible, .tc-seg button:focus-visible, .tc-iconbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tc-iconbtn { width: 44px; height: 44px; border-radius: var(--radius-control); border: 0; background: var(--card); color: var(--text-1); display: inline-flex; align-items: center; justify-content: center; padding: 0; position: relative; flex-shrink: 0; }
.tc-iconbtn.lit { background: var(--lit); color: var(--on-lit); font-weight: 700; font-size: 13px; }
.tc-iconbtn.sm { width: 32px; height: 32px; background: var(--control); }
.tc-iconbtn .tc-dot { position: absolute; top: 9px; right: 10px; border: 2px solid var(--card); width: 8px; height: 8px; }
.tc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; display: inline-block; }
.tc-dot.warn { background: var(--warning-fill); }
.tc-dot.crit { background: var(--critical-fill); }
.tc-dot.off { background: var(--toggle-off); }

/* toggle */
.tc-toggle { width: 44px; height: 26px; border-radius: var(--radius-pill); border: 0; background: var(--toggle-off); position: relative; padding: 0; flex-shrink: 0; }
.tc-toggle .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--knob-off); transition: left .15s ease; }
.tc-toggle[aria-checked="true"] { background: var(--accent); }
.tc-toggle[aria-checked="true"] .knob { left: 21px; background: #ffffff; }
.tc-toggle.lg { width: 52px; height: 30px; }
.tc-toggle.lg .knob { width: 24px; height: 24px; }
.tc-toggle.lg[aria-checked="true"] .knob { left: 25px; }
.tc-toggle.pending { opacity: .55; }

/* segmented, stepper, chip, label */
.tc-seg { display: grid; gap: var(--space-6); }
.tc-seg button { height: 40px; border-radius: var(--radius-control); border: 0; background: var(--control); color: var(--text-1); font-weight: 600; font-size: 13px; white-space: nowrap; padding: 0 var(--space-6); }
.tc-seg button[aria-pressed="true"] { background: var(--lit); color: var(--on-lit); font-weight: 700; }
.tc-seg.sm button { height: 32px; font-size: 12px; }
.tc-seg.md button { height: 36px; }
.tc-stepper { display: flex; align-items: center; gap: var(--space-8); }
.tc-stepper .val { min-width: 52px; text-align: center; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.tc-stepper .val small { font-size: 14px; font-weight: 600; color: var(--text-3); }
.tc-stepper.big .val { min-width: 72px; font-size: 40px; }
.tc-stepper.big .val small { font-size: 20px; }
.tc-stepper button { width: 44px; height: 44px; border-radius: var(--radius-control); border: 0; background: var(--control); color: var(--text-1); display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
.tc-stepper-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-8); }
.tc-chip { font-size: 12px; font-weight: 600; padding: 5px var(--space-10); border-radius: var(--radius-control); background: var(--control); color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: var(--space-8); }
.tc-chip.lit { background: var(--lit); color: var(--on-lit); font-weight: 700; }
.tc-chip.strong { color: var(--text-1); font-weight: 700; }
.tc-chip.accent { color: var(--accent-text); }
.tc-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.tc-label.muted { color: var(--text-3); letter-spacing: .1em; }
.tc-label.warn { color: var(--warning); }
.tc-label.crit { color: var(--critical); }

/* section */
.tc-section { display: flex; flex-direction: column; gap: var(--space-10); }
.tc-section-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--space-4); }
.tc-section-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.tc-section-link { font-size: 13px; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.tc-section-status { font-size: 13px; font-weight: 600; color: var(--text-3); }
.tc-section-status.warn { color: var(--warning); }
.tc-section-status.crit { color: var(--critical); }

/* cards, rows, tiles */
.tc-card { border-radius: var(--radius-card); background: var(--card); padding: var(--space-16); display: flex; flex-direction: column; gap: var(--space-10); }
.tc-list { border-radius: var(--radius-card); background: var(--card); padding: var(--space-8); display: flex; flex-direction: column; }
.tc-divider { height: 1px; background: var(--control); margin: 2px var(--space-8); }
.tc-row-item { height: 56px; display: flex; align-items: center; gap: var(--space-12); padding: 0 var(--space-8); }
.tc-row-item.compact { height: 48px; }
.tc-row-item .text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tc-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-state { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-state.warn { color: var(--warning); font-weight: 700; }
.tc-state.crit { color: var(--critical); font-weight: 700; }
.tc-chev { color: var(--text-3); }
.tc-tile { height: 124px; border-radius: var(--radius-tile); background: var(--card); color: var(--text-1); padding: var(--space-14); display: flex; flex-direction: column; justify-content: space-between; }
.tc-tile .top { display: flex; justify-content: space-between; align-items: flex-start; }
.tc-tile .text { display: flex; flex-direction: column; min-width: 0; }
.tc-tile.on { background: var(--lit); color: var(--on-lit); }
.tc-tile.on .tc-iconbox { background: var(--lit-control); }
.tc-tile.on .tc-iconbtn.sm { background: var(--lit-control); color: var(--on-lit); }
.tc-tile.on .tc-state { color: var(--on-lit-muted); }
.tc-tile.stale { opacity: .85; }
.tc-tile.unavailable { opacity: .6; }
.tc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12); }

/* checklist, stat, bar */
.tc-check-row { height: 40px; display: flex; align-items: center; gap: var(--space-12); }
.tc-check-row .text { flex: 1; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-check { width: 22px; height: 22px; border-radius: var(--radius-check); border: 2px solid var(--pending-ring); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.tc-check.done { background: var(--accent); border: 0; color: var(--on-accent); }
.tc-check.warn { border-color: var(--warning-fill); }
.tc-check.crit { border-color: var(--critical-fill); }
.tc-stat { flex: 1; min-width: 0; border-radius: var(--radius-control); background: var(--control); padding: var(--space-10) var(--space-12); display: flex; flex-direction: column; gap: 2px; }
.tc-stat .val { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tc-stat .lbl { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-stat.warn .val { color: var(--warning); } .tc-stat.crit .val { color: var(--critical); } .tc-stat.muted .val { color: var(--text-3); }
.tc-stats { display: flex; gap: var(--space-8); }
.tc-bar { height: 8px; border-radius: var(--radius-pill); background: var(--control); overflow: hidden; }
.tc-bar i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--accent); }
.tc-bar.warn i { background: var(--warning-fill); }
.tc-bar.thin { height: 6px; }

/* hero (Next up), summary, dial */
.tc-hero { border-radius: var(--radius-card); background: var(--card); padding: 18px; display: flex; flex-direction: column; gap: var(--space-6); position: relative; overflow: hidden; }
.tc-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--space-6); background: linear-gradient(180deg, var(--brand-sky), var(--brand-tcc-blue) 55%, var(--brand-navy)); }
.tc-hero > * { padding-left: var(--space-6); }
.tc-hero .eyebrow { display: flex; justify-content: space-between; align-items: center; }
.tc-hero .title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.tc-hero .sub { font-size: 13px; color: var(--text-2); }
.tc-hero .chips { display: flex; gap: var(--space-6); flex-wrap: wrap; margin-top: var(--space-6); }
.tc-hero .actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-8); margin-top: var(--space-12); }
.tc-hero .actions.one { grid-template-columns: 1fr; }
.tc-summary { border-radius: var(--radius-card); background: var(--card); padding: var(--space-16) 18px; display: flex; align-items: center; gap: var(--space-14); }
.tc-summary .text { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tc-summary .val { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.tc-dial { position: relative; }
.tc-dial svg { display: block; }
.tc-dial .track { stroke: var(--control); }
.tc-dial .knob { fill: #ffffff; stroke: var(--text-1); stroke-width: 2; }
.tc-dial .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tc-dial .center .val { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.tc-dial.sm .center .val { font-size: 40px; }
.tc-dial .center .sub { font-size: 12px; color: var(--text-3); }
.tc-dial-row { display: flex; align-items: center; gap: var(--space-10); }
.tc-dial-row button { width: 48px; height: 48px; border-radius: var(--radius-control); border: 0; background: var(--control); color: var(--text-1); display: flex; align-items: center; justify-content: center; padding: 0; }

/* navigation */
.tc-tabbar { height: 84px; padding: var(--space-6) var(--space-8) 22px; background: var(--ground); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 390px; }
.tc-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); text-decoration: none; color: var(--text-3); font-size: 10px; font-weight: 600; }
.tc-tabbar a .pill { width: 48px; height: 32px; display: flex; align-items: center; justify-content: center; position: relative; border-radius: var(--radius-control); }
.tc-tabbar a[aria-current="page"] { color: var(--accent-text); font-weight: 700; }
.tc-tabbar a[aria-current="page"] .pill { background: var(--card); }
.tc-tabbar .tc-dot { position: absolute; top: 4px; right: 10px; }
.tc-rail { width: 88px; display: flex; flex-direction: column; align-items: center; padding: 26px 0 20px; gap: var(--space-8); background: var(--ground); }
.tc-rail a { width: 64px; height: 64px; border-radius: var(--radius-tile); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-decoration: none; color: var(--text-3); font-size: 10px; font-weight: 600; position: relative; }
.tc-rail a[aria-current="page"] { background: var(--card); color: var(--accent-text); font-weight: 700; }
.tc-rail .tc-dot { position: absolute; top: 12px; right: 14px; }
.tc-rail .gear { width: 44px; height: 44px; border-radius: var(--radius-control); margin-top: auto; }

/* overlays and states */
.tc-sheet { width: 363px; border-radius: var(--radius-card) var(--radius-card) var(--radius-tile) var(--radius-tile); background: var(--card); padding: var(--space-10) var(--space-16) var(--space-16); display: flex; flex-direction: column; gap: var(--space-12); }
.tc-sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--toggle-off); align-self: center; }
.tc-sheet.panel { border-radius: var(--radius-card); padding: 18px; width: 420px; }
.tc-sheet.panel .grab { display: none; }
.tc-sheet .head { display: flex; align-items: flex-start; gap: var(--space-12); }
.tc-sheet .head .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-sheet .head .title { font-size: 20px; font-weight: 700; line-height: 1.15; }
.tc-sheet .head .sub { font-size: 13px; color: var(--text-3); }
.tc-sheet .foot { display: flex; gap: var(--space-8); margin-top: var(--space-6); }
.tc-sheet .foot .tc-btn { flex: 1; } .tc-sheet .foot .tc-btn.lit { flex: 1.4; }
.tc-toast { width: 358px; border-radius: var(--radius-tile); background: var(--card); padding: var(--space-12) var(--space-14); display: flex; align-items: center; gap: var(--space-12); position: relative; overflow: hidden; }
.tc-toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.tc-toast.warn::before { background: var(--warning-fill); } .tc-toast.crit::before { background: var(--critical-fill); }
.tc-toast .text { flex: 1; display: flex; flex-direction: column; }
.tc-band { border-radius: var(--radius-tile); background: var(--card); padding: var(--space-10) var(--space-14) var(--space-10) var(--space-20); display: flex; align-items: center; gap: var(--space-14); position: relative; overflow: hidden; }
.tc-band::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--space-6); background: linear-gradient(180deg, var(--brand-sky), var(--brand-tcc-blue) 55%, var(--brand-navy)); }
.tc-band .text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tc-empty { border-radius: var(--radius-card); background: var(--card); padding: var(--space-12); display: flex; flex-direction: column; align-items: center; gap: var(--space-8); text-align: center; }
.tc-empty .tc-iconbox { background: var(--lit); color: var(--on-lit); }
.tc-skeleton { height: 124px; border-radius: var(--radius-tile); background: var(--card); padding: var(--space-14); display: flex; flex-direction: column; justify-content: space-between; }
.tc-skeleton i { display: block; background: var(--control); border-radius: var(--radius-control); }
.tc-status-pill { height: 32px; padding: 0 var(--space-12); border-radius: var(--radius-control); background: var(--card); display: inline-flex; align-items: center; gap: var(--space-8); font-size: 12px; font-weight: 600; color: var(--text-2); }
.tc-cache { height: 44px; padding: 0 var(--space-16); border-radius: var(--radius-control); background: var(--card); display: inline-flex; align-items: center; gap: var(--space-10); font-size: 13px; font-weight: 600; }

/* inputs */
.tc-field-wrap { display: flex; flex-direction: column; gap: var(--space-6); }
.tc-field { height: 48px; width: 100%; padding: 0 var(--space-14); border-radius: var(--radius-control); border: 0; background: var(--control); color: var(--text-1); font: inherit; font-size: 14px; outline: 0; }
.tc-field::placeholder { color: var(--text-3); }
.tc-field.sm { height: 40px; font-size: 13px; }
.tc-field:focus-visible, .tc-select:focus-visible, .tc-slider input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.tc-select-wrap { position: relative; display: inline-flex; align-items: center; width: 100%; }
.tc-select { appearance: none; -webkit-appearance: none; height: 48px; width: 100%; padding: 0 40px 0 var(--space-14); border-radius: var(--radius-control); border: 0; background: var(--control); color: var(--text-1); font: inherit; font-size: 14px; font-weight: 600; }
.tc-select.sm { height: 40px; font-size: 13px; }
.tc-select-wrap .tc-icon { position: absolute; right: 12px; pointer-events: none; color: var(--text-3); }
.tc-slider-row { display: flex; align-items: center; gap: var(--space-12); width: 100%; }
.tc-slider { position: relative; flex: 1; height: 26px; display: flex; align-items: center; }
.tc-slider .track { width: 100%; height: 8px; border-radius: var(--radius-pill); background: var(--control); overflow: hidden; }
.tc-slider .track i { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); }
.tc-slider input { position: absolute; inset: 0; width: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tc-slider::after { content: ""; position: absolute; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; left: calc(var(--pct, 0) * 1%); transform: translateX(-50%); pointer-events: none; box-shadow: 0 0 0 2px var(--card); }
.tc-slider-val { font-size: 13px; font-weight: 600; min-width: 36px; text-align: right; }
.tc-keypad { display: flex; flex-direction: column; gap: var(--space-8); }
.tc-pin { display: flex; justify-content: center; gap: var(--space-14); padding: var(--space-10) 0 var(--space-4); }
.tc-pin .d { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--toggle-off); }
.tc-pin .d.on { background: var(--accent); border: 0; }
.tc-keypad .keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.tc-key { height: 52px; border-radius: var(--radius-control); border: 0; background: var(--control); color: var(--text-1); font-size: 20px; font-weight: 700; }

/* charts */
.tc-chart { position: relative; display: flex; flex-direction: column; gap: var(--space-6); width: 100%; }
.tc-chart.has-tip { padding-top: 46px; }
.tc-chart-svg { display: block; width: 100%; }
.tc-chart-svg .grid { stroke: var(--control); stroke-width: 1; }
.tc-chart-svg .band { fill: var(--control); }
.tc-chart-svg .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tc-chart-svg .line.live, .tc-chart-svg .end { stroke: var(--accent); }
.tc-chart-svg .end { fill: var(--accent); stroke: none; }
.tc-chart-svg .line.compare { stroke: var(--text-3); }
.tc-chart-svg .line.second { stroke: var(--brand-sky); }
.tc-chart-svg .line.warn { stroke: var(--warning-fill); }
.tc-chart-svg .line.dashed { stroke-dasharray: 4 4; }
.tc-chart-svg .area { fill: var(--accent); opacity: .12; }
.tc-chart-svg .crosshair { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.tc-chart-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); }
.tc-legend { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.tc-legend-chip { display: inline-flex; align-items: center; gap: var(--space-6); font-size: 12px; font-weight: 600; color: var(--text-2); background: transparent; border: 0; padding: 4px 6px; border-radius: var(--radius-control); }
.tc-legend-chip .swatch { width: 14px; height: 0; border-top: 2px solid var(--accent); }
.tc-legend-chip .swatch.compare { border-color: var(--text-3); } .tc-legend-chip .swatch.second { border-color: var(--brand-sky); } .tc-legend-chip .swatch.warn { border-color: var(--warning-fill); }
.tc-legend-chip .swatch.dashed { border-top-style: dashed; }
.tc-legend-chip.muted { opacity: .42; }
.tc-chart-tip { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; padding: 6px 10px; border-radius: var(--radius-control); background: var(--control); font-size: 12px; pointer-events: none; z-index: 1; }
.tc-chart-tip .when { color: var(--text-3); } .tc-chart-tip .val { font-weight: 700; }
.tc-spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tc-spark circle { fill: var(--accent); }
.tc-spark.warn polyline { stroke: var(--warning-fill); } .tc-spark.warn circle { fill: var(--warning-fill); }
.tc-spark.crit polyline { stroke: var(--critical-fill); } .tc-spark.crit circle { fill: var(--critical-fill); }
.tc-spark.muted polyline { stroke: var(--text-3); } .tc-spark.muted circle { fill: var(--text-3); }
.tc-forecast { display: flex; gap: var(--space-4); }
.tc-forecast .day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); font-size: 11px; color: var(--text-3); }
.tc-forecast .day .hi { font-size: 12px; font-weight: 700; color: var(--text-1); }

/* rows, tiles, states */
.tc-alert { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-10) var(--space-8); }
.tc-alert .text { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.tc-alert .meta { display: flex; gap: var(--space-8); align-items: center; }
.tc-alert .meta .tc-icon { width: 14px; height: 14px; color: var(--accent-text); }
.tc-progress-row { height: 64px; display: flex; align-items: center; gap: var(--space-12); padding: 0 var(--space-8); }
.tc-progress-row .text { flex: 1; display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.tc-progress-row .line { display: flex; justify-content: space-between; gap: var(--space-8); }
.tc-history { height: 40px; display: flex; align-items: center; gap: var(--space-12); padding: 0 var(--space-8); }
.tc-history .when { width: 76px; font-size: 12px; color: var(--text-3); flex-shrink: 0; white-space: nowrap; }
.tc-history .text { display: flex; flex-direction: column; min-width: 0; }
.tc-history .tc-name { font-size: 13px; font-weight: 600; }
.tc-action { height: 96px; border-radius: var(--radius-tile); border: 0; background: var(--control); color: var(--text-1); padding: var(--space-12); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; text-align: left; }
.tc-action .tc-iconbox { width: 32px; height: 32px; }
.tc-action .text { display: flex; flex-direction: column; min-width: 0; }
.tc-action .tc-name { font-size: 13px; }
.tc-action .tc-state { font-size: 11px; }
.tc-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
.tc-notice { display: flex; gap: var(--space-10); padding: var(--space-12); border-radius: var(--radius-control); background: var(--control); font-size: 13px; color: var(--text-1); align-items: flex-start; }
.tc-notice .tc-icon { flex-shrink: 0; color: var(--accent-text); margin-top: 1px; }
.tc-notice.warn .tc-icon { color: var(--warning); } .tc-notice.crit .tc-icon { color: var(--critical); }
.tc-tour { width: 358px; border-radius: var(--radius-card); background: var(--card); padding: 18px; display: flex; flex-direction: column; gap: var(--space-8); outline: 2px solid var(--accent); outline-offset: 4px; }
.tc-tour .title { font-size: 18px; font-weight: 700; }
.tc-tour .body { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.tc-tour .foot { display: flex; justify-content: space-between; margin-top: var(--space-6); }
.tc-scrim { position: absolute; inset: 0; background: rgba(8, 12, 20, .72); display: flex; align-items: center; justify-content: center; }
.tc-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.tc-count.warn { background: var(--warning-fill); } .tc-count.crit { background: var(--critical-fill); color: #ffffff; }
.tc-btn.pending, .tc-tile.pending .tc-toggle { opacity: .55; pointer-events: none; }
.tc-dot.live { animation: tc-pulse 1.6s ease-in-out infinite; }
@keyframes tc-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
@media (prefers-reduced-motion: reduce) { .tc-dot.live { animation: none; } .tc-toggle .knob { transition: none; } }

/* ---- v2: control app. 44px floor for anything tappable; focus uses the focus token (accent fails 3:1 in light). ---- */
.tc-btn:focus-visible, .tc-toggle:focus-visible, .tc-seg button:focus-visible, .tc-iconbtn:focus-visible,
.tc-actionbtn:focus-visible, .tc-preset:focus-visible, .tc-stepper button:focus-visible, .tc-ktile:focus-visible, .tc-signin:focus-visible, .tc-avatar:focus-visible, .tc-codefield:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tc-toggle[aria-checked="true"] { background: var(--accent-fill); }
.tc-seg button { min-height: 44px; }
.tc-sheet .head .tc-iconbtn.sm { width: 44px; height: 44px; }
.tc-stepper button:disabled, .tc-actionbtn:disabled { opacity: .45; cursor: not-allowed; }
.tc-state.accent { color: var(--accent-text); font-weight: 700; }
.tc-notice.warn { background: var(--warning-tint); } .tc-notice.crit { background: var(--critical-tint); }

/* status chip: not tappable, says a fact */
.tc-schip { display: inline-flex; align-items: center; gap: var(--space-8); height: 32px; padding: 0 var(--space-12); border-radius: var(--radius-control); background: var(--control); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tc-schip .tc-icon { width: 16px; height: 16px; }
.tc-schip.accent { background: var(--accent-tint); color: var(--text-1); } .tc-schip.accent .tc-icon { color: var(--accent-text); }
.tc-schip.warn { background: var(--warning-tint); color: var(--text-1); } .tc-schip.warn .tc-icon { color: var(--warning); }
.tc-schip.crit { background: var(--critical-tint); color: var(--text-1); } .tc-schip.crit .tc-icon { color: var(--critical); }

/* header */
.tc-apphead { padding: var(--space-16) var(--space-16) var(--space-8); display: flex; flex-direction: column; gap: var(--space-12); }
.tc-apphead .bar { display: flex; align-items: center; justify-content: space-between; }
.tc-apphead .logo { width: 138px; height: 40px; object-fit: contain; object-position: left; }
.tc-apphead .greeting { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.tc-apphead .sub { margin: -6px 0 0; font-size: 13px; color: var(--text-3); }
.tc-apphead .chips { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.tc-avatar { width: 44px; height: 44px; border-radius: var(--radius-control); border: 0; background: var(--control); color: var(--text-1); font-weight: 700; font-size: 14px; }

/* role section */
.tc-rsection { display: flex; flex-direction: column; gap: var(--space-10); }
.tc-rsection .head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-12); }
.tc-rsection h2 { margin: 0; font-size: 16px; font-weight: 700; }
.tc-rsection .roles { font-size: 12px; color: var(--text-3); }
.tc-viewonly { display: inline-flex; align-items: center; gap: var(--space-4); font-size: 12px; font-weight: 600; color: var(--text-3); }
.tc-viewonly .tc-icon { width: 14px; height: 14px; }

/* action button: a whole row is the target */
.tc-actionbtn { width: 100%; min-height: 64px; display: flex; align-items: center; gap: var(--space-12); padding: var(--space-12) var(--space-16) var(--space-12) var(--space-12); border: 0; border-radius: var(--radius-tile); background: var(--card); color: var(--text-1); text-align: left; }
.tc-actionbtn .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-actionbtn .tail { display: inline-flex; align-items: center; gap: var(--space-6); color: var(--text-3); font-size: 12px; font-weight: 600; }
.tc-actionbtn > .tc-icon { color: var(--text-3); }
.tc-actionbtn.pending { opacity: .7; }
.tc-actionbtn.done { background: var(--accent-tint); }
.tc-actionbtn.failed { background: var(--critical-tint); }
.tc-actionbtn.lit { background: var(--lit); color: var(--on-lit); } .tc-actionbtn.lit .tc-state, .tc-actionbtn.lit .tail { color: var(--on-lit-muted); } .tc-actionbtn.lit .tc-iconbox { background: var(--lit-control); color: var(--on-lit); }
.tc-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--toggle-off); border-top-color: var(--accent-fill); animation: tc-spin 0.9s linear infinite; }
@keyframes tc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tc-spin { animation: none; } }
.tc-confirm-body { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); }

/* door row */
.tc-doorrow { display: flex; align-items: center; gap: var(--space-12); min-height: 64px; padding: var(--space-10) var(--space-12); }
.tc-doorrow .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-doorrow + .tc-doorrow { border-top: 1px solid var(--control); }

/* duration picker */
.tc-duration { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-16); }
.tc-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
.tc-preset { height: 44px; border-radius: var(--radius-control); border: 0; background: var(--control); color: var(--text-1); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tc-preset.on { background: var(--lit); color: var(--on-lit); font-weight: 700; }
.tc-duration .tc-stepper { justify-content: space-between; background: var(--control); border-radius: var(--radius-tile); padding: var(--space-8); }
.tc-duration .tc-stepper button { background: var(--card); }
.tc-duration .tc-stepper .val { font-size: 32px; letter-spacing: -0.02em; }
.tc-duration .hint { font-size: 12px; color: var(--text-3); text-align: center; }
.tc-snapshot { border-radius: var(--radius-tile); overflow: hidden; background: var(--control); aspect-ratio: 16 / 9; }
.tc-snapshot img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* unlock result */
.tc-result { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-20); border-radius: var(--radius-card); background: var(--accent-tint); }
.tc-result.warn { background: var(--warning-tint); } .tc-result.crit { background: var(--critical-tint); }
.tc-result .tc-iconbox { background: var(--card); }
.tc-result .title { margin: var(--space-8) 0 0; font-size: 20px; line-height: 1.2; font-weight: 700; }
.tc-result .body { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.tc-result .meta { margin: 0; font-size: 12px; color: var(--text-3); }
.tc-result .actions { display: flex; flex-direction: column; gap: var(--space-8); margin-top: var(--space-12); }

/* error / timeout inline state */
.tc-errstate { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-12) var(--space-12) var(--space-12) var(--space-16); border-radius: var(--radius-tile); background: var(--critical-tint); }
.tc-errstate.warn { background: var(--warning-tint); }
.tc-errstate > .tc-icon { color: var(--critical); } .tc-errstate.warn > .tc-icon { color: var(--warning); }
.tc-errstate .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-errstate .tc-state { white-space: normal; color: var(--text-2); }
.tc-errstate .tc-btn { background: var(--card); }

/* kiosk tile */
.tc-ktile { min-height: 132px; min-width: 200px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-16); padding: var(--space-20); border: 0; border-radius: var(--radius-card); background: var(--card); color: var(--text-1); text-align: left; }
.tc-ktile .text { display: flex; flex-direction: column; gap: 4px; }
.tc-ktile .name { font-size: 22px; line-height: 1.2; font-weight: 700; }
.tc-ktile .state { font-size: 16px; color: var(--text-3); }
.tc-ktile.on { background: var(--lit); color: var(--on-lit); } .tc-ktile.on .state { color: var(--on-lit-muted); } .tc-ktile.on .tc-iconbox { background: var(--lit-control); color: var(--on-lit); }
.tc-ktile.view { background: transparent; box-shadow: inset 0 0 0 2px var(--control); }

/* sign in */
.tc-signin { width: 100%; height: 52px; display: flex; align-items: center; justify-content: center; gap: var(--space-10); border: 0; border-radius: var(--radius-control); background: var(--control); color: var(--text-1); font-size: 15px; font-weight: 700; }
.tc-signin.lit { background: var(--lit); color: var(--on-lit); }
.tc-code { display: flex; flex-direction: column; gap: var(--space-8); }
.tc-codefield { height: 64px; width: 100%; border-radius: var(--radius-control); border: 1px solid var(--field-border); background: var(--card); color: var(--text-1); font: 700 28px/1 var(--font-sans); letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.tc-codefield.error { border: 2px solid var(--critical-fill); }

/* service card */
.tc-service { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-16); border-radius: var(--radius-card); background: var(--card); }
.tc-service .top { display: flex; align-items: center; justify-content: space-between; }
.tc-service .title { margin: 0; font-size: 20px; line-height: 1.15; font-weight: 700; }
.tc-service .sub { margin: 0; font-size: 13px; color: var(--text-3); }
.tc-service .items { display: flex; flex-direction: column; margin-top: var(--space-6); }
.tc-service .item { display: flex; gap: var(--space-12); padding: var(--space-8) 0; align-items: baseline; }
.tc-service .item + .item { border-top: 1px solid var(--control); }
.tc-service .item .when { width: 64px; flex-shrink: 0; font-size: 12px; color: var(--text-3); font-weight: 600; }
.tc-service .item .text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-service .item.now .when { color: var(--accent-text); }
.tc-appearance { display: flex; flex-direction: column; gap: var(--space-10); }
