:root {
  --ink: #102b37;
  --ink-soft: #31505b;
  --paper: #f5f0e6;
  --paper-bright: #fffdf7;
  --line: rgba(16, 43, 55, 0.16);
  --orange: #e85631;
  --orange-deep: #bd3e20;
  --lime: #c6dd55;
  --sky: #7fc7d9;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(22, 47, 57, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 11px;
  --display: Georgia, "Times New Roman", serif;
  --body: "Trebuchet MS", "Gill Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  background:
    linear-gradient(rgba(16, 43, 55, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 43, 55, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(3px);
  pointer-events: none;
}

.ambient-one {
  width: 38vw;
  height: 38vw;
  top: -20vw;
  right: -10vw;
  background: radial-gradient(circle, rgba(198, 221, 85, 0.42), rgba(198, 221, 85, 0));
}

.ambient-two {
  width: 30vw;
  height: 30vw;
  bottom: -16vw;
  left: -13vw;
  background: radial-gradient(circle, rgba(127, 199, 217, 0.36), rgba(127, 199, 217, 0));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr minmax(260px, 420px);
  align-items: center;
  gap: 30px;
  min-height: 82px;
  padding: 14px clamp(20px, 4vw, 64px);
  color: var(--white);
  background: rgba(16, 43, 55, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border: 2px solid var(--lime);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span::before {
  content: "";
  position: absolute;
  background: var(--lime);
}

.brand-mark::before {
  width: 2px;
  height: 100%;
  left: calc(50% - 1px);
}

.brand-mark::after {
  width: 10px;
  height: 20px;
  top: 9px;
  left: -2px;
  border: 2px solid var(--lime);
  border-left: 0;
  background: transparent;
  border-radius: 0 12px 12px 0;
}

.brand-mark span::before {
  width: 5px;
  height: 5px;
  top: 17px;
  left: 17px;
  border-radius: 50%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--display);
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  gap: 24px;
}

.primary-nav a {
  position: relative;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--lime);
}

.header-search {
  display: flex;
  gap: 8px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
}

.header-search:focus-within {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(198, 221, 85, 0.16);
}

.header-search input {
  min-width: 0;
  flex: 1;
  padding: 9px 14px;
  color: var(--white);
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.header-search button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  background: var(--lime);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.header-search button:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.18);
}

.button-secondary {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.button-dark {
  color: var(--white);
  background: var(--ink);
}

main {
  width: min(1220px, calc(100% - 40px));
  min-height: calc(100vh - 155px);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 76px) 0 80px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 30px;
  min-height: 440px;
  padding: clamp(34px, 6vw, 76px);
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  width: 370px;
  height: 370px;
  right: -90px;
  bottom: -130px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255, 255, 255, 0.035), 0 0 0 110px rgba(255, 255, 255, 0.025);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--lime);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: currentColor;
  border-radius: 9px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.02;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--lime);
  font-weight: 500;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.65;
}

.hero-search {
  display: flex;
  max-width: 640px;
  gap: 10px;
  margin-top: 30px;
  padding: 8px;
  background: var(--paper-bright);
  border-radius: 999px;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.hero-side {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 12px;
}

.signal-card {
  padding: 22px;
  color: var(--ink);
  background: var(--lime);
  border-radius: var(--radius-md);
  transform: rotate(2deg);
}

.signal-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 2rem;
}

.signal-card p {
  margin: 0;
  line-height: 1.5;
}

.section {
  margin-top: clamp(50px, 7vw, 88px);
}

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

.section-heading h2,
.page-heading h1 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.page-heading h1 {
  max-width: none;
}

.section-heading p,
.page-heading p {
  max-width: 540px;
  margin-bottom: 4px;
  color: var(--ink-soft);
  line-height: 1.6;
}

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

.data-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 253, 247, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 25px rgba(28, 55, 64, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  animation: reveal 420ms both;
}

.data-card:nth-child(2n) {
  animation-delay: 50ms;
}

.data-card:nth-child(3n) {
  animation-delay: 100ms;
}

.data-card:hover {
  transform: translateY(-5px);
  border-color: var(--orange);
  box-shadow: var(--shadow);
}

