/* ======================================================================
   GENERATED FILE -- do not edit directly.
   Rebuilt from css/_head.css (+ css/_extra.css, where present) and
   apps/_shared/css/app-shell.css by apps/_shared/sync-apps.py.
   Edit one of those source files, then re-run the sync script.
   ====================================================================== */

/*
  Tube Bias Calculator — standalone PWA
  ------------------------------------------------------------------
  Root design tokens (from the DiMastro site's styles.css) + the
  tube-bias-calculator widget styles, combined into one file, plus a
  small app-shell layer at the bottom for the installed-app feel
  (safe-area insets, fixed header, offline banner, install prompt).
*/

:root {
  --tbc-bg:            #1c1712;
  --tbc-panel:         #221b15;
  --tbc-panel-raised:  #2a2119;
  --tbc-well:          #16110d;
  --tbc-border:        #3c2f22;
  --tbc-border-soft:   #2f261c;

  --tbc-ink:           #f3ead9;
  --tbc-ink-muted:     #dfd0bd;
  --tbc-ink-faint:     #cd9c60;

  --tbc-glow:          #ff9142;
  --tbc-glow-dim:      #c96a2c;
  --tbc-glow-soft:     rgba(255, 145, 66, 0.16);

  --tbc-cold:          #4da3ff;
  --tbc-safe:          #7cbf8e;
  --tbc-warn:          #e7b84f;
  --tbc-warn-soft:     rgba(231, 184, 79, 0.14);
  --tbc-danger:        #e0522e;
  --tbc-danger-soft:   rgba(224, 82, 46, 0.14);

  --tbc-font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --tbc-font-body:    "IBM Plex Sans", "Segoe UI", sans-serif;
  --tbc-font-mono:    "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --tbc-radius:    14px;
  --tbc-radius-sm: 8px;
}


.tbc {
  font-family: var(--tbc-font-body);
  color: var(--tbc-ink);
  background:
    radial-gradient(120% 140% at 15% -10%, rgba(44, 33, 23, 0.8) 0%, transparent 55%),
    linear-gradient(175deg, rgba(34, 27, 21, 0.8) 0%, rgba(28, 23, 18, 0.8) 100%);
  border: 1px solid var(--tbc-border);
  border-radius: var(--tbc-radius);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 30px 60px -30px rgba(0, 0, 0, 0.6);
  max-width: 1480px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  position: relative;
}

.tbc *, .tbc *::before, .tbc *::after { box-sizing: border-box; }

.tbc :focus-visible {
  outline: 2px solid var(--tbc-glow);
  outline-offset: 2px;
}

/* ---------- header ---------- */
.tbc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.tbc-eyebrow {
  font-family: var(--tbc-font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tbc-glow);
  margin: 0 0 6px;
}

.tbc-title {
  font-family: var(--tbc-font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 6px;
  color: var(--tbc-ink);
}

.tbc-sub {
  font-size: 13.5px;
  color: var(--tbc-ink-muted);
  margin: 0;
  max-width: 100ch;
}

.tbc-badge {
  flex: none;
  font-family: var(--tbc-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tbc-ink-faint);
  border: 1px solid var(--tbc-border);
  border-radius: 0;
  padding: 5px 10px;
  white-space: nowrap;
}

/* ---------- warning strip ---------- */
.tbc-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--tbc-danger-soft);
  border: 1px solid rgba(224, 82, 46, 0.35);
  border-radius: var(--tbc-radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #f0d3c8;
  margin-bottom: 22px;
}
.tbc-warning[hidden] { display: none; }

.tbc-warning svg { flex: none; margin-top: 2px; color: var(--tbc-danger); }
.tbc-warning strong { color: #fff; }

/* .tbc-db-notice now lives in the shared apps/_shared/css/app-shell.css
   (it was a byte-identical duplicate of that same rule, kept here
   before this file was split out) */

/* ---------- setup row (tube + voltage) ---------- */
.tbc-setup {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  padding: 18px;
  background: rgba(42, 33, 25, 0.8);
  border: 1px solid var(--tbc-border-soft);
  border-radius: var(--tbc-radius-sm);
}

.tbc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--tbc-ink-muted);
}

.tbc-field-label {
  font-family: var(--tbc-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tbc-ink-faint);
}

.tbc-select,
.tbc-input {
  font-family: var(--tbc-font-body);
  font-size: 15px;
  color: var(--tbc-ink);
  background: var(--tbc-well);
  border: 1px solid var(--tbc-border);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.tbc-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333333' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.tbc-input:focus, .tbc-select:focus {
  border-color: var(--tbc-glow-dim);
  box-shadow: 0 0 0 3px var(--tbc-glow-soft);
  outline: none;
}

.tbc-input-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.tbc-input-unit .tbc-input { padding-right: 54px; }

.tbc-unit {
  position: absolute;
  right: 12px;
  font-family: var(--tbc-font-mono);
  font-size: 11.5px;
  color: var(--tbc-ink-faint);
  pointer-events: none;
}

.tbc-hint {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--tbc-ink-faint);
  min-height: 1.4em;
}

.tbc-hint strong { color: var(--tbc-ink-muted); font-weight: 600; }

/* ---------- Class A / Class AB reference strip ---------- */
.tbc-reference {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--tbc-border-soft);
  border: 1px solid var(--tbc-border-soft);
  border-radius: var(--tbc-radius-sm);
  overflow: hidden;
  margin: 18px 0;
}

.tbc-ref-col {
  background: rgba(34, 27, 21, 0.8);
  padding: 14px 16px;
}

.tbc-ref-col h3 {
  font-family: var(--tbc-font-display);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tbc-ink-muted);
  margin: 0 0 10px;
}

.tbc-ref-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px dashed var(--tbc-border-soft);
  font-size: 12.5px;
}

.tbc-ref-row:first-of-type { border-top: none; }

.tbc-ref-row dt { color: var(--tbc-ink-muted); font-weight: 400; }
.tbc-ref-row dt span {
  display: inline-block;
  margin-left: 5px;
  font-family: var(--tbc-font-mono);
  font-size: 10.5px;
  color: var(--tbc-ink-faint);
}
.tbc-ref-row dd {
  margin: 0;
  font-family: var(--tbc-font-mono);
  font-size: 13.5px;
  color: var(--tbc-ink);
  white-space: nowrap;
}

/* ---------- gauge class selector ---------- */
.tbc-class-select {
  max-width: 200px;
  margin: 28px 0 18px;
}

/* ---------- mode dial ---------- */
.tbc-modes {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--tbc-border-soft);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tbc-modes::-webkit-scrollbar { display: none; }

.tbc-mode-btn {
  flex: none;
  font-family: var(--tbc-font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--tbc-ink-faint);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 6px 12px;
  margin-right: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms ease, border-color 120ms ease;
}

