@charset "UTF-8";

:root {
  color-scheme: light;
  --canvas: #f6f7f5;
  --surface: #ffffff;
  --ink: #1c2926;
  --muted: #68776d;
  --subtle: #a1aaa5;
  --line: #e5e9e5;
  --line-strong: #d5ddd6;
  --sage: #bce5c5;
  --sage-soft: #eff7ef;
  --green: #255b42;
  --green-dark: #1d4935;
  --orange: #b27b49;
  --red: #aa4944;
  --radius: 14px;
  --sidebar-width: 232px;
  --shadow: 0 3px 14px rgb(29 48 36 / 3%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-width: 360px; scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, input, textarea, select { color: inherit; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
p, h1, h2, h3, h4 { margin-top: 0; }
::selection { background: #d8eedb; color: var(--green-dark); }
:focus-visible { outline: 3px solid #75ae85; outline-offset: 3px; }
button, a, input, textarea, select { transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 30px 18px 20px; background: #fdfefd; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; margin-bottom: 42px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 37px; width: 37px; height: 37px; border-radius: 11px; background: var(--green); color: #e6f6e7; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 9%); }
.brand-mark svg { width: 23px; height: 23px; }
.brand-name { display: block; font-size: 17px; font-weight: 750; line-height: 1.2; letter-spacing: -.65px; }
.brand-subtitle { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); letter-spacing: .4px; }
.nav-label, .eyebrow, .field-label, .stat-label, .metric-label { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: 1.1px; text-transform: uppercase; }
.nav-label { padding: 0 13px; margin: 0 0 11px; color: #9ba49e; font-size: 9px; letter-spacing: 1.45px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; margin: 3px 0; padding: 11px 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #68766b; font-size: 12px; font-weight: 500; text-align: left; }
.nav-item:hover { background: #f3f6f2; color: var(--green); }
.nav-item.active { background: #edf4eb; color: var(--green); font-weight: 650; }
.nav-icon { color: #8e9b92; }
.nav-icon svg { width: 17px; height: 17px; stroke-width: 1.7; }
.nav-item.active .nav-icon { color: var(--green); }
.nav-count { margin-left: auto; padding: 1px 6px; border-radius: 4px; background: #edf0ec; color: #87928a; font-family: Consolas, monospace; font-size: 10px; font-weight: 500; }
.nav-item.active .nav-count { background: #dcebd9; color: var(--green); }
.sidebar-bottom { margin-top: auto; padding-top: 48px; }
.connection-card { padding: 13px 13px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf9; font-size: 11px; }
.connection-card > div:first-child { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; }
.connection-card p { margin: 6px 0 0; color: #929b94; font-size: 10px; line-height: 1.65; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: #72a178; box-shadow: 0 0 0 3px #eaf2e8; }
.status-dot.offline { background: #bc935e; box-shadow: 0 0 0 3px #f4ecdf; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 21px 7px 0; font-size: 11px; }
.user-card > div:not(.avatar) { flex: 1; min-width: 0; }
.user-card strong { display: block; font-size: 11px; font-weight: 600; }
.user-card span:not(.avatar) { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.user-card svg { width: 16px; height: 16px; color: #9ca59f; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; flex-shrink: 0; border: 1px solid #dae5d7; border-radius: 50%; background: #eaf1e7; color: #698267; font-size: 10px; font-weight: 650; }

.main-content { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgb(253 254 253 / 67%); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #969f98; font-size: 11px; }
.breadcrumb svg { width: 14px; height: 14px; }
.breadcrumb strong, .breadcrumb > span:last-child { color: #5d6b61; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #89948c; }
.icon-button:hover { border-color: var(--line); background: #f0f4ef; color: var(--green); }
.icon-button svg { width: 17px; height: 17px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 15px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; color: #4d6052; font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.button:hover { border-color: #b7c8b8; background: #f7faf5; }
.button svg { width: 15px; height: 15px; }
.button.primary { border-color: var(--green); background: var(--green); color: white; box-shadow: 0 2px 3px rgb(30 63 42 / 8%); }
.button.primary:hover { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); }
.button.primary:active { transform: translateY(0); }
.button.secondary { background: white; }
.button.small { min-height: 31px; padding: 7px 11px; font-size: 10px; }
.button.ghost { border-color: transparent; background: transparent; color: #75847a; }
.button.ghost:hover { background: #edf3eb; color: var(--green); }
.button:disabled { opacity: .48; transform: none; box-shadow: none; }
.mobile-toggle { display: none; }
.page { width: 100%; max-width: 1450px; margin: 0 auto; padding: 35px 42px 23px; }
.page-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 113px; margin-bottom: 27px; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: #879b83; font-size: 9px; letter-spacing: 1.6px; }
h1 { margin-bottom: 9px; font-size: clamp(27px, 2.7vw, 36px); font-weight: 650; line-height: 1.2; letter-spacing: -1.45px; }
.page-subtitle { margin-bottom: 0; color: #748171; font-size: 12px; line-height: 1.7; }
.heading-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.hero-art { position: relative; width: 135px; height: 95px; flex: 0 0 135px; margin-right: 17px; color: #99b99c; opacity: .86; }
.hero-art::before, .hero-art::after { content: ""; position: absolute; left: 47px; top: 26px; width: 38px; height: 38px; border: 1px solid #a8c3a9; border-radius: 11px; background: #eff5ec; transform: rotate(-13deg); }
.hero-art::after { left: 54px; top: 19px; display: block; background: #e4efe0; transform: rotate(13deg); box-shadow: 0 0 0 5px rgb(239 245 235 / 80%); }
.hero-orbit { position: absolute; inset: 10px 0; border: 1px solid #dbe5d5; border-radius: 50%; transform: rotate(-25deg); }
.hero-orbit:nth-child(2) { inset: -5px 30px; transform: rotate(37deg); }
.hero-node { position: absolute; z-index: 2; top: 12px; right: 17px; width: 8px; height: 8px; border: 2px solid #f6f7f5; border-radius: 50%; background: #84ae8a; box-shadow: 0 0 0 1px #c9dac5; }
.hero-node:nth-child(4) { top: 72px; left: 22px; background: #a9c2a0; }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 27px; }
.stat-card { position: relative; min-height: 99px; padding: 18px 19px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.stat-icon { position: absolute; right: 17px; top: 20px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #f4f7f1; color: #8b9d83; }
.stat-icon svg { width: 14px; height: 14px; stroke-width: 1.7; }
.stat-value { margin-bottom: 5px; font-size: 25px; font-weight: 600; line-height: 1.3; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat-value small { margin-left: 3px; font-size: 13px; font-weight: 400; letter-spacing: 0; color: #95a18f; }
.stat-label { color: #77866e; font-size: 9px; letter-spacing: 1px; }

.workspace-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 25px; border-bottom: 1px solid #eef0eb; }
.section-header > div:first-child { min-width: 0; }
.section-heading { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 13px; font-weight: 650; letter-spacing: -.15px; }
.section-heading svg { width: 16px; height: 16px; color: #738d73; }
.section-description { margin: 4px 0 0; color: #7e8c72; font-size: 11px; line-height: 1.6; }
.section-number { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 5px; background: #eef4e9; color: #7f9779; font-family: Consolas, monospace; font-size: 10px; font-weight: 500; }
.mode-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid #e7e4d8; border-radius: 5px; background: #faf8ee; color: #9a9369; font-family: Consolas, monospace; font-size: 9px; font-weight: 500; letter-spacing: .2px; white-space: nowrap; }
.mode-badge.live { border-color: #dceadc; background: #f0f8ed; color: #6a9066; }
.mode-badge svg { width: 11px; height: 11px; }
.model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 22px 25px 23px; }
.model-option { position: relative; display: flex; align-items: flex-start; gap: 10px; min-width: 0; min-height: 106px; padding: 17px 15px 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-align: left; }
.model-option:hover { border-color: #b8ceb5; background: #fcfdfb; }
.model-option.selected { border-color: #a6c8a1; background: #f8fbf4; box-shadow: inset 0 0 0 1px rgb(202 224 195 / 14%); }
.model-option.disabled { opacity: .45; cursor: not-allowed; }
.model-option input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.model-option:focus-within { outline: 3px solid #75ae85; outline-offset: 3px; }
.model-logo { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; margin-top: 1px; border: 1px solid #e4e6f3; border-radius: 7px; background: #f1f0fa; color: #7b6db5; font-size: 12px; font-weight: 650; }
.model-logo svg { width: 18px; height: 18px; }
.model-logo.qwen { border-color: #e9e2f1; background: #f4f0fa; color: #9275b2; }
.model-logo.deepseek { border-color: #dfe9f1; background: #edf4fb; color: #6c9bbc; }
.model-logo.glm { border-color: #e3e7ed; background: #f1f3f8; color: #7b89a9; }
.model-details { min-width: 0; flex: 1; padding-right: 13px; }
.model-name { margin-bottom: 1px; color: #455442; font-size: 12px; font-weight: 650; line-height: 1.5; }
.model-provider { color: #839278; font-size: 10px; line-height: 1.6; }
.model-description { margin: 9px 0 0; color: #7e8f73; font-size: 10px; line-height: 1.5; }
.check-indicator { position: absolute; top: 18px; right: 12px; display: grid; place-items: center; width: 13px; height: 13px; border: 1px solid #dce2d7; border-radius: 4px; background: white; color: transparent; }
.check-indicator svg { width: 9px; height: 9px; stroke-width: 3; }
.selected .check-indicator { border-color: #8aa77e; background: #8aa77e; color: white; }

.prompt-section { padding: 0 25px 22px; }
.prompt-label-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.prompt-label-row > label, .prompt-label-row > span { font-size: 11px; font-weight: 600; color: #64745c; }
.prompt-label-row > span:last-child:not(:first-child) { color: #a0a894; font-size: 9px; font-weight: 400; }
.preset-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.preset-button { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 5px 10px; border: 1px solid #e7ebe1; border-radius: 5px; background: #fff; color: #76876a; font-size: 10px; font-weight: 500; }
.preset-button svg { width: 12px; height: 12px; }
.preset-button:hover { color: #55724e; border-color: #c9d9c1; background: #fafcf7; }
.preset-button.active { border-color: #d5e4cb; background: #f1f7eb; color: #728c64; }
.textarea-wrap { overflow: hidden; border: 1px solid #e1e7da; border-radius: 8px; background: #fdfefb; transition: border-color .18s, box-shadow .18s; }
.textarea-wrap:focus-within { border-color: #9db995; box-shadow: 0 0 0 3px #eff5e9; }
textarea#prompt { display: block; width: 100%; min-height: 133px; max-height: 430px; padding: 16px; resize: vertical; border: 0; border-radius: 8px 8px 0 0; outline: none; background: transparent; color: #55634c; font-size: 13px; line-height: 1.85; }
textarea#prompt::placeholder { color: #adb5a4; }
.prompt-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 14px; border-top: 1px solid #eef1e8; background: #fcfdf9; }
.char-count, .keyboard-hint { color: #a7b09b; font-family: Consolas, "Liberation Mono", monospace; font-size: 9px; }
.keyboard-hint { display: flex; align-items: center; gap: 5px; }
kbd { padding: 1px 4px; border: 1px solid #e4e9dc; border-radius: 3px; background: #fff; color: #95a085; font-family: inherit; font-size: 9px; box-shadow: 0 1px 1px rgb(63 76 39 / 4%); }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 25px; border-top: 1px solid #eef1e9; background: #fdfefb; }
.composer-actions > p, .composer-actions > span { margin: 0; color: #a2ad93; font-size: 10px; }
.composer-actions .button { min-height: 37px; }
.run-button { min-width: 156px; }
.run-button kbd { margin-left: 6px; border-color: rgb(255 255 255 / 16%); background: rgb(255 255 255 / 8%); color: rgb(255 255 255 / 56%); }
.advanced-controls { margin: 0 25px 20px; color: #8d9c7e; font-size: 10px; }
.advanced-controls summary { display: flex; align-items: center; gap: 6px; width: fit-content; cursor: pointer; list-style: none; font-size: 10px; }
.advanced-controls summary::-webkit-details-marker { display: none; }
.advanced-controls summary::before { content: "+"; display: inline-block; width: 11px; color: #98a88b; font-size: 13px; text-align: center; }
.advanced-controls[open] summary::before { content: "−"; }
.advanced-controls > div, .advanced-controls .settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 14px; padding: 15px; border: 1px solid #e7ebdf; border-radius: 8px; background: #fafcf6; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { color: #95a185; font-size: 9px; letter-spacing: .5px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, .field textarea { width: 100%; min-height: 36px; padding: 9px 11px; border: 1px solid #dfe5d7; border-radius: 6px; background: #fff; color: #5e6e50; font-size: 11px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, select:focus, .field textarea:focus { border-color: #a4bd94; outline: 2px solid #e8f0df; outline-offset: 1px; }
input[type="range"], input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
input::placeholder { color: #b1b9a7; }
.field small { color: #9fa98e; font-size: 10px; }

.results-section { margin-top: 29px; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.results-toolbar > div { display: flex; align-items: center; gap: 9px; }
.results-toolbar .section-heading { font-size: 12px; }
.results-toolbar p, .results-toolbar > span { margin: 0; color: #a2aa99; font-size: 10px; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); align-items: stretch; gap: 15px; }
.result-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); animation: appear .3s ease both; }
.result-card.winner { border-color: #a6c49a; box-shadow: 0 0 0 2px #eaf2e2; }
.result-card:nth-child(2) { animation-delay: .05s; }
.result-card:nth-child(3) { animation-delay: .1s; }
.result-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 65px; padding: 15px 17px; border-bottom: 1px solid #edf0e8; }
.result-model { display: flex; align-items: center; gap: 9px; min-width: 0; }
.result-model .model-logo { width: 26px; height: 26px; flex-basis: 26px; }
.result-model strong { font-size: 11px; font-weight: 600; }
.result-model small { display: block; color: #a0aa91; font-size: 9px; }
.result-status { display: inline-flex; align-items: center; gap: 4px; color: #99ac85; font-size: 9px; white-space: nowrap; }
.result-status svg { width: 11px; height: 11px; }
.result-status.error { color: var(--red); }
.result-content { flex: 1; min-height: 190px; max-height: 480px; overflow: auto; padding: 18px; color: #647657; font-size: 12px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-content p:last-child { margin-bottom: 0; }
.result-content pre { overflow-x: auto; padding: 12px; border: 1px solid #e9ede1; border-radius: 6px; background: #f8faf4; color: #657753; font-size: 10px; line-height: 1.7; }
.result-content code { font-family: Consolas, "Liberation Mono", monospace; font-size: .93em; }
.result-content ul, .result-content ol { padding-left: 19px; }
.result-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 17px; padding: 13px 0; border-top: 1px solid #edf0e6; }
.metric + .metric { padding-left: 10px; border-left: 1px solid #edf0e6; }
.metric-label { display: block; margin-bottom: 5px; color: #a8b198; font-size: 7px; letter-spacing: .5px; }
.metric-value { display: block; color: #7b8c65; font-family: Consolas, "Liberation Mono", monospace; font-size: 10px; font-weight: 500; font-variant-numeric: tabular-nums; }
.result-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 43px; padding: 8px 15px; border-top: 1px solid #edf0e6; background: #fdfefb; }
.result-footer > span { color: #a3ae94; font-size: 9px; }
.rating-buttons { display: flex; align-items: center; gap: 4px; }
.rating-button { display: grid; place-items: center; width: 26px; height: 26px; padding: 5px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #a5b394; }
.rating-button svg { width: 13px; height: 13px; }
.rating-button:hover { border-color: #dae4cf; background: #f1f6e9; color: #75915f; }
.rating-button.active { border-color: #c6d8b5; background: #eaf3df; color: #668c4e; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 210px; padding: 30px 24px; border: 1px dashed #dce3d3; border-radius: 11px; background: rgb(255 255 255 / 28%); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border: 1px solid #e4eadd; border-radius: 10px; background: #f1f5ea; color: #a4b48e; box-shadow: 0 3px 8px rgb(76 94 45 / 3%); }
.empty-icon svg { width: 18px; height: 18px; }
.empty-title { margin: 0 0 5px; color: #6f825c; font-size: 12px; font-weight: 600; }
.empty-description { max-width: 340px; margin: 0; color: #89987a; font-size: 11px; line-height: 1.8; }
.empty-state .button { margin-top: 15px; }
.skeleton { display: block; height: 8px; margin: 12px 0; border-radius: 4px; background: #f0f3e9; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton:nth-child(2n) { width: 90%; }
.skeleton:nth-child(3n) { width: 68%; }
.progress-line { position: absolute; inset: 0 0 auto; height: 2px; overflow: hidden; background: #f0f5e8; }
.progress-line::before { content: ""; position: absolute; width: 40%; height: 100%; background: #a4c390; animation: progress 1.3s ease-in-out infinite; }
.notice { display: flex; align-items: flex-start; gap: 9px; margin: 15px 0; padding: 12px 14px; border: 1px solid #e8e2cf; border-radius: 8px; background: #fcf9ee; color: #a3966a; font-size: 11px; line-height: 1.7; }
.notice svg { width: 15px; height: 15px; margin-top: 2px; }
.notice.error { border-color: #eedbd5; background: #fdf4f1; color: #ac776b; }
.notice.success { border-color: #dae8ce; background: #f3f9ec; color: #86a16d; }
.notice p { margin: 0; }
.workspace-card > .notice { margin: 0 25px 20px; }

.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 21px 23px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.history-main { flex: 1; min-width: 0; }
.history-main h3 { margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.history-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 13px; color: #9da88f; font-size: 10px; }
.history-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.history-prompt { display: -webkit-box; max-width: 900px; margin: 0 0 10px; overflow: hidden; color: #77876a; font-size: 12px; line-height: 1.75; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid #e4ebda; border-radius: 4px; background: #f7faf2; color: #9aa98a; font-family: Consolas, monospace; font-size: 9px; line-height: 1.35; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 29px; padding: 17px 0 0; border-top: 1px solid #e7ebe0; color: #aeb8a0; font-family: Consolas, "Liberation Mono", monospace; font-size: 8px; letter-spacing: .1px; }
.page-footer > div, .page-footer > span { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.page-footer a:hover { color: #71845d; }
.footer-dot { width: 4px; height: 4px; border-radius: 50%; background: #afc398; }
.toast { position: fixed; z-index: 100; bottom: 25px; left: calc(50% + 116px); max-width: min(440px, calc(100vw - 36px)); padding: 12px 20px; transform: translateX(-50%); border: 1px solid #365d37; border-radius: 9px; background: #2d4c31; color: #eef5e8; box-shadow: 0 8px 25px rgb(29 46 25 / 16%); font-size: 12px; animation: toast-in .2s ease both; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 30px; overflow-y: auto; background: rgb(31 44 30 / 24%); backdrop-filter: blur(3px); }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 60px); overflow-y: auto; border: 1px solid #dfe6d7; border-radius: 15px; background: #fff; box-shadow: 0 20px 70px rgb(29 46 25 / 17%); animation: appear .2s ease both; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 25px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.4px; }
.modal-body { padding: 24px 25px; color: #849775; font-size: 12px; line-height: 1.8; }
.modal-body h3 { margin-bottom: 8px; color: #5c7450; font-size: 12px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 25px; border-top: 1px solid var(--line); background: #fbfdf8; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.setting-card { padding: 23px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.setting-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #5c7250; font-size: 13px; font-weight: 600; }
.setting-card h3 svg { width: 17px; height: 17px; color: #91a580; }
.setting-card p { color: #91a080; font-size: 11px; line-height: 1.8; }
.setting-card .field + .field { margin-top: 14px; }
.setting-card .button { margin-top: 15px; }
.code-block { padding: 15px; overflow-x: auto; border: 1px solid #e2e9d8; border-radius: 7px; background: #f8faf3; color: #7f966b; font-family: Consolas, "Liberation Mono", monospace; font-size: 10px; line-height: 1.85; white-space: pre; }
.help-list { display: flex; flex-direction: column; gap: 11px; padding-left: 18px; color: #93a281; font-size: 11px; line-height: 1.8; }
.help-list strong { color: #687f57; font-weight: 600; }

/* Application composition and shared reading styles. */
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 120; padding: 12px 17px; transform: translateY(-150%); border: 1px solid var(--green); border-radius: 7px; background: #fff; color: var(--green); font-weight: 600; }
.skip-link:focus { transform: translateY(0); }
.brand-period { color: #7b9f77; }
.brand-subtitle { font-size: 8px; letter-spacing: 1.05px; }
.topbar-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.local-indicator { display: inline-flex; align-items: center; gap: 8px; color: #657465; font-size: 10px; }
.local-indicator .status-dot { width: 5px; height: 5px; box-shadow: none; }
.eyebrow-line { width: 17px; height: 1px; background: #819a79; }
.muted-heading { color: #82947e; font-weight: 450; }
.page-heading .heading-actions { align-self: center; }
.stat-card { min-height: 107px; }
.stat-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding-right: 29px; margin-bottom: 8px; }
.stat-note { color: #697b63; font-size: 9px; font-weight: 400; letter-spacing: 0; line-height: 1.6; }
.favorite-value { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding-top: 2px; font-size: 19px; letter-spacing: -.5px; line-height: 1.25; }
.favorite-value .stat-note { font-size: 8px; }
.section-heading h2 { margin: 0; font-size: inherit; font-weight: inherit; line-height: 1.5; letter-spacing: inherit; }
.model-selection { padding: 21px 25px 23px; }
.selection-label { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.selection-label span { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 10px; letter-spacing: 0; text-transform: none; }
.model-selection .model-grid { padding: 0; }
.model-option { display: grid; grid-template-columns: 29px minmax(0, 1fr) 12px; align-content: start; align-items: center; gap: 0 10px; min-height: 109px; padding: 16px 14px; }
.model-option > .model-logo { grid-column: 1; grid-row: 1; }
.model-option > .model-details { grid-column: 2; grid-row: 1; display: block; padding-right: 0; }
.model-option > .model-description { grid-column: 1 / -1; grid-row: 2; max-width: none; margin: 12px 0 0; font-size: 10px; line-height: 1.55; text-align: left; }
.model-option > .check-indicator { top: 23px; right: 14px; }
.model-option:disabled { opacity: .66; }
.prompt-section .advanced-controls { margin: 16px 0 0; }
.advanced-controls summary { min-height: 27px; font-size: 10px; }
.advanced-controls summary::before { display: none; }
.advanced-controls summary svg { width: 13px; height: 13px; }
.advanced-controls summary > span { margin-left: 4px; padding: 1px 5px; border: 1px solid #e4e9dc; border-radius: 4px; color: #6c7a60; font-size: 8px; }
.advanced-controls > .advanced-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.system-field { grid-column: 1 / -1; }
.prompt-section .composer-actions { margin: 17px -25px -22px; }
.composer-actions > p { display: flex; align-items: center; gap: 7px; }
.composer-actions > p svg { width: 13px; height: 13px; flex-shrink: 0; color: #789b6b; }
.button-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 4px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 4px; background: rgb(255 255 255 / 10%); color: #e2efdc; font-family: Consolas, monospace; font-size: 9px; font-weight: 400; }
.results-toolbar > .section-heading { flex-wrap: wrap; gap: 8px; }
.results-toolbar .section-heading h2 { white-space: nowrap; }
.results-subtitle { margin-left: 6px; color: #687860; font-size: 10px; font-weight: 400; letter-spacing: 0; }
.results-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.results-context { margin: 0 0 13px; color: #617357; font-size: 10px; line-height: 1.7; }
.compared-prompt { margin: 0 0 13px; border: 1px solid #e1e8d9; border-radius: 8px; background: #fcfdf9; color: #627558; font-size: 12px; }
.compared-prompt summary { padding: 11px 14px; cursor: pointer; line-height: 1.7; }
.compared-prompt summary::marker { color: #7e9870; font-size: 10px; }
.compared-prompt[open] summary { border-bottom: 1px solid #e9eee2; }
.compared-prompt p { max-height: 230px; margin: 0; overflow: auto; padding: 13px 16px; color: #4e6643; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-notice { margin: 0 0 14px; padding: 10px 13px; border-color: #e4e7d6; background: #f7f9ef; color: #67774f; font-size: 10px; }
.result-content { white-space: normal; }
.result-content > :first-child { margin-top: 0; }
.result-content p { margin-bottom: 12px; }
.result-content pre { white-space: pre; }
.result-content h1, .result-content h2, .result-content h3 { margin: 18px 0 8px; color: #3e5635; font-size: 13px; font-weight: 600; letter-spacing: 0; line-height: 1.6; }
.result-content blockquote { margin: 12px 0; padding: 1px 0 1px 13px; border-left: 2px solid #cbdac0; color: #697e58; }
.metric-label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.metric-label svg { width: 10px; height: 10px; }
.metric-value { font-size: 12px; }
.result-status.failed { color: #994a43; }
.result-footer { flex-wrap: wrap; gap: 5px; padding: 9px 12px; }
.result-footer .rating-buttons { gap: 0; margin-right: auto; }
.result-footer .rating-button { width: 24px; height: 26px; }
.result-footer .icon-button { width: 26px; height: 27px; }
.result-footer .winner-button { min-height: 28px; gap: 5px; padding: 6px; font-size: 9px; }
.rating-button.active svg { fill: #d6e8b8; }
.results-empty { min-height: 224px; padding-top: 27px; padding-bottom: 24px; }
.empty-illustration { position: relative; width: 83px; height: 52px; margin-bottom: 17px; }
.empty-sheet { position: absolute; display: grid; place-items: center; width: 35px; height: 44px; border: 1px solid #d5dec9; border-radius: 6px; background: #fff; box-shadow: 0 3px 5px rgb(73 94 35 / 3%); }
.sheet-back { left: 10px; top: 4px; transform: rotate(-14deg); background: #f5f8ee; color: #9eaf88; }
.sheet-front { right: 10px; top: 1px; transform: rotate(11deg); color: #8fa570; }
.empty-sheet svg { width: 16px; height: 16px; stroke-width: 1.3; }
.little-spark { position: absolute; right: -1px; top: -6px; color: #9eb789; font-size: 14px; font-weight: 300; }
.empty-footnote { display: inline-flex; align-items: center; gap: 7px; margin-top: 17px; color: #71815e; font-family: Consolas, "Liberation Mono", monospace; font-size: 7px; letter-spacing: 1px; }
.empty-footnote svg { width: 12px; height: 12px; transform: rotate(-90deg); }
.loading-dot { width: 6px; height: 6px; border-radius: 50%; background: #8aad75; box-shadow: 0 0 0 4px #f0f6e8; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton.short { width: 62%; }
.history-search { position: relative; max-width: 430px; margin-bottom: 22px; }
.history-search svg { position: absolute; top: 12px; left: 13px; width: 15px; height: 15px; color: #8b9b7a; pointer-events: none; }
.history-search #history-search { min-height: 40px; padding-left: 37px; border-color: #dfe5d7; background: #fff; font-size: 11px; }
.history-meta { margin-bottom: 9px; }
.history-meta svg { width: 12px; height: 12px; margin-right: -7px; }
.history-prompt { margin: 0 0 11px; font-size: 13px; font-weight: 500; letter-spacing: -.1px; }
.history-models { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #617653; font-size: 10px; }
.history-models > span { color: #7c8d6e; font-family: Consolas, monospace; font-size: 9px; font-style: italic; }
.storage-note { display: flex; align-items: center; gap: 7px; margin: 19px 0 0; color: #697c5a; font-size: 10px; }
.storage-note svg { width: 13px; height: 13px; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.library-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 25px; }
.library-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 21px; border: 1px solid #e0e9d6; border-radius: 9px; background: #f1f7e9; color: #7b9a64; }
.library-icon svg { width: 18px; height: 18px; }
.library-card:nth-child(2) .library-icon { border-color: #e9dfcf; background: #faf5e9; color: #aa8c5b; }
.library-card:nth-child(3) .library-icon { border-color: #e3dff1; background: #f5f2fb; color: #a390bd; }
.library-card:nth-child(4) .library-icon { border-color: #d8e7eb; background: #eef6f7; color: #7e9fa4; }
.library-card .eyebrow { margin-bottom: 9px; font-size: 8px; }
.library-card h2 { margin-bottom: 8px; color: #445d37; font-size: 18px; font-weight: 550; line-height: 1.5; letter-spacing: -.55px; }
.library-card > p { margin-bottom: 0; color: #657b58; font-size: 11px; line-height: 1.8; }
.library-card blockquote { flex: 1; width: 100%; margin: 19px 0; padding: 14px 16px; border-left: 2px solid #cbdcba; border-radius: 0 6px 6px 0; background: #f9fbf5; color: #647d54; font-size: 11px; line-height: 1.8; }
.library-card .button { align-self: flex-start; }
.setting-card > .section-heading { margin-bottom: 14px; }
.setting-card > .section-heading .mode-badge { margin-left: auto; }
.setting-card .help-list { margin: 18px 0; }
.full-width { grid-column: 1 / -1; }
.storage-stat { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 21px 0; padding: 16px 18px; border: 1px solid #e1e9d6; border-radius: 8px; background: #f7faf2; }
.storage-stat strong { color: #557440; font-size: 31px; font-weight: 550; line-height: 1.3; letter-spacing: -1px; }
.storage-stat span { color: #657f50; font-size: 10px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0; }
.button.danger { border-color: #a35b52; background: #a35b52; color: #fff; }
.button.danger:hover { border-color: #8d4b43; background: #8d4b43; }
.connection-title { color: #516949; }
.connection-card a { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: #5d7b4b; font-size: 10px; font-weight: 500; }
.connection-card a svg { width: 12px; height: 12px; }
.connection-card a:hover { color: var(--green); }
.user-card small { display: block; margin-top: 2px; color: #68776d; font-size: 9px; }
.user-card .user-menu { margin-left: auto; font-size: 14px; }
.main-content > .page-footer { max-width: 1366px; margin: 0 42px 25px; padding-top: 17px; }
.footer-separator { margin: 0 6px; color: #a5b29a; }

/* Keep small labels readable on both white and the warm gray canvas. */
.nav-label, .breadcrumb, .page-subtitle, .eyebrow, .stat-label, .section-description,
.model-provider, .model-description, .selection-label, .prompt-label-row > span:last-child:not(:first-child),
.subtle-text, .field-label, .field small, .advanced-controls, .char-count, .keyboard-hint,
.composer-actions > p, .composer-actions > span, .results-toolbar p, .results-toolbar > span,
.result-model small, .result-status, .metric-label, .metric-value, .result-footer > span,
.empty-title, .empty-description, .history-meta, .page-footer, .setting-card p, .help-list,
.connection-card p, .nav-count, .tag, .modal-body { color: #63725e; }
.preset-button, .button.ghost, .icon-button { color: #65765f; }
.preset-button.active { color: #526f46; }
.notice { color: #7a6e46; }
.notice.error { color: #944e43; }
.notice.success { color: #52773d; }
.mode-badge { color: #7a7146; }
.mode-badge.live { color: #527543; }
.rating-button { color: #7a8c6c; }
.code-block { color: #597449; }
textarea#prompt::placeholder, input::placeholder { color: #718064; }
.result-content .notice { font-size: 11px; }
.result-content .subtle-text { font-size: 11px; }
.modal-body code, .setting-card p code, .help-list code { padding: 1px 4px; border-radius: 3px; background: #f2f6ec; color: #587341; font-size: .95em; }

@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes progress { from { transform: translateX(-110%); } to { transform: translateX(360%); } }
@keyframes toast-in { from { opacity: 0; margin-bottom: -6px; } to { opacity: 1; margin-bottom: 0; } }

@media (min-width: 1600px) {
  .page { padding-top: 43px; }
  .page-heading { margin-bottom: 33px; }
  .stats-grid { gap: 18px; margin-bottom: 31px; }
  .stat-card { min-height: 108px; padding: 21px 23px; }
  .model-option { min-height: 116px; padding-top: 20px; }
  textarea#prompt { min-height: 153px; }
}

@media (max-width: 1200px) {
  :root { --sidebar-width: 212px; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .topbar { padding: 0 28px; }
  .page { padding-left: 28px; padding-right: 28px; }
  .model-grid { gap: 9px; }
  .model-option { gap: 8px; padding-left: 12px; padding-right: 11px; }
  .model-description { font-size: 8px; }
  .model-logo { width: 25px; height: 25px; flex-basis: 25px; }
  .model-logo svg { width: 16px; height: 16px; }
  .check-indicator { right: 9px; }
  .toast { left: calc(50% + 106px); }
}

@media (max-width: 1000px) {
  :root { --sidebar-width: 196px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .brand { padding-left: 10px; gap: 9px; }
  .brand-name { font-size: 15px; }
  .brand-subtitle { font-size: 9px; }
  .brand-mark { width: 33px; height: 33px; flex-basis: 33px; }
  .nav-item { gap: 9px; font-size: 11px; padding-left: 11px; padding-right: 11px; }
  .topbar { min-height: 64px; padding: 0 24px; }
  .page { padding: 26px 24px 22px; }
  .page-heading { min-height: 101px; margin-bottom: 22px; }
  .hero-art { width: 95px; flex-basis: 95px; margin-right: 0; transform: scale(.8); transform-origin: center right; }
  h1 { font-size: 29px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 22px; }
  .stat-card { min-height: 86px; padding: 14px 17px; }
  .stat-value { font-size: 23px; }
  .stat-icon { top: 17px; }
  .section-header { padding: 18px 19px; }
  .model-grid { grid-template-columns: 1fr; gap: 8px; padding: 18px 19px; }
  .model-option { align-items: center; gap: 11px; min-height: 67px; padding: 12px 15px; }
  .model-details { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 0 10px; padding-right: 18px; }
  .model-name { grid-column: 1; }
  .model-provider { grid-column: 1; }
  .model-description { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-size: 9px; text-align: right; }
  .check-indicator { top: 26px; right: 13px; }
  .prompt-section { padding: 0 19px 18px; }
  .composer-actions { padding: 15px 19px; gap: 12px; }
  .advanced-controls { margin-left: 19px; margin-right: 19px; }
  .advanced-controls > div, .advanced-controls .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .result-content { padding: 15px; }
  .result-metrics { margin: 0 14px; gap: 5px; }
  .metric + .metric { padding-left: 5px; }
  .result-header { padding: 13px 14px; }
  .result-status { font-size: 8px; }
  .settings-grid { grid-template-columns: 1fr; }
  .page-footer { align-items: flex-start; font-size: 8px; }
  .toast { left: calc(50% + 98px); }
}

@media (max-width: 680px) {
  html { min-width: 360px; }
  .sidebar { width: 232px; padding: 26px 18px 20px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 12px 0 40px rgb(28 41 38 / 10%); }
  .sidebar.open, .sidebar.is-open, .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .brand-name { font-size: 17px; }
  .brand-subtitle { font-size: 10px; }
  .nav-item { font-size: 12px; }
  .main-content { margin-left: 0; }
  .mobile-toggle { display: inline-flex; }
  .topbar { gap: 10px; min-height: 60px; padding: 0 18px; }
  .breadcrumb { flex: 1; gap: 7px; font-size: 10px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .button { min-height: 30px; padding: 6px 9px; font-size: 9px; }
  .topbar-actions .icon-button { width: 28px; }
  .page { padding: 25px 18px 19px; }
  .page-heading { align-items: flex-start; min-height: auto; margin-bottom: 23px; gap: 12px; }
  .eyebrow { margin-bottom: 10px; font-size: 8px; }
  h1 { margin-bottom: 8px; font-size: 29px; letter-spacing: -1.2px; }
  .page-subtitle { max-width: 340px; font-size: 11px; }
  .hero-art { display: none; }
  .heading-actions { align-self: center; }
  .heading-actions .button { padding: 8px 10px; font-size: 9px; }
  .stats-grid { gap: 9px; margin-bottom: 21px; }
  .stat-card { min-height: 86px; padding: 15px; border-radius: 9px; }
  .stat-value { margin-bottom: 5px; font-size: 24px; }
  .stat-label { font-size: 7px; letter-spacing: .8px; }
  .stat-icon { right: 13px; top: 15px; width: 25px; height: 25px; }
  .workspace-card { border-radius: 11px; }
  .section-header { gap: 10px; padding: 17px; }
  .section-heading { font-size: 12px; }
  .section-description { font-size: 9px; }
  .mode-badge { padding: 4px 6px; font-size: 8px; }
  .model-grid { padding: 16px 17px 18px; }
  .model-option { min-height: 66px; padding: 11px 13px; }
  .model-details { grid-template-columns: 1fr auto; padding-right: 17px; }
  .model-description { max-width: 123px; font-size: 8px; }
  .model-name { font-size: 10px; }
  .model-provider { font-size: 8px; }
  .check-indicator { top: 25px; right: 11px; }
  .prompt-section { padding: 0 17px 17px; }
  .prompt-label-row { margin-bottom: 10px; }
  .prompt-label-row > label { font-size: 10px; }
  .preset-tabs { gap: 5px; margin-bottom: 11px; }
  .preset-button { padding: 5px 7px; font-size: 8px; }
  .preset-button svg { width: 11px; height: 11px; }
  textarea#prompt { min-height: 153px; padding: 13px; font-size: 11px; }
  .prompt-footer { gap: 8px; padding: 9px 11px; }
  .char-count, .keyboard-hint { font-size: 8px; }
  .keyboard-hint kbd { font-size: 8px; }
  .advanced-controls { margin: 0 17px 17px; }
  .advanced-controls > div, .advanced-controls .settings-grid { grid-template-columns: 1fr; padding: 13px; }
  .composer-actions { align-items: center; gap: 12px; padding: 14px 17px; }
  .composer-actions > p, .composer-actions > span { max-width: 130px; font-size: 9px; line-height: 1.7; }
  .run-button { min-width: 143px; }
  .run-button kbd { display: none; }
  .results-section { margin-top: 25px; }
  .results-toolbar { align-items: flex-start; gap: 10px; }
  .results-toolbar > div { gap: 6px; }
  .results-toolbar > div:first-child { flex-wrap: wrap; }
  .results-toolbar > div:last-child { flex-shrink: 0; }
  .results-toolbar .button { padding: 6px 8px; font-size: 9px; }
  .results-toolbar > span, .results-toolbar p { font-size: 9px; }
  .results-grid { grid-template-columns: 1fr; }
  .result-header { padding: 15px 17px; }
  .result-content { min-height: 160px; padding: 18px; font-size: 12px; }
  .result-metrics { margin: 0 17px; padding: 14px 0; gap: 10px; }
  .metric + .metric { padding-left: 12px; }
  .metric-label { font-size: 8px; }
  .metric-value { font-size: 11px; }
  .result-status { font-size: 9px; }
  .empty-state { min-height: 192px; padding: 26px 22px; }
  .empty-description { max-width: 260px; }
  .history-item { flex-direction: column; gap: 12px; padding: 18px; }
  .history-actions { align-self: flex-end; }
  .history-prompt { font-size: 11px; }
  .page-footer { flex-direction: column; align-items: center; gap: 8px; margin-top: 24px; text-align: center; }
  .page-footer > div, .page-footer > span { justify-content: center; }
  .toast { left: 50%; bottom: 18px; padding: 12px 16px; font-size: 11px; }
  .modal-backdrop { padding: 18px; }
  .modal { max-height: calc(100dvh - 36px); border-radius: 12px; }
  .modal-header { padding: 18px 20px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 14px 20px; }
  .setting-card { padding: 20px; }
  .workspace-card > .notice { margin: 0 17px 17px; }
}

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

/* Final type scale and the responsive layouts used by the rendered templates. */
.brand-subtitle { font-size: 9px; letter-spacing: .8px; }
.nav-label, .eyebrow { font-size: 10px; }
.nav-item { min-height: 44px; font-size: 12px; }
.breadcrumb, .local-indicator { font-size: 11px; }
.connection-card, .connection-card > div:first-child { font-size: 12px; }
.connection-card p, .connection-card a { font-size: 11px; }
.user-card strong, .user-card small { font-size: 11px; }
.user-card .user-menu { color: #63725e; }
.page-subtitle { font-size: 14px; }
.stat-card { min-height: 117px; }
.stat-note { font-size: 11px; }
.favorite-value { font-size: 20px; }
.favorite-value .stat-note { font-size: 10px; }
.stat-label { font-size: 10px; letter-spacing: .7px; }
.section-heading, .results-toolbar .section-heading { font-size: 14px; }
.section-description, .selection-label span, .subtle-text { font-size: 12px; }
.field-label, .prompt-label-row > label, .prompt-label-row > span:last-child:not(:first-child) { font-size: 11px; }
.mode-badge { font-size: 10px; }
.model-name { font-size: 13px; }
.model-provider, .model-option > .model-description { font-size: 11px; }
.model-option { min-height: 116px; }
.model-option > .model-description { margin-top: 13px; }
.preset-button { min-height: 31px; padding: 6px 10px; font-size: 11px; }
textarea#prompt { min-height: 147px; font-size: 14px; line-height: 1.85; }
.char-count, .keyboard-hint, kbd { font-size: 10px; }
.advanced-controls summary { font-size: 11px; }
.advanced-controls summary > span, .field small { font-size: 10px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, .field textarea { font-size: 12px; }
.composer-actions > p, .composer-actions > span { font-size: 11px; }
.button { font-size: 12px; }
.button.small { font-size: 11px; }
.run-button { min-height: 40px; }
.results-subtitle, .results-context, .demo-notice { font-size: 11px; }
.results-section { scroll-margin-top: 20px; }
.result-model strong { font-size: 12px; }
.result-model small, .result-status { font-size: 10px; }
.result-content { min-height: 210px; font-size: 14px; line-height: 1.85; }
.result-content h1, .result-content h2, .result-content h3 { font-size: 15px; }
.result-content pre { font-size: 12px; }
.metric-label { font-size: 9px; letter-spacing: 0; }
.metric-value { font-size: 12px; }
.result-footer { gap: 5px; }
.result-footer .rating-button { width: 27px; height: 30px; }
.result-footer .winner-button { font-size: 10px; }
.result-footer .winner-button svg { width: 13px; }
.empty-title { font-size: 14px; }
.empty-description { max-width: 420px; font-size: 12px; }
.empty-footnote { font-size: 9px; letter-spacing: .65px; }
.history-search #history-search { min-height: 44px; font-size: 12px; }
.history-search svg { top: 14px; }
.history-prompt { font-size: 14px; }
.history-meta, .history-models, .storage-note, .tag { font-size: 11px; }
.history-models > span { font-size: 10px; }
.library-card .eyebrow { font-size: 10px; }
.library-card > p { font-size: 13px; }
.library-card blockquote { font-size: 13px; }
.setting-card p, .help-list, .modal-body { font-size: 13px; }
.storage-stat span { font-size: 12px; }
.code-block { font-size: 12px; }
.main-content > .page-footer { width: calc(100% - 84px); margin: 0 auto 25px; font-size: 10px; line-height: 1.7; }
.result-status.failed { color: #994a43; }
.notice.error { color: #944e43; }

@media (max-width: 1200px) {
  .main-content > .page-footer { width: calc(100% - 56px); }
  .model-option { grid-template-columns: 25px minmax(0, 1fr) 12px; }
  .page-heading { flex-wrap: wrap; gap: 17px; }
  .page-heading > div:first-child { flex: 1 1 390px; }
  .heading-actions { margin-bottom: 3px; }
  .results-toolbar { flex-wrap: wrap; }
  .stat-note { display: block; }
}

@media (max-width: 1000px) {
  .main-content > .page-footer { width: calc(100% - 48px); }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-card { min-height: 137px; padding: 15px; }
  .stat-value { align-items: flex-start; flex-direction: column; gap: 4px; padding-right: 14px; }
  .stat-icon { width: 23px; height: 23px; top: 16px; right: 12px; }
  .stat-icon svg { width: 12px; height: 12px; }
  .stat-note { font-size: 10px; line-height: 1.6; }
  .stat-label { font-size: 9px; letter-spacing: .25px; }
  .favorite-value { font-size: 17px; }
  .model-selection { padding: 18px 19px; }
  .model-option { grid-template-columns: 29px minmax(0, 1fr) 15px; gap: 0 11px; min-height: 84px; padding: 14px 15px; }
  .model-option > .model-logo { grid-row: 1 / span 2; align-self: start; width: 29px; height: 29px; }
  .model-option > .model-description { grid-column: 2; grid-row: 2; margin: 7px 0 0; }
  .model-option > .check-indicator { top: 24px; right: 15px; }
  .prompt-section .composer-actions { margin: 17px -19px -18px; }
  .composer-actions { flex-wrap: wrap; }
  .composer-actions > p { flex: 1 1 190px; }
  .composer-actions > .run-button { margin-left: auto; }
  .result-footer .winner-button { margin-left: auto; }
  .result-metrics { gap: 7px; }
  .metric-label { white-space: normal; min-height: 27px; align-items: flex-start; }
  .metric-label svg { margin-top: 1px; }
  .library-grid { gap: 14px; }
  .library-card { padding: 21px; }
  .library-card h2 { font-size: 17px; }
}

@media (max-width: 680px) {
  .topbar { position: relative; z-index: 31; min-height: 65px; padding: 0 12px; background: #fdfefd; }
  .topbar-left { gap: 4px; }
  .topbar-actions { gap: 0; }
  .topbar-actions .local-indicator { display: none; }
  .topbar-actions .button { min-height: 44px; padding: 9px 10px; font-size: 11px; }
  .icon-button { width: 44px; height: 44px; }
  .sidebar { padding-top: 87px; }
  .sidebar .brand { margin-bottom: 28px; }
  .sidebar .brand-name { font-size: 17px; }
  .sidebar .brand-subtitle { font-size: 9px; }
  .sidebar .nav-item { min-height: 47px; font-size: 13px; }
  .sidebar .sidebar-bottom { padding-top: 24px; }
  .sidebar .connection-card p { font-size: 11px; }
  .sidebar .user-card { padding-top: 17px; }
  .breadcrumb { font-size: 11px; }
  .page { padding-top: 27px; }
  .page-heading { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .page-heading > div:first-child { flex: none; }
  .page-heading > .button { align-self: flex-start; }
  .page-heading .heading-actions { min-height: 40px; margin: 0; padding: 9px 12px; font-size: 11px; }
  h1 { max-width: 100%; font-size: 30px; line-height: 1.23; }
  .page-subtitle { max-width: 460px; font-size: 13px; }
  .eyebrow { font-size: 10px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { min-height: 130px; padding: 16px; }
  .stat-card:last-child { grid-column: 1 / -1; min-height: 111px; }
  .stat-value { gap: 5px; font-size: 25px; }
  .favorite-value { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 9px; padding-top: 1px; margin-bottom: 10px; font-size: 21px; }
  .stat-note, .favorite-value .stat-note { font-size: 11px; }
  .stat-label { font-size: 10px; letter-spacing: .4px; }
  .stat-icon { top: 17px; right: 16px; width: 26px; height: 26px; }
  .section-header { align-items: flex-start; padding: 17px; }
  .section-heading, .results-toolbar .section-heading { font-size: 13px; }
  .section-heading { gap: 7px; }
  .section-description { font-size: 11px; }
  .mode-badge { padding: 4px 5px; font-size: 9px; }
  .mode-badge .status-dot { display: none; }
  .model-selection { padding: 17px; }
  .selection-label span { font-size: 11px; }
  .model-option { min-height: 87px; padding: 15px 13px; }
  .model-option > .model-name, .model-name { font-size: 13px; }
  .model-provider, .model-option > .model-description { font-size: 11px; }
  .model-option > .check-indicator { top: 23px; right: 13px; width: 15px; height: 15px; }
  .prompt-label-row { align-items: flex-start; flex-wrap: wrap; gap: 4px 12px; }
  .field-label, .prompt-label-row > label, .prompt-label-row > span:last-child:not(:first-child) { font-size: 11px; }
  .preset-tabs { gap: 6px; }
  .preset-button { justify-content: center; flex: 1 1 calc(50% - 6px); min-height: 40px; padding: 8px 9px; font-size: 11px; }
  .preset-button svg { width: 13px; height: 13px; }
  textarea#prompt { min-height: 173px; padding: 13px; font-size: 16px; line-height: 1.65; }
  .char-count, .keyboard-hint, .keyboard-hint kbd { font-size: 10px; }
  .advanced-controls summary { min-height: 36px; flex-wrap: wrap; gap: 7px; font-size: 11px; }
  .advanced-controls summary > span, .field small { font-size: 11px; }
  .advanced-controls > .advanced-fields { grid-template-columns: 1fr; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, .field textarea { min-height: 44px; font-size: 16px; }
  .prompt-section .composer-actions { flex-direction: column; align-items: stretch; gap: 12px; margin: 15px -17px -17px; padding: 15px 17px; }
  .composer-actions > p, .composer-actions > span { flex: none; max-width: none; font-size: 11px; }
  .composer-actions > .run-button { justify-content: center; width: 100%; min-height: 44px; margin: 0; font-size: 13px; }
  .button-count { width: 20px; height: 20px; font-size: 10px; }
  .results-toolbar { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .results-toolbar > .section-heading { flex: 1 1 100%; gap: 7px; }
  .results-subtitle { display: block; width: 100%; margin-left: 26px; font-size: 11px; }
  .results-actions { width: 100%; justify-content: flex-end; }
  .results-actions:empty { display: none; }
  .results-toolbar .button { min-height: 40px; padding: 8px 11px; font-size: 11px; }
  .results-context, .demo-notice { font-size: 11px; }
  .result-model strong { font-size: 13px; }
  .result-model small, .result-status { font-size: 11px; }
  .result-content { padding: 18px; font-size: 14px; }
  .result-content pre { font-size: 12px; }
  .metric-label { align-items: center; min-height: auto; font-size: 9px; }
  .metric-value { font-size: 13px; }
  .result-footer { justify-content: space-between; flex-wrap: wrap; gap: 8px 4px; padding: 10px 12px; }
  .result-footer .rating-buttons { margin-right: 0; }
  .result-footer .rating-button { width: 34px; height: 40px; padding: 9px; }
  .result-footer .rating-button svg { width: 16px; height: 16px; }
  .result-footer .icon-button { width: 40px; height: 40px; }
  .result-footer .winner-button { justify-content: center; flex: 1 1 100%; min-height: 40px; margin-left: 0; border: 1px solid #e1e9d8; font-size: 11px; }
  .results-empty { min-height: 239px; padding-left: 16px; padding-right: 16px; }
  .empty-title { font-size: 14px; }
  .empty-description { max-width: 360px; font-size: 12px; }
  .empty-description br { display: none; }
  .empty-footnote { font-size: 8px; letter-spacing: .35px; }
  .history-prompt { font-size: 14px; }
  .history-actions .button { min-height: 42px; font-size: 11px; }
  .history-meta, .history-models, .storage-note { font-size: 11px; }
  .history-search { max-width: none; }
  .history-search #history-search { font-size: 16px; }
  .storage-note { align-items: flex-start; line-height: 1.7; }
  .storage-note svg { margin-top: 3px; }
  .library-grid { grid-template-columns: 1fr; gap: 16px; }
  .library-card { padding: 22px; }
  .library-card h2 { font-size: 20px; }
  .library-card > p, .library-card blockquote { font-size: 14px; }
  .library-card .button { min-height: 44px; font-size: 12px; }
  .setting-card p, .help-list, .modal-body { font-size: 14px; }
  .setting-card .button, .modal-footer .button { min-height: 44px; font-size: 12px; }
  .modal-header h2 { font-size: 16px; }
  .modal-header { padding: 12px 15px 12px 20px; }
  .main-content > .page-footer { width: calc(100% - 36px); margin-bottom: 20px; font-size: 10px; }
}

/* Model catalog and individual provider connections. */
.model-selection .model-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.model-option { grid-template-columns: 29px minmax(0, 1fr) 12px; grid-template-rows: auto 1fr auto; align-content: stretch; gap: 0 10px; min-height: 142px; padding: 15px 14px 11px; }
.model-option > .model-logo { grid-column: 1; grid-row: 1; width: 29px; height: 29px; align-self: center; }
.model-option > .model-details { grid-column: 2; grid-row: 1; }
.model-option > .model-description { grid-column: 1 / -1; grid-row: 2; align-self: start; margin: 10px 0 0; line-height: 1.55; }
.model-option > .check-indicator { top: 22px; right: 14px; }
.model-option > .model-connection { grid-column: 1 / -1; grid-row: 3; }
.model-connection { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; min-width: 0; width: 100%; margin-top: 11px; padding-top: 8px; border-top: 1px solid #e7ecdf; color: #64755a; font-size: 10px; font-weight: 400; line-height: 1.6; }
.model-connection > :first-child { min-width: 0; overflow-wrap: anywhere; }
.model-connection > :last-child { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: #466b38; font-weight: 550; white-space: nowrap; }
.model-connection svg { width: 11px; height: 11px; }
.selected .model-connection { border-top-color: #dce8d2; }
.model-option.setup-needed { border-color: #e5e2d7; background: #fdfdf9; opacity: 1; cursor: pointer; }
.model-option.setup-needed:hover { border-color: #b7c9a9; background: #f8fbf3; }
.model-option.setup-needed .check-indicator { border-color: #d8d7c9; background: #fafaf3; color: #7d8262; }
.model-option.setup-needed .model-connection { border-top-color: #eae8dc; }
.model-option.setup-needed .model-connection > :last-child { color: #826539; }
.model-option.setup-needed:disabled { opacity: .66; cursor: not-allowed; }
.model-logo.llama { border-color: #dce5ee; background: #eff5fa; color: #527c9a; }
.model-logo.openai { border-color: #dbe6dc; background: #edf5ed; color: #4e7551; }
.model-logo.gemini { border-color: #e3def0; background: #f4f1fb; color: #8c72b1; }
.public-demo .advanced-controls { display: none; }
.public-demo-intro { display: block; margin-bottom: 20px; padding: 12px 15px; font-size: 12px; line-height: 1.8; }
.demo-notice a, .modal-body .help-list a { color: var(--green); text-decoration: underline; text-decoration-color: #a9c69b; text-underline-offset: 3px; }
.demo-notice a:hover, .modal-body .help-list a:hover { text-decoration-color: currentColor; }
.demo-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 17px; }
.demo-links .button { margin-top: 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 30px; color: #516f45; text-underline-offset: 3px; }
.footer-links a:hover { text-decoration: underline; }
.public-demo .connection-card > a { display: flex; width: fit-content; }
.model-parameter-note { margin: 0 17px 13px; padding: 8px 10px; border: 1px solid #e3e9da; border-radius: 6px; background: #fafcf6; color: #63765a; font-size: 11px; line-height: 1.7; }
.result-content .model-parameter-note { margin: 14px 0 0; }
.provider-grid { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; min-width: 0; }
.setting-card > .provider-grid { margin-top: 19px; }
.provider-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.setting-card .provider-card { padding: 18px; background: #fcfdf9; box-shadow: none; }
.provider-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.provider-heading h2, .provider-heading h3, .provider-heading h4 { display: flex; align-items: center; gap: 8px; margin: 0; color: #405638; font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: -.2px; }
.provider-heading > strong { color: #405638; font-size: 14px; font-weight: 600; }
.provider-heading svg { width: 17px; height: 17px; }
.provider-status { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 3px 7px; border: 1px solid #e4e2d5; border-radius: 5px; background: #faf9f1; color: #786641; font-size: 10px; font-weight: 500; line-height: 1.6; white-space: nowrap; }
.provider-status::before { content: ""; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: currentColor; opacity: .8; }
.provider-status.connected { border-color: #d7e5cd; background: #f0f7e9; color: #50713d; }
.provider-status.missing { border-color: #e8dfcc; background: #faf5e9; color: #866739; }
.provider-card p { margin: 0 0 13px; color: #64755a; font-size: 12px; line-height: 1.8; }
.provider-card code { display: inline-block; max-width: 100%; padding: 2px 5px; border: 1px solid #e6ebdf; border-radius: 4px; background: #f6f9f0; color: #567346; font-family: Consolas, "Liberation Mono", monospace; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.provider-card > code { align-self: flex-start; margin: 0 0 16px; }
.provider-card > .code-block { width: 100%; }
.provider-card .code-block code { border: 0; padding: 0; background: transparent; }
.provider-card > .button { align-self: flex-start; min-height: 36px; margin-top: auto; font-size: 11px; }

@media (max-width: 1100px) {
  .model-selection .model-grid, .provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-option { min-height: 142px; }
  .model-option > .model-logo { grid-row: 1; }
  .model-option > .model-description { grid-column: 1 / -1; grid-row: 2; margin-top: 10px; }
  .provider-card { padding: 19px; }
}

@media (max-width: 680px) {
  .model-selection .model-grid, .provider-grid { grid-template-columns: 1fr; gap: 10px; }
  .model-option { grid-template-columns: 29px minmax(0, 1fr) 15px; min-height: 129px; padding: 14px 13px 10px; }
  .model-option > .model-logo { align-self: start; }
  .model-option > .model-description { grid-column: 2; margin-top: 7px; font-size: 11px; }
  .model-option > .check-indicator { top: 22px; right: 13px; }
  .model-connection { margin-top: 10px; padding-top: 8px; font-size: 11px; }
  .model-parameter-note { font-size: 11px; }
  .provider-card, .setting-card .provider-card { padding: 20px; }
  .provider-heading h2, .provider-heading h3, .provider-heading h4, .provider-heading > strong { font-size: 15px; }
  .provider-card p { font-size: 14px; }
  .provider-card code { font-size: 12px; }
  .provider-status { font-size: 11px; }
  .provider-card > .button { min-height: 44px; font-size: 12px; }
  .public-demo-intro { font-size: 12px; }
  .footer-links a { min-height: 40px; }
}
