:root {
  color-scheme:dark;
  --bg:#09111f;
  --sidebar:#0d1728;
  --surface:#111d31;
  --editor:#0d1625;
  --border:#24344f;
  --text:#f3f6fc;
  --muted:#94a3b8;
  --subtle:#64748b;
  --accent:#4b7efe;
  --success:#5dcca4;
  --warning:#e5ba7b;
  --mono:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:14px/1.55 var(--sans);
}

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

button {
  cursor:pointer;
}

button:disabled {
  cursor:default;
  opacity:.45;
}

button,a,input,textarea,select,summary {
  -webkit-tap-highlight-color:transparent;
}

button {
  transition:background .18s,transform .18s,color .18s;
}

button:not(:disabled):active {
  transform:translateY(1px);
}

button:focus-visible,a:focus-visible,summary:focus-visible {
  outline:2px solid #88aaff;
  outline-offset:4px;
}

input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:1px solid var(--accent);
  outline-offset:2px;
}

button {
  border:0;
  color:inherit;
}

svg {
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0;
}

h1,h2,h3,p {
  margin:0;
}

h1,h2,h3 {
  font-weight:600;
}

button.primary {
  background:var(--accent);
  color:#fff;
  border:1px solid transparent;
  border-radius:7px;
  font-weight:600;
}

button.primary:hover:not(:disabled) {
  background:#628dff;
}

.primary svg {
  width:17px;
  height:17px;
}

.secondary {
  background:#18263c;
  border:1px solid #2b3c57;
  border-radius:6px;
  padding:7px 12px;
  white-space:nowrap;
  font-size:12px;
}

.secondary:hover:not(:disabled) {
  background:#223450;
}

.text-button {
  background:transparent;
  color:#b3caff;
  padding:0 3px;
  font-size:12px;
  text-decoration:underline;
  text-underline-offset:3px;
}

.icon-button {
  background:transparent;
  color:var(--muted);
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:5px;
}

.icon-button:hover {
  color:var(--text);
  background:#1e2c43;
}

.icon-button svg {
  width:17px;
  height:17px;
}

.eyebrow {
  font-size:10px;
  letter-spacing:1.4px;
  color:var(--muted);
  font-weight:600;
}

.topbar {
  height:64px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  padding:0 28px;
  gap:24px;
  background:#0b1423;
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--text);
  font-size:14px;
  font-weight:700;
  letter-spacing:.6px;
}

.brand-symbol {
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  background:var(--accent);
  border-radius:6px;
  color:#fff;
  font:700 17px var(--mono);
  letter-spacing:-3px;
  padding-right:3px;
}

.topbar-divider {
  width:1px;
  height:20px;
  background:var(--border);
}

.topbar-title {
  font-size:12px;
  color:#acbad0;
}

.session-label {
  margin-left:auto;
  color:var(--muted);
  font-size:11px;
  display:flex;
  gap:8px;
  align-items:center;
}

.status-dot {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--success);
  flex-shrink:0;
}

.app-shell {
  display:grid;
  grid-template-columns:256px minmax(0,1fr);
  min-height:calc(100dvh - 64px);
}

.sidebar {
  padding:31px 22px 20px;
  background:var(--sidebar);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
}

.sidebar .eyebrow {
  font-size:9px;
  letter-spacing:1px;
  color:#8294af;
}

.sidebar h1 {
  font-size:25px;
  letter-spacing:-.65px;
  line-height:1.3;
  margin-top:12px;
}

.accent {
  color:var(--accent);
}

.sidebar-intro {
  font-size:11px;
  color:var(--muted);
  line-height:1.85;
  margin-top:13px;
}

.journey-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:33px;
}

.journey-heading h2,.test-checklist h2 {
  font-size:11px;
  font-weight:600;
}

.journey-heading>span {
  font:10px var(--mono);
  color:var(--muted);
}

progress {
  display:block;
  appearance:none;
  width:100%;
  height:3px;
  border:0;
  background:#203049;
  border-radius:4px;
  margin:12px 0 20px;
}

