:root {
  color-scheme: dark;
  --bg: #0b1017;
  --panel: #111a26;
  --line: #233040;
  --text: #e9eced;
  --muted: #98a6b6;
  --red: #e28176;
  --green: #8cc4aa;
  --reading: 1.02rem;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.65;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  padding: 10px 15px;
}
button:hover {
  border-color: #718296;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
.sidebar {
  width: 258px;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  padding: 34px 23px;
  display: flex;
  flex-direction: column;
  background: #0f1620;
  z-index: 3;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -1px;
}
.brand b {
  font-weight: 400;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.7px;
  color: var(--muted);
  margin-top: 7px;
}
.brand-icon {
  font-family: Georgia, serif;
  font-size: 14px;
  letter-spacing: -2px;
  display: grid;
  place-content: center;
  border: 1px solid #566474;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  position: relative;
}
.brand-icon span {
  position: absolute;
  left: 15px;
  top: 5px;
  font-size: 21px;
  color: var(--red);
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #8090a3;
  margin: 48px 12px 14px;
}
.sidebar nav a {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  margin-bottom: 5px;
  border-radius: 6px;
  color: #a9b3c0;
}
.sidebar nav a > span {
  width: 20px;
  font-size: 19px;
}
.sidebar nav a.active {
  background: #202d3d;
  color: #fff;
  border-left: 2px solid var(--red);
  padding-left: 10px;
}
.sidebar nav a:hover {
  background: #1a2634;
}
.sidebar nav small {
  margin-left: auto;
  background: #303c4c;
  padding: 0 7px;
  border-radius: 5px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 40px;
}
.edition {
  display: flex;
  gap: 9px;
  font-size: 10px;
  align-items: baseline;
}
.edition i,
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}
.edition small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}
.install {
  width: 100%;
  margin: 20px 0 8px;
  background: transparent;
}
.offline {
  display: block;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}
