@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@10..48,500;10..48,700;10..48,800&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg-1: #eff6ff;
  --bg-2: #fff6e8;
  --ink-strong: #0f355a;
  --ink: #1a4a76;
  --ink-soft: #325f86;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --surface-border: rgba(15, 53, 90, 0.14);
  --brand: #0d6b8d;
  --brand-deep: #0a4e7e;
  --accent: #ff9f43;
  --accent-soft: #ffe1bf;
  --danger-bg: #ffe8e8;
  --danger-border: rgba(164, 36, 36, 0.35);
  --danger-text: #7a1f1f;
  --shadow-soft: 0 16px 36px rgba(14, 43, 76, 0.11);
  --shadow-strong: 0 24px 58px rgba(14, 43, 76, 0.18);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(13, 107, 141, 0.24), transparent 34%),
    radial-gradient(circle at 86% 10%, rgba(255, 159, 67, 0.2), transparent 40%),
    linear-gradient(165deg, var(--bg-1), var(--bg-2));
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -110px;
  left: -130px;
  background: conic-gradient(from 10deg, rgba(13, 107, 141, 0.45), rgba(255, 159, 67, 0.35));
  animation: orb-drift 16s ease-in-out infinite alternate;
}

body::after {
  right: -120px;
  bottom: -120px;
  background: conic-gradient(from 220deg, rgba(10, 78, 126, 0.45), rgba(255, 186, 120, 0.35));
  animation: orb-drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes orb-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, -18px, 0) scale(1.08);
  }
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.15rem 0 2.4rem;
}

.site-header,
.category-nav,
main,
.site-footer {
  opacity: 0;
  transform: translateY(18px);
  animation: enter-up 0.58s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.category-nav {
  animation-delay: 0.08s;
}

main {
  animation-delay: 0.16s;
}

.site-footer {
  animation-delay: 0.24s;
}

@keyframes enter-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-header {
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: clamp(0.85rem, 1.8vw, 1.15rem);
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.91), rgba(255, 246, 235, 0.86));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.brand {
  color: inherit;
  text-decoration: none;
}

.brand-kicker {
  display: none;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.brand-kicker::before {
  content: "";
  width: 0.95rem;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
}

h1 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
}

.lead {
  margin: 0.4rem 0 0;
  max-width: 64ch;
  font-size: clamp(1rem, 1.1vw, 1.08rem);
  color: var(--ink-soft);
}

.hero-subgrid {
  display: none;
  margin-top: 0.95rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.68rem;
}

.hero-chip {
  border-radius: 999px;
  border: 1px solid rgba(10, 78, 126, 0.16);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-strong);
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-chip strong {
  color: var(--brand-deep);
}

.category-nav {
  position: sticky;
  top: 0.56rem;
  z-index: 20;
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 53, 90, 0.14);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(14, 43, 76, 0.08);
  backdrop-filter: blur(9px);
}

.category-nav a {
  text-decoration: none;
  color: var(--ink-strong);
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.45rem 0.86rem;
  font-weight: 700;
  font-size: 0.93rem;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.category-nav a:hover,
.category-nav a:focus-visible {
  transform: translateY(-1px);
  background: rgba(13, 107, 141, 0.1);
  border-color: rgba(13, 107, 141, 0.25);
}

.category-nav a.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(120deg, #0d6b8d, #0a4e7e);
  box-shadow: 0 8px 20px rgba(10, 78, 126, 0.26);
}

main {
  margin-top: 0.9rem;
}

.panel {
  border-radius: var(--radius-xl);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: var(--shadow-strong);
  padding: clamp(1rem, 2.3vw, 1.55rem);
}

.panel h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
}

.panel-intro {
  margin: 0.58rem 0 0;
  color: var(--ink-soft);
}

.stat-strip {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 53, 90, 0.12);
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.92), rgba(234, 247, 255, 0.92));
  padding: 0.72rem 0.8rem;
  min-height: 88px;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -22px;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 159, 67, 0.2), rgba(255, 159, 67, 0));
  pointer-events: none;
}

.stat-label {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ink-soft);
}

.stat-value {
  margin: 0.38rem 0 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: clamp(1.24rem, 2vw, 1.58rem);
  line-height: 1;
  color: var(--ink-strong);
}

.filters {
  margin-top: 1rem;
  display: grid;
  gap: 0.82rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.field-actions {
  justify-content: flex-end;
}

label {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--brand-deep);
}

