/* Design tokens. Components only consume these variables. */
:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #e8edf1;
  --text: #13202b;
  --text-muted: #5a6b78;
  --border: #d3dbe2;
  --accent: #0b6e99;
  --accent-text: #ffffff;
  --danger: #b3261e;
  --danger-text: #ffffff;
  --zone-in: #1f8a4c;
  --zone-slow: #c77700;
  --zone-fast: #c0392b;
  --zone-unknown: #7d8b96;
  --zone-text: #ffffff;
  --progress: #0b6e99;
  --goal: #7b4bb7;
  --code-bg: #eef2f5;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.08);
  --card-from: #0b6e99;
  --card-to: #0a2a4a;
  --card-text: #ffffff;
  --card-highlight: #ffd166;
  --card-tile: rgb(255 255 255 / 0.14);
  --caption-bg: #13202b;
  --caption-text: #ffffff;
  --int-1: #9cc9dd;
  --int-2: #2f8fbd;
  --int-3: #e0951f;
  --int-4: #c0392b;
  --miss: #c9d2da;
  --ok: #1f8a4c;
  --on-int: #ffffff;
  --radius: 16px;
  --gutter: 16px;
  --tap: 56px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1418;
    --surface: #182129;
    --surface-2: #222e38;
    --text: #e8eef2;
    --text-muted: #9aabb8;
    --border: #2c3a46;
    --accent: #4fb3e0;
    --accent-text: #061722;
    --danger: #ef6b62;
    --danger-text: #1c0503;
    --zone-in: #2fae66;
    --zone-slow: #e0951f;
    --zone-fast: #e0574a;
    --zone-unknown: #56646f;
    --zone-text: #061016;
    --progress: #4fb3e0;
    --goal: #b18ae8;
    --code-bg: #10181e;
    --shadow: none;
    --card-from: #0e5f84;
    --card-to: #071a2c;
    --card-text: #ffffff;
    --card-highlight: #ffcf5c;
    --card-tile: rgb(255 255 255 / 0.12);
  --caption-bg: #e8eef2;
  --caption-text: #0f1418;
  --int-1: #3d6578;
  --int-2: #3fa2d4;
  --int-3: #e8a63a;
  --int-4: #e8665a;
  --miss: #34424e;
  --ok: #2fae66;
  --on-int: #ffffff;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1418;
  --surface: #182129;
  --surface-2: #222e38;
  --text: #e8eef2;
  --text-muted: #9aabb8;
  --border: #2c3a46;
  --accent: #4fb3e0;
  --accent-text: #061722;
  --danger: #ef6b62;
  --danger-text: #1c0503;
  --zone-in: #2fae66;
  --zone-slow: #e0951f;
  --zone-fast: #e0574a;
  --zone-unknown: #56646f;
  --zone-text: #061016;
  --progress: #4fb3e0;
  --goal: #b18ae8;
  --code-bg: #10181e;
  --shadow: none;
  --card-from: #0e5f84;
  --card-to: #071a2c;
  --card-text: #ffffff;
  --card-highlight: #ffcf5c;
  --card-tile: rgb(255 255 255 / 0.12);
  --caption-bg: #e8eef2;
  --caption-text: #0f1418;
  --int-1: #3d6578;
  --int-2: #3fa2d4;
  --int-3: #e8a63a;
  --int-4: #e8665a;
  --miss: #34424e;
  --ok: #2fae66;
  --on-int: #ffffff;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar-title { margin: 0; font-size: 1.15rem; }
.topbar-title { flex: none; }
.conn-chip {
  display: flex; align-items: center; gap: 6px; min-width: 0; margin-left: auto;
  min-height: 36px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.conn-chip .dot { width: 10px; height: 10px; }
.conn-chip-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { max-width: 640px; margin: 0 auto; padding: var(--gutter); padding-bottom: 40px; }

.view { display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.section-title { margin: 12px 0 0; font-size: 1.05rem; color: var(--text-muted); }
.muted { color: var(--text-muted); font-size: 0.95rem; }
.hint { color: var(--text-muted); font-size: 0.9rem; margin: 4px 0; }
.center { text-align: center; }

/* Buttons */
.button {
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  flex: 1 1 0;
  min-width: 0;
}
.button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.button.danger { background: var(--danger); color: var(--danger-text); border-color: var(--danger); }
.button.ghost { background: transparent; }
.button.big { min-height: 68px; font-size: 1.05rem; }
.button:disabled { opacity: 0.5; cursor: default; }
.button:focus-visible, .icon-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.icon-button {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: none; border-radius: 12px;
  background: var(--surface-2); color: var(--text);
  cursor: pointer;
}
.icon-button svg { width: 26px; height: 26px; fill: currentColor; }

.link-button {
  background: none; border: none; color: var(--accent);
  font: inherit; padding: 8px 0; text-align: left; cursor: pointer;
  text-decoration: underline;
}

.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* Connection */
.connection-row { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--zone-unknown); flex: none; }
.dot[data-state="connected"], .dot[data-state="sim"] { background: var(--zone-in); }
.dot[data-state="connecting"], .dot[data-state="reconnecting"] { background: var(--zone-slow); }
.dot[data-state="lost"], .dot[data-state="failed"], .dot[data-state="noFtms"] { background: var(--zone-fast); }

.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.history-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; font-size: 0.9rem; color: var(--text-muted);
}
.history-list strong { color: var(--text); }

