@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  color-scheme: light;
  --bg: #f5f1ea;
  --bg-accent: #efe6d7;
  --surface: #ffffff;
  --surface-strong: #f8f6f2;
  --text: #1f1b16;
  --muted: #6b5f52;
  --border: #e4dccf;
  --accent: #2f6f6d;
  --accent-dark: #245756;
  --shadow: 0 20px 45px rgba(37, 30, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #fdf9f3, var(--bg));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
}

.hero {
  text-align: center;
}

.title {
  font-size: clamp(2.1rem, 3vw, 3rem);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.search-card {
  background: linear-gradient(120deg, var(--surface), var(--surface-strong));
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: center;
}

.field {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}

.input {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 109, 0.2);
}

.button {
  display: inline-block;
  border: none;
  border-radius: 14px;
  padding: 14px 26px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  background: var(--accent-dark);
  box-shadow: 0 10px 20px rgba(47, 111, 109, 0.2);
  transform: translateY(-1px);
}

.loading {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-weight: 500;
}

.search-meta {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.results-meta {
  margin: 18px auto 0;
  text-align: center;
  color: var(--muted);
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 1rem;
}

.meta-label {
  font-weight: 600;
  color: var(--text);
}

.meta-divider {
  color: var(--accent);
  font-weight: 700;
}

.alert {
  background: #fff4ed;
  border: 1px solid #f3c6aa;
  color: #8b3a1e;
  padding: 16px 20px;
  border-radius: 16px;
  font-weight: 500;
  box-shadow: var(--shadow);
}

.alert.success {
  background: #e9f7ef;
  border-color: #b9e4c7;
  color: #245c38;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.disclaimer {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.affiliate-note {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.results-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title {
  margin: 0;
  font-size: 1.3rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.summary-value {
  font-weight: 600;
  word-break: break-word;
}

.summary-item.wide {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 6px;
}

.list-line {
  display: block;
}

.raw-card details {
  border-radius: 14px;
}

.raw-card summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-dark);
  list-style: none;
}

.raw-card summary::-webkit-details-marker {
  display: none;
}

.raw-card summary::before {
  content: "+";
  display: inline-block;
  margin-right: 8px;
  font-weight: 700;
}

.raw-card details[open] summary::before {
  content: "–";
}

.raw-card pre {
  margin: 16px 0 0;
  padding: 16px;
  background: #101010;
  color: #f4f4f4;
  border-radius: 12px;
  overflow: auto;
  max-height: 320px;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 0.85rem;
}

.site-footer {
  margin-top: 32px;
  padding: 24px 20px 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(107, 95, 82, 0.4);
}

.site-footer a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

@media (max-width: 720px) {
  .page {
    padding: 40px 18px 60px;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }
}
