:root {
  --bg: #14161a;
  --panel: #1e2127;
  --panel-2: #272b33;
  --line: #3a3f49;
  --text: #f2f2ee;
  --muted: #a6abb5;
  --accent: #ffb020;      /* safety amber */
  --accent-ink: #1a1200;
  --stop: #ff4d4d;
  --stop-bg: #3a1214;
  --warn: #ffcf5c;
  --ok: #4cd08a;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
}
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
}
h1 { font-size: 18px; margin: 0; letter-spacing: .3px; }
h1::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--accent); margin-right: 8px; border-radius: 2px; }
h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 20px 0 8px; }
main { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.view { display: none; }
.view.active { display: block; }
.muted { color: var(--muted); }
.net { font-size: 13px; color: var(--muted); }
.net.off { color: var(--warn); }

/* pickers */
.group { margin-top: 14px; }
.group-label { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg.size { grid-template-columns: repeat(6, 1fr); }
.seg button {
  min-height: 52px; padding: 6px 4px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
}
.seg.size button { font-size: 18px; }
.seg.access { grid-template-columns: repeat(2, 1fr); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* result */
#result { margin-top: 18px; scroll-margin-top: 60px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.empty { color: var(--muted); text-align: center; padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
.machine-name { font-size: 20px; font-weight: 700; }
.machine-sub { color: var(--muted); font-size: 14px; }
.alts { margin-top: 6px; font-size: 14px; color: var(--muted); }
.passes { list-style: none; margin: 0; padding: 0; }
.passes li { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.passes li:first-child { border-top: 0; }
.step { font-size: 13px; text-transform: uppercase; color: var(--accent); font-weight: 700; padding-top: 3px; }
.cutter { font-size: 19px; font-weight: 700; }
.note { color: var(--muted); font-size: 15px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; border: 1px solid var(--warn); color: var(--warn); margin-left: 6px; vertical-align: middle; }
.stop { background: var(--stop-bg); border: 2px solid var(--stop); }
.stop strong { color: var(--stop); font-size: 18px; display: block; margin-bottom: 4px; }
.camera { border-left: 4px solid var(--accent); }
.warnings { margin: 0; padding-left: 20px; }
.warnings li { margin: 4px 0; }
.core { font-size: 14px; color: var(--muted); }
.fallback { border: 1px dashed var(--warn); color: var(--warn); }
.unverified { font-size: 13px; color: var(--muted); }
.unverified ul { margin: 4px 0 0; padding-left: 18px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* steps */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 48px; }
.checklist input { width: 24px; height: 24px; flex: none; accent-color: var(--accent); margin-top: 1px; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* forms + buttons */
label { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
input, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 12px; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { min-height: 48px; padding: 10px 16px; border-radius: var(--radius); font: inherit; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); width: 100%; }
.btn.ghost { background: transparent; min-height: 40px; padding: 6px 12px; }
.btn.danger { color: var(--stop); border-color: var(--stop); background: transparent; }
.jobs { list-style: none; padding: 0; margin: 0; }
.jobs li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.jobs pre { white-space: pre-wrap; font: 14px/1.4 inherit; margin: 0; font-family: inherit; }
.sent { color: var(--ok); font-size: 13px; font-weight: 700; }
.settings { margin: 20px 0; background: var(--panel); border-radius: var(--radius); padding: 10px 14px; }
.settings summary { cursor: pointer; font-weight: 700; min-height: 32px; }

/* tabs */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr);
  background: #0e1013; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs button { min-height: 60px; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.tabs button.active { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 24px 16px 0; }