.card-kicker,
.meta-label {
  color: var(--orange-deep);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.data-card h3 {
  margin: 28px 0 10px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 500;
}

.data-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.card-arrow {
  position: absolute;
  right: 22px;
  bottom: 18px;
  font-size: 1.5rem;
}

.identity-mark {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--white);
  font-family: var(--display);
  font-size: 1.25rem;
  background: var(--ink);
  border-radius: 16px 16px 16px 4px;
}

.identity-mark.orange {
  background: var(--orange);
}

.identity-mark.sky {
  color: var(--ink);
  background: var(--sky);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.breadcrumb a {
  color: var(--orange-deep);
  font-weight: 700;
  text-decoration: none;
}

.detail-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  padding: clamp(26px, 5vw, 52px);
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius-lg);
}

.detail-hero .identity-mark {
  width: 88px;
  height: 88px;
  color: var(--ink);
  font-size: 2rem;
  background: var(--lime);
  border-radius: 26px 26px 26px 7px;
}

.detail-hero h1 {
  margin: 7px 0 10px;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
}

.detail-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
}

.fact {
  padding: 18px;
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.fact dt {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fact dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
}

.table-shell {
  overflow: hidden;
  background: rgba(255, 253, 247, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 25px rgba(28, 55, 64, 0.06);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 17px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  color: var(--ink-soft);
  font-size: 0.71rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: rgba(198, 221, 85, 0.11);
}

.data-table a {
  font-weight: 800;
  text-decoration-color: var(--orange);
  text-underline-offset: 4px;
}

.tag {
  display: inline-flex;
  padding: 6px 10px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(127, 199, 217, 0.2);
  border-radius: 999px;
}

.search-summary {
  margin: -10px 0 28px;
  color: var(--ink-soft);
}

.result-list {
  display: grid;
  gap: 11px;
}

.result-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: transform 160ms ease, border-color 160ms ease;
}

.result-row:hover {
  transform: translateX(4px);
  border-color: var(--orange);
}

.result-row .identity-mark {
  width: 46px;
  height: 46px;
  font-size: 1rem;
  border-radius: 13px 13px 13px 4px;
}

.result-name {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 1.25rem;
}

.result-context {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.pagination span {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.pagination .button[aria-disabled="true"] {
  opacity: 0.42;
  pointer-events: none;
}

.loading-view,
.empty-state,
.error-state {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 50px 24px;
  text-align: center;
  background: rgba(255, 253, 247, 0.65);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

.loading-ball {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(16, 43, 55, 0.16);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 760ms linear infinite;
}

.empty-state .identity-mark,
.error-state .identity-mark {
  width: 70px;
  height: 70px;
  font-size: 1.6rem;
}

.empty-state h2,
.error-state h2 {
  margin: 8px 0 0;
  font-size: 2rem;
}

.empty-state p,
.error-state p {
  max-width: 520px;
  margin-bottom: 8px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 4vw, 64px);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  background: var(--ink);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-pill i {
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(198, 221, 85, 0.13);
}

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

@keyframes reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    justify-self: end;
  }

  .header-search {
    grid-column: 1 / -1;
  }

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

  .hero-side {
    max-width: 430px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    gap: 12px;
    padding: 13px 16px;
  }

  .brand small {
    display: none;
  }

  .primary-nav {
    gap: 14px;
  }

  .primary-nav a {
    font-size: 0.7rem;
  }

  main {
    width: min(100% - 24px, 1220px);
    padding-top: 26px;
  }

  .hero {
    min-height: auto;
    padding: 30px 22px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 15vw, 4rem);
  }

  .hero-search {
    align-items: stretch;
    border-radius: var(--radius-sm);
  }

  .hero-search .button {
    padding: 0 13px;
  }

  .section-heading,
  .page-heading {
    display: block;
  }

  .section-heading p,
  .page-heading p {
    margin-top: 12px;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }

  .detail-hero .identity-mark {
    width: 66px;
    height: 66px;
  }

  .table-shell {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    margin-bottom: 10px;
    padding: 13px 16px;
    background: var(--paper-bright);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }

  .data-table td {
    padding: 5px 0;
    border: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 90px;
    color: var(--ink-soft);
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .result-row {
    grid-template-columns: 42px 1fr;
  }

  .result-row > .tag {
    grid-column: 2;
    justify-self: start;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
