/* The book's contents, in a panel at the left of every page (panel.js): the
   book, its parts and chapters, and the modules of the chapter the student is
   in. Scoped to #app and #side, so the board page keeps its own styles. */
#app { height: 100vh; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
#app.closed { grid-template-columns: 0 minmax(0, 1fr); }
#main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("/static/literata.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("/static/public-sans.woff2") format("woff2"); }
/* The ledger palette (book.css has the same values) */
#side { overflow-y: auto; border-right: 1px solid #c9d3cc; background: #e6ece7; padding: 18px 0 24px;
  display: flex; flex-direction: column; color: #18232b;
  --pserif: "Literata", Georgia, serif; --psans: "Public Sans", system-ui, sans-serif; }
#app.closed #side { visibility: hidden; }
#side .book { display: block; padding: 0 20px 14px; margin-bottom: 6px; border-bottom: 1px solid #c9d3cc;
  font: 650 16.5px/1.3 var(--pserif); color: #18232b; text-decoration: none; }
#side .book.cur { color: #275c45; }
#side .part { margin: 16px 20px 4px; font: 600 13px/1.3 var(--psans); color: #55636b; }
#side .ch { display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: left; border: 0; border-radius: 0;
  background: none; padding: 5px 20px; font: 15.5px/1.35 var(--pserif); color: #18232b; text-decoration: none; cursor: pointer; }
#side a.ch:hover { background: #dbe3dd; }
#side .ch .cn { flex: 0 0 22px; color: #55636b; font-variant-numeric: lining-nums tabular-nums; }
#side .ch .ct { flex: 1; }
#side .ch .cp { font: 12px var(--psans); color: #55636b; white-space: nowrap; }
#side .ch .cp.done { color: #275c45; }
#side .ch.cur { font-weight: 600; color: #275c45; }
#side .ch.tbd { color: #75828a; cursor: default; }
#side ol { list-style: none; margin: 2px 0 6px; padding: 0; }
#side li a { display: flex; gap: 8px; width: 100%; text-align: left; padding: 4px 20px 4px 48px;
  font: 14.5px/1.35 var(--pserif); color: #55636b; text-decoration: none; }
#side li a:hover { background: #dbe3dd; color: #18232b; }
#side li .ck { flex: 0 0 14px; color: #275c45; }
#side li .planned { display: flex; gap: 8px; align-items: baseline; padding: 4px 20px 4px 48px;
  font: 14.5px/1.35 var(--pserif); color: #75828a; }
#side li a.cur { color: #275c45; font-weight: 600; box-shadow: inset 3px 0 0 #275c45; background: #dbe3dd; }
/* A chapter still to come: grey, no link, and the word "TBD" after its title */
#side .tag { margin-left: 6px; font: 500 11px/1 var(--psans); color: #75828a; white-space: nowrap;
  border: 1px solid #c3cdc6; border-radius: 3px; padding: 1px 4px; vertical-align: 1px; }
/* The student and Sign out, at the foot of the panel */
#side .acct { margin-top: auto; padding: 18px 20px 0; font: 14px var(--psans); color: #55636b; display: flex;
  gap: 10px; align-items: center; flex-wrap: wrap; }
#side .acct .who { font-weight: 600; color: #18232b; overflow-wrap: anywhere; }
#side .acct button, #side .acct a { font: 14px var(--psans); color: #275c45; background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* The toggle: an icon of a window with its left panel */
.sidetog { display: inline-flex; align-items: center; justify-content: center; padding: 4px 6px !important;
  background: transparent; color: #55636b; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.sidetog:hover { color: #275c45; }
.sidetog:focus-visible { outline: 2px solid #275c45; outline-offset: 1px; }
/* The board inside the frame: its main column fills the space at the right */
#main > main { flex: 1; min-height: 0; }
body.inbook #wbbar #whobtn { display: none; }
#side a:focus-visible { outline: 2px solid #275c45; outline-offset: -2px; }
/* A narrow window: the panel is closed until the toggle opens it over the page */
@media (max-width: 860px) {
  #app, #app.closed { grid-template-columns: minmax(0, 1fr); }
  #side { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(300px, 86vw);
    visibility: hidden; transform: translateX(-100%); box-shadow: 0 0 0 100vmax rgba(24,35,43,0); }
  #app.open #side { visibility: visible; transform: none; box-shadow: 0 0 0 100vmax rgba(24,35,43,.28); }
}