.tbc-mode-btn:hover { color: var(--tbc-ink-muted); }

.tbc-mode-btn.is-active {
  color: var(--tbc-glow);
  border-bottom-color: var(--tbc-glow);
}

/* ---------- calculation panel ---------- */
.tbc-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.tbc-mode-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tbc-mode-group[hidden] { display: none; }

.tbc-mode-copy {
  font-size: 12.5px;
  color: var(--tbc-ink-faint);
  margin: 0 0 2px;
  line-height: 1.5;
}

/* ---------- readout / gauge ---------- */
.tbc-readout {
  position: relative;
  background: var(--tbc-panel-raised);
  border: 1px solid var(--tbc-border-soft);
  border-radius: var(--tbc-radius-sm);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.tbc-tube-frame {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

.tbc-tube-photo { width: 100%; height: auto; display: block; }

.tbc-gauge-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 240px;
}

.tbc-gauge {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 4px rgba(0, 0, 0, 0.9));
}

.tbc-gauge-figure {
  font-family: var(--tbc-font-mono);
  font-size: 22px;
  fill: #ffffff;
}

.tbc-gauge-label {
  font-family: var(--tbc-font-body);
  font-size: 9.5px;
  fill: var(--tbc-ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tbc-gauge-tick {
  font-family: var(--tbc-font-mono);
  font-size: 8.5px;
  fill: var(--tbc-ink);
}

.tbc-readout-values {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  width: 100%;
  margin-top: 2px;
}

.tbc-big-value {
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid var(--tbc-border-soft);
}

.tbc-big-value .tbc-num {
  display: block;
  font-family: var(--tbc-font-mono);
  font-size: 19px;
  color: var(--tbc-glow);
  text-shadow: 0 0 18px var(--tbc-glow-soft), 0 1px 3px rgba(0, 0, 0, 0.9);
  line-height: 1.2;
}

.tbc-big-value small {
  display: block;
  font-size: 10px;
  color: var(--tbc-ink);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
/*  text-transform: uppercase;*/
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.tbc-steps {
  width: 100%;
  margin: 6px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--tbc-border-soft);
  font-size: 11.5px;
  color: var(--tbc-ink);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tbc-steps span { color: #ffffff; font-family: var(--tbc-font-mono); }

/* ---------- bench reference table ---------- */
.tbc-bench {
  margin-top: 22px;
  border-top: 1px solid var(--tbc-border-soft);
  padding-top: 14px;
}

.tbc-bench summary {
  cursor: pointer;
  font-family: var(--tbc-font-display);
  font-size: 13px;
  color: var(--tbc-ink-muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tbc-bench summary::-webkit-details-marker { display: none; }
.tbc-bench summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 150ms ease;
}
.tbc-bench[open] summary::before { transform: rotate(45deg); }

.tbc-bench-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 12.5px;
}
.tbc-bench-table th, .tbc-bench-table td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--tbc-border-soft);
}
.tbc-bench-table th {
  font-family: var(--tbc-font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tbc-ink-faint);
  font-weight: 400;
}
.tbc-bench-table td { color: var(--tbc-ink-muted); font-family: var(--tbc-font-mono); }
.tbc-bench-table td:first-child { font-family: var(--tbc-font-body); color: var(--tbc-ink); }

/* ---------- footer ---------- */
.tbc-footer {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--tbc-ink-faint);
  line-height: 1.6;
}

/* ---------- responsive ---------- */
@media (max-width: 1480px) {
  .tbc { padding: 20px 16px; }
  .tbc-setup { grid-template-columns: 1fr; }
  .tbc-reference { grid-template-columns: 1fr; }
  .tbc-panel { grid-template-columns: 1fr; }
  .tbc-title { font-size: 22px; }
  .tbc-tube-frame { width: 90%; }

  /* Four measurement-method tabs don't fit one scrollable row on a phone
     without the person having to notice and drag it — lay them out as a
     2x2 grid instead so all four are visible at once, no interaction
     needed to discover the hidden ones. */
  .tbc-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow-x: visible;
    gap: 2px 10px;
  }
  .tbc-mode-btn {
    margin-right: 0;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    font-size: 12px;
    padding: 8px 4px 10px;
    border-bottom: 2px solid var(--tbc-border-soft);
  }
  .tbc-mode-btn.is-active { border-bottom-color: var(--tbc-glow); }
}

@media (prefers-reduced-motion: reduce) {
  .tbc-select, .tbc-input, .tbc-mode-btn { transition: none; }
  .tbc-gauge * { transition: none !important; }
}

/* ==================================================================
   APP SHELL — standalone PWA layer
   ================================================================== */

/* ======================================================================
   Shared PWA app-shell layer — canonical source
   ----------------------------------------------------------------------
   Generic standalone-app chrome shared by every DiMastro GTA PWA
   (safe-area insets, .install-gate, .tbc-db-notice, and related
   install/offline UI). Written against the --tbc-* custom properties;
   each app's own :root block (in its own css/_head.css) either
   declares --tbc-* directly, or aliases its own token names to them.

   DO NOT EDIT apps/<name>/css/styles.css directly for anything in this
   section — edit this file instead, then run:
     python3 apps/_shared/sync-apps.py
   to regenerate every app's actual served styles.css. Edits made
   straight to a generated styles.css will be overwritten on next sync.

   Tool-specific widget CSS (the calculator itself) lives in each app's
   own css/_head.css and is untouched by this file or the sync script.
   ====================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  background: var(--tbc-bg);
  color: var(--tbc-ink);
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  background: var(--tbc-bg);
  color: var(--tbc-ink);
  min-height: 100%;
  font-family: var(--tbc-font-body);
  /* Safe-area padding so content clears the iPhone notch / home
     indicator when running standalone (added to home screen). */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  /* Single scroll container = reliable trackpad + touch scroll.
     Do NOT also set overflow-x on html — nested scroll containers
     break trackpad and touch scrolling on some browsers. */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

/* While an install gate is open, lock the document so only the gate scrolls */
html.gate-open,
html.gate-open body {
  overflow: hidden !important;
  height: 100%;
  touch-action: none;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 14px) 18px 14px;
  background: linear-gradient(180deg, rgba(28, 23, 18, 1) 0%, rgba(28, 23, 18, 0.94) 100%);
  border-bottom: 1px solid var(--tbc-border-soft);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.app-header h1 {
  font-family: var(--tbc-font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--tbc-ink);
  margin: 0;
  letter-spacing: 0.01em;
}

.app-header-brand {
  font-family: var(--tbc-font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tbc-ink);
  margin-left: auto;
  white-space: nowrap;
}

.app-header-brand-gta {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--tbc-ink-faint);
}

main.app-main {
  padding: 20px 14px calc(40px + env(safe-area-inset-bottom));
}