select,
input[type="search"] {
  width: 100%;
  font: inherit;
  color: var(--ink-strong);
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 53, 90, 0.24);
  background: var(--surface-strong);
  padding: 0.68rem 0.74rem;
  box-shadow: inset 0 1px 2px rgba(15, 53, 90, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

select:focus,
input[type="search"]:focus {
  outline: 3px solid rgba(13, 107, 141, 0.22);
  border-color: var(--brand);
  box-shadow: inset 0 1px 2px rgba(15, 53, 90, 0.08), 0 0 0 1px rgba(13, 107, 141, 0.2);
}

.ghost-button {
  align-self: flex-start;
  font: inherit;
  font-weight: 700;
  color: var(--brand-deep);
  border: 1px solid rgba(10, 78, 126, 0.24);
  border-radius: 999px;
  background: linear-gradient(122deg, #ffffff, #eaf7ff);
  padding: 0.6rem 0.95rem;
  cursor: pointer;
  transition: transform 0.17s ease, box-shadow 0.17s ease, border-color 0.17s ease;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(10, 78, 126, 0.4);
  box-shadow: 0 10px 22px rgba(14, 43, 76, 0.14);
}

.hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.results-meta {
  margin: 0.95rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-strong);
}

.filter-summary {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.table-hint {
  margin: 0.38rem 0 0.68rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.error-banner {
  margin: 0.8rem 0 0;
  padding: 0.76rem 0.84rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
  font-weight: 600;
}

.table-skeleton {
  margin-top: 0.66rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 53, 90, 0.12);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.72rem;
}

.table-skeleton[hidden] {
  display: none;
}

.skeleton-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.52rem;
}

.skeleton-row:last-child {
  margin-bottom: 0;
}

.skeleton-row span {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(100deg, #e9f3fb 10%, #f9fdff 28%, #dfeef8 45%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 53, 90, 0.16);
  background: var(--surface-strong);
  box-shadow: inset 0 1px 2px rgba(15, 53, 90, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #eaf7ff, #dff0fc);
}

.table-sort-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.table-sort-button .sort-label {
  display: inline-flex;
  align-items: center;
  min-height: 1.3rem;
}

.table-sort-button .sort-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 78, 126, 0.16);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1;
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

thead th[aria-sort="none"] .sort-icon {
  opacity: 0.68;
}

thead th[aria-sort="ascending"] .sort-icon,
thead th[aria-sort="descending"] .sort-icon {
  color: var(--brand-deep);
  border-color: rgba(10, 78, 126, 0.3);
  background: rgba(13, 107, 141, 0.15);
}

.table-sort-button:hover .sort-icon,
.table-sort-button:focus-visible .sort-icon {
  transform: translateY(-1px);
}

th,
td {
  padding: 0.67rem 0.74rem;
  text-align: left;
  border-bottom: 1px solid rgba(15, 53, 90, 0.08);
  vertical-align: top;
  font-size: 0.93rem;
}

th {
  color: var(--ink-strong);
  font-weight: 800;
}

tbody tr {
  transition: background-color 0.18s ease;
}

tbody tr:nth-child(even) {
  background: #f8fcff;
}

tbody tr:hover {
  background: #eef7ff;
}

.empty-state {
  margin: 0.78rem 0 0;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(15, 53, 90, 0.24);
  background: rgba(255, 255, 255, 0.74);
  padding: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.site-footer {
  margin-top: 1rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-soft);
  padding: 0.8rem 0.92rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0.36rem 0;
}

.site-footer a {
  color: var(--brand-deep);
  font-weight: 700;
}

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

.noscript {
  margin-top: 0.9rem;
  padding: 0.82rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 159, 67, 0.45);
  background: #fff6e7;
  color: #6e4305;
}

:focus-visible {
  outline: 3px solid rgba(13, 107, 141, 0.28);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .category-nav {
    border-radius: var(--radius-lg);
    top: 0.36rem;
  }

  table {
    min-width: 600px;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(1160px, calc(100% - 1.2rem));
    padding-bottom: 1.5rem;
  }

  .site-header,
  .panel,
  .site-footer {
    border-radius: var(--radius-lg);
  }

  .category-nav {
    position: static;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }

  .category-nav a {
    white-space: nowrap;
  }

  .hero-subgrid,
  .filters,
  .stat-strip {
    grid-template-columns: 1fr;
  }

  .field-actions {
    align-items: flex-start;
  }

  table {
    min-width: 560px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.docs-panel {
  display: grid;
  gap: 0.9rem;
}

.docs-grid {
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.docs-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 53, 90, 0.12);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.82rem 0.9rem;
}

.docs-card h3 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.15rem;
  color: var(--ink-strong);
}

.docs-list,
.docs-links {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.docs-list li,
.docs-links li {
  margin: 0.26rem 0;
}

.docs-links a {
  color: var(--brand-deep);
  font-weight: 700;
}

.code-block {
  margin: 0.4rem 0 0.55rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 53, 90, 0.18);
  background: #0f2c4a;
  color: #f3f8ff;
  padding: 0.62rem 0.72rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.3;
}

.code-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
