:root {
  color-scheme: light dark;
  --bg: #f4f6f8;
  --fg: #121722;
  --muted: #5f6b7a;
  --line: #d7dde5;
  --accent: #0b6f68;
  --accent-2: #465f96;
  --warn: #b45309;
  --danger: #b42318;
  --ok: #15803d;
  --surface: rgba(255, 255, 255, 0.78);
  --panel: #ffffff;
  --panel-soft: #eef2f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #11151b;
    --fg: #f1f5f9;
    --muted: #aab4c0;
    --line: #323b47;
    --accent: #36c7b8;
    --accent-2: #91a9e8;
    --warn: #f59e0b;
    --danger: #fb7185;
    --ok: #4ade80;
    --surface: rgba(255, 255, 255, 0.06);
    --panel: #171c23;
    --panel-soft: #1f2732;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
}

h1, h2, h3, p {
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 52px;
  margin-bottom: var(--header-gap, 0);
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}

.brand-copy {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.brand-tagline {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.brand-tagline::before {
  content: "\00b7";
  margin-right: 8px;
  color: var(--line);
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  font-size: 24px;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 14px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.site-nav > a:not(.nav-cta),
.nav-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
}

.site-nav > a:not(.nav-cta):hover,
.site-nav > a:not(.nav-cta):focus-visible,
.nav-menu summary:hover,
.nav-menu summary:focus-visible,
.nav-menu[open] summary {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.site-nav > .nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.site-nav > .nav-cta:hover,
.site-nav > .nav-cta:focus-visible {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

@media (min-width: 821px) {
  .site-nav > *:not(:first-child):not(.nav-cta) {
    position: relative;
  }

  .site-nav > *:not(:first-child):not(.nav-cta)::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -8px;
    width: 1px;
    height: 16px;
    background: var(--line);
    pointer-events: none;
    transform: translateY(-50%);
  }
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker { display: none; }

.nav-menu summary::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.nav-menu[open] summary::after { transform: rotate(-135deg) translateY(-1px); }

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  min-width: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(18, 23, 34, 0.12);
}

.nav-menu-panel a {
  white-space: nowrap;
}

.site-footer {
  width: min(1040px, 100%);
  display: grid;
  gap: 8px;
  justify-items: center;
  color: var(--muted);
  font-size: 14px;
  margin: var(--footer-gap, 52px) auto 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
}

.footer-note,
.footer-trademark,
.footer-copy {
  margin: 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;
}

@media (max-width: 1100px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .brand-tagline::before {
    content: "";
    margin-right: 0;
  }

  .site-nav {
    display: grid;
    gap: 4px;
  }

  .nav-menu-panel {
    position: static;
    margin-top: 10px;
    box-shadow: none;
  }
}