/* the .tbc widget already caps at 760px and centers itself, this just
   removes its normal page-embedded spacing assumptions */
/* Tools with their own content wrapper (not .tbc) already set their
   own width in the section above — this rule only matters on tools
   that actually use .tbc for their widget. */

.app-footer {
  max-width: 960px;
  margin: 18px auto 0;
  padding: 0 4px;
  font-size: 11.5px;
  color: var(--tbc-ink-faint);
  text-align: center;
  line-height: 1.6;
}

.app-footer a { color: var(--tbc-glow-dim); }

/* Offline / update banners */
.app-banner {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 50;
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--tbc-panel-raised);
  border: 1px solid var(--tbc-border);
  border-radius: var(--tbc-radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--tbc-ink-muted);
  box-shadow: 0 12px 30px -12px rgba(0,0,0,0.6);
}

.app-banner.is-visible { display: flex; }

.app-banner button {
  margin-left: auto;
  background: var(--tbc-glow);
  color: #241a0f;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--tbc-font-display);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
}

.app-banner .app-banner-dismiss {
  background: transparent;
  color: var(--tbc-ink-faint);
  padding: 7px 8px;
}

@media (max-width: 420px) {
  .app-header h1 { font-size: 14.5px; }
  .app-header-brand,
  .app-header-brand-gta { font-size: 16px; }
}

/* ==================================================================
   INSTALL GATE
   ================================================================== */

.install-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 140% at 50% -10%, rgba(255, 145, 66, 0.10) 0%, transparent 55%),
    var(--tbc-bg);
}

.install-gate.is-hidden { display: none; }

.install-gate-card {
  max-width: 380px;
  width: 100%;
  text-align: center;
  background: var(--tbc-panel);
  border: 1px solid var(--tbc-border);
  border-radius: var(--tbc-radius);
  padding: 34px 26px 26px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.install-gate-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.install-gate-card h2 {
  font-family: var(--tbc-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--tbc-ink);
  margin: 0 0 10px;
}

.install-gate-sub {
  font-size: 13.5px;
  color: var(--tbc-ink-muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.install-gate-btn {
  width: 100%;
  background: var(--tbc-glow);
  color: #241a0f;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-family: var(--tbc-font-display);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background-color 140ms ease;
}
.install-gate-btn:hover { background: var(--tbc-glow-dim); }

.install-gate-ios-hint {
  font-size: 13px;
  color: var(--tbc-ink-muted);
  background: rgba(34, 27, 21, 0.8);
  border: 1px solid var(--tbc-border-soft);
  border-radius: var(--tbc-radius);
  padding: 12px 14px;
  margin: 0 0 16px;
  line-height: 1.6;
}
.install-gate-ios-hint svg { vertical-align: -3px; margin: 0 2px; color: var(--tbc-glow); }
.install-gate-ios-hint strong { color: var(--tbc-ink); }

.install-gate.is-ios .install-gate-btn,
.install-gate.is-ios #installGateAndroidNotice,
.install-gate.is-ios .install-gate-ios-hint,
.install-gate.is-ios #dmPlatformRow {
  display: none !important;
}
.install-gate-ios-panel {
  text-align: left;
  background: rgba(34, 27, 21, 0.88);
  border: 1px solid var(--tbc-border-soft);
  border-radius: var(--tbc-radius);
  padding: 14px 16px 12px;
  margin: 0 0 18px;
  color: var(--tbc-ink-muted);
}
.install-gate-ios-lead {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--tbc-ink);
}
.install-gate-ios-steps {
  margin: 0 0 10px;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--tbc-ink-muted);
}
.install-gate-ios-steps li { margin: 0 0 8px; }
.install-gate-ios-steps li:last-child { margin-bottom: 0; }
.install-gate-ios-steps strong { color: var(--tbc-ink); }
.install-gate-ios-steps svg { vertical-align: -3px; margin: 0 2px; color: var(--tbc-glow); }
.install-gate-ios-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--tbc-ink-faint, var(--tbc-ink-muted));
  opacity: 0.9;
}




.install-gate-link {
  display: block;
  font-size: 13px;
  color: var(--tbc-glow-dim);
  text-decoration: underline;
  margin-bottom: 12px;
}
.install-gate-link:hover { color: var(--tbc-glow); }

.install-gate-back-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  font-size: 11.5px;
  color: var(--tbc-ink-faint);
  background: rgba(205, 156, 96, 0.14);
  border: 1px solid rgba(205, 156, 96, 0.35);
  border-radius: 999px;
  text-decoration: none;
}
.install-gate-back-btn:hover {
  background: rgba(205, 156, 96, 0.22);
  color: var(--tbc-ink);
}

.install-gate-skip {
  display: inline-block;
  background: rgba(77, 163, 255, 0.14);
  border: 1px solid rgba(77, 163, 255, 0.35);
  color: var(--tbc-cold);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 10px;
}
.install-gate-skip:hover { background: #e5e5e5; color: #111; }

.tbc-db-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--tbc-warn-soft);
  border: 1px solid rgba(231, 184, 79, 0.35);
  border-radius: var(--tbc-radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tbc-ink-muted);
  margin-bottom: 22px;
}
.tbc-db-notice[hidden] { display: none; }
.tbc-db-notice svg { flex: none; margin-top: 2px; color: var(--tbc-warn); }
.tbc-db-notice strong { color: var(--tbc-warn); }

/* Print (shared) */
@media print {
  .install-gate,
  .install-tip,
  .app-banner,
  #offlineBanner,
  #updateBanner,
  .dm-print-hide,
  nav, header, footer {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #111 !important;
  }
}
.dm-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--tbc-border, #3c2f22);
  color: var(--tbc-ink-muted, #dfd0bd);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  margin: 8px 0 16px;
}

/* ======================================================================
   Pure B&W theme — universal parts shared by every PWA app.
   Each app's own css/_head.css additionally overrides that app's own
   --tbc-* :root tokens and any app-specific widget quirks; this block
   only covers what's genuinely identical across bias/tsc/scope/
   resistor/capacitor: sharp corners, image grayscale, status badges,
   and this shared install-gate/banner chrome (all defined in this
   same file, which is why it belongs here instead of duplicated five
   times across per-app source files).
   ====================================================================== */

/* Sharp corners everywhere */
*, *::before, *::after {
  border-radius: 0 !important;
}

/* Grayscale every image/icon; each app's own _head.css carries the
   ".tbc-gauge stays in color" exemption where that app has a gauge. */
img, svg:not(.tbc-gauge), canvas, video {
  filter: grayscale(1) !important;
}
svg.tbc-gauge, .tbc-gauge-wrap svg {
  filter: none !important;
}