progress::-webkit-progress-bar {
  background:#203049;
  border-radius:4px;
}

progress::-webkit-progress-value {
  background:var(--accent);
  border-radius:4px;
  transition:width .3s;
}

progress::-moz-progress-bar {
  background:var(--accent);
}

.journey {
  display:flex;
  flex-direction:column;
  gap:8px;
}

.journey-step {
  display:flex;
  align-items:center;
  text-align:left;
  background:transparent;
  width:100%;
  padding:12px 8px;
  border:1px solid transparent;
  border-radius:7px;
  gap:10px;
}

.journey-step:hover {
  background:#14223a;
}

.journey-step.current {
  background:#162742;
  border-color:#29436b;
}

.step-number {
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
  border:1px solid #30425f;
  border-radius:7px;
  font:10px var(--mono);
  color:#9caec9;
  flex-shrink:0;
}

.current .step-number {
  background:#243e6c;
  color:#c7d9ff;
  border-color:#365a99;
}

.step-number.complete {
  background:#193a36;
  color:var(--success);
  border-color:#305e52;
}

.journey-step strong {
  display:block;
  font-size:11px;
  font-weight:600;
}

.journey-step small {
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-top:3px;
}

.step-arrow {
  font-size:14px;
  color:var(--subtle);
  margin-left:auto;
}

.current .step-arrow {
  color:#b3caff;
}

.test-checklist {
  border-top:1px solid var(--border);
  margin-top:24px;
  padding-top:23px;
}

.test-checklist>p {
  font-size:10px;
  color:var(--muted);
  margin:7px 0 15px;
}

.test-checklist label {
  display:flex;
  align-items:center;
  gap:8px;
  margin:12px 0;
  font-size:11px;
  cursor:pointer;
  color:#b9c6d9;
}

.test-checklist label:has(input:checked) {
  color:var(--success);
}

input[type=checkbox] {
  appearance:none;
  width:15px;
  height:15px;
  flex-shrink:0;
  border:1px solid #4a5b76;
  border-radius:4px;
  background:transparent;
  margin:0;
  display:grid;
  place-items:center;
}

input[type=checkbox]:checked {
  background:#365a99;
  border-color:#628dff;
}

input[type=checkbox]:checked:after {
  content:"✓";
  font-size:11px;
  color:#fff;
}

input[type=checkbox]:disabled {
  opacity:.45;
}

.test-checklist .check-hint {
  font-size:10px;
  color:var(--subtle);
  margin-top:14px;
}

.sidebar-bottom {
  margin-top:auto;
  padding-top:34px;
}

.session-note {
  display:flex;
  gap:9px;
  padding:13px 0;
  color:var(--subtle);
  border-top:1px solid var(--border);
}

.session-note svg {
  width:14px;
  height:14px;
  margin-top:3px;
}

.session-note p {
  font-size:10px;
  line-height:1.8;
}

.reset-button {
  padding:8px 0;
  display:flex;
  gap:9px;
  align-items:center;
  color:var(--muted);
  background:transparent;
  font-size:11px;
}

.reset-button:hover {
  color:var(--text);
}

.reset-button svg {
  width:14px;
  height:14px;
}

.workspace {
  padding:28px 28px 0;
  min-width:0;
  display:flex;
  flex-direction:column;
  outline:none;
  max-width:1800px;
  width:100%;
  margin:auto;
}

.workspace-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:24px;
}

.workspace-header .eyebrow {
  font-size:9px;
  letter-spacing:1px;
}

.path-separator {
  margin:0 8px;
  color:#445572;
}

.workspace-header h2 {
  font-size:22px;
  letter-spacing:-.5px;
  margin-top:7px;
}

.apply-button {
  display:flex;
  align-items:center;
  gap:9px;
  padding:11px 15px;
  font-size:11px;
  min-height:41px;
}

.workbench {
  display:grid;
  grid-template-columns:minmax(0,1.13fr) minmax(0,1fr);
  gap:18px;
  flex:1;
  min-height:600px;
  height:calc(100dvh - 222px);
  max-height:1000px;
}

