/* ========== Tokens ========== */
:root {
	/* Ink and text */
	--ink: #16181D;
	--ink-hover: #3D4148;
	--ink-2: #4F535A;
	--muted: #5B5F66;

	/* On the dark featured card */
	--on-dark: #FFFFFF;
	--on-dark-muted: #C9CCD1;
	--on-dark-label: #B8BBC1;
	--on-dark-border: #4A4E56;

	/* Surfaces and lines */
	--bg: #F5F6F7;
	--surface: #FFFFFF;
	--input-soft: #FAFAFB;
	--fill: #ECEDEF;
	--fill-2: #E3E4E7;
	--border: #E3E4E7;
	--border-strong: #D5D7DB;
	--border-dashed: #B8BBC1;
	--divider: #ECEDEF;

	/* Brand */
	--cyan: #21F4F0;
	--cyan-hover: #5FF7F4;
	--indigo: #443DD9;

	/* Parent-only */
	--private-bg: #EFEEFC;
	--private-border: #CFCCF4;
	--private-ink: #2F2A8C;

	/* Type */
	--font-body: "Inter", system-ui, -apple-system, sans-serif;
	--font-display: "Inter Tight", "Inter", system-ui, sans-serif;

	/* Shape */
	--r-pill: 999px;
	--r-featured: 3px;
	--r-card: 3px;
	--r-panel: 16px;
	--r-input: 14px;
	--r-small: 12px;

	/* Depth: cards sit off the page like index cards */
	--shadow-card: 0 1px 2px rgb(22 24 29 / 0.08), 0 14px 28px -10px rgb(22 24 29 / 0.28);

	/* Layout */
	--tap: 44px;
	--container: 1200px;
	--gutter: 24px;
}

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
	margin: 0;
	font-family: var(--font-display);
}

p { margin: 0; }

a { color: var(--ink); }
a:hover { color: var(--ink-hover); }

:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ========== Type helpers ========== */
.page-title {
	font-size: 44px;
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.1;
}

.section-title {
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -0.015em;
}

.card-title {
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.eyebrow {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.subtle { color: var(--muted); }

.quote-text {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.01em;
}
.quote-text--card { font-size: 20px; line-height: 1.3; }
.quote-text--entry { font-size: 22px; line-height: 1.3; }
.quote-text--small {
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0;
}

/* ========== Header ========== */
.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.site-header__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 14px var(--gutter);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 32px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--ink);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 19px;
	letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }

.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	flex: 1 1 auto;
}

.nav__link {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap);
	padding: 0 16px;
	border-radius: var(--r-pill);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	color: var(--ink-2);
}
.nav__link:hover {
	background: var(--fill);
	color: var(--ink);
}
.nav__link[aria-current="page"] {
	background: var(--fill);
	color: var(--ink);
	font-weight: 600;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.avatar {
	width: var(--tap);
	height: var(--tap);
	border-radius: var(--r-pill);
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--ink);
	font: 600 14px/1 var(--font-body);
	cursor: pointer;
}

/* ========== Page layout ========== */
.page {
	max-width: var(--container);
	margin: 0 auto;
	padding: 40px var(--gutter) 72px;
	display: flex;
	flex-direction: column;
	gap: 48px;
}
.page--tight { gap: 32px; }

