/* Business Valuation Calculator — content styles.
   Prefix: --bv-  /  .bv-

   Reference point: a plain, boardroom-neutral register — no
   semantic colour for the cash/debt adjustment, since a negative
   adjustment (net debt) is a completely normal, unremarkable input
   to a valuation, not a warning state.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --bv-surface: #ffffff;
  --bv-panel:   #f4f5f6;
  --bv-line:    #dde0e3;
  --bv-text:    #171a1c;
  --bv-muted:   #5c6368;
  --bv-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.bv-wrap {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.bv-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--bv-line);
  border-radius: 2px;
  background: var(--bv-surface);
}

.bv-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bv-row:last-of-type {
  margin-bottom: 1.25rem;
}

.bv-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bv-muted);
}

.bv-field input,
.bv-field select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--bv-text);
  background: var(--bv-panel);
  border: 1px solid var(--bv-line);
  border-radius: 2px;
}

.bv-field input {
  font-family: var(--bv-mono);
  font-size: 1rem;
}

.bv-field input:focus-visible,
.bv-field select:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.bv-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--tf-accent-ink);
  background: var(--tf-accent);
  border: 1px solid var(--tf-accent);
  border-radius: 2px;
  cursor: pointer;
}

.bv-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.bv-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.bv-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Hero + metrics ──────────────────────────────────────────────────────── */

.bv-hero {
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--bv-line);
  border-radius: 2px;
  background: var(--bv-surface);
}

.bv-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bv-muted);
}

.bv-hero-value {
  margin: 0;
  font-family: var(--bv-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--tf-accent);
}

.bv-hero-sub {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--bv-muted);
}

.bv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 24rem) {
  .bv-grid { grid-template-columns: 1fr; }
}

.bv-metric {
  padding: 1rem 0.75rem;
  border: 1px solid var(--bv-line);
  border-radius: 2px;
  background: var(--bv-panel);
  text-align: center;
}

.bv-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--bv-muted);
}

.bv-metric-value {
  margin: 0;
  font-family: var(--bv-mono);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--bv-text);
}

.bv-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--bv-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.bv-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 34rem;
  padding-inline: 1.5rem;
  overflow: hidden;
}

@media (max-width: 26rem) {
  .bv-wrap,
  .bv-ad { padding-inline: 1rem; }
  .bv-panel { padding: 1.25rem; }
  .bv-row { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --bv-surface: var(--tf-surface);
  --bv-panel: var(--tf-surface);
  --bv-line: var(--tf-rule);
  --bv-text: var(--tf-ink);
  --bv-muted: var(--tf-ink-soft);
}