.editor-panel,.chat-panel {
  border:1px solid var(--border);
  border-radius:10px;
  overflow:hidden;
  min-width:0;
  display:flex;
  flex-direction:column;
}

.editor-panel {
  background:var(--editor);
}

.tabbar {
  display:flex;
  background:#101c2e;
  border-bottom:1px solid var(--border);
  min-height:46px;
  flex-shrink:0;
}

.file-tab {
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 18px;
  font:11px var(--mono);
  color:var(--muted);
  background:transparent;
  border-right:1px solid #1c2a42;
  border-top:2px solid transparent;
}

.file-tab.active {
  background:var(--editor);
  color:#dfe8f7;
  border-top-color:var(--accent);
}

.file-tab:hover:not(.active) {
  background:#152239;
}

.file-icon {
  font:10px var(--mono);
  color:var(--muted);
  flex-shrink:0;
}

.file-icon.py {
  color:#e1c588;
}

.file-icon.txt {
  color:#84b1f3;
  font-size:19px;
  line-height:12px;
}

.dirty-dot {
  width:5px;
  height:5px;
  background:#d8b580;
  border-radius:50%;
}

.editor-help {
  display:flex;
  gap:9px;
  padding:14px 18px;
  background:#111f34;
  border-bottom:1px solid #20314b;
  font-size:10px;
  line-height:1.7;
  color:#a2b6d3;
  flex-shrink:0;
}

.help-icon {
  border:1px solid #6b88b3;
  border-radius:50%;
  display:grid;
  place-items:center;
  font:10px var(--mono);
  width:14px;
  height:14px;
  flex-shrink:0;
  margin-top:2px;
  color:#8baade;
}

.file-panel {
  overflow-y:auto;
  flex:1;
  min-height:0;
}

.code-document {
  padding:24px 20px 20px 0;
  font:11px/2 var(--mono);
}

.code-line {
  display:grid;
  grid-template-columns:43px minmax(0,1fr);
  min-height:25px;
  gap:10px;
}

.code-line>span:last-child {
  overflow-wrap:anywhere;
}

.line-number,.line-gutter {
  font:10px/25px var(--mono);
  text-align:right;
  color:#52617a;
  user-select:none;
}

.comment {
  color:#7388a6;
  font-size:10px;
}

.variable {
  color:#b4caff;
}

.operator {
  color:#c8d2e2;
  white-space:pre;
}

.string-quote,.string-value {
  color:#acd5bd;
}

.code-field {
  display:flex;
  align-items:center;
  min-width:0;
  line-height:30px;
}

.code-field .variable {
  font-size:10px;
  flex-shrink:0;
}

.inline-code {
  min-width:0;
  width:100%;
  border:1px solid #2a4354;
  border-radius:4px;
  background:#14272f;
  padding:3px 5px;
  font:11px var(--mono);
  height:28px;
  margin:0 3px;
}

.inline-code:focus-visible {
  background:#16323a;
}

.textarea-code {
  display:flex;
  min-width:0;
}

.line-gutter {
  flex-shrink:0;
  margin:0;
  width:43px;
  padding:0;
  overflow:hidden;
  white-space:pre;
}

.prompt-code {
  gap:10px;
  margin:4px 0;
}

.prompt-code textarea {
  width:calc(100% - 53px);
  min-height:194px;
  resize:vertical;
  border:1px solid #2a4354;
  border-radius:4px;
  background:#12242b;
  color:#afd7bf;
  padding:9px 11px;
  font:11px/25px var(--mono);
  overflow:auto;
}

.prompt-code .line-gutter {
  padding-top:10px;
}

.prompt-guide {
  margin:0 20px 22px 52px;
  display:flex;
  gap:9px;
  color:#91a3bf;
  font-size:10px;
  line-height:1.9;
}

.prompt-guide strong {
  font-weight:500;
  color:#b2c2d9;
}

.guide-mark {
  color:#6489c2;
  font:19px var(--mono);
}

