:root {
  --accent: #3978c5;
  --accent-strong: #2f69ad;
  --accent-soft: #eef5fc;
  --ink: #17202a;
  --ink-soft: #4f5e6b;
  --surface: #ffffff;
  --surface-muted: #f6f9fc;
  --border: rgba(23, 32, 42, 0.10);
}

/* Replace the remaining Mainroad red with the programmer.ie blue system. */
a:hover,
.meta a:hover,
.content a,
.warning a,
.authorbox__description a,
.content a:hover,
.warning a:hover,
.authorbox__description a:hover {
  color: var(--accent);
}

.btn:hover,
.tags__item:hover,
.menu__item:hover,
.menu__item--active {
  background: var(--accent);
}

blockquote {
  border-left-color: var(--accent);
}

.logo__tagline {
  color: var(--accent);
}

.divider {
  background: var(--accent);
}

.js .menu__btn--active {
  color: var(--accent);
}

:focus > .menu__btn-title {
  box-shadow: inset 0 0 1px 3px var(--accent);
}

@media screen and (min-width: 767px) {
  .menu {
    border-bottom-color: var(--accent);
  }
}

/* Give the inherited Mainroad shell the same neutral/blue language as new pages. */
body {
  color: var(--ink);
  background: var(--surface-muted);
}

.header,
.wrapper {
  background: var(--surface);
}

.container--outer {
  box-shadow: 0 12px 40px rgba(31, 49, 67, 0.10);
}

.logo__title {
  color: var(--ink);
  letter-spacing: -0.02em;
}

.logo__tagline {
  border-top-color: var(--border);
}

.menu__item {
  transition: background-color 0.16s ease;
}

.menu__link {
  letter-spacing: 0.025em;
}

/* Site header layout (Mainroad base styles are no longer present, so the
   shell defines its own header system here alongside the theme overrides).
   Desktop: one horizontal row, brand left, nav right, toggle hidden. */
.header__container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
}

.logo__link {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
}

.logo__title {
  font-size: 1.1rem;
  font-weight: 800;
}

.menu {
  margin-left: auto;
}

.menu__btn {
  display: none;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

.menu__list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  background: none;
}

.menu__link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.menu__link:hover {
  color: var(--accent);
}

.menu__item:hover,
.menu__item--active {
  background: none;
}

.menu__item--active .menu__link {
  color: var(--accent);
  font-weight: 700;
}

@media screen and (max-width: 800px) {
  .header__container {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .menu__btn {
    display: inline-flex;
  }

  .menu__list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
  }

  .menu__list--active {
    display: flex;
  }

  .menu__item {
    width: 100%;
  }

  .menu__link {
    display: block;
    padding: 0.45rem 0;
  }
}

/* Without JS the toggle cannot work: keep the nav reachable instead. */
.no-js .menu__btn {
  display: none;
}

@media screen and (max-width: 800px) {
  .no-js .menu__list {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
  }
}

.post__meta {
  border-top-color: var(--border);
  border-bottom-color: var(--border);
}

.meta,
.meta a {
  color: #697784;
}

.content a,
.warning a,
.authorbox__description a {
  text-decoration-color: rgba(57, 120, 197, 0.35);
  text-underline-offset: 0.14em;
}

.content a:hover,
.warning a:hover,
.authorbox__description a:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

.tags__item {
  background: var(--ink);
}

.btn {
  background: var(--ink);
  border-radius: 7px;
}

blockquote {
  background: var(--surface-muted);
  padding: 0.9rem 1.1rem;
  border-radius: 0 8px 8px 0;
}

/* Legacy widgets and pager links should not reintroduce the old theme accent. */
.widget a:hover,
.pager__link:hover,
.pagination__item:hover,
.pagination__item--current {
  color: var(--accent);
}

/* Keep focus visible and aligned with the palette. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
