/* Sinking Fund Calculator — content styles.
   Prefix: --sf-  /  .sf-

   Reference point: a single hero "monthly contribution" figure is the
   whole point of a sinking-fund calculator — everything else (total
   contributed vs. growth from interest) is supporting context for that
   one number. Closest sibling in shape to `dividend-yield-and-drip-calculator`
   earlier this loop (hero + 3-metric breakdown of a compounding result),
   but this tool solves for the payment rather than the outcome, so the
   growth-from-interest metric is presented as a bonus outcome of saving
   consistently rather than the object of the calculation itself.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --sf-surface: #ffffff;
  --sf-panel:   #f5f6f4;
  --sf-line:    #dfe3dc;
  --sf-text:    #171a15;
  --sf-muted:   #5f6659;
  --sf-good:    #1c7a4c;
  --sf-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.sf-wrap {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.sf-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--sf-line);
  border-radius: 2px;
  background: var(--sf-surface);
}

.sf-field {
  margin-bottom: 1rem;
}

.sf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.sf-row .sf-field {
  margin-bottom: 0;
}

.sf-panel > .sf-row {
  margin-bottom: 1.25rem;
}

.sf-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sf-muted);
}

.sf-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--sf-mono);
  font-size: 1rem;
  color: var(--sf-text);
  background: var(--sf-panel);
  border: 1px solid var(--sf-line);
  border-radius: 2px;
}

.sf-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.sf-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;
}

.sf-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.sf-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.sf-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Hero + metrics ──────────────────────────────────────────────────────── */

.sf-hero {
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--sf-line);
  border-radius: 2px;
  background: var(--sf-surface);
}

.sf-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sf-muted);
}

.sf-hero-value {
  margin: 0;
  font-family: var(--sf-mono);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--tf-accent);
}

.sf-hero-sub {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--sf-muted);
}

.sf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 30rem) {
  .sf-grid { grid-template-columns: 1fr; }
}

.sf-metric {
  padding: 1rem 0.75rem;
  border: 1px solid var(--sf-line);
  border-radius: 2px;
  background: var(--sf-panel);
  text-align: center;
}

.sf-metric--good {
  background: color-mix(in srgb, var(--sf-good) 10%, var(--sf-panel));
  border-color: color-mix(in srgb, var(--sf-good) 35%, var(--sf-line));
}

.sf-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--sf-muted);
}

.sf-metric-value {
  margin: 0;
  font-family: var(--sf-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--sf-text);
}

.sf-metric--good .sf-metric-value {
  color: var(--sf-good);
}

.sf-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--sf-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.sf-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 36rem;
  padding-inline: 1.5rem;
  overflow: hidden;
}

@media (max-width: 26rem) {
  .sf-wrap,
  .sf-ad { padding-inline: 1rem; }
  .sf-panel { padding: 1.25rem; }
  .sf-row { grid-template-columns: 1fr; gap: 1rem; }
  .sf-panel > .sf-row .sf-field { margin-bottom: 0; }
}

/* 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"] {
  --sf-surface: var(--tf-surface);
  --sf-panel: var(--tf-surface);
  --sf-line: var(--tf-rule);
  --sf-text: var(--tf-ink);
  --sf-muted: var(--tf-ink-soft);
  --sf-good: #5fd099;
}
