/* ============================================================================
   CCAE programme layouts. A template capability: layout lives here, pages carry content.

   booklet.css owns the six-square triad page. Some content is not six squares:
   a twelve-week schedule, a fact strip, a run of guest cards, a numbered list
   of outcomes that must read exactly as its source writes them. Those layouts
   live here so every page inherits them and no page hand-places its own.

   Same Zen Bauhaus vocabulary as booklet.css and ccae-chrome.css: the Bauhaus
   primaries as structure, paper and ink as ground, one green for the current
   side of a lineage. Scoped under .pg-* so it never reaches page content.

   Type floors, held throughout: in-context text at 1rem (16px, 12pt) or above.
   Incidental text (labels, stamps, source lines) never below .78rem (12.5px,
   9.4pt). Nothing smaller exists in this file.
   ========================================================================== */
.pg {
  --ink:#15130F; --paper:#F4F1EA; --line:rgba(21,19,15,.16);
  --red:#E2231A; --blue:#4B3FB0; --yellow:#FFD500; --green:#1F7A4D;
  --quiet:#5B5548;
  font-family:'Futura','Century Gothic','Trebuchet MS','Segoe UI',system-ui,sans-serif;
  color:var(--ink); background:var(--paper);
  margin:0; line-height:1.6;
}
.pg *, .pg *::before, .pg *::after { box-sizing:border-box; }

.pg-wrap { max-width:74rem; margin:0 auto; padding:2rem 1.25rem 4rem; }

/* ---- Headings -------------------------------------------------------------
   Four steps, visibly distinct, each carrying its role. */
.pg-lede { font-size:2rem; font-weight:700; letter-spacing:-.5px; margin:0 0 .6rem; line-height:1.15; }
.pg-standfirst { font-size:1.15rem; color:var(--quiet); margin:0 0 2.4rem; max-width:44rem; }
.pg h2 {
  font-size:1.4rem; font-weight:700; margin:3rem 0 .4rem; letter-spacing:-.2px;
  padding-top:.9rem; border-top:4px solid var(--ink);
}
.pg h2:first-of-type { margin-top:1.8rem; }
.pg h3 { font-size:1.1rem; font-weight:700; margin:1.8rem 0 .5rem; }
.pg-h2sub { color:var(--quiet); margin:.2rem 0 1.2rem; max-width:46rem; }
.pg p, .pg li { font-size:1rem; }
.pg p { margin:0 0 1rem; max-width:46rem; }

.pg a { color:var(--blue); }
.pg a:focus-visible { outline:3px solid var(--blue); outline-offset:2px; }

