:root {
  --navy: #07192f;
  --navy-2: #0b2442;
  --ink: #111827;
  --soft-ink: #394150;
  --muted: #6b7280;
  --page: #f3f5f8;
  --white: #ffffff;
  --line: #dde5ee;
  --line-soft: #e8edf3;
  --teal: #13a89e;
  --blue: #0a66c2;
  --blue-bg: #edf6ff;
  --green: #0f7a4a;
  --green-bg: #e9f8f1;
  --amber: #946313;
  --amber-bg: #fff7e6;
  --red: #b42318;
  --red-bg: #fef3f2;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Header — extension navy gradient */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(135deg, rgba(19, 168, 158, 0.14), rgba(10, 102, 194, 0.06) 45%, transparent 70%),
    linear-gradient(180deg, var(--navy-2), var(--navy));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.brand img {
  display: block;
  width: 132px;
  height: auto;
}

.main-nav {
  display: flex;
  gap: 20px;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0;
  transition: color 150ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
}

/* Hero */
.hero {
  padding: 40px 0 48px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 380px);
  gap: 40px;
  align-items: start;
}

.hero-copy h1 {
  color: var(--ink);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-copy > p {
  margin-top: 10px;
  color: var(--soft-ink);
  font-size: 0.95rem;
  max-width: 42ch;
}

.hero-meta {
  margin-top: 16px !important;
  color: var(--muted) !important;
  font-size: 0.8rem !important;
}

.finder-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  padding: 0 36px 0 12px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.field select:disabled {
  background-color: #f6f8fb;
  color: #9ca3af;
  cursor: not-allowed;
}

.field select:focus-visible,
.btn-primary:focus-visible,
.popular-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.btn-primary {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--teal), #0f9489);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 150ms ease, transform 150ms ease;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #c5cad3;
  cursor: not-allowed;
  transform: none;
}

.finder-status {
  min-height: 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

/* Results */
.results {
  padding: 0 0 48px;
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.results-eyebrow {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.results-header h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.badge {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 700;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.facts div {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.facts dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.facts dd {
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.insights-block h3 {
  margin-bottom: 12px;
  color: var(--soft-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.insight-type {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.insight-card.strong .insight-type {
  background: var(--green-bg);
  color: var(--green);
}

.insight-card.balanced .insight-type {
  background: #f0f4f8;
  color: var(--soft-ink);
}

.insight-card.attention .insight-type {
  background: var(--red-bg);
  color: var(--red);
}

.insight-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.insight-card p {
  margin-top: 6px;
  color: var(--soft-ink);
  font-size: 0.84rem;
  line-height: 1.5;
}

.insight-empty {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.results-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.75rem;
}

/* Popular */
.popular {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
}

.section-title {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.popular-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.popular-card:hover {
  border-color: var(--line);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.popular-card .popular-brand {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.popular-card strong {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.popular-card .popular-years {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.popular-card .popular-focus {
  margin-top: 10px;
  color: var(--soft-ink);
  font-size: 0.76rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.55);
}

.footer-inner {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.75rem;
}

.footer-logo {
  display: block;
  width: 96px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}

[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .results-header {
    flex-direction: column;
    gap: 10px;
  }

  .popular-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .shell {
    width: min(100% - 24px, 620px);
  }

  .brand img {
    width: 108px;
  }

  .popular-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
