:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #046367;
  --accent-2: #0f766e;
  --shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; }
.site-header, .site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header { padding: 22px 0; }
.site-footer { padding: 36px 0; color: var(--muted); font-size: 14px; }
.brand { font-weight: 800; text-decoration: none; font-size: 20px; letter-spacing: -.02em; }
.nav { display: flex; gap: 18px; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }

.hero, .page-hero, .results-section, .archive-list-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.hero {
  padding: 62px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(4, 99, 103, .16), transparent 36%),
    var(--panel);
  box-shadow: var(--shadow);
}
.page-hero { padding: 44px 0 24px; }
.page-hero.compact h1 { margin-bottom: 10px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
h1 { max-width: 850px; margin: 0; font-size: clamp(38px, 6vw, 72px); line-height: .95; letter-spacing: -.06em; }
.lead { max-width: 720px; color: var(--muted); font-size: 19px; line-height: 1.6; margin: 22px 0 0; }

.search-box { margin-top: 34px; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.category-tabs label { cursor: pointer; }
.category-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.category-tabs span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
}
.category-tabs input:checked + span {
  border-color: var(--accent);
  background: rgba(4, 99, 103, .08);
  color: var(--accent);
  font-weight: 700;
}
.search-row { display: flex; gap: 12px; }
.search-row.narrow { max-width: 640px; }
input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 16px;
  outline: none;
  background: #fff;
}
input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(4, 99, 103, .10); }
button {
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: var(--accent-2); }
button:disabled { opacity: .55; cursor: not-allowed; }

.results-section { padding: 40px 0 20px; }
.results-topline { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 18px; }
.results-topline h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.status { min-height: 20px; margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.source-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.badge, .source-filter button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}
.badge strong { color: var(--text); }
.source-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.source-filter button { color: var(--text); background: #fff; }
.source-filter button.active { background: var(--text); color: #fff; border-color: var(--text); }

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.result-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.result-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  object-fit: cover;
}
.result-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.result-source { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.result-card h3 { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: -.02em; }
.result-card h3 a { text-decoration: none; }
.result-card h3 a:hover { text-decoration: underline; }
.result-desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.meta { display: grid; gap: 4px; color: #475569; font-size: 13px; margin-top: auto; }
.meta span { display: block; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.card-actions a {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}
.card-actions a:hover { text-decoration: underline; }
.no-results { color: var(--muted); }
.load-more { display: block; margin: 28px auto 0; min-height: 48px; }

.archive-list-section { padding-bottom: 40px; }
.archive-table { margin-top: 20px; display: grid; gap: 12px; }
.archive-row {
  display: grid;
  grid-template-columns: 1.2fr .7fr .7fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 16px;
}
.archive-row h3 { margin: 0 0 5px; font-size: 17px; }
.archive-row p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.archive-row a { color: var(--accent); font-weight: 800; text-decoration: none; }

@media (max-width: 900px) {
  .hero { padding: 34px 22px; border-radius: 24px; }
  .search-row { flex-direction: column; }
  button { min-height: 50px; }
  .results-topline { display: block; }
  .source-summary { justify-content: flex-start; margin-top: 12px; }
  .results-grid { grid-template-columns: 1fr; }
  .archive-row { grid-template-columns: 1fr; }
}
