/* MOXIEDOX - styles */

:root {
  --bg: #ffffff;
  --text: #202124;
  --muted: #70757a;
  --snippet: #4d5156;
  --link: #1a0dab;
  --accent: #4285f4;
  --border: #dfe1e5;
  --hairline: #ebebeb;
  --surface: #f8f9fa;
  --surface-hover: #f1f3f4;
  --footer-bg: #f2f2f2;
  --button-border: #dadce0;
  --shadow-soft: 0 1px 6px rgba(32, 33, 36, 0.28);
  --shadow-menu: 0 4px 10px rgba(32, 33, 36, 0.18);
  --result-hover: #f8f9fa;
  --skeleton: #e8eaed;
  --skeleton-shine: #f4f5f6;
}

html[data-theme='dark'] {
  --bg: #202124;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --snippet: #bdc1c6;
  --link: #8ab4f8;
  --accent: #8ab4f8;
  --border: #5f6368;
  --hairline: #3c4043;
  --surface: #303134;
  --surface-hover: #3c4043;
  --footer-bg: #171717;
  --button-border: #5f6368;
  --shadow-soft: 0 1px 6px rgba(0, 0, 0, 0.55);
  --shadow-menu: 0 4px 10px rgba(0, 0, 0, 0.5);
  --result-hover: #303134;
  --skeleton: #2d2e30;
  --skeleton-shine: #3a3b3e;
}

* {
  box-sizing: border-box;
}

/* Keep the hidden attribute authoritative over display rules below. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, 'Segoe UI', Helvetica, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  color: inherit;
}

.view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------- wordmark ------------------------------- */

.wordmark {
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  white-space: nowrap;
}