.page-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}
.page-head__text {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.split {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: stretch;
}
.split__main {
	flex: 999 1 560px;
	min-width: 0;
}
.split__side {
	flex: 1 1 320px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

/* ========== Buttons ========== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--tap);
	padding: 0 18px;
	border: 1px solid transparent;
	border-radius: var(--r-pill);
	font: 600 15px/1 var(--font-body);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.btn--lg { min-height: 48px; padding: 0 22px; }

.btn--accent { background: var(--cyan); color: var(--ink); }
.btn--accent:hover { background: var(--cyan-hover); color: var(--ink); }

.btn--dark { background: var(--ink); color: var(--on-dark); }
.btn--dark:hover { background: #2A2D33; color: var(--on-dark); }

.btn--on-dark {
	background: transparent;
	border-color: var(--on-dark-border);
	color: var(--on-dark);
}
.btn--on-dark:hover { border-color: var(--on-dark); color: var(--on-dark); }

/* Full-width rectangular button (quick add "Save to the box") */
.btn--block {
	width: 100%;
	border-radius: var(--r-small);
}

/* Big bottom save button on the add/edit screen */
.btn--xl {
	min-height: 54px;
	border-radius: var(--r-panel);
	font-size: 16px;
}

/* Icon-only buttons: always give them aria-label */
.icon-btn {
	width: var(--tap);
	height: var(--tap);
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border);
	border-radius: var(--r-small);
	background: var(--surface);
	color: var(--ink);
	cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn--round { border-radius: var(--r-pill); }

.icon-btn--on-dark {
	width: 48px;
	height: 48px;
	border-radius: var(--r-pill);
	border-color: var(--on-dark-border);
	background: transparent;
	color: var(--on-dark);
}
.icon-btn--on-dark svg { width: 20px; height: 20px; }

/* Favorite toggle: aria-pressed drives the filled state */
.fav svg { fill: none; }
.fav[aria-pressed="true"] svg {
	fill: var(--cyan);
	stroke: var(--ink);
}
.icon-btn--on-dark.fav[aria-pressed="true"] svg { stroke: var(--cyan); }

/* ========== Choice buttons (box picker, filters) ========== */
.choices {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.choice {
	min-height: var(--tap);
	padding: 0 16px;
	border: 1px solid var(--border-strong);
	border-radius: var(--r-pill);
	background: var(--surface);
	color: var(--ink);
	font: 600 15px/1 var(--font-body);
	cursor: pointer;
}
.choice:hover { border-color: var(--ink); }
.choice[aria-pressed="true"] {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--on-dark);
}
.choice--add {
	border-style: dashed;
	border-color: var(--border-dashed);
	background: transparent;
	color: var(--ink-2);
	font-weight: 500;
}

/* ========== Box tags ========== */
.tag {
	display: inline-flex;
	align-items: center;
	padding: 5px 11px;
	border-radius: var(--r-pill);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}
.tag--cyan { background: var(--cyan); color: var(--ink); }
.tag--indigo { background: var(--indigo); color: var(--on-dark); }

/* ========== Cards ========== */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-card);
	box-shadow: var(--shadow-card);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 13px;
	color: var(--muted);
}

.card-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}
.card-row > .card {
	flex: 1 1 300px;
	min-width: 0;
	gap: 14px;
}

/* ========== Featured quote (Today) ========== */
.featured {
	height: 100%;
	/* Fine grain, a glow of the box's color, and a soft charcoal fade instead of flat ink */
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
		radial-gradient(90% 80% at 100% 0%, color-mix(in srgb, var(--box-bg, var(--cyan)) 20%, transparent), transparent 70%),
		linear-gradient(160deg, #2A2D33, var(--ink) 70%);
	background-color: var(--ink);
	color: var(--on-dark);
	border-radius: var(--r-featured);
	box-shadow: var(--shadow-card);
	padding: 48px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.featured .eyebrow { color: var(--on-dark-label); }

.featured__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.featured__mark {
	width: 44px;
	height: 34px;
	flex: 0 0 auto;
	color: var(--box-bg, var(--cyan));
}
.featured__mark--end {
	align-self: flex-end;
	margin-top: -16px;
	margin-bottom: auto;
	transform: rotate(180deg);
}

.featured__quote {
	margin: 0;
}
.featured__quote p {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(28px, 3.2vw, 42px);
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.featured__meta { color: var(--on-dark-muted); }

.featured__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.featured__actions .fav { margin-left: auto; }

/* ========== On this day ========== */
.memory {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 16px;
	border-top: 1px solid var(--divider);
}
.memory__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--muted);
}

/* ========== Media (attachments) ========== */
.media {
	border-radius: var(--r-input);
	background: var(--fill);
	overflow: hidden;
}
.media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.media--side { height: 132px; }
.media--entry { height: 220px; max-width: 360px; }

.media-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* ========== Forms ========== */
.field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.field__label {
	font-size: 14px;
	font-weight: 600;
}
.field__label-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}
.field__help {
	margin-top: -2px;
	font-size: 13px;
	color: var(--muted);
}

/* 16px minimum on inputs so iOS Safari doesn't zoom on focus */
.input,
.textarea {
	width: 100%;
	border: 1px solid var(--border-strong);
	border-radius: var(--r-input);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: 16px;
	line-height: 1.45;
}
.input { min-height: 48px; padding: 0 14px; }
.textarea { padding: 12px 14px; resize: vertical; }
.textarea--soft { background: var(--input-soft); }
.textarea--quote {
	border-radius: var(--r-panel);
	padding: 14px 16px;
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.35;
	resize: none;
}
.input::placeholder,
.textarea::placeholder { color: var(--muted); }

