/* xag-detail.css  The Detail template for profile pages (design standard, template 3): coloured header, then a roomy two-column body.
   Main column (about 62%): the sections as glass cards. Side column (about 38%): the Book button first, key facts (Teaches, Speaks, Levels) and the
   weekly schedule. On phones it is one column: header, Book, key facts, schedule, then the sections.
   Colours, radii and shadows come from the shared tokens only (--xag-c-*, --xag-radius-*); no hex colours, no fonts. Spacing: 4, 8, 12, 16, 24, 32 px. */

/* ---- header: the colour is the teacher's own (or the name-based pair); text is light or dark so it always reads (see onColour in index.html) ---- */
.xtp-phero { border-radius: var(--xag-radius); padding: 32px; gap: 24px; margin: 0 0 24px; }
.xtp-phero.xtp-on-light, .xtp-phero.xtp-on-light .xtp-pname, .xtp-phero.xtp-on-light .xtp-pheadline, .xtp-phero.xtp-on-light .xtp-pyears { color: var(--xag-c-white); }
.xtp-phero.xtp-on-dark, .xtp-phero.xtp-on-dark .xtp-pname, .xtp-phero.xtp-on-dark .xtp-pheadline, .xtp-phero.xtp-on-dark .xtp-pyears { color: var(--xag-c-on-bright); }
.xtp-phero .xtp-pphoto { border-color: var(--xag-c-white); box-shadow: var(--xag-c-shadow-sm); }
.xtp-phero .xtp-pphoto .xtp-mono { color: var(--xag-c-white); }

/* ---- body: main column and side column ---- */
.xtp-pgrid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1320px; margin: 0 auto; }
.xtp-pmain { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.xtp-pside { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.xtp-pgrid .xtp-psec { border: 1px solid var(--xag-c-line); border-radius: var(--xag-radius); background: var(--xag-c-surface); color: var(--xag-c-text); padding: 24px; box-shadow: none; }
.xtp-pgrid .xtp-psec h2, .xtp-pgrid .xtp-psec h3 { margin: 0 0 12px; font-size: var(--xag-h-sub-size); font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--xag-h-sub); }
.xtp-pside .xtp-pcta { order: -1; align-items: stretch; margin: 0; }
.xtp-pside .xtp-pcta .xtp-book { width: 100%; }
.xtp-pfacts:empty { display: none; }
.xtp-fact + .xtp-fact { margin-top: 16px; }
.xtp-fact h3 { margin-bottom: 8px; }
.xtp-pgrid .xtp-glist { margin: 0; padding-left: 24px; list-style: disc; }
.xtp-pgrid .xtp-glist li { margin: 4px 0; }

/* ---- the weekly schedule: a tidy glass card in the side column (no dashed border) ---- */
.xtp-pside .xav-slot { margin: 0; }
.xtp-pside .xav-pubbox { border: 1px solid var(--xag-c-line); border-radius: var(--xag-radius); background: var(--xag-c-surface); color: var(--xag-c-text); padding: 24px; margin: 0; max-width: 640px; }
.xtp-pside .xav-pubbox h4 { margin: 0 0 12px; font-size: var(--xag-h-sub-size); font-weight: 700; color: var(--xag-h-sub); }
.xtp-pside .xav-pub { margin: 0 0 12px; gap: 8px; }
.xtp-pside .xav-pubbox small, .xtp-pside .xav-pubbox .xav-note { font-size: .8125rem; color: var(--xag-c-text-2); }

@media (max-width: 52rem) {
  .xtp-pgrid { grid-template-columns: minmax(0, 1fr); }
  .xtp-phero { padding: 24px 16px; }
  .xtp-pside { order: -1; }
}

/* pages with no header colour of their own (school profile): token colours, white text */
.xtp-phero.xtp-hero-token { background: linear-gradient(120deg, var(--xag-c-solid-teal), var(--xag-c-inverse)); }
.xtp-phero h1.xtp-pname { margin: 0; }
.xtp-pphoto { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.xtp-pphoto .xtp-gimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xtp-phero { position: relative; display: flex; align-items: center; min-height: 200px; overflow: hidden; }
.xtp-pphoto { position: relative; flex: none; width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--xag-c-white); }
.xtp-mono { position: relative; font-weight: 800; font-size: 3rem; line-height: 1; color: var(--xag-c-white); }
.xtp-pname { font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.2; }
.xtp-pheadline { margin: 4px 0 8px; font-weight: 600; }
.xtp-pyears { margin: 8px 0 0; font-weight: 700; font-size: .9rem; }
@media (max-width: 52rem) { .xtp-phero { flex-direction: column; text-align: center; } .xtp-pphoto { width: 120px; height: 120px; } }
