:root {
  color-scheme: dark;
  --bg: #090c10;
  --surface: #121821;
  --surface-2: #17202c;
  --text: #eef2f7;
  --muted: #a8b2c1;
  --line: #2b3748;
  --gold: #d9b96e;
  --blue: #8fb7ff;
  --green: #88d0a6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 185, 110, 0.14), transparent 32rem),
    linear-gradient(180deg, #090c10 0%, #0d1118 45%, #090c10 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.7;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 12px;
  background: rgba(9, 12, 16, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-nav a,
.resource-links a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
}

.site-nav a:hover,
.resource-links a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.site-nav .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.site-nav img.brand-logo,
.brand-logo {
  display: inline-block;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 22px;
  vertical-align: middle;
}

header,
section,
footer,
.container.hero,
.container.page-header {
  max-width: 1040px;
  margin: 34px auto;
  padding: 30px;
  background: rgba(18, 24, 33, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

header.hero,
.container.hero {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 92px;
  padding-bottom: 72px;
}

header.page-header,
.container.page-header {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 72px;
  padding-bottom: 54px;
}

header.hero > :last-child,
header.page-header > :last-child,
.container.hero > :last-child,
.container.page-header > :last-child {
  margin-bottom: 0;
}

.eyebrow {
  color: var(--green);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0;
  margin: 0 0 14px;
}

.kicker {
  color: var(--green);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0;
  font-weight: bold;
  margin: 0 0 14px;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 0.95;
}

header.page-header h1,
.container.page-header h1 {
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1;
}

header.hero h2,
header.page-header h2,
.container.hero h2,
.container.page-header h2 {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  margin: 20px 0 0;
}

header.hero p:not(.eyebrow):not(.kicker):not(.meta):not(.note),
header.page-header p:not(.eyebrow):not(.kicker):not(.meta):not(.note),
.container.hero p:not(.eyebrow):not(.kicker):not(.meta):not(.note),
.container.page-header p:not(.eyebrow):not(.kicker):not(.meta):not(.note) {
  max-width: 760px;
  color: var(--muted);
  font-size: 22px;
  margin: 22px 0 0;
}

h2 {
  color: var(--gold);
  margin-top: 0;
}

h3 {
  color: var(--text);
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 22px;
  margin: 24px 0;
}

.subtitle {
  max-width: 760px;
  color: var(--muted);
  font-size: 22px;
  margin: 24px 0;
}

.note {
  color: var(--muted);
  max-width: 860px;
  padding: 18px;
  background: rgba(143, 183, 255, 0.08);
  border: 1px solid rgba(143, 183, 255, 0.35);
  border-radius: 8px;
}

.meta {
  color: var(--gold);
  font-size: 16px;
  margin-top: 18px;
}

blockquote {
  margin: 25px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--gold);
  background: rgba(217, 185, 110, 0.08);
  border-radius: 0 8px 8px 0;
  font-size: 20px;
}

.formula {
  background: #0f141c;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-size: 28px;
  margin: 25px 0;
  border: 1px solid var(--line);
}

.hero-formula {
  max-width: 520px;
  color: var(--gold);
  font-size: clamp(30px, 5vw, 54px);
}

.section-grid,
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.panel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.link-card {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text);
  text-decoration: none;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.link-card:hover {
  border-color: var(--gold);
}

.link-card span {
  color: var(--gold);
  font-size: 14px;
}

.link-card strong {
  font-size: 18px;
  line-height: 1.35;
}

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

pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.6;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

a {
  color: var(--blue);
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 16px;
}

.footer-nav a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
}

.footer-nav a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

footer {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 760px) {
  header,
  section,
  footer {
    margin: 18px 12px;
    padding: 20px;
  }

  .hero {
    min-height: auto;
  }

  header.hero,
  header.page-header,
  .container.hero,
  .container.page-header {
    min-height: auto;
  }

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

  .lead {
    font-size: 18px;
  }

  td {
    display: block;
    padding: 8px 0;
  }
}
