/* Stablehand platform. Based on the approved signup mockup (docs/public/mockups/signup). Light by default, dark via the OS. */
:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; color-scheme: light dark;
  --bg: #f6f7f9; --surface: #fff; --text: #1d1f23; --muted: #5d636c; --line: #e3e5e9; --soft: #f0f2f5; --accent: #1d1f23; --accent-text: #fff; --link: #2c5fd9; --ok: #1a7f45; --ok-bg: #e7f6ed; --warn: #8a5f00; --warn-bg: #fdf3dc; --bad: #b42332; --bad-bg: #fdecee; --info-bg: #eaf0fd; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #16171a; --surface: #1f2024; --text: #eceef1; --muted: #a2a8b0; --line: #31333a; --soft: #26282d; --accent: #f3f4f6; --accent-text: #16171a; --link: #8fb0ff; --ok: #5fd08a; --ok-bg: #173324; --warn: #e8b85c; --warn-bg: #3a2f17; --bad: #ff8a8a; --bad-bg: #3d1f22; --info-bg: #1c2740; }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font-size: 14px; display: flex; flex-direction: column; }
body > main, body > .grow-main { flex: 1; }
button, input, select, textarea { font: inherit; } button { cursor: pointer; } a { color: inherit; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, p { margin: 0; } h1 { font-size: 28px; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; } h2 { font-size: 18px; font-weight: 650; } h3 { font-size: 15px; font-weight: 600; }
.how h2, .icard h2, .steps h2 { font-size: 15px; font-weight: 600; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; } fieldset.field legend { padding: 0; margin-bottom: 6px; }
p { line-height: 1.6; } .muted { color: var(--muted); } small { color: var(--muted); font-size: 12px; line-height: 1.55; } code { font-family: ui-monospace, monospace; font-size: 12.5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; min-height: 36px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--muted); } .btn:disabled, .btn[aria-disabled=true] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); } .btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; } .btn.lg { min-height: 44px; padding: 10px 20px; font-size: 14px; } .btn.sm { min-height: 30px; padding: 5px 10px; font-size: 12px; }
@media (prefers-color-scheme: dark) { .btn.danger { color: #16171a; } }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
input, select, textarea { color: var(--text); background: var(--surface); border: 1px solid var(--line); padding: 9px 11px; border-radius: 8px; width: 100%; font-size: 14px; } textarea { min-height: 90px; resize: vertical; } input:disabled, select:disabled { background: var(--soft); color: var(--muted); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: auto; }
label.field, .field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; } .field .help { font-weight: 400; color: var(--muted); font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.plain::before { display: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: #4a6cf7; color: #fff; font-size: 12px; font-weight: 700; flex: 0 0 30px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.b { background: #c2557a; } .avatar.c { background: #2f9e8f; } .avatar.d { background: #b7792b; }
.row { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .stack { display: grid; gap: 16px; } .tight { gap: 6px; } .grow { flex: 1; min-width: 0; } .start { align-items: flex-start; }
.notice { border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.55; background: var(--info-bg); } .notice.bad { background: var(--bad-bg); color: var(--bad); } .notice.warn { background: var(--warn-bg); } .notice.ok { background: var(--ok-bg); color: var(--ok); }
form.inline { display: inline; margin: 0; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; text-decoration: none; } .brand i { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-style: normal; font-size: 14px; }
.brand .pill { margin-left: 4px; }
.top nav { display: flex; gap: 4px; height: 100%; } .top nav a { display: flex; align-items: center; padding: 0 12px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; } .top nav a[aria-current=page] { color: var(--text); border-bottom-color: var(--accent); }
.top .user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.top .user .link { color: var(--muted); text-decoration: none; } .top .user .link:hover { color: var(--text); }
.page { max-width: 1120px; width: 100%; margin: 0 auto; padding: 32px 24px 64px; display: grid; gap: 24px; align-content: start; }
.page.narrow { max-width: 680px; }
.page.welcome { text-align: center; padding-top: 80px; } .page.welcome .stack { justify-items: center; } .page.welcome p { max-width: 460px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; } .crumbs a { color: var(--link); text-decoration: none; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: grid; gap: 16px; }
.box.danger-zone { border-color: var(--bad); }
.box > h2 + p { margin-top: -8px; } .box .grow > h2 + p { margin-top: 4px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; } .tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; } .tabs a[aria-current=page] { color: var(--text); border-bottom-color: var(--accent); }
footer.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; } footer.site-foot .in { max-width: 1120px; margin: 0 auto; padding: 20px 24px; display: flex; gap: 18px; flex-wrap: wrap; }

.hero { max-width: 1120px; margin: 0 auto; padding: 72px 24px 40px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 42px; } .hero p.lead { font-size: 17px; color: var(--muted); margin-top: 16px; max-width: 520px; }
.hero .cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .paused { margin-top: 28px; max-width: 520px; }
.preview { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 20px 50px #0000001a; display: grid; gap: 10px; }
.preview .line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.how { max-width: 1120px; margin: 0 auto; padding: 24px 24px 72px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how .box { gap: 8px; align-content: start; } .how .n { width: 28px; height: 28px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.google svg { width: 18px; height: 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.icard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 14px; align-content: start; }
.icard .addr { font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--muted); word-break: break-all; }
.icard .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); } .icard .meta b { color: var(--text); font-weight: 600; }
.icard .acts { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.limit { font-size: 13px; color: var(--muted); }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; margin: 0; } .kv dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.meter { display: grid; gap: 8px; } .meter .top-line { display: flex; justify-content: space-between; font-size: 13px; } .bar { height: 7px; background: var(--soft); border-radius: 4px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.setting { display: grid; grid-template-columns: 1fr minmax(220px, 320px); gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); align-items: start; } .setting:first-of-type { border-top: 0; padding-top: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; } th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; } td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; } tr:last-child td { border-bottom: 0; } td .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
td.reason { color: var(--muted); max-width: 280px; }
.table-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.acts-cell { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; align-items: flex-start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; } .steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.steps .m { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; color: var(--muted); background: var(--surface); position: relative; z-index: 1; }
.steps .done .m { background: var(--ok); border-color: var(--ok); color: #fff; } .steps .now .m { border-color: var(--accent); } .steps .now .m::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: p 1.4s infinite; } @keyframes p { 50% { opacity: .25; } }
.steps .x .m { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (prefers-reduced-motion: reduce) { .steps .now .m::after { animation: none; } }
.steps p { color: var(--muted); font-size: 13px; }
.addr-input { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); } .addr-input:focus-within { outline: 2px solid var(--link); outline-offset: 2px; } .addr-input input { border: 0; border-radius: 0; } .addr-input input:focus-visible { outline: none; } .addr-input span { padding: 0 12px; display: grid; place-items: center; color: var(--muted); background: var(--soft); border-left: 1px solid var(--line); white-space: nowrap; }
.hint { font-size: 12px; font-weight: 500; min-height: 18px; } .hint.ok { color: var(--ok); } .hint.bad { color: var(--bad); }
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.size { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 4px; font-size: 13px; font-weight: 400; } .size.on { border: 2px solid var(--accent); padding: 13px; } .size.off { opacity: .6; }
.size input { position: absolute; opacity: 0; } .size:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; } .check input { margin-top: 3px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; } .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 8px; align-content: start; } .kpi b { font-size: 22px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; background: var(--surface); } .seg button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; padding: 5px 12px; font-weight: 600; font-size: 12px; min-height: 28px; } .seg button[aria-pressed=true] { background: var(--accent); color: var(--accent-text); }
.gate { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
details.decide { position: relative; } details.decide summary { list-style: none; } details.decide summary::-webkit-details-marker { display: none; }
details.decide[open] .pop { position: absolute; right: 0; top: 36px; z-index: 5; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; box-shadow: 0 12px 30px #0000002a; }
.inline-form { display: flex; gap: 8px; align-items: center; } .inline-form input { width: 90px; }
.maxw { max-width: 320px; } .filter { width: 300px; max-width: 100%; }
.w0 { width: 0 } .w5 { width: 5% } .w10 { width: 10% } .w15 { width: 15% } .w20 { width: 20% } .w25 { width: 25% } .w30 { width: 30% } .w35 { width: 35% } .w40 { width: 40% } .w45 { width: 45% } .w50 { width: 50% } .w55 { width: 55% } .w60 { width: 60% } .w65 { width: 65% } .w70 { width: 70% } .w75 { width: 75% } .w80 { width: 80% } .w85 { width: 85% } .w90 { width: 90% } .w95 { width: 95% } .w100 { width: 100% }
[hidden] { display: none !important; }

/* ---------- Multi-machine pages (docs/design/multi-machine.md §5, mockup platform screens) ---------- */
.ico { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.mc0 { --m: #4a6cf7; } .mc1 { --m: #20a08f; } .mc2 { --m: #c27b1f; } .mc3 { --m: #c2557a; } .mc4 { --m: #7a5af5; } .mc5 { --m: #2f8fd8; } .mc6 { --m: #b0563a; } .mc7 { --m: #5f8f2f; }
.micon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--m, #4a6cf7) 15%, transparent); color: var(--m, #4a6cf7); flex: 0 0 36px; }
.micon .ico { width: 19px; height: 19px; } .micon.sm { width: 26px; height: 26px; flex-basis: 26px; border-radius: 7px; } .micon.sm .ico { width: 15px; height: 15px; }
.micon.off { filter: grayscale(1); opacity: .55; }
.kind { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; } .kind .ico { width: 12px; height: 12px; }
.tag { display: inline-block; padding: 2px 7px; font-size: 11px; background: var(--soft); color: var(--muted); border-radius: 5px; font-weight: 600; } .tag.warn { background: var(--warn-bg); color: var(--warn); }
.g6 { gap: 6px; } .tight10 { gap: 10px; } .self-start { justify-self: start; } .measure { max-width: 480px; } .warn-text { color: var(--warn) !important; }
a.link { color: var(--link); }
table.mtable td { vertical-align: middle; } table.mtable td .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
tr.dim td { color: var(--muted); background: var(--soft); }
.table-box.flat { border: 0; border-radius: 0; }
.notice.icon { display: flex; gap: 10px; align-items: flex-start; } .notice.icon > .ico { margin-top: 2px; } .notice.icon .grow > b:first-child { display: block; }
.notice.warn.icon { color: var(--warn); }
.sw { width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; flex: 0 0 38px; border: 0; padding: 0; } .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px #0003; } .sw.on { background: var(--ok); } .sw.on::after { left: 19px; }
.sw:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sw::after { transition: none; } }
.setting.sw-row { grid-template-columns: 1fr auto; padding: 16px 0; margin: 0; } .setting.sw-row p { color: var(--muted); font-size: 13px; margin-top: 2px; } .setting.sw-row:first-of-type { border-top: 1px solid var(--line); padding-top: 16px; }
.box > h2 + .setting.sw-row, .box > .setting.sw-row:first-child { border-top: 0; padding-top: 0; }
.setting h2 + p, .setting h3 + p { margin-top: 4px; }
.cmp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .cmp > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 6px; font-size: 13px; align-content: start; } .cmp .kind { justify-self: start; } .cmp b { display: flex; gap: 6px; align-items: center; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; } .cards3 .box { gap: 8px; align-content: start; }
.center { text-align: center; justify-items: center; } .page.empty-machines { padding-top: 64px; }
.steps h3 { font-size: 13px; font-weight: 600; } .steps .m { font-weight: 600; }
.codebox { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .codebox input { width: 44px; height: 52px; text-align: center; font: 600 22px ui-monospace, Consolas, monospace; padding: 0; text-transform: uppercase; } .codebox .dash { color: var(--muted); font-size: 20px; padding: 0 4px; }
.codebox.bad input { border-color: var(--bad); }
.list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; } .li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); } .li:first-child { border-top: 0; } .li .t { font-weight: 600; } .li .sub { color: var(--muted); font-size: 12px; }
.check.off { opacity: .6; } .check .sub { color: var(--muted); font-size: 12px; margin-top: 2px; } .check input { accent-color: var(--accent); }
.eyebrow { font-size: 10px; letter-spacing: 1.1px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.behind { display: contents; } .behind > main { flex: 1; }
.overlay { position: fixed; inset: 0; background: #0008; display: flex; justify-content: center; align-items: flex-start; padding: 130px 16px 16px; z-index: 50; overflow-y: auto; }
.dialog { width: min(480px, 100%); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 20px 70px #0007; display: grid; gap: 14px; font-size: 13px; }
.dialog h2 { font-size: 18px; font-weight: 650; } .dialog .acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; }
.dialog .btn.danger { background: #b62d35; border-color: #b62d35; color: #fff; }
/* Mobile side nav: hidden on wide screens; a drawer under 820px. */
.top .side { display: none; }
.top .side > summary { list-style: none; cursor: pointer; font-size: 18px; line-height: 1; } .top .side > summary::-webkit-details-marker { display: none; }
.top .side .drawer { position: fixed; inset: 0 0 0 auto; width: min(300px, 86vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 40px #0005; padding: 72px 16px 16px; display: flex; flex-direction: column; gap: 16px; z-index: 50; overflow-y: auto; }
.top .side[open] > summary { position: fixed; top: 14px; right: 16px; z-index: 51; }
.top .side[open]::before { content: ''; position: fixed; inset: 0; background: #0006; z-index: 49; }
.top .side .drawer nav { display: flex; flex-direction: column; gap: 2px; height: auto; } .top .side .drawer nav a { padding: 12px; border-bottom: 0; border-left: 3px solid transparent; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
.top .side .drawer nav a[aria-current=page] { color: var(--text); border-left-color: var(--accent); background: var(--soft); }
.top .side .drawer .user { margin: 0; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; } .top .side .drawer .user .who { display: inline; }
@media (max-width: 820px) { .cmp, .cards3 { grid-template-columns: 1fr; } .top nav.desk, .top .in > .user { display: none; } .top .side { display: block; margin-left: auto; } }
@media (prefers-reduced-motion: no-preference) { .top .side[open] .drawer { animation: side-in .18s ease-out; } @keyframes side-in { from { transform: translateX(100%); } } }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } .hero h1 { font-size: 32px; } .how { grid-template-columns: 1fr; } .setting { grid-template-columns: 1fr; gap: 10px; } .top .in { gap: 14px; } .top .user .who { display: none; } .brand .name { display: none; } .top nav a { padding: 0 8px; } }
