:root {
	color-scheme: light;
	--bg: #f7f6f2;
	--surface: #ffffff;
	--fg: #14233a;
	--muted: #5d6878;
	--accent: #1f3f6b;
	--accent-ink: #ffffff;
	--accent-soft: #eaf0f7;
	--pencil: #d9a441;
	--pencil-soft: #f8efdc;
	--ok: #22704a;
	--ok-soft: #e3f3ea;
	--border: #e3e1da;
	--danger: #b42318;
	--danger-soft: #fdecea;
	--radius: 12px;
	--radius-lg: 20px;
	--space: 1rem;
	--font: "Figtree", ui-sans-serif, system-ui, sans-serif;
	--display: "Fraunces", Georgia, serif;
	--shadow: 0 1px 2px rgba(20, 35, 58, 0.04), 0 8px 24px rgba(20, 35, 58, 0.06);
	--shadow-lg: 0 2px 4px rgba(20, 35, 58, 0.04), 0 24px 48px -12px rgba(20, 35, 58, 0.18);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.shell {
	max-width: 42rem;
	margin: 0 auto;
	padding: calc(var(--space) * 3) var(--space);
}

h1 {
	margin: 0 0 0.5rem;
	font-size: clamp(1.6rem, 4vw, 2.25rem);
	letter-spacing: -0.02em;
}

.lede {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
}

.hint {
	margin: 0;
	color: var(--muted);
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.9rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}

.btn:hover {
	filter: brightness(1.05);
}

.btn-secondary {
	background: transparent;
	color: var(--fg);
	border-color: var(--border);
}

.card {
	padding: var(--space);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
}

.input,
.select,
.textarea {
	width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--fg);
	font: inherit;
}

.field {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.35rem;
	margin-bottom: var(--space);
}

.field > label {
	font-size: 0.875rem;
	color: var(--muted);
}

/*
 * 390px-safe, like .grid below. A grid with no column list gets one implicit
 * auto column, and an auto column is never narrower than its widest item's
 * min-content width. One nowrap scrolling strip (days, time slots) anywhere
 * inside an item therefore widened the whole column past the screen: the page
 * scrolled sideways instead of the strip scrolling on its own. minmax(0, 1fr)
 * caps the column at the container; the min-width rule keeps a child from
 * bringing the same floor back if an app redefines the columns. :where() adds
 * no specificity, so a min-width the app sets on a child still wins.
 */
.stack {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space);
}

:where(.field, .stack, .list) > * {
	min-width: 0;
}

.row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/*
 * 390px-safe. An unclamped minmax track overflows a 390px viewport once the
 * shell padding is subtracted, and nothing in the pipeline ever looked at a
 * phone-width layout, so every generated app inherited the horizontal scroll.
 * min() clamps the track to the container instead.
 */
.grid {
	display: grid;
	gap: var(--space);
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.table {
	width: 100%;
	border-collapse: collapse;
}

.table th,
.table td {
	padding: 0.6rem 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

.table th {
	font-size: 0.8125rem;
	color: var(--muted);
	font-weight: 600;
}

.empty {
	padding: calc(var(--space) * 2);
	text-align: center;
	color: var(--muted);
}

.empty-title {
	margin: 0 0 0.25rem;
	color: var(--fg);
	font-weight: 600;
}

/* Loading. Every fetch has one; without a primitive each app invented its own. */
.loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: calc(var(--space) * 1.5);
	color: var(--muted);
}

.spinner {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: fab-spin 0.7s linear infinite;
}

@keyframes fab-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Placeholder for content whose shape is known before its data arrives. */
.skeleton {
	display: block;
	height: 1rem;
	border-radius: calc(var(--radius) / 2);
	background: linear-gradient(90deg, var(--border), transparent, var(--border));
	background-size: 200% 100%;
	animation: fab-shimmer 1.2s linear infinite;
}

@keyframes fab-shimmer {
	to {
		background-position: -200% 0;
	}
}

/* Error strip: a failure the user can see and retry, never a silent no-op. */
.alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--border);
	border-left: 3px solid var(--muted);
	border-radius: var(--radius);
}

.alert-error {
	border-left-color: var(--danger);
	color: var(--danger);
}

.badge {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 0.8125rem;
	color: var(--muted);
}

