:root {
  color-scheme: dark;
  --page-bg: #1a1a1a;
  --panel-bg: #2c2c2c;
  --panel-border: #1f1f1f;
  --footer-bg: #1f1f1f;
  --text: #f4f4f4;
  --muted: #cdcdcd;
  --accent: #f3a424;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 16px 20px 0;
  color: var(--text);
  background: var(--page-bg);
  font: 13px/1.6 "Lucida Grande", Lucida, Verdana, sans-serif;
  text-align: center;
}

body::before {
  content: "";
  position: absolute;
  inset: 16px 0 auto;
  z-index: -2;
  height: 348px;
  background: url("top_grad.png") repeat-x left top;
}

.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 16px;
  background: var(--accent) url("top_bar_bg.png") repeat-x left top;
}

a {
  color: var(--accent);
}

a:hover,
a:focus {
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  width: min(750px, 100%);
  margin: 0 auto;
  text-align: left;
}

.site-sidebar {
  color: var(--muted);
  font-size: 0.85em;
  line-height: 1.4;
  padding-right: 15px;
}

.site-header {
  padding: 15px 0;
  margin-bottom: 15px;
}

.site-header h1 {
  margin: 0;
  color: var(--muted);
  font-size: 1.6em;
  line-height: 1.2;
}

.site-header p {
  margin: 0;
  color: var(--accent);
  font-size: 1em;
}

.site-nav {
  border-top: 1px solid var(--panel-border);
}

.site-nav a {
  display: block;
  min-height: 31px;
  padding: 7px 0 5px 15px;
  color: var(--text);
  background: url("menu_arrow.gif") no-repeat left center;
  border-bottom: 1px solid var(--panel-border);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.content-panel {
  background: var(--panel-bg);
  border-left: 4px solid var(--panel-border);
  border-right: 4px solid var(--panel-border);
}

.section {
  padding: 15px;
}

.section + .section {
  border-top: 1px solid var(--panel-border);
}

.book-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

h2 {
  margin: 0 0 0.65em;
  color: var(--accent);
  font-size: 1.35em;
  line-height: 1.25;
}

p {
  margin: 0 0 1em;
}

.lede {
  font-size: 14px;
}

.book-cover {
  margin: 0;
}

.book-cover img {
  display: block;
  width: min(100%, 480px);
  height: auto;
}

.link-list {
  margin: 0;
  padding-left: 1.4em;
}

.link-list li + li {
  margin-top: 0.25em;
}

.site-footer {
  padding: 15px;
  background: var(--footer-bg);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 720px) {
  body {
    margin: 16px 12px 0;
    text-align: left;
  }

  .site-shell {
    display: block;
    width: 100%;
  }

  .site-sidebar {
    padding-right: 0;
  }

  .site-header {
    margin-bottom: 8px;
  }

  .site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--panel-border);
  }

  .site-nav a {
    flex: 1 1 7rem;
    background-position: 10px center;
    padding-left: 25px;
  }

  .content-panel {
    border-left-width: 2px;
    border-right-width: 2px;
  }
}
