:root {
  color-scheme: light;
  --canvas: #f4f7f5;
  --surface: #ffffff;
  --surface-muted: #eef3f0;
  --ink: #17211f;
  --ink-soft: #52605c;
  --ink-faint: #5f6d68;
  --line: #d7dfdb;
  --line-strong: #b7c4bf;
  --accent: #087f5b;
  --accent-dark: #056344;
  --accent-soft: #dff4e9;
  --link: #1859a9;
  --link-hover: #10427f;
  --warning: #8a5100;
  --warning-soft: #fff2cf;
  --danger: #b52c2c;
  --danger-soft: #fde8e7;
  --info: #315d87;
  --info-soft: #e5f0fa;
  --shadow: 0 12px 28px rgb(23 33 31 / 8%);
  --focus: 0 0 0 3px rgb(8 127 91 / 24%);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  color: inherit;
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

img {
  display: block;
}

[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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--accent-dark);
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 64px;
  background: rgb(244 247 245 / 96%);
  border-bottom: 1px solid transparent;
}

body[data-view="results"] .app-header {
  background: rgb(255 255 255 / 96%);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 40px, 1120px);
  height: 100%;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 740;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark,
.intro-mark {
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #b8efcd;
  border: 1px solid #8bd8aa;
  border-radius: 7px;
}

.brand-mark {
  width: 34px;
  height: 34px;
}

.brand-mark img {
  width: 20px;
  height: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 8px;
  padding: 0 10px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--ink-faint);
  border: 2px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.service-status[data-state="ready"] .status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 1px #58aa88;
}

.service-status[data-state="error"] .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 1px #d88d8d;
}

.icon-button,
.query-action {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.icon-button:hover,
.query-action:hover {
  background: var(--surface-muted);
  border-color: var(--line);
}

.icon-button img,
.query-action img,
.tool-button img,
.primary-button img,
.secondary-button img,
.external-icon,
.copy-button img,
.notice-icon,
.detail-icon {
  width: 19px;
  height: 19px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[tabindex="-1"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

main {
  width: 100%;
}

.search-stage {
  width: min(100% - 40px, 880px);
  min-height: calc(100vh - 140px);
  margin: 0 auto;
  padding: 11vh 0 44px;
}

body[data-view="results"] .search-stage {
  width: min(100% - 40px, 1120px);
  min-height: 0;
  padding: 26px 0 24px;
}

.search-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 26px;
}

.intro-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
}

.intro-mark img {
  width: 31px;
  height: 31px;
}

.search-intro h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 780;
  letter-spacing: 0;
}

body[data-view="results"] .search-intro {
  display: none;
}

.search-form {
  width: 100%;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 286px;
  min-height: 44px;
  padding: 3px;
  margin: 0 auto 14px;
  background: #e7ece9;
  border: 0;
  border-radius: 7px;
}

body[data-view="results"] .mode-switch {
  margin-left: 0;
}

.mode-option {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 680;
  cursor: pointer;
}

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

.mode-option span {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  white-space: nowrap;
}

.mode-option input:checked + span {
  color: var(--ink);
  background: var(--surface);
  border-color: #d8dfdc;
  box-shadow: 0 1px 3px rgb(23 33 31 / 8%);
}

.mode-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.query-field {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  height: 58px;
  padding: 0 7px 0 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.query-field:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow), var(--focus);
}

.query-icon {
  width: 21px;
  height: 21px;
  margin-right: 12px;
  opacity: 0.64;
}

.query-field input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 17px;
}

.query-field input::placeholder {
  color: #7c8985;
}

.query-field input::-webkit-search-cancel-button {
  display: none;
}

.primary-button,
.secondary-button,
.tool-button,
.copy-button,
.retry-button,
.suggestions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  padding: 0 16px;
  border-radius: 7px;
  font-weight: 690;
  cursor: pointer;
}

