/* ======================================================================
   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.
   ====================================================================== */

/*
  Capacitor Toolkit — standalone PWA
  ------------------------------------------------------------------
  This tool shares the same independent design tokens as the resistor
  toolkit (see the :root block below, carried over from the site's
  capacitor-toolkit.css), separate from the --tbc-* tokens the
  bias/tone-stack tools share. We alias --tbc-* to this tool's own
  token names so the shared app-shell/install-gate layer works
  unmodified and still matches this page's real palette.
*/

:root{
  --bg:#1c1712;
  --panel:#221b15;
  --panel-alt:#2a2119;
  --border:#3c2f22;
  --border-soft:#2f261c;
  --text:#f3ead9;
  --text-muted:#dfd0bd;
  --text-faint:#cd9c60;
  --amber:#ff9142;
  --amber-dim:#c96a2c;
  --copper:#c17a4d;
  --readout:#7fd68a;
  --readout-dim:#3f6f45;
  --danger:#d1584a;
  --radius: var(--tbc-radius);
  --font-head:'Roboto Slab', Georgia, serif;
  --font-body:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:'JetBrains Mono', 'Courier New', monospace;

  --tbc-bg: var(--bg);
  --tbc-panel: var(--panel);
  --tbc-panel-raised: var(--panel-alt);
  --tbc-well: #16110d;
  --tbc-border: var(--border);
  --tbc-border-soft: var(--border-soft);
  --tbc-ink: var(--text);
  --tbc-ink-muted: var(--text-muted);
  --tbc-ink-faint: var(--text-faint);
  --tbc-glow: var(--amber);
  --tbc-glow-dim: var(--amber-dim);
  --tbc-glow-soft: rgba(255, 145, 66, 0.16);
  --tbc-warn: #e7b84f;
  --tbc-warn-soft: rgba(231, 184, 79, 0.14);
  --tbc-cold: #4da3ff;
  --tbc-safe: #7cbf8e;
  --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;
}
  *{box-sizing:border-box;}
  body{
    margin:0;
    background:var(--bg);
    background-image:
      radial-gradient(ellipse at top, rgba(232,137,47,0.05), transparent 55%),
      repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px);
    color:var(--text);
    font-family:var(--font-body);
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
  }
  .ct-wrap{
  font-family: var(--font-body);
  color: var(--text);
  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(--border);
  border-radius: var(--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: 760px;
  margin: 0 auto;
  padding: 28px 28px 24px;
  box-sizing: border-box;
  position: relative;
}
  .ct-eyebrow{ font-family:var(--font-mono); font-size:11px; letter-spacing:0.16em; text-transform:uppercase; color:var(--amber); margin:0 0 6px; }
  .ct-title{ font-family:var(--font-head); font-weight:600; font-size:26px; line-height:1.15; margin:0 0 6px; color:var(--text); }
  .ct-sub{ color:var(--text-muted); font-size:13.5px; margin:0; max-width:100ch; }

  .ct-tabs{ display:flex; gap:6px; border-bottom:1px solid var(--border); margin-bottom:28px; flex-wrap:wrap; }
  .ct-tab{
    appearance:none; background:none; border:none; color:var(--text-muted);
    font-family:var(--font-body); font-weight:600; font-size:14.5px; padding:12px 4px;
    margin-right:22px; cursor:pointer; position:relative; border-bottom:2px solid transparent;
    transition:color 0.15s ease;
  }
  .ct-tab:hover{ color:var(--text); }
  .ct-tab.active{ color:var(--amber); border-bottom-color:var(--amber); }

  .ct-panel{ display:none; }
  .ct-panel.active{ display:block; animation:cfadein 0.25s ease; }
  @keyframes cfadein{ from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:none;} }

  .ct-panel-head{ font-family:var(--font-head); font-size:20px; font-weight:700; margin:0 0 6px; }
  .ct-panel-desc{ color:var(--text-muted); font-size:14.5px; margin:0 0 22px; max-width:620px; }

  .ct-card{ background:var(--panel); border:1px solid var(--border-soft); border-radius:var(--radius); padding:26px; }

  .ct-segmented{
    display:inline-flex; background:var(--panel-alt); border:1px solid var(--border);
    border-radius:8px; padding:3px; margin-bottom:22px;
  }
  .ct-segmented button{
    appearance:none; border:none; background:none; color:var(--text-muted);
    font-family:var(--font-mono); font-size:13px; font-weight:700; padding:8px 16px;
    border-radius:6px; cursor:pointer; transition:background 0.15s ease, color 0.15s ease;
  }
  .ct-segmented button.active{ background:var(--amber); color:#20160a; }

  .ct-cap-stage{
    background:var(--panel-alt); border:1px solid var(--border); border-radius:8px;
    padding:20px 10px; margin-bottom:22px;
  }
  .ct-cap-stage svg{ width:100%; height:auto; display:block; }

  .ct-band{ margin-bottom:20px; padding-bottom:20px; border-bottom:1px solid var(--border-soft); }
  .ct-band:last-child{ border-bottom:none; margin-bottom:0; padding-bottom:0; }
  .ct-band-label{
    display:flex; justify-content:space-between; align-items:baseline; font-family:var(--font-mono);
    font-size:12px; letter-spacing:0.06em; text-transform:uppercase; color:var(--text-faint); margin-bottom:10px;
  }
  .ct-band-current{ font-family:var(--font-body); font-weight:600; font-size:13.5px; text-transform:none; letter-spacing:0; color:var(--text); }
  .ct-swatches{ display:flex; flex-wrap:wrap; gap:8px; }
  .ct-swatch{
    width:34px; height:34px; border-radius:7px; border:2px solid transparent; cursor:pointer;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35); transition:transform 0.1s ease, border-color 0.1s ease; position:relative;
  }
  .ct-swatch:hover{ transform:translateY(-2px); }
  .ct-swatch.selected{ border-color:var(--amber); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35), 0 0 0 3px rgba(232,137,47,0.18); }
  .ct-swatch.selected::after{ content:''; position:absolute; inset:0; border-radius:5px; box-shadow: inset 0 0 0 2px rgba(0,0,0,0.5); }

  .ct-readout{ text-align:center; padding:22px 16px 24px; background:var(--panel-alt); border:1px solid var(--border); border-radius:8px; }
  .ct-readout-value{
    font-family:var(--font-mono); font-size:clamp(30px, 5.6vw, 40px); font-weight:700; color:var(--readout);
    text-shadow:0 0 18px rgba(127,214,138,0.25); letter-spacing:0.01em;
  }
  .ct-readout-sub{ font-family:var(--font-mono); font-size:13px; color:var(--text-faint); margin-top:6px; }
  .ct-readout-row{
    display:flex; justify-content:center; gap:22px; margin-top:10px; flex-wrap:wrap;
    font-family:var(--font-mono); font-size:13px; color:var(--text-muted);
  }
  .ct-readout-row b{ color:var(--text); font-weight:600; }

  .ct-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:24px; }
  @media (max-width:720px){ .ct-grid-2{ grid-template-columns:1fr; } }

  .ct-field{ margin-bottom:18px; }
  .ct-field label{
    display:block; font-family:var(--font-mono); font-size:12px; letter-spacing:0.06em;
    text-transform:uppercase; color:var(--text-faint); margin-bottom:8px;
  }
  .ct-input-row{ display:flex; gap:8px; }
  .ct-input, select.ct-input{
    width:100%; background:var(--panel-alt); border:1px solid var(--border); color:var(--text);
    font-family:var(--font-mono); font-size:15px; padding:11px 12px; border-radius:7px; outline:none;
    transition:border-color 0.15s ease;
  }
  .ct-input:focus{ border-color:var(--amber); }
  select.ct-input{ cursor:pointer; }

  .ct-note{ font-size:13px; color:var(--text-faint); margin-top:14px; line-height:1.6; }
  .ct-note code{
    background:var(--panel-alt); border:1px solid var(--border); padding:1px 6px; border-radius:4px;
    font-family:var(--font-mono); color:var(--copper); font-size:12.5px;
  }
  .ct-warn{ color:var(--danger); font-size:13.5px; margin-top:10px; display:none; }
  .ct-warn.show{ display:block; }
  .ct-caution{
    display:flex; gap:10px; background:rgba(209,88,74,0.08); border:1px solid rgba(209,88,74,0.3);
    border-radius:8px; padding:12px 14px; margin-bottom:22px; font-size:13.5px; color:var(--text-muted); line-height:1.55;
  }
  .ct-caution b{ color:var(--text); }

  .ct-table{ width:100%; border-collapse:collapse; font-size:13px; margin-top:6px; }
  .ct-table th, .ct-table td{ text-align:left; padding:7px 10px; border-bottom:1px solid var(--border-soft); }
  .ct-table th{ color:var(--text-faint); font-family:var(--font-mono); font-weight:600; text-transform:uppercase; font-size:11px; letter-spacing:0.05em; }
  .ct-table td{ color:var(--text-muted); }
  .ct-table td b{ color:var(--text); font-weight:600; }
   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, body {
  margin: 0;
  padding: 0;
  background: var(--tbc-bg);
  color: var(--tbc-ink);
  min-height: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  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);
}

.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-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: rgba(77, 163, 255, 0.22); color: var(--tbc-ink); }

.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); }
