/* CBPS School app · THE theme file (web). Look: cbps-app-dna "Sol do Deserto" (design-loop winner 2026-10-15).
   Colour/size VALUES come from tokens.css, generated from design/tokens.json by design/build.py (never hand-edit it).
   Every component rule lives here and only uses those variables. This file + views.php markup = the web skin.
   Rules carried: sand+cream, ink type, ONE billboard number per screen, ONE filled ink pill per screen
   (others are text links / quiet), green = present/booked only, sol yellow = one welcome, red = text only. */
@import url("tokens.css");
@font-face { font-family: "Archivo"; src: url("fonts/Archivo.ttf") format("truetype"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "ArchivoDisplay"; src: url("fonts/ArchivoDisplayCBPS-Black.ttf") format("truetype"); font-display: swap; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 420 var(--fs-body)/var(--lh-body) var(--font-text), -apple-system, sans-serif; font-variation-settings: var(--text-axes); }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; }
h1, .page-title { font-family: "ArchivoDisplay", var(--font-display), sans-serif; font-variation-settings: var(--display-axes); font-weight: 900; text-transform: uppercase; font-size: var(--fs-display-m); line-height: .95; letter-spacing: .005em; }
h2 { font-size: var(--fs-title); font-weight: 650; }
h3 { font-size: var(--fs-label); font-weight: 650; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--muted); }
p { margin: 0 0 .75em; }

/* billboard: the ONE street-poster number on a screen */
.billboard { font-family: "ArchivoDisplay", var(--font-display), sans-serif; font-variation-settings: var(--display-axes); font-weight: 900; text-transform: uppercase;
  font-size: clamp(56px, 16vw, 72px); line-height: var(--lh-display); margin: 4px 0 10px; letter-spacing: -.005em; }
.billboard.count { font-size: clamp(72px, 22vw, 96px); margin: 0; }

.preview-bar { background: var(--sunken); color: var(--muted); font-size: var(--fs-label); font-weight: 650; text-transform: uppercase; letter-spacing: var(--ls-label); text-align: center; padding: 7px 12px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--margin); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); color: var(--ink); font-size: 13px; font-weight: 800; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 6px var(--margin) 10px; position: sticky; top: 0; z-index: 5; background: var(--ground); scrollbar-width: none; }
.tabs a { padding: 9px 16px; border-radius: var(--r-pill); text-decoration: none; color: var(--muted); white-space: nowrap; font-weight: 650; min-height: var(--hit); display: inline-flex; align-items: center; }
.tabs a[aria-current] { background: var(--action); color: var(--on-action); }
.wrap { max-width: 720px; margin: 0 auto; padding: 8px var(--margin) 48px; }
.foot { text-align: center; font-size: 13px; color: var(--muted); padding: 24px var(--margin) 48px; }

/* cards: cream on sand, shadow, no border */
.card { background: var(--card); border-radius: var(--r-card); padding: 20px; margin: 0 0 12px; box-shadow: var(--shadow); overflow: hidden; }
.card.narrow { max-width: 420px; margin: 32px auto; }
.card .band { margin: -20px -20px 16px; height: 132px; background-size: cover; background-position: center 30%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eyebrow, .label { font-size: var(--fs-label); font-weight: 650; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--muted); margin: 0 0 4px; }
.eyebrow a { text-decoration: none; color: var(--muted); }
.big { font-size: 22px; font-weight: 750; margin: 0; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.empty { color: var(--muted); margin: 8px 0; }
.notice { background: var(--sunken); color: var(--ink2); border-radius: var(--r-sm); padding: 12px 14px; font-size: 15px; }
.flash { background: var(--present-tint); color: var(--present-ink); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 12px; font-weight: 650; }
.error { color: var(--alert); font-size: 14px; display: block; margin: -4px 0 10px; font-weight: 600; }
.hero { position: relative; border-radius: var(--r-hero); overflow: hidden; margin: 0 0 12px; min-height: 300px; display: flex; align-items: flex-end; background: var(--ink) center 35% / cover; box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--scrim-strong), var(--scrim-weak) 65%); }
.hero > div { position: relative; padding: 22px; color: var(--card); }
.hero h1 { font-size: clamp(40px, 11vw, 56px); margin: 0 0 8px; color: var(--card); }
.hero p { margin: 0; color: var(--sunken); }

