/* ========================================================================================================
   The privacy notice and the terms (privacy/index.html, terms/index.html): reading pages in the side-list look of
   the School directory (classlings-page.css), with no script. The side list holds the two pages as plain links;
   the panel holds the words. This file is only what reading needs: paragraphs, lists, the two tables (stacked into
   cards on a phone, so nothing scrolls sideways) and the soft sky "For pupils" box.
   On a laptop the words scroll inside the panel, so the side list stays put; on a phone the whole page scrolls.
   ======================================================================================================== */

.cla-doc a.pg-sec { color: var(--ink); text-decoration: none; }
.cla-doc .pg-top .pg-line { font-size: 17px; }

/* ------------------------------------------------------------------ the words */
.doc { max-width: 780px; padding: 6px 0 28px; }
.doc > * + * { margin-top: 14px; }
.doc p, .doc li { font: 400 18px / 1.5 var(--body); }
.doc strong { font-weight: 700; }
.doc h3 { margin-top: 30px; font: 700 24px / 1.2 var(--display); scroll-margin-top: 12px; }
.doc h3 + * { margin-top: 10px; }
.doc ul { padding-left: 1.3em; list-style: disc; }
.doc li { padding-left: 2px; }
.doc li + li { margin-top: 8px; }
.doc li::marker { color: var(--ink-2); }
.doc a { color: var(--sky-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; overflow-wrap: anywhere; }
.doc a:hover { color: var(--ink); }
.doc-lead { font-size: 20px !important; }

/* For pupils: a soft sky card with a Classling beside the words, the friendliest thing on the page. */
.doc-pupils {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 14px;
    margin-top: 20px !important; padding: 16px 22px 20px;
    background: var(--sky-tint); border: var(--edge) solid var(--sky-deep); border-radius: var(--r-l);
}
.doc-pupils > .ic { line-height: 0; }
.doc-pupils h3 { margin: 0; font: 700 24px / 1.2 var(--display); }
.doc-pupils p { grid-column: 1 / -1; margin: 0; font-size: 19px; }

/* A table in its own soft box. Wide cells wrap; nothing is cut. */
.doc-table { margin-top: 12px !important; border: 2px solid var(--wash-2); border-radius: var(--r-m); overflow: hidden; }
.doc-table table { width: 100%; border-collapse: collapse; }
.doc-table th { padding: 10px 14px; font: 600 17px / 1.25 var(--display); text-align: left; background: var(--wash); }
.doc-table td { padding: 10px 14px; font: 400 16px / 1.45 var(--body); vertical-align: top; border-top: 2px solid var(--wash-2); overflow-wrap: anywhere; }
.doc-table td:first-child { font-weight: 700; }
.doc-table.is-who td:first-child { width: 24%; }
.doc-table.is-help td:first-child { width: 26%; }
.doc-table.is-help td:last-child { width: 30%; }

/* ------------------------------------------------------------------ a phone, and anything that narrow */
@media (max-width: 899px) {
    /* The whole page scrolls, as a page of words should on a phone. */
    body.cla-page.cla-doc { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
    .cla-doc .pg-wrap { flex: none; }
    .cla-doc .pg-pane, .cla-doc .pg-scroll { overflow: visible; }
    /* The title across the top, then the two pages and Home in one row. */
    .cla-doc .pg-name { grid-column: 1 / -1; grid-row: 1; }
    .cla-doc .pg-secs { grid-column: 1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cla-doc .pg-side .pg-home { grid-column: 2; grid-row: 2; align-self: start; }
    .doc { padding-top: 2px; }
    .doc p, .doc li { font-size: 17px; }
    .doc-lead { font-size: 18px !important; }
    .doc h3 { margin-top: 26px; font-size: 22px; }
    .doc-pupils { padding: 12px 16px 16px; gap: 6px 12px; }
    .doc-pupils h3 { font-size: 22px; }
    .doc-pupils p { font-size: 17px; }
}

/* Too narrow for three columns: each row of a table becomes a small card, its column names above each part. */
@media (max-width: 699px) {
    .doc-table table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; width: auto !important; }
    .doc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .doc-table tr { padding: 12px 14px 14px; border-top: 2px solid var(--wash-2); }
    .doc-table tbody tr:first-child { border-top: 0; }
    .doc-table td { padding: 0; border: 0; }
    .doc-table td + td { margin-top: 8px; }
    .doc-table td:first-child { font: 600 18px / 1.25 var(--display); }
    .doc-table td + td::before { content: attr(data-label); display: block; margin-bottom: 1px; font: 600 15px / 1.2 var(--display); color: var(--ink-2); }
}

/* On paper: the words alone, from top to bottom. */
@media print {
    body.cla-page.cla-doc { display: block; height: auto; overflow: visible; }
    .cla-doc .pg-wrap { display: block; padding: 0; }
    .cla-doc .pg-side { display: none; }
    .cla-doc .pg-pane, .cla-doc .pg-scroll { border: 0; overflow: visible; }
    .doc a { color: var(--ink); }
}