.shell {
  margin-left: 258px;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-label {
  font-size: 10px;
  letter-spacing: 1.65px;
  color: #899bad;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-actions button {
  padding: 6px 10px;
  background: transparent;
  border: none;
  font-size: 15px;
}
.edition-badge {
  font-size: 8px;
  letter-spacing: 1.3px;
  border: 1px solid #294639;
  padding: 5px 9px;
  border-radius: 3px;
  color: var(--green);
  background: #10251e;
}
.mobile-brand {
  display: none;
}
main {
  max-width: 1340px;
  margin: auto;
  padding: 45px 48px 60px;
  min-height: 75vh;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--red);
  font-weight: 600;
}
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 35px;
  padding-bottom: 35px;
}
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.5vw, 65px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -1.8px;
  margin: 19px 0 22px;
}
.hero h1 em {
  font-weight: 400;
  color: #a8b8cf;
}
.hero p {
  max-width: 540px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.hero-art {
  min-height: 275px;
  display: grid;
  place-content: center;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 70%, #203b36 0, transparent 58%),
    linear-gradient(135deg, #172538, #101823);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.hero-art:before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid #364551;
}
.book-stack {
  position: relative;
  width: 240px;
  height: 170px;
  transform: rotate(-8deg);
  margin-bottom: 15px;
}
.book {
  position: absolute;
  left: 0;
  width: 230px;
  height: 43px;
  border-radius: 3px 6px 6px 3px;
  border-bottom: 6px solid #758175;
  box-shadow: 10px 13px 25px #050a1090;
  display: flex;
  align-items: center;
  padding-left: 24px;
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 1.8px;
  border-left: 10px solid #ffffff08;
}
.book:nth-child(1) {
  top: 118px;
  background: #284936;
  color: #e1d9c3;
  transform: translateX(7px) rotate(3deg);
}
.book:nth-child(2) {
  top: 77px;
  background: #73413d;
  color: #f1dcd3;
  transform: translateX(-8px) rotate(-3deg);
}
.book:nth-child(3) {
  top: 36px;
  background: #2e4463;
  color: #dde4ed;
}
.book:after {
  content: "";
  position: absolute;
  right: 19px;
  width: 1px;
  height: 20px;
  background: #ffffff40;
}
.art-caption {
  position: absolute;
  bottom: 31px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 2px;
  color: #b4c0c8;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 27px;
  align-items: center;
}
.primary {
  background: #db8175;
  border-color: #db8175;
  color: #18181d;
  font-weight: 600;
  padding: 11px 17px;
  border-radius: 5px;
  display: inline-block;
}
.text-link {
  color: #b9c5d3;
  padding: 9px;
  font-size: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin-bottom: 30px;
}
.stats > div {
  padding: 0 20px;
  border-right: 1px solid var(--line);
}
.stats > div:first-child {
  padding-left: 0;
}
.stats > div:last-child {
  border: 0;
}
.stats b {
  display: block;
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.3;
}
.stats small {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1px;
}
.search-wrap {
  position: relative;
}
.search-wrap input {
  width: 100%;
  background: #131d29;
  color: var(--text);
  border: 1px solid #2b3b4e;
  border-radius: 6px;
  padding: 16px 20px 16px 46px;
  font-size: 13px;
}
.search-wrap:before {
  content: "⌕";
  font-size: 25px;
  color: #91a0b1;
  position: absolute;
  left: 16px;
  top: 6px;
}
.search-wrap .key {
  position: absolute;
  right: 15px;
  top: 14px;
  border: 1px solid #3b495b;
  border-radius: 3px;
  padding: 0 6px;
  color: #8fa0b5;
  font-size: 11px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 33px 0 18px;
  gap: 15px;
}
.section-title h2 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin: 0;
}
.section-title a {
  font-size: 11px;
  color: #b7c3d0;
}
.topics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.topic {
  padding: 20px 16px;
  background: #111b28;
  border: 1px solid var(--line);
  border-radius: 5px;
  position: relative;
}
.topic:hover,
.card:hover {
  border-color: #617487;
  transform: translateY(-2px);
}
.topic-number {
  font-family: Georgia, serif;
  color: #70879f;
  font-size: 26px;
}
.topic h3 {
  font-size: 13px;
  margin: 10px 0 4px;
  font-weight: 500;
}
.topic p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.topic .arrow {
  position: absolute;
  top: 24px;
  right: 17px;
  color: #91a6bb;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.card-body {
  padding: 22px 18px;
}
.card .category {
  font-size: 8px;
  letter-spacing: 1.4px;
  color: var(--green);
  text-transform: uppercase;
}
.card h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.35;
  margin: 13px 0 10px;
}
.card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.card a {
  display: block;
  flex: 1;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  gap: 8px;
}
.save {
  background: transparent;
  border: 0;
  font-size: 20px;
  padding: 0 8px;
  min-width: 36px;
  min-height: 36px;
}
.save[aria-pressed="true"] {
  color: var(--green);
}
.note {
  margin-top: 28px;
  padding: 20px 24px;
  background: #12221d;
  border: 1px solid #294138;
  border-radius: 5px;
  display: flex;
  align-items: flex-start;
  gap: 17px;
}
.note .symbol {
  font-family: Georgia, serif;
  color: var(--green);
  font-size: 25px;
  line-height: 1.4;
}
.note h3 {
  font-size: 12px;
  margin: 0 0 5px;
  font-weight: 500;
  color: #c6ddcf;
}
.note p {
  font-size: 11px;
  color: #a1b7ab;
  margin: 0;
}
.note a {
  text-decoration: underline;
}
.health-note {
  background: #251b1d;
  border-color: #443035;
}
.health-note h3 {
  color: #e6b4ad;
}
.health-note p {
  color: #c5a6a4;
}
.health-note .symbol {
  color: var(--red);
}
.page-heading h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 43px;
  letter-spacing: -1px;
  line-height: 1.2;
  margin: 13px 0;
}
.page-heading p {
  color: var(--muted);
  max-width: 650px;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
}
.filter {
  padding: 7px 13px;
  font-size: 11px;
  background: transparent;
  border-radius: 30px;
}
.filter.active {
  background: #25394c;
  border-color: #658198;
  color: #fff;
}
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 11px;
}
.results-bar select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 7px;
  border-radius: 4px;
}
.empty {
  border: 1px dashed #405063;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  grid-column: 1/-1;
}
.back {
  display: inline-block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 25px;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 45px;
}
.article h1 {
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 15px 0;
}
.article .lede {
  font-size: 17px;
  color: #abb9c9;
  line-height: 1.8;
}
.article-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 27px;
}
.status {
  border: 1px solid #465464;
  padding: 3px 8px;
  border-radius: 3px;
  color: #b9c7d6;
  font-size: 9px;
}
.article h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 30px 0 12px;
  scroll-margin-top: 25px;
}
.article section p {
  font-size: var(--reading);
  color: #bac4d0;
  line-height: 1.9;
  margin: 0;
}
.article-toc {
  position: sticky;
  top: 30px;
  height: fit-content;
  border-left: 1px solid var(--line);
  padding-left: 20px;
  font-size: 11px;
}
.article-toc strong {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.article-toc a {
  display: block;
  color: #9eacbc;
  line-height: 1.5;
  margin-top: 16px;
}
.article-toc a:hover {
  color: white;
}
.source-entry {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.source-entry h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 5px 0;
}
.source-entry p {
  font-size: 12px;
  color: var(--muted);
  max-width: 760px;
}
.source-entry a {
  display: inline-block;
  color: #a8c6e4;
  text-decoration: underline;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.source-kind {
  font-size: 9px;
  color: var(--green);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.source-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
}
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.term {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
}
.term h2 {
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  margin: 0 0 10px;
}
.term p {
  font-size: 13px;
  color: var(--muted);
}
.term a {
  font-size: 11px;
  color: var(--green);
}
footer {
  border-top: 1px solid var(--line);
  padding: 25px 48px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 10px;
  color: #b6c1cd;
}
footer p {
  width: 100%;
  margin: 0;
  color: #75869a;
  font-size: 9px;
}
.muted {
  color: var(--muted);
}
.mobile-nav {
  display: none;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #31483e;
  color: #eff8f1;
  border: 1px solid #64927b;
  padding: 10px 22px;
  border-radius: 8px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.toast.show {
  opacity: 1;
}
.update {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #253a31;
  border: 1px solid var(--green);
  padding: 15px;
  z-index: 12;
  border-radius: 8px;
  font-size: 12px;
}
.update button {
  margin-left: 12px;
  background: #375345;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 30;
  background: var(--green);
  color: black;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
dialog {
  max-width: 480px;
  width: calc(100% - 36px);
  background: #152130;
  color: var(--text);
  border: 1px solid #516379;
  border-radius: 10px;
  padding: 35px;
}
dialog::backdrop {
  background: #000a;
}
dialog h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 29px;
}
dialog p {
  color: #b9c5d3;
}
.dialog-close {
  float: right;
  padding: 0 10px;
  font-size: 24px;
  background: transparent;
  border: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1500px) {
  main {
    padding-top: 60px;
  }
  .hero-art {
    min-height: 330px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 220px;
    padding: 30px 16px;
  }
  .shell {
    margin-left: 220px;
  }
  main {
    padding: 35px 30px;
  }
  .topbar {
    padding: 0 30px;
  }
  .hero {
    gap: 20px;
    grid-template-columns: 1.3fr 1fr;
  }
  .hero-art {
    min-height: 260px;
  }
  .book-stack {
    transform: rotate(-8deg) scale(0.8);
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 25px;
  }
  .hero h1 {
    font-size: 43px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    display: none;
  }
  .shell {
    margin-left: 0;
  }
  .topbar {
    height: 65px;
    padding: 0 21px;
  }
  .top-label {
    display: none;
  }
  .mobile-brand {
    display: block;
    font-size: 20px;
    letter-spacing: -0.8px;
  }
  .mobile-brand b {
    font-weight: 400;
  }
  .top-actions {
    gap: 5px;
  }
  .edition-badge {
    font-size: 7px;
    letter-spacing: 0.8px;
  }
  main {
    padding: 27px 21px 35px;
  }
  .hero {
    display: block;
    padding-bottom: 20px;
  }
  .hero h1 {
    font-size: 46px;
    margin: 16px 0 17px;
    letter-spacing: -1.5px;
  }
  .hero p {
    font-size: 13px;
  }
  .hero-art {
    margin-top: 26px;
    min-height: 205px;
  }
  .book-stack {
    transform: rotate(-8deg) scale(0.86);
    margin-bottom: 23px;
    height: 140px;
  }
  .art-caption {
    bottom: 21px;
  }
  .hero-actions {
    margin-top: 20px;
  }
  .stats {
    padding: 17px 0;
    margin-bottom: 22px;
    grid-template-columns: repeat(4, 1fr);
  }
  .stats > div {
    padding: 0 12px;
  }
  .stats b {
    font-size: 21px;
  }
  .stats small {
    font-size: 7px;
    letter-spacing: 0.4px;
  }
  .topics {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .topic {
    padding: 16px;
  }
  .topic h3 {
    font-size: 12px;
  }
  .topic p {
    font-size: 10px;
  }
  .section-title h2 {
    font-size: 18px;
  }
  .section-title a {
    font-size: 10px;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card-body {
    padding: 22px;
  }
  .card h3 {
    font-size: 24px;
  }
  .card p {
    font-size: 13px;
  }
  .card-foot {
    padding: 10px 22px;
  }
  .note {
    padding: 17px;
  }
  .note p {
    font-size: 12px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #101925f5;
    backdrop-filter: blur(10px);
    border-top: 1px solid #344052;
    z-index: 10;
    padding: 7px 8px max(8px, env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 21px;
    color: #889cb0;
    min-width: 52px;
    line-height: 1.5;
  }
  .mobile-nav a span {
    font-size: 9px;
  }
  .mobile-nav a.active {
    color: var(--red);
  }
  footer {
    padding: 24px 21px 100px;
  }
  .toast {
    bottom: 88px;
    width: max-content;
    max-width: 90%;
    font-size: 12px;
  }
  .page-heading h1 {
    font-size: 37px;
  }
  .glossary-grid {
    grid-template-columns: 1fr;
  }
  .article-layout {
    display: block;
  }
  .article-toc {
    position: static;
    margin: 20px 0 27px;
    padding: 16px;
    background: #14202c;
    border: 1px solid var(--line);
    border-radius: 5px;
  }
  .article-toc a {
    margin-top: 9px;
  }
  .article {
    display: flex;
    flex-direction: column;
  }
  .article h1 {
    font-size: 36px;
  }
  .article .lede {
    font-size: 16px;
  }
  .article section p {
    font-size: var(--reading);
  }
  .update {
    bottom: 83px;
    left: 15px;
    right: 15px;
  }
  .search-wrap .key {
    display: none;
  }
  .filters {
    gap: 7px;
  }
  .filter {
    font-size: 10px;
    padding: 7px 10px;
  }
  .results-bar {
    gap: 10px;
  }
  .source-entry a {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

main:focus {
  outline: none;
}

#install-mobile {
  display: none;
}
.mobile-toc {
  display: none;
}
@media (max-width: 760px) {
  #install-mobile {
    display: inline-block;
  }
  .mobile-toc {
    display: block;
  }
  .mobile-toc .article-toc {
    display: block;
  }
  .article-layout > .article-toc {
    display: none;
  }
}
