/* Placeholder tokens until the TimEng ui-kit tokens arrive; swap the values here. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #dde1e7;
  --text: #17202b;
  --muted: #5d6877;
  --accent: #1f6feb;
  --accent-text: #ffffff;
  --ok-bg: #e8f6ee;  --ok-text: #11643a;
  --warn-bg: #fff6e0; --warn-text: #7a5300;
  --err-bg: #fdecec; --err-text: #9b1c1c;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a;
    --surface: #171e27;
    --border: #2a3441;
    --text: #e5eaf0;
    --muted: #93a0b0;
    --accent: #4b8ff7;
    --accent-text: #0b1220;
    --ok-bg: #0f2a1c;  --ok-text: #7ad7a2;
    --warn-bg: #2d2410; --warn-text: #f1c86b;
    --err-bg: #301416; --err-text: #f39b9b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.top { background: var(--surface); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; gap: 12px; align-items: baseline; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 700; color: var(--accent); }
.title { font-weight: 600; }

main { padding-top: 24px; padding-bottom: 48px; }

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.step h2 { margin: 0 0 12px; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.num {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  font-size: .8rem;
}

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
input, select {
  font: inherit; color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
}
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); margin: 12px 0; }
label.check input { width: auto; }

button {
  font: inherit;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

.muted { color: var(--muted); }
.small { font-size: .85rem; font-weight: normal; }
.notes { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: .9rem; }

.device { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.device div { background: var(--bg); border-radius: 8px; padding: 8px 12px; }
.device dt { font-size: .8rem; color: var(--muted); }
.device dd { margin: 0; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }

.advanced { margin: 8px 0; color: var(--muted); }
.advanced label { max-width: 220px; margin-top: 8px; }

.bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; margin-top: 12px; }
#bar-fill { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.notice { border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.notice.ok { background: var(--ok-bg); color: var(--ok-text); }
.notice.warn { background: var(--warn-bg); color: var(--warn-text); }
.notice.err { background: var(--err-bg); color: var(--err-text); }

.log { margin-top: 12px; color: var(--muted); }
.log pre {
  max-height: 260px; overflow: auto;
  background: var(--bg); border-radius: 8px; padding: 10px;
  font-size: .8rem; white-space: pre-wrap; overflow-wrap: anywhere;
}

button.danger { background: var(--err-text); border-color: var(--err-text); color: var(--surface); font-weight: 600; }
.compare { font-size: 1.05rem; margin: 12px 0 0; }
.compare strong { font-family: ui-monospace, monospace; }
.recovery { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.recovery summary { cursor: pointer; color: var(--muted); }
