/* QAS Portal — shared styles for parent forms and the staff app.
   Deep navy and gold from the school crest; serif display, clean sans body. */
:root {
	--bg: #f2f4f9;
	--bg-glow: #e6ebf5;
	--surface: #ffffff;
	--surface-2: #f7f8fc;
	--fg: #18213a;
	--muted: #5d6884;
	--line: #e0e5ef;
	--line-strong: #cdd5e3;
	--field: #fbfcfe;
	--navy: #1d2747;
	--navy-2: #2c3b69;
	--link: #2c4a8f;
	--gold: #ceb067;
	--gold-ink: #8a6a23;
	--gold-soft: #f6efdc;
	--ok: #1f7a4d;
	--ok-soft: #e1f3e8;
	--warn: #b4541a;
	--warn-soft: #fcebdc;
	--bad: #b4261a;
	--chip: #eaeef6;
	--shadow: 0 1px 2px rgba(24, 33, 58, .05), 0 10px 30px -14px rgba(24, 33, 58, .22);
	--shadow-hover: 0 2px 4px rgba(24, 33, 58, .06), 0 18px 40px -16px rgba(24, 33, 58, .32);
	--display: "Source Serif 4", Georgia, "Times New Roman", serif;
	--body: "Figtree", -apple-system, "Segoe UI", Roboto, sans-serif;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0c1222;
		--bg-glow: #121a30;
		--surface: #141c31;
		--surface-2: #18213a;
		--fg: #e9edf7;
		--muted: #9ba6c0;
		--line: #243050;
		--line-strong: #314066;
		--field: #10172a;
		--link: #9db8f0;
		--gold-ink: #dcbf7a;
		--gold-soft: #2a2516;
		--ok: #52c58c;
		--ok-soft: #12301f;
		--warn: #eea06a;
		--warn-soft: #34210f;
		--bad: #ff8576;
		--chip: #1f2943;
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -16px rgba(0, 0, 0, .6);
		--shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 40px -16px rgba(0, 0, 0, .75);
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--fg);
	font: 16px/1.55 var(--body);
	padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; line-height: 1.15; letter-spacing: -.005em; }
a { color: var(--link); text-underline-offset: 3px; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
	.form-link, .btn { transition: border-color .15s ease, background-color .15s ease; }
}

