:root {
  color-scheme: light;
  --page: #f4f4f1; --panel: #fcfcfb; --ink: #0b0b0b; --ink2: #52514e; --ink3: #7a7974; --line: #e4e3de; --accent: #2a78d6; --accent-ink: #ffffff;
  --good: #1a7f4b; --warn: #b26a00; --bad: #c22f2e;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #121211; --panel: #1a1a19; --ink: #ffffff; --ink2: #c3c2b7; --ink3: #8f8e86; --line: #2f2f2c; --accent: #3987e5;
    --good: #3fbf7f; --warn: #e0a030; --bad: #ef7776;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #121211; --panel: #1a1a19; --ink: #ffffff; --ink2: #c3c2b7; --ink3: #8f8e86; --line: #2f2f2c; --accent: #3987e5;
  --good: #3fbf7f; --warn: #e0a030; --bad: #ef7776;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--page); color: var(--ink); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; }
header h1 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
header p { color: var(--ink2); max-width: 780px; margin-top: 4px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink2); margin-left: 6px; vertical-align: middle; }
.stage { display: grid; grid-template-columns: 250px 400px minmax(260px, 1fr); gap: 22px; margin-top: 18px; align-items: start; }
@media (max-width: 1000px) { .stage { grid-template-columns: 1fr; justify-items: center; } .side, .notes { width: 100%; max-width: 420px; } .phonewrap { order: -1; } }
.side, .notes { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.side h3, .notes h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); margin: 0 0 8px; font-weight: 700; }
.side h3:not(:first-child) { margin-top: 16px; }
.step { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: 8px; color: var(--ink2); cursor: pointer; font-size: 13px; }
.step:hover { background: var(--page); color: var(--ink); }
.step.on { background: var(--page); color: var(--ink); font-weight: 650; box-shadow: inset 3px 0 0 var(--accent); }
.edge { display: block; width: 100%; text-align: left; background: none; border: 1px dashed var(--line); padding: 6px 8px; border-radius: 8px; color: var(--ink2); cursor: pointer; font-size: 12.5px; margin-bottom: 6px; }
.edge:hover { border-color: var(--accent); color: var(--ink); }
.reset { margin-top: 12px; width: 100%; padding: 7px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink2); cursor: pointer; }
.notes .tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); margin: 0 4px 4px 0; }
.notes h2 { font-size: 15px; margin: 4px 0 6px; }
.notes p, .notes li { color: var(--ink2); font-size: 13px; }
.notes ul { padding-left: 18px; margin: 6px 0; }
.notes .src { color: var(--ink3); font-size: 12px; margin-top: 8px; }
.notes .open { border-left: 3px solid var(--warn); padding: 6px 10px; margin-top: 10px; background: color-mix(in srgb, var(--warn) 10%, transparent); font-size: 12.5px; color: var(--ink2); border-radius: 0 8px 8px 0; }

