:root {
  color-scheme: light;
  --page: #f7f6f2;
  --card: #fff;
  --ink: #2c302d;
  --muted: #7a7d75;
  --line: #e8e7df;
  --accent: #c65031;
  --accent-dark: #a63d23;
  --accent-pale: #fcf1eb;
  --green: #55715c;
  --radius: 16px;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

button,input,textarea {
  font: inherit;
}

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

button {
  cursor: pointer;
}

button {
  color: inherit;
}

button:disabled {
  cursor: wait;
  opacity: .55;
}

a {
  color: inherit;
}

button:focus-visible,a:focus-visible,textarea:focus-visible,[tabindex]:focus-visible {
  outline: 3px solid #d6a58d;
  outline-offset: 4px;
}

button {
  border: 0;
}

button svg {
  flex-shrink: 0;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none!important;
}

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

.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.site-shell {
  max-width: 1392px;
  margin: auto;
  padding: 0 48px;
}

.site-header {
  height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}

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

.brand-name {
  font-size: 25px;
  letter-spacing: 3px;
  font-weight: 750;
}

.brand-caption {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--muted);
  border-left: 1px solid #d7d8ce;
  margin-left: 4px;
  padding-left: 18px;
  line-height: 1.4;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 27px;
}

.service-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b4b7ae;
}

.service-status.connected .status-dot {
  background: #6c8a70;
  box-shadow: 0 0 0 3px #eaf0e9;
}

.service-status.unavailable .status-dot {
  background: var(--accent);
}

.text-button {
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 0;
  font-size: 12px;
  color: #666b63;
}

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

.text-button .icon {
  width: 16px;
  height: 16px;
}

.intro {
  padding: 44px 0 34px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 25px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow>span {
  height: 5px;
  width: 5px;
  background: var(--accent);
  border-radius: 50%;
}

h1 {
  font-size: 40px;
  line-height: 1.4;
  letter-spacing: -1.2px;
  font-weight: 700;
  margin: 10px 0 12px;
}

h1>span {
  color: var(--accent);
}

.intro-description {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .2px;
}

.process {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 7px;
  color: #83867d;
  font-size: 12px;
}

.process>span {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
}

.process>span>.icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.4;
}

.process .process-arrow {
  width: 16px;
  color: #c4c5bb;
  margin-bottom: 27px;
}

.workspace {
  display: grid;
  grid-template-columns: 365px minmax(0,1fr);
  gap: 24px;
  align-items: stretch;
}

.question-card,.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 3px 6px #24292202;
}

.question-card {
  padding: 25px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.section-number {
  font-family: ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size: 11px;
  color: #999d91;
}

.section-heading h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .3px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin: 25px 0 10px;
  border: 0;
  border-radius: 9px;
  background: #f3f4ef;
  gap: 3px;
  min-width: 0;
}

.mode-switch label {
  position: relative;
}

.mode-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.mode-switch label>span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 6px;
  height: 39px;
  font-size: 13px;
  cursor: pointer;
  color: #797e73;
  border: 1px solid transparent;
}

.mode-switch input:checked+span {
  background: white;
  color: var(--accent);
  box-shadow: 0 2px 4px #31352908;
  border-color: #ecebe5;
  font-weight: 600;
}

.mode-switch input:focus-visible+span {
  outline: 3px solid #d6a58d;
  outline-offset: 2px;
}

.mode-switch:disabled label>span {
  cursor: wait;
  opacity: .55;
}

.mode-switch .icon {
  width: 17px;
  height: 17px;
}

.mode-description {
  font-size: 11px;
  color: var(--muted);
  min-height: 37px;
}

.query-label {
  display: block;
  margin: 10px 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.textarea-wrap {
  border: 1px solid #dfE1d7;
  border-radius: 10px;
  background: #fdfdfa;
  transition: border-color .2s,box-shadow .2s;
}

.textarea-wrap:focus-within {
  border-color: #cf8d71;
  box-shadow: 0 0 0 3px #fcf1eb;
}

textarea {
  display: block;
  width: 100%;
  min-height: 165px;
  max-height: 400px;
  padding: 14px 15px 8px;
  border: 0;
  background: transparent;
  resize: vertical;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink);
  outline: none!important;
}

