:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-border: #d9dfef;
  --text: #182033;
  --muted: #58637d;
  --accent: #5f4bdb;
  --accent-soft: #ece9ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 280px);
  color: var(--text);
}

.hero,
main {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  padding: 3rem 0 2rem;
  align-items: start;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.75rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 62ch;
}

.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(47, 61, 112, 0.08);
}

.hero-card {
  padding: 1.25rem 1.5rem;
}

.hero-card ul,
.structure-list,
.info-panel ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #cfd7ea;
  background: #fbfcff;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.results-panel,
.info-panel {
  padding: 1.25rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.secondary-button {
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.results {
  display: grid;
  gap: 1rem;
}

.result-card {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: #fafbff;
  border: 1px solid #e3e7f5;
}

.result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.result-date {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.result-year {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.result-description {
  color: var(--muted);
}

.result-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.result-meta dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.result-meta dd {
  margin: 0;
  font-weight: 600;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #ccd5eb;
  border-radius: 18px;
  background: #fcfdff;
}

.sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

@media (max-width: 900px) {
  .hero,
  .layout,
  .filters,
  .result-meta {
    grid-template-columns: 1fr;
  }

  .results-header {
    flex-direction: column;
  }
}
