/* Attackpoint favicon sizing */
.author__urls a .social-icon-img {
  display: inline-block;
  width: 1.25em;
  text-align: center;
}

.author__urls a .social-icon-img img {
  width: 0.875em;
  height: 0.875em;
  vertical-align: -0.05em;
  object-fit: contain;
}

/* Theme toggle in nav */
.masthead__menu-item--theme .theme-toggle {
  display: inline-block;
  margin: 0 0 0 0.5rem;
  padding: 0.5rem 0;
  color: inherit;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
}

.masthead__menu-item--theme .theme-toggle:hover,
.masthead__menu-item--theme .theme-toggle:focus {
  color: #52adc8;
  outline: none;
}

.theme-toggle .fa-sun {
  display: none;
}

.theme-is-dark .theme-toggle .fa-moon {
  display: none;
}

.theme-is-dark .theme-toggle .fa-sun {
  display: inline-block;
}

/* Soft light mode — warm off-white, easier on the eyes than pure #fff */
html:not(.theme-is-dark) {
  --theme-bg: #f5f2ea;
  --theme-bg-elevated: #eeebe3;
  --theme-bg-footer: #e8e4d9;
  --theme-border: #e0dcd0;
  --theme-code-bg: #edeae2;
}

html:not(.theme-is-dark) body {
  background-color: var(--theme-bg) !important;
}

html:not(.theme-is-dark) .masthead,
html:not(.theme-is-dark) .masthead__inner-wrap,
html:not(.theme-is-dark) .greedy-nav {
  background-color: var(--theme-bg) !important;
}

html:not(.theme-is-dark) .page__footer {
  background-color: var(--theme-bg-footer) !important;
  border-top-color: var(--theme-border) !important;
}

html:not(.theme-is-dark) .author__urls {
  background: var(--theme-bg-elevated) !important;
  border-color: var(--theme-border) !important;
}

html:not(.theme-is-dark) .author__urls:after {
  border-color: var(--theme-bg-elevated) transparent !important;
}

html:not(.theme-is-dark) .author__urls:before {
  border-color: var(--theme-border) transparent !important;
}

@media (min-width: 925px) {
  html:not(.theme-is-dark) .author__urls {
    background: transparent !important;
    border: 0 !important;
  }
}

html:not(.theme-is-dark) code,
html:not(.theme-is-dark) pre,
html:not(.theme-is-dark) .highlight {
  background-color: var(--theme-code-bg) !important;
}

html:not(.theme-is-dark) .greedy-nav .hidden-links {
  background: var(--theme-bg-elevated) !important;
  border-color: var(--theme-border) !important;
}

html:not(.theme-is-dark) .greedy-nav .hidden-links:after {
  border-color: var(--theme-bg-elevated) transparent !important;
}

html:not(.theme-is-dark) .greedy-nav .hidden-links:before {
  border-color: var(--theme-border) transparent !important;
}

/* Dark theme tokens */
html[data-theme="dark"],
html[data-theme="auto"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --theme-bg: #1a1a1a;
  --theme-bg-elevated: #252525;
  --theme-bg-footer: #141414;
  --theme-text: #d8d8d8;
  --theme-text-muted: #aaaaaa;
  --theme-link: #8ecae6;
  --theme-link-hover: #bde0fe;
  --theme-border: #444444;
  --theme-nav-link: #d0d0d0;
  --theme-nav-link-hover: #ffffff;
  --theme-code-bg: #2a2a2a;
  --theme-btn-bg: #3a3a3a;
  --theme-btn-text: #eeeeee;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --theme-bg: #1a1a1a;
    --theme-bg-elevated: #252525;
    --theme-bg-footer: #141414;
    --theme-text: #d8d8d8;
    --theme-text-muted: #aaaaaa;
    --theme-link: #8ecae6;
    --theme-link-hover: #bde0fe;
    --theme-border: #444444;
    --theme-nav-link: #d0d0d0;
    --theme-nav-link-hover: #ffffff;
    --theme-code-bg: #2a2a2a;
    --theme-btn-bg: #3a3a3a;
    --theme-btn-text: #eeeeee;
  }
}

