/* =====================================================================
   Map Maker 5 course pages (pages/mm5-course*.html)
   A plain reading layout of its own: contents on the left (always in view, like
   Word's navigation pane), the course text on the right.
   ===================================================================== */
@font-face { font-family: "Neutra"; src: url("../fonts/neutra.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Tintin"; src: url("../fonts/tintin.woff2") format("woff2"); font-display: swap; }

:root {
  --nav-w: 310px;
  --ink: #222;
  --rust: #9A4A0F;          /* the course book's title colour */
  --band: #DAEEF3;          /* the course book's pale blue session band */
  --ui: #1F497D;            /* menu, tab and button names */
  --step: #E00000;          /* (1), (2) ... step numbers */
  --note: #008E40;          /* notes */
  --story: #006600;         /* the map's "story" */
  --link: #26399F;
  --paper: #FBF8F1;
  --line: #E3DBC8;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body.course {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.45 "Neutra", "Segoe UI", Arial, sans-serif;
  display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr);
}
a { color: var(--link); }

/* ---------- contents (left) ---------- */
.ctop { display: none; }
.cnav {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; grid-row: 1 / span 2;
  background: #F2ECDD; border-right: 1px solid var(--line);
  padding: 18px 14px 30px 18px; font-size: 14.5px; line-height: 1.35;
  scrollbar-width: thin; scrollbar-color: rgba(90, 58, 32, .35) transparent;
}
/* the logo's soft glow runs past the column edges, so the logo itself fills the column */
.cnav__logo { display: block; margin: -24px -48px -14px; }
.cnav__logo img { display: block; width: 100%; height: auto; }
.cnav__course { margin: 0 0 14px; }
.cnav__course a { display: block; color: var(--rust); text-decoration: none; font-size: 26px; letter-spacing: .04em; }
.cnav__course span { display: block; color: #555; font-size: 13.5px; }
.cnav__list { list-style: none; margin: 0; padding: 0; }
.cnav__list > li { border-top: 1px solid var(--line); }
.cnav summary { display: flex; align-items: baseline; gap: 4px; padding: 7px 0; cursor: pointer; list-style: none; }
.cnav summary::-webkit-details-marker { display: none; }
.cnav summary::before { content: "▸"; color: #8a7a60; width: 12px; flex: none; transition: transform .15s; }
.cnav details[open] > summary::before { transform: rotate(90deg); }
.cnav summary a { color: var(--ink); text-decoration: none; font-weight: bold; }
.cnav summary a[aria-current] { color: var(--rust); }
.cnav ol { list-style: none; margin: 0 0 8px; padding: 0 0 0 16px; }
.cnav ol a { display: block; padding: 2px 6px; color: #333; text-decoration: none; border-radius: 3px; }
.cnav ol a:hover, .cnav summary a:hover { color: var(--rust); }
.cnav li.t3 a { padding-left: 18px; font-size: 13.5px; color: #555; }
.cnav ol a.is-here { background: #FFD000; color: #222; }
.cnav__more { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.cnav__more a { display: block; margin: 4px 0; font-weight: bold; }

/* ---------- course text (right) ---------- */
.cmain { min-width: 0; padding: 34px 48px 40px; }
.cpage { max-width: 860px; }
.cpage__kicker {
  display: block; margin: 0 0 6px; padding: 3px 12px; background: var(--band);
  color: #1d4e5c; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.cpage h1 { margin: 0 0 22px; color: var(--rust); font-weight: normal; font-size: 40px; line-height: 1.15; }
.cpage h2 { margin: 2.2em 0 .6em; padding-bottom: 6px; border-bottom: 3px solid var(--band); font-size: 26px; line-height: 1.2; }
.cpage h3 { margin: 1.8em 0 .5em; font-size: 21px; }
.cpage h4 { margin: 1.5em 0 .4em; font-size: 18px; text-decoration: underline; text-underline-offset: 3px; }
.cpage h5 { margin: 1.3em 0 .3em; font-size: 17px; text-decoration: underline; text-underline-offset: 3px; }
.hn { margin-right: .25em; }
.cpage p { margin: 0 0 .65em; text-align: justify; hyphens: auto; }
.cpage p.center { text-align: center; }
.cpage p.right { text-align: right; }
.cpage p.ind { margin-left: 1.6em; }
/* the opening lines of the preface */
.cintro { margin: 0 0 1.4em; padding: 14px 22px; background: rgb(255, 254, 178); font-size: .93em; }
.cpage .cintro p { margin: 0 0 .5em; }
.cpage .cintro p:last-child { margin-bottom: 0; }
.cpage p.shade { background: var(--band); padding: 4px 10px; }
.cpage hr { border: 0; border-top: 1px solid #c9bfa8; margin: 1.4em 0; }
.clist { margin: 0 0 .8em; padding-left: 1.4em; }
ol.clist { list-style: none; padding-left: 0; }
.clist li { margin: .15em 0; }
.clist li.l2 { margin-left: 1.4em; }
.ln { display: inline-block; min-width: 1.8em; }

/* the course book's character styles */
.ui { color: var(--ui); font-family: "Segoe UI", "Open Sans", Arial, sans-serif; font-size: .86em; letter-spacing: .02em; }
.step { color: var(--step); }
.note { color: var(--note); font-style: italic; }
.story { color: var(--story); font-family: "Tintin", "Neutra", sans-serif; font-size: 1.2em; line-height: 1.3; }
.cpage p:has(> .story) { line-height: 1.3; }
.grey { color: #707070; font-weight: bold; }
.big { font-weight: bold; font-size: 1.5em; }
.mid { font-size: 1.15em; }
.c-ff0000 { color: var(--step); } .c-548dd4, .c-0070c0, .c-3366ff, .c-365f91 { color: #2F6DB5; }
.c-00b050, .c-008e40 { color: var(--note); } .c-984806 { color: var(--rust); } .c-808080 { color: #707070; }
.c-daeef3, .c-dbe5f1 { color: #8fb7c4; }
.sym { color: #e0a000; }
img.icon { vertical-align: middle; height: auto; }

/* pictures: click to see them at the size the screenshot was taken */
.cfig { margin: .8em auto 1.2em; }
.cfig img { display: block; width: 100%; height: auto; }
.cfig a.zoom { display: block; cursor: zoom-in; }
.cfig a.zoom:hover img { outline: 2px solid #FFD000; outline-offset: 2px; }
.cbox { margin: .6em 0 1em; padding: 8px 14px; background: #F3F9FB; border-left: 3px solid var(--band); font-size: .95em; }
.cbox p { margin: 0 0 .3em; text-align: left; }

/* the blue box (same as the one on the home page) */
.cquote {
  display: inline-block; margin: 0; text-align: left; font-style: italic; line-height: 1.45;
  color: #fff; background: rgb(41, 97, 207); padding: .7em 1.2em; border-radius: 2px;
}
.cquote__head { font-style: normal; }
.cquote__in { display: block; padding-left: .9em; }

/* WHY? : the arrows section */
.why { text-align: center; margin: 2em 0 2.5em; }
.why h2 { border: 0; text-align: center; letter-spacing: .1em; }
.cpage .why p { text-align: center; margin: 0 auto; max-width: 34em; }
.why__arrow { display: block; position: relative; width: 0; height: 44px; margin: 8px auto 10px; border-left: 1.5px solid #333; }
.why__arrow::after { content: ""; position: absolute; left: -6px; bottom: -2px; border: 5.5px solid transparent; border-top: 9px solid #333; border-bottom: 0; }
.why__line { display: block; width: 0; height: 30px; margin: 0 auto; border-left: 1.5px solid #333; }
.why__pairs { display: grid; grid-template-columns: 1fr 1fr; max-width: 30em; margin: 0 auto; }
.why__pairs dt, .why__pairs dd { margin: 0; padding: 5px 12px; font-weight: bold; }
.why__pairs dt { text-align: right; border-right: 1.5px solid #333; }
.why__pairs dd { text-align: left; }
.why__pairs dt:last-of-type { padding-bottom: 30px; }
.why__by { margin-top: .4em !important; font-size: 14px; color: #555; }
/* previous / next */
.pager { max-width: 860px; display: flex; justify-content: space-between; gap: 16px; margin: 40px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.pager a { display: block; max-width: 48%; padding: 10px 14px; background: #F2ECDD; border-radius: 3px; text-decoration: none; color: var(--ink); }
.pager a:hover { background: #FFD000; }
.pager span { display: block; font-size: 13px; color: #6b5a40; text-transform: uppercase; letter-spacing: .06em; }
.pager__next { text-align: right; margin-left: auto; }
.cfoot { max-width: 860px; margin-top: 34px; font-size: 13.5px; color: #666; }
.cfoot p { margin: .3em 0; }

/* full-size picture viewer */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(10, 25, 50, .72); }
.lb[hidden] { display: none; }
.lb__scroll { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lb__scroll img { display: block; max-width: none; height: auto; box-shadow: 0 8px 40px rgba(0,0,0,.5); background: #fff; }
.lb__close { position: fixed; top: 10px; right: 14px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #FFD000; color: #222; font-size: 28px; line-height: 1; cursor: pointer; }

/* ---------- tablets and phones: contents slide in from the left ---------- */
@media (max-width: 900px) {
  body.course { display: block; font-size: 16.5px; }
  .ctop {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
    padding: 8px 12px; background: #F2ECDD; border-bottom: 1px solid var(--line);
  }
  .ctop__btn { padding: 7px 14px; border: 0; border-radius: 3px; background: #FFD000; font: inherit; cursor: pointer; }
  .ctop__title { color: var(--rust); text-decoration: none; }
  .cnav {
    position: fixed; z-index: 30; top: 0; left: 0; width: min(86vw, 340px); height: 100vh;
    transform: translateX(-102%); transition: transform .25s; box-shadow: 4px 0 20px rgba(0,0,0,.25);
  }
  .cnav.is-open { transform: none; }
  html { scroll-padding-top: 60px; }
  .cmain { padding: 20px 16px 30px; }
  .cpage h1 { font-size: 32px; }
  .cpage h2 { font-size: 23px; }
  .cpage p { text-align: left; }
}

/* pictures with a short label, side by side (e.g. the map frame options) */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px 22px; margin: 1em 0 1.4em; }
.cgrid .cfig { margin: 0; max-width: none !important; }
.cgrid figcaption { margin-top: 6px; font-size: 15px; text-align: center; color: #444; }
