/* DevX Launch — "Launch pad": warm black, one ignition-orange accent, Bricolage + Geist + Geist Mono. Phone first (390). */
@font-face { font-family: 'Bricolage'; src: url(/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Geist'; src: url(/fonts/geist-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/geist-mono-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0c0b0a; --bg2: #141210; --card: #1a1815; --card2: #221f1b; --line: #2e2a25; --line2: #3c372f;
  --ink: #f4efe8; --ink2: #b9b1a6; --mute: #847b70; --acc: #ff6a2b; --acc-ink: #1a0b03; --ok: #7fe0a0; --bad: #ff7a6b; --warn: #ffc56b;
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom); --sal: env(safe-area-inset-left); --sar: env(safe-area-inset-right);
  --r: 18px; --r2: 26px; --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --display: 'Bricolage', 'Geist', system-ui, sans-serif; --ui: 'Geist', -apple-system, system-ui, sans-serif; --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--ink); font: 15.5px/1.5 var(--ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { min-height: 100dvh; overscroll-behavior-y: none; touch-action: manipulation; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(120% 60% at 50% -10%, rgba(255, 106, 43, .13), transparent 60%), radial-gradient(80% 50% at 100% 110%, rgba(255, 106, 43, .05), transparent 60%); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
svg { display: block; }
.mono { font-family: var(--mono); font-feature-settings: 'zero'; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; padding: calc(var(--sat) + 10px) calc(18px + var(--sar)) 10px calc(18px + var(--sal));
  display: flex; align-items: center; gap: 10px; background: rgba(12, 11, 10, .82); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.scrolled { border-bottom-color: var(--line); }
.mark { display: flex; align-items: center; gap: 9px; font: 700 17px/1 var(--display); letter-spacing: -.02em; }
.mark i { width: 26px; height: 26px; border-radius: 8px; background: var(--acc); display: grid; place-items: center; color: var(--acc-ink); }
.top .grow { flex: 1; }
.pill { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); border: 1px solid var(--line2); padding: 6px 9px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(127, 224, 160, .14); }
.dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }

main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px calc(18px + var(--sar)) calc(180px + var(--sab)) calc(18px + var(--sal)); }
.eyebrow { font: 600 11.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); margin: 18px 0 10px; }
h1 { font: 700 clamp(34px, 10vw, 46px)/.98 var(--display); letter-spacing: -.04em; }
h1 em { font-style: normal; color: var(--acc); }
h2 { font: 650 20px/1.15 var(--display); letter-spacing: -.02em; }
.lede { color: var(--ink2); margin-top: 10px; max-width: 40ch; }
.sec { margin-top: 26px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.sec-h b { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.sec-h button { color: var(--acc); font-weight: 600; font-size: 14px; min-height: 36px; padding: 0 4px; }

/* cards + fields */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); }
.field { width: 100%; min-height: 54px; border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line2); padding: 14px 16px; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field:focus { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(255, 106, 43, .16); }
.field::placeholder { color: var(--mute); }
.src { padding: 6px; display: flex; gap: 6px; align-items: center; }
.src .field { border: 0; background: transparent; box-shadow: none; padding-left: 12px; }
.icon-btn { min-width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--ink2); background: var(--card2); flex: none; transition: transform .15s var(--ease), background .2s; }
.icon-btn:active { transform: scale(.94); }
.icon-btn.acc { background: var(--acc); color: var(--acc-ink); }
label.lbl { display: block; font-size: 13px; color: var(--ink2); margin: 0 0 6px 4px; }

