:root {
  color-scheme: light;
  --ink: #16161d;
  --muted: #686a75;
  --paper: #faf8f2;
  --line: #d8d2c4;
  --panel: #ffffff;
  --blue: #1616b4;
  --aqua: #b8faf6;
  --rose: #f0cdc2;
  --lav: #c9b3f5;
  --green: #137a4f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 242, 0.9);
  backdrop-filter: blur(18px);
}

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

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

.brand strong {
  font-size: 18px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--blue);
  background: linear-gradient(135deg, var(--aqua), var(--lav));
  color: var(--blue);
  font-family: Georgia, serif;
  font-size: 25px;
  font-style: italic;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

nav a,
.secondary,
.primary,
.links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 13px;
  text-decoration: none;
  font-size: 14px;
}

nav a:hover,
.secondary:hover,
.links a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 150px);
  padding: clamp(46px, 8vw, 92px) 0 40px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.02;
}

h1 {
  max-width: 760px;
  font-size: clamp(48px, 9vw, 104px);
}

h2 {
  font-size: clamp(30px, 5vw, 54px);
}

.lead {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.visual {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.notice,
.panel,
.grid-section article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.notice {
  padding: 22px 24px;
}

.notice p,
.grid-section p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.panel {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
}

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

.view {
  display: none;
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.view.is-active {
  display: block;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.metrics article {
  min-height: 116px;
  padding: 20px;
  background: #fff;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  display: block;
  margin-top: 12px;
  overflow-wrap: anywhere;
  font-size: clamp(19px, 3vw, 30px);
  font-weight: 650;
}

.metrics .ok {
  color: var(--green);
}

.metrics .bad {
  color: #b42828;
}

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

.grid-section article {
  padding: 26px;
}

.grid-section h2 {
  font-size: 32px;
}

.grid-section h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 10px 14px;
}

.tab.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td.mono,
.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.lookup-form input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  font: inherit;
}

.lookup-form button {
  min-height: 46px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font: inherit;
  padding: 0 20px;
}

.json-box {
  margin: 16px 0 0;
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #16161d;
  color: #f7f2e7;
  font-size: 13px;
  line-height: 1.55;
  padding: 18px;
  white-space: pre-wrap;
}

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

.links a {
  background: #fff;
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.api-note {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  width: min(1180px, calc(100% - 32px));
  margin: 50px auto 0;
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 840px) {
  .topbar,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .metrics,
  .grid-section,
  .links {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .lookup-form {
    grid-template-columns: 1fr;
  }
}
