/* Hashimoire — site styling, based on the established black/emerald/gold identity. */
:root {
  --obsidian: #0b0f0b;
  --forest: #14241a;
  --panel: #152018;
  --emerald: #315d36;
  --glow: #78a65d;
  --gold: #c8b88a;
  --text: #f4f2e8;
  --muted: #b4c0af;
  --edge: #324333;
}
html, body { background: var(--obsidian); color: var(--text); }
body, button, input { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
body { -webkit-font-smoothing: antialiased; }
a { color: #acda91; }
a:hover { color: var(--gold); }
.sidebar { background: #101811; border-right: 1px solid var(--edge); }
.sidebar > h1 { margin: 20px 15px; }
.app-name, .app-name-link { color: var(--gold) !important; font-family: Georgia, serif; letter-spacing: .12em; }
.sidebar-nav { padding: 8px 3px 30px; }
.sidebar-nav li { margin: 3px 0; }
.sidebar-nav li > a { color: var(--muted); border-bottom: none; }
.sidebar-nav li > a:hover,
.sidebar-nav li.active > a { color: var(--glow); border-right-color: var(--glow); }
.sidebar-nav > ul > li > p { font-size: .72rem; font-weight: 750; letter-spacing: .13em; color: var(--gold); margin-top: 18px; }
.search { border-bottom: 1px solid var(--edge) !important; }
.search .input-wrap { background: #1d2a20; border: 1px solid var(--edge); border-radius: 8px; }
.search input { color: var(--text) !important; background: transparent; }
.search .results-panel { background: #101811; }
.search .matching-post { border-bottom: 1px solid var(--edge); }
.search .matching-post h2 { color: var(--glow); }
.search .matching-post p { color: var(--muted); }
.search .clear-button svg { fill: var(--muted); }
.sidebar-toggle { background: #18251b; border: 1px solid var(--edge); border-radius: 0 8px 8px 0; }
.sidebar-toggle-button span { background: var(--glow); }
.content { background: var(--obsidian); }
.markdown-section { max-width: 920px; color: var(--text); line-height: 1.75; }
.markdown-section h1, .markdown-section h2, .markdown-section h3, .markdown-section h4 { color: var(--text); font-weight: 680; }
.markdown-section h1 { letter-spacing: -.025em; }
.markdown-section h2 { border-bottom: 1px solid var(--edge); padding-bottom: .25em; margin-top: 1.8em; }
.markdown-section a { color: #abdd8d; }
.markdown-section a:hover { color: var(--gold); }
.markdown-section strong { color: #f6f1df; }
.markdown-section code { color: #c0eb9b; background: #1c2b20; border-radius: 4px; padding: 2px 5px; }
.markdown-section pre { background: #101c13 !important; border: 1px solid var(--edge); border-radius: 10px; color: #f0f5e9 !important; }
.markdown-section pre code { padding: 0; color: #f0f5e9; background: transparent; }
.markdown-section blockquote { border-left: 3px solid var(--gold); background: #18251a; padding: 12px 18px; color: var(--text); border-radius: 0 7px 7px 0; }
.markdown-section blockquote p { color: var(--text); }
.markdown-section table { display: block; overflow-x: auto; border-collapse: collapse; }
.markdown-section th { color: var(--gold); background: #1a291d; }
.markdown-section td, .markdown-section th { border: 1px solid var(--edge); }
.markdown-section tr:nth-child(2n) { background: #101c13; }
.markdown-section hr { border: 0; border-top: 1px solid var(--edge); }
.markdown-section p, .markdown-section li { color: #d5dfd0; }
.markdown-section ul > li::marker { color: var(--glow); }
.markdown-section :not(pre) > code { overflow-wrap: anywhere; }
.markdown-section .mermaid { background: #101a12; border: 1px solid var(--edge); border-radius: 10px; padding: 14px; overflow-x: auto; text-align: center; }
.hash-hero { position: relative; padding: 34px 32px; margin-top: 10px; border: 1px solid #315d36; border-radius: 18px; background: radial-gradient(ellipse at 85% 5%, #27442b 0, transparent 47%), linear-gradient(150deg,#17251a 0%,#0e140f 80%); overflow: hidden; }
.hash-kicker { color: var(--gold); font-size: .73rem; font-weight: 750; letter-spacing: .18em; }
.markdown-section .hash-hero h1 { color: #f8f3df; font-family: Georgia, serif; font-weight: normal; letter-spacing: .09em; font-size: clamp(2.3rem, 8vw, 4.4rem); margin: 15px 0 12px; border: none; }
.markdown-section .hash-subtitle { max-width: 630px; font-size: 1.08rem; line-height: 1.65; color: #d6e0d0; margin: 0 0 26px; }
.hash-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 18px; }
.markdown-section .hash-button { color: #0b100a; background: var(--glow); border: 1px solid var(--glow); border-radius: 9px; padding: 10px 16px; font-weight: 700; text-decoration: none; }
.markdown-section .hash-button:hover { background: #a8d38c; color: #0b100a; }
.markdown-section .hash-button-outline { background: transparent; color: #dceacc; border-color: var(--edge); }
.markdown-section .hash-button-outline:hover { color: var(--gold); background: #213024; }
.hash-meta { color: #aabda8; font-size: .75rem; }
.hash-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.markdown-section .hash-card { display: flex; flex-direction: column; gap: 9px; background: var(--panel); border: 1px solid var(--edge); padding: 20px; border-radius: 14px; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.markdown-section .hash-card:hover { border-color: var(--glow); transform: translateY(-2px); }
.hash-card-icon { color: var(--gold); font-size: 1.75rem; line-height: 1; }
.markdown-section .hash-card strong { color: #f4f2e8; font-size: 1.13rem; }
.markdown-section .hash-card span:not(.hash-card-icon) { color: #bac9b8; font-size: .9rem; line-height: 1.5; }
.hash-card em { color: var(--glow); font-style: normal; font-size: .85rem; font-weight: 700; margin-top: auto; }
@media (max-width: 700px) {
 .markdown-section { padding: 16px 18px 40px; }
 .hash-hero { padding: 26px 20px; }
 .hash-cards { grid-template-columns: 1fr; }
 .markdown-section pre { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Keep the GitHub repository link compact instead of letting its SVG fill the viewport. */
.github-corner { position: fixed; top: 0; right: 0; z-index: 55; }
.github-corner svg { display: block; width: 58px !important; height: 58px !important; max-width: 58px; max-height: 58px; }
@media (max-width: 700px) {
  .github-corner svg { width: 42px !important; height: 42px !important; }
}

/* Hashimoire sidebar: luminous book-green navigation over the dark forest background.
   Docsify's default Vue theme has more-specific link rules, so override them here. */
:root {
  --sidebar-neon: #a6f57a;
  --sidebar-neon-bright: #d1ff9e;
}
.sidebar .sidebar-nav ul li > a,
.sidebar .sidebar-nav ul li > a:visited {
  color: var(--sidebar-neon) !important;
  opacity: 1;
  text-shadow: 0 0 6px rgba(125, 255, 90, .18);
  transition: color .16s ease, text-shadow .16s ease;
}
.sidebar .sidebar-nav ul li > a:hover,
.sidebar .sidebar-nav ul li.active > a,
.sidebar .sidebar-nav ul li > a:focus-visible {
  color: var(--sidebar-neon-bright) !important;
  text-shadow: 0 0 7px rgba(151, 255, 105, .56), 0 0 16px rgba(151, 255, 105, .22);
  border-right-color: var(--sidebar-neon) !important;
}
.sidebar .sidebar-nav > ul > li > strong,
.sidebar .sidebar-nav > ul > li > p > strong {
  color: var(--sidebar-neon-bright) !important;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .085em;
  text-shadow: 0 0 8px rgba(151, 255, 105, .25);
}
.sidebar .sidebar-nav ul li > a:focus-visible {
  outline: 2px solid var(--sidebar-neon-bright);
  outline-offset: 3px;
}

/* Unified Hashimoire headings: muted neon emerald, rather than the Docsify blue.
   Strong selectors cover Docsify's default Vue theme on desktop and mobile. */
:root {
  --heading-emerald: #a4df8d;
  --heading-emerald-soft: #93cc7f;
}
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6,
.markdown-section h1 a,
.markdown-section h2 a,
.markdown-section h3 a,
.markdown-section h4 a,
.markdown-section h5 a,
.markdown-section h6 a {
  color: var(--heading-emerald) !important;
}
.markdown-section h1 {
  text-shadow: 0 0 14px rgba(125, 220, 100, .14);
}
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6 {
  color: var(--heading-emerald-soft) !important;
}
.markdown-section h2 { border-bottom-color: #345238; }
/* Theme the opening hero title while keeping gold accents on the eyebrow and badges. */
.markdown-section .hash-hero h1 {
  color: #b2e99a !important;
  text-shadow: 0 0 18px rgba(151, 255, 105, .17);
}
/* Section labels in Docsify's generated sidebar may be <p>, <strong>, or nested markup. */
.sidebar .sidebar-nav > ul > li > p,
.sidebar .sidebar-nav > ul > li > p strong,
.sidebar .sidebar-nav > ul > li > strong,
.sidebar .sidebar-nav li > p,
.sidebar .sidebar-nav li > p strong,
.sidebar .sidebar-nav li > strong {
  color: var(--heading-emerald) !important;
}
/* Ensure browser focus remains obvious for keyboard and assistive users. */
.markdown-section a:focus-visible,
.sidebar a:focus-visible {
  outline: 2px solid var(--heading-emerald);
  outline-offset: 3px;
}

/* FIX: Docsify wraps heading text in .anchor > span. Some theme rules
   color the inner span blue, even if h1/h2 are green. Override the
   rendered heading text itself on every documentation page. */
body .markdown-section h1,
body .markdown-section h2,
body .markdown-section h3,
body .markdown-section h4,
body .markdown-section h5,
body .markdown-section h6,
body .markdown-section h1 .anchor,
body .markdown-section h2 .anchor,
body .markdown-section h3 .anchor,
body .markdown-section h4 .anchor,
body .markdown-section h5 .anchor,
body .markdown-section h6 .anchor,
body .markdown-section h1 .anchor span,
body .markdown-section h2 .anchor span,
body .markdown-section h3 .anchor span,
body .markdown-section h4 .anchor span,
body .markdown-section h5 .anchor span,
body .markdown-section h6 .anchor span,
body .markdown-section h1 > a > span,
body .markdown-section h2 > a > span,
body .markdown-section h3 > a > span,
body .markdown-section h4 > a > span,
body .markdown-section h5 > a > span,
body .markdown-section h6 > a > span {
  color: #a4df8d !important;
}
body .markdown-section h3 .anchor span,
body .markdown-section h4 .anchor span,
body .markdown-section h5 .anchor span,
body .markdown-section h6 .anchor span {
  color: #93cc7f !important;
}
body .markdown-section .hash-hero h1,
body .markdown-section .hash-hero h1 * {
  color: #b2e99a !important;
}

/* Homepage: display the existing Forensics Byte book artwork beside the title,
   without moving the role selector far below the fold. */
.hash-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(230px, .9fr);
  gap: clamp(14px, 3vw, 30px);
  align-items: center;
}
.hash-hero-copy { min-width: 0; }
.markdown-section .hash-hero .hash-hero-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.65rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.hash-hero-art {
  margin: 0;
  width: 100%;
  align-self: center;
  min-width: 0;
}
.hash-hero-art img {
  display: block;
  width: 100%;
  max-height: 280px;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(159, 220, 126, .22);
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(94, 197, 62, .14);
  background: #0b0f0b;
}
.hash-hero-art figcaption {
  padding-top: 9px;
  text-align: center;
  color: var(--gold);
  font-size: .64rem;
  letter-spacing: .15em;
}
.hash-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 30px;
}
.markdown-section .hash-role-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #416943;
  border-radius: 16px;
  background: linear-gradient(145deg, #1b3020, #101a13);
  padding: clamp(20px, 3vw, 28px);
  text-decoration: none;
  min-height: 205px;
  box-shadow: inset 0 1px 0 rgba(181, 238, 154, .08);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.markdown-section .hash-role-card:hover,
.markdown-section .hash-role-card:focus-visible {
  border-color: #a4df8d;
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(132, 220, 105, .13);
}
.markdown-section .hash-role-eyebrow {
  color: var(--gold);
  letter-spacing: .13em;
  font-size: .7rem;
  font-weight: 760;
}
.markdown-section .hash-role-title {
  color: #b2e99a;
  font-family: Georgia, serif;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1.25;
  font-weight: 650;
}
.markdown-section .hash-role-description {
  color: #d2dfca;
  font-size: .95rem;
  line-height: 1.65;
}
.markdown-section .hash-role-foot {
  color: #a6f57a;
  font-size: .85rem;
  font-weight: 700;
  margin-top: auto;
}
@media (max-width: 820px) {
  .hash-hero-grid { grid-template-columns: 1fr; }
  .hash-hero-art { max-width: 390px; justify-self: center; }
  .hash-hero-art img { max-height: 195px; }
}
@media (max-width: 700px) {
  .hash-role-grid { grid-template-columns: 1fr; gap: 12px; }
  .markdown-section .hash-role-card { min-height: 0; }
  .hash-hero-art { max-width: 330px; }
  .hash-hero-art img { max-height: 170px; }
}


/* Collapsible role/tool groups in the Docsify sidebar.
   Only the top-level group links collapse; site search remains available. */
.sidebar-nav > ul > li.hash-fold-group {
  position: relative;
  margin: 6px 0 4px;
}
.sidebar .sidebar-nav .hash-fold-toggle {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 30px;
  margin: 0 3px 0 0;
  padding: 0;
  color: #a6f57a;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  touch-action: manipulation;
}
.sidebar .sidebar-nav .hash-fold-toggle::before {
  content: "▸";
  font-size: 19px;
  line-height: 1;
  display: inline-block;
  transform: rotate(0deg);
  transition: transform .15s ease;
}
.sidebar .sidebar-nav .hash-fold-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}
.sidebar .sidebar-nav .hash-fold-toggle:hover,
.sidebar .sidebar-nav .hash-fold-toggle:focus-visible {
  color: #d1ff9e;
  background: #203425;
  border-color: #54844a;
  outline-offset: 2px;
}
.sidebar .sidebar-nav li.hash-fold-group > strong,
.sidebar .sidebar-nav li.hash-fold-group > p {
  color: #a4df8d !important;
  font-size: .76rem;
  letter-spacing: .075em;
}
.sidebar .sidebar-nav li.hash-fold-group > strong.hash-fold-heading {
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  padding: 4px 3px;
  border-radius: 4px;
}
.sidebar .sidebar-nav li.hash-fold-group > strong.hash-fold-heading:focus-visible {
  outline: 2px solid #a6f57a;
}
.sidebar .sidebar-nav li.hash-fold-group > ul[hidden],
.sidebar .sidebar-nav li.hash-fold-group.hash-fold-closed > ul {
  display: none !important;
}
.sidebar .sidebar-nav li.hash-fold-group > ul:not([hidden]) {
  margin: 3px 0 10px 13px;
  border-left: 1px solid rgba(164, 223, 141, .2);
}
.sidebar .sidebar-nav li.hash-fold-group > ul > li {
  margin: 0;
}
@media (max-width: 700px) {
  .sidebar .sidebar-nav .hash-fold-toggle {
    width: 38px;
    height: 38px;
  }
}