/* repo picked */
.picked { margin-top: 10px; display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.picked .gh { width: 40px; height: 40px; border-radius: 12px; background: var(--card2); display: grid; place-items: center; flex: none; }
.picked .t { min-width: 0; flex: 1; }
.picked .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked .t span { font-size: 13px; color: var(--mute); }

/* repo list */
.repos { display: flex; flex-direction: column; gap: 2px; padding: 6px; max-height: 340px; overflow: auto; overscroll-behavior: contain; }
.repo { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 14px; text-align: left; min-height: 56px; transition: background .15s; }
.repo:active, .repo[aria-pressed='true'] { background: var(--card2); }
.repo[aria-pressed='true'] .chk { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.repo .t { flex: 1; min-width: 0; }
.repo .t b { display: block; font-weight: 550; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repo .t span { display: block; font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chk { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; color: transparent; flex: none; transition: all .2s var(--spring); }
.lang { font: 500 11px/1 var(--mono); color: var(--ink2); background: var(--card2); border-radius: 6px; padding: 4px 6px; flex: none; }
.empty { padding: 22px 16px; text-align: center; color: var(--mute); font-size: 14px; }

/* address builder */
.addr { padding: 16px; }
.addr-preview { font: 500 15px/1.3 var(--mono); padding: 14px 16px; border-radius: var(--r); background: var(--bg2); border: 1px dashed var(--line2); word-break: break-all; }
.addr-preview .s { color: var(--acc); }
.addr-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; align-items: center; }
.addr-row .dotsep { font: 600 20px var(--mono); color: var(--mute); padding: 0 2px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line2); font: 500 14px var(--mono); color: var(--ink2); scroll-snap-align: start; transition: all .2s var(--ease); display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip small { font-size: 10px; opacity: .6; letter-spacing: .06em; text-transform: uppercase; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-top: 10px; font-size: 14.5px; color: var(--ink2); }
.sw { width: 51px; height: 31px; border-radius: 99px; background: var(--line2); position: relative; flex: none; transition: background .25s; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .3s var(--spring); }
.sw[aria-checked='true'] { background: var(--acc); }
.sw[aria-checked='true']::after { transform: translateX(20px); }
details.more { margin-top: 10px; }
details.more summary { list-style: none; color: var(--ink2); font-size: 14px; min-height: 44px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary svg { transform: rotate(90deg); }
details.more summary svg { transition: transform .25s var(--ease); }
.hint { font-size: 13px; margin-top: 8px; display: flex; gap: 8px; align-items: flex-start; }
.hint.bad { color: var(--bad); } .hint.ok { color: var(--ok); }

/* hold-to-launch dock (thumb zone) */
.dock { position: fixed; left: 0; right: 0; bottom: calc(64px + var(--sab)); z-index: 30; background: linear-gradient(rgba(12,11,10,0), var(--bg) 38%); padding: 26px calc(16px + var(--sar)) 12px calc(16px + var(--sal)); pointer-events: none; }
.dock-in { max-width: 560px; margin: 0 auto; pointer-events: auto; }
.launch { position: relative; width: 100%; height: 64px; border-radius: 22px; background: var(--acc); color: var(--acc-ink); overflow: hidden; font: 700 18px/1 var(--display); letter-spacing: -.01em;
  display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 14px 40px -10px rgba(255, 106, 43, .55), inset 0 1px 0 rgba(255, 255, 255, .35); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .2s var(--ease), opacity .2s, filter .2s; }
.launch:disabled { filter: grayscale(1) brightness(.55); box-shadow: none; }
.launch .fill { position: absolute; inset: 0; background: #ffd2bd; transform-origin: left; transform: scaleX(0); mix-blend-mode: multiply; opacity: .55; }
.launch.holding { transform: scale(.975); }
.launch span, .launch svg { position: relative; }
.launch-sub { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--mute); margin-top: 8px; font-family: var(--mono); letter-spacing: .04em; }

/* tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 6px calc(10px + var(--sar)) calc(6px + var(--sab)) calc(10px + var(--sal)); display: flex; justify-content: center; gap: 4px;
  background: rgba(12, 11, 10, .88); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); border-top: 1px solid var(--line); }
.tabs button { flex: 1; max-width: 140px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 550; color: var(--mute); border-radius: 14px; transition: color .2s; }
.tabs button[aria-current='page'] { color: var(--ink); }
.tabs button[aria-current='page'] svg { color: var(--acc); }

/* flight sheet */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .35s var(--ease); }
.scrim.in { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: calc(100dvh - var(--sat) - 18px); display: flex; flex-direction: column; background: var(--bg2); border-radius: 28px 28px 0 0; border-top: 1px solid var(--line2);
  transform: translateY(100%); transition: transform .5s var(--ease); padding-bottom: var(--sab); max-width: 640px; margin: 0 auto; }
.sheet.in { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line2); margin: 9px auto 0; flex: none; }
.sheet-h { padding: 14px 20px 8px; display: flex; gap: 10px; align-items: flex-start; flex: none; }
.sheet-h .t { flex: 1; min-width: 0; }
.sheet-h .t b { display: block; font: 700 22px/1.1 var(--display); letter-spacing: -.03em; }
.sheet-h .t span { display: block; font: 500 13px var(--mono); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.timer { font: 600 15px var(--mono); color: var(--ink2); font-variant-numeric: tabular-nums; padding-top: 4px; }
.sheet-body { overflow: auto; overscroll-behavior: contain; padding: 4px 20px 20px; }

/* stage track — the signature */
.track { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 8px 0 6px; }
.track i { height: 6px; border-radius: 9px; background: var(--line); position: relative; overflow: hidden; }
.track i.done { background: var(--acc); }
.track i.now { background: var(--line2); }
.track i.now::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--acc), transparent); animation: sweep 1.1s linear infinite; }
.track i.fail { background: var(--bad); }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.stage-name { display: flex; justify-content: space-between; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.stage-name em { font-style: normal; color: var(--acc); }

.log { margin-top: 14px; background: #080706; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 12px 10px; font: 12px/1.6 var(--mono); color: #a59b8f; max-height: 46dvh; overflow: auto; overscroll-behavior: contain; white-space: pre-wrap; word-break: break-word; }
.log div { display: grid; grid-template-columns: 26px 1fr; }
.log div::before { content: attr(data-n); color: #4f483f; }
.log .e { color: var(--bad); } .log .k { color: var(--ok); font-weight: 600; } .log .h { color: var(--ink); }

/* result */
.live { text-align: center; padding: 6px 0 4px; }
.burst { width: 76px; height: 76px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; margin: 6px auto 14px; animation: pop .7s var(--spring) both; box-shadow: 0 0 0 10px rgba(255, 106, 43, .12), 0 0 0 22px rgba(255, 106, 43, .05); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.live h3 { font: 700 28px/1 var(--display); letter-spacing: -.035em; }
.url-card { margin-top: 16px; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; text-align: left; }
.url-card a { flex: 1; min-width: 0; font: 500 14.5px var(--mono); color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn { min-height: 52px; border-radius: 16px; padding: 0 18px; font-weight: 600; font-size: 15.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s var(--ease); background: var(--card2); border: 1px solid var(--line2); }
.btn:active { transform: scale(.97); }
.btn.acc { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.btn.full { width: 100%; }
.row { display: flex; gap: 8px; margin-top: 12px; }
.row > * { flex: 1; }

/* apps */
.apps { display: flex; flex-direction: column; gap: 10px; }
.app { padding: 14px 14px 12px 16px; }
.app-h { display: flex; align-items: center; gap: 10px; }
.app-h .t { flex: 1; min-width: 0; }
.app-h b { font: 650 17px/1.15 var(--display); letter-spacing: -.02em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-h span { font-size: 12.5px; color: var(--mute); font-family: var(--mono); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app a.u { display: block; margin-top: 10px; font: 500 13.5px var(--mono); color: var(--acc); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 24px; }
.app .acts { display: flex; gap: 6px; margin-top: 10px; }
.app .acts button { flex: 1; min-height: 44px; border-radius: 12px; background: var(--card2); font-size: 13.5px; font-weight: 550; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.app .acts button:active { transform: scale(.97); }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.seg button { flex: 1; min-height: 40px; border-radius: 10px; font-size: 14px; font-weight: 550; color: var(--mute); }
.seg button[aria-pressed='true'] { background: var(--card2); color: var(--ink); }

/* login */
.login { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--sat) + 30px) calc(22px + var(--sar)) calc(28px + var(--sab)) calc(22px + var(--sal)); max-width: 460px; margin: 0 auto; width: 100%; }
.login .big { font: 750 clamp(56px, 18vw, 84px)/.88 var(--display); letter-spacing: -.055em; }
.login .big em { font-style: normal; color: var(--acc); display: block; }
.login form { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; }

/* toast */
.toast { position: fixed; left: 50%; top: calc(var(--sat) + 12px); z-index: 90; transform: translate(-50%, -150%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-weight: 550; font-size: 14px; max-width: calc(100vw - 32px); transition: transform .45s var(--spring); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.toast.in { transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #200; }

/* install card */
.install { margin-top: 26px; padding: 16px; display: flex; gap: 14px; align-items: center; }
.install img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install .t { flex: 1; font-size: 13.5px; color: var(--ink2); }
.install .t b { color: var(--ink); display: block; font-size: 15px; }

.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rot .8s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.fade-in { animation: fin .45s var(--ease) both; }
@keyframes fin { from { opacity: 0; transform: translateY(8px); } }

@media (min-width: 900px) {
  main { max-width: 620px; padding-top: 30px; }
  .dock { bottom: calc(76px + var(--sab)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* one-row address: [subdomain] . [domain ▾] */
.dom { display: flex; align-items: stretch; gap: 0; }
.dom .field { flex: 1 1 45%; min-width: 0; border-radius: var(--r) 0 0 var(--r); border-right: 0; }
.dom-dot { display: grid; place-items: center; padding: 0 4px; font: 600 20px var(--mono); color: var(--mute); background: var(--bg2); border-block: 1px solid var(--line2); }
.dom-pick { position: relative; flex: 1 1 55%; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; min-height: 54px; border-radius: 0 var(--r) var(--r) 0; background: var(--card2); border: 1px solid var(--line2); font: 500 15px var(--mono); color: var(--ink); }
.dom-pick span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dom-pick svg { transform: rotate(90deg); color: var(--acc); flex: none; }
.dom-pick select { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; cursor: pointer; }
.dom-pick:focus-within { border-color: var(--acc); }
#addrHint { margin-top: 10px; overflow-wrap: anywhere; }