/* Parent-only field */
.field--private .field__label {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--private-ink);
}
.field--private .field__label svg { width: 15px; height: 15px; }
/* The whole field sits in a tinted panel; the textarea itself stays a normal field */
.field--private {
	padding: 16px;
	border: 1px solid var(--private-border);
	border-radius: var(--r-panel);
	background: var(--private-bg);
}
.field--private .field__help { color: var(--private-ink); }

.check {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--tap);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}
.check input {
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--ink);
}

/* Search pill */
.search {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 240px;
	min-height: var(--tap);
	padding: 0 14px;
	border: 1px solid var(--border-strong);
	border-radius: var(--r-pill);
	background: var(--surface);
}
.search svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.search input {
	flex: 1 1 auto;
	min-width: 0;
	border: none;
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: 16px;
}
.search input:focus { outline: none; }
.search:focus-within {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

/* Grouped rows (the "When" row on the add screen) */
.list-group {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-panel);
	overflow: hidden;
}
.list-row {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 0 16px;
	border: none;
	background: transparent;
	color: var(--ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.list-row + .list-row { border-top: 1px solid var(--divider); }
.list-row svg { width: 20px; height: 20px; color: var(--ink-2); flex: 0 0 auto; }
.list-row__label { flex: 1 1 auto; font-size: 15px; font-weight: 500; }
.list-row__value { font-size: 15px; color: var(--ink-2); }

/* Attachment uploader */
.thumb {
	position: relative;
	width: 96px;
	height: 96px;
	border-radius: var(--r-input);
	background: var(--fill-2);
}
.thumb img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: var(--r-input);
	object-fit: cover;
}
.thumb__remove {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 28px;
	height: 28px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--bg);
	border-radius: var(--r-pill);
	background: var(--ink);
	color: var(--on-dark);
	cursor: pointer;
}
/* Expands the 28px button's hit area to 44px */
.thumb__remove::before {
	content: "";
	position: absolute;
	inset: -8px;
}
.thumb__remove svg { width: 12px; height: 12px; }

.thumb-add {
	width: 96px;
	height: 96px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	border: 1.5px dashed var(--border-dashed);
	border-radius: var(--r-input);
	background: var(--surface);
	color: var(--ink-2);
	font: 500 12px/1 var(--font-body);
	cursor: pointer;
}
.thumb-add svg { width: 22px; height: 22px; }

/* ========== Parent-only note (display) ========== */
.private-note {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border-radius: var(--r-small);
	background: var(--private-bg);
	color: var(--private-ink);
	font-size: 14px;
	line-height: 1.45;
}
.private-note svg {
	width: 16px;
	height: 16px;
	margin-top: 2px;
	flex: 0 0 auto;
}
.private-note strong { font-weight: 600; }

/* ========== Diary ========== */
.diary {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 32px;
}

.year-rail {
	flex: 1 1 160px;
	max-width: 220px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-card);
	box-shadow: var(--shadow-card);
}
.year-rail .eyebrow { padding: 4px 10px 8px; font-size: 12px; }
.year-rail a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 40px;
	padding: 0 10px;
	border-radius: 10px;
	color: var(--ink);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}
.year-rail a:hover { background: var(--fill); }
.year-rail__count { font-size: 13px; color: var(--muted); }

@media (min-width: 900px) {
	.year-rail {
		position: sticky;
		top: 24px;
	}
}

.diary__feed {
	flex: 999 1 560px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 36px;
}

.month {
	display: flex;
	flex-direction: column;
	gap: 14px;
	scroll-margin-top: 24px;
}
.month__title {
	font-size: 18px;
	font-weight: 600;
	color: var(--ink-2);
	letter-spacing: -0.005em;
}

