/* manual.css - the Cold Light manual (2026-10-08): a parchment booklet, in the look of the game's World Chart (parchment,
   cream and ink from game/js/ui/chart.js, set in IBM Plex Serif like the chart's names), with the game's dark windows
   set into it as pictures of the screen. Loaded after site.css, on manual.php only. */

/* the World Chart's serif, Open Font License (assets/fonts/ibmplexserif/OFL.txt) */
@font-face { font-family: "IBM Plex Serif"; src: url("../../assets/fonts/ibmplexserif/IBMPlexSerif-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("../../assets/fonts/ibmplexserif/IBMPlexSerif-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("../../assets/fonts/ibmplexserif/IBMPlexSerif-Italic.ttf") format("truetype"); font-style: italic; font-weight: 500; font-display: swap; }

:root {
  --cl-parchment: #efe1c2;
  --cl-cream: #f6ecd4;
  --cl-ink: #3a2616;
  --cl-ink-soft: #6b4a2a;
  --cl-rule: #c9b48a;
  --cl-gold-dark: #7a5312;
  --cl-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
}

/* the band at the top: the logo back to the front page, the word Manual, and Play now */
.cl-manual-head { padding: 10px 0; background: var(--cl-ground); border-bottom: 2px solid var(--cl-outline); }
.cl-manual-logo img { display: block; width: auto; height: 44px; image-rendering: pixelated; }
.cl-manual-label { font-family: var(--cl-pixel-font); font-size: 0.75rem; color: var(--cl-gold-light); }
.cl-play-small { margin: 0; padding: 2px 14px 2px 38px; font-size: 0.75rem; white-space: nowrap; }
@media (max-width: 575.98px) {
  .cl-manual-logo img { height: 34px; }
}
.cl-play-small .cl-cursor { left: 2px; width: 28px; height: 28px; margin-top: -14px; }

/* contents beside the booklet on wide screens, folded above it on narrow ones */
.cl-manual-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; padding-bottom: 64px; }
.cl-toc summary { font-family: var(--cl-pixel-font); font-size: 0.75rem; line-height: 2; color: var(--cl-gold-light); cursor: pointer; }
.cl-toc ol { margin: 8px 0 0; padding-left: 1.4rem; }
.cl-toc li { margin-bottom: 6px; }
.cl-toc a { color: var(--cl-line); text-decoration: none; }
.cl-toc a:hover, .cl-toc a:focus-visible { color: var(--cl-gold-light); text-decoration: underline; }
@media (min-width: 992px) {
  .cl-manual-layout { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .cl-toc { position: sticky; top: 16px; }
}

/* the booklet: parchment, ink and the serif */
.cl-booklet {
  max-width: 52rem; padding: clamp(20px, 5vw, 56px); border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  background: var(--cl-parchment); color: var(--cl-ink); font-family: var(--cl-serif); font-weight: 500; font-size: 1.0625rem; line-height: 1.65;
}
.cl-booklet h1 {
  margin: 0 0 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--cl-rule); text-align: center;
  font-family: var(--cl-serif); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--cl-ink);
}
.cl-chapter { margin-top: 2.75rem; scroll-margin-top: 16px; }
.cl-chapter h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 1rem; font-family: var(--cl-serif); font-weight: 700; font-size: 1.5rem; color: var(--cl-ink); }
.cl-chapter-number {
  display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  font-family: var(--cl-pixel-font); font-size: 0.75rem; color: var(--cl-cream); background: var(--cl-gold-dark);
}
.cl-booklet h3 { margin: 1.5rem 0 0.5rem; font-family: var(--cl-serif); font-weight: 700; font-size: 1.15rem; color: var(--cl-gold-dark); }
.cl-booklet strong { font-weight: 700; }
.cl-booklet a { color: #6a3d12; }
.cl-booklet ul { padding-left: 1.3rem; }
.cl-booklet li { margin-bottom: 0.5rem; }

/* a word and what it means (the title menu's entries and the like) */
.cl-terms dt { font-weight: 700; }
.cl-terms dd { margin: 0 0 0.75rem 1.25rem; }

/* the controls, in two cream panels */
.cl-manual-panels { margin-bottom: 0.5rem; }
.cl-panel { height: 100%; padding: 14px 18px; background: var(--cl-cream); border: 1px solid var(--cl-rule); border-radius: 4px; }
.cl-panel h3 { margin-top: 0; }
.cl-booklet .cl-controls-list dt { font-weight: 700; }
.cl-booklet .cl-controls-list dt small { font-weight: 500; color: var(--cl-ink-soft); }
.cl-booklet .cl-controls-list dd { margin: 0 0 0.6rem; }

/* a picture of the screen: one of the game's dark windows set into the page, with the hand cursor */
.cl-screen { margin: 1.5rem 0; text-align: center; }
.cl-screen .cl-win { display: inline-block; text-align: left; font-family: var(--cl-text-font); font-size: 1.25rem; line-height: 1.5; }
.cl-screen-menu { padding: 6px 22px 6px 52px; }
.cl-screen-item { position: relative; }
.cl-screen-item.is-off { opacity: 0.45; }   /* as the game greys out a choice it cannot take yet (game.css .menu .item.disabled) */
.cl-screen-cursor { position: absolute; left: -42px; top: 50%; width: 32px; height: 32px; margin-top: -16px; image-rendering: pixelated; }
.cl-screen figcaption { margin-top: 0.5rem; font-style: italic; font-size: 0.95rem; color: var(--cl-ink-soft); }

/* tables in the booklet (statuses, items, options): ruled in the parchment's own colours */
.cl-booklet .cl-table { width: 100%; margin: 0.75rem 0 1.25rem; border-collapse: collapse; font-size: 0.98rem; }
.cl-booklet .cl-table th { padding: 6px 10px; text-align: left; font-weight: 700; color: var(--cl-gold-dark); border-bottom: 2px solid var(--cl-rule); }
.cl-booklet .cl-table td { padding: 6px 10px; vertical-align: top; border-bottom: 1px solid var(--cl-rule); }
.cl-booklet .cl-table tr:last-child td { border-bottom: 0; }
.cl-booklet .cl-table .cl-nowrap { white-space: nowrap; }
.cl-table-wrap { overflow-x: auto; }   /* a wide table scrolls inside the booklet on a phone, never the page */

/* the game's own icons beside a word: status icons (16 px) and item icons (32 px), drawn at twice their size */
.cl-icon { display: inline-block; vertical-align: middle; margin-right: 6px; image-rendering: pixelated; }
.cl-icon-16 { width: 32px; height: 32px; }
.cl-icon-32 { width: 40px; height: 40px; }

/* a short tip set apart from the text */
.cl-tip { margin: 1rem 0; padding: 10px 14px; background: var(--cl-cream); border-left: 4px solid var(--cl-gold-dark); border-radius: 0 4px 4px 0; }
.cl-tip p:last-child { margin-bottom: 0; }
.cl-screen-floats { display: inline-flex !important; flex-wrap: wrap; justify-content: center; gap: 4px 18px; max-width: 100%; padding: 8px 18px;
                    font-weight: bold; font-size: 1.35rem !important; }
/* the danger pips beside each band, lit and unlit, as the region banner shows them */
.cl-booklet .cl-pips { white-space: nowrap; letter-spacing: 3px; color: var(--cl-gold-dark); font-size: 1.1rem; }
.cl-pip-off { opacity: 0.25; }