.api-explainer {
  border-top:1px solid #1f2e45;
  margin:0 20px 24px 52px;
}

.api-explainer summary {
  display:flex;
  gap:9px;
  align-items:center;
  padding:15px 0;
  color:#a9b9d0;
  font-size:10px;
  cursor:pointer;
  list-style:none;
}

.details-arrow {
  margin-left:auto;
  color:#7087a6;
}

.api-explainer[open] .details-arrow,.context-details[open] .details-arrow {
  transform:rotate(180deg);
}

.api-explainer-body {
  font-size:10px;
  line-height:1.8;
  color:var(--muted);
}

.api-explainer-body pre {
  font:10px/1.9 var(--mono);
  overflow-x:auto;
  padding:14px;
  background:#101e30;
  border:1px solid #26364f;
  border-radius:5px;
  margin:13px 0;
}

.small-text {
  font-size:9px;
  color:#8294af;
}

.editor-footer {
  min-height:32px;
  padding:0 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border-top:1px solid var(--border);
  font:9px var(--mono);
  color:#7f93b1;
  flex-shrink:0;
}

.editor-footer>span:first-child {
  display:flex;
  align-items:center;
  gap:7px;
}

.editor-footer .status-dot {
  width:4px;
  height:4px;
}

.editor-footer .unsaved {
  color:var(--warning);
}

.editor-footer .unsaved .status-dot {
  background:var(--warning);
}

.knowledge-panel {
  display:flex;
  flex-direction:column;
}

.knowledge-toolbar {
  display:flex;
  gap:8px;
  padding:18px;
  border-bottom:1px solid #1c2c45;
}

.knowledge-toolbar select {
  min-width:0;
  flex:1;
  color:#b4c5dd;
  border:1px solid #31435e;
  border-radius:5px;
  background:#111f33;
  padding:7px;
  font-size:10px;
}

.knowledge-toolbar .secondary {
  font-size:10px;
}

.knowledge-title {
  display:flex;
  justify-content:space-between;
  padding:18px 18px 11px 21px;
  gap:8px;
  font-size:10px;
  color:#a5b6cd;
}

.knowledge-title>span {
  color:#697f9f;
  font:9px var(--mono);
}

.knowledge-code {
  flex:1;
  min-height:280px;
  padding:0 18px 0 0;
}

.knowledge-code .line-gutter {
  width:32px;
  margin-right:10px;
  padding-top:10px;
  line-height:23px;
}

.knowledge-code textarea {
  border:1px solid #233851;
  border-radius:5px;
  resize:none;
  background:#101f32;
  color:#c7d5e8;
  font:11px/23px var(--mono);
  width:100%;
  min-width:0;
  padding:10px 12px;
  white-space:pre;
  overflow:auto;
}

.knowledge-code textarea::placeholder {
  color:#627a9d;
  white-space:pre-wrap;
}

.knowledge-note {
  display:flex;
  gap:9px;
  padding:17px 19px;
  font-size:10px;
  color:#8fa5c2;
  line-height:1.85;
}

.chat-panel {
  background:#111d31;
}

.chat-topline {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 13px 0 18px;
  min-height:46px;
  border-bottom:1px solid var(--border);
  background:#101c2e;
}

.chat-tab {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:11px;
  color:#b9c8df;
}

.chat-tab svg {
  width:15px;
  height:15px;
  color:#8da5c9;
}

.assistant-heading {
  display:flex;
  gap:12px;
  align-items:center;
  padding:21px 21px 16px;
}

.assistant-avatar {
  width:38px;
  height:38px;
  border:1px solid #355484;
  border-radius:10px;
  background:#203960;
  color:#b3ceff;
  display:grid;
  place-items:center;
  flex-shrink:0;
}

.assistant-avatar svg {
  width:23px;
  height:23px;
}

.assistant-heading>div:last-child {
  min-width:0;
}

.assistant-heading h3 {
  font-size:15px;
  letter-spacing:-.2px;
  overflow-wrap:anywhere;
}

