/* GELaw appearance overrides. Kept outside the parent theme for safe updates.
   Dark mode follows the visitor's preference; printed pages stay light. */
@media screen and (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --gelaw-bg: #151c19;
    --gelaw-surface: #1d2822;
    --gelaw-field: #111914;
    --gelaw-text: #e8eee9;
    --gelaw-muted: #b6c5ba;
    --gelaw-border: #3a4b40;
    --gelaw-accent: #ffad85;
  }
  body, #page, #content {
    color: var(--gelaw-text);
    background-color: var(--gelaw-bg);
  }
  #secondary, #colophon {
    color: var(--gelaw-text);
    background-color: #18221c;
    border-color: var(--gelaw-border);
  }
  #content h1, #content h2, #content h3, #content h4,
  #content h5, #content h6, #secondary .widget-title {
    color: var(--gelaw-text);
  }
  blockquote, .entry-meta, .entry-meta a, .entry-footer,
  .comment-metadata, .comment-form label, .site-designer,
  .site-info, .secondary-navigation, .social-navigation {
    color: var(--gelaw-muted);
  }
  #content a, #secondary a, #colophon a {
    color: var(--gelaw-accent);
  }
  #content a:hover, #secondary a:hover, #colophon a:hover {
    color: #ffd1b9;
    text-decoration: underline;
    text-underline-offset: .18em;
  }
  #site-navigation, #site-navigation > .wrap,
  #site-navigation ul ul, #site-navigation .menu-toggle {
    color: var(--gelaw-text);
    background-color: var(--gelaw-surface);
    border-color: var(--gelaw-border);
  }
  #site-navigation a {
    color: var(--gelaw-text);
    opacity: 1;
  }
  #site-navigation a:hover, #site-navigation a:focus,
  #site-navigation .current-menu-item > a,
  #site-navigation .current-menu-ancestor > a {
    color: var(--gelaw-accent);
  }
  #site-navigation li, #site-navigation ul ul,
  #site-navigation .menu-toggle .icon {
    border-color: var(--gelaw-border);
  }
  #site-navigation .icon {
    fill: currentColor;
  }
  body input:is([type="text"], [type="search"], [type="email"],
    [type="url"], [type="tel"], [type="number"], [type="password"]),
  body textarea, body select {
    color: var(--gelaw-text);
    background-color: var(--gelaw-field);
    border-color: var(--gelaw-border);
  }
  body input::placeholder, body textarea::placeholder {
    color: var(--gelaw-muted);
    opacity: 1;
  }
  body input:focus, body textarea:focus, body select:focus {
    color: var(--gelaw-text);
    border-color: var(--gelaw-accent);
    box-shadow: 0 0 0 3px rgb(255 173 133 / 18%);
  }
  body button, body input[type="submit"],
  body input[type="button"], body input[type="reset"] {
    color: #1a211c;
    background-color: #f49a70;
  }
  body button:hover, body input[type="submit"]:hover,
  body input[type="button"]:hover, body input[type="reset"]:hover {
    color: #1a211c;
    background-color: #ffb590;
  }
  #site-navigation .search-menu input[type="search"] {
    color: var(--gelaw-text);
    background-color: transparent;
  }
  #site-navigation .search-menu input::placeholder {
    color: var(--gelaw-muted);
    opacity: 1;
  }
  #secondary .search-submit {
    color: #1a211c;
  }
  #secondary .search-submit .icon {
    fill: currentColor;
  }
  #site-navigation .search-menu input[type="search"]:focus {
    background-color: var(--gelaw-field);
  }
  body a:focus-visible, body button:focus-visible,
  body input:focus-visible, body textarea:focus-visible,
  body select:focus-visible {
    outline: 2px solid var(--gelaw-accent);
    outline-offset: 3px;
  }
  #content .entry-title::before, #content .entry-title::after,
  .page-header::before, .page-header::after, hr,
  .post-navigation::before, .posts-navigation::before {
    background-color: var(--gelaw-border);
  }
  body td, body th, body .entry, body .comment-body,
  body .entry-footer, body .post-navigation {
    border-color: var(--gelaw-border);
  }
  pre, thead, .author-info {
    color: var(--gelaw-text);
    background-color: var(--gelaw-surface);
  }
  .return-to-top, .return-to-top:hover {
    color: var(--gelaw-text);
    background-color: var(--gelaw-surface);
    border-color: var(--gelaw-border);
  }
  ::selection {
    color: #151c19;
    background-color: var(--gelaw-accent);
  }
}