/* App header: plain black bar (matching the main site's nav), text
   forced white regardless of the --tbc-ink token now being dark —
   without this, header text would inherit the new dark ink color and
   go unreadable against its own dark background. */
.app-header {
  background: #000000 !important;
  border-bottom: none !important;
}
.app-header h1,
.app-header-brand,
.app-header-brand-gta {
  color: #ffffff !important;
}

/* Generic safety-badge / status-pill neutralizer. Excludes <img> so it
   can't repeat the badge-vs-logo bug found on bias (amp-logo classes
   containing "-badge" getting force-painted black). */
*:not(img)[class*="-badge"], *:not(img)[class*="badge-"],
.tbcp-safety-badge {
/*   background: #111111 !important; */
  color: #666666 !important;
/*   border-color: #111111 !important; */
}

/* install-gate-btn / app-banner button: same "background: var(--tbc-
   glow) [now black] + hardcoded dark text" pairing found repeatedly
   on the main site. */
.install-gate-btn,
.app-banner button {
  background: #111111 !important;
  color: #ffffff !important;
}
.install-gate-btn:hover {
  background: #333333 !important;
}

/* Desktop/folder-tip panels use a hardcoded dark inline/CSS background
   paired with --tbc-ink-muted, now dark too — same low-contrast
   pattern as the main site's Apps page OS cards. */
.dm-platform-item,
.install-gate-folder-tip,
.install-gate-ios-hint,
.install-gate-ios-panel {
  background: #f5f5f5 !important;
  border-color: #cccccc !important;
}
.dm-platform-item span,
.dm-platform-item strong,
.install-gate-folder-tip,
.install-gate-folder-tip strong,
.install-gate-ios-hint,
.install-gate-ios-hint strong,
.install-gate-ios-panel,
.install-gate-ios-panel * {
}
.install-gate-back-btn,
.install-gate-skip {
  background: #f5f5f5 !important;
  border-color: #ccc !important;
  color: #444 !important;
}
.install-gate-back-btn:hover {
  background: #e5e5e5 !important;
  color: #111 !important;
}

/* Tube Bias Calculator Pro — app-specific shell override
   ------------------------------------------------------------------
   The wizard's compact phone-first layout caps narrower than the
   generic shell default, so this narrows both the widget wrapper
   and the footer to match once installed as a standalone app. */
.tbc {
  max-width: 1480px;
  padding: 0;
}

.app-footer {
  max-width: 1480px;
  margin: 18px auto 0;
  padding: 0 4px;
  font-size: 11.5px;
  color: var(--tbc-ink-faint);
  text-align: center;
  line-height: 1.6;
}

/* ====================================================================
   Below: additive rules for the wizard (measurement-method tabs,
   nudge stepper, probe-reads radio group, safety-check cards).
   Merged in from css/tube-bias-calculator-pro.css on the main site.
   ==================================================================== */

/*
  Tube Bias Calculator Pro — additive stylesheet
  ------------------------------------------------
  Loads after tube-bias-calculator.css and inherits its --tbc-* tokens
  and .tbc base component classes (header, warning, setup, reference,
  modes, panel, readout, gauge, bench table, footer) unchanged. This
  file only adds the new pieces specific to the wizard: step labels,
  the plate-voltage nudge stepper, the probe-reads radio group, and
  the two safety-check cards. Namespaced .tbcp- to avoid any collision
  with the existing .tbc- classes.
*/

.tbcp-step-label {
  font-family: var(--tbc-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tbc-ink-faint);
  margin: 22px 0 10px;
}

/* ---------- plate-voltage nudge stepper ---------- */
.tbcp-nudge-wrap {
  gap: 6px;
}

.tbcp-nudge-wrap .tbcp-nudge-input {
  padding-right: 58px;
  text-align: center;
}

.tbcp-nudge-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--tbc-border);
  background: var(--tbc-panel-raised);
  color: var(--tbc-ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 120ms ease, color 120ms ease;
}

.tbcp-nudge-btn:first-child { order: -1; }

.tbcp-nudge-btn:hover {
  border-color: var(--tbc-glow-dim);
  color: var(--tbc-glow);
}

.tbcp-nudge-hint {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--tbc-ink-faint);
  line-height: 1.5;
}

/* ---------- probe-reads radio group ---------- */
.tbcp-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.tbcp-radio {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--tbc-ink-muted);
  line-height: 1.45;
  cursor: pointer;
}

.tbcp-radio input[type="radio"] {
  flex: none;
  margin-top: 2px;
  accent-color: var(--tbc-glow);
}

/* ---------- safety check cards ---------- */
.tbcp-safety-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

.tbcp-safety-card {
  background: var(--tbc-panel-raised);
  border: 1px solid var(--tbc-border-soft);
  border-radius: var(--tbc-radius-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tbcp-safety-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tbcp-safety-card-head h3 {
  font-family: var(--tbc-font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--tbc-ink);
  margin: 0;
}

.tbcp-safety-badge {
  flex: none;
  font-family: var(--tbc-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--tbc-border);
  color: var(--tbc-ink-faint);
  background: transparent;
  white-space: nowrap;
}

.tbcp-safety-badge.is-ok {
  color: var(--tbc-safe);
  border-color: rgba(124, 191, 142, 0.4);
  background: rgba(124, 191, 142, 0.12);
}

.tbcp-safety-badge.is-warn {
  color: var(--tbc-warn);
  border-color: rgba(231, 184, 79, 0.4);
  background: var(--tbc-warn-soft);
}

.tbcp-safety-badge.is-danger {
  color: var(--tbc-danger);
  border-color: rgba(224, 82, 46, 0.4);
  background: var(--tbc-danger-soft);
}

.tbcp-safety-readout {
  margin: 0;
  font-size: 13px;
  color: var(--tbc-ink);
  line-height: 1.5;
}

.tbcp-safety-readout strong {
  font-family: var(--tbc-font-mono);
  color: var(--tbc-glow);
}

.tbcp-safety-footnote {
  margin: 0;
  font-size: 11px;
  color: var(--tbc-ink-faint);
  line-height: 1.5;
}

/* ---------- Tier 2: "Understanding this calculator" accordion prose ---------- */
/* Typography intentionally mirrors .dm-article h3/p (the guide-page prose
   this accordion links out to) so the two read as one consistent voice. */
.tbc-bench-prose {
  margin-top: 14px;
}
.tbc-bench-prose h3 {
  font-family: var(--tbc-font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--tbc-glow);
  margin: 20px 0 8px;
}
.tbc-bench-prose h3:first-child { margin-top: 0; }
.tbc-bench-prose p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--tbc-ink-muted);
  margin: 0 0 14px;
}
.tbc-bench-prose p:last-child { margin-bottom: 0; }
.tbc-bench-prose strong { color: var(--tbc-ink); font-weight: 600; }
.tbc-bench-prose ul {
  margin: 0 0 14px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--tbc-ink-muted);
}
.tbc-bench-prose li { margin: 0; }
.tbc-bench-prose a { color: var(--tbc-glow); text-decoration: underline; }
.tbc-bench-prose a:hover { color: #000; }

/* ---------- responsive ---------- */
@media (max-width: 1480px) {
  .tbcp-safety-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tbcp-nudge-btn { transition: none; }
}

/* Comparison table for the "Understanding Tube Bias" accordion. This
   app doesn't load the main site's css/styles.css (it's a standalone
   PWA), so .dm-table needs its own copy here -- kept identical to the
   site's definition rather than reinventing a PWA-specific variant. */
.dm-table-wrap { overflow-x: auto; margin: 0 0 20px; border-radius: var(--tbc-radius-sm); border: 1px solid var(--tbc-border-soft); }
.dm-table { width: 100%; border-collapse: collapse; font-size: 13px; background: rgba(34, 27, 21, 0.8); }
.dm-table th, .dm-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--tbc-border-soft); }
.dm-table th {
  font-family: var(--tbc-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tbc-ink-faint);
  background: rgba(42, 33, 25, 0.9);
}
.dm-table td { color: var(--tbc-ink-muted); }
.dm-table tr:last-child td { border-bottom: none; }
.dm-table td:first-child, .dm-table th:first-child { color: var(--tbc-ink); font-weight: 600; }