.primary-button {
  min-width: 108px;
  height: 58px;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.primary-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.primary-button img {
  filter: brightness(0) invert(1);
}

.secondary-button,
.retry-button {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.secondary-button:hover,
.retry-button:hover {
  background: var(--surface-muted);
  border-color: #93a39d;
}

.cancel-button {
  min-width: 132px;
  height: 58px;
  color: var(--danger);
}

.search-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  margin-top: 7px;
}

.tool-button,
.copy-button {
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  font-size: 14px;
}

.tool-button:hover,
.copy-button:hover {
  color: var(--ink);
  background: var(--surface-muted);
  border-color: var(--line);
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 6px;
  font-size: 12px;
}

.mode-summary {
  color: var(--ink-faint);
  font-size: 13px;
}

.filters-panel {
  padding: 18px 0 4px;
  border-top: 1px solid var(--line);
}

.filters-heading-row,
.dialog-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filters-heading-row h2,
.dialog-heading-row h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.field-label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.field-wide {
  grid-column: span 2;
}

.field-label input,
.field-label select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.field-label select {
  padding-right: 34px;
  appearance: none;
  background-image: url("./icons/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 17px;
}

.field-label input:focus,
.field-label select:focus {
  border-color: var(--accent);
  box-shadow: var(--focus);
  outline: none;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.suggestions button {
  min-height: 42px;
  padding: 0 14px;
  color: #33413d;
  background: transparent;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 580;
}

.suggestions button:hover {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: #9bd7b7;
}

body[data-view="results"] .suggestions {
  display: none;
}

.results-region {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 4px 0 72px;
}

.notice-region {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.notice-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px 15px;
  color: #234a39;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}

.notice-band.warning {
  color: #603c05;
  background: var(--warning-soft);
  border-left-color: #c77a00;
}

.notice-band.error {
  color: #722020;
  background: var(--danger-soft);
  border-left-color: var(--danger);
}

.notice-band.info {
  color: #294d6e;
  background: var(--info-soft);
  border-left-color: var(--info);
}

.notice-band strong,
.notice-band p {
  display: block;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.notice-band > div {
  min-width: 0;
}

.notice-band p {
  margin-top: 2px;
  color: inherit;
  font-size: 14px;
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 290px);
  gap: 52px;
  align-items: start;
}

.primary-results {
  min-width: 0;
}

.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.results-header h2,
.state-panel h2,
.answer-band h2,
.search-details h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.results-count {
  flex: none;
  color: var(--ink-faint);
  font-size: 13px;
}

.result-list {
  display: grid;
}

.result-item {
  min-width: 0;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.result-source-line {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--ink-faint);
  font-size: 13px;
}

.source-avatar {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  color: #285947;
  background: #e1f2e9;
  border: 1px solid #b6dfc8;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.source-domain {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #304b41;
  font-weight: 650;
}

.provider-label {
  color: var(--ink-faint);
}

.result-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 710;
  overflow-wrap: anywhere;
}

.result-title a {
  display: inline;
  color: var(--link);
  text-decoration: none;
}

.result-title a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.external-icon {
  display: inline-block;
  margin-left: 5px;
  vertical-align: -2px;
  opacity: 0.62;
}

.result-snippet {
  max-width: 76ch;
  margin: 8px 0 0;
  color: #3d4a46;
  font-size: 15px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.result-details {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 13px;
}

.result-details summary {
  width: fit-content;
  padding: 5px 0;
  cursor: pointer;
  font-weight: 650;
}

.result-details dl,
.search-details dl {
  margin: 8px 0 0;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 12px;
  padding: 6px 0;
}

.detail-row dt {
  color: var(--ink-faint);
}

.detail-row dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.answer-band {
  padding: 0 0 24px 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}

.answer-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.confidence-label {
  flex: none;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 720;
}

.answer-text {
  margin: 14px 0 0;
  color: #26332f;
  font-size: 16px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.citation-section {
  margin-top: 20px;
}

.citation-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.citation-list {
  display: grid;
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.citation-list li {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.citation-entry {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  color: var(--ink);
  text-decoration: none;
}

.citation-list a:hover .citation-title {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.citation-entry > .external-icon {
  margin-left: 0;
}

.citation-number {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 760;
}

.citation-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  padding: 8px 0;
}

.citation-quote {
  display: block;
  margin: -4px 28px 8px 37px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.search-details {
  position: sticky;
  top: 86px;
  min-width: 0;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.search-details h2 {
  font-size: 15px;
}

.search-details .detail-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 0;
  border-bottom: 1px solid #e5ebe8;
  font-size: 13px;
}

.request-id-value {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.request-id-value code {
  display: block;
  max-width: 126px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}

.state-panel {
  display: grid;
  justify-items: start;
  min-height: 250px;
  align-content: start;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.state-icon-wrap {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  color: var(--ink);
  background: var(--surface-muted);
  border-radius: 7px;
}

.state-panel.error .state-icon-wrap {
  background: var(--danger-soft);
}

.state-panel p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.error-meta {
  margin-top: 18px;
  color: var(--ink-faint);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.loading-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.loading-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  animation: loading-pulse 1.2s ease-in-out infinite;
}

.skeleton-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.skeleton-line {
  height: 12px;
  margin-bottom: 12px;
  background: #dfe6e2;
  border-radius: 4px;
  animation: skeleton-pulse 1.35s ease-in-out infinite;
}

.skeleton-line.domain {
  width: 29%;
  height: 10px;
}

.skeleton-line.title {
  width: 72%;
  height: 19px;
}

.skeleton-line.snippet {
  width: 92%;
}

.skeleton-line.short {
  width: 61%;
}

@keyframes loading-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.84);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  gap: 18px;
  padding: 12px 20px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.app-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--link);
}

.connection-dialog {
  width: min(100% - 32px, 480px);
  max-height: min(680px, calc(100vh - 32px));
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgb(23 33 31 / 24%);
}

.connection-dialog::backdrop {
  background: rgb(23 33 31 / 48%);
}

.dialog-content {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.dialog-eyebrow {
  margin: 0 0 3px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.credential-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  height: 44px;
  padding-left: 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.credential-field:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus);
}

.credential-field img {
  width: 18px;
  height: 18px;
  opacity: 0.62;
}

.credential-field input {
  height: 40px;
  border: 0;
  box-shadow: none;
  outline: none;
}

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

.dialog-actions .primary-button,
.dialog-actions .secondary-button {
  min-width: 92px;
  height: 44px;
}

@media (max-width: 900px) {
  .results-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .search-details {
    position: static;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .search-details dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }

  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-header {
    height: 58px;
  }

  .header-inner,
  .search-stage,
  body[data-view="results"] .search-stage,
  .results-region {
    width: min(100% - 24px, 1120px);
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .service-status {
    padding: 0 4px;
  }

  .service-status span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .search-stage {
    min-height: calc(100vh - 122px);
    padding-top: 8vh;
  }

  body[data-view="results"] .search-stage {
    padding: 18px 0 15px;
  }

  .intro-mark {
    width: 50px;
    height: 50px;
  }

  .search-intro h1 {
    font-size: 34px;
  }

  .mode-switch {
    width: 100%;
    margin-bottom: 10px;
  }

  .search-control {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .query-field,
  .primary-button,
  .cancel-button {
    height: 54px;
  }

  .primary-button,
  .cancel-button {
    width: 100%;
  }

  .query-field input {
    height: 48px;
    font-size: 16px;
  }

  .search-tools {
    min-height: 46px;
  }

  .filters-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-wide {
    grid-column: auto;
  }

  .suggestions {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .suggestions button {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: left;
  }

  .results-region {
    padding-bottom: 48px;
  }

  .notice-region {
    margin-bottom: 16px;
  }

  .results-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .result-item {
    padding: 19px 0;
  }

  .result-title {
    font-size: 18px;
  }

  .answer-band {
    padding-left: 13px;
  }

  .answer-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .citation-entry {
    grid-template-columns: 28px minmax(0, 1fr) 19px;
  }

  .search-details dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .state-panel {
    min-height: 220px;
    padding-top: 28px;
  }

  .dialog-content {
    padding: 20px;
  }
}

@media (max-width: 360px) {
  .header-inner,
  .search-stage,
  body[data-view="results"] .search-stage,
  .results-region {
    width: min(100% - 20px, 1120px);
  }

  .mode-option span {
    padding: 0 8px;
    font-size: 13px;
  }

  .mode-summary {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
