/* Sentence Variety & Cadence Analyzer — content styles.
   Prefix: --sv-  /  .sv-

   Reference point: a per-sentence horizontal bar chart is the
   centerpiece — literally showing the rhythm of long and short
   sentences in sequence, which is more legible than a table of numbers
   for a tool whose whole point is "cadence". Eighth writing-cluster
   tool this loop, and the first to visualize a sequence rather than
   rank or sum values.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --sv-surface: #ffffff;
  --sv-panel:   #f6f5f2;
  --sv-line:    #e2ded4;
  --sv-text:    #1a1712;
  --sv-muted:   #6c6558;
  --sv-bar:     #8a6d3f;
  --sv-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.sv-wrap {
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.sv-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--sv-line);
  border-radius: 2px;
  background: var(--sv-surface);
}

.sv-input-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sv-muted);
}

.sv-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.875rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--sv-text);
  background: var(--sv-surface);
  border: 1px solid var(--sv-line);
  border-radius: 2px;
  resize: vertical;
}

.sv-textarea:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.sv-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;
}

.sv-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.sv-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.sv-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Hero + metrics ──────────────────────────────────────────────────────── */

.sv-hero {
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--sv-line);
  border-radius: 2px;
  background: var(--sv-surface);
}

.sv-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sv-muted);
}

.sv-hero-value {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--tf-accent);
}

.sv-hero-sub {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--sv-muted);
}

.sv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 30rem) {
  .sv-grid { grid-template-columns: 1fr; }
}

.sv-metric {
  padding: 1rem 0.75rem;
  border: 1px solid var(--sv-line);
  border-radius: 2px;
  background: var(--sv-panel);
  text-align: center;
}

.sv-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--sv-muted);
}

.sv-metric-value {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--sv-text);
}

/* ── Cadence bar chart ───────────────────────────────────────────────────── */

.sv-bars {
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--sv-line);
  border-radius: 2px;
  background: var(--sv-surface);
}

.sv-bars-title {
  margin: 0 0 0.875rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sv-muted);
}

.sv-bar-row {
  display: grid;
  grid-template-columns: 1.75rem 1fr 5rem;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}

.sv-bar-row:last-child { margin-bottom: 0; }

.sv-bar-label {
  font-family: var(--sv-mono);
  font-size: 0.75rem;
  color: var(--sv-muted);
  text-align: right;
}

.sv-bar-track {
  display: block;
  height: 0.875rem;
  background: var(--sv-panel);
  border: 1px solid var(--sv-line);
  border-radius: 2px;
  overflow: hidden;
}

.sv-bar-fill {
  display: block;
  height: 100%;
  background: var(--sv-bar);
}

.sv-bar-value {
  font-family: var(--sv-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--sv-muted);
}

.sv-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--sv-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.sv-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 40rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .sv-wrap,
  .sv-ad { padding-inline: 1rem; }
  .sv-panel { padding: 1.25rem; }
  .sv-bar-row { grid-template-columns: 1.5rem 1fr 4rem; }
}

/* 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"] {
  --sv-surface: var(--tf-surface);
  --sv-panel: var(--tf-surface);
  --sv-line: var(--tf-rule);
  --sv-text: var(--tf-ink);
  --sv-muted: var(--tf-ink-soft);
  --sv-bar: #ccb48f;
}
