:root {
  --bg: #0b1020;
  --bg-soft: #121a33;
  --hero-glow: #1f2f68;
  --panel: #161f3d;
  --text: #e8ecf8;
  --muted: #b7c0dc;
  --brand: #5ea2ff;
  --brand-strong: #3b82f6;
  --line: #2a355c;
  --button-surface: rgba(255, 255, 255, 0.03);
  --footer-text: #9ca9cf;
  --radius: 14px;
}

:root[data-theme="light"] {
  --bg: #f4f7ff;
  --bg-soft: #e8eeff;
  --hero-glow: #d7e4ff;
  --panel: #ffffff;
  --text: #0f1a35;
  --muted: #4f5d7f;
  --brand: #2f63d9;
  --brand-strong: #214db7;
  --line: #c8d3ef;
  --button-surface: rgba(255, 255, 255, 0.9);
  --footer-text: #5c6a90;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, var(--hero-glow) 0%, var(--bg) 42%);
  line-height: 1.6;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1120px;
  padding-left: 12px;
  padding-right: 12px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 58px;
  padding: 6px 0;
  gap: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 0 0 auto;
}

.nav-toggle {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--button-surface);
  color: var(--text);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.brand {
  display: block;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1rem;
  padding-left: 6px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: min(280px, calc(100vw - 20px));
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 92%, black 8%);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  z-index: 120;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  display: block;
  padding: 6px 4px;
}

.nav-actions.open .nav {
  display: flex;
}

.nav a:hover,
.links-row a:hover {
  color: var(--brand);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--button-surface);
  color: var(--text);
  min-width: 36px;
  padding: 7px 8px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.theme-toggle #theme-label {
  display: none;
}

.theme-toggle::before {
  content: "◐";
  font-size: 0.9rem;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.hero {
  padding: 34px 0 24px;
}

.product-hero {
  padding-bottom: 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.35rem, 8.6vw, 1.85rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.35rem, 6.6vw, 1.7rem);
  margin-bottom: 18px;
}

.lead {
  color: var(--muted);
  font-size: 0.92rem;
}

.titleline {
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.88rem;
}

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

.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--button-surface);
}

.hero-card,
.card,
.list-card,
.stack-card {
  background: color-mix(in srgb, var(--panel) 88%, black 12%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.product-card {
  max-width: 860px;
}

.hero-card h2 {
  font-size: 1.12rem;
}

.section {
  padding: 36px 0;
}

.section-alt {
  background: color-mix(in srgb, var(--bg-soft) 80%, transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.three-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

ul {
  margin: 0;
  padding-left: 18px;
}

li {
  margin: 0 0 8px;
  color: var(--muted);
}

p {
  color: var(--muted);
}

.certifications-grid .card p {
  margin-bottom: 0;
}

.medium-status {
  color: var(--muted);
  margin-bottom: 14px;
}

.medium-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px 8px;
  scroll-snap-type: x proximity;
  max-width: 100%;
}

.medium-card {
  background: color-mix(in srgb, var(--panel) 88%, black 12%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  width: 240px;
  min-width: 240px;
  flex: 0 0 240px;
  scroll-snap-align: start;
}

.medium-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 9px;
  border: 1px solid var(--line);
}

.medium-card h3 {
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.medium-card h3 a {
  text-decoration: none;
  color: var(--text);
}

.medium-card h3 a:hover {
  color: var(--brand);
}

.medium-date {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--brand);
  font-weight: 600;
}

.medium-excerpt {
  margin: 0;
  font-size: 0.9rem;
  line-clamp: 3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.medium-grid::-webkit-scrollbar {
  height: 8px;
}

.medium-grid::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--line) 78%, var(--brand) 22%);
  border-radius: 99px;
}

.card,
.hero-card,
.list-card,
.stack-card {
  padding: 14px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: color-mix(in srgb, var(--panel) 88%, black 12%);
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--text);
  font-size: 0.94rem;
  background: color-mix(in srgb, var(--bg-soft) 65%, transparent);
}

td {
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.split-top {
  margin-top: 16px;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  position: relative;
  padding-left: 26px;
}

.checklist li::before {
  content: "✓";
  color: var(--brand);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

.contact-section {
  text-align: center;
}

.contact-wrap {
  width: min(760px, 92vw);
}

.links-row {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.links-row a {
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-surface);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.footer-wrap {
  display: flex;
  justify-content: center;
}

.footer-wrap p {
  margin: 0;
  color: var(--footer-text);
  font-size: 0.95rem;
}

@media (min-width: 951px) {
  .container {
    width: min(1120px, 92vw);
  }

  .nav-wrap {
    display: flex;
    min-height: 72px;
    padding: 0;
    gap: 12px;
    justify-content: space-between;
  }

  .nav-actions {
    gap: 12px;
  }

  .brand {
    padding-left: 0;
  }

  .nav-toggle {
    display: none;
  }

  .nav {
    display: flex;
    position: static;
    min-width: 0;
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 18px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .nav a {
    display: inline;
    padding: 0;
  }

  .theme-toggle {
    min-width: auto;
    padding: 8px 13px;
    font-size: 0.92rem;
  }

  .theme-toggle #theme-label {
    display: inline;
  }

  .theme-toggle::before {
    content: none;
  }

  .hero {
    padding: 72px 0 38px;
  }

  .hero-grid {
    grid-template-columns: 1.3fr 0.9fr;
    gap: 26px;
  }

  .eyebrow {
    font-size: 1rem;
    letter-spacing: 0.03em;
  }

  h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.2;
  }

  h2 {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  }

  .lead {
    font-size: 1.04rem;
  }

  .titleline {
    font-size: 1rem;
  }

  .btn {
    padding: 11px 18px;
    font-size: 1rem;
  }

  .section {
    padding: 56px 0;
  }

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

  .two-col {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card,
  .hero-card,
  .list-card,
  .stack-card {
    padding: 18px;
  }
}

@media (max-width: 375px) {
  .brand {
    font-size: 1.02rem;
  }

  .nav-toggle,
  .theme-toggle {
    font-size: 0.8rem;
  }

  h1 {
    font-size: clamp(1.28rem, 8vw, 1.6rem);
  }

  .lead {
    font-size: 0.9rem;
  }
}