/* MOXIEDOX - one colour per letter, Google's palette, no adjacent repeats */
.wordmark span:nth-child(1) { color: #4285f4; }
.wordmark span:nth-child(2) { color: #ea4335; }
.wordmark span:nth-child(3) { color: #fbbc05; }
.wordmark span:nth-child(4) { color: #4285f4; }
.wordmark span:nth-child(5) { color: #34a853; }
.wordmark span:nth-child(6) { color: #4285f4; }
.wordmark span:nth-child(7) { color: #ea4335; }
.wordmark span:nth-child(8) { color: #fbbc05; }

html[data-theme='dark'] .wordmark span:nth-child(2),
html[data-theme='dark'] .wordmark span:nth-child(7) { color: #f28b82; }
html[data-theme='dark'] .wordmark span:nth-child(3),
html[data-theme='dark'] .wordmark span:nth-child(8) { color: #fdd663; }
html[data-theme='dark'] .wordmark span:nth-child(1),
html[data-theme='dark'] .wordmark span:nth-child(4),
html[data-theme='dark'] .wordmark span:nth-child(6) { color: #8ab4f8; }
html[data-theme='dark'] .wordmark span:nth-child(5) { color: #81c995; }

/* --------------------------------- topbar -------------------------------- */

.topbar {
  padding: 14px 20px;
}

.topbar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.nav-link {
  background: none;
  border: 0;
  font-size: 13px;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.nav-link:hover {
  text-decoration: underline;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  border-radius: 50%;
  width: 34px;
  height: 34px;
}

.icon-button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.theme-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon {
  fill: currentColor;
  stroke: none;
}

.icon-sun { display: none; }
html[data-theme='dark'] .icon-sun { display: block; }
html[data-theme='dark'] .icon-moon { display: none; }

/* ---------------------------------- home --------------------------------- */

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 120px;
}

.logo {
  margin: 0 0 30px;
  font-size: clamp(52px, 13vw, 92px);
  font-weight: 400;
  text-align: center;
}

.search-form {
  position: relative;
  width: 100%;
}

.home-form {
  max-width: 584px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 12px 0 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.search-box:hover {
  box-shadow: var(--shadow-soft);
}

.search-box:focus-within {
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}

.search-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: var(--muted);
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--muted);
}

.clear-button svg {
  width: 20px;
  height: 20px;
  fill: var(--muted);
}

.home-buttons {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.primary-button {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--surface);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.primary-button:hover {
  border-color: var(--button-border);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.primary-button:active {
  background: var(--surface-hover);
}

/* ------------------------------ suggestions ----------------------------- */

.suggestions {
  position: absolute;
  top: 53px;
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: var(--shadow-menu);
  overflow: hidden;
}

.suggestions li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestions li svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: var(--muted);
}

.suggestions li strong {
  font-weight: 400;
}

.suggestions li:hover,
.suggestions li.is-active {
  background: var(--surface-hover);
}

/* --------------------------------- footer ------------------------------- */

.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.footer-links {
  display: flex;
  gap: 6px;
}

.footer-link {
  background: none;
  border: 0;
  padding: 4px 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.footer-link:hover {
  color: var(--text);
  text-decoration: underline;
}

/* -------------------------------- results -------------------------------- */

.results-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px 24px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}

.logo.compact {
  flex: 0 0 auto;
  margin: 0;
  font-size: 26px;
  text-decoration: none;
}

.results-form {
  max-width: 692px;
  flex: 1;
}

.results-header .search-box {
  height: 44px;
}

.results-header .suggestions {
  top: 50px;
}

.results-main {
  flex: 1;
  width: 100%;
  max-width: 700px;
  margin-left: clamp(20px, 11vw, 180px);
  padding: 0 24px 40px;
}

.results-meta {
  margin: 20px 0 22px;
  font-size: 13px;
  color: var(--muted);
}

.meta-warning {
  color: #b06000;
}

html[data-theme='dark'] .meta-warning {
  color: #fdd663;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.result {
  max-width: 620px;
}

.result-url {
  display: block;
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.result-title {
  display: inline-block;
  font-size: 20px;
  line-height: 1.3;
  color: var(--link);
  text-decoration: none;
}

.result-title:hover,
.result-title:focus-visible {
  text-decoration: underline;
}

.result-snippet {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.58;
  color: var(--snippet);
  overflow-wrap: anywhere;
}

.result-snippet strong,
.result-title strong {
  font-weight: 700;
  color: inherit;
}

.result-empty,
.result-error {
  max-width: 620px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--snippet);
}

.result-error h2,
.result-empty h2 {
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 10px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 34px 0 60px;
  font-size: 14px;
}

.pager button {
  background: none;
  border: 0;
  padding: 6px 9px;
  border-radius: 4px;
  color: var(--link);
  font-size: 14px;
  cursor: pointer;
}

.pager button:hover {
  background: var(--surface-hover);
}

.pager button[disabled] {
  color: var(--muted);
  cursor: default;
  background: none;
}

.pager .pager-current {
  color: var(--text);
  font-weight: 700;
  padding: 6px 9px;
}

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

.spell-line {
  margin: -10px 0 22px;
  font-size: 16px;
  color: var(--snippet);
}

.spell-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-style: italic;
  font-weight: 700;
  cursor: pointer;
}

.spell-link:hover,
.spell-link:focus-visible {
  text-decoration: underline;
}

.related-block {
  max-width: 700px;
  margin: 32px 0 60px;
}

.related-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
}

.related-chip {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-chip:hover,
.related-chip:focus-visible {
  background: var(--surface-hover);
}

/* ---------------------------------- tabs --------------------------------- */

.tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 clamp(20px, 11vw, 180px);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 2px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

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

.tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab.ai-tab {
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 12px;
  margin-bottom: 5px;
  color: var(--accent);
}

.tab.ai-tab svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.tab.ai-tab:hover,
.tab.ai-tab.is-active {
  background: var(--surface-hover);
  border-color: transparent;
}

.ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
}

.ai-pill svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.ai-pill:hover {
  background: var(--surface-hover);
}

/* ------------------------------ instant card ----------------------------- */

.instant-card {
  max-width: 620px;
  margin: 0 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
}

.instant-title {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.instant-value {
  margin: 0;
  font-size: 30px;
  font-weight: 400;
  color: var(--text);
}

.instant-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.instant-example {
  margin: 8px 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

.knowledge-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.knowledge-thumb {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-hover);
}

.knowledge-body {
  min-width: 0;
}

.knowledge-body .instant-title {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
}

.knowledge-body .instant-sub {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--snippet);
}

.knowledge-body a {
  font-size: 13px;
  color: var(--link);
  text-decoration: none;
}

.knowledge-body a:hover {
  text-decoration: underline;
}

/* -------------------------------- images --------------------------------- */

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px;
  max-width: 1040px;
}

.image-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.image-card:hover img {
  box-shadow: var(--shadow-soft);
}

.image-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

.image-card img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface);
}

.image-card span {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.image-card.image-failed {
  display: none;
}

/* ----------------------------- image preview ----------------------------- */

body.lightbox-locked {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 36, 0.88);
}

.lightbox-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: min(1040px, 100%);
  max-height: 100%;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow-menu);
}

.lightbox .icon-button {
  position: absolute;
  z-index: 2;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-menu);
}

/* .icon-button sets display, which would beat the [hidden] attribute. */
.lightbox .icon-button[hidden] {
  display: none;
}

.lightbox-close {
  top: 10px;
  right: 10px;
}

.lightbox-nav {
  top: 50%;
  margin-top: -17px;
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  min-height: 0;
  overflow: auto;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 64vh;
  margin: 0 auto;
  border-radius: 8px;
  background: var(--surface);
  object-fit: contain;
}

.lightbox-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lightbox-title {
  font-size: 14px;
  color: var(--text);
}

.lightbox-source {
  font-size: 12px;
  color: var(--muted);
}

.lightbox-actions {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.lightbox-link {
  color: var(--link);
  text-decoration: none;
}

.lightbox-link:hover,
.lightbox-link:focus-visible {
  text-decoration: underline;
}

/* --------------------------------- news ---------------------------------- */

.news-item {
  max-width: 620px;
}

.news-meta {
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--muted);
}

/* -------------------------------- AI mode -------------------------------- */

.ai-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 780px;
  margin-left: clamp(20px, 11vw, 180px);
  padding: 24px 24px 0;
}

.ai-thread {
  flex: 1 1 auto;
  padding-bottom: 28px;
}

.ai-turn + .ai-turn {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}

.ai-followup {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 14px 0 18px;
  background: var(--bg);
  border-top: 1px solid var(--hairline);
}

.ai-followup-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  outline: none;
}

.ai-followup-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.ai-followup-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.ai-followup-send svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.ai-badge svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.ai-query {
  margin: 14px 0 0;
  font-size: 27px;
  font-weight: 400;
  color: var(--text);
}

.ai-answer {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.ai-answer p {
  margin: 0 0 14px;
}

.ai-answer ul,
.ai-answer ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.ai-answer li {
  margin-bottom: 6px;
}

.ai-answer a {
  color: var(--link);
  text-decoration: none;
}

.ai-answer a:hover {
  text-decoration: underline;
}

.ai-answer sup {
  font-size: 11px;
  line-height: 0;
}

.ai-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* Blinks at the end of the last line while the answer is still arriving. */
.ai-caret {
  display: inline-block;
  width: 2px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  animation: ai-caret-blink 1.05s steps(1, end) infinite;
}

@keyframes ai-caret-blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

.ai-sources {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.ai-source {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.ai-source-index {
  color: var(--muted);
}

.ai-source a {
  color: var(--link);
  text-decoration: none;
}

.ai-source a:hover {
  text-decoration: underline;
}

.ai-source-url {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* ------------------------------- setup card ------------------------------ */

.setup-card {
  max-width: 620px;
  padding: 22px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
}

.setup-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.setup-card p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--snippet);
}

.setup-card a {
  color: var(--link);
}

.setup-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
}

.setup-code {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 12.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre;
}

/* ------------------------------ skeletons ------------------------------- */

.skeleton {
  max-width: 620px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--skeleton) 25%, var(--skeleton-shine) 37%, var(--skeleton) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  margin-bottom: 10px;
}

.skeleton-line.title {
  height: 20px;
  width: 52%;
}

.skeleton-line.url {
  width: 34%;
  height: 11px;
}

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

.skeleton-line.text.short {
  width: 68%;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* --------------------------------- dialog -------------------------------- */

.about-dialog {
  max-width: 540px;
  width: calc(100% - 32px);
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.about-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.about-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 500;
}

.about-subtitle {
  margin: 18px 0 6px;
  font-size: 15px;
  font-weight: 500;
}

.about-dialog p {
  margin: 0 0 10px;
  color: var(--snippet);
}

.about-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ------------------------------- responsive ------------------------------ */

@media (max-width: 720px) {
  .results-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px 10px;
  }

  .logo.compact {
    font-size: 22px;
  }

  .results-form {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .results-main,
  .ai-main {
    margin-left: 0;
    padding: 0 16px 30px;
  }

  .ai-main {
    padding-top: 18px;
  }

  .tabs {
    gap: 16px;
    padding: 0 16px;
    overflow-x: auto;
  }

  .tab.ai-tab span {
    display: none;
  }

  .ai-query {
    font-size: 22px;
  }

  .home-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line,
  .ai-caret {
    animation: none;
  }
  .search-box {
    transition: none;
  }
}

/* Credit required by some result providers (Brave, Google). */
.meta-attribution {
  color: var(--muted);
}

/* ------------------------------ legal pages ------------------------------ */

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 72px;
}

.legal-back {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--link);
  font-size: 14px;
  text-decoration: none;
}

.legal-back:hover {
  text-decoration: underline;
}

.legal-page h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 500;
}

.legal-page h2 {
  margin: 32px 0 10px;
  font-size: 18px;
  font-weight: 500;
}

.legal-updated {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
}

.legal-page p,
.legal-page li {
  color: var(--snippet);
  font-size: 15px;
  line-height: 1.65;
}

.legal-page ul {
  margin: 10px 0;
  padding-left: 22px;
}

.legal-page a {
  color: var(--link);
}

.legal-page code {
  font-size: 13px;
  background: var(--surface);
  border-radius: 4px;
  padding: 1px 5px;
}