/* ---------- header band ---------- */
.band {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: var(--navy);
}
.band-inner, .page {
	max-width: 760px;
	margin: 0 auto;
	padding-left: max(16px, env(safe-area-inset-left));
	padding-right: max(16px, env(safe-area-inset-right));
}
.band-inner { position: relative; display: flex; gap: 16px; align-items: center; padding-block: 14px; }
.band .logo { height: 44px; width: auto; flex: none; display: block; }
.band .title { border-left: 1px solid rgba(206, 176, 103, .35); padding-left: 16px; min-width: 0; }
.band .kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #ceb067; font-weight: 600; }
.band h1 { font-size: clamp(20px, 4vw, 24px); color: #fff; }
.staff-link {
	margin-left: auto; align-self: center; flex: none;
	color: #e7d29c; border: 1px solid rgba(206, 176, 103, .5); border-radius: 999px;
	min-height: 38px; display: inline-flex; align-items: center;
	padding: 0 15px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
	background: transparent;
}
.staff-link:hover { background: rgba(206, 176, 103, .14); border-color: #ceb067; }
.staff-link.signed-in { background: #ceb067; color: #1d2747; border-color: #ceb067; }
@media (max-width: 520px) {
	.band-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
	.band .logo { height: 48px; }
	.band .title { border-left: 0; padding-left: 0; }
	.staff-link { position: absolute; top: 24px; right: max(16px, env(safe-area-inset-right)); font-size: 13px; padding: 6px 12px; }
}

/* home: page title under the header */
.band.hero .band-inner { flex-wrap: wrap; }
.hero-text { flex-basis: 100%; display: grid; gap: 6px; margin-top: 10px; max-width: 34rem; padding-bottom: 8px; }
.hero-text h1 { font-size: clamp(28px, 6vw, 38px); color: #fff; }
.hero-text p { margin: 0; color: rgba(244, 241, 232, .75); font-size: 16px; }
@media (max-width: 520px) { .hero-text { margin-top: 4px; } }

.demo-banner { background: #ceb067; color: #1d2747; font-size: 13px; font-weight: 600; text-align: center; padding: 6px max(16px, env(safe-area-inset-right)) 6px max(16px, env(safe-area-inset-left)); }

/* ---------- page ---------- */
.page { padding-block: 28px 56px; display: grid; gap: 22px; }
.lede { margin: 0; color: var(--muted); max-width: 62ch; }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); font-weight: 700; }
.section-head { display: grid; gap: 4px; }
.section-head h2 { font-size: 24px; }

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 22px;
	display: grid;
	gap: 14px;
	box-shadow: var(--shadow);
}

/* form choices */
.form-list { display: grid; gap: 12px; }
.form-link {
	display: grid; grid-template-columns: auto 1fr auto; gap: 2px 16px; align-items: center;
	background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
	text-decoration: none; color: var(--fg); box-shadow: var(--shadow);
}
a.form-link:hover { border-color: var(--gold); }
.form-link .ico {
	grid-row: span 2; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
	background: var(--gold-soft); color: var(--gold-ink);
}
.form-link .ico svg { width: 24px; height: 24px; }
.form-link h2, .form-link h3 { font-size: 20px; }
.form-link p { margin: 0; color: var(--muted); font-size: 14px; grid-column: 2; }
.form-link .go {
	grid-row: span 2; grid-column: 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
	background: var(--navy); color: #fff; font-weight: 700;
}
@media (prefers-color-scheme: dark) { .form-link .go { background: #ceb067; color: #1d2747; } }
.form-link.soon { box-shadow: none; background: var(--surface-2); }
.form-link.soon .ico { background: var(--chip); color: var(--muted); }
.form-link.soon h2, .form-link.soon h3 { color: var(--muted); }
.form-link.soon .tag { grid-row: span 2; grid-column: 3; }
@media (max-width: 520px) {
	.form-link { padding: 16px; gap: 2px 14px; }
	.form-link.soon .tag { grid-row: auto; grid-column: 2; justify-self: start; margin-top: 6px; order: 9; }
	.form-link.soon .ico { grid-row: span 3; }
}
.tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }

/* how it works */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: how; }
@media (max-width: 640px) { .how { grid-template-columns: 1fr; } }
.how li {
	list-style: none; counter-increment: how; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start;
	background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.how li::before {
	content: counter(how); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
	background: var(--navy); color: #ceb067; font-weight: 700; font-size: 14px; font-family: var(--display);
}
@media (prefers-color-scheme: dark) { .how li::before { background: #ceb067; color: #1d2747; } }
.how b { font-size: 15px; }
.how span { font-size: 14px; color: var(--muted); }
ol.how { margin: 0; padding: 0; }

/* ---------- form ---------- */
form.stack { display: grid; gap: 18px; }
.step { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.step:first-child { padding-top: 0; border-top: 0; }
.step .n {
	width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
	background: var(--navy); color: #ceb067; font-family: var(--display); font-weight: 700; font-size: 15px;
}
@media (prefers-color-scheme: dark) { .step .n { background: #ceb067; color: #1d2747; } }
.step h2 { font-size: 20px; }
.section-lbl { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); font-weight: 700; border-top: 1px solid var(--line); padding-top: 14px; }
.section-lbl:first-child { border-top: 0; padding-top: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld label, .fld .lbl { font-size: 14px; font-weight: 600; }
.req { color: var(--bad); }
.fld input, .fld select, .fld textarea {
	font: inherit; font-size: 16px; padding: 11px 13px; width: 100%;
	border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--fg);
	min-height: 48px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.fld input::placeholder { color: var(--muted); opacity: .7; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
	outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(206, 176, 103, .25);
}
.fld .hint { font-size: 13px; color: var(--muted); }
.fld.bad input, .fld.bad select { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(180, 38, 26, .12); }
.agree {
	display: flex; gap: 12px; align-items: flex-start; font-size: 14px;
	background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.agree input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: #1d2747; }
.agree.bad { color: var(--bad); border-color: var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { color: var(--bad); font-weight: 600; margin: 0; }

/* ---------- buttons ---------- */
.btn { border: 0; border-radius: 999px; padding: 0 22px; font-weight: 700; font-size: 15px; cursor: pointer; min-height: 48px; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: #26325a; }
.btn.primary:disabled { opacity: .6; cursor: progress; }
@media (prefers-color-scheme: dark) {
	.btn.primary { background: var(--gold); color: #1d2747; }
	.btn.primary:hover { background: #d8bd7a; }
}
.btn.line { background: var(--chip); color: var(--fg); border: 0; }
.btn.line:hover { background: var(--line-strong); }
.btn.line:disabled { opacity: .5; cursor: default; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.ok:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .btn.ok { color: #0c1222; } }
.btn.sm { padding: 0 14px; min-height: 36px; font-size: 14px; }
.btn.link { background: none; color: var(--link); padding: 6px 0; min-height: 0; box-shadow: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---------- confirmation ---------- */
.done { display: grid; gap: 14px; text-align: left; }
.done .check {
	width: 60px; height: 60px; border-radius: 50%; background: var(--ok); display: grid; place-items: center;
	box-shadow: 0 0 0 8px var(--ok-soft);
}
.done h2 { font-size: 28px; }
dl.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.done dl.facts { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.done-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.staff-note { margin: 0; background: var(--gold-soft); border: 1px solid rgba(206, 176, 103, .45); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.ref { font-family: ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
.foot { font-size: 13px; color: var(--muted); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 8px; }
.site-foot .inner {
	max-width: 760px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
	display: flex; gap: 12px 24px; flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted);
}
.site-foot b { color: var(--fg); font-family: var(--display); font-size: 15px; font-weight: 600; }
.site-foot a { color: var(--muted); }

/* radio choices */
.choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.choices legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.choices label {
	display: flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 600;
	border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 16px; background: var(--field);
}
.choices label:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(206, 176, 103, .25); }
.choices input { accent-color: #1d2747; width: 18px; height: 18px; margin: 0; }
.choices .hint { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.choices.bad label { border-color: var(--bad); }
.fld textarea { resize: vertical; min-height: 80px; line-height: 1.45; }

/* repeatable child rows */
.children { display: grid; gap: 14px; }
.child { display: grid; gap: 14px; }
.child + .child { border-top: 1px dashed var(--line-strong); padding-top: 14px; }
.child-head { display: flex; justify-content: space-between; align-items: center; }
.child-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }
.add-child { justify-self: start; }
.add-hint { margin: -8px 0 0; font-size: 13px; color: var(--muted); }

/* form pre-filled by the staff message bot */
.prefill-note { background: var(--gold-soft); border: 1px solid rgba(206, 176, 103, .55); border-left: 4px solid #ceb067; border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.prefill-note ul { margin: 6px 0 0; padding-left: 20px; color: var(--warn); font-weight: 600; font-size: 14px; }
.card-inset { display: grid; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }

/* parent status page */
.status-list { display: grid; gap: 16px; }
.status-card h2 { font-size: 22px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); }
.steps li.done { color: var(--fg); font-weight: 600; }
.steps .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; transform: translateY(1px); }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); }
.steps small { font-weight: 400; color: var(--muted); }
.reply { background: var(--gold-soft); border: 1px solid rgba(206, 176, 103, .5); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.reply p { margin: 0; }
.reply small { color: var(--muted); }
.status-link { font-weight: 600; }


/* pill chips, as in the Campus Messages design */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
	display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px;
	border-radius: 999px; border: 1px solid var(--line-strong);
	background: var(--surface); color: var(--fg); cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none;
}
.chip-btn:hover { border-color: var(--gold); background: var(--gold-soft); }
.page-head { display: grid; gap: 6px; }
.page-head h1 { font-size: clamp(30px, 6vw, 38px); }
.page-head.center { text-align: center; justify-items: center; }
.page-head .note { max-width: 42em; }
.form-link .go, .form-link .go:is(*) { background: none; color: var(--muted); width: auto; height: auto; font-size: 18px; font-weight: 600; }
a.form-link:hover .go { color: var(--gold-ink); }