textarea::placeholder {
  color: #a0a398;
}

textarea:disabled {
  opacity: .7;
}

.textarea-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 13px 10px;
  font-size: 10px;
  color: #92968a;
}

.textarea-meta>span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.textarea-meta .over-limit {
  color: #b63e2c;
}

.primary-button {
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 17px;
  transition: background .18s,transform .18s;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-button .icon {
  width: 19px;
}

.submit-hint {
  margin: 10px 1px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8d9186;
  font-size: 10px;
}

kbd {
  font: 10px ui-monospace,monospace;
  color: #a0a497;
  letter-spacing: 1px;
}

.examples {
  border-top: 1px solid var(--line);
  padding-top: 19px;
}

.small-heading {
  font-size: 11px;
  color: #8c9085;
  margin-bottom: 12px;
}

.example-button {
  display: grid;
  grid-template-columns: 1fr 16px;
  gap: 2px 8px;
  background: transparent;
  padding: 10px 0 9px;
  text-align: left;
  width: 100%;
  font-size: 12px;
  line-height: 1.6;
  color: #646a5f;
}

.example-category {
  grid-column: 1;
  font-size: 9px;
  letter-spacing: 1px;
  color: #9b9d93;
}

.example-button>span:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.example-button>.icon {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  color: #b8bbaf;
  width: 13px;
  height: 13px;
}

.example-button:hover:not(:disabled) {
  color: var(--accent);
}

.example-button:hover:not(:disabled) .icon {
  color: var(--accent);
}

.local-note {
  font-size: 11px;
  color: #8b8f82;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px 0;
}

.local-note .icon {
  width: 13px;
  height: 13px;
}

.result-card {
  display: flex;
  flex-direction: column;
  min-height: 690px;
  overflow: hidden;
  min-width: 0;
}

.result-header {
  min-height: 75px;
  border-bottom: 1px solid var(--line);
  padding: 18px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-placeholder {
  font-size: 11px;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  background: transparent;
  color: #8a8f82;
  border-radius: 6px;
}

.icon-button:hover {
  background: #f5f5ef;
  color: var(--accent);
}

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

.action-divider {
  height: 15px;
  width: 1px;
  background: var(--line);
  margin: 0 7px;
}

.empty-state {
  flex: 1;
  min-height: 610px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 35px 25px 60px;
}

.empty-art {
  width: 244px;
  height: auto;
  margin-bottom: 15px;
}

.empty-eyebrow {
  font-family: ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: #aaa994;
}

.empty-state h3 {
  font-weight: 550;
  font-size: 24px;
  line-height: 1.7;
  letter-spacing: 1px;
  margin: 13px 0 14px;
}

.empty-state>p {
  font-size: 12px;
  line-height: 1.9;
  color: #929789;
}

.empty-features {
  display: flex;
  gap: 24px;
  margin-top: 33px;
  color: #8e9386;
  font-size: 10px;
}

.empty-features>span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.empty-features .icon {
  width: 14px;
  height: 14px;
}

.waiting-state,.error-state {
  flex: 1;
  min-height: 610px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
}

.waiting-state h3,.error-state h3 {
  font-size: 22px;
  margin: 13px 0 10px;
  font-weight: 550;
}

.waiting-state>p:not(.empty-eyebrow),.error-state>p {
  font-size: 13px;
  color: var(--muted);
  max-width: 420px;
}

.orbit-spinner {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  position: relative;
  margin-bottom: 35px;
}

.orbit-spinner:before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #eadfd1;
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

.orbit-spinner:after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed #e5dfd5;
  border-radius: 50%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.elapsed-badge {
  font-size: 11px;
  color: var(--accent);
  padding: 7px 14px;
  background: var(--accent-pale);
  border-radius: 20px;
  margin: 24px 0 14px;
  font-variant-numeric: tabular-nums;
}

.waiting-state .waiting-note {
  font-size: 11px!important;
}

.error-symbol {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-pale);
  color: var(--accent);
  margin-bottom: 18px;
}

.error-symbol .icon {
  width: 25px;
  height: 25px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid #dcded4;
  border-radius: 8px;
  padding: 10px 17px;
  font-size: 12px;
  margin-top: 25px;
}

.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.form-error {
  font-size: 12px;
  color: #ac3c25;
  margin-top: 8px;
}

.result-context {
  padding: 22px 28px 19px;
}

.result-context>p {
  font-size: 15px;
  line-height: 1.7;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.result-meta {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: #8b9083;
  font-size: 10px;
  flex-wrap: wrap;
}

.result-mode {
  padding: 2px 7px;
  background: #f2f4ee;
  color: var(--green);
  border-radius: 4px;
}

.partial-notice {
  margin: 0 28px 18px;
  padding: 10px 12px;
  background: #fffaed;
  border: 1px solid #f2e7c9;
  border-radius: 7px;
  font-size: 11px;
  color: #94702e;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.partial-notice>.icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.result-tabs {
  padding: 0 28px;
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.result-tabs>button {
  position: relative;
  background: transparent;
  padding: 0 0 12px;
  font-size: 12px;
  color: #83887a;
  white-space: nowrap;
}

.result-tabs>button[aria-selected="true"] {
  color: var(--accent);
  font-weight: 600;
}

.result-tabs>button[aria-selected="true"]:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.result-tabs>button>span {
  display: inline-block;
  font-size: 9px;
  background: #f2f3ed;
  border-radius: 4px;
  min-width: 17px;
  margin-left: 3px;
  color: #8b917f;
}

.result-panel {
  padding: 27px 28px 32px;
  overflow-wrap: anywhere;
}

.prose {
  font-size: 14px;
  line-height: 1.95;
  color: #4a5047;
}

.prose>:first-child {
  margin-top: 0;
}

.prose h1 {
  font-size: 25px;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--ink);
  margin: 25px 0 20px;
}

.prose h2 {
  font-size: 19px;
  color: var(--ink);
  margin: 29px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.prose h3 {
  font-size: 16px;
  margin: 23px 0 12px;
  color: var(--ink);
}

.prose h4,.prose h5,.prose h6 {
  font-size: 14px;
  margin: 20px 0 12px;
}

.prose p {
  margin: 12px 0;
}

.prose ul,.prose ol {
  padding-left: 24px;
  margin: 13px 0;
}

.prose li {
  padding-left: 3px;
  margin: 5px 0;
}

.prose li::marker {
  color: #b7ad98;
}

.prose li p {
  margin: 5px 0;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: #ddb19e;
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

.prose blockquote {
  margin: 20px 0;
  padding: 10px 17px;
  border-left: 3px solid #d7c8aa;
  background: #f8f7f1;
  color: #7b7c6e;
  border-radius: 0 6px 6px 0;
}

.prose blockquote>p {
  margin: 3px 0;
}

.prose code {
  font: 12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;
  background: #f3f3ed;
  border-radius: 4px;
  padding: 2px 5px;
  overflow-wrap: anywhere;
}

.prose pre {
  overflow-x: auto;
  max-width: 100%;
  background: #f5f5ef;
  padding: 17px 18px;
  border: 1px solid #e7e8de;
  border-radius: 8px;
  margin: 19px 0;
}

.prose pre code {
  padding: 0;
  background: none;
  white-space: pre;
  overflow-wrap: normal;
}

.prose table {
  display: block;
  max-width: 100%;
  width: max-content;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 12px;
  line-height: 1.8;
}

.prose th,.prose td {
  border: 1px solid var(--line);
  padding: 10px 13px;
  min-width: 100px;
}

.prose th {
  background: #f7f7f1;
  text-align: left;
  color: #5b6256;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.report-footnote {
  margin: 0 28px 25px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  display: flex;
  gap: 7px;
  color: #999d91;
  font-size: 10px;
}

.report-footnote .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

.plan-goal {
  padding: 17px 19px;
  background: #f6f6f0;
  border-radius: 9px;
  margin-bottom: 23px;
  font-size: 13px;
  color: #626957;
  line-height: 1.85;
}

.plan-goal h3 {
  font-size: 10px;
  letter-spacing: 1px;
  color: #939986;
  margin-bottom: 6px;
  font-weight: 500;
}

.plan-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
}

.plan-item-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-item h3 {
  font-size: 12px;
  font-weight: 600;
  color: #626b58;
}

.task-status {
  font-size: 10px;
  border-radius: 4px;
  padding: 2px 7px;
  background: #edf3ec;
  color: #60785e;
}

.task-status.failed,.task-status.empty {
  background: #fff2e6;
  color: #a27c38;
}

.plan-query {
  font-size: 13px;
  font-weight: 550;
  line-height: 1.75;
  color: #444e3c;
  margin-bottom: 9px;
  overflow-wrap: anywhere;
}

.plan-reason,.task-error {
  font-size: 12px;
  color: #848b7a;
  line-height: 1.85;
}

.task-error {
  margin-top: 10px;
  color: #aa7650;
}

.task-summary {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: #7c8472;
  font-size: 12px;
}

.task-summary summary {
  cursor: pointer;
  font-size: 11px;
  color: #707b63;
}

.task-summary p {
  margin-top: 9px;
  white-space: pre-wrap;
}

.source-intro {
  font-size: 12px;
  color: #8d9384;
  margin-bottom: 18px;
}

.source-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 27px minmax(0,1fr);
  gap: 9px;
}

.source-card:last-child {
  border-bottom: 0;
}

.source-number {
  font: 10px ui-monospace,monospace;
  background: #f3f4ed;
  color: #8a937c;
  width: 23px;
  height: 23px;
  border-radius: 5px;
  display: grid;
  place-items: center;
}

.source-card h3 {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.75;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.source-link:hover {
  color: var(--accent);
}

.source-link .icon {
  width: 13px;
  height: 13px;
  color: #a2a995;
}

.source-domain {
  font-size: 10px;
  color: var(--accent);
  margin: 5px 0 8px;
  overflow-wrap: anywhere;
}

.source-card details {
  font-size: 12px;
  color: #89917f;
  line-height: 1.9;
}

.source-card details summary {
  font-size: 11px;
  cursor: pointer;
}

.source-card details p {
  margin: 8px 0;
  white-space: pre-wrap;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding: 23px 0 27px;
  font-size: 10px;
  color: #999e90;
  letter-spacing: .2px;
}

.footer-dot {
  margin: 0 9px;
  color: #c5c7bc;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #3a4333;
  color: white;
  padding: 10px 20px;
  border-radius: 9px;
  font-size: 12px;
  box-shadow: 0 8px 30px #22331125;
  max-width: 90vw;
  text-align: center;
}

.skip-link {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 100;
  background: white;
  padding: 10px;
  border-radius: 5px;
}

.skip-link:focus {
  top: 15px;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  max-width: 520px;
  width: calc(100% - 32px);
  color: var(--ink);
  box-shadow: 0 20px 90px #282e222a;
}

dialog::backdrop {
  background: #31372b66;
  backdrop-filter: blur(3px);
}

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

dialog h2 {
  font-size: 22px;
  font-weight: 600;
}

.help-steps {
  padding-left: 23px;
  font-size: 13px;
  margin: 24px 0;
}

.help-steps>li {
  padding-left: 7px;
  margin: 18px 0;
}

.help-steps>li::marker {
  color: var(--accent);
  font: 12px ui-monospace,monospace;
}

.help-steps p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.help-note {
  border-radius: 9px;
  padding: 14px 17px;
  background: #f6f5ee;
  font-size: 11px;
  line-height: 1.9;
  color: #929280;
}

.noscript-message {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #a63d23;
  color: white;
  padding: 15px;
  text-align: center;
}

@media(min-width:1500px) {
  .intro {
    padding-top: 53px;
    padding-bottom: 42px;
  }
  .workspace {
    grid-template-columns: 385px minmax(0,1fr);
    gap: 28px;
  }
  .question-card {
    padding: 28px;
  }
  .result-card {
    min-height: 710px;
  }
  .empty-state,.waiting-state,.error-state {
    min-height: 630px;
  }
}

@media(max-width:1100px) {
  .site-shell {
    padding: 0 30px;
  }
  .workspace {
    grid-template-columns: 330px minmax(0,1fr);
    gap: 18px;
  }
  .question-card {
    padding: 21px;
  }
  .result-header {
    padding: 18px 22px;
  }
  .result-placeholder {
    display: none;
  }
  .brand-caption {
    display: none;
  }
  .result-context,.result-panel {
    padding-left: 22px;
    padding-right: 22px;
  }
  .result-tabs {
    padding-left: 22px;
    padding-right: 22px;
    gap: 20px;
  }
  .process {
    gap: 12px;
  }
  .intro h1 {
    font-size: 36px;
  }
  .empty-state h3 {
    font-size: 22px;
  }
  .empty-state {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media(max-width:800px) {
  .site-shell {
    padding: 0 22px;
    max-width: 680px;
  }
  .site-header {
    height: 78px;
  }
  .brand-name {
    font-size: 23px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .header-right {
    gap: 18px;
  }
  .service-status {
    font-size: 10px;
  }
  .help-button {
    font-size: 0;
    gap: 0;
  }
  .help-button .icon {
    width: 20px;
    height: 20px;
  }
  .intro {
    padding: 32px 0 27px;
  }
  .intro h1 {
    font-size: 32px;
    letter-spacing: -.7px;
  }
  .intro-description {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .process {
    display: none;
  }
  .workspace {
    grid-template-columns: minmax(0,1fr);
    gap: 7px;
  }
  .question-card {
    padding: 23px;
  }
  .mode-switch {
    margin-top: 21px;
  }
  .mode-description {
    min-height: 28px;
  }
  .query-label {
    margin-top: 4px;
  }
  textarea {
    min-height: 145px;
    max-height: 300px;
  }
  .examples {
    padding-top: 16px;
  }
  .example-button {
    grid-template-columns: 60px minmax(0,1fr) 14px;
    align-items: center;
    padding: 9px 0;
    font-size: 11px;
  }
  .example-category {
    grid-column: 1;
  }
  .example-button>span:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .example-button>.icon {
    grid-column: 3;
    grid-row: 1;
  }
  .submit-hint {
    margin-bottom: 18px;
  }
  .local-note {
    padding: 13px 0 16px;
  }
  .result-card {
    min-height: 440px;
  }
  .empty-state,.waiting-state,.error-state {
    min-height: 390px;
    padding-top: 30px;
    padding-bottom: 35px;
  }
  .empty-art {
    width: 170px;
    margin-bottom: 10px;
  }
  .empty-state h3 {
    font-size: 21px;
    margin: 10px 0;
  }
  .empty-state>p {
    font-size: 11px;
  }
  .empty-features {
    margin-top: 22px;
  }
  .empty-eyebrow {
    font-size: 8px;
  }
  .result-header {
    min-height: 66px;
  }
  .site-footer {
    font-size: 9px;
    margin-top: 27px;
    padding: 20px 0;
    flex-direction: column;
    gap: 5px;
  }
  .prose {
    font-size: 13px;
  }
  .prose h1 {
    font-size: 22px;
  }
  .prose h2 {
    font-size: 18px;
  }
  .result-context>p {
    font-size: 14px;
  }
  .result-panel {
    padding-top: 22px;
  }
  .result-tabs {
    gap: 24px;
  }
  .result-tabs>button {
    font-size: 11px;
  }
  .waiting-state>p {
    font-size: 12px!important;
  }
  .waiting-state .waiting-note {
    font-size: 10px!important;
  }
  .waiting-state h3 {
    font-size: 20px;
  }
  .report-footnote {
    margin-left: 22px;
    margin-right: 22px;
  }
  .partial-notice {
    margin-left: 22px;
    margin-right: 22px;
  }
}

@media(max-width:380px) {
  .site-shell {
    padding: 0 15px;
  }
  .intro h1 {
    font-size: 29px;
  }
  .question-card {
    padding: 19px;
  }
  .section-heading h2 {
    font-size: 14px;
  }
  .result-header {
    padding: 16px;
  }
  .result-actions {
    gap: 2px;
  }
  .action-divider {
    margin: 0 3px;
  }
  .example-button {
    grid-template-columns: 52px minmax(0,1fr) 12px;
  }
  .result-panel {
    padding-left: 18px;
    padding-right: 18px;
  }
}

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