:root {
  color-scheme: dark;
  --ink: #101712;
  --ink-soft: #18211b;
  --paper: #edf0e6;
  --muted: #9da89d;
  --acid: #c8ff3d;
  --acid-dark: #171e0d;
  --danger: #ff725e;
  --shadow: 0 0 0 1px rgba(255,255,255,.08), 0 18px 60px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { min-height: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: var(--ink); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--paper);
  font-family: Aptos, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 82% 8%, rgba(200,255,61,.13), transparent 27rem),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--ink);
  background-size: auto, 32px 32px, 32px 32px, auto;
}
button, input { font: inherit; }
button { min-height: 44px; }
.shell { width: min(100%, 620px); margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom)); }
.masthead { display: flex; align-items: center; justify-content: space-between; margin-bottom: clamp(52px, 11vh, 110px); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 12px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .16em; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; color: var(--ink); background: var(--acid); border-radius: 50%; letter-spacing: 0; }
.connection { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #667066; box-shadow: 0 0 0 4px rgba(102,112,102,.12); transition-property: background-color, box-shadow; transition-duration: 180ms; }
.connection.online .connection-dot { background: var(--acid); box-shadow: 0 0 0 4px rgba(200,255,61,.13); }
.eyebrow { margin: 0 0 13px; color: var(--muted); font: 700 11px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .14em; }
h1, h2 { margin: 0; font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif; font-weight: 500; text-wrap: balance; }
.hero h1 { font-size: clamp(44px, 13vw, 76px); line-height: .94; letter-spacing: -.045em; }
.status-line { display: flex; align-items: center; gap: 15px; }
.status-orb { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 7px rgba(157,168,157,.09); }
.status-orb.success { background: var(--acid); box-shadow: 0 0 0 7px rgba(200,255,61,.11), 0 0 24px rgba(200,255,61,.24); }
.status-orb.error { background: var(--danger); box-shadow: 0 0 0 7px rgba(255,114,94,.11); }
.status-orb.running { background: var(--acid); animation: pulse 1.5s ease-in-out infinite; }
.status-copy, .auth-panel > p { max-width: 34rem; margin: 18px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.action-zone { margin: 42px 0 30px; }
.launch-button { width: 100%; min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px 18px 25px; border: 0; border-radius: 28px; color: var(--acid-dark); background: var(--acid); box-shadow: 0 12px 34px rgba(200,255,61,.16); cursor: pointer; transition-property: scale, filter, opacity; transition-duration: 150ms; transition-timing-function: ease-out; }
.launch-button:active:not(:disabled), .secondary-button:active, .confirm-button:active, .ghost-button:active { scale: .96; }
.launch-button:disabled { cursor: wait; opacity: .58; }
.launch-label { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.launch-icon { display: grid; place-items: center; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 18px; background: var(--acid-dark); color: var(--acid); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.action-note { margin: 12px 4px 0; color: var(--muted); font-size: 12px; text-wrap: pretty; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 22px; border-top: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.metrics article { min-width: 0; padding: 23px 4px; }
.metrics article + article { padding-left: 22px; border-left: 1px solid rgba(255,255,255,.1); }
.metric-value { display: block; font: 500 clamp(34px, 10vw, 52px)/1 "Iowan Old Style", "Palatino Linotype", serif; font-variant-numeric: tabular-nums; }
.metric-label { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.3; text-wrap: pretty; }
.run-card, .auth-panel { padding: 24px; border-radius: 26px; background: rgba(24,33,27,.88); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.run-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.run-card h2 { font-size: 24px; line-height: 1.05; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: var(--paper); background: rgba(255,255,255,.06); cursor: pointer; transition-property: background-color, rotate; transition-duration: 180ms; }
.icon-button:active { rotate: 35deg; }
.run-details { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 27px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.09); }
.run-details span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.run-details strong { font-size: 14px; }
.error-message { margin: 18px 0 0; padding: 13px 15px; border-radius: 14px; color: #ffd8d2; background: rgba(255,114,94,.1); font-size: 13px; line-height: 1.45; text-wrap: pretty; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 4px 0; color: #6f7b70; font-size: 11px; }
.footer button { border: 0; color: var(--muted); background: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-panel h1 { font-size: 42px; }
.auth-panel form { display: grid; gap: 12px; margin-top: 28px; }
.auth-panel label { color: var(--muted); font-size: 12px; }
.auth-panel input { min-height: 52px; padding: 0 15px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; color: var(--paper); background: rgba(0,0,0,.18); outline: 0; }
.auth-panel input:focus { border-color: var(--acid); box-shadow: 0 0 0 3px rgba(200,255,61,.12); }
.secondary-button, .confirm-button, .ghost-button { padding: 0 18px; border: 0; border-radius: 14px; cursor: pointer; transition-property: scale, background-color; transition-duration: 150ms; }
.secondary-button, .confirm-button { color: var(--acid-dark); background: var(--acid); font-weight: 750; }
.form-error { min-height: 20px; margin-top: 14px; color: var(--danger); font-size: 13px; }
dialog { width: min(calc(100% - 32px), 480px); padding: 0; border: 0; border-radius: 30px; color: var(--paper); background: var(--ink-soft); box-shadow: 0 30px 100px rgba(0,0,0,.55); }
dialog::backdrop { background: rgba(4,8,5,.76); backdrop-filter: blur(5px); }
.dialog-inner { padding: 28px; }
.dialog-inner h2 { font-size: 32px; }
.dialog-inner > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; text-wrap: pretty; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 26px; }
.ghost-button { color: var(--paper); background: rgba(255,255,255,.07); }
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 10; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; color: var(--ink); background: var(--paper); box-shadow: 0 16px 50px rgba(0,0,0,.35); opacity: 0; translate: -50% 10px; pointer-events: none; transition-property: opacity, translate; transition-duration: 180ms; }
.toast.show { opacity: 1; translate: -50% 0; }
.enter { opacity: 0; transform: translateY(12px); filter: blur(4px); animation: enter 420ms cubic-bezier(.2,0,0,1) forwards; }
.enter-2 { animation-delay: 80ms; }.enter-3 { animation-delay: 160ms; }.enter-4 { animation-delay: 240ms; }.enter-5 { animation-delay: 320ms; }
@keyframes enter { to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(200,255,61,0), 0 0 30px rgba(200,255,61,.3); } }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; } }
@media (min-width: 700px) { .shell { padding-inline: 0; } }
