:root {
  --bg: #0b0d12;
  --panel: rgba(20, 23, 31, .86);
  --panel-solid: #14171f;
  --line: rgba(255, 255, 255, .09);
  --line-bright: rgba(255, 255, 255, .16);
  --text: #f4f6f8;
  --muted: #969daa;
  --green: #77f2bd;
  --green-dark: #102e25;
  --violet: #9b8cff;
  --danger: #ff7a8a;
  --warning: #f4c66c;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(80, 103, 142, .16), transparent 40%),
    linear-gradient(180deg, #0d1016 0%, var(--bg) 50%, #090b0f 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: -.01em;
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .1;
  pointer-events: none;
}

.ambient-one { left: -220px; top: 20%; background: var(--green); }
.ambient-two { right: -260px; top: 10%; background: var(--violet); }

.site-header {
  width: min(1200px, calc(100% - 40px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(119, 242, 189, .28);
  border-radius: 11px;
  background: rgba(119, 242, 189, .08);
}

.brand-mark svg { width: 23px; fill: none; stroke: var(--green); stroke-width: 2; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-size: 15px; letter-spacing: .01em; }
.brand em { margin-top: 5px; color: var(--muted); font-size: 10px; font-style: normal; letter-spacing: .16em; text-transform: uppercase; }

.service-state, .connected-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .02em;
}

.state-dot, .connected-chip span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(244, 198, 108, .08);
}

.service-state.online .state-dot, .connected-chip span { background: var(--green); box-shadow: 0 0 0 4px rgba(119, 242, 189, .08); }
.service-state.offline .state-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 122, 138, .08); }

.page-shell { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }

.login-view {
  min-height: calc(100vh - 151px);
  display: grid;
  place-items: center;
  padding: 64px 0;
}

.eyebrow {
  color: var(--green);
  font: 600 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .2em;
}

.workspace-head h1 {
  margin: 20px 0 22px;
  font-size: clamp(46px, 7vw, 76px);
  line-height: .98;
  letter-spacing: -.065em;
}

.access-card, .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.access-card {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 34px;
  text-align: left;
}