/* ======================================================================
   Pure B&W theme — bias-app-specific parts. The universal parts
   (sharp corners, image grayscale, badge neutralizer, app-header,
   install-gate/tip chrome) live in apps/_shared/css/app-shell.css and
   apps/_shared/css/install-tip.css instead, since they're identical
   across every app — no need to duplicate them five times.
   ====================================================================== */

:root {
  --tbc-bg:            #ffffff;
  --tbc-panel:         #f7f7f7;
  --tbc-panel-raised:  #efefef;
  --tbc-well:          #fafafa;
  --tbc-border:        #cccccc;
  --tbc-border-soft:   #dddddd;

  --tbc-ink:           #111111;
  --tbc-ink-muted:     #444444;
  --tbc-ink-faint:     #666666;

  --tbc-glow:          #000000;
  --tbc-glow-dim:      #333333;
  --tbc-glow-soft:     rgba(0, 0, 0, 0.06);

  --tbc-cold:          #333333;
  --tbc-safe:          #111111;
  --tbc-warn:          #333333;
  --tbc-warn-soft:     rgba(0, 0, 0, 0.05);
  --tbc-danger:        #000000;
  --tbc-danger-soft:   rgba(0, 0, 0, 0.06);

  --tbc-radius:    0px;
  --tbc-radius-sm: 0px;
}

/* High-voltage warning banner: hardcoded pale-pink text (#f0d3c8) and
   a warm reddish border, both designed for the old dark background —
   nearly invisible against white. */
