:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --sidebar: #10141b;
  --surface: #151a23;
  --surface-2: #1b222e;
  --line: #29313d;
  --text: #eef2f7;
  --muted: #929dac;
  --subtle: #697586;
  --accent: #a5f35f;
  --accent-dark: #18311e;
  --danger: #ff7878;
  --ok: #9de665;
  --pending: #f2c36d;
  --mono-bg: #0c1119;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; width: 248px; height: 100vh; flex: none; display: flex; flex-direction: column; padding: 30px 17px 20px; background: var(--sidebar); border-right: 1px solid #202733; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 13px 49px; font-size: 19px; font-weight: 800; letter-spacing: -.045em; line-height: 1.1; }
.brand-logo { border-radius: 11px; background: var(--accent); box-shadow: 0 0 28px #a5f35f30; }
.brand small { display: block; margin-top: 6px; font-size: 9px; font-weight: 700; letter-spacing: .18em; color: var(--subtle); }
.nav-label { padding: 0 14px 13px; color: var(--subtle); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.nav-btn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 43px; margin: 2px 0; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; font-weight: 600; transition: background .18s, color .18s, border-color .18s; }
.nav-btn:hover { color: var(--text); background: #1c232d; }
.nav-btn.active { color: var(--accent); background: #a5f35f12; border-color: #a5f35f2e; }
.nav-icon { display: inline-flex; width: 19px; justify-content: center; color: var(--subtle); font-size: 18px; line-height: 1; }
.nav-btn.active .nav-icon { color: var(--accent); }
.nav-spacer { flex: 1; }
.sidebar-foot { display: flex; align-items: center; gap: 9px; padding: 16px 13px 3px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-transform: capitalize; }
.status-dot, .topbar-dot { width: 7px; height: 7px; display: inline-block; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px #a5f35f80; }
.content { flex: 1; min-width: 0; padding: 0 clamp(24px, 5vw, 84px) 90px; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--subtle); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.topbar-slash { padding: 0 10px; color: #3d4754; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-dot { width: 6px; height: 6px; }
.view { display: none; max-width: 1090px; margin: 0 auto; padding-top: 52px; flex-direction: column; gap: 22px; }
.view.active { display: flex; }
.page-heading { margin-bottom: 10px; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
h1 { margin: 6px 0 5px; font-size: clamp(38px, 4vw, 54px); font-weight: 750; line-height: 1.1; letter-spacing: -.055em; }
.heading-mark { color: var(--accent); }
.lede { margin: 0; color: var(--muted); font-size: 15px; }
.hero-card { position: relative; display: flex; min-height: 296px; overflow: hidden; border: 1px solid #425a37; border-radius: 18px; background: radial-gradient(circle at 78% 43%, #2d4834 0%, #1d302b 25%, #172124 52%, #172028 100%); }
.hero-card::after { position: absolute; inset: 0; content: ''; background-image: linear-gradient(#d6fac60a 1px, transparent 1px), linear-gradient(90deg, #d6fac60a 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent 25%, #000 100%); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; padding: 38px clamp(28px, 4vw, 54px); max-width: 510px; }
.hero-kicker { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.hero-copy h2 { margin: 12px 0 10px; font-size: clamp(32px, 3vw, 43px); line-height: 1.06; letter-spacing: -.055em; }
.hero-copy h2 em { color: var(--accent); font-style: normal; }
.hero-copy p { max-width: 360px; margin: 0 0 23px; color: #b0c1b4; }
.hero-art { position: absolute; inset: 0 0 0 52%; }
.orb { position: absolute; border-radius: 50%; background: #a5f35f; filter: blur(1px); box-shadow: 0 0 24px #a5f35f; }
.orb-one { width: 10px; height: 10px; top: 55px; left: 26%; }
.orb-two { width: 6px; height: 6px; right: 16%; top: 90px; }
.orb-three { width: 8px; height: 8px; right: 27%; bottom: 43px; }
.orbit { position: absolute; width: 300px; height: 300px; top: 50%; left: 50%; border: 1px solid #b4ec9b3c; border-radius: 50%; transform: translate(-50%, -50%) rotate(-24deg) skew(16deg); }
.orbit-two { width: 390px; height: 190px; transform: translate(-50%, -50%) rotate(29deg); border-color: #b4ec9b55; }
.hero-glyph { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 108px; height: 108px; border: 1px solid #d9ffd0c2; border-radius: 28px; background: linear-gradient(145deg, #c5ff9f, #7dc94e); color: #173424; font-size: 69px; font-weight: 850; line-height: 1; box-shadow: 0 0 30px #a5f35f79, 0 0 100px #a5f35f42; transform: translate(-50%, -50%) rotate(-12deg); }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { min-width: 0; padding: 27px 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 30px #00000012; }
.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 21px; }
.card-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border: 1px solid #a5f35f2e; border-radius: 8px; background: #a5f35f14; color: var(--accent); font-size: 17px; line-height: 1; }
h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.metric-row { gap: 0; }
.stat { display: flex; flex: 1; flex-direction: column; min-width: 120px; gap: 7px; }
.stat + .stat { padding-left: 27px; border-left: 1px solid var(--line); }
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { font-size: 28px; font-weight: 720; letter-spacing: -.04em; }
.status-row { min-height: 42px; }
.deployment-urls { display: grid; gap: 10px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.url-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #0e131b; }
.url-item > div { min-width: 0; }
.url-label { display: block; margin-bottom: 5px; color: var(--subtle); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.url-item code { display: block; overflow-wrap: anywhere; color: var(--text); font-size: 12px; }
.url-item .copy-url { flex: none; min-height: 33px !important; padding: 5px 11px !important; font-size: 11px; }
.url-hint { margin: 3px 0 0; }
.text-link { display: inline-flex; gap: 20px; align-items: center; margin-top: 12px; padding: 0; border: none; background: none; color: var(--accent); font-size: 12px; font-weight: 700; }
.text-link:hover { color: #d0ffae; }
button:not(.nav-btn):not(.text-link) { min-height: 40px; padding: 9px 15px; border: 1px solid #3d4754; border-radius: 9px; background: #222a35; color: var(--text); font-weight: 650; transition: transform .15s, background .15s, border-color .15s; }
button:not(.nav-btn):not(.text-link):hover:not(:disabled) { transform: translateY(-1px); border-color: #68798b; }
button.primary:not(.nav-btn) { border-color: var(--accent); background: var(--accent); color: #172411; }
button.primary:not(.nav-btn):hover:not(:disabled) { border-color: #c9ffa6; background: #c9ffa6; }
button.primary span { margin-left: 12px; }
button.danger:not(.nav-btn) { border-color: #ff78784a; background: #ff78780c; color: var(--danger); }
button.danger:not(.nav-btn):hover:not(:disabled) { border-color: var(--danger); background: #ff787820; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #3a4553; border-radius: 9px; outline: none; background: #10151e; color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--subtle); }
.field { display: flex; flex-direction: column; gap: 8px; color: var(--text); font-size: 12px; font-weight: 700; }
.field span { margin-left: 3px; color: var(--subtle); font-weight: 500; }
.deploy-form { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto; gap: 13px; align-items: end; margin-top: 22px; }
.deploy-form button { height: 43px; white-space: nowrap; }
.section-copy { margin: -11px 0 0; color: var(--muted); font-size: 13px; }
.stop-row { margin-top: 18px; }
.notice { margin: 22px 0 0; padding: 12px 14px; border: 1px solid #e2bd682d; border-radius: 9px; background: #e2bd680c; color: #c9b991; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 10px; border-radius: 6px; font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.badge.running { background: #a5f35f18; color: var(--ok); }
.badge.pending, .badge.processing { background: #f2c36d1c; color: var(--pending); }
.badge.failed, .badge.stopped { background: #ff787819; color: var(--danger); }
.badge.none { background: #ffffff10; color: var(--muted); }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.hint { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--subtle); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
td { color: var(--text); }
.token-form { margin-top: 22px; }
.token-form input { flex: 1; width: auto; min-width: 170px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
pre { overflow-x: auto; margin: 18px 0 0; padding: 18px 20px; border: 1px solid #29313d; border-radius: 10px; background: var(--mono-bg); color: #c4d2df; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.token-reveal { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 14px; border: 1px dashed var(--accent); border-radius: 9px; background: #a5f35f0b; }
.token-reveal code { word-break: break-all; }
.chat-window { display: flex; flex-direction: column; gap: 13px; min-height: 350px; max-height: 540px; overflow-y: auto; padding: 21px; border: 1px solid var(--line); border-radius: 11px; background: #0e131b; }
.msg { max-width: 82%; padding: 12px 15px; border-radius: 12px; font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: #172411; }
.msg.assistant { align-self: flex-start; border: 1px solid var(--line); background: var(--surface-2); }
.msg.error { align-self: flex-start; border: 1px dashed var(--danger); background: #ff78780d; color: var(--danger); }
.msg.empty { align-self: center; margin: auto; color: var(--subtle); }
.chat-input-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 15px; }
.chat-input-row textarea { flex: 1; min-height: 70px; resize: vertical; }
.chat-input-row button { height: 43px; }
/* Playground studio */
.content:has(.view[data-view="playground"].active) { padding: 0; }
.view[data-view="playground"] { max-width: none; margin: 0; gap: 0; padding: 0; }
.studio-live-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px #a5f35f80; }
.studio-grid { display: grid; grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); min-height: 100vh; overflow: hidden; background: #10151d; }
.studio-rail { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid #303b46; background: #151b24; }
.studio-rail-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.studio-overline, .studio-label { color: #8996a6; font: 800 10px ui-monospace, monospace; letter-spacing: .13em; }
.studio-rail-glyph { color: #667483; font-size: 16px; }
.studio-config-block { padding: 24px 20px 0; }
.studio-label { display: block; margin-bottom: 11px; }
.studio-model { display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 9px 10px; border: 1px solid #35424f; border-radius: 8px; background: #101720; }
.studio-model-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid #a5f35f3b; border-radius: 7px; background: #a5f35f12; color: var(--accent); font-size: 19px; }
.studio-model strong, .studio-model small { display: block; }
.studio-model strong { font-size: 13px; }
.studio-model small { margin-top: 2px; color: #80909e; font: 10px ui-monospace, monospace; }
.studio-chevron { margin-left: auto; color: #667483; }
#system-prompt { min-height: 160px; padding: 13px; border-color: #35424f; border-radius: 8px; background: #101720; font: 12px/1.65 ui-monospace, monospace; resize: vertical; }
.studio-help { margin: 9px 0 0; color: #798796; font-size: 11px; line-height: 1.5; }
.studio-rail-footer { display: flex; gap: 10px; margin-top: auto; padding: 19px 20px; border-top: 1px solid var(--line); color: #8996a6; font-size: 11px; line-height: 1.45; }
.studio-rail-footer-icon { color: var(--accent); font-size: 15px; }
.studio-console { display: flex; flex-direction: column; min-width: 0; background: #0e131a; }
.studio-console-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 67px; padding: 13px 22px; border-bottom: 1px solid var(--line); }
.studio-console-title { display: flex; align-items: center; gap: 11px; }
.studio-console-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #394653; border-radius: 7px; background: #1a242e; color: var(--accent); font: 700 17px ui-monospace, monospace; }
.studio-console-title strong, .studio-console-title span { display: block; }
.studio-console-title strong { font-size: 13px; }
.studio-console-title div > span { color: #83909c; font-size: 11px; }
.studio-console-meta { display: flex; align-items: center; gap: 8px; color: #8493a2; font: 700 10px ui-monospace, monospace; letter-spacing: .045em; white-space: nowrap; }
.studio-meta-separator { height: 13px; margin: 0 3px; border-left: 1px solid #3a4650; }
.studio-console .chat-window { flex: 1; min-height: 390px; max-height: none; padding: 25px; border: 0; border-radius: 0; background: radial-gradient(circle at 50% 45%, #1b2b2830, transparent 45%), #0e131a; }
.studio-console .msg:not(.empty) { max-width: 78%; padding: 12px 15px; border-radius: 10px; line-height: 1.55; }
.studio-console .msg.user { border-bottom-right-radius: 3px; }
.studio-console .msg.assistant { border-bottom-left-radius: 3px; background: #1b242d; }
.studio-console .msg.empty { display: flex; align-items: center; flex-direction: column; max-width: 100%; text-align: center; }
.chat-empty-orb { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 22px; border: 1px solid #a5f35f60; border-radius: 17px; background: radial-gradient(circle, #9eeb5e33, #9eeb5e0a); color: var(--accent); box-shadow: 0 0 40px #a5f35f18; font-size: 30px; }
.chat-empty-kicker { color: var(--accent); font: 800 10px ui-monospace, monospace; letter-spacing: .15em; }
.msg.empty strong { margin-top: 7px; color: var(--text); font-size: 21px; letter-spacing: -.035em; }
.msg.empty p { margin: 8px 0 21px; color: #8e9ba8; font-size: 12px; line-height: 1.6; }
.prompt-starters { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.prompt-starters button:not(.nav-btn):not(.text-link) { min-height: 34px; padding: 7px 10px; border-color: #384653; background: #172029; color: #bac6d0; font-size: 11px; font-weight: 500; }
.prompt-starters button span { margin-left: 8px; color: var(--accent); }
.studio-composer { padding: 17px 22px 20px; border-top: 1px solid var(--line); background: #121922; }
.studio-composer .chat-input-row { align-items: center; gap: 11px; margin: 0; padding: 0 16px; border: 1px solid #3a4856; border-radius: 12px; background: #0b1119; transition: border-color .15s, box-shadow .15s; }
.studio-composer .chat-input-row:focus-within { border-color: #a5f35f8a; }
.composer-prompt { flex: none; color: var(--accent); font: 26px/1 ui-monospace, monospace; }
.studio-composer textarea { height: 52px; min-height: 52px; max-height: 160px; padding: 15px 0 12px; border: 0; background: transparent; resize: none; font-size: 13px; line-height: 24px; }
.studio-composer textarea:focus-visible { outline: none; }
.studio-console-meta #chat-status { margin-left: 4px; color: var(--accent); font: inherit; }
@media (max-width: 1000px) { .studio-grid { grid-template-columns: 240px minmax(0, 1fr); } .studio-console-meta { font-size: 9px; } }
@media (max-width: 760px) { .studio-grid { grid-template-columns: 1fr; min-height: calc(100vh - 59px); } .studio-rail { border-right: 0; border-bottom: 1px solid var(--line); } .studio-rail-footer { display: none; } .studio-config-block { padding-bottom: 18px; } #system-prompt { min-height: 90px; } .studio-console .chat-window { min-height: 370px; } }
@media (max-width: 500px) { .studio-console-meta #studio-deployment { display: none; } .studio-console .chat-window { padding: 16px; } .studio-composer { padding: 12px; } .studio-composer .chat-input-row { flex-direction: row; } }
@media (max-width: 900px) {
  .sidebar { width: 210px; }
  .content { padding-inline: 30px; }
  .hero-art { opacity: .6; left: 55%; }
}
@media (max-width: 700px) {
  .app-shell { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; padding: 10px 14px; border-right: none; border-bottom: 1px solid var(--line); }
  .brand { flex: none; padding: 0 12px 0 0; font-size: 0; }
  .brand small, .nav-label, .nav-spacer, .sidebar-foot { display: none; }
  .brand-logo { width: 29px; height: 29px; }
  .nav-btn { flex: none; width: auto; min-height: 38px; gap: 0; padding: 0 11px; font-size: 12px; }
  .nav-icon { display: none; }
  .content { padding: 0 18px 60px; }
  .topbar { height: 53px; }
  .topbar-right { display: none; }
  .view { padding-top: 35px; }
  .overview-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 275px; }
  .hero-art { left: 57%; opacity: .35; }
  .hero-copy { padding: 32px 26px; }
  .card { padding: 22px; }
  .deploy-form { grid-template-columns: 1fr 1fr; }
  .deploy-form button { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .url-item { align-items: flex-start; flex-direction: column; gap: 11px; }
  .hero-art { display: none; }
  .hero-copy h2 { font-size: 34px; }
  .stat .value { font-size: 22px; }
  .deploy-form { grid-template-columns: 1fr; }
  .deploy-form button { grid-column: auto; }
  .chat-input-row { flex-direction: column; align-items: stretch; }
  .chat-input-row button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
