@font-face {
  font-family: Inter;
  src: local("Inter"), local("Inter Regular");
  font-display: swap;
}

:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #172b26;
  background: #f8faf7;
  font-synthesis: none;
  --ink: #172b26;
  --muted: #4d635b;
  --green: #0c624b;
  --green-dark: #084936;
  --line: #dce5de;
  --soft: #edf5ee;
  --white: #fff;
  --page-width: 1160px;
  --search-width: 690px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--green); }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid #158364;
  outline-offset: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header, .site-footer {
  width: min(calc(100% - 72px), var(--page-width));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header {
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.07em;
  text-decoration: none;
}
.accent { color: #168562; }
.wordmark .brand-icon { margin-right: 10px; }

.brand-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--green);
  border-radius: 11px;
}
.lens {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
  margin: -3px 3px 0 0;
  border: 1.7px solid currentColor;
  border-radius: 50%;
}
.lens::after {
  position: absolute;
  top: 9px;
  left: 9px;
  width: 6px;
  height: 1.7px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
  content: "";
}
.settings-button, .secondary {
  min-height: 39px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #d5e0d8;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
}
.settings-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.settings-button:hover, .secondary:hover:not(:disabled) { background: var(--soft); }
.dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7b6af;
}
.dot.connected, .safe-label .dot { background: #168562; }

main { flex: 1; width: 100%; }
.search-panel {
  width: min(calc(100% - 48px), var(--search-width));
  margin: clamp(76px, 13.5vh, 164px) auto 0;
}
.intro {
  margin-bottom: 29px;
  text-align: center;
}
.hero-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 134px;
  height: 91px;
  margin: 0 auto 18px;
  color: var(--green);
}
.hero-mark .brand-icon {
  z-index: 1;
  width: 59px;
  height: 59px;
  color: var(--green);
  background: #deefe4;
  border: 1px solid #c9e5d3;
  border-radius: 19px;
  box-shadow: 0 3px 10px #135d4320;
}
.hero-mark .lens { transform: scale(1.65); }
.hero-orbit {
  position: absolute;
  width: 94px;
  height: 71px;
  border: 1px solid #d8e8de;
  border-radius: 50%;
  transform: rotate(-28deg);
}
.orbit-outer { width: 123px; height: 84px; opacity: .72; }
.hero-spark {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 19px;
  width: 7px;
  height: 7px;
  background: #168562;
  border-radius: 50%;
}
.intro h1 {
  margin: 0;
  font-size: clamp(42px, 7.6vw, 73px);
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: -.08em;
}
.intro p {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 7px 7px 7px 22px;
  border: 1px solid #d0ddd4;
  border-radius: 17px;
  background: var(--white);
  box-shadow: 0 10px 27px -18px #17483972, 0 2px 4px #193c2910;
}
.search-form:focus-within {
  border-color: #5f9c88;
  box-shadow: 0 0 0 3px #11775915;
}
.input-lens { color: #567269; flex: 0 0 13px; }
.search-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 1px 0 5px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 17px;
}
.search-form input:focus-visible { outline: 0; }
.search-form input::placeholder, .settings-form input::placeholder { color: #60746b; }
.primary {
  min-height: 43px;
  padding: 0 17px;
  color: #fff;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 10px;
  font-weight: 670;
}
.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.search-submit {
  min-width: 98px;
  min-height: 49px;
  border-radius: 11px;
}
.search-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 61px;
  border-bottom: 1px solid var(--line);
}
.modes { display: flex; align-self: stretch; gap: 20px; }
.modes button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 4px 0;
  color: var(--muted);
  background: none;
  border: 0;
  font-size: 14px;
  font-weight: 650;
}
.modes button:hover, .modes button[aria-pressed="true"] { color: var(--green); }
.modes button[aria-pressed="true"]::after {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  content: "";
}
.web-icon, .image-icon {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  overflow: hidden;
}
.web-icon { border-radius: 50%; }
.web-icon::before {
  position: absolute;
  inset: -1px 3px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}