.assistant-heading p {
  font-size:10px;
  color:var(--muted);
  margin-top:3px;
  overflow-wrap:anywhere;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.mode-strip {
  display:flex;
  gap:8px;
  align-items:center;
  padding:0 21px 16px;
  border-bottom:1px solid #21314a;
  flex-wrap:wrap;
}

.mode-badge {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:9px;
  color:#93d1b9;
  border:1px solid #2b4b47;
  background:#142d2b;
  padding:3px 7px;
  border-radius:4px;
}

.mode-badge.demo {
  color:#dfbd8e;
  border-color:#514334;
  background:#2b2825;
}

.mode-badge.demo .status-dot {
  background:var(--warning);
}

.mode-badge.error {
  color:#ffacb6;
  border-color:#65404a;
  background:#34232f;
}

.mode-badge .status-dot {
  width:4px;
  height:4px;
}

.source-short {
  font:9px var(--mono);
  color:#7188ab;
  margin-left:auto;
}

.chat-log {
  flex:1;
  min-height:180px;
  overflow-y:auto;
  padding:20px;
  scroll-behavior:smooth;
}

.empty-chat {
  height:100%;
  min-height:220px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:24px 0 32px;
}

.empty-illustration {
  display:flex;
  align-items:center;
  gap:7px;
  color:#6e94c9;
  margin-bottom:23px;
}

.empty-illustration svg {
  width:55px;
  height:55px;
  stroke-width:1.2;
  color:#809dc8;
}

.bracket {
  font:45px var(--mono);
  color:#36527a;
}

.empty-eyebrow {
  font:8px var(--mono);
  letter-spacing:1.4px;
  color:#6e86a9;
}

.empty-chat h3 {
  font-size:20px;
  letter-spacing:-.5px;
  font-weight:500;
  margin-top:10px;
}

.empty-chat>p:last-of-type {
  font-size:11px;
  line-height:1.9;
  margin-top:10px;
  color:#8ea2bf;
}

.empty-flow {
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:26px;
  font:9px var(--mono);
  color:#6b84a7;
}

.empty-flow>span:nth-child(odd) {
  padding:4px 8px;
  border:1px solid #2c3e5c;
  border-radius:4px;
  color:#a5b8d5;
}

.empty-flow strong {
  font-weight:400;
  color:#a0bfff;
}

.message {
  margin-bottom:18px;
  animation:message-in .2s ease-out;
}

.message-label {
  font:8px var(--mono);
  letter-spacing:.8px;
  color:#849cbf;
  margin-bottom:6px;
}

.message-bubble {
  font-size:12px;
  line-height:1.85;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  padding:12px 14px;
  border:1px solid #293c59;
  border-radius:0 9px 9px 9px;
  background:#16263e;
  color:#dce5f3;
}

.message.user {
  margin-left:28px;
}

.message.user .message-label {
  text-align:right;
  color:#8daee5;
}

.message.user .message-bubble {
  background:#1c3560;
  border-color:#2e4d7d;
  border-radius:9px 0 9px 9px;
}

.message.system .message-bubble {
  font-size:11px;
  color:#b5c4d9;
  background:#172336;
  border-style:dashed;
}

.message-mode {
  font-size:9px;
  color:#8fa7c7;
  margin-top:5px;
}

.pending-status {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:10px;
  color:#b3c9ec;
  padding:10px 20px;
  min-height:37px;
  flex-wrap:wrap;
}

.thinking-bars {
  display:flex;
  gap:3px;
  height:13px;
  align-items:center;
}

.thinking-bars i {
  display:block;
  width:3px;
  height:7px;
  background:#739bdf;
  border-radius:2px;
  animation:thinking 1.1s ease-in-out infinite;
}

.thinking-bars i:nth-child(2) {
  animation-delay:.15s;
}

.thinking-bars i:nth-child(3) {
  animation-delay:.3s;
}

.context-details {
  font-size:10px;
  color:#a2b6d3;
  margin:0 20px 10px;
  border:1px solid #2b3d59;
  border-radius:5px;
  background:#111e31;
  flex-shrink:0;
}

.context-details summary {
  padding:9px 11px;
  display:flex;
  align-items:center;
  cursor:pointer;
  list-style:none;
}

.context-details pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font:10px/1.8 var(--mono);
  padding:0 12px 12px;
  max-height:150px;
  overflow:auto;
  margin:0;
  color:#9fb2ce;
}