/* phone */
.phonewrap { display: flex; justify-content: center; }
.phone { width: 380px; height: 760px; background: #111; border-radius: 40px; padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); position: relative; }
.screen { width: 100%; height: 100%; background: #f6f7f9; border-radius: 30px; overflow: hidden; display: flex; flex-direction: column; color: #14161a; font-size: 14px; }
.status { display: flex; justify-content: space-between; padding: 10px 20px 4px; font-size: 12px; font-weight: 600; color: #14161a; }
.ribbon { text-align: center; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: #fff3cd; color: #6b5300; padding: 2px 0; }
.appbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e8eaee; min-height: 48px; }
.appbar .back { border: 0; background: none; font-size: 20px; cursor: pointer; padding: 2px 8px 2px 0; color: #14161a; }
.appbar .title { font-weight: 650; font-size: 15px; flex: 1; }
.content { flex: 1; overflow-y: auto; padding: 14px; }
.footer { padding: 10px 14px 16px; background: #fff; border-top: 1px solid #e8eaee; }
.btn { width: 100%; border: 0; border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 650; background: #2a63d6; color: #fff; cursor: pointer; }
.btn:disabled { background: #b8c2d8; cursor: not-allowed; }
.btn.ghost { background: #eef1f7; color: #2a63d6; margin-top: 8px; }
.card { background: #fff; border: 1px solid #e8eaee; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.h { font-weight: 650; font-size: 13px; margin-bottom: 6px; }
.muted { color: #6b7280; font-size: 12px; }
.row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; }
.row.big { font-size: 16px; font-weight: 700; border-top: 1px solid #e8eaee; margin-top: 4px; padding-top: 9px; }
.row .l { color: #4b5563; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pill.ok { background: #dcf3e6; color: #16653c; }
.pill.warn { background: #fdecc8; color: #7a4a00; }
.pill.bad { background: #fbdcdc; color: #9b1c1c; }
.pill.new { background: #2a63d6; color: #fff; }
input[type=text], input[type=number], select { width: 100%; border: 1px solid #d6dae2; border-radius: 10px; padding: 10px 12px; font-size: 14px; background: #fff; color: #14161a; }
label.f { display: block; font-size: 12px; color: #4b5563; margin: 10px 0 4px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { text-align: center; font-size: 11px; color: #374151; background: #fff; border: 1px solid #e8eaee; border-radius: 14px; padding: 12px 4px; cursor: default; position: relative; }
.tile .ic { width: 30px; height: 30px; border-radius: 10px; background: #e6ecfa; margin: 0 auto 6px; }
.tile.hot { border-color: #2a63d6; background: #eef3ff; cursor: pointer; box-shadow: 0 0 0 2px #2a63d633; }
.tile.hot .ic { background: #2a63d6; }
.tile .newb { position: absolute; top: -7px; right: -4px; }
.inst { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: #fff; border: 1px solid #e8eaee; border-radius: 14px; padding: 11px 12px; margin-bottom: 8px; cursor: pointer; }
.inst:hover { border-color: #2a63d6; }
.inst .logo { width: 36px; height: 36px; border-radius: 10px; background: #e6ecfa; display: grid; place-items: center; font-weight: 700; color: #2a63d6; font-size: 12px; }
.seg2 { display: flex; border: 1px solid #d6dae2; border-radius: 10px; overflow: hidden; }
.seg2 button { flex: 1; padding: 8px; border: 0; background: #fff; cursor: pointer; font-size: 13px; color: #374151; }
.seg2 button.on { background: #2a63d6; color: #fff; font-weight: 650; }
.timer { display: inline-block; font-variant-numeric: tabular-nums; font-weight: 700; }
.banner { border-radius: 12px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 10px; }
.banner.warn { background: #fff3d6; color: #6b4a00; }
.banner.bad { background: #fde3e3; color: #8a1c1c; }
.banner.ok { background: #e3f5ea; color: #16653c; }
.tl { position: relative; margin: 6px 0 0 8px; }
.tl .it { position: relative; padding: 0 0 16px 24px; }
.tl .it:before { content: ''; position: absolute; left: 6px; top: 14px; bottom: -2px; width: 2px; background: #d6dae2; }
.tl .it:last-child:before { display: none; }
.tl .dot { position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #c3c9d4; }
.tl .it.done .dot { background: #1a7f4b; border-color: #1a7f4b; }
.tl .it.now .dot { border-color: #2a63d6; box-shadow: 0 0 0 4px #2a63d633; }
.tl .it.done:before { background: #1a7f4b; }
.tl .t { font-weight: 650; font-size: 13.5px; }
.tl .s { font-size: 12px; color: #6b7280; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.keypad button { padding: 12px; font-size: 18px; border-radius: 12px; border: 1px solid #e0e3ea; background: #fff; cursor: pointer; }
.dots { display: flex; gap: 12px; justify-content: center; margin: 12px 0; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #2a63d6; }
.dots i.f { background: #2a63d6; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.cmp div { border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.cmp .a { background: #e3f5ea; } .cmp .b { background: #f3f4f6; }
.cmp b { display: block; font-size: 14px; margin-top: 2px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 6px 0; }
.check .tick { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #1a7f4b; color: #fff; font-size: 11px; display: grid; place-items: center; }
