/* Dividend Yield & DRIP Compounder — content styles.
   Prefix: --dv-  /  .dv-

   Reference point: a hero DRIP-value figure leads (the "yes" scenario),
   with the no-DRIP comparison and the extra-from-reinvesting gap shown
   as supporting metrics — mirroring the mortgage-extra-payment
   simulator's baseline-vs-scenario shape from earlier this loop, since
   both tools are genuinely simulating two futures and comparing them.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --dv-surface: #ffffff;
  --dv-panel:   #f6f5f3;
  --dv-line:    #e0dcd4;
  --dv-text:    #191510;
  --dv-muted:   #6b6459;
  --dv-good:    #1c7a4c;
  --dv-bad:     #b3261e;
  --dv-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.dv-wrap {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.dv-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--dv-line);
  border-radius: 2px;
  background: var(--dv-surface);
}

.dv-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 28rem) {
  .dv-field-grid { grid-template-columns: 1fr; }
}

.dv-field {
  display: grid;
  gap: 0.375rem;
}

.dv-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dv-muted);
}

.dv-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--dv-mono);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--dv-text);
  background: var(--dv-surface);
  border: 1px solid var(--dv-line);
  border-radius: 2px;
}

.dv-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.dv-error {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--dv-bad);
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid var(--dv-bad);
  border-radius: 2px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.dv-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;
  margin-bottom: 1.5rem;
}

.dv-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.dv-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.dv-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Hero + metrics ──────────────────────────────────────────────────────── */

.dv-hero {
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--dv-line);
  border-radius: 2px;
  background: var(--dv-surface);
}

.dv-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dv-muted);
}

.dv-hero-value {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

.dv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 30rem) {
  .dv-grid { grid-template-columns: 1fr; }
}

.dv-metric {
  padding: 1rem 0.75rem;
  border: 1px solid var(--dv-line);
  border-radius: 2px;
  background: var(--dv-panel);
  text-align: center;
}

.dv-metric--good {
  background: rgba(28, 122, 76, 0.06);
  border-color: var(--dv-good);
}

.dv-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--dv-muted);
}

.dv-metric-value {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--dv-text);
}

.dv-metric--good .dv-metric-value {
  color: var(--dv-good);
}

.dv-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--dv-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.dv-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 36rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .dv-wrap,
  .dv-ad { padding-inline: 1rem; }
  .dv-panel { padding: 1.25rem; }
}

/* 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"] {
  --dv-surface: var(--tf-surface);
  --dv-panel: var(--tf-surface);
  --dv-line: var(--tf-rule);
  --dv-text: var(--tf-ink);
  --dv-muted: var(--tf-ink-soft);
  --dv-good: #5fd099;
  --dv-bad: #da8581;
}
