:root {
  color-scheme: light;
  --ink: #173d3b;
  --soft-ink: #4f6664;
  --paper: #fffdf6;
  --panel: #f5efe1;
  --line: #d6c39c;
  --accent: #1e6963;
  --accent-dark: #124a46;
  --bronze: #9b6b32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(219, 242, 236, .7), transparent 38rem),
    var(--paper);
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 70px;
}

.hero {
  text-align: center;
  padding: 28px 18px 34px;
}

.eyebrow {
  color: var(--bronze);
  font: 700 .78rem/1.2 Arial, sans-serif;
  letter-spacing: .18em;
}

h1 {
  margin: .35rem 0 .65rem;
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  line-height: 1;
}

.hero p:last-child {
  max-width: 720px;
  margin: 0 auto;
  color: var(--soft-ink);
  font-size: 1.12rem;
}

.search-panel {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 16px 50px rgba(23, 61, 59, .10);
}

.search-panel h2 { margin-top: 0; }

label, legend {
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 9px 0 24px;
}

input[type="search"] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #a8b8b5;
  border-radius: 12px;
  font: inherit;
  font-size: 1.05rem;
  background: white;
}

button {
  min-height: 52px;
  padding: 0 25px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--accent);
  font: 700 1rem Arial, sans-serif;
  cursor: pointer;
}

button:hover, button:focus-visible { background: var(--accent-dark); }

fieldset {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 18px;
  margin-top: 12px;
}

.source-grid label,
.inline-option {
  font-weight: 400;
}

details {
  padding: 10px 0 0;
}

details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-dark);
}

.inline-option {
  display: block;
  margin-top: 12px;
}

.status {
  padding: 22px 4px 8px;
  color: var(--soft-ink);
}

.results {
  display: grid;
  gap: 16px;
}

.result-card {
  padding: 22px;
  border: 1px solid #d8dedc;
  border-radius: 16px;
  background: white;
  box-shadow: 0 8px 26px rgba(23, 61, 59, .07);
}

.result-card .source {
  margin: 0 0 4px;
  color: var(--bronze);
  font: 700 .76rem/1.2 Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.result-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.result-card .page {
  margin: 5px 0 12px;
  color: var(--soft-ink);
  font-size: .95rem;
}

.result-card .snippet {
  line-height: 1.55;
}

.result-card a {
  display: inline-block;
  margin-top: 5px;
  color: var(--accent-dark);
  font-weight: 700;
}

@media (max-width: 620px) {
  .search-row { grid-template-columns: 1fr; }
  button { width: 100%; }
}
