:root {
  color-scheme: light;
  --paper: #f5f6f3;
  --ink: #1b2b28;
  --muted: #5d6863;
  --line: #dce1db;
  --accent: #bd4926;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
[hidden] { display: none !important; }
button, select, textarea, input { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #237e71; outline-offset: 3px;
}
.wrap { width: min(1176px, calc(100% - 88px)); margin-inline: auto; }
.icon { display: block; flex: none; width: 18px; height: 18px; }
.skip { position: absolute; transform: translateY(-160%); z-index: 4; left: 20px; top: 8px; padding: 10px 18px; background: white; }
.skip:focus { transform: none; }
.topbar { background: #fff; }
.top-inner { height: 68px; display: flex; align-items: stretch; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; white-space: nowrap; }
.brand img { width: 32px; height: 32px; }
.brand b { font-size: 1.24rem; letter-spacing: -.055em; font-weight: 750; }
.brand-rule { display: block; width: 1px; height: 21px; margin: 0 5px; background: #d6dcd7; }
.product { color: #53605a; font-size: .99rem; font-weight: 500; letter-spacing: -.025em; }
nav { display: flex; gap: 24px; }
nav a { display: inline-flex; align-items: center; gap: 8px; position: relative; text-decoration: none; color: var(--muted); font-size: .92rem; font-weight: 600; }
nav a:hover, nav a[aria-current] { color: var(--ink); }
nav a[aria-current]::after { content: ""; height: 3px; position: absolute; bottom: 0; inset-inline: 0; background: #e85a28; }
.mast { position: relative; overflow: hidden; background: #172725; color: #f8faf5; }
.mast-inner { min-height: 169px; display: flex; align-items: center; position: relative; }
.mast-copy { padding: 28px 0 31px; position: relative; z-index: 1; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.4rem, 4.65vw, 4rem); line-height: 1.04; letter-spacing: -.067em; font-weight: 580; }
.mast p { max-width: 580px; color: #c0cfc7; margin-top: 13px; font-size: 1.03rem; line-height: 1.5; letter-spacing: -.015em; }
.signal { position: absolute; top: 0; bottom: 0; right: -42px; width: 43%; pointer-events: none; }
.signal canvas { width: 100%; height: 100%; display: block; }
.work, .history-view { padding-block: 27px 32px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 6px #20352a04; }
.composer { padding: 17px 22px 18px; }
.composer-head, .composer-foot, .result-head, .model-head, .model-foot { display: flex; align-items: center; }
.composer-head, .composer-foot, .result-head, .model-foot { justify-content: space-between; gap: 14px; }
.composer-head { margin-bottom: 12px; }
.section-title { display: flex; align-items: center; gap: 9px; }
.prompt-icon { width: 22px; height: 22px; color: #5b6860; }
h2 { font-size: 1.3rem; line-height: 1.25; font-weight: 650; letter-spacing: -.045em; }
.quiet, .secondary, .examples button, .primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; line-height: 1.2; text-decoration: none; }
.quiet { border: 0; border-radius: 6px; background: transparent; color: var(--muted); min-height: 32px; padding: 5px 7px; font-size: .86rem; }
.quiet:hover, .quiet[aria-expanded=true] { background: #eff3ee; color: var(--ink); }
.quiet:disabled { opacity: .48; background: transparent; }
.settings { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 10px 12px; margin-bottom: 12px; background: #f2f5f0; border-radius: 7px; }
.settings label { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: #394940; }
.settings select { appearance: none; color: var(--ink); border: 1px solid #bfc9bf; border-radius: 5px; padding: 5px 26px 5px 8px; background: #fff url("/static/chevron.svg") no-repeat right 6px center / 14px; }
.thinking input { accent-color: #256c5a; width: 16px; height: 16px; }
.input-wrap { background: #fafbf8; border: 1px solid #cfd7ce; border-radius: 8px; display: grid; overflow: hidden; }
.input-wrap:focus-within { border-color: #7d9887; box-shadow: 0 0 0 3px #4e806219; }
textarea { display: block; border: 0; background: transparent; color: var(--ink); padding: 13px 15px 0; width: 100%; min-height: 75px; resize: vertical; font-size: 1.02rem; line-height: 1.48; letter-spacing: -.012em; }
textarea:focus-visible { outline: none; }
textarea::placeholder { color: #738078; opacity: 1; }
.counter { justify-self: end; padding: 2px 12px 8px; font: .72rem/1.3 var(--mono); color: #67736a; font-variant-numeric: tabular-nums; }
.composer-foot { margin-top: 13px; }
.examples { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.try { margin-right: 3px; color: var(--muted); font-size: .84rem; }
.examples button, .secondary { border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #46564b; padding: 6px 9px; font-size: .84rem; }
.examples button { font-weight: 520; }
.examples .icon { width: 15px; height: 15px; }
.examples button:hover, .secondary:hover { background: #f1f5ee; border-color: #bac8b8; }
.primary { position: relative; flex: none; min-height: 40px; padding: 0 14px; border: 1px solid #ae4120; border-radius: 7px; color: #fff; background: #b94724; font-size: .93rem; }
.primary:hover { background: #9e391a; }
.primary .icon { width: 15px; height: 15px; }
.primary:disabled { opacity: .7; }
kbd { font: .73rem var(--mono); color: #ffece6; border-left: 1px solid #ffffff50; padding-left: 8px; margin-left: 3px; white-space: nowrap; }
.notice, .model-error { font-size: .9rem; line-height: 1.45; color: #993d23; }
.notice { margin-top: 12px; }
.result-section { margin-top: 26px; }
.result-head { margin-bottom: 13px; }
.response-caption { color: var(--muted); font-size: .84rem; }
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.response { --model-color: #a94927; --model-wash: #f9eae1; --model-line: #da764c; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.response[data-slot=liquid] { --model-color: #226e64; --model-wash: #e0efea; --model-line: #4a9b88; }
.response::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--model-line); }
.model-head { gap: 12px; padding: 19px 19px 16px; border-bottom: 1px solid #edf0ea; }
.model-icon { display: grid; place-items: center; width: 41px; height: 41px; flex: none; border-radius: 10px; background: var(--model-wash); color: var(--model-color); }
.model-icon svg { width: 25px; height: 25px; }
.model-id { min-width: 0; }
.publisher { display: block; margin-bottom: 4px; font: 600 .68rem/1.1 var(--mono); letter-spacing: .075em; text-transform: uppercase; color: var(--model-color); }
h3 { font-weight: 650; letter-spacing: -.048em; font-size: clamp(1.13rem, 2.2vw, 1.43rem); line-height: 1.12; }
.badge { display: inline-flex; align-items: center; gap: 5px; flex: none; margin-left: auto; background: #f1f3f0; color: #58665c; border-radius: 20px; padding: 4px 8px; font-size: .74rem; font-weight: 600; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
[data-status=complete] .badge { background: #e3f1e7; color: #266541; }
[data-status=streaming] .badge, [data-status=queued] .badge { background: #eef4ed; color: #427350; }
[data-status=error] .badge, [data-status=limited] .badge { color: #974324; background: #f9eade; }
.output-area { flex: 1; padding: 18px 20px 20px; min-height: 107px; }
.waiting { display: flex; align-items: center; gap: 9px; font-size: .93rem; color: #6b776d; }
.waiting-mark { width: 8px; height: 14px; border: 1px solid #95a397; border-radius: 2px; }
[data-status=queued] .waiting-mark, [data-status=streaming] .waiting-mark { background: var(--model-line); border-color: var(--model-line); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; font-size: 1rem; line-height: 1.6; }
.model-error:not(:first-child) { margin-top: 8px; }
.model-foot { min-height: 41px; padding: 4px 12px 4px 19px; border-top: 1px solid #e8ede7; background: #fcfdfb; }
.metrics { font: .73rem/1.45 var(--mono); color: #54645a; }
.copy { font-size: .8rem; }
.copy .icon { width: 15px; height: 15px; }
.site-footer { margin-top: auto; padding-block: 15px 21px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.divider { padding: 0 4px; color: #9da69f; }
.history-panel { overflow: hidden; }
.history-view .secondary { min-height: 36px; }
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 21px; text-decoration: none; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-row:hover { background: #f5f8f2; }
.history-prompt { font-size: .99rem; font-weight: 580; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-time, .history-state { display: block; color: var(--muted); font-size: .8rem; margin-top: 3px; }
.history-state { text-align: right; }
.history-empty { padding: 48px 24px; text-align: center; }
.history-empty strong { display: block; margin-bottom: 6px; }
.history-empty p { color: var(--muted); font-size: .94rem; }
.history-empty .icon { width: 27px; height: 27px; color: #6d8073; margin: 0 auto 12px; }
@media (min-width: 1500px) { .mast-inner { min-height: 193px; } .work { padding-top: 34px; } }
@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .mast-copy { max-width: 65%; }
  .signal { right: -26px; width: 39%; }
  .model-head { gap: 9px; padding-inline: 15px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .top-inner { height: 60px; gap: 8px; }
  nav { gap: 15px; }
  nav a { gap: 5px; font-size: .84rem; }
  .brand { gap: 7px; }
  .brand img { width: 28px; height: 28px; }
  .brand b { font-size: 1.08rem; }
  .brand-rule, .product { display: none; }
  .mast-inner { min-height: 148px; }
  .mast-copy { max-width: 84%; padding-block: 22px; }
  .mast p { font-size: .94rem; max-width: 330px; }
  .signal { right: -90px; width: 45%; opacity: .46; mask-image: linear-gradient(90deg, transparent, #000 50%); }
  .work, .history-view { padding-block: 18px 26px; }
  .composer { padding: 13px 14px 14px; }
  .composer-foot { flex-wrap: wrap; gap: 13px; }
  .results { grid-template-columns: 1fr; gap: 13px; }
  .model-head { padding: 16px; }
  .output-area { min-height: 80px; padding: 14px 16px; }
  .model-foot { padding-left: 15px; }
  .result-section { margin-top: 22px; }
  .settings { align-items: flex-start; gap: 10px 16px; }
  .history-row { padding-inline: 13px; }
}
@media (max-width: 500px) {
  .primary { width: 100%; min-height: 42px; }
  .primary kbd { display: none; }
  .examples { gap: 5px; }
  .examples button { padding: 6px 8px; }
  .try { display: none; }
  .mast-copy { max-width: 92%; }
  .site-footer { padding-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; } }
