/* Yuki Deploy — shared tokens + components (landing, dashboard, docs, cli) */
:root {
  color-scheme: light dark;
  --bg: light-dark(#ffffff, #0f0f11); --bg2: light-dark(#f6f6f4, #18181b); --bg3: light-dark(#ececea, #26262b);
  --line: light-dark(#e4e4e1, #2a2a2f); --line2: light-dark(#d4d4cf, #3a3a40);
  --tx: light-dark(#18181b, #f4f4f5); --tx2: light-dark(#5b5b66, #a1a1aa); --tx3: light-dark(#8a8a94, #71717a);
  --acc: light-dark(#4d7c0f, #bef264); --acc-ink: light-dark(#ffffff, #1a2e05); --pur: light-dark(#6d28d9, #c4b5fd);
  --red: light-dark(#b91c1c, #f87171); --amb: light-dark(#a16207, #facc15); --blu: light-dark(#1d4ed8, #93c5fd);
  --focus: light-dark(#1d4ed8, #93c5fd);
  --disp: Geist, system-ui, sans-serif; --body: Geist, system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, monospace;
  --r: 10px; --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tx); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre, kbd, .mono { font-family: var(--mono); font-size: .88em; }
::selection { background: var(--acc); color: var(--acc-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* brand mark: chevron in a rounded square = "box, box" pit board */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 17px/1 var(--body); letter-spacing: -.02em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { font: 500 11px/1 var(--mono); color: var(--tx3); letter-spacing: .08em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid var(--line2); background: transparent; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 15px;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease); white-space: nowrap; }
.btn:hover { border-color: var(--tx3); background: var(--bg2); }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.pri:hover { filter: brightness(1.06); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.dng { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.btn.dng:hover { background: color-mix(in srgb, var(--red) 10%, transparent); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor;
  border-color: var(--tx) transparent var(--tx) transparent; animation: spin .7s linear infinite; }
.btn.pri.busy::after { border-color: var(--acc-ink) transparent var(--acc-ink) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.copy { display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 6px 6px 6px 14px; font: 14px/1.4 var(--mono); max-width: 100%; }
.copy code { flex: 1; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.copy code::-webkit-scrollbar { display: none; }
.copy .p { color: var(--acc); user-select: none; }
.copy button { flex: none; min-width: 64px; min-height: 36px; border-radius: 7px; border: 1px solid var(--line2); background: var(--bg3); cursor: pointer; font: 600 12px var(--body); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 99px; font: 600 12px/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--line2); color: var(--tx2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 40%, transparent); }
.pill.building, .pill.queued, .pill.starting { color: var(--amb); border-color: color-mix(in srgb, var(--amb) 40%, transparent); }
.pill.building::before, .pill.queued::before, .pill.starting::before { animation: blink 1s steps(2) infinite; }
.pill.failed, .pill.crashed, .pill.disabled { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.pill.sleeping { color: var(--pur); border-color: color-mix(in srgb, var(--pur) 40%, transparent); }
.pill.superseded, .pill.stopped, .pill.new { color: var(--tx3); }
@keyframes blink { 50% { opacity: .2; } }

input.in, select.in, textarea.in { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line2);
  background: var(--bg); font-size: 16px; transition: border-color .15s; }
input.in:focus, select.in:focus, textarea.in:focus { outline: none; border-color: var(--acc); }
label.f { display: grid; gap: 6px; font-size: 14px; color: var(--tx2); }
label.f > span:first-child { font-weight: 600; color: var(--tx); }
.hint { font-size: 13px; color: var(--tx3); }
.err { color: var(--red); font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--tx); color: var(--bg); padding: 11px 16px; border-radius: var(--r); font-weight: 600; font-size: 14px;
  transition: .22s var(--ease); z-index: 99; pointer-events: none; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.theme-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid transparent; background: none; cursor: pointer; color: var(--tx2); }
.theme-btn:hover { border-color: var(--line2); color: var(--tx); }
.theme-btn svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.skel { height: 44px; border-radius: 10px; background: linear-gradient(90deg, var(--bg2), var(--bg3), var(--bg2)); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { to { background-position: -200% 0; } }
[hidden]:not(.menu) { display: none !important; }
