/* the booklet of a natal chart (astro-booklet.html): on the screen a column
   of sheets, on paper A4 pages in the light theme, each chapter on a new
   page, numbered at the foot */
body.booklet { max-width: 880px; }
.tools .back { color: var(--accent); text-decoration: none; font: 13px 'IBM Plex Mono', monospace; align-self: center; }
.tools .back span { text-transform: none; letter-spacing: normal; font-size: inherit; color: inherit; }
.tools input[type=date] { font: inherit; color: var(--ink); background: var(--ground); border: 1px solid var(--rule); border-radius: 6px; padding: 4px 7px; color-scheme: light; }
:root[data-theme="dark"] .tools input { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tools input { color-scheme: dark; } }
.tools .hint { margin: 0; flex-basis: 100%; font: italic 14px/1.4 Spectral, Georgia, serif; color: var(--ink-soft); }
.tools .hint span { text-transform: none; letter-spacing: normal; font-size: inherit; color: inherit; }

.sheet { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 36px 44px; margin: 0 0 22px; }
.sheet h2 { color: var(--accent); font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.sheet p { max-width: 68ch; }
.cover { text-align: center; }
.cover .kicker, .chapter .num { font: 12px 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
.cover h1 { font-size: 34px; }
.cover .lede { margin: 0 auto 18px; }
#wheel.cover-wheel { display: block; width: min(100%, 470px); aspect-ratio: 1; margin: 0 auto 18px; background: none; border: 0; }
.cover .data { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; text-align: left; max-width: 600px; margin: 0 auto;
  font: 13px/1.4 'IBM Plex Mono', monospace; }
.cover .data div { display: contents; }
.cover .data dt { color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding-top: 2px; }
.cover .data dd { margin: 0; overflow-wrap: anywhere; }
.preface .drafts { font-style: italic; color: var(--ink-soft); }
.toc { font: 14px/1.7 'IBM Plex Mono', monospace; padding-left: 1.6em; margin: 14px 0 0; }
.toc a { color: var(--accent); text-decoration: none; }
.chapter .sub { color: var(--ink-soft); font-style: italic; margin: 0 0 20px; }
.para { margin: 0 0 18px; }
.para p { margin: 0; }
.para .fac { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; max-width: none;
  font: 11px/1.4 'IBM Plex Mono', monospace; color: var(--accent); border-bottom: 1px solid var(--rule); padding-bottom: 2px; margin-bottom: 6px; }
.para .fac .w { color: var(--ink-soft); }
.para .st { color: var(--a-squa); text-transform: uppercase; letter-spacing: .08em; margin-left: 6px; }
.para .tension { font-style: italic; color: var(--ink-soft); }
.empty { font-style: italic; color: var(--ink-soft); }

/* the timeline of the year ahead */
.timeline { margin: 0 0 22px; }
.timeline svg { width: 100%; display: block; }
.timeline figcaption { min-height: 0; margin: 6px 0 0; font-size: 13px; }
.tl-grid { stroke: var(--rule); stroke-width: 1; }
.tl-row { stroke: var(--rule); stroke-width: .6; stroke-dasharray: 2 3; }
.tl-month { font: 10px 'IBM Plex Mono', monospace; fill: var(--ink-soft); }
.tl-year { fill: var(--gold); }
.tl-lab { font: 11px 'IBM Plex Mono', monospace; fill: var(--ink-soft); dominant-baseline: central; }
.tl-lab.told { fill: var(--ink); font-weight: 500; }
.tl-g { font-family: var(--glyph); font-size: 13px; fill: var(--accent); }
.tl-bar { opacity: .4; }
.tl-bar.conj, .tl-dot.conj { fill: var(--a-conj); }
.tl-bar.flow, .tl-dot.flow { fill: var(--a-trin); }
.tl-bar.tension, .tl-dot.tension { fill: var(--a-squa); }
.tl-dot { stroke: var(--panel); stroke-width: 1.2; }

/* the tables: positions and cusps side by side, the aspects under them */
.data-sheet .tables { grid-template-columns: 1.2fr 0.8fr; margin-top: 16px; row-gap: 22px; }
.data-sheet .tables > figure.wide { grid-column: 1 / -1; }
.data-sheet .tables > figure.wide table { width: auto; min-width: 60%; }
.factors-sheet .note-s { color: var(--ink-soft); font-size: 15px; }
table.factors { border-collapse: collapse; width: 100%; font: 12px/1.35 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
table.factors th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 1px solid var(--rule); padding: 4px 6px; }
table.factors td { padding: 2px 6px; border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent); }
table.factors .num { text-align: right; }
table.factors tr:not(.told) td { color: var(--ink-soft); }
.book-foot { max-width: 68ch; }

@media (max-width: 640px) {
  .sheet { padding: 22px 16px; }
  .cover h1 { font-size: 27px; }
  .sheet h2 { font-size: 22px; }
  .data-sheet .tables { grid-template-columns: 1fr; }
  .data-sheet .tables > figure.wide table { width: 100%; }
  .cover .data { grid-template-columns: 1fr; }
  .cover .data dd { margin-bottom: 4px; }
}

/* paper: A4, the light theme whatever the screen shows, no bar and no
   controls, a chapter per page, the page number at the foot */
@page { size: A4; margin: 16mm 17mm 18mm;
  @bottom-center { content: counter(page) " / " counter(pages); font: 9pt 'IBM Plex Mono', monospace; color: #5f4b76; } }
@page :first { @bottom-center { content: none; } }
@media print {
  :root:root:root {
    --ground: #ffffff; --ink: #2e2040; --ink-soft: #5f4b76; --rule: #d4c9e6;
    --accent: #7338a8; --accent-2: #9363be; --lilac: #d4b9eb; --gold: #6c5920; --panel: #ffffff;
    --a-conj: #8a6d16; --a-sext: #1f7f72; --a-squa: #b2324b; --a-trin: #2d63b0; --a-quin: #7a5a9e; --a-oppo: #b2324b;
    color-scheme: light;
  }
  html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.booklet { max-width: none; margin: 0; padding: 0; background: #fff; font-size: 11pt; line-height: 1.45; }
  .scenebar, .tools, nav.pages { display: none !important; }
  .sheet { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; break-before: page; }
  .sheet.cover { break-before: auto; padding-top: 8mm; }
  #wheel.cover-wheel { width: 125mm; }
  .sheet p { max-width: none; }
  .sheet h2 { font-size: 20pt; break-after: avoid; }
  .chapter .sub { break-after: avoid; }
  .para { break-inside: avoid; }
  .timeline { break-inside: avoid; }
  .data-sheet .tables > figure { break-inside: avoid; }
  table.factors tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .book-foot { margin-top: 10mm; font-size: 8pt; max-width: none; }
}
