/* Session page (session.js): phone first, then wider screens, then A4 print matching the PDFs.
   Colours are the PDFs'; sketches carry their own fixed palette. Everything is scoped under .pd-session. */
.pd-session {
  --pd-ink: #1b2430;
  --pd-muted: #5b6573;
  --pd-blue: #1f5f9e;
  --pd-tint: #eef3f8;
  --pd-rule: #d5dce4;
  --pd-water: #f5f7f9;
  color: var(--pd-ink);
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.45;
}
.pd-session h1 { font-size: 1.75rem; line-height: 1.15; margin: 0; }
.pd-session h2 { color: var(--pd-blue); font-size: 1.15rem; margin: 1.6em 0 0.5em; }
.pd-sub { color: var(--pd-muted); margin: 0.2em 0 0; }
.pd-focus { background: var(--pd-tint); border-left: 3px solid var(--pd-blue); padding: 0.6em 0.8em; margin: 1em 0 0; }

.pd-schedule { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.pd-schedule th { color: var(--pd-muted); font-size: 0.85em; text-align: left; border-bottom: 1px solid var(--pd-muted); padding: 0.25em 0.3em; }
.pd-schedule td { border-bottom: 1px solid var(--pd-rule); padding: 0.3em; vertical-align: middle; }
.pd-schedule td:first-child { width: 1.8em; }
.pd-schedule .pd-num { text-align: right; width: 2.6em; }
.pd-water td { background: var(--pd-water); color: var(--pd-muted); }
.pd-notes { margin-top: 0.8em; }
.pd-notes p { margin: 0 0 0.5em; }

.pd-badge {
  display: inline-grid; place-items: center; flex: none;
  width: 1.6em; height: 1.6em; border-radius: 0.35em;
  background: var(--pd-badge); color: #fff; font-weight: 700; font-size: 0.95em;
}
.pd-badge--sm { width: 1.35em; height: 1.35em; font-size: 0.75em; }

.pd-ex { margin-top: 1.1em; }
.pd-ex-head { display: flex; align-items: center; gap: 0.6em; background: var(--pd-tint); padding: 0.4em 0.6em; }
.pd-ex-head h3 { flex: 1; margin: 0; font-size: 1.05rem; line-height: 1.25; }
.pd-ex-time { color: var(--pd-muted); font-size: 0.9em; text-align: right; }
.pd-ex-body { margin-top: 0.5em; }
.pd-ex-text p { margin: 0 0 0.45em; }
.pd-ex-text ul, .pd-ex-text ol { margin: 0 0 0.45em; padding-left: 1.3em; }
.pd-ex-text li { margin-bottom: 0.25em; }
.pd-ex-text li::marker { font-weight: 700; }
.pd-ex-text .pd-subs { list-style: "\2013  "; margin: 0.25em 0 0; }
.pd-subs li::marker { font-weight: 400; }
.pd-h4 { color: var(--pd-muted); font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.04em; margin: 0.6em 0 0.3em; }
.pd-link { font-size: 0.92em; overflow-wrap: anywhere; }
.pd-link a { color: var(--pd-blue); }
/* A YouTube link: thumbnail, then the title and the address. */
.pd-video { display: flex; align-items: center; gap: 0.8em; margin: 0.4em 0 0.6em; }
.pd-thumb { flex: none; display: block; line-height: 0; }
.pd-thumb img { width: 128px; height: 72px; object-fit: cover; border-radius: 4px; background: var(--pd-tint); }
.pd-videos { display: flex; flex-direction: column; gap: 0.2em; }

/* Sketches: a full court is tall, so cap the width on a phone; half views are almost square. */
.pd-sketch { margin: 0.4em 0 0; }
.pd-sketch svg { display: block; width: 100%; height: auto; }
.pd-sketch figcaption { color: var(--pd-muted); font-size: 0.85em; line-height: 1.3; margin-top: 0.3em; }
.pd-ex-body--aside .pd-sketch { width: min(100%, 220px); margin-inline: auto; }
.pd-ex-body--aside .pd-sketch--end { width: min(100%, 300px); }
.pd-sketch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9em; margin-top: 0.4em; }

@media (min-width: 640px) {
  .pd-ex-body--aside { display: grid; grid-template-columns: 1fr 200px; gap: 1.4em; align-items: start; }
  .pd-ex-body--aside .pd-sketch, .pd-ex-body--aside .pd-sketch--end { width: auto; margin: 0; }
  .pd-sketch-row { grid-template-columns: repeat(auto-fill, minmax(170px, 200px)); }
}

/* Print: A4, the exercises start on page 2 and an exercise never splits across pages, as in the PDFs. */
@media print {
  @page { size: A4; margin: 14mm 18mm 18mm; }
  .pd-session { max-width: none; font-size: 9.6pt; line-height: 1.38; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pd-session h1 { font-size: 23pt; }
  .pd-session h2 { font-size: 13pt; }
  .pd-ex-head h3 { font-size: 12pt; }
  .pd-part { break-before: page; }
  .pd-ex { break-inside: avoid; }
  .pd-session h2 { break-after: avoid; }
  .pd-ex-body--aside { display: grid; grid-template-columns: 1fr 46mm; gap: 7mm; }
  .pd-ex-body--aside .pd-sketch, .pd-ex-body--aside .pd-sketch--end { width: auto; margin: 0; }
  .pd-sketch-row { grid-template-columns: repeat(3, 52mm); gap: 6mm; }
  .pd-link a { color: var(--pd-blue); text-decoration: underline; }
  .pd-thumb img { width: 32mm; height: 18mm; }
  .pd-video { break-inside: avoid; }
}
