:root {
  color-scheme: dark;
  --site-background: #252b2e;
  --site-surface: #30383a;
  --site-ink: #f0ede5;
  --site-text: #d5d6ce;
  --site-muted: #b9c1b9;
  --site-line: #505b58;
  --site-accent: #9ad4c5;
  --site-accent-hover: #bce4d9;
}

:root[data-theme="light"] {
  color-scheme: light;
  --site-background: #f4f1ec;
  --site-surface: #faf7f2;
  --site-ink: #293032;
  --site-text: #494d4b;
  --site-muted: #5f6560;
  --site-line: #d9d4cb;
  --site-accent: #27645f;
  --site-accent-hover: #174a46;
}

:root {
  --theme-palette-color-1: var(--site-accent);
  --theme-palette-color-2: var(--site-accent-hover);
  --theme-palette-color-3: var(--site-muted);
  --theme-palette-color-4: var(--site-ink);
  --theme-palette-color-5: var(--site-muted);
  --theme-palette-color-6: var(--site-surface);
  --theme-palette-color-7: var(--site-surface);
  --theme-palette-color-8: var(--site-surface);
  --theme-text-color: var(--site-text);
  --theme-headings-color: var(--site-ink);
  --theme-border-color: var(--site-line);
  --theme-selection-text-color: var(--site-background);
}

html,
body,
body[data-prefix],
body[data-header] #header.ct-header,
body[data-header] #header [data-row],
body[data-header] #offcanvas,
body[data-header] #offcanvas .ct-panel-inner {
  background-color: var(--site-background);
}

body[data-header] #offcanvas [data-id="mobile-menu"],
body[data-header] #header .ct-header-trigger,
body[data-header] #offcanvas .ct-toggle-close {
  --theme-link-initial-color: var(--site-ink);
  --theme-link-hover-color: var(--site-accent);
  --theme-icon-color: var(--site-ink);
  --theme-icon-hover-color: var(--site-accent);
}

[data-prefix="single_blog_post"] .entry-header .page-title {
  --theme-heading-color: var(--site-ink);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  border-bottom: 1px solid var(--site-line);
}

.site-wordmark {
  color: var(--site-ink);
  font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.site-header-actions,
.site-navigation ul {
  display: flex;
  align-items: center;
}

.site-header-actions {
  flex: 0 0 auto;
  gap: 12px;
}

.site-navigation ul {
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.site-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--site-muted);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
}

.site-navigation a:hover,
.site-navigation a[aria-current="page"],
.site-navigation .current-menu-parent a,
.site-navigation .current-menu-item a {
  color: var(--site-accent);
}

.site-header .theme-toggle,
.site-header .ct-header-trigger {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--site-muted);
  cursor: pointer;
}

.site-header .ct-header-trigger {
  display: none;
}

.theme-toggle {
  font: 21px/1 system-ui, sans-serif;
}

.site-header .theme-toggle:hover,
.site-header .ct-header-trigger:hover {
  background: var(--site-surface);
  color: var(--site-accent);
}

.site-header :is(a, button):focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 2px;
}

.theme-icon-sun,
[data-theme="dark"] .theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: inline;
}

@media (max-width: 680px) {
  .site-header-inner { min-height: 62px; }
  .site-header-actions { gap: 2px; }
  .site-navigation { display: none; }
  .site-header .ct-header-trigger { display: inline-grid; }
}

.site-footer {
  padding-block: 12px 24px;
}

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

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
}

.site-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--site-muted);
  font-size: .9rem;
  font-weight: 600;
}

.site-footer-links a:hover {
  color: var(--site-accent);
}

.site-footer-links a:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 2px;
}

.site-downloads {
  position: relative;
}

.site-downloads summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--site-muted);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.site-navigation .site-downloads summary {
  font-size: .9rem;
}

.site-downloads summary::-webkit-details-marker {
  display: none;
}

.site-downloads summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}

.site-downloads[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.site-downloads summary:hover {
  color: var(--site-accent);
}

.site-downloads :is(summary, a):focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 2px;
}

.site-navigation ul.site-download-links,
.mobile-menu ul.site-download-links {
  display: block;
  list-style: none;
  margin: 0;
  padding: 6px 12px;
}

.site-navigation .site-download-links {
  position: absolute;
  inset-inline-end: 0;
  z-index: 10;
  min-width: max-content;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  background: var(--site-surface);
}

.site-download-links a {
  display: block;
  padding-block: 10px;
  color: var(--site-ink);
}

.site-download-links a:hover {
  color: var(--site-accent);
}
