/* GENERATED from packages/design/base.css by packages/design/scripts/sync.mjs — do not edit here. */
/* Kardio base styles — element defaults for the vanilla (apps/ekg) and
   Svelte (apps/echo) apps. Requires tokens.css; load header.css after it.

   NOT for apps/learn: unscoped `button { background: var(--accent) }` would
   restyle every Tailwind button there. The course uses tailwind.preset.cjs
   plus header.css, which is class-scoped (see HEADER.md).

   Origin: EKG Studio css/studio.css + EchoSchema src/lib/styles/theme.css,
   which were already near-identical; values now come from tokens. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-ui);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: var(--leading-tight); text-wrap: balance; }
p, li { overflow-wrap: break-word; }

button, input, select, textarea { font: inherit; letter-spacing: normal; }

button {
  flex: 0 0 auto;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  padding: 10px 15px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.4; cursor: default; }
button.secondary, button.quiet { background: var(--surface); border-color: var(--line); color: var(--ink); }
button.quiet { background: transparent; border-color: transparent; }
button.secondary:hover, button.quiet:hover { background: var(--surface-soft); border-color: var(--line); }
button.toggle-btn.active { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }

:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
a { color: var(--accent); }

input, select, textarea {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  padding: 10px 11px;
  min-height: 40px;
  max-width: 100%;
}
select { cursor: pointer; }
textarea { width: 100%; resize: vertical; line-height: 1.6; }
input[type="range"] { border: 0; padding: 0; min-height: 24px; accent-color: var(--accent); background: transparent; }
input[type="checkbox"] { accent-color: var(--accent); min-height: 0; width: 16px; height: 16px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
optgroup { color: var(--muted); font-weight: 600; }
option { color: var(--ink); background: var(--surface); }
input, output { font-variant-numeric: tabular-nums; }

/* The platform header and the disclaimer bar live in header.css (shared
   with the course); the settings sidebar in sidebar.css. */

/* 44px touch targets; 16px inputs stop iOS Safari zooming on focus. */
@media (hover: none) and (pointer: coarse) {
  button, select, input:not([type="range"]):not([type="checkbox"]) { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
}
/* Mobile shell (<html class="kardio-shell">): component rules with higher
   specificity must not undercut iOS's 16 px focus-zoom threshold. Only the
   font size is forced; heights stay per component. */
@media (hover: none) and (pointer: coarse) {
  .kardio-shell input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
  .kardio-shell select,
  .kardio-shell textarea { font-size: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