.entry {
	display: flex;
	gap: 20px;
	padding: 22px 24px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-card);
	box-shadow: var(--shadow-card);
}
.entry__date {
	flex: 0 0 52px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding-top: 2px;
}
.entry__day {
	font-family: var(--font-display);
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
}
.entry__dow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}
.entry__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.entry__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--muted);
}
.entry__actions {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* ========== Add / edit quote (mobile-first) ========== */
.sheet-bar {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}
.sheet-bar__title {
	font-size: 18px;
	font-weight: 600;
}
.sheet-bar__spacer { width: var(--tap); }

.form-stack {
	max-width: 560px;
	margin: 0 auto;
	padding: 20px 20px 32px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.save-bar {
	position: sticky;
	bottom: 0;
	padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
	background: var(--surface);
	border-top: 1px solid var(--border);
}
.save-bar__inner {
	max-width: 520px;
	margin: 0 auto;
}

/* ========== Empty state ========== */
.empty {
	padding: 48px 24px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

/* ========== Small screens ========== */
@media (max-width: 600px) {
	:root { --gutter: 16px; }

	.page { padding-top: 24px; gap: 32px; }
	.page-title { font-size: 34px; }

	.featured {
		padding: 28px;
		border-radius: var(--r-card);
		gap: 22px;
	}

	.search { min-width: 0; width: 100%; }

	.entry {
		flex-wrap: wrap;
		gap: 14px;
		padding: 18px;
	}
	.entry__actions {
		flex-direction: row;
		margin-left: auto;
	}

	.year-rail {
		max-width: none;
		flex-direction: row;
		flex-wrap: wrap;
	}
	.year-rail .eyebrow { width: 100%; }
}

/* ==========================================================================
   Additions beyond the approved spec. Built only from the tokens above;
   no new colors, fonts, shadows, or gradients.
   ========================================================================== */

/* Flash messages and form errors */
.flash-wrap {
	max-width: var(--container);
	margin: 0 auto;
	padding: 16px var(--gutter) 0;
}
.flash {
	padding: 12px 16px;
	border: 1px solid var(--border-strong);
	border-radius: var(--r-panel);
	background: var(--surface);
	font-size: 15px;
	font-weight: 500;
}
.flash ul { margin: 0; padding-left: 18px; }
.flash-wrap { transition: opacity 0.3s ease; }
.flash-wrap.is-leaving { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
	.flash-wrap { transition: none; }
}

/* The file input inside .thumb-add is visually hidden; show focus on the tile */
.thumb-add:focus-within {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

/* Lets a button_to form drop out of layout so its button is the flex child */
.form-contents { display: contents; }

/* The avatar opens the account page, so it's a link rather than a button */
a.avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

/* A .choice that navigates (e.g. "Add a box") is a link */
a.choice {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

/* Low-emphasis action, e.g. delete at the foot of an edit sheet */
.btn--quiet {
	background: transparent;
	color: var(--ink-2);
}
.btn--quiet:hover {
	background: var(--fill);
	color: var(--ink);
}

/* Keeps the year and its count apart when the rail turns into a row on phones */
.year-rail a { gap: 8px; }

/* A parent-picked box color. The server sets --tag-bg and picks --tag-ink
   (ink or white) so the pair always reaches 4.5:1. */
.tag--custom { background: var(--tag-bg); color: var(--tag-ink); }

/* Native color input sitting in a .list-row */
.color-input {
	width: var(--tap);
	height: 32px;
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: var(--r-small);
	background: var(--surface);
	cursor: pointer;
}
.color-input::-webkit-color-swatch-wrapper { padding: 3px; }
.color-input::-webkit-color-swatch { border: none; border-radius: 8px; }
.color-input::-moz-color-swatch { border: none; border-radius: 8px; }

/* Sheet pages fill the screen so the save bar rests at the bottom even when the form is short */
.sheet-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}
.sheet-page > form {
	display: flex;
	flex: 1;
	flex-direction: column;
}
.sheet-page .save-bar { margin-top: auto; }
.sheet-page > form > .form-stack { width: 100%; }

/* Box colors: any element mentioning a box carries --box-bg / --box-ink (box_vars helper) */
.choice--box {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.choice--box::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--box-bg);
}
.choice--box[aria-pressed="true"],
.choice--box:has(input:checked) {
	background: var(--box-bg);
	border-color: var(--box-bg);
	color: var(--box-ink);
}
.choice--box[aria-pressed="true"]::before,
.choice--box:has(input:checked)::before { display: none; }
/* Box chips that wrap a hidden checkbox show its keyboard focus */
.choice:has(input:focus-visible) {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

/* Several box tags side by side (a quote filed to more than one kid) */
.tags {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
}
.tag[hidden] { display: none; }

.btn--box,
.btn--box:hover {
	background: var(--box-bg);
	color: var(--box-ink);
}
.btn--box:hover { filter: brightness(0.94); }

.tag--box { background: var(--box-bg); color: var(--box-ink); }

/* A list row that holds its own buttons instead of being one big button (account page boxes) */
.list-row--static { cursor: default; gap: 8px; }
.list-row--static .btn { padding: 0 10px; }
.list-row--static { padding-top: 10px; padding-bottom: 10px; }
.box-row__name {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}
.box-row__name .subtle { font-size: 13px; }
