/* Field Guide theme: the site's black, red and ember look on top of docsify's dark theme. */
:root {
  --theme-color: #ff8a2a;
  --base-font-family: "Barlow", "Segoe UI", sans-serif;
  --base-font-size: 17px;
  --bg: #07070a; --panel: #110e11; --line: #2b1b1d; --line-hi: #4a2326;
  --text: #ece7e2; --muted: #9b908b; --red: #e0262f; --ember-hi: #ff8a2a;
  --top: 60px;
}
body { background: var(--bg); color: var(--text); }

/* ---------- Site header ---------- */
.site-top {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 40;
  display: flex; align-items: center; gap: 22px; padding: 0 20px;
  background: rgba(7, 7, 10, 0.96); border-bottom: 1px solid var(--line);
  font-family: "Chakra Petch", sans-serif; text-transform: uppercase; letter-spacing: 0.06em;
}
.site-top .brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.site-top .brand img { width: 32px; height: 32px; }
.site-top .uo { color: var(--ember-hi); }
.site-top nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.site-top nav a { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.site-top nav a:hover, .site-top nav a.active { color: var(--text); }
.site-top nav a.active { box-shadow: inset 0 -2px 0 var(--red); }

/* Make room for the header. */
.sidebar { top: var(--top); height: calc(100% - var(--top)); background: #0d0b0e; border-right: 1px solid var(--line); padding-top: 18px; }
.content { top: var(--top); }
.sidebar-toggle { top: calc(var(--top) + 8px); bottom: auto; background: transparent; }
.sidebar-toggle span { background-color: var(--ember-hi); }

/* ---------- Sidebar ---------- */
.app-name { font-family: "Chakra Petch", sans-serif; text-transform: uppercase; letter-spacing: 0.06em; }
.app-name-link { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text) !important; font-size: 18px; }
.app-name-link img { width: 34px; }
.sidebar .search { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sidebar .search input { background: var(--panel); border: 1px solid var(--line-hi); color: var(--text); }
.sidebar-nav > ul > li { margin: 14px 0 4px; }
.sidebar-nav > ul > li > strong, .sidebar-nav > ul > li > a > strong, .sidebar-nav > ul > li > p > a {
  font-family: "Chakra Petch", sans-serif; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; color: var(--ember-hi);
}
.sidebar-nav li a { color: #cfc6c0; border-left: 2px solid transparent; padding-left: 8px; }
.sidebar-nav li a:hover { color: #fff; }
.sidebar-nav li.active > a { color: #fff; font-weight: 600; border-left-color: var(--red); }

/* ---------- Breadcrumbs and back ---------- */
.crumbs { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.crumbs .back {
  font: 600 13px "Chakra Petch", sans-serif; text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer;
  color: var(--text); background: transparent; border: 1px solid var(--line-hi); padding: 6px 12px;
}
.crumbs .back:hover, .crumbs .back:focus-visible { border-color: var(--ember-hi); color: var(--ember-hi); outline: none; }
.crumbs a { color: var(--ember-hi); }
.crumbs b { color: var(--text); font-weight: 600; }

/* ---------- Content ---------- */
.markdown-section { max-width: 920px; padding-top: 34px; }
.markdown-section h1, .markdown-section h2, .markdown-section h3 { font-family: "Chakra Petch", sans-serif; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text); }
.markdown-section h1 { color: var(--red); }
.markdown-section a { color: var(--ember-hi); }
.markdown-section table { display: table; width: 100%; }
.markdown-section td, .markdown-section th { border-color: var(--line); }
.markdown-section tr:nth-child(2n) { background: var(--panel); }
.markdown-section code { background: var(--panel); color: var(--ember-hi); }
.markdown-section blockquote { border-left-color: var(--red); color: #cfc6c0; }

/* Card grid for the home and section landing pages. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 18px 0 26px; }
.cards a {
  display: block; padding: 18px 18px 16px; text-decoration: none !important;
  background: linear-gradient(180deg, var(--panel), #0d0b0e); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.cards a:hover { border-color: var(--ember-hi); }
.cards b { display: block; font: 700 15px "Chakra Petch", sans-serif; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); margin-bottom: 6px; }
.cards span { color: var(--muted); font-size: 15px; line-height: 1.45; }

/* Prev / next */
.pagination-item-label { color: var(--muted); }
.pagination-item-title { color: var(--ember-hi); }
.docsify-pagination-container { border-top-color: var(--line); }

@media (max-width: 760px) {
  .site-top { height: auto; min-height: var(--top); flex-wrap: wrap; padding: 8px 14px; gap: 8px 16px; }
  .site-top nav { margin-left: 0; gap: 12px; }
  :root { --top: 92px; }
}