/* Session view */
.zone-band {
  border-radius: var(--radius);
  min-height: 52px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em;
  color: var(--zone-text);
  background: var(--zone-unknown);
  transition: background-color 0.4s;
}
.zone-band[data-zone="in"] { background: var(--zone-in); }
.zone-band[data-zone="slow"] { background: var(--zone-slow); }
.zone-band[data-zone="fast"] { background: var(--zone-fast); }

.segment-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.segment-label { font-size: 1.6rem; font-weight: 800; line-height: 1.15; margin: 0; }
.segment-target { font-size: 1.1rem; font-weight: 600; color: var(--accent); }
.segment-time { text-align: right; flex: none; }
.time-big { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }

.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--progress); transition: width 0.25s linear; }
.goal-fill { background: var(--goal); }

.metric-hero { text-align: center; padding: 4px 0; }
.hero-value { font-size: clamp(5rem, 30vw, 9rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-unit { color: var(--text-muted); font-weight: 600; }

.metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 12px; text-align: center;
}
.metric-value { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric-label { color: var(--text-muted); font-size: 0.85rem; }

.bands-panel { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.bands-name { font-size: 1.8rem; font-weight: 800; }
.bands-step { font-size: 1.4rem; font-weight: 700; color: var(--accent); }

.goal { display: flex; flex-direction: column; gap: 6px; }
.goal-head { display: flex; justify-content: space-between; font-weight: 600; }


.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* Summary */
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 1.15rem; }
.summary-list dt { color: var(--text-muted); }
.summary-list dd { margin: 0; font-weight: 700; text-align: right; }
.share-card-preview { display: block; width: 100%; max-width: 420px; margin: 16px auto 0; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }

/* Dialogs */
.sheet {
  border: none; border-radius: var(--radius);
  padding: 0; width: min(560px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100dvh - 32px);
  background: var(--surface); color: var(--text);
}
.sheet::backdrop { background: rgb(0 0 0 / 0.5); }
.sheet-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.sheet-body h2 { margin: 0; }
.sheet-body h3 { margin: 6px 0 0; font-size: 1rem; }
.data-section { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.data-section .button-row { flex-direction: column; }
.data-status { margin: 4px 0; font-weight: 600; color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field.inline { flex-direction: row; align-items: center; gap: 12px; min-height: var(--tap); }
.field.inline input { width: 28px; height: 28px; accent-color: var(--accent); }
.field select {
  min-height: var(--tap); border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit; padding: 0 12px;
}
.field input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 40px; }

.diag-services { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.diag-service { background: var(--code-bg); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.diag-service ul { margin: 4px 0 0; padding-left: 18px; }
.diag-hex {
  background: var(--code-bg); color: var(--text); border-radius: 10px;
  padding: 10px; margin: 0; min-height: 120px; max-height: 240px; overflow: auto;
  font-size: 0.75rem; white-space: pre-wrap; overflow-wrap: anywhere;
}


/* End-of-session check-in */
.checkin h3 { margin-top: 0; }
.checkin-options { display: flex; gap: 8px; margin-bottom: 12px; }
.checkin-options .checkin-option { flex: 1 1 0; min-width: 0; }
.checkin-option { min-height: 64px; font-size: 1.15rem; font-weight: 600; }


@media (max-width: 380px) {
  body { font-size: 16px; }
  .time-big { font-size: 2.1rem; }
  .controls .button.big { font-size: 0.95rem; padding: 0 8px; }
}

/* Coach caption: the caption itself reserves 3 lines (hidden, not removed, when empty), so the layout never jumps. */
.coach-slot { display: flex; margin: 12px 0; }
.coach-caption {
  width: 100%;
  margin: 0;
  min-height: calc(3 * 1.3em + 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: var(--caption-bg);
  color: var(--caption-text);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  border-radius: var(--radius);
  transition: opacity 0.4s;
}
.coach-caption.is-empty { visibility: hidden; }
.coach-caption.is-fresh { animation: caption-in 0.25s ease-out; }
.coach-caption.is-old { opacity: 0.55; }
@keyframes caption-in { from { transform: translateY(8px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .coach-caption.is-fresh { animation: none; } }

/* Bar-profile (level) session */
#view-session.is-profile .classic-only { display: none; }
.profile-bars { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 130px; margin: 10px 0 6px; }
.pbar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.pbar i { display: block; width: 100%; height: calc(var(--h, 1) * (100% - 1.1em - 4px)); border-radius: 4px 4px 0 0; background: var(--bar); }
.pbar-pct { margin-top: 4px; font-size: 0.58rem; color: var(--text-muted); line-height: 1.1em; }
.pbar.future i { opacity: 0.35; }
.pbar.current i { outline: 2px solid var(--text); outline-offset: 0; }
.l1 { --bar: var(--int-1); }
.l2 { --bar: var(--int-2); }
.l3 { --bar: var(--int-3); }
.l4 { --bar: var(--int-4); }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.8rem; color: var(--text-muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 2px; background: var(--bar); vertical-align: -1px; }
.legend .legend-note::before { display: none; }
.now-block { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; margin: 12px 0; padding: 12px; border-radius: var(--radius); background: var(--bar); color: var(--on-int); }
.now-block.l1 { color: var(--text); }
.now-res { grid-row: span 4; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 72px; padding: 8px; border-radius: 12px; background: color-mix(in srgb, currentColor 22%, transparent); }
.now-res b { font-size: 2.4rem; line-height: 1; }
.now-block .t { font-size: 1.25rem; font-weight: 700; }
.now-block .s { font-size: 0.9rem; }
.now-block .warn { font-weight: 700; }
.profile-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.profile-metrics:has(> .pmetric[hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pmetric { padding: 8px 6px; border-radius: 12px; background: var(--surface-2); text-align: center; min-width: 0; }
.pmetric .v { display: block; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pmetric .v.ok { color: var(--ok); }
.pmetric .metric-label, .pmetric .pm-target { display: block; font-size: 0.72rem; color: var(--text-muted); overflow-wrap: anywhere; }
.next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin-top: 10px; padding: 8px 10px; border-left: 4px solid var(--bar, var(--border)); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 0.9rem; }
.next .res-change { font-weight: 700; }
.profile-panel .bar-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }

/* Home: weekly plan, level ladder, goal and streak */
#home-plan { display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-title { margin: 0 0 8px; font-size: 1.05rem; }
.field-label { margin: 12px 0 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.today-btn { width: 100%; display: grid; gap: 2px; white-space: normal; }
.today-btn small { font-size: 0.85rem; font-weight: 500; opacity: 0.9; }
.start-alts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.start-alts .button[aria-expanded="true"] { background: var(--surface-2); }
.plan-week { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 0.9rem; }
.plan-week li { display: grid; grid-template-columns: 1.6em 1fr auto; gap: 8px; align-items: center; padding: 8px; border-radius: 10px; background: var(--surface-2); border: 2px solid transparent; }
.plan-week li.pending { cursor: pointer; }
.plan-week li.done { color: var(--text-muted); text-decoration: line-through; }
.plan-week li.today { border-color: var(--goal); }
.plan-week li.picked { border-color: var(--accent); }
.plan-week .pw-mark { font-weight: 700; text-align: center; }
.plan-week li.done .pw-mark { color: var(--ok); }
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.gauge { background: var(--surface-2); border-radius: 12px; padding: 10px; display: grid; gap: 4px; min-width: 0; }
.gauge.is-goal { outline: 2px solid var(--goal); outline-offset: -2px; }
.g-name { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.g-val { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.g-val small { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }
.g-bar { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.g-bar i { display: block; height: 100%; background: var(--goal); }
.g-goal { font-size: 0.78rem; color: var(--text-muted); }
.goal-summary { margin: 10px 0 0; font-weight: 600; }
.goal-setup { margin-top: 8px; }
.goal-setup > summary { cursor: pointer; color: var(--accent); font-weight: 700; list-style: none; padding: 6px 0; }
.goal-setup > summary::-webkit-details-marker { display: none; }
.goal-setup > summary::after { content: ' \203A'; }
.goal-setup[open] > summary::after { content: ' \2304'; }
.seg { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 6px; }
.chip { appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 10px 6px; min-height: 44px; font: inherit; font-weight: 600; cursor: pointer; display: grid; gap: 2px; text-align: center; }
.chip span { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chip[aria-pressed="true"] span { color: var(--accent-text); }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.streak-count { font-weight: 700; color: var(--goal); }
.week-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 0.7rem; color: var(--text-muted); }
.week-dots i { display: block; height: 28px; border-radius: 8px; background: var(--surface-2); margin-bottom: 2px; font-style: normal; line-height: 28px; font-size: 0.85rem; }
.week-dots i.done { background: var(--ok); color: var(--on-int); }
.week-dots i.today { outline: 2px dashed var(--goal); outline-offset: -2px; }
.week-dots i.rest { background: none; border: 1px dashed var(--border); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; font-size: 0.8rem; margin-top: 6px; }
.badges span, .badge-btn { border: 1px solid var(--goal); border-radius: 999px; padding: 4px 10px; }
.badge-btn { font: inherit; color: inherit; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.badge-btn[aria-expanded="true"] { background: var(--surface-2); }
.badges span.locked { opacity: 0.5; border-style: dashed; }
.wildcard-note { margin: 8px 0 0; background: var(--surface-2); border-left: 3px solid var(--goal); border-radius: 8px; padding: 8px 10px; font-size: 0.85rem; line-height: 1.4; }

/* Placement test and customize */
.big-number { margin: 0; font-size: 2.6rem; font-weight: 700; }
.big-number small { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fields label { display: grid; gap: 4px; font-size: 0.8rem; color: var(--text-muted); }
.fields input, .fields select { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-width: 0; min-height: 44px; }
.why { margin-top: 10px; }
.why summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 6px; align-items: center; }
.stepper output { text-align: center; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper .button:disabled { opacity: 0.4; cursor: default; }

/* Free trial banner (home, above the weekly plan) */
.trial {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--surface); border: 1px dashed var(--goal); border-radius: 12px;
  padding: 8px 12px; font-size: 0.82rem;
}
.trial[hidden] { display: none; }
.trial-info { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.trial-days { white-space: nowrap; color: var(--goal); font-weight: 700; }

/* Machine: compatibility search, checklist and connection test */
.view-title { margin: 0; font-size: 1.4rem; line-height: 1.2; }
.machine-search {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px; width: 100%; box-sizing: border-box;
}
.machine-list { display: grid; gap: 6px; }
.machine-list:empty { display: none; }
.machine-list button {
  appearance: none; font: inherit; text-align: left; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer;
  display: flex; justify-content: space-between; gap: 8px; min-height: 44px; align-items: center;
}
.machine-list button small { color: var(--text-muted); }
.machine-list button[aria-pressed="true"] { border-color: var(--accent); }
.machine-list .hint { margin: 0; }
.verdict { display: flex; flex-direction: column; gap: 10px; border-left: 4px solid var(--border); }
.verdict[hidden] { display: none; }
.verdict[data-state="yes"] { border-left-color: var(--ok); }
.verdict[data-state="maybe"] { border-left-color: var(--int-3); }
.verdict[data-state="no"] { border-left-color: var(--int-4); }
.verdict .card-title, .verdict .hint { margin: 0; }
.connect-steps { margin: 0 0 6px; padding-left: 18px; font-size: 0.85rem; color: var(--text-muted); display: grid; gap: 4px; }
.prep { display: grid; gap: 8px; }
.prep[hidden], .probe[hidden] { display: none; }
.prep-title { margin: 0; font-weight: 700; }
.prep-step {
  display: grid; grid-template-columns: 26px 1fr; gap: 2px 8px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; cursor: pointer;
}
.prep-step input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.prep-step span { display: grid; gap: 2px; }
.prep-step b { font-size: 0.9rem; }
.prep-step small { font-size: 0.8rem; color: var(--text-muted); line-height: 1.35; }
.prep-step:has(input:checked) { border-color: var(--ok); }
.prep-step:has(input:checked) b { color: var(--ok); }
.prep-note { margin: 0; font-size: 0.8rem; color: var(--text-muted); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.probe { display: grid; gap: 6px; }
.probe-row {
  display: flex; justify-content: space-between; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 0.9rem;
}
.probe-row b { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.probe-row[data-ok="true"] { border-color: var(--ok); }
.probe-row[data-ok="true"] b { color: var(--ok); font-weight: 700; }
.probe-row[data-ok="false"] { border-color: var(--int-4); }
.probe-row[data-ok="false"] b { color: var(--int-4); font-weight: 700; }
.hint.warn { color: var(--int-4); }
.machine-more .button-row { margin-top: 0; }

/* Connection problem report */
.report-field { display: flex; flex-direction: column; gap: 6px; }
.report-field input, .report-field textarea {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; min-height: 44px; width: 100%; box-sizing: border-box; resize: vertical;
}
.report-trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.report-status { margin: 0; min-height: 1.3em; color: var(--text-muted); }
.report-status.is-error { color: var(--danger); }
.report-status.is-ok { color: var(--ok); }