.pill { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: var(--r-pill); background: var(--sunken); color: var(--ink2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
.pill.ok { background: var(--present-tint); color: var(--present-ink); }
.pill.warn { background: var(--sunken); color: var(--ink); }
.pill.alert { background: transparent; color: var(--alert); padding: 0; }
.pill.sol { background: var(--celebrate); color: var(--ink); }

/* buttons: ONE filled ink pill per screen (.primary); everything else is quiet */
.btn { appearance: none; border: 2px solid var(--line); background: transparent; color: var(--ink); border-radius: var(--r-pill); padding: 0 18px; min-height: var(--hit); font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.primary { background: var(--action); border-color: var(--action); color: var(--on-action); min-height: var(--button-h); padding: 0 26px; font-size: var(--fs-title); }
.btn.big { width: 100%; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; padding: 0; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; text-decoration-thickness: 2px; min-height: var(--hit); }

/* forms */
.form label { display: block; font-weight: 650; margin: 0 0 14px; }
.form input:not([type=radio]):not([type=checkbox]):not([type=file]), .form select, .form textarea, .acts input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; min-height: var(--hit); font: inherit; font-weight: 420; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: var(--r-sm); }
.form input:focus, .form textarea:focus, .form select:focus, .acts input:focus { outline: none; border-color: var(--ink); }
.form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 420; }
.form .check input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.form.inline { display: flex; gap: 8px; margin-top: 12px; } .form.inline input { margin: 0; } .form.inline .short { max-width: 110px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { border: 0; padding: 0; margin: 0 0 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.seg legend { font-size: var(--fs-label); font-weight: 650; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--muted); margin-bottom: 8px; }
.seg label { border: 2px solid var(--line); border-radius: var(--r-pill); padding: 0 16px; min-height: var(--hit); display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 650; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--card); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.slot-day { font-size: var(--fs-label); font-weight: 650; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--muted); margin: 16px 0 6px; }
.slot { display: flex !important; gap: 12px; align-items: center; min-height: 56px; padding: 8px 14px; border: 2px solid var(--line); border-radius: var(--r-sm); margin: 0 0 6px !important; font-weight: 420 !important; cursor: pointer; background: var(--card); }
.slot b { font-weight: 750; font-variant-numeric: tabular-nums; }
.slot input { accent-color: var(--ink); width: 20px; height: 20px; flex: none; }
.slot:has(input:checked) { border-color: var(--present); background: var(--present-tint); }
.waiver { margin: 8px 0 14px; font-size: 15px; color: var(--ink2); }
.waiver summary { font-weight: 650; cursor: pointer; min-height: var(--hit); display: flex; align-items: center; }
.steps { padding-left: 22px; } .steps li { margin-bottom: 12px; }
.plain { list-style: none; padding: 0; margin: 0; } .plain li { padding: 10px 0; border-bottom: 1px solid var(--sunken); } .plain li:last-child { border: 0; }

/* member home */
.next .facts { color: var(--ink2); margin: 0 0 14px; }
.next .facts span { display: block; color: var(--muted); }
.actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note { display: flex; gap: 14px; align-items: flex-start; }
.note img, .face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.note p:last-child { margin: 0; }
blockquote { margin: 10px 0; padding: 12px 14px; background: var(--sunken); border-radius: var(--r-sm); }
blockquote cite { display: block; font-size: var(--fs-label); font-weight: 650; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--muted); font-style: normal; margin-top: 6px; }
.chips { display: flex; gap: 8px; margin-bottom: 12px; } .chip { padding: 0 16px; min-height: var(--hit); display: inline-flex; align-items: center; border-radius: var(--r-pill); border: 2px solid var(--line); text-decoration: none; color: var(--ink2); font-weight: 650; } .chip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.ladder { list-style: none; padding: 0; margin: 0 0 12px; }
.ladder li { display: flex; gap: 12px; align-items: center; min-height: 40px; color: var(--muted); }
.ladder .dot { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--line); flex: none; }
.ladder li.past { color: var(--ink2); } .ladder li.past .dot { background: var(--ink2); border-color: var(--ink2); }
.ladder li.now { color: var(--ink); font-weight: 750; } .ladder li.now .dot { width: 18px; height: 18px; border: 5px solid var(--ink); }
.dl dt { font-size: var(--fs-label); font-weight: 650; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--muted); } .dl dd { margin: 2px 0 12px; }
.day { margin: 18px 0 4px; }
.classes { list-style: none; padding: 0; margin: 0; } .classes li { display: flex; gap: 12px; align-items: center; min-height: 64px; border-bottom: 1px solid var(--sunken); }
.classes li:last-child { border: 0; }
.classes .time, .row-link .time { min-width: 112px; font-variant-numeric: tabular-nums; color: var(--ink2); font-weight: 650; }
.classes li > a { margin-left: auto; }
.tbl { width: 100%; border-collapse: collapse; } .tbl td, .tbl th { padding: 12px 0; border-bottom: 1px solid var(--sunken); text-align: left; } .tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.post { background: var(--card); border-radius: var(--r-card); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.post header { margin-bottom: 6px; }
.post img { max-width: 100%; border-radius: var(--r-sm); margin-top: 8px; }
.compose textarea { min-height: 76px; }
.row-link { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--sunken); text-decoration: none; color: var(--ink); }
.row-link:last-child { border: 0; } .row-link > span:nth-child(2) { flex: 1; } .row-link .go { color: var(--ink); font-weight: 650; font-size: 15px; }