.web-icon::after {
  position: absolute;
  inset: 6px 0 auto;
  border-top: 1px solid currentColor;
  content: "";
}
.image-icon { border-radius: 3px; }
.image-icon::before {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.image-icon::after {
  position: absolute;
  inset: 6px 0 -5px 4px;
  border: 1px solid currentColor;
  transform: rotate(-45deg);
  content: "";
}
.safe-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--green-dark);
  background: var(--soft);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 13px;
}
.suggestions span { margin-right: 3px; }
.suggestions button {
  padding: 6px 10px;
  color: #38544a;
  background: transparent;
  border: 1px solid #dce6de;
  border-radius: 999px;
}
.suggestions button:hover { color: var(--green); background: var(--soft); }

body:has(.output:not([hidden])) .search-panel { margin-top: 30px; }
body:has(.output:not([hidden])) .intro,
body:has(.output:not([hidden])) .suggestions { display: none; }
.output {
  width: min(calc(100% - 48px), var(--search-width));
  margin: 22px auto 60px;
}
.result-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.results { margin-top: 10px; }
.web-result {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}
.result-source { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.site-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--green);
  background: #e7f0e8;
  font-size: 12px;
  font-weight: 700;
}
.result-domain, .result-title, .result-snippet { overflow-wrap: anywhere; }
.result-title {
  margin: 7px 0 0;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.result-title a { color: #085d47; text-decoration: none; }
.result-title a:hover { text-decoration: underline; }
.result-snippet {
  margin: 6px 0 0;
  color: #40574e;
  font-size: 15px;
  line-height: 1.55;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 18px;
}
.image-result {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 6px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  text-decoration: none;
}
.image-result:hover { border-color: #7aac98; }
.image-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-missing { padding: 8px; color: var(--muted); font-size: 12px; text-align: center; }
.image-title, .image-source {
  display: block;
  padding: 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-title { margin-top: 8px; color: var(--ink); font-size: 13px; font-weight: 650; }
.image-source { margin-top: 3px; color: var(--muted); font-size: 12px; }
.notice {
  margin-top: 15px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.notice p { margin: 0 0 12px; color: var(--muted); line-height: 1.55; }
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}
.secondary:disabled { opacity: .45; }

.site-footer {
  min-height: 66px;
  gap: 12px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: var(--green); text-underline-offset: 3px; }
kbd {
  margin-inline: 2px;
  padding: 1px 5px;
  border: 1px solid #dce5de;
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
}
.no-js { color: var(--muted); }

dialog {
  width: min(calc(100% - 36px), 430px);
  max-height: calc(100% - 36px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 18px 64px #193d3440;
}
dialog::backdrop { background: #102b245e; }
.settings-form { padding: 24px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; }
.close-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: var(--soft);
  border: 0;
  border-radius: 9px;
  font-size: 22px;
  line-height: 1;
}
.close-button:hover { background: #dcebe0; }
.settings-form h2 { margin: 16px 0 5px; font-size: 24px; letter-spacing: -.04em; }
.settings-form p { margin: 0 0 17px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.settings-form label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.settings-form input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #d0ddd4;
  border-radius: 9px;
}
.dialog-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.dialog-actions .primary { font-size: 14px; }
.provider-link { display: inline-block; margin-top: 15px; font-size: 13px; text-underline-offset: 3px; }

@media (max-width: 600px) {
  .site-header, .site-footer { width: calc(100% - 32px); }
  .site-header { min-height: 69px; }
  .site-footer { min-height: 55px; }
  .search-panel, .output { width: calc(100% - 32px); }
  .search-panel { margin-top: clamp(54px, 10vh, 85px); }
  .intro { margin-bottom: 23px; }
  .hero-mark { margin-bottom: 10px; }
  .intro p { font-size: 15px; }
  .search-form { gap: 9px; min-height: 60px; padding: 6px 6px 6px 15px; border-radius: 14px; }
  .search-form input { font-size: 16px; padding-left: 2px; }
  .search-submit { min-width: 66px; min-height: 45px; }
  .modes { gap: 13px; }
  .safe-label { padding-inline: 7px; font-size: 11px; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
}
@media (hover: none) { .shortcut { display: none; } }
@media (max-width: 345px) {
  .pagination { gap: 7px; }
  .pagination button { padding-inline: 8px; }
  .shortcut { display: none; }
}