html[data-theme="dark"] body,
html[data-theme="auto"] body {
  background-color: var(--theme-bg, #ffffff);
  color: var(--theme-text, inherit);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
  }
}

html[data-theme="dark"] body {
  background-color: var(--theme-bg);
  color: var(--theme-text);
}

/* Navigation */
html[data-theme="dark"] .masthead,
html[data-theme="dark"] .masthead__inner-wrap,
html[data-theme="dark"] .greedy-nav {
  background-color: var(--theme-bg) !important;
}

html[data-theme="dark"] .masthead {
  border-bottom-color: var(--theme-border) !important;
}

html[data-theme="dark"] .greedy-nav a {
  color: var(--theme-nav-link) !important;
}

html[data-theme="dark"] .greedy-nav a:hover,
html[data-theme="dark"] .masthead__menu-item--theme .theme-toggle:hover {
  color: var(--theme-nav-link-hover) !important;
}

html[data-theme="dark"] .greedy-nav > button {
  background-color: #555555 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .greedy-nav .hidden-links {
  background: var(--theme-bg-elevated) !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .greedy-nav .hidden-links:before {
  border-color: var(--theme-border) transparent !important;
}

html[data-theme="dark"] .greedy-nav .hidden-links:after {
  border-color: var(--theme-bg-elevated) transparent !important;
}

html[data-theme="dark"] .greedy-nav .hidden-links a:hover {
  background: #333333 !important;
  color: var(--theme-nav-link-hover) !important;
}

html[data-theme="dark"] .greedy-nav .hidden-links li {
  border-bottom-color: var(--theme-border) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .masthead,
  html[data-theme="auto"] .masthead__inner-wrap,
  html[data-theme="auto"] .greedy-nav {
    background-color: var(--theme-bg) !important;
  }

  html[data-theme="auto"] .masthead {
    border-bottom-color: var(--theme-border) !important;
  }

  html[data-theme="auto"] .greedy-nav a {
    color: var(--theme-nav-link) !important;
  }

  html[data-theme="auto"] .greedy-nav a:hover,
  html[data-theme="auto"] .masthead__menu-item--theme .theme-toggle:hover {
    color: var(--theme-nav-link-hover) !important;
  }

  html[data-theme="auto"] .greedy-nav > button {
    background-color: #555555 !important;
    color: #ffffff !important;
  }

  html[data-theme="auto"] .greedy-nav .hidden-links {
    background: var(--theme-bg-elevated) !important;
    border-color: var(--theme-border) !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
  }

  html[data-theme="auto"] .greedy-nav .hidden-links:before {
    border-color: var(--theme-border) transparent !important;
  }

  html[data-theme="auto"] .greedy-nav .hidden-links:after {
    border-color: var(--theme-bg-elevated) transparent !important;
  }

  html[data-theme="auto"] .greedy-nav .hidden-links a:hover {
    background: #333333 !important;
    color: var(--theme-nav-link-hover) !important;
  }

  html[data-theme="auto"] .greedy-nav .hidden-links li {
    border-bottom-color: var(--theme-border) !important;
  }
}

/* Sidebar / author profile links */
html[data-theme="dark"] .author__bio,
html[data-theme="dark"] .author__name {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .author__urls {
  background: var(--theme-bg-elevated) !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .author__urls:before {
  border-color: var(--theme-border) transparent !important;
}

html[data-theme="dark"] .author__urls:after {
  border-color: var(--theme-bg-elevated) transparent !important;
}

html[data-theme="dark"] .author__urls a {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .author__urls a:hover {
  color: var(--theme-link) !important;
}

html[data-theme="dark"] .author__urls-wrapper button.btn--inverse {
  background-color: var(--theme-btn-bg) !important;
  color: var(--theme-btn-text) !important;
  border-color: var(--theme-border) !important;
}

html[data-theme="dark"] .author__avatar img {
  border-color: var(--theme-border) !important;
}

@media (min-width: 925px) {
  html[data-theme="dark"] .author__urls {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .author__bio,
  html[data-theme="auto"] .author__name {
    color: var(--theme-text) !important;
  }

  html[data-theme="auto"] .author__urls {
    background: var(--theme-bg-elevated) !important;
    border-color: var(--theme-border) !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
  }

  html[data-theme="auto"] .author__urls:before {
    border-color: var(--theme-border) transparent !important;
  }

  html[data-theme="auto"] .author__urls:after {
    border-color: var(--theme-bg-elevated) transparent !important;
  }

  html[data-theme="auto"] .author__urls a {
    color: var(--theme-text) !important;
  }

  html[data-theme="auto"] .author__urls a:hover {
    color: var(--theme-link) !important;
  }

  html[data-theme="auto"] .author__urls-wrapper button.btn--inverse {
    background-color: var(--theme-btn-bg) !important;
    color: var(--theme-btn-text) !important;
    border-color: var(--theme-border) !important;
  }

  html[data-theme="auto"] .author__avatar img {
    border-color: var(--theme-border) !important;
  }

  @media (min-width: 925px) {
    html[data-theme="auto"] .author__urls {
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
    }
  }
}

/* Content & footer */
html[data-theme="dark"] a {
  color: var(--theme-link);
}

html[data-theme="dark"] a:hover {
  color: var(--theme-link-hover);
}

html[data-theme="dark"] .page__footer {
  background-color: var(--theme-bg-footer) !important;
  border-top-color: var(--theme-border) !important;
  color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] code,
html[data-theme="dark"] pre,
html[data-theme="dark"] .highlight {
  background-color: var(--theme-code-bg) !important;
  color: #e6e6e6 !important;
}

html[data-theme="dark"] pre {
  border: 1px solid var(--theme-border) !important;
}

html[data-theme="dark"] hr {
  border-color: var(--theme-border) !important;
}

html[data-theme="dark"] .page__content iframe {
  border-color: var(--theme-border) !important;
}

html[data-theme="dark"] .btn {
  background-color: var(--theme-btn-bg) !important;
  color: var(--theme-btn-text) !important;
  border-color: var(--theme-border) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] a {
    color: var(--theme-link);
  }

  html[data-theme="auto"] a:hover {
    color: var(--theme-link-hover);
  }

  html[data-theme="auto"] .page__footer {
    background-color: var(--theme-bg-footer) !important;
    border-top-color: var(--theme-border) !important;
    color: var(--theme-text-muted) !important;
  }

  html[data-theme="auto"] code,
  html[data-theme="auto"] pre,
  html[data-theme="auto"] .highlight {
    background-color: var(--theme-code-bg) !important;
    color: #e6e6e6 !important;
  }

  html[data-theme="auto"] pre {
    border: 1px solid var(--theme-border) !important;
  }

  html[data-theme="auto"] hr {
    border-color: var(--theme-border) !important;
  }

  html[data-theme="auto"] .page__content iframe {
    border-color: var(--theme-border) !important;
  }

  html[data-theme="auto"] .btn {
    background-color: var(--theme-btn-bg) !important;
    color: var(--theme-btn-text) !important;
    border-color: var(--theme-border) !important;
  }
}

html[data-theme="dark"] .masthead__menu-item--theme .theme-toggle:hover {
  color: var(--theme-link) !important;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .masthead__menu-item--theme .theme-toggle:hover {
    color: var(--theme-link) !important;
  }
}

/* News list */
.news-list {
  padding-left: 1.2em;
  margin-bottom: 2em;
}

.news-list li {
  margin-bottom: 0.6em;
}