/* staff roster (roll call) */
.countline { display: flex; align-items: center; gap: 16px; margin: 6px 0 16px; }
.countline p { margin: 0; } .countline b { font-size: var(--fs-title); }
.roll-list { list-style: none; padding: 0; margin: 0 -20px; }
.roll { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 8px 20px; background: transparent; border: 0; border-top: 1px solid var(--sunken); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.roll .ini { width: 42px; height: 42px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-weight: 750; flex: none; }
.roll .nm { flex: 1; font-weight: 650; font-size: 17px; } .roll .nm small { display: block; font-weight: 420; font-size: 14px; color: var(--muted); }
.roll .tick { width: 52px; height: 52px; border-radius: 50%; border: 2.5px solid var(--ink2); flex: none; display: grid; place-items: center; }
.roll.on .tick { background: var(--present); border-color: var(--present); } .roll.on .tick::after { content: "✓"; color: var(--ink); font-weight: 900; font-size: 20px; }
.roll.trial { background: var(--celebrate-tint); }
.roll.busy { opacity: .55; }
.notes { list-style: none; padding: 0; margin: 12px 0 0; } .notes li { padding: 12px 0; border-top: 1px solid var(--sunken); } .notes p { margin: 0 0 4px; }
.trials { list-style: none; padding: 0; margin: 0; } .trial { padding: 14px 0; border-bottom: 1px solid var(--sunken); } .trial:last-child { border: 0; }
.trial .due { color: var(--alert); font-weight: 650; font-size: 14px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .acts input { flex: 1 1 200px; margin: 0; }
.items { list-style: none; padding: 0; margin: 0; } .item { display: flex; gap: 12px; align-items: center; min-height: 48px; } .item form { margin: 0; }
.tickbox { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--ink2); background: transparent; cursor: pointer; flex: none; }
.item.done span { text-decoration: line-through; color: var(--muted); } .item.done .tickbox { background: var(--present); border-color: var(--present); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 560px) { .row2, .grid2 { grid-template-columns: 1fr; } .who span { display: none; } }
