/* Light default / dark via html[data-theme]. Accent: #1e73be */
:root,
html[data-theme="light"] {
  --page: #f3f3f3;
  --header: #fafafa;
  --nav: #ffffff;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --bg: #f3f3f3;
  --bg-soft: #ffffff;
  --line: #e6e6e6;
  --line-strong: #1e73be;
  --blue: #1e73be;
  --blue-hot: #185fa0;
  --blue-dim: rgba(30, 115, 190, 0.12);
  --text: #161616;
  --text-dim: #444;
  --mute: #666;
  --ok: #1f7a4d;
  --danger: #c1121f;
  --cream: #fff;
  --ink: #161616;
  --accent: #1e73be;
  --accent-hot: #185fa0;
  --on-accent: #fff;
  --chrome: #161616;
  --chrome-mute: #555;
  --yellow: #1e73be;
  --yellow-hot: #185fa0;
  --max: 1140px;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --page: #121212;
  --header: #1a1a1a;
  --nav: #161616;
  --panel: #1c1c1c;
  --panel-2: #222;
  --bg: #121212;
  --bg-soft: #1c1c1c;
  --line: #2e2e2e;
  --line-strong: #4a9ad8;
  --blue: #1e73be;
  --blue-hot: #4a9ad8;
  --blue-dim: rgba(30, 115, 190, 0.28);
  --text: #f2f2f2;
  --text-dim: #c8c8c8;
  --mute: #9a9a9a;
  --ok: #3d9a66;
  --danger: #ff6b6b;
  --cream: #1c1c1c;
  --ink: #f2f2f2;
  --accent: #1e73be;
  --accent-hot: #4a9ad8;
  --on-accent: #fff;
  --chrome: #f2f2f2;
  --chrome-mute: #b0b0b0;
  --yellow: #1e73be;
  --yellow-hot: #4a9ad8;
  color-scheme: dark;
}

html {
  background: var(--page);
}

html.theme-switching,
html.theme-switching * {
  transition: none !important;
}

body.theme-dispatch {
  color: var(--text);
  background: var(--page);
}

body.theme-dispatch a { color: var(--accent); }
body.theme-dispatch a:hover { color: var(--blue-hot); }

.theme-dispatch .skip-link {
  background: var(--accent);
  color: var(--on-accent);
}

.theme-dispatch .site-header {
  background: var(--header);
  border-bottom: 0;
  box-shadow: none;
}

.theme-dispatch .header-inner {
  padding: 0.5rem 0 0.45rem;
}

.theme-dispatch .brand img {
  width: auto;
  height: 48px;
  max-width: min(200px, 72vw);
}
html[data-theme="light"] .theme-dispatch .brand .brand-logo-dark,
html[data-theme="dark"] .theme-dispatch .brand .brand-logo-light {
  display: none;
}
html[data-theme="dark"] .theme-dispatch .brand .brand-logo-dark {
  display: block;
}

.theme-dispatch .header-tagline {
  color: var(--chrome-mute);
  font-size: 0.86rem;
  white-space: nowrap;
  max-width: none;
}

.theme-dispatch .header-search {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.theme-dispatch .header-search input { color: var(--text); }
.theme-dispatch .header-search input::placeholder { color: var(--mute); }
.theme-dispatch .header-search button {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.theme-dispatch .header-search button:hover {
  background: var(--accent-hot);
}

.theme-dispatch .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--chrome);
  cursor: pointer;
}
.theme-dispatch .theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-dispatch .theme-toggle svg {
  display: block;
  flex: 0 0 auto;
}
html[data-theme="light"] .theme-toggle .theme-icon-sun,
html[data-theme="dark"] .theme-toggle .theme-icon-moon {
  display: none;
}

.theme-dispatch .nav-toggle {
  background: var(--panel);
  color: var(--chrome);
  border: 1px solid var(--line);
}

.theme-dispatch .site-nav {
  background: var(--nav);
  border-top: 1px solid var(--line);
  border-bottom: 3px solid var(--accent);
}
.theme-dispatch .nav-list > .nav-item > a,
.theme-dispatch .nav-more-toggle {
  color: var(--chrome);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
}
.theme-dispatch .nav-list > .nav-item > a:hover,
.theme-dispatch .nav-list > .nav-item > a.is-active,
.theme-dispatch .nav-more-toggle:hover {
  color: var(--on-accent);
  background: var(--accent);
}

.theme-dispatch .nav-item.has-sub { position: relative; }
.theme-dispatch .nav-caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.3rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
}
.theme-dispatch .nav-sub {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 230px;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--nav);
  border: 1px solid var(--line);
  border-radius: 4px;
  z-index: 60;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
html[data-theme="dark"] .theme-dispatch .nav-sub {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
.theme-dispatch .nav-item.has-sub:hover > .nav-sub,
.theme-dispatch .nav-item.has-sub:focus-within > .nav-sub {
  display: block;
}
.theme-dispatch .nav-sub a {
  display: block;
  padding: 0.45rem 0.9rem;
  color: var(--chrome);
  white-space: nowrap;
}
.theme-dispatch .nav-sub a:hover,
.theme-dispatch .nav-sub a.is-active {
  background: var(--accent);
  color: var(--on-accent);
}

.theme-dispatch .shell { padding-top: 1.4rem; }

.theme-dispatch .content {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
  padding: 1.1rem 1.2rem 1.35rem;
}
.theme-dispatch .content a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}
.theme-dispatch .content a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}
.theme-dispatch .content .share-btn {
  color: var(--text-dim);
  text-decoration: none;
}
.theme-dispatch .content .share-btn:hover {
  color: var(--accent);
  text-decoration: none;
  border-color: var(--accent);
}

