:root {
  color-scheme: dark;
  --ink: #f5fbff;
  --muted: #9db2c8;
  --line: rgba(89, 184, 255, 0.22);
  --page: #020914;
  --panel: rgba(6, 18, 32, 0.86);
  --panel-solid: #08192b;
  --blue: #42b8ff;
  --blue-2: #0a7bd5;
  --white: #ffffff;
  --gold: #d5b16c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 70% 0%, rgba(27, 137, 221, 0.22), transparent 34rem),
    linear-gradient(180deg, #03101f 0%, var(--page) 36rem);
  color: var(--ink);
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.site-header {
  min-height: 100vh;
  position: relative;
  background: #020914;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 58px);
  background: rgba(2, 9, 20, 0.72);
  border-bottom: 1px solid rgba(83, 184, 255, 0.18);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__mark {
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  border: 2px solid var(--blue);
  border-radius: 18px 18px 22px 22px;
  box-shadow: inset 0 0 22px rgba(66, 184, 255, 0.18), 0 0 26px rgba(66, 184, 255, 0.18);
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0.08em;
}

.brand strong {
  font-size: clamp(1rem, 2vw, 1.28rem);
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.topbar__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar__links a {
  color: rgba(245, 251, 255, 0.88);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 10px 12px;
}

.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding-top: 78px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 9, 20, 0.08), rgba(2, 9, 20, 0.02) 55%, rgba(2, 9, 20, 0.28)),
    linear-gradient(0deg, #020914 0%, rgba(2, 9, 20, 0) 34%);
  pointer-events: none;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100% - 32px));
  margin: 0 0 clamp(26px, 6vw, 58px) clamp(16px, 5vw, 70px);
  padding: clamp(16px, 3vw, 24px);
  background: linear-gradient(135deg, rgba(4, 15, 29, 0.9), rgba(6, 24, 45, 0.66));
  border: 1px solid rgba(83, 184, 255, 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  opacity: 1;
  transition: transform 420ms ease, opacity 420ms ease, visibility 420ms ease;
}

.hero__panel.is-hidden {
  transform: translateY(-34px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 251, 255, 0.26);
  border-radius: 999px;
  background: rgba(2, 9, 20, 0.72);
  color: var(--white);
  font-weight: 950;
  cursor: pointer;
}

.hero__close:hover,
.hero__close:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

h1 {
  margin: 0;
  max-width: 680px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 5vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero__panel h1 {
  font-size: clamp(1.85rem, 3vw, 3rem);
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
}

.hero__panel p:not(.eyebrow) {
  max-width: 640px;
  margin: 18px 0 0;
  color: rgba(245, 251, 255, 0.82);
  font-size: clamp(1rem, 1.6vw, 1.17rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: linear-gradient(180deg, #65d1ff, #0a86e8);
  color: #001323;
  box-shadow: 0 12px 34px rgba(66, 184, 255, 0.28);
}

.button--ghost {
  border-color: rgba(245, 251, 255, 0.28);
  color: var(--white);
  background: rgba(245, 251, 255, 0.06);
}

.intro {
  position: relative;
  z-index: 2;
  padding: 34px 0;
  background: linear-gradient(90deg, #04101f, #08294a 52%, #04101f);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.band {
  padding: clamp(54px, 8vw, 96px) 0;
}

.band--warm {
  background:
    linear-gradient(180deg, rgba(9, 31, 55, 0.96), rgba(2, 9, 20, 0.96)),
    radial-gradient(circle at right, rgba(66, 184, 255, 0.18), transparent 32rem);
}

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

.intro h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.stats article {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.045);
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  font-size: 1.55rem;
  color: var(--white);
}

.stats span {
  color: var(--muted);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.section-note {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.5;
}

.search {
  width: min(420px, 100%);
  display: grid;
  gap: 8px;
  color: var(--white);
  font-weight: 850;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(3, 14, 26, 0.92);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

input::placeholder {
  color: #6f859a;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  padding: 9px 13px;
  font-weight: 850;
  cursor: pointer;
}

.filter[aria-pressed="true"] {
  color: #001323;
  background: var(--blue);
  border-color: var(--blue);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card,
.claim,
.response-box {
  background: linear-gradient(180deg, rgba(8, 25, 43, 0.94), rgba(4, 14, 27, 0.94));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card {
  display: grid;
  gap: 14px;
  min-height: 330px;
  padding: 20px;
}

.tag {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(66, 184, 255, 0.12);
  color: var(--blue);
  border: 1px solid rgba(66, 184, 255, 0.22);
  font-size: 0.8rem;
  font-weight: 950;
}

.card p,
.claim p,
.builder p,
.sources p {
  color: var(--muted);
  line-height: 1.55;
}

.card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.claim-list {
  display: grid;
  gap: 12px;
}

.claim {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  padding: 18px;
}

.claim__name {
  color: var(--gold);
  font-weight: 950;
}

.builder {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.builder__form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.builder__form label {
  display: grid;
  gap: 8px;
  color: var(--white);
  font-weight: 850;
}

.response-box {
  min-height: 410px;
  padding: 22px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.response-box__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 950;
}

.icon-button {
  min-height: 38px;
  background: var(--blue);
  color: #001323;
}

#generatedResponse {
  margin: 18px 0 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.68;
  white-space: pre-wrap;
}

.sources {
  border-top: 1px solid var(--line);
}

.sources ul {
  margin: 22px 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .topbar {
    position: sticky;
  }

  .hero {
    min-height: 82vh;
  }

  .hero__image {
    object-position: 62% center;
  }

  .hero__panel {
    margin-left: 16px;
    margin-bottom: 18px;
  }

  .section-head,
  .builder {
    display: grid;
  }

  .grid,
  .stats {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    display: grid;
  }

  .topbar__links {
    justify-content: flex-start;
  }

  .topbar__links a {
    padding: 8px 9px;
  }

  .hero {
    min-height: 760px;
    padding-top: 128px;
    align-items: end;
  }

  .hero__image {
    height: 64%;
    object-position: 58% top;
  }

  .hero::after {
    background:
      linear-gradient(0deg, #020914 0%, rgba(2, 9, 20, 0.82) 46%, rgba(2, 9, 20, 0.12) 72%),
      linear-gradient(90deg, rgba(2, 9, 20, 0.36), transparent);
  }

  .hero__panel {
    align-self: end;
    margin: 0 auto 14px;
  }

  .hero__actions .button {
    width: 100%;
  }

  .card {
    min-height: auto;
  }
}
