/*
 * TriathlonHowTo theme for the Plan Builder.
 * Loaded after the builder's own CSS (see scripts/sync-plan-builder.mjs), so
 * it only overrides: palette, type and corners follow the rest of the site.
 * The builder's markup and logic are untouched.
 */
:root,
:root[data-theme=light] {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #0f1b24;
  --mut: #5b6b78;
  --line: #e4e0d6;
  --panel: #f6f4ef;
  --band: #0f1b24;
  --swim: #2f8fae;
  --bike: #d0573a;
  --run: #4f9a5e;
  --race: #d9440f;
  --acc: #d9440f;
  --head: Outfit, system-ui, sans-serif;
}

body { font-family: "Libre Franklin", system-ui, sans-serif; }
h1, h2, h3, .fig-n, legend, .dow { font-family: var(--head); letter-spacing: -0.01em; }
h2, legend { font-weight: 600; }
svg text { font-family: "Libre Franklin", sans-serif; }

/* Square, quiet corners like the rest of the site. */
fieldset, .card, .btn, .code, .warn li, .terms details, .ses.rest,
input[type=number], input[type=date], input[type=text], select, textarea { border-radius: 2px; }
fieldset { background: var(--panel); }

.btn { font-family: var(--head); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 14px; }
.btn.sm { font-size: 12px; }
.btn.main { background: var(--acc); border-color: var(--acc); }
.btn.main:hover { background: #b9390c; border-color: #b9390c; }

/* Swim blue is light for small text; use a darker step where it is text. */
.ses summary { color: #1f6f88; }
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible { outline-color: #ff5a1f; }
.chk input, .days input[type=checkbox] { accent-color: #d9440f; }

.top { background: var(--band); }
.top h1 { font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em; }
.btn.ghost { border-color: rgba(255, 255, 255, 0.35); }
.btn.ghost:hover { border-color: #fff; }
.formh { font-family: var(--head); font-weight: 600; letter-spacing: -0.01em; }

/* Inside the site page the host already has the title and intro. */
html[data-embedded] .top { padding-top: 14px; padding-bottom: 14px; }
html[data-embedded] .top h1,
html[data-embedded] .top > p { display: none; }
html[data-embedded] .paths { margin-top: 0; }

/* Outfit is wider than the builder's condensed face, so the summary figures
   step down a size to stay inside their columns. */
.figs { grid-template-columns: repeat(auto-fit, minmax(10.5em, 1fr)); }
.fig-n { font-size: clamp(19px, 1.7vw, 26px); font-weight: 600; }
