/* Right Triangle Solver — content styles.
   Prefix: --rt-  /  .rt-

   Reference point: a labeled geometry diagram (a static SVG right
   triangle with sides a/b/c and angles A/B marked) sits above the
   inputs, so "side a" and "angle A" in the form map immediately onto
   a picture rather than requiring the reader to hold the convention
   in their head. Second `education`-cluster tool this loop, and the
   first to include an illustrative diagram rather than typeset
   notation (`quadratic-equation-solver`, iteration 47).

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --rt-surface: #ffffff;
  --rt-panel:   #f4f5f6;
  --rt-line:    #dde0e3;
  --rt-text:    #171a1c;
  --rt-muted:   #5c6368;
  --rt-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.rt-wrap {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.rt-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--rt-line);
  border-radius: 2px;
  background: var(--rt-surface);
}

.rt-diagram {
  display: block;
  width: 12rem;
  height: auto;
  margin: 0 auto 1.25rem;
  color: var(--rt-text);
}

.rt-diagram-label {
  font-family: var(--rt-mono);
  font-size: 11px;
  fill: var(--rt-muted);
}

.rt-field {
  margin-bottom: 1rem;
}

.rt-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rt-muted);
}

.rt-field select,
.rt-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--rt-text);
  background: var(--rt-panel);
  border: 1px solid var(--rt-line);
  border-radius: 2px;
}

.rt-field input {
  font-family: var(--rt-mono);
  font-size: 1rem;
}

.rt-field select:focus-visible,
.rt-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.rt-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.rt-row .rt-field {
  margin-bottom: 0;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.rt-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;
}

.rt-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.rt-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.rt-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Results ─────────────────────────────────────────────────────────────── */

.rt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
  margin-bottom: 1rem;
}

@media (max-width: 30rem) {
  .rt-grid { grid-template-columns: repeat(2, 1fr); }
}

.rt-metric {
  padding: 0.875rem 0.5rem;
  border: 1px solid var(--rt-line);
  border-radius: 2px;
  background: var(--rt-panel);
  text-align: center;
}

.rt-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.6875rem;
  color: var(--rt-muted);
}

.rt-metric-value {
  margin: 0;
  font-family: var(--rt-mono);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--rt-text);
}

.rt-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--rt-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.rt-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 34rem;
  padding-inline: 1.5rem;
  overflow: hidden;
}

@media (max-width: 26rem) {
  .rt-wrap,
  .rt-ad { padding-inline: 1rem; }
  .rt-panel { padding: 1.25rem; }
  .rt-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"] {
  --rt-surface: var(--tf-surface);
  --rt-panel: var(--tf-surface);
  --rt-line: var(--tf-rule);
  --rt-text: var(--tf-ink);
  --rt-muted: var(--tf-ink-soft);
}