.chat-notice {
  font-size:10px;
  line-height:1.7;
  color:#dec196;
  margin:0 20px 10px;
  padding:9px 11px;
  background:#30291f;
  border:1px solid #4d4230;
  border-radius:5px;
}

.composer {
  margin:0 20px;
  display:flex;
  align-items:flex-end;
  border:1px solid #344b6e;
  border-radius:8px;
  background:#0e192b;
  padding:9px 9px 9px 12px;
  gap:8px;
  flex-shrink:0;
}

.composer:focus-within {
  border-color:#668dd4;
  box-shadow:0 0 0 2px #36578c26;
}

.composer textarea {
  resize:none;
  flex:1;
  min-width:0;
  height:40px;
  max-height:96px;
  border:0;
  background:transparent;
  color:var(--text);
  font-size:11px;
  line-height:1.7;
  padding:2px 0;
  outline:none;
}

.composer textarea::placeholder {
  color:#7087a8;
}

.send-button {
  width:32px;
  height:32px;
  border-radius:6px;
  background:var(--accent);
  color:#fff;
  display:grid;
  place-items:center;
  flex-shrink:0;
}

.send-button svg {
  width:17px;
  height:17px;
}

.send-button:hover:not(:disabled) {
  background:#6b96ff;
}

.composer-hint {
  display:flex;
  justify-content:space-between;
  gap:6px;
  margin:9px 20px 14px;
  font-size:8px;
  color:#7186a6;
}

.hint-dot {
  padding:0 3px;
}

.workspace-footer {
  padding:13px 1px;
  display:flex;
  justify-content:space-between;
  gap:8px;
  color:#6e83a3;
  font-size:9px;
  min-height:42px;
}

.workspace-footer>span:first-child {
  display:flex;
  gap:7px;
  align-items:center;
}

.workspace-footer .status-dot {
  width:4px;
  height:4px;
}

.connection-banner {
  padding:10px 28px;
  background:#32281e;
  border-bottom:1px solid #5b482d;
  color:#ebc28c;
  font-size:12px;
}

.toast {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  padding:13px 18px;
  border-radius:8px;
  border:1px solid #46618b;
  box-shadow:0 8px 32px #06102066;
  background:#1c2e4b;
  color:#e2eafa;
  max-width:min(520px,90vw);
  font-size:12px;
  z-index:5;
}

.toast.error {
  background:#3d2531;
  border-color:#81505c;
}

dialog {
  padding:28px;
  background:#142238;
  border:1px solid #395070;
  border-radius:12px;
  color:var(--text);
  width:min(430px,90vw);
}

dialog::backdrop {
  background:#050b17b3;
  backdrop-filter:blur(4px);
}

dialog h2 {
  font-size:21px;
  margin:9px 0 12px;
}

dialog p:not(.eyebrow) {
  font-size:13px;
  color:#b5c3d9;
  line-height:1.8;
}

.dialog-actions {
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:25px;
}

.dialog-actions button {
  padding:9px 16px;
  font-size:12px;
}