/*
 * The scaffold had exactly one @media rule (prefers-color-scheme) and no width
 * breakpoint at all, so the shell was a 42rem column at every size.
 * Mobile-first stays the default; these only widen it.
 */
@media (min-width: 48rem) {
	.shell {
		max-width: 52rem;
		padding: calc(var(--space) * 3) calc(var(--space) * 1.5);
	}
}

@media (min-width: 64rem) {
	.shell {
		max-width: 56rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spinner,
	.skeleton {
		animation: none;
	}
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ---------- Porter Tutoring ---------- */
a { color: var(--accent); }
h1, h2 { font-family: var(--display); color: var(--fg); }
.input { min-height: 48px; background: var(--surface); font-size: 1rem; }
textarea.input { min-height: 0; resize: vertical; }
.field > label { color: var(--fg); font-weight: 600; font-size: 0.9rem; }
.btn { min-height: 44px; justify-content: center; font-weight: 600; text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-secondary { background: var(--surface); }
.btn-big { min-height: 52px; padding: 0.8rem 1.4rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0.4rem 0.85rem; font-size: 0.92rem; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #f1c4bf; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.card { background: var(--surface); }
.stack-lg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.stack-lg > * { min-width: 0; }
.narrow { max-width: 28rem; }

h1, h2 { font-weight: 500; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

.topnav {
	position: relative; z-index: 2;
	display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.75rem;
}
.logo {
	display: inline-flex; align-items: center; gap: 0.6rem;
	font-family: var(--display); font-weight: 600; font-size: 1.2rem;
	color: var(--fg); text-decoration: none; letter-spacing: -0.01em;
}
.logo-mark {
	width: 2rem; height: 2rem; display: inline-grid; place-items: center;
	border-radius: 9px; background: var(--accent); color: #fff; font-size: 1.05rem;
}
.topnav-call {
	font-weight: 600; font-size: 0.9rem; text-decoration: none; color: #fff;
	padding: 0.5rem 0.95rem; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
	background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(6px);
	white-space: nowrap;
}
.topnav-call:hover { background: rgba(255, 255, 255, 0.18); }
.logo-light { color: #fff; }
.logo-light .logo-mark { background: #fff; color: var(--accent); }

.hero {
	position: relative; isolation: isolate; overflow: hidden;
	background: #0f1d31; color: #fff;
	padding-bottom: 6.5rem;
}
.hero-img {
	position: absolute; inset: 0; z-index: -2;
	width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
}
.hero-shade {
	position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(180deg, rgba(12, 24, 42, 0.55) 0%, rgba(12, 24, 42, 0.35) 30%, rgba(12, 24, 42, 0.88) 100%),
		linear-gradient(90deg, rgba(12, 24, 42, 0.6) 0%, rgba(12, 24, 42, 0) 70%);
}
.hero-copy { position: relative; padding-top: 3.5rem; }
.eyebrow {
	margin: 0 0 1rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em;
	text-transform: uppercase; color: var(--muted);
}
.hero .eyebrow { color: #f1d9a4; }
.eyebrow-accent { color: var(--pencil); margin-bottom: 0.6rem; }
.hero-title {
	color: #fff;
	font-size: clamp(2.5rem, 10vw, 4.75rem);
	line-height: 1.02;
	letter-spacing: -0.03em;
	margin: 0 0 1.25rem;
	max-width: 13ch;
}
.hero-lede { margin: 0 0 2.25rem; font-size: 1.15rem; max-width: 30rem; color: rgba(255, 255, 255, 0.82); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.5rem; }
.hero-call { color: #fff; font-weight: 600; text-underline-offset: 5px; text-decoration-color: rgba(255, 255, 255, 0.4); }
.btn-big { border-radius: 999px; box-shadow: 0 10px 24px -10px rgba(31, 63, 107, 0.7); transition: transform 0.15s, background-color 0.15s; }
.btn-big:hover { filter: none; background: #18335a; transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--accent); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5); }
.btn-light:hover { background: var(--pencil-soft); }

.facts {
	position: relative; z-index: 2;
	list-style: none; margin-top: -4rem; margin-bottom: 0;
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem;
}
.facts li {
	display: grid; gap: 0.2rem; padding: 1.15rem 1.15rem;
	background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.facts strong { font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.facts span { color: var(--muted); font-size: 0.88rem; }

.book { padding-top: 4.5rem; padding-bottom: 5rem; max-width: 46rem; }
.book-head { margin-bottom: 2.25rem; text-align: center; display: grid; justify-items: center; }
.progress {
	width: min(14rem, 100%); height: 6px; margin-top: 1.5rem;
	border-radius: 999px; background: var(--border); overflow: hidden;
}
.progress-bar { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.35s ease; }
.section-title { font-size: clamp(2rem, 6vw, 2.75rem); letter-spacing: -0.02em; margin: 0 0 0.4rem; line-height: 1.1; }
.section-sub { margin: 0; color: var(--muted); font-size: 1.05rem; }

.anchor { scroll-margin-top: 2.5rem; height: 0; }
.step {
	background: var(--surface);
	border: 1px solid rgba(20, 35, 58, 0.05);
	border-radius: var(--radius-lg);
	padding: 1.5rem 1.15rem;
	box-shadow: var(--shadow);
	transition: box-shadow 0.2s;
}
.step:focus-within { box-shadow: var(--shadow-lg); }
.step.is-done .step-n { background: var(--accent); color: #fff; }
.step-n svg { width: 1rem; height: 1rem; }
.step-title { display: flex; align-items: center; gap: 0.75rem; font-size: 1.35rem; margin: 0 0 1.25rem; line-height: 1.2; }
.step-n {
	flex: none;
	width: 2rem; height: 2rem;
	display: inline-grid; place-items: center;
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.95rem;
	font-family: var(--font);
	font-weight: 700;
}
.two { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1rem; }
.two > * { min-width: 0; }

.choice-grid, .program-grid { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); }
.choice, .program {
	position: relative;
	display: grid;
	gap: 0.2rem;
	padding: 0.95rem 1rem;
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	cursor: pointer;
	background: var(--surface);
	transition: border-color 0.15s, background-color 0.15s;
}
.choice input, .program input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:focus-visible), .program:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice.is-on, .program.is-on { border-color: var(--accent); background: var(--accent-soft); }
.choice-name, .program-name { font-weight: 700; font-size: 1.05rem; padding-right: 1.75rem; }
.choice-sub, .program-blurb { color: var(--muted); font-size: 0.95rem; }
.choice-tag, .program-rate { font-size: 0.85rem; font-weight: 600; color: var(--accent); margin-top: 0.25rem; }
.choice::after, .program::after {
	content: "";
	position: absolute; top: 1rem; right: 1rem;
	width: 1.1rem; height: 1.1rem;
	border-radius: 50%;
	border: 1.5px solid var(--border);
	background: var(--surface);
}
.choice.is-on::after, .program.is-on::after { border: 5px solid var(--accent); }

.day-strip {
	display: flex; gap: 0.5rem;
	overflow-x: auto;
	padding: 0.25rem 0.1rem 0.75rem;
	scroll-snap-type: x proximity;
}
.day {
	flex: none;
	min-width: 4.6rem;
	display: grid; gap: 0.1rem; justify-items: center;
	padding: 0.6rem 0.5rem;
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--fg);
	font: inherit;
	cursor: pointer;
	scroll-snap-align: start;
}
.day-wd { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.day-d { font-weight: 700; font-variant-numeric: tabular-nums; }
.day.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.day.is-on .day-wd { color: #dbe6f5; }
.slot-group { margin-top: 0.75rem; }
.slot-label { margin: 0 0 0.4rem; font-weight: 600; font-size: 0.9rem; }
.slots { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.slot {
	min-height: 44px;
	padding: 0.5rem 0.9rem;
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--fg);
	font: inherit;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}
.slot.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.picked {
	margin: 1rem 0 0;
	padding: 0.6rem 0.8rem;
	border-radius: var(--radius);
	background: var(--pencil-soft);
	font-weight: 600;
}

.site-foot { background: var(--fg); color: #c9d2de; padding: 3rem 0 1.5rem; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
.foot-name { margin: 0 0 0.4rem; font-family: var(--display); font-weight: 600; color: #fff; font-size: 1.35rem; }
.foot-label {
	margin: 0 0 0.4rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
	text-transform: uppercase; color: #8e9bb0;
}
.foot-note { margin: 0; line-height: 1.6; }
.foot-phone { font-size: 1.2rem; font-weight: 600; }
.site-foot .foot-link { display: inline-block; margin-top: 0.5rem; font-weight: 600; font-size: 0.92rem; color: #f1d9a4; }
.site-foot { padding-top: 3.5rem; }
.foot-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.site-foot .foot-owner { font-size: 0.85rem; color: #8e9bb0; }
.confirm-page { max-width: 38rem; }
.logo-solo { margin: 0 0 1.5rem; }

.confirm {
	background: var(--surface);
	border: 1px solid var(--border);
	border-top: 6px solid var(--ok);
	border-radius: var(--radius-lg);
	padding: 1.75rem 1.25rem;
	box-shadow: var(--shadow);
	display: grid; gap: 1rem;
	justify-items: start;
}
.confirm-mark {
	width: 3rem; height: 3rem;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--ok-soft); color: var(--ok);
}
.confirm-title { font-size: clamp(2rem, 7vw, 2.8rem); margin: 0; scroll-margin-top: 1rem; }
.summary { margin: 0; width: 100%; display: grid; border-top: 1px solid var(--border); }
.summary > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.summary dt { color: var(--muted); font-size: 0.92rem; }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.code { font-size: 1.2rem; letter-spacing: 0.08em; color: var(--accent); }

.back { display: inline-block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.owner-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.owner-head h1 { margin: 0; font-size: clamp(2rem, 6vw, 2.8rem); }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter {
	min-height: 40px; padding: 0.4rem 0.9rem;
	border: 1.5px solid var(--border); border-radius: var(--radius);
	background: var(--surface); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer;
}
.filter.is-on { background: var(--fg); color: #fff; border-color: var(--fg); }
.sec-title { font-size: 1.35rem; margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.count {
	font-family: var(--font); font-size: 0.85rem; font-weight: 700;
	background: var(--accent-soft); color: var(--accent);
	padding: 0.1rem 0.55rem; border-radius: 6px;
}
.bk {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid var(--pencil);
	border-radius: var(--radius);
	padding: 0.9rem 1rem;
	display: grid; gap: 0.6rem;
}
.bk.is-confirmed { border-left-color: var(--ok); }
.bk.is-cancelled { border-left-color: var(--border); opacity: 0.7; }
.bk.is-cancelled .bk-student { text-decoration: line-through; }
.bk-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.4rem 0.9rem; align-items: start; }
.bk-when { display: grid; font-variant-numeric: tabular-nums; min-width: 4.6rem; }
.bk-time { font-weight: 700; }
.bk-day { font-size: 0.85rem; color: var(--muted); }
.bk-student { margin: 0; font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.bk-meta { margin: 0; color: var(--muted); font-size: 0.92rem; }
.bk-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { font-size: 0.8rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 6px; background: var(--bg); color: var(--muted); }
.tag-consult { background: var(--pencil-soft); color: #7a5300; }
.tag-session { background: var(--accent-soft); color: var(--accent); }
.tag-pending { background: #fff; border: 1px solid #e8c77a; color: #7a5300; }
.tag-confirmed { background: var(--ok-soft); color: var(--ok); }
.tag-cancelled { background: var(--danger-soft); color: var(--danger); }
.bk-contact { margin: 0; font-size: 0.92rem; color: var(--muted); overflow-wrap: anywhere; }
.bk-notes { margin: 0; font-size: 0.92rem; padding: 0.5rem 0.7rem; background: var(--bg); border-radius: 6px; }
.bk-actions { gap: 0.5rem; }
.move { display: grid; gap: 0; padding-top: 0.5rem; border-top: 1px dashed var(--border); }

@media (min-width: 40rem) {
	.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.step { padding: 2rem; }
	.wrap { padding-left: 2rem; padding-right: 2rem; }
	.foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bk-top { grid-template-columns: auto minmax(0, 1fr) auto; }
	.bk-tags { grid-column: auto; justify-content: flex-end; }
}
@media (min-width: 56rem) {
	.hero { padding-bottom: 9rem; }
	.hero-copy { padding-top: 6rem; }
	.facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: -4.5rem; }
	.facts li { padding: 1.4rem 1.4rem; }
	.foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
.demo-banner {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #f1f2f4;
	color: #555b66;
	border-bottom: 1px solid #e2e4e8;
	font-size: 0.75rem;
	line-height: 1.4;
	text-align: center;
	padding: 0.35rem 0.75rem;
}
