:root {
  --ink: #14201a;
  --muted: #607168;
  --line: rgba(159, 190, 173, 0.34);
  --paper: #eff8f2;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --accent: #17745c;
  --accent-deep: #0c4f40;
  --accent-soft: rgba(209, 241, 224, 0.78);
  --mint: #bcebd0;
  --sage: #dcebdd;
  --shadow: 0 22px 70px rgba(34, 89, 65, 0.15);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  background:
    radial-gradient(circle at 18% 14%, rgba(178, 236, 203, 0.86), transparent 31%),
    radial-gradient(circle at 84% 7%, rgba(205, 241, 223, 0.92), transparent 26%),
    radial-gradient(circle at 72% 86%, rgba(159, 219, 190, 0.48), transparent 34%),
    linear-gradient(135deg, #f8fcf9 0%, #eef8f2 44%, #e2f0e8 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), transparent 72%);
  pointer-events: none;
  position: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

.site-header {
  align-items: center;
  background: rgba(249, 253, 250, 0.7);
  border-bottom: 1px solid rgba(147, 182, 162, 0.25);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 clamp(18px, 5vw, 56px);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(22px) saturate(1.25);
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 750;
  gap: 10px;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, var(--accent-deep), #2f9a73);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 11px;
  box-shadow: 0 10px 26px rgba(22, 118, 87, 0.24);
  color: white;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.status-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.search-page {
  margin: 0 auto;
  max-width: 1120px;
  padding: clamp(46px, 8vw, 96px) clamp(18px, 5vw, 44px) 56px;
  position: relative;
}

.search-hero {
  margin: 0 auto;
  max-width: 900px;
  text-align: center;
}

.kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1 {
  color: #10251c;
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 780;
  line-height: 1.04;
  margin: 0 auto 28px;
  max-width: 760px;
  text-wrap: balance;
}

.search-form {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 118px;
  padding: 11px;
  backdrop-filter: blur(24px) saturate(1.25);
}

.search-form input {
  background: rgba(255, 255, 255, 0.48);
  border: 0;
  border-radius: 13px;
  color: var(--ink);
  min-height: 52px;
  min-width: 0;
  outline: none;
  padding: 0 10px;
}

.search-form input::placeholder {
  color: #8a949b;
}

.search-form button,
.examples button {
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 760;
}

.search-form button {
  background: linear-gradient(135deg, var(--accent-deep), #1d8466);
  box-shadow: 0 12px 26px rgba(21, 116, 86, 0.22);
  color: white;
}

.search-form button:hover {
  transform: translateY(-1px);
}

.search-form button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.examples button {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 26px rgba(36, 89, 63, 0.08);
  color: #52685d;
  min-height: 34px;
  padding: 0 12px;
  backdrop-filter: blur(16px);
}

.examples button:hover {
  background: rgba(226, 248, 235, 0.88);
  border-color: rgba(99, 169, 132, 0.34);
  color: var(--ink);
}

.result-shell {
  margin-top: clamp(34px, 6vw, 64px);
}

.empty-state,
.loading-state {
  align-items: center;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  box-shadow: 0 18px 54px rgba(33, 81, 59, 0.1);
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 160px;
  padding: 28px;
  text-align: center;
  backdrop-filter: blur(24px) saturate(1.16);
}

.empty-state strong {
  color: var(--ink);
}

.loading-state {
  align-content: center;
}

.loader {
  border: 3px solid rgba(220, 238, 227, 0.9);
  border-top-color: var(--accent);
  border-radius: 999px;
  height: 28px;
  width: 28px;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.result-header {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.result-header h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin: 0;
}

.model-pill {
  background: var(--accent-soft);
  border: 1px solid rgba(92, 169, 130, 0.28);
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
  white-space: nowrap;
}

.summary-card,
.answer-grid article {
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(38, 88, 63, 0.09);
  padding: clamp(18px, 3vw, 24px);
  backdrop-filter: blur(22px) saturate(1.14);
}

.summary-card {
  border-left: 5px solid rgba(31, 137, 98, 0.78);
}

h3 {
  color: #14261d;
  font-size: 15px;
  margin: 0 0 10px;
}

p {
  color: var(--muted);
  line-height: 1.58;
  margin: 0;
}

.answer-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-board {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(38, 88, 63, 0.08);
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 24px);
  backdrop-filter: blur(22px) saturate(1.14);
}

.agent-board-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.agent-board-head h3 {
  font-size: clamp(20px, 2.4vw, 28px);
  margin: 0;
}

.agent-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-grid article,
.consensus-card,
.criteria-grid article {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  padding: 16px;
}

.agent-grid span {
  color: var(--accent);
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.board-note {
  font-size: 14px;
}

.criteria-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.criteria-grid article {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.criteria-grid article div {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.criteria-grid strong {
  color: var(--accent-deep);
  font-size: 16px;
}

.criteria-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-align: right;
}

.criteria-grid em {
  background: rgba(223, 235, 228, 0.84);
  border-radius: 999px;
  color: #4e6258;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  justify-self: start;
  padding: 5px 9px;
}

.criteria-grid article[data-status*="met"] em {
  background: rgba(200, 239, 216, 0.94);
  color: #116140;
}

.criteria-grid article[data-status*="conflicting"] em {
  background: rgba(255, 240, 203, 0.96);
  color: #8a5a08;
}

.criteria-grid article[data-status*="not met"] em,
.criteria-grid article[data-status*="not assessed"] em {
  background: rgba(230, 237, 233, 0.84);
  color: #65756d;
}

.criteria-grid p {
  font-size: 13px;
  line-height: 1.45;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.source-row a {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  padding: 9px 13px;
  backdrop-filter: blur(16px);
}

.source-row a:hover {
  background: rgba(221, 247, 232, 0.92);
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid rgba(139, 181, 158, 0.24);
  margin: 16px auto 0;
  max-width: 1120px;
  padding: 22px clamp(18px, 5vw, 44px) 34px;
}

.site-footer p {
  font-size: 13px;
}

.sr-only {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

@media (max-width: 760px) {
  .search-form,
  .answer-grid,
  .agent-grid,
  .criteria-grid {
    grid-template-columns: 1fr;
  }

  .search-form button {
    min-height: 48px;
  }

  .result-header,
  .agent-board-head {
    align-items: start;
    flex-direction: column;
  }

  .site-header {
    min-height: 58px;
  }
}