.sr-only,.skip-link:not(:focus) {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.skip-link:focus {
  position:fixed;
  background:#2f568e;
  color:#fff;
  top:8px;
  left:8px;
  padding:8px;
  z-index:10;
}

summary::-webkit-details-marker {
  display:none;
}

::-webkit-scrollbar {
  width:6px;
  height:6px;
}

::-webkit-scrollbar-thumb {
  background:#344969;
  border-radius:5px;
}

::-webkit-scrollbar-track {
  background:transparent;
}

[hidden] {
  display:none!important;
}

@keyframes thinking {
  0%,100% {
    transform:scaleY(.65);
    opacity:.5;
  }
  50% {
    transform:scaleY(1.6);
    opacity:1;
  }
}

@keyframes message-in {
  from {
    transform:translateY(5px);
    opacity:0;
  }
  to {
    transform:translateY(0);
    opacity:1;
  }
}

@media(min-width:1550px) {
  .sidebar {
    padding-top:38px;
  }
  .workspace {
    padding:34px 34px 0;
  }
  .workspace-header {
    margin-bottom:29px;
  }
  .workbench {
    height:calc(100dvh - 244px);
  }
  .code-document {
    font-size:12px;
  }
  .inline-code,.prompt-code textarea {
    font-size:12px;
  }
  .sidebar h1 {
    font-size:27px;
  }
  .code-line {
    grid-template-columns:46px minmax(0,1fr);
  }
}

@media(max-width:1200px) {
  .app-shell {
    grid-template-columns:218px minmax(0,1fr);
  }
  .sidebar {
    padding:25px 16px 15px;
  }
  .sidebar h1 {
    font-size:23px;
  }
  .workspace {
    padding:25px 19px 0;
  }
  .workspace-header h2 {
    font-size:19px;
  }
  .workspace-header .eyebrow {
    font-size:8px;
  }
  .apply-button {
    font-size:10px;
    padding:10px;
  }
  .workbench {
    gap:13px;
    grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);
  }
  .code-document {
    padding-right:14px;
  }
  .code-line {
    grid-template-columns:29px minmax(0,1fr);
    gap:7px;
  }
  .code-field {
    flex-wrap:wrap;
  }
  .code-field .variable {
    font-size:9px;
  }
  .code-field input {
    flex:1;
    min-width:75px;
  }
  .prompt-code {
    gap:7px;
  }
  .prompt-code .line-gutter {
    width:29px;
  }
  .prompt-code textarea {
    width:calc(100% - 36px);
    font-size:10px;
  }
  .prompt-guide,.api-explainer {
    margin-left:36px;
    margin-right:14px;
  }
  .comment {
    font-size:9px;
  }
  .assistant-heading {
    padding:18px 15px 14px;
  }
  .mode-strip {
    padding:0 15px 13px;
  }
  .chat-log {
    padding:16px;
  }
  .composer {
    margin:0 14px;
  }
  .composer-hint {
    margin-left:14px;
    margin-right:14px;
  }
  .composer-hint>span:last-child {
    display:none;
  }
  .session-label {
    font-size:10px;
  }
  .file-tab {
    padding:0 12px;
  }
  .editor-help {
    font-size:9px;
    padding:12px;
  }
  .knowledge-toolbar {
    padding:12px;
    gap:5px;
  }
  .knowledge-toolbar .secondary {
    padding:6px 8px;
  }
  .knowledge-toolbar .icon-button {
    width:27px;
  }
  .workspace-footer>span:last-child {
    font-size:8px;
  }
  .session-note p {
    font-size:9px;
  }
}

@media(max-width:980px) {
  .workbench {
    grid-template-columns:1fr;
    height:auto;
    max-height:none;
    min-height:0;
  }
  .editor-panel {
    min-height:570px;
    max-height:730px;
  }
  .chat-panel {
    height:620px;
  }
  .workspace-header {
    align-items:flex-start;
  }
  .apply-button span {
    max-width:95px;
    text-align:left;
  }
  .workspace-footer>span:last-child {
    display:none;
  }
  .app-shell {
    grid-template-columns:210px minmax(0,1fr);
  }
  .sidebar {
    position:sticky;
    top:0;
    max-height:100dvh;
    height:calc(100dvh - 64px);
  }
  .topbar-title {
    font-size:11px;
  }
  .session-label {
    display:none;
  }
  .code-field {
    flex-wrap:nowrap;
  }
  .code-field input {
    min-width:40px;
  }
  .workspace {
    margin-top:0;
  }
  .knowledge-panel {
    min-height:480px;
  }
  .knowledge-code {
    min-height:350px;
  }
}