/* ---- Fact strip: the numbers a reader came for --------------------------- */
.pg-facts {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(13rem,1fr)); gap:1px;
  background:var(--line); border:1px solid var(--line); margin:0 0 2.4rem;
}
.pg-facts > div { background:#fff; padding:1rem 1.1rem; }
.pg-facts dt {
  font-size:.78rem; font-weight:700; letter-spacing:1.4px; text-transform:uppercase;
  color:var(--quiet); margin:0 0 .3rem;
}
.pg-facts dd { margin:0; font-size:1rem; font-weight:600; }
.pg-facts dd small { display:block; font-weight:400; font-size:.9rem; color:var(--quiet); margin-top:.2rem; }

/* ---- Ruled list, for outcomes rendered exactly as the source writes them -- */
.pg-outcomes { list-style:none; counter-reset:oc; padding:0; margin:1rem 0 0; max-width:52rem; }
.pg-outcomes li {
  counter-increment:oc; position:relative;
  padding:.9rem 0 .9rem 3.2rem; border-top:1px solid var(--line);
}
.pg-outcomes li:last-child { border-bottom:1px solid var(--line); }
.pg-outcomes li::before {
  content:counter(oc); position:absolute; left:0; top:.75rem;
  font-size:1.5rem; font-weight:700; color:var(--red); line-height:1;
  width:2.2rem; text-align:right;
}

/* ---- Schedule table ------------------------------------------------------
   Wide content scrolls inside its own box. The page body never scrolls
   sideways. */
.pg-scroll { overflow-x:auto; border:1px solid var(--line); background:#fff; margin:1rem 0 0; }
.pg-table { border-collapse:collapse; width:100%; min-width:44rem; }
.pg-table caption { text-align:left; padding:.9rem 1rem; font-size:.95rem; color:var(--quiet); }
.pg-table th, .pg-table td {
  text-align:left; vertical-align:top; padding:.85rem .9rem;
  border-top:1px solid var(--line); font-size:1rem;
}
.pg-table thead th {
  border-top:0; border-bottom:2px solid var(--ink); background:var(--paper);
  font-size:.78rem; letter-spacing:1.4px; text-transform:uppercase; white-space:nowrap;
}
.pg-table tbody th { font-weight:700; white-space:nowrap; width:3.2rem; }
.pg-table td.pg-when { white-space:nowrap; font-weight:600; }
.pg-table tr.pg-aside td, .pg-table tr.pg-aside th { background:#FBF7E2; }
.pg-table tr.pg-mark td { background:var(--ink); color:var(--paper); font-weight:600; }
.pg-table tr.pg-mark a { color:var(--yellow); }
.pg-guest { display:block; margin-top:.35rem; font-size:.9rem; color:var(--quiet); }
.pg-guest b { color:var(--ink); }

/* ---- Day shape: the three hours plus the shared hour --------------------- */
.pg-hours { display:grid; gap:1px; background:var(--line); border:1px solid var(--line); margin:1rem 0 0; }
@media (min-width:52rem) { .pg-hours { grid-template-columns:repeat(4,1fr); } }
.pg-hour { background:#fff; padding:1.1rem; border-top:4px solid var(--blue); }
.pg-hour:nth-child(1) { border-top-color:var(--red); }
.pg-hour:nth-child(3) { border-top-color:var(--yellow); }
.pg-hour:nth-child(4) { border-top-color:var(--green); }
.pg-hour dt { font-size:.78rem; font-weight:700; letter-spacing:1.4px; color:var(--quiet); margin-bottom:.35rem; }
.pg-hour dd { margin:0; }
.pg-hour dd b { display:block; font-size:1.05rem; margin-bottom:.25rem; }

/* ---- Guest cards --------------------------------------------------------- */
.pg-guests { display:grid; grid-template-columns:repeat(auto-fit,minmax(17rem,1fr)); gap:1px;
  background:var(--line); border:1px solid var(--line); margin:1rem 0 0; }
.pg-card { background:#fff; padding:1.2rem 1.25rem; display:flex; flex-direction:column; }
.pg-card h3 { margin:0 0 .15rem; font-size:1.1rem; }
.pg-card .pg-role { font-size:.95rem; color:var(--quiet); margin:0 0 .7rem; }
.pg-card p { font-size:.95rem; margin:0 0 .8rem; }
.pg-card .pg-links { margin-top:auto; font-size:.9rem; }
.pg-card .pg-links a { display:inline-flex; align-items:center; min-height:44px; margin-right:1rem; }

/* ---- Status pill: what is settled and what is not ------------------------ */
.pg-pill {
  display:inline-block; font-size:.78rem; font-weight:700; letter-spacing:1.2px;
  text-transform:uppercase; padding:.25rem .6rem; border:2px solid var(--ink);
  margin:0 0 .8rem;
}
.pg-pill--open { border-color:var(--red); color:var(--red); }
.pg-pill--set { border-color:var(--green); color:var(--green); }

/* ---- Callout: a thing the reader must not miss --------------------------- */
.pg-note {
  border-left:6px solid var(--yellow); background:#fff; padding:1.1rem 1.25rem;
  margin:1.4rem 0; max-width:52rem;
}
.pg-note > :last-child { margin-bottom:0; }
.pg-note b { display:block; margin-bottom:.3rem; }

/* ---- Apply block --------------------------------------------------------- */
.pg-apply { background:var(--ink); color:var(--paper); padding:1.6rem 1.5rem; margin:2.4rem 0 0; }
.pg-apply h2 { border-top:0; padding-top:0; margin:0 0 .5rem; color:var(--paper); }
.pg-apply p { color:var(--paper); }
.pg-apply a { color:var(--yellow); }
.pg-btn {
  display:inline-flex; align-items:center; min-height:44px; padding:.6rem 1.2rem;
  background:var(--yellow); color:var(--ink) !important; font-weight:700;
  text-decoration:none; margin:.4rem 1rem .4rem 0;
}
.pg-btn:focus-visible { outline:3px solid var(--paper); outline-offset:3px; }

/* ---- Foot line: version, source, licence --------------------------------- */
.pg-source {
  margin-top:3rem; padding-top:1rem; border-top:1px solid var(--line);
  font-size:.85rem; color:var(--quiet); max-width:52rem;
}

@media print {
  #ccae-header, #ccae-footer { display:none !important; }
  .pg-scroll { overflow:visible; }
  .pg { background:#fff; }
}
