:root {
  color-scheme: dark;
  --bg: #151515;
  --panel: #1b1b1b;
  --panel-2: #232323;
  --line: #383838;
  --line-2: #555555;
  --text: #eeeef2;
  --muted: #a6a6ab;
  --green: #eeeef2;
  --green-ink: #151515;
  --gold: #e3a41b;
  --red: #f0614f;
  --blue: #4f93ff;
  --purple: #a874ff;
  --px: 4px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  background-image: none;
}
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: #ffffff; }
b { font-weight: 650; }
.mono { font-family: var(--mono); font-size: .86em; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 13px; }
em { font-style: normal; }

/* top bar */
.top {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  max-width: 1180px; margin: 0 auto; padding: 22px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-text { font-weight: 700; letter-spacing: -.01em; display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.top nav a:hover { color: var(--text); }
.chip {
  font: 800 14px/1 var(--mono); letter-spacing: .06em; padding: 8px 11px; color: var(--green-ink);
  clip-path: polygon(var(--px) 0, calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px),
    100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%,
    var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px)), 0 var(--px), var(--px) var(--px));
}
.chip-green { background: var(--green); }
.pill {
  font: 600 12px/1 var(--sans); padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line-2);
  color: var(--muted); white-space: nowrap;
}
.pill.ok { color: var(--green); border-color: #eeeef255; background: #eeeef212; }
.pill.bad { color: var(--red); border-color: #f0614f66; background: #f0614f12; }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px 60px; }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 520px; gap: 56px; align-items: center; padding: 34px 0 54px; }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin: 0 0 18px; }
h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 20px; font-weight: 800; }
h1 em { color: var(--green); }
.lede { color: #bbbbc0; font-size: 18px; max-width: 54ch; margin: 0 0 28px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; }
.facts li { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 14px 14px 12px; }
.facts b { display: block; font: 800 26px/1.1 var(--mono); color: var(--text); }
.facts span { color: var(--muted); font-size: 13px; line-height: 1.3; display: block; margin-top: 6px; }

.device { margin: 0; }
.bezel {
  padding: 20px; border-radius: 26px; background: linear-gradient(155deg, #2a3234, #151a1c 70%);
  box-shadow: 0 30px 70px #0009, inset 0 1px #ffffff12, inset 0 0 0 1px #000;
}
.glass { position: relative; background: #000; border-radius: 10px; overflow: hidden; line-height: 0; box-shadow: inset 0 0 0 1px #ffffff10; }
.glass::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, #00000026 0 1px, transparent 1px 2px); pointer-events: none; }
.px { width: 100%; height: auto; image-rendering: pixelated; display: block; }
.device figcaption { display: flex; justify-content: space-between; align-items: center; padding: 14px 6px 0; color: var(--muted); font: 600 12px var(--mono); letter-spacing: .1em; }
.dots { display: flex; gap: 8px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: var(--line-2); cursor: pointer; }
.dots button[aria-selected="true"] { background: var(--green); box-shadow: 0 0 10px #eeeef288; }

/* installer panel */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px; max-width: 860px; margin: 0 auto; box-shadow: 0 30px 80px #0006; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.panel h2 { font-size: 28px; letter-spacing: -.02em; margin: 0; }
.panel h3 { font-size: 24px; letter-spacing: -.02em; margin: 6px 0 10px; }
.panel h4 { margin: 26px 0 10px; font: 700 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.panel p { color: #bbbbc0; margin: 0 0 16px; }

.stepper { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.stepper li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; position: relative; padding-right: 10px; }
.stepper li::after { content: ""; flex: 1; height: 2px; background: var(--line); margin-left: 6px; }
.stepper li:last-child::after { display: none; }
.stepper i {
  font: 700 13px/1 var(--mono); font-style: normal; width: 30px; height: 30px; display: grid; place-items: center;
  border: 2px solid var(--line-2); color: var(--muted); background: var(--panel); flex: none;
  clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px);
  border-radius: 6px;
}
.stepper li.current { color: var(--text); }
.stepper li.current i { border-color: var(--green); color: var(--green); }
.stepper li.done { color: var(--text); }
.stepper li.done i { background: var(--green); border-color: var(--green); color: var(--green-ink); font-size: 0; }
.stepper li.done i { position: relative; }
.stepper li.done i::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 11px; height: 6px; border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: translate(-50%, -65%) rotate(-45deg);
}
.stepper li.done::after { background: var(--green); }

.btn {
  font: 700 15px/1 var(--sans); border: 0; cursor: pointer; padding: 16px 22px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 12px; transition: transform .08s, background .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--green); color: var(--green-ink); }
.btn-primary:hover:not(:disabled) { background: #d0d0d5; }
.btn-quiet { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn-quiet:hover { border-color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; border-radius: 4px; }

.checklist { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 12px; color: #d1d1d5; font-size: 15px; }
.checklist i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; font: 700 12px/1 var(--sans); font-style: normal; }
.checklist [data-state="ok"] i { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.checklist [data-state="ok"] i::after { content: "✓"; }
.checklist [data-state="bad"] i { background: var(--red); border-color: var(--red); color: #1a0504; }
.checklist [data-state="bad"] i::after { content: "✕"; }
.checklist [data-state="wait"] i { border-color: var(--gold); animation: pulse 1.2s infinite; }
.checklist em { color: var(--muted); margin-left: 6px; font-size: 13px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px #e3a41b22; } }

.device-card { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 18px 0 0; }
.device-card div { background: var(--panel-2); padding: 14px 16px; }
.device-card dt { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.device-card dd { margin: 0; font-weight: 650; font-size: 15px; overflow-wrap: anywhere; }

.plan, .stages { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.plan li, .stages li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.plan li:last-child, .stages li:last-child { border-bottom: 1px solid var(--line); }
.plan li::before, .stages li::before { content: counter(s); font: 700 13px var(--mono); color: var(--green); background: #eeeef218; border-radius: 6px; width: 28px; height: 28px; display: grid; place-items: center; }
.plan strong, .stages strong { display: block; font-size: 16px; }
.plan span, .stages span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.plan time { color: var(--muted); font: 600 12px var(--mono); padding-top: 6px; }
.stages .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); margin-top: 8px; }
.stages li.active .dot { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 14px #e3a41b99; animation: pulse 1.2s infinite; }
.stages li.done .dot { border-color: var(--green); background: var(--green); }
.stages li.active::before { color: var(--gold); background: #e3a41b18; }

.backup { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-top: 22px; }
.backup p { margin: 4px 0 0; font-size: 14px; }
.consent { display: grid; gap: 14px; margin-top: 24px; }
.consent label { display: flex; gap: 12px; align-items: flex-start; color: #d1d1d5; font-size: 15px; cursor: pointer; }
.consent input { accent-color: var(--green); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }

.banner { background: #e3a41b14; border: 1px solid #e3a41b66; color: #f3d99a; border-radius: 10px; padding: 14px 16px; margin: 6px 0 20px; font-size: 15px; }
.compatibility-warning { background: #dc555b1a; border: 1px solid #dc555b66; color: #f4c9cc; padding: 18px 20px; margin: 20px 0 24px; font-size: 15px; }
.compatibility-consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding-top: 16px; border-top: 1px solid #dc555b66; font-size: 13px; cursor: pointer; }
.compatibility-consent input { accent-color: #eeeef2; width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.compatibility-warning > strong { display: block; font-size: 17px; }
.compatibility-warning p { color: inherit; margin: 10px 0 0; }
.compatibility-warning a { color: inherit; text-decoration: underline; font-weight: 700; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 24px 0 14px; }
#bar-fill { height: 100%; width: 0; background: var(--green); border-radius: 99px; transition: width .35s; }
.status { font: 500 14px var(--mono); color: #d1d1d5; min-height: 22px; }
.log { margin-top: 16px; }
.log summary { cursor: pointer; color: var(--muted); font: 600 13px var(--mono); }
.log pre { background: #111111; border: 1px solid var(--line); border-radius: 10px; padding: 14px; max-height: 220px; overflow: auto; font: 12px/1.5 var(--mono); color: #aaaab0; white-space: pre-wrap; margin: 12px 0 0; }

.alert { border-radius: 12px; padding: 16px 18px; margin: 0 0 22px; border: 1px solid #f0614f77; background: #f0614f14; }
.alert b { color: #ff9f93; }
.alert p { margin: 6px 0 0; color: #f3c9c3; font-size: 15px; }
.alert.info { border-color: #4f93ff66; background: #4f93ff12; }
.alert.info b { color: #9ec3ff; }
.alert.info p { color: #cfe0ff; }

.done-mark { width: 64px; height: 64px; border-radius: 16px; background: var(--green); display: grid; place-items: center; margin-bottom: 14px; box-shadow: 0 0 40px #eeeef255; }
.done-mark i { width: 18px; height: 30px; border: solid var(--green-ink); border-width: 0 6px 6px 0; transform: rotate(45deg) translate(-2px, -2px); }
.next { border-top: 1px solid var(--line); margin-top: 8px; }
.next ol { margin: 0; padding-left: 20px; color: #c7c7cc; }
.next li { margin: 6px 0; }

/* help */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 860px; margin: 70px auto 0; }
.cols h2, .legal h2 { font-size: 22px; letter-spacing: -.01em; margin: 0 0 14px; }
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details summary::after { content: "+"; color: var(--green); font: 700 18px/1 var(--mono); }
details[open] summary::after { content: "–"; }
details summary::-webkit-details-marker { display: none; }
details p { color: #bbbbc0; margin: 10px 0 0; font-size: 15px; }
.legal { max-width: 860px; margin: 60px auto 0; border-top: 1px solid var(--line); padding-top: 34px; }
.legal p { color: #bbbbc0; max-width: 70ch; }

footer { max-width: 1180px; margin: 0 auto; padding: 30px 24px 50px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .device { max-width: 480px; }
  .cols { grid-template-columns: 1fr; gap: 20px; }
  .device-card { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .top { gap: 14px; }
  .top nav { display: none; }
  .panel { padding: 22px 18px; }
  .stepper li span { display: none; }
  .stepper li.current span { display: inline; }
  .facts { grid-template-columns: 1fr 1fr; }
  .plan li, .stages li { grid-template-columns: 34px 1fr; }
  .plan time, .stages .dot { display: none; }
  .backup { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* Connected instruments */
.device-picker { margin: 28px 0 26px; padding: 24px; border: 1px solid #45464b; background: #1b1c1f; }
.device-picker[hidden] { display: none; }
.device-picker-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.device-picker-eyebrow { margin: 0 0 7px; color: #969ca1; font: 600 10px/1.2 var(--mono); letter-spacing: .15em; }
.device-picker-heading h4 { margin: 0; color: #f3f3f4; font-size: 21px; font-weight: 600; letter-spacing: -.03em; }
.device-connected-label { color: #a3b4a9; font: 600 10px/1 var(--mono); letter-spacing: .1em; white-space: nowrap; }
.device-connected-label i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #85d69f; }
.device-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 0; border: 0; min-width: 0; }
.device-option { position: relative; display: flex; align-items: center; gap: 16px; min-width: 0; min-height: 100px; padding: 16px; border: 1px solid #414448; background: #242629; cursor: pointer; transition: border-color .15s, background .15s; }
.device-option:hover { border-color: #858c89; }
.device-option:has(input:checked) { border-color: #91cfab; background: #26342c; box-shadow: inset 0 0 0 1px #91cfab; }
.device-option:has(input:focus-visible) { outline: 2px solid #f1f2f0; outline-offset: 3px; }
.device-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.device-option-art { flex: none; display: block; width: 88px; aspect-ratio: 960 / 590; filter: brightness(2.4); background-repeat: no-repeat; background-position: center; background-size: contain; }
.device-option-art.fm1 { background-image: url('/jamesos/assets/manual-1.0b/fm1-controls-logo.svg'); }
.device-option-art.smk { background-image: url('/jamesos/assets/smk37-selector.svg'); }
.device-option-detail { display: grid; min-width: 0; gap: 5px; }
.device-option-family { color: #9fb2a6; font: 600 9px/1 var(--mono); letter-spacing: .14em; }
.device-option-detail strong { color: #f0f2ef; font-size: 16px; line-height: 1.15; }
.device-option-version { color: #adb1ae; font: 12px/1.25 var(--mono); }
.device-option-indicator { margin-left: auto; flex: none; width: 17px; height: 17px; border: 1px solid #87928a; border-radius: 50%; }
.device-option:has(input:checked) .device-option-indicator { border: 5px solid #a9dfbd; background: #26342c; }
.reinstall-check { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 14px; cursor: pointer; }
.reinstall-check[hidden] { display: none; }
.reinstall-check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--green); }
.device-review { margin-top: 20px; }
@media (max-width: 600px) { .device-picker { padding: 18px; } .device-options { grid-template-columns: 1fr; } .device-picker-heading h4 { font-size: 19px; } }

.device-options .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.install-connection-note { color: var(--muted); font-size: 15px; margin: 6px 0 20px; }