@media(max-width:640px) {
  .topbar {
    height:58px;
    padding:0 16px;
    gap:14px;
  }
  .brand {
    font-size:12px;
    gap:9px;
  }
  .brand-symbol {
    width:26px;
    height:26px;
  }
  .topbar-title {
    font-size:10px;
  }
  .app-shell {
    display:block;
  }
  .sidebar {
    position:static;
    height:auto;
    max-height:none;
    padding:21px 16px 15px;
    border-right:0;
    border-bottom:1px solid var(--border);
  }
  .sidebar h1 {
    font-size:23px;
    margin-top:7px;
  }
  .sidebar h1 br {
    display:none;
  }
  .sidebar-intro {
    margin-top:7px;
    font-size:11px;
  }
  .sidebar-intro br {
    display:none;
  }
  .journey-heading {
    margin-top:18px;
  }
  .journey-heading h2 {
    font-size:11px;
  }
  .journey {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }
  .journey-step {
    padding:10px 5px;
    flex-direction:column;
    gap:7px;
    text-align:center;
  }
  .journey-step small,.step-arrow {
    display:none;
  }
  .journey-step strong {
    font-size:10px;
  }
  .step-number {
    width:25px;
    height:25px;
  }
  .sidebar progress {
    margin:9px 0 13px;
  }
  .test-checklist {
    margin-top:14px;
    padding-top:13px;
  }
  .test-checklist>p {
    margin:4px 0 8px;
  }
  .test-checklist label {
    font-size:11px;
    margin:8px 0;
  }
  .test-checklist .check-hint {
    margin:8px 0 0;
  }
  .sidebar-bottom {
    padding:0;
    margin-top:12px;
    display:flex;
    align-items:center;
    gap:10px;
    justify-content:space-between;
  }
  .session-note {
    padding:0;
    border:0;
    max-width:205px;
    gap:6px;
  }
  .session-note p {
    font-size:9px;
    line-height:1.5;
  }
  .session-note svg {
    width:12px;
    height:12px;
  }
  .reset-button {
    font-size:9px;
    white-space:nowrap;
    gap:5px;
  }
  .workspace {
    padding:20px 12px 0;
  }
  .workspace-header {
    gap:8px;
    margin-bottom:17px;
    align-items:center;
  }
  .workspace-header h2 {
    font-size:17px;
    max-width:200px;
    line-height:1.4;
  }
  .workspace-header .eyebrow {
    font-size:7px;
  }
  .apply-button {
    padding:8px;
    min-height:39px;
    gap:6px;
  }
  .apply-button span {
    font-size:9px;
    max-width:85px;
  }
  .primary svg {
    width:13px;
  }
  .workbench {
    gap:16px;
  }
  .editor-panel {
    min-height:580px;
    max-height:760px;
  }
  .chat-panel {
    height:650px;
  }
  .code-document {
    font-size:10px;
    padding-top:19px;
    padding-right:11px;
  }
  .code-line {
    grid-template-columns:25px minmax(0,1fr);
  }
  .code-field .variable {
    font-size:8px;
  }
  .inline-code {
    font-size:10px;
    padding:3px;
  }
  .string-quote {
    font-size:10px;
  }
  .prompt-code .line-gutter {
    width:25px;
  }
  .prompt-code textarea {
    width:calc(100% - 32px);
    font-size:10px;
  }
  .prompt-guide,.api-explainer {
    margin-left:32px;
  }
  .file-tab {
    font-size:10px;
    padding:0 14px;
  }
  .source-short {
    font-size:8px;
  }
  .composer-hint {
    font-size:8px;
  }
  .workspace-footer {
    font-size:8px;
    padding-bottom:20px;
  }
  .connection-banner {
    padding:10px 16px;
    font-size:11px;
  }
  .knowledge-toolbar select {
    font-size:9px;
  }
  .knowledge-title {
    font-size:10px;
  }
  .knowledge-code {
    min-height:345px;
  }
  .knowledge-code textarea {
    font-size:10px;
  }
  .api-explainer-body pre {
    font-size:9px;
  }
  .empty-chat {
    padding-bottom:30px;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
}