.theme-dispatch .page-head,
.theme-dispatch .single-post,
.theme-dispatch .mod-downloads,
.theme-dispatch .related-posts {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.theme-dispatch .page-head h1,
.theme-dispatch .single-head h1,
.theme-dispatch .section-title,
.theme-dispatch .feed-title a,
.theme-dispatch .related-title a {
  color: var(--text);
  font-family: var(--font-display);
  text-decoration: none;
}

.theme-dispatch .feed-cats a {
  color: var(--accent);
  text-decoration: none;
}
.theme-dispatch .feed-cats a:hover {
  color: var(--accent-hot);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.theme-dispatch .section-title {
  margin: 0.15rem 0 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.45rem;
}

.theme-dispatch .feat {
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111;
  box-shadow: none;
}
.theme-dispatch .feat-kicker {
  color: var(--accent-hot);
  letter-spacing: 0.12em;
}
.theme-dispatch .feat-copy {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88) 50%);
}
.theme-dispatch .feat-title { color: #fff; }
.theme-dispatch .feat-deck,
.theme-dispatch .feat-meta { color: #ddd; }
.theme-dispatch .feat-btn {
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--accent);
  color: #fff;
}
.theme-dispatch .feat-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.theme-dispatch .feat-dots { background: rgba(0, 0, 0, 0.5); }
.theme-dispatch .feat-dot { background: rgba(255, 255, 255, 0.4); }
.theme-dispatch .feat-dot.is-active { background: var(--accent); }

.theme-dispatch .feed-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  overflow: hidden;
}
.theme-dispatch .feed-item:hover {
  border-color: var(--accent);
  transform: none;
  box-shadow: none;
}
.theme-dispatch .post-badge-new {
  background: var(--accent);
  color: var(--on-accent);
}
.theme-dispatch .post-badge-updated {
  background: var(--chrome);
  color: var(--page);
}
.theme-dispatch .feed-excerpt,
.theme-dispatch .category-desc,
.theme-dispatch .post-meta,
.theme-dispatch .feed-meta {
  color: var(--text-dim);
}
.theme-dispatch .feed-more {
  background: var(--accent);
  color: var(--on-accent) !important;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  font-weight: 800;
  text-decoration: none;
}
.theme-dispatch .feed-more:hover {
  background: var(--accent-hot);
}
.theme-dispatch .btn,
.theme-dispatch .btn-submit-mod {
  background: var(--accent);
  color: var(--on-accent) !important;
  border: 0;
  box-shadow: none;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}
.theme-dispatch .btn:hover,
.theme-dispatch .btn-submit-mod:hover {
  background: var(--accent-hot);
  text-decoration: none;
}

.theme-dispatch .mod-dl-btn {
  background: var(--panel);
  color: var(--text) !important;
  border: 1px solid var(--line);
  box-shadow: none;
  text-decoration: none;
}
.theme-dispatch .mod-dl-btn:hover {
  background: var(--panel);
  border-color: var(--accent);
}
.theme-dispatch .mod-author {
  background: var(--bg-soft);
  border-color: var(--line);
  border-left-color: var(--accent);
}
.theme-dispatch .mod-author-icon { color: var(--accent); }
.theme-dispatch .mod-author-label { color: var(--mute); }
.theme-dispatch .mod-author-name { color: var(--text); }
.theme-dispatch .content .mod-dl-chip {
  background: var(--accent);
  color: var(--on-accent) !important;
  border: 0;
  text-decoration: none;
  text-transform: uppercase;
}
.theme-dispatch .content .mod-dl-chip:hover {
  background: var(--accent-hot);
  color: var(--on-accent) !important;
  text-decoration: none;
}
.theme-dispatch .mod-dl-icon,
.theme-dispatch .mod-dl-cta {
  background: var(--accent);
  color: var(--on-accent);
}
.theme-dispatch .mod-dl-btn:hover .mod-dl-cta {
  background: var(--accent-hot);
}

.theme-dispatch .sidebar .side-block {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: var(--radius);
}
.theme-dispatch .side-block h2 {
  color: var(--text);
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.35rem;
}
.theme-dispatch .side-list a { color: var(--text); text-decoration: none; }
.theme-dispatch .side-list a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}
.theme-dispatch .muted { color: var(--mute); }

.theme-dispatch .related-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: none;
}
.theme-dispatch .comment {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.theme-dispatch .feedback-box {
  background: var(--bg-soft);
  border-color: var(--line);
}
.theme-dispatch .feedback-tab.is-active {
  color: var(--accent);
  background: var(--panel);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.theme-dispatch .comment-form {
  background: transparent;
  border: 0;
}

.theme-dispatch .site-footer {
  margin-top: 1.75rem;
  background: var(--header);
  color: var(--chrome-mute);
  border-top: 3px solid var(--accent);
}
.theme-dispatch .footer-links a { color: var(--chrome); text-decoration: none; }
.theme-dispatch .footer-links a:hover { color: var(--accent); }

.theme-dispatch .to-top {
  background: var(--accent);
  color: var(--on-accent);
}

.theme-dispatch .pagination a,
.theme-dispatch .pagination .current,
.theme-dispatch .pagination-nav {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}
.theme-dispatch .pagination .current {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.theme-dispatch .pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 960px) {
  .theme-dispatch .shell { padding-top: 0.65rem; }
  .theme-dispatch .content {
    padding: 0.75rem 0.65rem 1rem;
  }
}

@media (max-width: 900px) {
  .theme-dispatch .nav-sub {
    position: static;
    display: none;
    border: 0;
    box-shadow: none;
    background: var(--nav);
    min-width: 0;
  }
  .theme-dispatch .site-nav.is-open .nav-item.has-sub > .nav-sub { display: block; }
  .theme-dispatch .header-tagline { display: none; }
}