.tbc-warning {
  background: #f5f5f5 !important;
  border-color: #ccc !important;
  color: #444 !important;
}
.tbc-warning strong { color: #000 !important; }
.tbc-warning svg { color: #111 !important; }

/* .tbc's own background is a hardcoded dark gradient (not routed
   through the --tbc-* tokens at all) — forced directly. */
body {
  background: #ffffff !important;
}
.tbc {
  background: radial-gradient(120% 140% at 15% -10%, rgba(245, 245, 245, 1) 0%, transparent 55%),
    linear-gradient(175deg, rgba(247, 247, 247, 1) 0%, rgba(255, 255, 255, 1) 100%) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.6) !important;
}

/* .tbc-setup (Tube Type / Plate-to-Cathode Voltage section) and
   .tbc-ref-col / .tbc-ref-col h3 each have their own separate
   hardcoded dark backgrounds, independent of .tbc's. */
.tbc-setup {
  background: #f7f7f7 !important;
  padding: 18px !important;
}
.tbc-ref-col {
  background: #f5f5f5 !important;
  border-color: #cccccc !important;
  color: #111111 !important;
}
.tbc-ref-col h3 {
  background: #eeeeee !important;
}

/* Cramped spacing: this note has a built-in -4px top margin. */
.tbc-hint[data-tbc-el="screenPctSource"] {
  margin-top: 16px !important;
}

/* Readout panel: solid black chassis-style box. */
.tbc-readout {
  background: #000 !important; color: #fff !important;
  padding: 24px 20px !important; border-radius: 0 !important; text-align: center;
  position: relative;
}
/* Remove the decorative tube photo behind the gauge */
.tbc-tube-frame,
.tbc-tube-photo,
.tbc-readout .tbc-tube-frame,
.tbc-readout img.tbc-tube-photo {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  background: none !important;
  background-image: none !important;
}
.tbc-gauge-wrap {
  background: transparent !important;
  background-image: none !important;
}
/* Gauge tick/unit labels use fill: var(--tbc-ink), now dark —
   invisible against the readout's black background unless forced
   light here explicitly. */
.tbc-gauge-label, .tbc-gauge-tick {
  fill: rgba(255, 255, 255, 0.80) !important;
}
.tbc-num {
  color: #fff !important; font-size: 2.4rem !important; font-weight: 600;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.tbc-big-value { margin: 12px 0; }
.tbc-big-value small {
  display: block; margin-top: 4px;
  font-size: 10px !important; font-weight: 500 !important;
  letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.8) !important;
}

.tbc-export-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px !important; margin-bottom: 16px !important; }
.tbc-export-btn {
  background: transparent !important; color: #000 !important;
  border: 1px solid #000 !important; border-radius: 0 !important;
  padding: 10px 16px !important; font-size: 11px !important; font-weight: 600 !important;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
}
.tbc-export-btn:hover { background: #000 !important; color: #fff !important; }

.tbcp-safety-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 14px !important; margin-top: 20px; }
.tbcp-safety-card {
  background: #f5f5f5 !important; border: 1px solid #ddd !important; border-radius: 0 !important; padding: 18px !important;
}
.tbcp-safety-card-head h3 {
  margin: 0 !important; font-size: 12px !important; font-weight: 600 !important;
  letter-spacing: 0.04em; text-transform: uppercase; color: #000 !important;
}
.tbcp-safety-readout, .tbcp-safety-footnote { font-size: 12.5px !important; color: #555 !important; }
.dm-table {
  background: #f5f5f5 !important;
  border-color: #cccccc !important;
  color: #111111 !important;
}
.dm-table * { color: #111111 !important; }

/* Pure B&W status badges — meaning via weight, border, and fill density */
.tbcp-safety-badge {
  border-radius: 0 !important;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: 1px solid #999 !important;
  color: #666 !important;
  background: transparent !important;
}
.tbcp-safety-badge.is-ok {
  border-color: #111 !important;
  color: #111 !important;
  background: transparent !important;
  font-weight: 600;
}
.tbcp-safety-badge.is-warn {
  border-color: #111 !important;
  border-width: 2px !important;
  color: #111 !important;
  background: #f0f0f0 !important;
  font-weight: 700;
}
.tbcp-safety-badge.is-danger {
  border-color: #000 !important;
  color: #fff !important;
  background: #000 !important;
  font-weight: 700;
}

/* Install-tip (was external _shared/css/install-tip.css) */
.install-tip {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0,0,0,0.45);
}
.install-tip.is-hidden { display: none !important; }
.install-tip-card {
  background: #fff; color: #111; border: 1px solid #000;
  max-width: 360px; width: 100%; padding: 28px 24px 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.install-tip-icon { display: block; margin: 0 auto 14px; width: 72px; height: 72px; }
.install-tip-card h2 {
  margin: 0 0 6px; font-size: 18px; font-weight: 700; text-align: center; color: #000;
}
.install-tip-lead { margin: 0 0 16px; font-size: 13.5px; color: #444; text-align: center; line-height: 1.5; }
.install-tip-box {
  background: #f5f5f5; border: 1px solid #ddd; padding: 14px 14px 12px; margin-bottom: 14px;
}
.install-tip-box-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #000; }
.install-tip-box p { margin: 0 0 8px; font-size: 13px; color: #333; line-height: 1.55; }
.install-tip-box-note { margin: 0; font-size: 12px; color: #666; }
.install-tip-steps { margin: 0 0 18px; padding-left: 18px; font-size: 13px; color: #333; line-height: 1.6; }
.install-tip-steps li { margin-bottom: 6px; }
.install-tip-btn {
  display: block; width: 100%; padding: 12px 16px;
  background: #000; color: #fff; border: 1px solid #000;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.install-tip-btn:hover { background: #333; }


/* ========== Bias: full-width 2-column desktop layout (matches other apps) ========== */
.tbc {
  max-width: 1480px !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.app-footer {
  max-width: 1480px !important;
}

.vo-desktop-cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: start;
}
.vo-col { min-width: 0; }
.vo-col-left {
  padding-right: 8px;
  border-right: 1px solid #dddddd;
}
.vo-col-right { padding-left: 4px; }

/* Safety checks side by side on wide screens */
.tbcp-safety-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
}

@media (max-width: 980px) {
  .vo-desktop-cols {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .vo-col-left {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #dddddd;
    padding-bottom: 18px;
    margin-bottom: 8px;
  }
  .vo-col-right { padding-left: 0; }
  .tbcp-safety-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ======================================================================
   DiMastro dark B&W — matches main site /bw/ (app-wide final override)
   ====================================================================== */
:root {
  --tbc-bg:            #000000 !important;
  --tbc-panel:         #0d0d0d !important;
  --tbc-panel-raised:  #181818 !important;
  --tbc-well:          #111111 !important;
  --tbc-border:        #333333 !important;
  --tbc-border-soft:   #252525 !important;

  --tbc-ink:           #e8e8e8 !important;
  --tbc-ink-muted:     #c9c9c9 !important;
  --tbc-ink-faint:     #838383 !important;

  --tbc-glow:          #ffffff !important;
  --tbc-glow-dim:      #aaaaaa !important;
  --tbc-glow-soft:     rgba(255, 255, 255, 0.06) !important;

  --tbc-cold:          #666666 !important;
  --tbc-safe:          #cccccc !important;
  --tbc-warn:          #aaaaaa !important;
  --tbc-warn-soft:     rgba(255, 255, 255, 0.05) !important;
  --tbc-danger:        #ffffff !important;
  --tbc-danger-soft:   rgba(255, 255, 255, 0.06) !important;

  --tbc-radius:    0px !important;
  --tbc-radius-sm: 0px !important;

  /* Tone-stack functional plot colors (keep hot filament) */
  --live:     #ff9142 !important;
  --edit:     #4da3ff !important;
  --band-1: #8f5c3a !important;
  --band-2: #d8453c !important;
  --band-3: #e8843a !important;
  --band-4: #e2c44a !important;
  --band-5: #4fa96b !important;
  --band-6: #4a79c4 !important;
  --band-7: #9d6cc6 !important;
  --band-8: #9c97a8 !important;

  /* Generic toolkit aliases some apps use */
  --bg: #000000 !important;
  --panel: #0d0d0d !important;
  --ink: #e8e8e8 !important;
  --muted: #c9c9c9 !important;
  --faint: #838383 !important;
  --border: #333333 !important;
  --chassis: #000000 !important;
  --panel-hi: #181818 !important;
  --rule: #252525 !important;
  --dim: #a8a8a8 !important;
  --grid: #252525 !important;
  --grid-key: #333333 !important;
}

html, body {
  background: #000000 !important;
  color: #c9c9c9 !important;
  color-scheme: dark !important;
}

*, *::before, *::after {
  border-radius: 0 !important;
}

/* Shell chrome */
.app-header {
  background: #000000 !important;
  border-bottom: 1px solid #222 !important;
}
.app-header h1,
.app-header-brand,
.app-header-brand-gta,
.app-header * {
  color: #ffffff !important;
}

.app-footer,
.tbc-footer {
  color: #a8a8a8 !important;
}

/* Main cards / widgets */
.tbc, .ts, .rt, .ct, .vo, .app-main, .app-shell, main {
  background: #0d0d0d !important;
  color: #c9c9c9 !important;
  border-color: #252525 !important;
  box-shadow: none !important;
}

.tbc-setup,
.tbc-panel,
.tbc-ref-col,
.tbcp-safety-card,
.ts-panel,
.ts-scope,
.rt-card,
.ct-card,
.vo-card,
[class*="-setup"],
[class*="-panel"]:not(.app-header):not([class*="badge"]) {
  background: #0d0d0d !important;
  border-color: #333 !important;
  color: #c9c9c9 !important;
}

.tbc-warning,
.tbc-db-notice,
[class*="-warning"],
[class*="-notice"] {
  background: #141414 !important;
  border-color: #333 !important;
  color: #c9c9c9 !important;
}
.tbc-warning strong,
.tbc-db-notice strong {
  color: #ffffff !important;
}

/* Inputs */
input, select, textarea,
.tbc-input, .tbc-select,
.ts input, .ts select,
.rt input, .rt select,
.ct input, .ct select {
  background: #181818 !important;
  color: #e8e8e8 !important;
  border: 1px solid #3a3a3a !important;
  color-scheme: dark;
}
input:focus, select:focus, textarea:focus {
  border-color: #888 !important;
  outline: none !important;
  box-shadow: none !important;
}
option {
  background: #181818 !important;
  color: #e8e8e8 !important;
}

/* Buttons */
button:not(.is-active):not([aria-pressed="true"]),
.tbc-mode-btn,
.tbc-export-btn,
.ts button,
.rt button,
.ct button {
  background: #181818 !important;
  color: #c9c9c9 !important;
  border: 1px solid #3a3a3a !important;
}
button:hover,
.tbc-mode-btn:hover,
.tbc-export-btn:hover {
  border-color: #888 !important;
  color: #fff !important;
}
.tbc-mode-btn.is-active,
button.is-active,
button[aria-pressed="true"],
.ts-mode-btn.is-active {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

/* Readouts / results */
.tbc-readout,
.tbc-result-item,
[class*="readout"],
[class*="result-item"] {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #333 !important;
}
.tbc-num,
.tbc-result-value {
  color: #ffffff !important;
}

/* Labels */
.tbc-field-label,
.tbc-eyebrow,
.tbcp-step-label,
.tbc-hint,
label {
  color: #a8a8a8 !important;
}
.tbc-title, h1, h2, h3 {
  color: #e8e8e8 !important;
}
p, .tbc-sub, .tbc-lede {
  color: #c9c9c9 !important;
}

/* Tables */
table, .tbc-bench-table, .dm-table {
  background: #0d0d0d !important;
  color: #e8e8e8 !important;
}
th {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #333 !important;
}
td {
  background: #0d0d0d !important;
  color: #e8e8e8 !important;
  border-color: #333 !important;
}
tr:nth-child(even) td {
  background: #141414 !important;
}

/* Install gate / tip */
.install-tip {
  background: rgba(0,0,0,0.72) !important;
}
.install-tip-card,
.install-gate-card,
.install-gate-folder-tip,
.install-gate-ios-hint,
.install-gate-ios-panel,
.dm-platform-item {
  background: #0d0d0d !important;
  border-color: #333 !important;
  color: #e8e8e8 !important;
}
.install-tip-card h2,
.install-tip-box-title {
  color: #ffffff !important;
}
.install-tip-lead,
.install-tip-box p,
.install-tip-steps {
  color: #c9c9c9 !important;
}
.install-tip-box {
  background: #141414 !important;
  border-color: #333 !important;
}
.install-tip-btn,
.install-gate-btn {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}
.install-gate-skip,
.install-gate-back-btn {
  background: #181818 !important;
  color: #c9c9c9 !important;
  border-color: #333 !important;
}

/* Scope / VO specific light cards */
.vs-scope-card,
.vs-siggen-card,
.vs-compare-card {
  background: #0d0d0d !important;
  border-color: #333 !important;
  color: #c9c9c9 !important;
}

/* Keep functional gauges & tone plot colored */
svg.tbc-gauge,
.tbc-gauge-wrap svg,
canvas#plot,
canvas#scope,
img.ts-badge,
img.ts-badge--sm,
img.vo-brand-badge {
  filter: none !important;
}

/* Gray out decorative media only */
img:not(.ts-badge):not(.ts-badge--sm):not(.vo-brand-badge),
svg:not(.tbc-gauge),
video {
  filter: grayscale(1) !important;
}

/* Column dividers */
.vo-col-left {
  border-right-color: #333 !important;
}


/* ---- restore original card padding; keep box-shadow ---- */
.tbc,
.ts,
.rt-wrap,
.ct-wrap,
section.tbc,
main .tbc {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 60px -30px rgb(255 255 255 / 60%) !important;
  padding: 28px 28px 24px !important;
}

/* Dropdown chevron — must sit ON TOP of dark select background */
select,
.tbc-select,
select.tbc-select,
select.rt-input,
select.ct-input,
.ts select {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: #181818 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9c9c9' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 8px !important;
  padding-right: 36px !important;
  color: #e8e8e8 !important;
}

/* Scope pitch / time / volts knob captions under the knobs */
.vs-pitch-col .ts-ctl-name,
.vs-pitch-col .ts-ctl-num,
.vs-scope-card .ts-ctl-name,
.vs-scope-card .ts-ctl-num {
  color: #e8e8e8 !important;
  text-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.vs-pitch-col .ts-ctl-num {
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* ======================================================================
   INSTALL GATE — canonical shared block (identical on every app)
   Source of truth: apps/_shared/css/install-gate.css
   Do not edit a copy inside an individual app; change the shared file
   and re-run sync (or re-append this block to each styles.css).
   Dark theme, self-contained — overrides inline styles, tokens, and
   inherited body fonts so every app matches 1:1.
   ====================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

/* Lock page scroll while the gate is visible */
html.gate-open,
html.gate-open body {
  overflow: hidden !important;
  height: 100% !important;
  touch-action: none !important;
}

/* ---- Root card: force font + color on the whole subtree ---- */
.install-gate,
.install-gate *,
.install-gate *::before,
.install-gate *::after {
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif !important;
  box-sizing: border-box !important;
}

.install-gate {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  padding-top: calc(24px + env(safe-area-inset-top, 0px)) !important;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  background: #000000 !important;
  color: #e8e8e8 !important;
}

.install-gate.is-hidden,
.install-gate[hidden] {
  display: none !important;
}

.install-gate-card {
  max-width: 380px !important;
  width: 100% !important;
  text-align: center !important;
  background: #0d0d0d !important;
  border: 1px solid #333333 !important;
  border-radius: 0 !important;
  padding: 34px 26px 26px !important;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7) !important;
  color: #e8e8e8 !important;
}

.install-gate-icon {
  width: 72px !important;
  height: 72px !important;
  border-radius: 0 !important;
  margin: 0 auto 18px !important;
  display: block !important;
  filter: grayscale(1) !important;
}

/* Titles — display face */
.install-gate-card h2,
.install-gate h2 {
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #e8e8e8 !important;
  margin: 0 0 10px !important;
  line-height: 1.25 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.install-gate-sub,
.install-gate p.install-gate-sub {
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  color: #c9c9c9 !important;
  line-height: 1.6 !important;
  margin: 0 0 24px !important;
}

/* Primary install button */
.install-gate-btn,
button.install-gate-btn,
#installGateBtn,
.install-gate button.install-gate-btn {
  width: 100% !important;
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #ffffff !important;
  border-radius: 0 !important;
  padding: 13px 18px !important;
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  cursor: pointer !important;
  margin: 0 0 16px !important;
  text-align: center !important;
  text-decoration: none !important;
  transition: background-color 140ms ease !important;
}

.install-gate-btn:hover,
button.install-gate-btn:hover,
#installGateBtn:hover {
  background: #dddddd !important;
  color: #000000 !important;
}

.install-gate-btn[hidden],
#installGateBtn[hidden] {
  display: none !important;
}

/* iOS panel */
.install-gate-ios-panel,
.install-gate #installGateIOSPanel {
  text-align: left !important;
  background: #111111 !important;
  border: 1px solid #333333 !important;
  border-radius: 0 !important;
  padding: 14px 16px 12px !important;
  margin: 0 0 18px !important;
  color: #c9c9c9 !important;
}

.install-gate-ios-panel[hidden],
#installGateIOSPanel[hidden] {
  display: none !important;
}

.install-gate-ios-lead {
  margin: 0 0 10px !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  color: #e8e8e8 !important;
}

.install-gate-ios-steps {
  margin: 0 0 10px !important;
  padding-left: 20px !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  color: #c9c9c9 !important;
}

.install-gate-ios-steps li {
  margin: 0 0 8px !important;
  color: #c9c9c9 !important;
}

.install-gate-ios-steps li:last-child {
  margin-bottom: 0 !important;
}

.install-gate-ios-steps strong {
  color: #e8e8e8 !important;
  font-weight: 600 !important;
}

.install-gate-ios-steps svg {
  vertical-align: -3px !important;
  margin: 0 2px !important;
  color: #ffffff !important;
  fill: none !important;
}

.install-gate-ios-note {
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: #838383 !important;
}

.install-gate-ios-hint,
#installGateIOSHint {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #c9c9c9 !important;
  background: #111111 !important;
  border: 1px solid #333333 !important;
  border-radius: 0 !important;
  padding: 12px 14px !important;
  margin: 0 0 16px !important;
  line-height: 1.6 !important;
}

.install-gate-ios-hint[hidden],
#installGateIOSHint[hidden] {
  display: none !important;
}

.install-gate-ios-hint svg {
  vertical-align: -3px !important;
  margin: 0 2px !important;
  color: #ffffff !important;
}

.install-gate-ios-hint strong {
  color: #e8e8e8 !important;
  font-weight: 600 !important;
}

/* iOS mode hides */
.install-gate.is-ios .install-gate-btn,
.install-gate.is-ios #installGateBtn,
.install-gate.is-ios #installGateAndroidNotice,
.install-gate.is-ios .install-gate-ios-hint,
.install-gate.is-ios #dmPlatformRow,
.install-gate.is-ios .dm-platform-row {
  display: none !important;
}

/* Platform row — beat inline styles on the row and every child */
#dmPlatformRow,
.dm-platform-row,
.install-gate #dmPlatformRow,
.install-gate .dm-platform-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-bottom: 18px !important;
  text-align: left !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.dm-platform-item,
.install-gate .dm-platform-item,
#dmPlatformIOS,
#dmPlatformAndroid,
#dmPlatformDesktop {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  gap: 10px !important;
  background: #111111 !important;
  border: 1px solid #333333 !important;
  padding: 8px 14px !important;
  color: #c9c9c9 !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
}

/* Override inline color/font on spans/strongs inside platform chips */
.dm-platform-item span,
.dm-platform-item strong,
.install-gate .dm-platform-item span,
.install-gate .dm-platform-item strong,
#dmPlatformIOS span,
#dmPlatformIOS strong,
#dmPlatformAndroid span,
#dmPlatformAndroid strong,
#dmPlatformDesktop span,
#dmPlatformDesktop strong {
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif !important;
  font-size: 12.5px !important;
  color: #c9c9c9 !important;
  background: transparent !important;
}

.dm-platform-item strong,
.install-gate .dm-platform-item strong,
#dmPlatformIOS strong,
#dmPlatformAndroid strong,
#dmPlatformDesktop strong {
  color: #e8e8e8 !important;
  font-weight: 600 !important;
}

.dm-platform-item[hidden],
#dmPlatformIOS[hidden],
#dmPlatformAndroid[hidden],
#dmPlatformDesktop[hidden],
#dmPlatformRow[hidden] {
  display: none !important;
}

/* Android / desktop notice */
.install-gate .tbc-db-notice,
#installGateAndroidNotice,
.install-gate #installGateAndroidNotice {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start !important;
  background: #111111 !important;
  border: 1px solid #333333 !important;
  border-radius: 0 !important;
  padding: 10px 14px !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: #c9c9c9 !important;
  margin: 0 0 16px !important;
  text-align: left !important;
}