.login-card h1 { margin: 20px 0 7px; text-align: center; font-size: 25px; letter-spacing: -.04em; }
.login-copy { margin: 0 0 30px; color: var(--muted); text-align: center; font-size: 13px; }
.login-mark { width: 52px; height: 52px; margin: 0 auto; display: grid; place-items: center; border: 1px solid rgba(119,242,189,.25); border-radius: 15px; background: rgba(119,242,189,.07); }
.login-mark svg { width: 24px; fill: none; stroke: var(--green); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.login-card label { margin-top: 0; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 24px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(4,6,10,.45); }
.auth-tabs button { height: 38px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.auth-tabs button.active { color: #07120e; background: var(--green); }
.auth-tabs + label { margin-top: 0; }

.access-heading, .panel-title, .workspace-head, .run-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.access-heading > div, .panel-title > div { display: flex; align-items: center; gap: 12px; }
h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }

.step-number {
  min-width: 28px;
  color: var(--green);
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.secure-chip, .file-count, .run-state {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: 11px;
}

.access-card label, .prompt-label { display: block; margin: 28px 0 10px; color: #c9ced6; font-size: 12px; font-weight: 600; }

.key-field { position: relative; }
.key-field input, textarea {
  width: 100%;
  border: 1px solid var(--line-bright);
  outline: 0;
  color: var(--text);
  background: rgba(4, 6, 10, .58);
  transition: border-color .2s, box-shadow .2s;
}
.key-field input { height: 52px; padding: 0 50px 0 15px; border-radius: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
textarea { min-height: 138px; resize: vertical; padding: 15px; border-radius: 14px; line-height: 1.65; }
.key-field input:focus, textarea:focus { border-color: rgba(119,242,189,.62); box-shadow: 0 0 0 4px rgba(119,242,189,.06); }

.icon-button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: rgba(255,255,255,.05); }
.icon-button svg { width: 19px; fill: none; stroke: var(--muted); stroke-width: 1.6; }

.field-note { margin: 9px 0 0; color: #727986; font-size: 11px; line-height: 1.6; }
.notice { margin-top: 16px; padding: 11px 13px; border-radius: 10px; font-size: 12px; line-height: 1.55; }
.notice-warning { border: 1px solid rgba(244,198,108,.22); color: #dec28c; background: rgba(244,198,108,.06); }
.form-error { min-height: 19px; margin: 12px 0 0; color: var(--danger); font-size: 12px; line-height: 1.5; }

.primary-button, .secondary-button {
  min-height: 49px;
  border-radius: 12px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform .18s, opacity .18s, background .18s;
}
.primary-button { width: 100%; border: 1px solid var(--green); color: #07120e; background: var(--green); }
.primary-button:hover { transform: translateY(-1px); background: #8df7ca; }
.primary-button:disabled { opacity: .45; cursor: wait; transform: none; }
.secondary-button { border: 1px solid var(--line-bright); color: #d8dce3; background: transparent; }
.secondary-button:hover { background: rgba(255,255,255,.05); }
.primary-button.compact { width: auto; min-width: 150px; margin-top: 18px; }

.workspace { padding: 62px 0 100px; }
.workspace-head { align-items: flex-end; margin-bottom: 34px; }
.workspace-head h1 { margin: 10px 0 8px; font-size: clamp(36px, 5vw, 54px); }
.workspace-head p { margin: 0; color: var(--muted); font-size: 14px; }
.workspace-actions { display: flex; align-items: center; gap: 18px; }
.connected-chip strong { color: #dfe4ea; font-size: inherit; font-weight: 600; }
.text-button { padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.text-button:hover { color: var(--text); }

.workspace-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.panel { padding: 25px; }
.activity-panel { min-height: 620px; }
.run-state.attention { color: var(--warning); border-color: rgba(244,198,108,.24); }
.run-state.complete { color: var(--green); border-color: rgba(119,242,189,.22); }

.drop-zone {
  width: 100%;
  min-height: 168px;
  margin-top: 24px;
  padding: 22px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 16px;
  color: var(--text);
  background: rgba(5, 7, 11, .42);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.drop-zone:hover, .drop-zone.dragging { border-color: rgba(119,242,189,.62); background: rgba(119,242,189,.035); }
.drop-zone strong, .drop-zone small { display: block; }
.drop-zone strong { margin-top: 13px; font-size: 13px; }
.drop-zone small { margin-top: 7px; color: var(--muted); font-size: 11px; }
.upload-icon { width: 42px; height: 42px; margin: 0 auto; display: grid; place-items: center; border-radius: 12px; background: rgba(119,242,189,.08); }
.upload-icon svg { width: 21px; fill: none; stroke: var(--green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 12px; }
.preview-item { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #090b0f; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-item button { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.72); cursor: pointer; }

.suggestions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.suggestions button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; }
.suggestions button:hover { color: var(--green); border-color: rgba(119,242,189,.26); }
.run-actions .primary-button { flex: 1; }

.activity-empty { min-height: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.activity-empty h3 { margin: 24px 0 8px; font-size: 15px; }
.activity-empty p { width: min(330px, 100%); margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.orbital { width: 84px; height: 84px; position: relative; display: grid; place-items: center; border: 1px solid rgba(119,242,189,.13); border-radius: 50%; }
.orbital::before, .orbital::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(155,140,255,.1); }
.orbital::before { inset: 11px; }
.orbital::after { inset: 24px; background: rgba(119,242,189,.045); }
.orbital span { position: absolute; width: 8px; height: 8px; top: -4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 22px rgba(119,242,189,.8); animation: orbit 5s linear infinite; transform-origin: 4px 46px; }
@keyframes orbit { to { transform: rotate(360deg); } }

.activity-content { margin-top: 24px; }
.current-action { display: flex; align-items: center; gap: 14px; padding: 15px; border: 1px solid rgba(119,242,189,.15); border-radius: 14px; background: rgba(119,242,189,.04); }
.current-action small, .current-action strong { display: block; }
.current-action small { margin-bottom: 4px; color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.current-action strong { font-size: 13px; }
.pulse-ring { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(119,242,189,.35); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(119,242,189,0); } 100% { box-shadow: 0 0 0 0 rgba(119,242,189,0); } }

.assistant-output { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.assistant-output span { color: var(--violet); font: 600 9px/1 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.assistant-output p { margin: 9px 0 0; color: #d8dce3; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

.timeline { margin: 20px 0 0; padding: 0; list-style: none; }
.timeline-item { position: relative; display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; padding: 0 0 19px; color: var(--muted); }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 2px; width: 1px; background: var(--line); }
.timeline-marker { width: 13px; height: 13px; margin-top: 2px; z-index: 1; border: 2px solid var(--panel-solid); border-radius: 50%; background: #5e6571; box-shadow: 0 0 0 1px var(--line-bright); }
.timeline-item.active .timeline-marker { background: var(--green); box-shadow: 0 0 0 1px rgba(119,242,189,.4); }
.timeline-item.failed .timeline-marker { background: var(--danger); }
.timeline-copy strong { display: block; color: #dce0e6; font-size: 12px; font-weight: 600; }
.timeline-copy p { margin: 5px 0 0; color: #7f8692; font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.timeline-time { font: 9px/1.5 ui-monospace, monospace; }
.timeline details { margin-top: 6px; }
.timeline summary { cursor: pointer; color: #737b87; font-size: 10px; }
.timeline pre { max-height: 130px; overflow: auto; margin: 7px 0 0; padding: 9px; border-radius: 8px; color: #98a1ad; background: #090b0f; font: 9px/1.55 ui-monospace, monospace; white-space: pre-wrap; }

.question-panel, .results-panel { margin-top: 20px; }
.question-block { margin-top: 19px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }
.question-block h3 { margin: 0; font-size: 14px; }
.question-block p { margin: 7px 0 13px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.question-options { display: grid; gap: 8px; }
.question-option { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.question-option:has(input:checked) { border-color: rgba(119,242,189,.42); background: rgba(119,242,189,.04); }
.question-option input { margin-top: 2px; accent-color: var(--green); }
.question-option span { font-size: 12px; }
.question-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.question-text { width: 100%; height: 43px; padding: 0 12px; border: 1px solid var(--line-bright); border-radius: 9px; outline: 0; color: var(--text); background: #090b0f; }

.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.result-card { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: #090b0f; }
.result-card img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: contain; background-image: linear-gradient(45deg,#151820 25%,transparent 25%),linear-gradient(-45deg,#151820 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#151820 75%),linear-gradient(-45deg,transparent 75%,#151820 75%); background-position: 0 0,0 8px,8px -8px,-8px 0; background-size: 16px 16px; }
.result-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; }
.result-meta span { min-width: 0; overflow: hidden; color: #cdd2d9; font: 10px/1.4 ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.result-meta a { color: var(--green); font-size: 10px; text-decoration: none; }

footer { width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 38px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #5f6671; font: 9px/1.4 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }

[hidden] { display: none !important; }

@media (max-width: 840px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-head { align-items: flex-start; flex-direction: column; }
  .activity-panel { min-height: 520px; }
  .activity-empty { min-height: 410px; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .site-header, .page-shell, footer { width: min(100% - 24px, 1200px); }
  .site-header { height: 70px; }
  .login-view { min-height: calc(100vh - 139px); padding: 38px 0; }
  .access-card, .panel { padding: 19px; border-radius: 17px; }
  .secure-chip, .service-state span:last-child { display: none; }
  .workspace { padding-top: 40px; }
  .workspace-actions { width: 100%; justify-content: space-between; }
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  footer { gap: 12px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Three-stage workspace selected in the product-design review. */
:root {
  --panel: rgba(17, 20, 26, .94);
  --panel-solid: #11141a;
  --radius: 16px;
}

.site-header, .page-shell, footer { width: min(1368px, calc(100% - 48px)); }
.workspace { padding-top: 42px; }
.workspace-head { margin-bottom: 26px; }
.workspace-head h1 { font-size: clamp(34px, 4vw, 48px); }
.workspace-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.workspace-grid > .panel { min-width: 0; min-height: 610px; padding: 22px; box-shadow: 0 18px 55px rgba(0, 0, 0, .24); }
.panel-title { min-height: 32px; }
.panel-title h2 { font-size: 16px; }
.step-number { min-width: 24px; }
.compose-panel { display: flex; flex-direction: column; }
.compose-panel .drop-zone { min-height: 140px; margin-top: 20px; }
.compose-panel textarea { min-height: 112px; }
.compose-panel .run-actions { margin-top: auto; }
.activity-panel { min-height: 610px; }
.activity-empty { min-height: 515px; }
.activity-content { margin-top: 20px; }
.current-action { padding: 14px; border-radius: 11px; }

.process-steps { margin: 20px 0 0; padding: 0; list-style: none; }
.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 73px;
  padding: 10px 0;
}
.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 51px;
  bottom: -12px;
  width: 1px;
  background: var(--line);
}
.process-index {
  width: 31px;
  height: 31px;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  color: #777f8b;
  background: #0b0e13;
  font: 700 10px/1 ui-monospace, monospace;
}
.process-step strong, .process-step small { display: block; }
.process-step strong { color: #c8cdd4; font-size: 13px; }
.process-step small { margin-top: 5px; color: #707783; font-size: 10px; line-height: 1.45; }
.process-step em { color: #707783; font-size: 10px; font-style: normal; }
.process-step[data-state="active"] .process-index { border-color: var(--green); color: #07120e; background: var(--green); box-shadow: 0 0 20px rgba(119,242,189,.18); }
.process-step[data-state="active"] strong, .process-step[data-state="active"] em { color: var(--green); }
.process-step[data-state="complete"] .process-index { border-color: rgba(119,242,189,.4); color: var(--green); background: rgba(119,242,189,.08); }
.process-step[data-state="complete"] .process-index { font-size: 0; }
.process-step[data-state="complete"] .process-index::after { content: "✓"; font-size: 12px; }
.process-step[data-state="complete"] strong { color: #e2e6eb; }
.process-step[data-state="complete"] em { color: var(--green); }
.process-step[data-state="failed"] .process-index { border-color: var(--danger); color: var(--danger); background: rgba(255,122,138,.08); }
.process-step[data-state="failed"] strong, .process-step[data-state="failed"] em { color: var(--danger); }
.assistant-output { max-height: 150px; overflow: auto; border-radius: 11px; }

.results-panel { margin-top: 0; display: flex; flex-direction: column; }
.result-empty { min-height: 515px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.result-empty > span { color: var(--green); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .18em; }
.result-empty h3 { margin: 18px 0 8px; font-size: 15px; }
.result-empty p { width: min(270px, 100%); margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.results-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
.result-card { border-radius: 12px; }
.result-card img { aspect-ratio: 1 / 1; }
.result-meta { padding: 12px; }

.log-drawer { margin-top: 14px; padding: 0; overflow: hidden; box-shadow: 0 18px 55px rgba(0, 0, 0, .2); }
.log-toggle {
  width: 100%;
  min-height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}
.log-toggle > span { display: flex; align-items: center; gap: 10px; }
.log-toggle strong { font-size: 14px; }
.log-toggle small, .log-toggle em { color: var(--muted); font-size: 11px; font-style: normal; }
.log-toggle em { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; }
.log-drawer.open .log-toggle { border-bottom: 1px solid var(--line); }
.log-body { padding: 14px 20px 20px; background: rgba(4,6,10,.36); }
.log-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.log-filters, .log-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.log-filters button, .log-actions button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}
.log-filters button.active { border-color: rgba(119,242,189,.28); color: var(--green); background: rgba(119,242,189,.06); }
.log-actions button:hover, .log-filters button:hover { color: var(--text); border-color: var(--line-bright); }
.log-empty { margin: 16px 0 0; color: #6f7681; font: 10px/1.6 ui-monospace, monospace; }
.log-list { max-height: 230px; margin: 14px 0 0; padding: 0; overflow: auto; list-style: none; }
.log-row {
  display: grid;
  grid-template-columns: 82px 130px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 4px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  color: #9da4ae;
  font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.log-row time { color: #676e79; }
.log-source { overflow: hidden; color: var(--violet); text-overflow: ellipsis; white-space: nowrap; }
.log-row.tool .log-source { color: var(--green); }
.log-row.script .log-source { color: var(--warning); }
.log-row.error .log-source, .log-row.error .log-message { color: var(--danger); }
.log-message { overflow-wrap: anywhere; }

.question-panel { margin-top: 14px; }

@media (max-width: 1100px) {
  .workspace-grid { grid-template-columns: 1fr 1fr; }
  .results-panel { grid-column: 1 / -1; min-height: 0 !important; }
  .result-empty { min-height: 260px; }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header, .page-shell, footer { width: min(100% - 24px, 1368px); }
  .workspace-grid { grid-template-columns: 1fr; }
  .results-panel { grid-column: auto; }
  .workspace-grid > .panel { min-height: 0; }
  .activity-empty, .result-empty { min-height: 360px; }
  .results-grid { grid-template-columns: 1fr; }
  .log-toolbar { align-items: flex-start; flex-direction: column; }
  .log-row { grid-template-columns: 64px 94px minmax(0, 1fr); gap: 8px; }
}

/* Public API documentation */
.header-actions, .site-nav {
  display: flex;
  align-items: center;
}

.header-actions { gap: 28px; }
.site-nav { gap: 5px; }

.nav-link {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: color .18s, border-color .18s, background .18s;
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-link.active { border-color: var(--line); color: var(--green); background: rgba(119,242,189,.055); }

.docs-body { background: #090b10; }
.docs-shell { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }

.docs-hero {
  position: relative;
  padding: 94px 0 72px;
  border-bottom: 1px solid var(--line);
}

.docs-hero::after {
  content: "API";
  position: absolute;
  z-index: -1;
  top: 38px;
  right: 1%;
  color: rgba(255,255,255,.018);
  font: 800 clamp(120px, 20vw, 250px)/.8 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -.12em;
  pointer-events: none;
}

.docs-hero h1 {
  max-width: 820px;
  margin: 22px 0 24px;
  font-size: clamp(48px, 7.2vw, 86px);
  line-height: .98;
  letter-spacing: -.065em;
}

.docs-hero > p {
  max-width: 690px;
  margin: 0;
  color: #a4abb6;
  font-size: 17px;
  line-height: 1.8;
}

.docs-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  margin-top: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15,18,24,.72);
}

.docs-facts > div { min-width: 0; padding: 15px 18px; }
.docs-facts > div + div { border-left: 1px solid var(--line); }
.docs-facts span { display: block; margin-bottom: 8px; color: #69717e; font: 700 9px/1 ui-monospace, monospace; letter-spacing: .15em; }
.docs-facts code { display: block; overflow: hidden; color: #d6dbe1; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }

.docs-callout {
  max-width: 760px;
  margin-top: 18px;
  padding: 17px 19px;
  border: 1px solid rgba(244,198,108,.2);
  border-radius: 13px;
  background: rgba(244,198,108,.045);
}

.docs-callout strong { color: #efd49b; font-size: 12px; }
.docs-callout p { margin: 7px 0 0; color: #a89d85; font-size: 12px; line-height: 1.65; }
.docs-callout code { color: #e8c883; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.docs-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 820px);
  justify-content: space-between;
  gap: 80px;
  padding: 68px 0 110px;
}

.docs-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding-right: 18px;
  scrollbar-width: thin;
}

.docs-sidebar span {
  margin: 22px 0 7px;
  color: #59616d;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.docs-sidebar span:first-child { margin-top: 0; }
.docs-sidebar a { padding: 6px 0; color: #9299a5; font-size: 12px; text-decoration: none; transition: color .18s; }
.docs-sidebar a:hover { color: var(--green); }

.docs-content { min-width: 0; }
.docs-section { scroll-margin-top: 36px; padding: 0 0 76px; }
.docs-section + .docs-section { padding-top: 76px; border-top: 1px solid var(--line); }
.section-kicker { display: block; margin-bottom: 15px; color: var(--green); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; }
.docs-section h2 { font-size: clamp(25px, 3vw, 34px); line-height: 1.15; letter-spacing: -.045em; }
.docs-section > p { max-width: 740px; margin: 17px 0 28px; color: #9ba2ad; font-size: 14px; line-height: 1.8; }
.docs-section p code, .docs-note code, .flow-list code { color: #c9bfff; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.flow-list { margin: 34px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.flow-list li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.flow-list b { color: var(--green); font: 700 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.flow-list strong, .flow-list span { display: block; }
.flow-list strong { font-size: 14px; }
.flow-list span { margin-top: 6px; color: #818995; font-size: 12px; line-height: 1.6; }

.endpoint-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin: 28px 0 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.018);
}

.endpoint-row > code { overflow: hidden; color: #dce0e6; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-row em { color: #69717d; font-size: 11px; font-style: normal; }

.method {
  min-width: 43px;
  padding: 6px 7px;
  border-radius: 6px;
  text-align: center;
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .05em;
}

.method.get { color: #84d7ff; background: rgba(77,179,231,.1); }
.method.post { color: var(--green); background: rgba(119,242,189,.09); }

.code-block, .json-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #07090d;
}

.code-block { margin-top: 10px; }
.code-block button {
  position: absolute;
  z-index: 1;
  top: 11px;
  right: 11px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line-bright);
  border-radius: 7px;
  color: #9199a4;
  background: rgba(17,20,26,.95);
  font-size: 10px;
  cursor: pointer;
}

.code-block button:hover { border-color: rgba(119,242,189,.28); color: var(--green); }
.code-block pre, .json-card pre { margin: 0; overflow: auto; }
.code-block pre { padding: 22px 74px 22px 22px; }
.code-block-large pre { max-height: 640px; }
.code-block code, .json-card code { color: #c7cdd5; font: 11.5px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.response-example {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.018);
}

.response-example span, .json-card > span {
  flex: 0 0 auto;
  color: var(--green);
  font: 700 9px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
}

.response-example code { min-width: 0; overflow-wrap: anywhere; color: #aeb5bf; font: 10.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.json-card { margin-top: 10px; }
.json-card > span { display: block; padding: 14px 18px 11px; border-bottom: 1px solid var(--line); }
.json-card pre { padding: 17px 20px 20px; }
.success-card { border-color: rgba(119,242,189,.18); background: rgba(119,242,189,.025); }

.docs-note { display: flex; gap: 15px; margin-top: 12px; padding: 14px 16px; border-left: 2px solid var(--violet); color: #8f97a2; background: rgba(155,140,255,.035); font-size: 11px; line-height: 1.65; }
.docs-note strong { flex: 0 0 auto; color: #c2b9ff; }

.reference-table { margin-top: 28px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.reference-row { display: grid; grid-template-columns: minmax(110px, .7fr) 1.5fr 1.1fr; gap: 18px; align-items: center; min-height: 52px; padding: 10px 17px; border-bottom: 1px solid var(--line); color: #9aa2ad; font-size: 11px; line-height: 1.5; }
.reference-row:last-child { border-bottom: 0; }
.reference-row.head { min-height: 42px; color: #626b77; background: rgba(255,255,255,.018); font: 700 9px/1 ui-monospace, monospace; letter-spacing: .09em; }
.reference-row code { color: var(--green); font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }

.error-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.error-grid > div { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.016); }
.error-grid code, .error-grid span { display: block; }
.error-grid code { overflow-wrap: anywhere; color: #c4bbff; font: 10.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.error-grid span { margin-top: 7px; color: #7f8793; font-size: 11px; line-height: 1.5; }

.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.boundary-card { padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); }
.boundary-card > span { display: inline-flex; padding: 6px 9px; border-radius: 6px; font: 700 9px/1 ui-monospace, monospace; letter-spacing: .08em; }
.boundary-card.allowed > span { color: var(--green); background: rgba(119,242,189,.08); }
.boundary-card.blocked > span { color: #ff9ba7; background: rgba(255,122,138,.08); }
.boundary-card ul { margin: 17px 0 0; padding: 0; list-style: none; }
.boundary-card li { position: relative; padding: 6px 0 6px 19px; color: #9ca4af; font-size: 12px; }
.boundary-card li::before { position: absolute; left: 0; color: #68717d; }
.boundary-card.allowed li::before { content: "✓"; color: var(--green); }
.boundary-card.blocked li::before { content: "×"; color: var(--danger); }

/* Administrator API key management */
.keys-page { padding: 68px 0 110px; }
.keys-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.keys-hero h1 { margin: 15px 0 12px; font-size: clamp(38px, 5vw, 58px); line-height: 1; letter-spacing: -.055em; }
.keys-hero p { max-width: 710px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.keys-user { display: flex; align-items: center; gap: 17px; color: #cfd4db; font-size: 12px; white-space: nowrap; }
.notice-error { border: 1px solid rgba(255,122,138,.24); color: #ffadb6; background: rgba(255,122,138,.055); }
.keys-page > .notice { margin: 0 0 20px; }
.keys-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.key-create-panel label { display: block; margin: 24px 0 9px; color: #c9ced6; font-size: 12px; font-weight: 650; }
.admin-input { width: 100%; height: 48px; padding: 0 13px; border: 1px solid var(--line-bright); border-radius: 11px; outline: 0; color: var(--text); background: #090b0f; }
.admin-input:focus { border-color: rgba(119,242,189,.62); box-shadow: 0 0 0 4px rgba(119,242,189,.06); }
select.admin-input { color-scheme: dark; }
.admin-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.key-create-panel .primary-button { margin-top: 18px; }
.issued-key-panel { border-color: rgba(244,198,108,.22); background: linear-gradient(150deg, rgba(244,198,108,.06), rgba(17,20,26,.94) 62%); }
.issued-key-panel > p { margin: 21px 0 13px; color: #a4abb5; font-size: 12px; line-height: 1.65; }
.issued-key-panel pre { margin: 0; padding: 17px; overflow: auto; border: 1px solid rgba(244,198,108,.2); border-radius: 11px; color: #f0d293; background: #080a0d; font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.issued-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.issued-actions .primary-button { margin: 0; }
.key-list-panel { margin-top: 18px; }
.key-list-note { margin: 17px 0 22px; color: #79818d; font-size: 11px; line-height: 1.65; }
.key-list-note code { color: #c4bbff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.small-button { min-height: 36px; padding: 0 13px; font-size: 11px; }
.key-empty { padding: 50px 20px; border: 1px dashed var(--line-bright); border-radius: 13px; color: #6f7783; text-align: center; font-size: 12px; }
.key-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
.key-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.key-table th, .key-table td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.key-table tr:last-child td { border-bottom: 0; }
.key-table th { color: #626b77; background: rgba(255,255,255,.018); font: 700 9px/1 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.key-table td { color: #aab1bb; font-size: 11px; }
.key-table td strong, .key-table td code { display: block; }
.key-table td strong { color: #dce0e6; font-size: 12px; }
.key-table td code { margin-top: 5px; color: #737c88; font: 9.5px/1.4 ui-monospace, monospace; }
.key-status { font-weight: 700; }
.status-active { color: var(--green) !important; }
.status-disabled, .status-expired { color: var(--warning) !important; }
.status-revoked { color: var(--danger) !important; }
.key-actions { display: flex; gap: 6px; white-space: nowrap; }
.table-action { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: #aeb5bf; background: transparent; font-size: 10px; cursor: pointer; }
.table-action:hover { color: var(--green); border-color: rgba(119,242,189,.28); }
.table-action.danger:hover { color: var(--danger); border-color: rgba(255,122,138,.3); }
.table-action:disabled { opacity: .45; cursor: wait; }

@media (max-width: 900px) {
  .keys-layout { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 38px; padding-top: 38px; }
  .docs-sidebar { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(17,20,26,.75); }
  .docs-sidebar span { grid-column: 1 / -1; margin-top: 14px; }
  .docs-sidebar a { padding: 5px 0; }
}

@media (max-width: 620px) {
  .keys-page { padding-top: 42px; }
  .keys-hero { align-items: flex-start; flex-direction: column; }
  .keys-user { width: 100%; justify-content: space-between; }
  .admin-field-grid { grid-template-columns: 1fr; gap: 0; }
  .issued-actions { align-items: stretch; flex-direction: column; }
  .docs-shell { width: min(100% - 24px, 1200px); }
  .header-actions { gap: 8px; }
  .site-header > .site-nav .nav-link:first-child { display: none; }
  .docs-hero { padding: 62px 0 52px; }
  .docs-hero h1 { margin-top: 18px; font-size: clamp(40px, 13vw, 58px); }
  .docs-hero > p { font-size: 14px; }
  .docs-facts { grid-template-columns: 1fr; }
  .docs-facts > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .docs-sidebar { grid-template-columns: 1fr 1fr; }
  .docs-section { padding-bottom: 58px; }
  .docs-section + .docs-section { padding-top: 58px; }
  .endpoint-row { grid-template-columns: auto minmax(0, 1fr); }
  .endpoint-row em { display: none; }
  .code-block pre { padding: 54px 17px 19px; }
  .response-example, .docs-note { flex-direction: column; gap: 7px; }
  .reference-table { overflow-x: auto; }
  .reference-row { min-width: 580px; }
  .error-grid, .boundary-grid { grid-template-columns: 1fr; }
}
