:root {
  color-scheme: dark;
  --bg: #090b10;
  --surface: #10141d;
  --surface-raised: #151a25;
  --surface-soft: #0d1118;
  --surface-code: #090d13;
  --line: rgba(180, 190, 219, .12);
  --line-strong: rgba(180, 190, 219, .2);
  --text: #f0f3fa;
  --muted: #9aa4b8;
  --subtle: #6f7a90;
  --violet: #b4a6ff;
  --violet-strong: #8d78ff;
  --mint: #72e1c2;
  --danger: #ff9ba9;
  --radius: 15px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--bg); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: radial-gradient(ellipse at 55% -28%, rgba(105, 88, 204, .14), transparent 52%), var(--bg);
}
body, button, textarea, select { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, textarea, select { font-size: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible + .toggle-ui, textarea:focus-visible { outline: 2px solid rgba(180, 166, 255, .9); outline-offset: 3px; }
a { color: inherit; }
.ambient { position: fixed; z-index: -1; width: 280px; height: 280px; border-radius: 50%; pointer-events: none; filter: blur(90px); opacity: .08; }
.ambient-a { top: 270px; left: -245px; background: #7d69ff; }
.ambient-b { top: 660px; right: -250px; background: #43deba; }
.app-shell { width: min(1660px, calc(100% - clamp(24px, 4vw, 72px))); margin-inline: auto; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-symbol { width: 34px; height: 34px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(180, 166, 255, .26); border-radius: 10px; background: linear-gradient(145deg, #25213e, #151a25); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.brand-symbol i { width: 3px; height: 12px; border-radius: 4px; background: var(--violet); transform: skew(-14deg); }
.brand-symbol i:nth-child(2) { height: 20px; background: var(--violet-strong); }
.brand-symbol i:nth-child(3) { height: 9px; background: var(--mint); }
.brand-word { font-size: 20px; line-height: 1; font-weight: 850; letter-spacing: -1.1px; }
.brand-word > span, .footer-brand > span { color: var(--violet); }
.brand-divider { height: 22px; width: 1px; margin-inline: 4px; background: var(--line-strong); }
.brand-product { color: #a6afc4; font-size: 12px; font-weight: 580; letter-spacing: -.05px; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.runtime-pill, .version-tag { min-height: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 99px; color: #b1bbcd; background: rgba(17, 21, 30, .75); font-size: 10px; font-weight: 800; letter-spacing: .8px; white-space: nowrap; }
.runtime-pill { padding: 0 10px; }
.version-tag { padding: 0 9px; font-size: 10px; letter-spacing: .2px; }
.status-dot { width: 6px; height: 6px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 9px rgba(114, 225, 194, .35); }
.top-help { padding: 5px 0 5px 4px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 650; white-space: nowrap; }
.top-help:hover, .page-footer a:hover { color: var(--text); }
.top-help span, .page-footer a span { color: var(--violet); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 27px 2px 22px; }
.heading-copy { min-width: 0; max-width: 800px; }
.eyebrow, .section-kicker { color: #a69aff; font-size: 10px; font-weight: 850; letter-spacing: 1.45px; }
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow-mark { width: 6px; height: 6px; border-radius: 2px; background: var(--mint); transform: rotate(45deg); }
.page-heading h1 { margin: 9px 0 7px; font-size: clamp(28px, 3.2vw, 41px); font-weight: 820; line-height: 1.13; letter-spacing: -1.8px; }
.page-heading h1 span { color: var(--violet); }
.page-heading p { max-width: 660px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.heading-status { display: flex; gap: 18px; padding-bottom: 2px; }
.status-metric { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.metric-icon { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(180,166,255,.18); border-radius: 9px; color: var(--violet); background: rgba(180,166,255,.07); font-size: 15px; }
.metric-icon.mint { color: var(--mint); border-color: rgba(114,225,194,.18); background: rgba(114,225,194,.06); }
.status-metric strong, .status-metric small { display: block; }
.status-metric strong { color: #e1e6f2; font-size: 10px; font-weight: 750; }
.status-metric small { margin-top: 3px; color: var(--subtle); font-size: 10px; }
.studio-layout { display: grid; grid-template-columns: minmax(0, 1fr) 294px; align-items: start; gap: 14px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(18, 22, 32, .98), rgba(13, 16, 24, .98)); box-shadow: 0 10px 36px rgba(0,0,0,.13); }
.workspace { padding: 15px; }
.workspace-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.workspace-heading h2, .settings-header h2 { margin: 5px 0 0; font-size: 16px; font-weight: 760; line-height: 1.35; letter-spacing: -.42px; }
.workspace-heading h2 span { margin: 0 2px; color: var(--violet); font-size: 18px; }
.workspace-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 11px; border: 1px solid transparent; border-radius: 8px; color: #e9ebf5; font-size: 12px; line-height: 1.1; font-weight: 760; white-space: nowrap; transition: border-color .14s ease, background-color .14s ease, transform .14s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button-quiet { border-color: var(--line-strong); background: #1a202c; color: #c2c9d9; }
.button-quiet:hover:not(:disabled) { border-color: rgba(180,166,255,.3); background: #202636; }
.button-primary { border-color: rgba(185,174,255,.4); background: linear-gradient(110deg, #7461e7, #8e7cf7); color: #fff; box-shadow: 0 4px 13px rgba(112,91,230,.14); }
.button-primary:hover:not(:disabled) { background: linear-gradient(110deg, #806ef0, #9a8afb); }
.button-primary span { font-size: 13px; }
.button.is-busy span { animation: slow-spin 1.2s linear infinite; }
@keyframes slow-spin { to { transform: rotate(360deg); } }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.editor-card { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(164,176,204,.16); border-radius: 11px; background: var(--surface-code); }
.editor-topline { min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; border-bottom: 1px solid rgba(164,176,204,.12); background: #141923; }
.file-label { min-width: 0; display: flex; align-items: center; gap: 7px; color: #dfe5f1; font-size: 11px; font-weight: 700; }
.file-icon { color: var(--violet); font-size: 14px; font-weight: 850; }
.output-icon { color: var(--mint); }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pill { flex: 0 0 auto; padding: 4px 5px; border-radius: 4px; color: #bbb0ff; background: rgba(180,166,255,.11); font-size: 8px; line-height: 1; font-weight: 850; letter-spacing: .7px; }
.output-pill { color: #82e5c8; background: rgba(114,225,194,.1); }
.editor-size { flex: 0 0 auto; color: #78849a; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.code-area { height: clamp(380px, 58vh, 660px); min-height: 260px; display: grid; grid-template-columns: 39px minmax(0, 1fr); overflow: hidden; background: #090c12; }
.line-gutter { min-width: 0; position: relative; overflow: hidden; border-right: 1px solid rgba(164,176,204,.1); background: #0d1118; user-select: none; }
.line-numbers { position: absolute; top: 0; left: 0; right: 0; min-width: 0; margin: 0; padding: 14px 7px; color: #4e5b70; text-align: right; white-space: pre; pointer-events: none; font: 12px/1.68 "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-variant-numeric: tabular-nums; }
.code-surface { min-width: 0; min-height: 0; position: relative; overflow: hidden; contain: paint; }
.syntax-layer, .code-surface textarea { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; padding: 14px 11px; border: 0; border-radius: 0; outline: 0; font: 12px/1.68 "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: none; tab-size: 2; white-space: pre; overflow-wrap: normal; word-break: normal; letter-spacing: 0; }
.syntax-layer { z-index: 1; overflow: hidden; color: #d4dbea; pointer-events: none; }
.code-surface textarea { z-index: 2; resize: none; overflow: auto; overscroll-behavior: contain; background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: #d8d0ff; text-shadow: none; }
.code-surface textarea::placeholder { color: #677389; -webkit-text-fill-color: #677389; opacity: .95; white-space: pre-wrap; }
.code-surface textarea::selection { color: transparent; -webkit-text-fill-color: transparent; background: rgba(139,119,255,.26); }
.output-card .code-surface textarea { cursor: text; }
.output-card .syntax-layer { color: #d1e2e0; }
.code-surface:focus-within { box-shadow: inset 0 0 0 1px rgba(180,166,255,.36); }
.hl-keyword { color: #c4a7ff; }
.hl-string { color: #a2dfbe; }
.hl-number { color: #e8c18c; }
.hl-comment { color: #69788e; font-style: italic; }
.hl-directive { color: #84c7ee; }
.editor-footer { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-top: 1px solid rgba(164,176,204,.1); background: #111620; }
.editor-tools { min-width: 0; display: flex; align-items: center; gap: 12px; }
.text-button { padding: 3px 0; border: 0; border-radius: 0; color: #b7aaff; background: transparent; font-size: 11px; font-weight: 720; white-space: nowrap; }
.text-button:hover:not(:disabled) { color: #e1dbff; }
.text-button.muted { color: #8490a4; }
.text-button.muted:hover:not(:disabled) { color: #c6cede; }
.footer-hint { min-width: 0; overflow: hidden; color: #748096; text-align: right; text-overflow: ellipsis; font-size: 9px; white-space: nowrap; }
.result-bar { min-height: 41px; display: flex; align-items: center; gap: 9px; margin-top: 11px; padding: 9px 11px; border: 1px solid rgba(164,176,204,.11); border-radius: 9px; color: #96a1b5; background: rgba(10,14,21,.76); font-size: 11px; line-height: 1.55; }
.result-indicator { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #8190a5; }
.result-message { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.result-stats { color: #c4b9ff; font-size: 10px; font-weight: 750; white-space: nowrap; }
.result-bar.success { border-color: rgba(114,225,194,.22); color: #b5dace; }
.result-bar.success .result-indicator { background: var(--mint); box-shadow: 0 0 7px rgba(114,225,194,.25); }
.result-bar.error { border-color: rgba(255,155,169,.28); color: #ffc2ca; }
.result-bar.error .result-indicator { background: var(--danger); }
.settings-panel { padding: 17px 15px 15px; }
.settings-header { margin-bottom: 17px; }
.settings-header h2 { font-size: 17px; }
.settings-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.field-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; }
.field-group { min-width: 0; }
.field-label { display: block; margin: 14px 0 7px; color: #aab4c7; font-size: 11px; font-weight: 780; letter-spacing: .3px; }
.select-wrap { position: relative; }
.select-wrap > span { position: absolute; top: 50%; right: 11px; color: #939db0; pointer-events: none; transform: translateY(-54%); font-size: 14px; }
.select-control { appearance: none; width: 100%; min-height: 38px; padding: 9px 32px 9px 10px; border: 1px solid rgba(164,176,204,.17); border-radius: 8px; outline: none; color: #e3e8f2; background: #171c27; font-size: 12px; font-weight: 650; cursor: pointer; }
.select-control:hover { border-color: rgba(180,166,255,.32); }
.select-control:focus-visible { border-color: var(--violet); }
.select-control option { color: #e3e8f2; background: #171c27; }
.preset-summary { display: flex; align-items: flex-start; gap: 7px; margin: 11px 0 15px; padding: 9px 9px; border: 1px solid rgba(180,166,255,.15); border-radius: 8px; color: #b7b4d4; background: rgba(180,166,255,.045); font-size: 11px; line-height: 1.5; }
.summary-dot { width: 5px; height: 5px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; background: var(--violet); }
.setting-list { display: grid; gap: 7px; }
.setting-toggle { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 9px; border: 1px solid rgba(164,176,204,.11); border-radius: 9px; background: rgba(9,12,18,.45); cursor: pointer; transition: border-color .13s ease, background .13s ease; }
.setting-toggle:hover { border-color: rgba(180,166,255,.24); background: rgba(25,27,40,.7); }
.toggle-icon { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; border-radius: 7px; color: #9baac0; background: rgba(149,162,186,.09); font-size: 13px; }
.toggle-icon.violet { color: var(--violet); background: rgba(180,166,255,.09); }
.toggle-icon.mint { color: var(--mint); background: rgba(114,225,194,.08); }
.toggle-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 4px; }
.toggle-copy strong { color: #dce2ee; font-size: 11px; line-height: 1.35; font-weight: 750; }
.toggle-copy small { color: #808ca1; font-size: 10px; line-height: 1.48; }
.setting-toggle input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.toggle-ui { position: relative; width: 28px; height: 16px; flex: 0 0 28px; border: 1px solid #414b5d; border-radius: 30px; background: #252d39; transition: border-color .14s ease, background .14s ease; }
.toggle-ui::after { position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: #8c98aa; content: ""; transition: transform .14s ease, background .14s ease; }
.setting-toggle input:checked + .toggle-ui { border-color: #8f80f7; background: #6c5be2; }
.setting-toggle input:checked + .toggle-ui::after { background: white; transform: translateX(12px); }
.setting-toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--violet); outline-offset: 3px; }
.api-toggle { margin-top: 11px; border-color: rgba(114,225,194,.13); background: rgba(114,225,194,.035); }
.api-toggle .toggle-icon { color: var(--mint); background: rgba(114,225,194,.08); }
.security-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 11px 10px; border: 1px solid rgba(164,176,204,.09); border-radius: 9px; background: rgba(9,12,18,.35); }
.note-icon { width: 19px; height: 19px; flex: 0 0 19px; display: grid; place-items: center; border-radius: 50%; color: #a8b4c7; background: rgba(164,176,204,.1); font-size: 10px; font-weight: 800; }
.security-note strong { display: block; margin-bottom: 4px; color: #bec7d6; font-size: 11px; }
.security-note p { margin: 0; color: #7f8a9f; font-size: 10px; line-height: 1.65; }
.page-footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; color: #6e7a8e; font-size: 10px; }
.page-footer a { color: #99a3b6; text-decoration: none; }
.footer-brand { font-size: 11px; color: #e5e9f2 !important; font-weight: 820; letter-spacing: -.3px; }
@media (min-width: 1500px) {
  .studio-layout { grid-template-columns: minmax(0, 1fr) 315px; gap: 17px; }
  .workspace { padding: 18px; }
  .settings-panel { padding: 19px 17px 17px; }
  .code-area { height: clamp(430px, 60vh, 720px); }
  .syntax-layer, .code-surface textarea { font-size: 12px; }
}
@media (max-width: 1180px) {
  .studio-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 11px; }
  .workspace { padding: 11px; }
  .settings-panel { padding: 14px 11px; }
  .heading-status { gap: 11px; }
  .status-metric small { max-width: 106px; white-space: normal; }
  .editor-grid { gap: 8px; }
  .editor-topline { padding-inline: 8px; }
  .editor-footer { padding-inline: 8px; }
  .editor-tools { gap: 8px; }
  .file-label { gap: 5px; }
  .file-pill { display: none; }
}
@media (max-width: 980px) {
  .page-heading { align-items: flex-start; flex-direction: column; gap: 17px; padding-top: 24px; }
  .heading-status { width: 100%; }
  .status-metric small { max-width: none; }
  .studio-layout { grid-template-columns: minmax(0,1fr); }
  .settings-header { margin-bottom: 10px; }
  .field-row { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .field-label { margin-top: 11px; }
  .preset-summary { margin: 2px 0 10px; }
  .setting-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .api-toggle { margin-top: 9px; }
  .security-note { margin-top: 9px; }
  .code-area { height: clamp(350px, 55vh, 560px); }
}
@media (max-width: 680px) {
  .app-shell { width: calc(100% - 22px); }
  .topbar { min-height: 60px; gap: 8px; }
  .brand { gap: 7px; }
  .brand-symbol { width: 30px; height: 30px; border-radius: 9px; }
  .brand-word { font-size: 18px; }
  .brand-product, .brand-divider { display: none; }
  .topbar-right { gap: 6px; }
  .runtime-pill { min-height: 26px; padding: 0 7px; font-size: 9px; letter-spacing: .35px; }
  .version-tag { min-height: 26px; padding: 0 6px; font-size: 10px; }
  .top-help { font-size: 10px; }
  .page-heading { gap: 13px; padding: 21px 2px 15px; }
  .page-heading h1 { margin-top: 7px; font-size: clamp(27px, 8vw, 36px); letter-spacing: -1.25px; }
  .page-heading p { font-size: 11px; line-height: 1.6; }
  .heading-status { gap: 13px; }
  .status-metric { gap: 6px; }
  .metric-icon { width: 27px; height: 27px; border-radius: 8px; font-size: 13px; }
  .status-metric strong { font-size: 11px; }
  .status-metric small { font-size: 9px; }
  .panel { border-radius: 12px; }
  .settings-panel { padding: 12px; }
  .settings-header h2 { font-size: 15px; }
  .field-label { margin-top: 11px; font-size: 10px; }
  .select-control { min-height: 38px; font-size: 12px; }
  .setting-list { grid-template-columns: minmax(0,1fr); gap: 7px; }
  .setting-toggle { padding: 10px 9px; gap: 8px; }
  .toggle-icon { width: 21px; height: 21px; flex-basis: 21px; border-radius: 6px; }
  .toggle-copy strong { font-size: 11px; }
  .toggle-copy small { font-size: 10px; }
  .toggle-ui { width: 27px; flex-basis: 27px; }
  .setting-toggle input:checked + .toggle-ui::after { transform: translateX(11px); }
  .security-note { padding: 9px; }
  .security-note p { font-size: 9px; }
  .workspace { padding: 9px; }
  .workspace-top { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 11px; }
  .workspace-heading h2 { font-size: 15px; }
  .workspace-actions { width: 100%; }
  .workspace-actions .button { flex: 1 1 0; min-height: 38px; }
  .editor-grid { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .editor-card { border-radius: 9px; }
  .editor-topline { min-height: 39px; padding-inline: 9px; }
  .file-label { gap: 6px; font-size: 11px; }
  .file-pill { display: inline-block; }
  .code-area { height: clamp(280px, 41vh, 430px); min-height: 240px; grid-template-columns: 33px minmax(0,1fr); }
  .line-numbers { padding: 12px 5px; font-size: 10px; line-height: 1.7; }
  .syntax-layer, .code-surface textarea { padding: 12px 9px; font-size: 11px; line-height: 1.7; }
  .editor-footer { align-items: flex-start; flex-direction: column; gap: 7px; padding: 8px 9px; }
  .editor-tools { gap: 14px; }
  .text-button { min-height: 18px; font-size: 10px; }
  .footer-hint { max-width: 100%; text-align: left; font-size: 9px; }
  .result-bar { align-items: flex-start; flex-wrap: wrap; gap: 7px; padding: 9px; }
  .result-message { flex-basis: calc(100% - 19px); }
  .result-stats { padding-left: 15px; white-space: normal; }
  .page-footer { align-items: flex-start; flex-wrap: wrap; padding: 7px 2px 18px; }
}
@media (max-width: 390px) {
  .app-shell { width: calc(100% - 16px); }
  .top-help { display: none; }
  .heading-status { justify-content: space-between; gap: 8px; }
  .field-row { grid-template-columns: minmax(0,1fr); gap: 0; }
  .setting-list { grid-template-columns: minmax(0,1fr); }
  .setting-toggle { padding: 10px; }
  .toggle-copy strong { font-size: 10px; }
  .toggle-copy small { font-size: 9px; }
  .code-area { height: 280px; grid-template-columns: 29px minmax(0,1fr); }
  .line-numbers { padding-inline: 4px; font-size: 10px; }
  .syntax-layer, .code-surface textarea { padding-inline: 7px; font-size: 10px; }
  .file-pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