.install-gate .tbc-db-notice[hidden],
#installGateAndroidNotice[hidden] {
  display: none !important;
}

.install-gate .tbc-db-notice span,
.install-gate .tbc-db-notice strong,
#installGateAndroidNotice span,
#installGateAndroidNotice strong {
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif !important;
  color: #c9c9c9 !important;
  font-size: 12.5px !important;
}

.install-gate .tbc-db-notice strong,
#installGateAndroidNotice strong {
  color: #e8e8e8 !important;
  font-weight: 600 !important;
}

.install-gate .tbc-db-notice svg,
#installGateAndroidNotice svg {
  flex: none !important;
  margin-top: 2px !important;
  color: #ffffff !important;
}

/* Folder tip */
.install-gate-folder-tip,
.install-gate p.install-gate-folder-tip {
  margin: 12px 0 4px !important;
  padding: 10px 12px !important;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  color: #c9c9c9 !important;
  background: #111111 !important;
  border: 1px solid #333333 !important;
  border-radius: 0 !important;
  text-align: left !important;
}

.install-gate-folder-tip strong,
.install-gate .install-gate-folder-tip strong {
  color: #e8e8e8 !important;
  font-weight: 600 !important;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif !important;
}

/* Secondary actions */
.install-gate-skip,
.install-gate-back-btn,
.install-gate button.install-gate-skip,
.install-gate a.install-gate-back-btn {
  display: inline-block !important;
  background: transparent !important;
  border: 1px solid #333333 !important;
  color: #c9c9c9 !important;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  padding: 6px 14px !important;
  margin: 4px 4px 10px !important;
  line-height: 1.3 !important;
}

.install-gate-skip:hover,
.install-gate-back-btn:hover {
  background: #181818 !important;
  color: #e8e8e8 !important;
}

.install-gate-link,
.install-gate a.install-gate-link {
  display: block !important;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #aaaaaa !important;
  text-decoration: underline !important;
  margin-bottom: 12px !important;
}

.install-gate-link:hover {
  color: #ffffff !important;
}

/* Version stamp */
.install-gate-version,
#installGateVersion,
.install-gate #installGateVersion {
  margin-top: 14px !important;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  opacity: 0.55 !important;
  color: #838383 !important;
  line-height: 1.3 !important;
}


/* Keep platform OS logos in full color (Windows blue, etc.) */
.install-gate .dm-platform-item svg,
.install-gate #dmPlatformDesktop svg,
.install-gate #dmPlatformAndroid svg,
.install-gate #dmPlatformIOS svg,
.install-gate .dm-platform-item svg path {
  filter: none !important;
}

@media print {
  .install-gate {
    display: none !important;
  }
}
