/* ============================================================
   Nellie Home — ivory page, cream surfaces, marine ink, melon signal.
   Page and navigation backgrounds match the Nellie homepage (#fffdf9). Existing layout, Archivo
   typography and motion are unchanged; page gutters are slightly tighter. Primary buttons are flat;
   outer page content is unframed against the ivory background. Legacy
   peach/plum/coral token names remain to avoid changing consumers:
   peach is melon, plum is text-safe piscine, coral is the melon pulse.
   Melon fills carry --accent-ink for accessible contrast.
   ============================================================ */

/* ── fonts (self-hosted, latin subset) ───────────────────── */

/* font-display: optional gives a ~100ms block — if the face is
   cached it renders with no fallback flash; if it misses, the
   fallback is used for the page's life with no swap. The right
   trade for a phone-first utility opened over and over. */
@font-face {
	font-family: "Archivo";
	font-style: normal;
	font-weight: 100 900;
	font-display: optional;
	src: url("/fonts/archivo-latin.woff2") format("woff2-variations");
}
/* IBM Plex Mono survives only for the 6-digit code input — the one
   place tabular monospacing is the point. 600 is the single weight
   the code digits use; the other cuts are no longer referenced. */
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 600;
	font-display: optional;
	src: url("/fonts/ibm-plex-mono-600.woff2") format("woff2");
}

/* ── tokens ──────────────────────────────────────────────── */

:root {
	color-scheme: light;

	/* Anello cream grounds and marine text ramp. */
	--paper: #f4e7ce;
	--paper-2: #ebd8b2;
	--cream-light: #fffaf1; /* See a demo: secondary CTAs and all neutral panels */
	--surface: var(--cream-light);
	--on-dark: #fcf6e9; /* Preserve cream text on marine controls. */
	--ink: #284d5c;
	--ink-2: #35586a;
	--ink-3: #3f6477;
	--line: #dce1de;
	--line-strong: #7a8f94;
	--marine-wash: #edf1ef; /* Quiet interaction fill, not a status color. */

	/* Melon fills need deeper marine ink; plain --ink is too light. */
	--peach: #f28b49;
	--peach-mid: #f49d63;
	--peach-deep: #94420f;
	--accent-ink: #1b3948;
	--peach-wash: #f9e5d2;
	--peach-line: rgba(242, 139, 73, 0.38);
	--coral: #f28b49;

	/* Text-safe piscine for secondary links and family provenance. */
	--plum: #27597b;
	--plum-deep: #27597b;

	--sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--pad: clamp(1rem, 4vw, 1.5rem);
	--tr: 0.16s ease;
	--radius: 10px; /* Shared control corners; cards retain their 12px radius. */
	--radius-pill: 999px;

	/* The home app stays phone-shaped at every viewport: 32rem is the
	   measure, not a fallback for narrow screens. */
	--measure: 32rem;

	/* One depth device: a soft, warm-tinted shadow with real blur.
	   No zero-blur offset blocks anywhere in this world. */
	--shadow-sm: 0 1px 2px rgba(40, 77, 92, 0.06), 0 1px 3px rgba(40, 77, 92, 0.05);
	--shadow-md: 0 1px 2px rgba(40, 77, 92, 0.04), 0 6px 18px rgba(40, 77, 92, 0.08);
	/* Marine focus stays distinct from melon notices and completion states. */
	--ring: 0 0 0 3px rgba(40, 77, 92, 0.18);
}

/* ── base ────────────────────────────────────────────────── */

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

/* The `hidden` attribute must win over any author `display:` (the UA `[hidden]{display:none}`
   rule is only specificity (0,1,0), so a class like `.recipe-cooking{display:flex}` overrides it
   and leaks the element into view). This makes `el.hidden = true` reliable for every toggled
   element -- the recipes "Baxter is cooking" loader, the list/empty-state it swaps with, etc. */
[hidden] {
	display: none !important;
}

html,
body {
	margin: 0;
	padding: 0;
}

html {
	/* Clear the sticky topbar on any scroll positioning. Matches the
	   topbar-inner min-height + its 1px border. */
	scroll-padding-top: 57px;
	/* Theme the native form controls (checkbox/radio/progress) from
	   the palette — the cheapest "built, not assembled" signal. */
	accent-color: var(--peach-deep);
}

body {
	background: #fffdf9;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	min-height: 100vh;
}

a {
	color: inherit;
}

::selection {
	background: var(--peach);
	color: var(--accent-ink);
}

/* ── focus ring (visible everywhere) ─────────────────────── */

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

/* ── the topbar (sticky, mark + sync chip + logout) ──────── */

.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	/* A hair of warm ivory translucency over the page so
	   content dissolving under it reads as a clean mask, backed by a
	   real blur. Solid fallback where backdrop-filter is unsupported. */
	background: rgba(255, 253, 249, 0.82);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
	.topbar {
		background: #fffdf9;
	}
}

.topbar-inner {
	max-width: var(--measure);
	margin-inline: auto;
	padding: 0.7rem var(--pad);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 56px;
}

.mark {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	gap: 0.2rem;
	text-decoration: none;
	margin-right: auto;
	color: var(--ink);
}
.brand-logo {
	display: block;
	width: 116px;
	max-width: 100%;
	height: auto;
}
.mark-name {
	overflow-wrap: anywhere;
	font-family: var(--sans);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: -0.02em;
}

/* The sync chip — the signature. The coral dot pulses a soft ring
   ("your changes are landing on every other phone"); the label is
   the human-readable state. Steady dot on reduced motion. This is
   the landing page's coral LED, modernized into app-global chrome:
   sync is connection state, not a per-panel decoration. */
.sync {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	flex: none;
	padding: 0.3rem 0.62rem 0.3rem 0.55rem;
	border-radius: var(--radius-pill);
	background: var(--peach-wash);
	color: var(--ink-2);
	font: 600 0.72rem / 1 var(--sans);
	letter-spacing: 0.01em;
}
.sync-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--coral);
	flex: none;
	animation: sync-pulse 2.6s ease-out infinite;
}
@keyframes sync-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(242, 139, 73, 0.5);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(242, 139, 73, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(242, 139, 73, 0);
	}
}
.sync[data-state="saving"] .sync-dot {
	animation-duration: 0.9s;
}
.sync[data-state="offline"] .sync-dot {
	background: var(--ink-3);
	animation: none;
}
@media (prefers-reduced-motion: reduce) {
	.sync-dot {
		animation: none;
	}
}

/* The "Log out" form: a plain <form method="post"> with a link-styled
   button. No JS, no chrome that would distinguish it from a typed link. */
.topbar form {
	margin: 0;
}
button.link {
	background: none;
	border: none;
	padding: 0.4rem 0;
	color: var(--ink-2);
	font: 600 0.8rem / 1 var(--sans);
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: color var(--tr);
}
button.link:hover {
	color: var(--peach-deep);
}

/* ── the onboarding banner (add another parent) ──────────── */

/* A full-width peach-wash strip across the very top, above the topbar. Server-rendered only
   while the household has one person; the X is a client-side dismissal (app.js). */
.onboard-banner {
	background: var(--peach-wash);
	border-bottom: 1px solid var(--peach-line);
}
.onboard-banner-inner {
	max-width: var(--measure);
	margin-inline: auto;
	padding: 0.6rem var(--pad);
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.onboard-banner-copy {
	flex: 1 1 auto;
	color: var(--peach-deep);
	font: 600 0.85rem / 1.3 var(--sans);
	letter-spacing: 0.01em;
}
.onboard-banner-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.onboard-banner-link:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.onboard-banner-dismiss {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: none;
	border-radius: var(--radius);
	background: none;
	color: var(--ink-3);
	cursor: pointer;
	transition:
		color var(--tr),
		background-color var(--tr);
}
.onboard-banner-dismiss:hover {
	color: var(--ink);
	background: rgba(148, 66, 15, 0.1);
}
.onboard-banner-dismiss:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 1px;
}
@media (pointer: coarse) {
	.onboard-banner-dismiss {
		width: 44px;
		height: 44px;
	}
}

/* ── the page container ──────────────────────────────────── */

main.page {
	max-width: var(--measure);
	margin: 1.5rem auto;
	/* Reduce only outer gutters by 25% at every viewport; keep inner spacing. */
	padding: 0 calc(var(--pad) * 0.75) 5rem; /* 5rem bottom clears the fixed .bottom-nav */
}

/* ── the unframed content container ─────────────────────── */

/* Content rests directly on the ivory page. Retain an invisible 1px border
   so removing the frame cannot shift content or change line wrapping.
   Inputs, message bubbles, dropdowns and dialogs keep their own surfaces. */
.chat {
	background: transparent;
	border: 1px solid transparent;
	border-radius: 0;
	box-shadow: none;
	overflow: hidden;
}
/* A card that holds a "..." dropdown (calendar events, checklist rows) must NOT clip it: an
   absolutely-positioned menu opened on a row near the card's bottom edge was cut off by the card's
   overflow:hidden, so its lower items were unreachable. Scoped via :has so every other card keeps
   its existing overflow containment for wide content.
   .collection-menu joins the exemption: the saved-search "..." panel (and Collections') can
   run 3-4 rows on a card shorter than the panel, clipping Share/Stop sharing on short-result
   searches. */
.chat:has(.cal-menu, .list-menu, .collection-menu) {
	overflow: visible;
}

.chat-body {
	padding: 1.5rem 1.35rem 1.65rem;
	/* Defensive: let the body shrink below intrinsic width, and break
	   any single token wider than the column (a long URL or slug) so
	   nothing escapes the card's right edge. */
	min-width: 0;
	overflow-wrap: break-word;
}

.chat-body {
	--page-title-size: clamp(1.5rem, 1.2rem + 1vw, 1.85rem);
}
.chat-body h1 {
	font-family: var(--sans);
	font-weight: 700;
	font-size: var(--page-title-size);
	line-height: 1.15;
	letter-spacing: -0.025em;
	margin: 0 0 0.9rem;
	text-wrap: balance;
	color: var(--ink);
}

/* Section headings (Settings: Usage, Household, Calendar feeds). */
.chat-body h2 {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 1.2rem;
	letter-spacing: -0.02em;
	margin: 1.75rem 0 0.6rem;
	color: var(--ink);
}
.chat-body h2:first-of-type {
	margin-top: 0;
}

.chat-body p {
	margin: 0;
}
.chat-body p + p {
	margin-top: 0.5rem;
}
.chat-body p.intro {
	color: var(--ink-2);
	font-size: 0.95rem;
	line-height: 1.55;
	margin-bottom: 1.15rem;
}

/* ── status line (login) ─────────────────────────────────── */

#login-message {
	min-height: 1.25rem;
	margin: 0 0 1rem;
	font: 600 0.8rem / 1.4 var(--sans);
	color: var(--peach-deep);
}
#login-message:empty {
	margin: 0;
	min-height: 0;
}

/* ── forms ───────────────────────────────────────────────── */

form {
	margin: 0;
}
form + form {
	margin-top: 1rem;
}

/* Private email approval: whole inert plaintext before explicit consent. */
.mail-approval-details {
	margin: 1.5rem 0;
	display: grid;
	gap: 0.75rem;
}
.mail-approval-details dt { font-weight: 600; }
.mail-approval-details dd { margin: 0.2rem 0 0; overflow-wrap: anywhere; }
.mail-approval-body {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	line-height: 1.6;
}
.mail-approval-note { margin-top: 1.5rem; color: var(--ink-2); }
.mail-notification-options { margin: 1.5rem 0; padding: 0; border: 0; min-width: 0; }
.mail-notification-options legend { font-weight: 600; }
.mail-notification-options label, .mail-auto-replies { display: flex; align-items: center; gap: 0.75rem; min-height: 44px; overflow-wrap: anywhere; }
.mail-notification-options input[type="checkbox"], .mail-auto-replies input { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; accent-color: var(--ink); }
.mail-approval-actions { margin-top: 1.5rem; }
.mail-approval-actions > p { margin: 1.5rem 0 0.75rem; }
.mail-approval-actions .btn {
	min-height: 44px;
	max-width: 100%;
	white-space: normal;
	line-height: 1.4;
	text-align: center;
}

.field {
	display: grid;
	gap: 0.4rem;
	margin-bottom: 0.9rem;
}
.field label {
	font: 600 0.72rem / 1 var(--sans);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-2);
}
.field input {
	font: 400 1rem / 1.4 var(--sans);
	color: var(--ink);
	caret-color: var(--peach-deep);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 0.72rem 0.85rem;
	width: 100%;
	transition:
		box-shadow var(--tr),
		border-color var(--tr);
}
.field input::placeholder {
	color: var(--ink-3);
}
.field input:focus-visible {
	outline: none;
	border-color: var(--ink);
	box-shadow: var(--ring);
}
/* :user-invalid only fires after the field is touched, so an empty
   form doesn't shout on load. */
.field input:user-invalid {
	border-color: var(--peach-deep);
}

/* The 6-digit code input — the sole survivor of the mono voice.
   Tabular so the digits line up as you type; wide tracking so the
   six read as six. */
.field input#code {
	font-family: var(--mono);
	font-weight: 600;
	font-size: 1.3rem;
	letter-spacing: 0.4em;
	font-variant-numeric: tabular-nums;
	text-align: center;
	padding-inline: 0.7rem;
}

.hidden {
	display: none;
}

/* The private signup form inherits Home's native field and button system. */
#sms-signup,
#signup-code-form {
	margin-block: 1.2rem;
}
#signup-submit,
#signup-code-submit,
#signup-resend {
	min-height: 44px;
}
#sms-signup .field p {
	margin: 0;
	font-size: 0.85rem;
	color: var(--ink-2);
}
.signup-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	font-size: 0.9rem;
}
.signup-consent input {
	flex: none;
	width: 1.2rem;
	height: 1.2rem;
	margin-top: 0.2rem;
	accent-color: var(--ink);
}
#signup-challenge {
	margin-block: 1rem;
}

/* ── buttons (flat marine primary, quiet secondary) ────── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	font: 600 0.9rem / 1 var(--sans);
	letter-spacing: 0.005em;
	text-decoration: none;
	padding: 0.72rem 1.15rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	cursor: pointer;
	background: var(--cream-light);
	color: var(--ink);
	transition:
		background-color var(--tr),
		border-color var(--tr),
		box-shadow var(--tr),
		transform var(--tr);
}
.btn:hover {
	background: var(--paper-2);
	border-color: var(--ink-3);
}
.btn:active {
	transform: translateY(1px);
}
/* Preserve secondary border widths and primary/destructive geometry.
   Disabled overrides stay below these quiet marine interaction states. */
.btn:where(:not(.btn-solid, .btn-danger, .recipe-detail-delete *, .task-cancel *, .apps-delete *, .apps-view *)) {
	background: var(--cream-light);
	border: 1.5px solid rgba(40, 77, 92, 0.22);
	border-radius: var(--radius);
}
.btn:where(:not(.btn-solid, .btn-danger, .recipe-detail-delete *, .task-cancel *, .apps-delete *, .apps-view *)):hover {
	background: var(--marine-wash);
	border-color: var(--ink-3);
}
/* Primary: flat marine with cream text, matching baxter-family. */
.btn-solid {
	background: var(--ink);
	color: var(--on-dark);
	border-color: transparent;
	box-shadow: none;
}
.btn-solid:hover {
	background: var(--accent-ink);
	border-color: transparent;
}
/* Disabled: a control mid-POST must not look tappable. Muted fill, no lift,
   no hover response, not-allowed cursor. (Disabled contrast is WCAG-exempt.) */
.btn:disabled,
.btn[aria-disabled="true"] {
	background: var(--paper-2);
	color: var(--ink-3);
	border-color: var(--line);
	box-shadow: none;
	cursor: not-allowed;
	transform: none;
}
.btn:disabled:hover,
.btn[aria-disabled="true"]:hover {
	background: var(--paper-2);
	border-color: var(--line);
}
input:disabled,
textarea:disabled {
	background: var(--paper-2);
	color: var(--ink-3);
	cursor: not-allowed;
}
/* Forwarded-email replies remain readable/selectable without clipboard access or JS. */
.email-copy-link {
	appearance: none;
	border: 0;
	padding: 0;
	min-height: 44px;
	background: transparent;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
/* Public text-to-join extends the existing phone-first form shell. */
.join-sms { overflow-wrap: anywhere; }
.join-sms p { margin-block: 0.75rem; }
.join-sms form, .join-sms section { margin-top: 1.25rem; }
.join-sms .field p { margin-top: 0.4rem; font-size: 0.85rem; color: var(--ink-2); }
.join-sms .btn { min-height: 44px; }
.join-sms .join-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.join-sms .join-alternative { margin-top: 1.5rem; }
.join-sms #join-message { white-space: pre-wrap; }
.join-sms #join-status:empty { margin: 0; }

.email-copy-link:disabled { opacity: 0.5; cursor: wait; }
#email-revision-form { margin: 1.5rem 0; }
#email-reply-text,
#email-revision-feedback {
	background: var(--surface);
	color: var(--ink);
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0.5rem 0 1rem;
	padding: 0.75rem;
	font: inherit;
	line-height: 1.5;
	resize: vertical;
}
#email-reply-text:disabled,
#email-revision-feedback:disabled {
	background: var(--paper-2);
	color: var(--ink-3);
}
@media (pointer: coarse) {
	.btn,
	.field input,
	button.link,
	.mark {
		min-height: 44px;
	}
	button.link,
	.mark {
		display: flex;
		align-items: center;
	}
	.mark-name {
		display: flex;
		align-items: center;
	}
	ul.lists a,
	ul.chats a {
		display: flex;
		align-items: center;
		min-height: 44px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.btn:active {
		transform: none;
	}
}

/* ── the checklist index ─────────────────────────────────── */

ul.lists {
	list-style: none;
	padding: 0;
	margin: 0;
}
ul.lists li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0;
	border-bottom: 1px solid var(--line);
}
ul.lists li:last-child {
	border-bottom: none;
}
/* Match Idea boards' row height while keeping the full padded link tappable.
   Padding outside a 44px touch target made checklist rows unnecessarily tall. */
ul.lists a {
	padding: 0.85rem 0;
	color: var(--ink);
	text-decoration: none;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: -0.01em;
	flex: 1 1 auto;
	min-width: 0;
	transition: color var(--tr);
}
ul.lists a:hover {
	color: var(--peach-deep);
}
/* Newly created lists have no link until the next sync; keep their row rhythm. */
ul.lists .list-name {
	padding: 0.85rem 0;
}

.count {
	font: 600 0.8rem / 1 var(--sans);
	color: var(--ink-3);
	flex: none;
	font-variant-numeric: tabular-nums;
}

/* ── the chats index (mirrors ul.lists above) ─────────────── */

ul.chats {
	list-style: none;
	padding: 0;
	margin: 0;
}
ul.chats li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--line);
}
ul.chats li:last-child {
	border-bottom: none;
}
ul.chats a {
	color: var(--ink);
	text-decoration: none;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: -0.01em;
	flex: 1 1 auto;
	min-width: 0;
	transition: color var(--tr);
}
ul.chats a:hover {
	color: var(--peach-deep);
}
.chat-time {
	font: 500 0.8rem / 1 var(--sans);
	color: var(--ink-3);
	flex: none;
	font-variant-numeric: tabular-nums;
}

/* The New-chat button sits under the heading, above the list. */
#create-chat {
	margin: 0 0 1.1rem;
}

/* ── the chat detail (renderChat) ──────────────────────────
   A scrollable transcript above a fixed compose row. Three voices,
   one alignment scheme: baxter and other members left (baxter gets
   the plum accent), self right with a peach-tinted bubble — so a
   glance at which side a row sits on says who sent it. */

/* The chat thread card is a column filling the space between the topbar and the fixed nav, so
   ul.msgs (flex:1) shrinks as the compose textarea auto-grows and the compose stays pinned just
   above the nav. Scoped via :has to the chat detail (the only card with a transcript). Height =
   100dvh minus the chrome OUTSIDE this card: topbar 3.56rem + main.page margin 1.5rem top + 1.5rem
   bottom + card borders ~0.12rem + main.page padding-bottom 5rem = 11.68rem. (.back, ul.msgs, the
   compose, and this card's own padding live INSIDE and are handled by the flex layout, not this
   subtraction.) */
.chat-body:has(ul.msgs) {
	display: flex;
	flex-direction: column;
	height: calc(100dvh - 11.68rem - env(safe-area-inset-bottom, 0px));
	min-height: 22rem;
}

ul.msgs {
	list-style: none;
	padding: 0;
	margin: 0 0 1rem;
	/* The transcript flexes to fill whatever the chat-body column leaves after .back and the compose
	   row (see .chat-body:has(ul.msgs) below). It SHRINKS as the compose textarea auto-grows, keeping
	   the compose pinned above the nav rather than pushed off-screen. min-height:0 lets a flex child
	   shrink below its content height so the overflow scrolls instead of forcing the column taller. */
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	scrollbar-width: thin;
	scrollbar-color: var(--line-strong) transparent;
}
ul.msgs::-webkit-scrollbar {
	width: 8px;
}
ul.msgs::-webkit-scrollbar-thumb {
	background: var(--line-strong);
	border-radius: var(--radius-pill);
}
@media (min-width: 640px) {
	/* Desktop has vertical room: don't viewport-bind the card -- give the transcript a fixed height
	   and let the card grow with the compose instead of shrinking the transcript. */
	.chat-body:has(ul.msgs) {
		display: block;
		height: auto;
		min-height: 0;
	}
	ul.msgs {
		flex: none;
		height: 32rem;
	}
}
.msg {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
	max-width: 85%;
}
.msg.self {
	align-self: flex-end;
	align-items: flex-end;
}
.who {
	font: 600 0.72rem / 1 var(--sans);
	letter-spacing: 0.01em;
	color: var(--ink-3);
}
.msg.baxter .who {
	color: var(--plum-deep);
}
.body {
	display: inline-block;
	font: 400 0.95rem / 1.45 var(--sans);
	color: var(--ink);
	background: var(--surface);
	border-radius: 12px;
	padding: 0.55rem 0.78rem;
	word-break: break-word;
}
.msg.self .body {
	background: var(--peach-wash);
	color: var(--ink);
}
/* The typing indicator: a faux Baxter row whose body is three
   stepping dots. Shares .msg.baxter's chrome so a real reply reads
   as the dots resolving into the message. aria-hidden in app.js. */
.msg.baxter.typing .body.typing-dots {
	letter-spacing: 0.18em;
	color: var(--ink-3);
	white-space: nowrap;
}
.msg.baxter.typing .body.typing-dots::after {
	content: '• • •';
	animation: typing-step 1.2s steps(1, end) infinite;
}
@keyframes typing-step {
	0% {
		opacity: 0.35;
	}
	33% {
		opacity: 0.7;
	}
	66% {
		opacity: 1;
	}
	100% {
		opacity: 0.35;
	}
}
@media (prefers-reduced-motion: reduce) {
	.msg.baxter.typing .body.typing-dots::after {
		animation: none;
		opacity: 0.5;
	}
}
.body a {
	color: var(--plum-deep);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.body a:hover {
	text-decoration-color: var(--peach-deep);
}

/* The compose row: an auto-growing text field + Send button. flex-end so Send stays level with the
   bottom line as the field grows. */
.msg-compose {
	display: flex;
	gap: 0.6rem;
	align-items: flex-end;
}
.msg-compose textarea {
	flex: 1 1 auto;
	min-width: 0;
	font: 400 1rem / 1.4 var(--sans);
	color: var(--ink);
	caret-color: var(--peach-deep);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 0.7rem 0.85rem;
	/* Auto-grows with app.js up to ~3 lines, then scrolls -- same pattern as the checklist add-item
	   field. resize off so a manual drag can't fight the grow; global border-box keeps the JS's
	   height == scrollHeight correct. */
	resize: none;
	overflow-y: auto;
	min-height: 2.9rem;  /* one row, level with the Send button */
	max-height: 5.75rem; /* ~3 rows: 3 x 1.4rem line-height + 1.4rem padding + border */
	display: block;
	transition:
		box-shadow var(--tr),
		border-color var(--tr);
}
.msg-compose textarea:focus-visible {
	outline: none;
	border-color: var(--ink);
	box-shadow: var(--ring);
}
.msg-compose .btn {
	flex: none;
}

/* ── the list detail (tap-to-check) ──────────────────────── */

ul.items {
	list-style: none;
	padding: 0;
	margin: 0;
}
ul.items li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--line);
	color: var(--ink);
	font-size: 1rem;
	line-height: 1.4;
}
ul.items li:last-child {
	border-bottom: none;
}
/* Check/uncheck departure: app.js sets an explicit height, then adds .leaving.
   Fade and collapse the row while live reconciliation moves it to its new section. */
ul.items li.leaving {
	opacity: 0;
	padding-top: 0;
	padding-bottom: 0;
	border-bottom-color: transparent;
	transition:
		height 0.3s ease,
		opacity 0.2s ease,
		padding 0.3s ease;
}
ul.items li.checked {
	color: var(--ink-3);
}
ul.items li.checked .item-text {
	text-decoration: line-through;
	text-decoration-color: var(--ink-3);
	flex: 0 1 auto; /* don't grow, so the "(@name)" attribution sits right after the text */
}
.item-text {
	flex: 1 1 auto;
	min-width: 0;
}
/* Who checked a completed item off: sits just after the struck text; margin-right:auto pushes
   the checkmark out to the right edge. Muted, not struck through (it's a note, not the item). */
.item-by {
	flex: none;
	margin-right: auto;
	color: var(--ink-3);
	font: 600 0.78rem / 1 var(--sans);
	white-space: nowrap;
}

/* The per-item tap target: a real submit button (no JS) drawn as a
   round check control. Faded ring by default; the checked-<li> hook
   fills it peach — so the control's fill IS the state, alongside the
   row's strike-through. */
ul.items form {
	margin: 0;
	flex: none;
}
/* The ✓ glyph is emitted in the markup as a text node (&#10003;); we hide it with
   color: transparent on an open row and reveal it (ink on peach) when the row is
   checked. So the control's fill IS the state — no doubled glyph, no ::before. */
.check {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid var(--line-strong);
	background: var(--surface);
	color: transparent;
	font: 700 0.8rem / 1 var(--sans);
	transition:
		border-color var(--tr),
		background-color var(--tr),
		color var(--tr);
}
button.check {
	cursor: pointer;
	padding: 0;
	position: relative; /* anchor the invisible touch-target expander below */
}
button.check:hover {
	border-color: var(--ink);
}
/* Keep a 44px tap target WITHOUT inflating the row: an invisible centered overlay, so the
   check stays a 24px dot in both open and completed rows, and open rows are the same height
   as completed ones, rather than being stretched by a 44px-tall button on touch devices. */
button.check::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	transform: translate(-50%, -50%);
}
ul.items li.checked .check {
	background: var(--peach);
	border-color: var(--peach);
	color: var(--accent-ink);
}
/* The collapsible "Completed" section — pure <details>/<summary>, styled to MATCH the Sort/Group
   headings (uppercase, chevron, full-width hairline) but in PLUM, so "done" reads as its own
   section, distinct from the peach active groups. The chevron rotates on the native [open] state. */
.completed-items {
	margin-top: 0.5rem;
}
.completed-items > summary {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.3rem 0 0.42rem;
	border-bottom: 1.5px solid rgba(39, 89, 123, 0.3); /* plum-tint hairline (matches --plum) */
	cursor: pointer;
	color: var(--plum);
	font: 700 0.78rem / 1.2 var(--sans);
	letter-spacing: 0.07em;
	text-transform: uppercase;
	list-style: none; /* drop the native disclosure triangle in favour of our chevron */
	transition: color var(--tr);
}
.completed-items > summary::-webkit-details-marker { display: none; }
.completed-items > summary:hover {
	color: var(--plum-deep);
}
/* Chevron down when open, rotated -90 when closed (mirrors the group toggle's aria-expanded). */
.completed-items:not([open]) > summary .group-chevron {
	transform: rotate(-90deg);
}
.completed-items[open] > summary {
	margin-bottom: 0.4rem;
}

/* ── list-detail header + "..." overflow menu ────────────── */
.list-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
}
.list-head h1 {
	min-width: 0;
}
/* Center the dots on the first title line, not its bottom margin or wrapped block.
   Move the whole menu so its hit target and dropdown stay with the visible dots. */
.list-head > details,
.collection-head > details {
	margin-top: calc((var(--page-title-size) * 1.15 - var(--heading-menu-size, 40px)) / 2);
}
/* A native <details> disclosure: the panel is absolutely positioned under the trigger, so it
   overlays content rather than pushing the list down when opened. */
.list-menu,
.collection-menu {
	position: relative;
	flex: none;
}
.list-menu-trigger {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius);
	color: var(--ink-2);
	cursor: pointer;
	list-style: none; /* drop the default disclosure triangle */
	transition: background-color var(--tr), color var(--tr);
}
.list-menu-trigger::-webkit-details-marker { display: none; }
.list-menu-trigger:hover,
.list-menu[open] .list-menu-trigger,
.collection-menu[open] .list-menu-trigger {
	background: var(--marine-wash);
	color: var(--ink);
}
.list-menu-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 30; /* above the fixed .bottom-nav (z-20): a menu opened near the card bottom stays tappable */
	min-width: 190px;
	display: flex;
	flex-direction: column;
	padding: 6px;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
}
.list-menu-panel form { margin: 0; }
.idea-boards-sort button[aria-pressed="true"] {
	background: var(--marine-wash);
	font-weight: 700;
}
@media (pointer: coarse) {
	.idea-boards-sort .list-menu-trigger {
		min-height: 44px;
		min-width: 44px;
	}
	.idea-boards-sort .list-menu-item {
		min-height: 44px;
	}
	.idea-boards-sort { --heading-menu-size: 44px; }
}
.list-menu-item {
	display: block;
	width: 100%;
	text-align: left;
	padding: 0.6rem 0.7rem;
	border: none;
	border-radius: var(--radius);
	background: transparent;
	color: var(--ink);
	font: 600 0.9rem / 1.2 var(--sans);
	cursor: pointer;
	transition: background-color var(--tr), color var(--tr);
}
.list-menu-item:hover {
	background: var(--peach-wash);
}
.list-menu-item:where(:not(.list-menu-danger)):hover {
	background: var(--marine-wash);
}
/* Disabled (e.g. Sort when nothing is uncategorized): greyed, not tappable, no hover response. */
.list-menu-item:disabled {
	color: var(--ink-3);
	opacity: 0.5;
	cursor: not-allowed;
}
.list-menu-item:disabled:hover {
	background: transparent;
}
/* "Danger" without a red: the deeper peach text carries the weight, on-palette. */
.list-menu-danger {
	color: var(--peach-deep);
}

/* ── grouped open items (the Sort/Group result) ──────────── */
/* A category heading is a non-item <li> inside the same <ul.items> (so app.js's single-ul
   optimistic add/check/reconcile keep working); it holds a full-width collapse toggle. */
ul.items li.group-heading {
	display: block;
	padding: 0;
	border-bottom: none;
	margin-top: 1rem;
}
ul.items li.group-heading:first-child {
	margin-top: 0.15rem;
}
/* The toggle: peach-deep so the section headers POP against the ink item text, with a peach
   hairline under them, and a chevron that rotates when collapsed (like the Completed drawer). */
.group-toggle {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	width: 100%;
	padding: 0.3rem 0 0.42rem;
	border: none;
	border-bottom: 1.5px solid var(--peach-line);
	background: transparent;
	cursor: pointer;
	color: var(--peach-deep);
	font: 700 0.78rem / 1.2 var(--sans);
	letter-spacing: 0.07em;
	text-transform: uppercase;
	transition: color var(--tr);
}
.group-toggle:hover {
	color: var(--peach-deep);
}
.group-toggle:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	border-radius: var(--radius);
}
.group-chevron {
	flex: none;
	transition: transform var(--tr);
}
.group-toggle[aria-expanded="false"] .group-chevron {
	transform: rotate(-90deg);
}
ul.items li.group-hidden {
	display: none;
}

/* ── edit mode: swap each row's check / checkmark for a trash ── */
.item-remove {
	margin: 0;
	flex: none;
	display: none; /* hidden until app.js sets body.editing-items (edit mode) */
}
.trash {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: none;
	border-radius: var(--radius);
	background: transparent;
	color: var(--ink-3);
	cursor: pointer;
	position: relative; /* anchor the touch-target expander */
	transition: background-color var(--tr), color var(--tr);
}
/* Same 44px tap target without inflating the row (see button.check::after). */
.trash::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	transform: translate(-50%, -50%);
}
.trash:hover {
	background: var(--peach-wash);
	color: var(--peach-deep);
}
/* Keyed on the BODY class (app.js toggles it), NOT the <ul> -- the resync replaces the item
   <ul>s wholesale, so a class on them would not survive an edit-mode reconcile. */
body.editing-items ul.items .item-check { display: none; }
body.editing-items ul.items li.checked .check { display: none; }
body.editing-items ul.items .item-remove { display: inline-flex; }

/* ── "Baxter is sorting..." status ───────────────────────── */
.sort-status {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin: 1.1rem 0 1.25rem;
	padding: 1.05rem 1.2rem;
	border-radius: var(--radius);
	background: var(--peach-wash);
	border: 1px solid var(--peach-line);
	color: var(--ink-2);
	font: 600 0.92rem / 1.5 var(--sans);
}
/* A small peach ring-spinner so the status reads as active work, not a static notice. */
.sort-spinner {
	flex: none;
	width: 15px;
	height: 15px;
	border: 2px solid var(--peach-line);
	border-top-color: var(--peach-deep);
	border-radius: 50%;
	animation: sort-spin 0.7s linear infinite;
}
@keyframes sort-spin {
	to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
	.sort-spinner { animation: none; }
	.group-chevron { transition: none; }
}

/* ── "Baxter is cooking" recipe-import loader ─────────────── */
/* Same centered graphic + title + one line as .empty-state, but an active "working" state:
   the pot's steam drifts up and the title's dots cycle . / .. / ... -- no spinner (by request). */
.recipe-cooking {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.5rem;
	padding: 2.75rem 1rem 1.5rem;
}
.recipe-cooking .cooking-title {
	font: 700 1.1rem / 1.2 var(--sans);
	letter-spacing: -0.02em;
	color: var(--ink);
	margin: 0;
}
.recipe-cooking .cooking-body {
	font: 400 0.95rem / 1.5 var(--sans);
	color: var(--ink-3);
	max-width: 24rem;
	margin: 0;
}
/* Cycling dots after "Baxter is cooking": three ALWAYS-PRESENT dots whose opacity steps in
   sequence (. / .. / ...) and reset together. Because the three dots are always in the DOM (only
   their opacity changes), the centered title never reflows -- not horizontally (their width is
   fixed) and not vertically (no empty<->filled inline box shifting the baseline, the bug the old
   ::after-content animation caused). */
.cooking-dots span {
	opacity: 0;
}
.cooking-dots span:nth-child(1) { animation: cooking-dot-1 1.6s linear infinite; }
.cooking-dots span:nth-child(2) { animation: cooking-dot-2 1.6s linear infinite; }
.cooking-dots span:nth-child(3) { animation: cooking-dot-3 1.6s linear infinite; }
@keyframes cooking-dot-1 { 0%, 20% { opacity: 0; } 25%, 100% { opacity: 1; } }
@keyframes cooking-dot-2 { 0%, 45% { opacity: 0; } 50%, 100% { opacity: 1; } }
@keyframes cooking-dot-3 { 0%, 70% { opacity: 0; } 75%, 100% { opacity: 1; } }
/* Three steam curls drifting up on a stagger. transform-box keeps the translate honest on the
   SVG paths across engines. */
.recipe-cooking .steam-a,
.recipe-cooking .steam-b,
.recipe-cooking .steam-c {
	transform-box: fill-box;
	opacity: 0;
	animation: steam-rise 2.6s ease-in-out infinite;
}
.recipe-cooking .steam-b { animation-delay: 0.55s; }
.recipe-cooking .steam-c { animation-delay: 1.1s; }
@keyframes steam-rise {
	0%   { opacity: 0; transform: translateY(4px); }
	30%  { opacity: 0.75; }
	70%  { opacity: 0.45; }
	100% { opacity: 0; transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
	/* No motion: show the settled "..." and hold the steam faintly visible rather than animating. */
	.cooking-dots span { opacity: 1; animation: none; }
	.recipe-cooking .steam-a,
	.recipe-cooking .steam-b,
	.recipe-cooking .steam-c { animation: none; opacity: 0.5; }
}

/* Email revision: a quiet modal in the same visual family as the cooking card.
   The native top layer blocks keyboard, pointer and assistive-tech interaction
   with the rest of the document; no transparent, click-through overlay. */
.email-revision-dialog {
	width: min(24rem, calc(100% - 2rem));
	max-height: calc(100dvh - 2rem);
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 1.25rem;
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 18px 70px rgb(40 77 92 / 16%);
}
.email-revision-dialog::backdrop {
	background: rgb(40 77 92 / 25%);
	backdrop-filter: blur(3px);
}
.email-revision-dialog .recipe-cooking { padding: 2rem 1.5rem; }
.email-pencil {
	transform-box: fill-box;
	transform-origin: center;
	animation: email-pencil-write 3.2s ease-in-out infinite;
}
.email-writing {
	stroke-dasharray: 1;
	animation: email-writing-reveal 3.2s ease-in-out infinite;
}
@keyframes email-pencil-write {
	0%, 100% { transform: translate(-7px, -23px) rotate(-4deg); }
	28% { transform: translate(10px, -23px) rotate(2deg); }
	38% { transform: translate(-7px, -9px) rotate(-4deg); }
	64% { transform: translate(6px, -9px) rotate(2deg); }
	74% { transform: translate(-7px, 5px) rotate(-4deg); }
	90% { transform: translate(1px, 5px) rotate(2deg); }
}
@keyframes email-writing-reveal {
	0% { stroke-dashoffset: 1; }
	90%, 100% { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.email-pencil, .email-writing { animation: none; }
}

/* The recipe detail actions row: the primary "Add ingredients to a list" button beside the quiet
   Delete control, wrapping on a narrow screen. */
.recipe-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 0.25rem 0 1.25rem;
}
/* The recipe detail page's Delete control: a quiet, muted-danger button. (The index rows use the
   shared trash-icon row-remove form instead.) */
.recipe-detail-delete {
	margin: 0;
}
.recipe-detail-delete .btn {
	color: var(--ink-3);
	padding: 0.5rem 0.9rem;
	font-size: 0.85rem;
}
.recipe-detail-delete .btn svg { width: 15px; height: 15px; }
/* "Danger" without a red -- peach-deep carries the weight on-palette, matching .list-menu-danger /
   .cal-menu-delete and the row-remove trash hover (the app's deliberate no-danger-red rule). */
.recipe-detail-delete .btn:hover {
	color: var(--peach-deep);
	border-color: var(--peach-deep);
}

/* ── Collections index + read-only disclosure detail ───────── */

/* The index uses the same name/meta row treatment as Recipes, scoped to its stable
   live-refresh region so no other list inherits Collections presentation. */
#collections-region ul.collections {
	list-style: none;
	padding: 0;
	margin: 0;
}
#collections-region ul.collections li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--line);
}
#collections-region ul.collections li:last-child {
	border-bottom: none;
}
#collections-region ul.collections a {
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
	letter-spacing: -0.01em;
	flex: 1 1 auto;
	min-width: 0;
	transition: color var(--tr);
}
#collections-region ul.collections a:hover {
	color: var(--peach-deep);
}
#collections-region ul.collections a:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}
#collections-region .collection-meta {
	font: 500 0.8rem / 1 var(--sans);
	color: var(--ink-3);
	flex: none;
	font-variant-numeric: tabular-nums;
}
#collections-region > .empty-state {
	padding-top: 1.75rem;
}

/* Saved searches read as a document: one visible result per line, never cards or disclosures. */
ul.saved-search-results {
	list-style: none;
	padding: 0;
	margin: 1rem 0;
	line-height: 1.65;
	overflow-wrap: anywhere;
}
ul.saved-search-results > li { margin: 0 0 0.85rem; }
.saved-search-title { display: inline; font-weight: 600; margin-right: 0.35rem; }
.saved-search-title > p,
.saved-search-content,
.saved-search-content > p:first-child { display: inline; }

/* ── board items: ONE markup, two views ─────────────────────────────────────────
   Every board page renders closed <details class="board-item">. Summary is the
   default card/disclosure view, including without JavaScript. The client sets
   body.boards-expanded to opt into the open, inline Expanded view. Nesting is
   presentation, never data. */
.board-item {
	display: block;
}
.board-item > summary {
	display: inline;
	font-weight: 600;
	margin-right: 0.35rem;
	list-style: none; /* Expanded view shows no disclosure triangle */
	cursor: default;
}
.board-item > summary::-webkit-details-marker { display: none; }
/* Expanded view: the summary is NOT interactive -- no click-to-close, no hover cue.
   pointer-events:none is the only pure-CSS way to make an open <details> inert;
   the trade (title text is not drag-selectable in Expanded view) is minor next to the
   broken affordance of a collapsible that shouldn't be. Summary (the default) re-enables. */
.board-item > summary { pointer-events: none; }
body:not(.boards-expanded) .board-item > summary { pointer-events: auto; }
.board-item > .board-item-content,
.board-item > .board-item-content > p:first-child { display: inline; }
body:not(.boards-expanded) .board-item {
	display: block;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0.7rem 0.9rem;
	margin: 0 0 0.6rem;
}
body:not(.boards-expanded) .board-item > summary {
	display: block;
	font-weight: 600;
	margin-right: 0;
	list-style: revert; /* the disclosure affordance belongs to the nested view */
	cursor: pointer;
}
body:not(.boards-expanded) .board-item > .board-item-content,
body:not(.boards-expanded) .board-item > .board-item-content > p:first-child { display: block; }
/* The two primary board actions (Share, Chat) sit side by side below the title.
   Share is the primary (btn-solid, peach); Chat is secondary (plain .btn). */
.board-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0 0 1rem;
}
.board-actions form { margin: 0; }

/* A visible, mutually exclusive view choice on private and public boards. */
.board-toggle {
	display: inline-flex;
	flex-wrap: wrap;
	max-width: 100%;
	padding: 3px;
	gap: 3px;
	margin: 0 0 0.85rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--surface);
}
.board-toggle button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-height: 26px;
	min-width: 44px;
	padding: 0.25rem 1.25rem;
	border: none;
	border-radius: 5px;
	background: transparent;
	color: var(--ink-2);
	font: 600 0.85rem / 1.2 var(--sans);
	cursor: pointer;
	white-space: nowrap;
}
.board-toggle button:hover { background: var(--marine-wash); color: var(--ink); }
.board-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.board-toggle button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The share action inside the saved-search "..." menu: icon + label on one row. The
   other menu items stay text-only; only this one carries a glyph (the platform share
   shape), so the alignment is scoped to .list-menu-share rather than all items. */
.list-menu-item.list-menu-share {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.list-menu-share svg { flex: none; }

/* The Share button's live region ("Public link copied to clipboard."): absent from
   layout until there is something to say, so the page doesn't carry a permanent gap. */
#share-status { margin: 0.35rem 0 0; font-size: 0.85rem; }
#share-status:empty { display: none; }

/* The public share page's top banner, in the shell's banner slot above the topbar (see
   .onboard-banner above for the strip geometry): the attribution + signup CTA that
   makes a shared /sh/<code> link a product surface. One short centered line, peach on
   white; the link carries the accent, so it reads as a caption rather than a demand. */
.share-banner {
	background: var(--peach-wash);
	border-bottom: 1px solid var(--peach-line);
	padding: 0.65rem var(--pad);
	text-align: center;
}
.share-banner p { margin: 0; font: 600 0.85rem / 1.3 var(--sans); letter-spacing: 0.01em; }
.share-banner-link { color: var(--peach-deep); text-decoration: none; }
.share-banner-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }

ul.collection-items {
	list-style: none;
	padding: 0;
	margin: 0;
}
ul.collection-items > li {
	position: relative;
	border-bottom: 1px solid var(--line);
}
.collection-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}
.collection-item-remove {
	display: none;
	position: absolute;
	right: 0.35rem;
	top: 0.45rem;
}
body.editing-collection-items .collection-item-remove { display: block; }
.collection-item-remove button {
	border: 0;
	background: transparent;
	color: var(--peach-deep);
	cursor: pointer;
	padding: 0.35rem;
}
body.editing-collection-items details.collection-item,
body.editing-collection-items details.board-item { margin-right: 2.4rem; }
/* The per-entry trash is absolutely positioned; EVERY board row needs its own
   positioned ancestor, not just the retired collection list's. */
ul.board-items > li { position: relative; }
ul.collection-items > li:last-child {
	border-bottom: none;
}
details.collection-item {
	padding: 0.15rem 0;
}
details.collection-item > summary {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.75rem 0;
	cursor: pointer;
	list-style: none;
	color: var(--ink);
	font-weight: 600;
	letter-spacing: -0.01em;
	transition: color var(--tr);
}
details.collection-item > summary::-webkit-details-marker {
	display: none;
}
details.collection-item > summary::before {
	content: "›";
	flex: none;
	color: var(--peach-deep);
	font-size: 1.2rem;
	line-height: 1;
	transform: rotate(0deg);
	transition: transform var(--tr);
}
details.collection-item[open] > summary::before {
	transform: rotate(90deg);
}
details.collection-item > summary:hover {
	color: var(--peach-deep);
}
details.collection-item > summary:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	border-radius: var(--radius);
}
details.collection-item[open] > .collection-html {
	padding: 0 0 1rem 1.75rem;
}

/* Published detail HTML is sanitized in core before it reaches this scoped wrapper. */
.collection-html {
	line-height: 1.55;
	color: var(--ink-2);
}
.collection-html :is(h2, h3, h4) {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: -0.02em;
	margin: 1.5rem 0 0.5rem;
	color: var(--ink);
}
.collection-html h2 {
	font-size: 1.2rem;
}
.collection-html p {
	margin: 0.5rem 0 0;
	color: var(--ink-2);
}
.collection-html :is(ul, ol) {
	padding-left: 1.25rem;
	margin: 0.5rem 0 0;
}
.collection-html li {
	color: var(--ink-2);
	margin-top: 0.25rem;
}
.collection-html a {
	color: var(--plum-deep);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.collection-html a:hover {
	text-decoration-color: var(--peach-deep);
}
.collection-html a:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}
.collection-html :is(code, pre) {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.85em;
}
.collection-html code {
	padding: 0.1em 0.3em;
	border-radius: 4px;
	background: var(--surface);
}
.collection-html pre {
	margin: 0.75rem 0 0;
	padding: 0.75rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	overflow-x: auto;
}
.collection-html pre code {
	padding: 0;
	background: none;
}
.collection-html blockquote {
	margin: 0.75rem 0 0;
	padding-left: 0.8rem;
	border-left: 3px solid var(--peach-line);
	color: var(--ink-3);
}
.collection-html hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 1rem 0;
}

/* ── back link (detail pages) ─────────────────────────────── */

.back {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font: 600 0.8rem / 1 var(--sans);
	letter-spacing: 0.01em;
	text-decoration: none;
	color: var(--ink-3);
	margin-bottom: 0.95rem;
	transition: color var(--tr);
}
.back:hover {
	color: var(--peach-deep);
}
/* The back-arrow is an inline <svg> in the markup (stroke=currentColor), so it inherits
   the link's color and hover state. It replaced a CSS mask, which rendered unreliably
   across browsers (a stroked-SVG mask could be masked out entirely, hiding the arrow). */
.back svg {
	flex: none;
}

/* ── empty states ────────────────────────────────────────── */

.empty {
	color: var(--ink-3);
	font-family: var(--sans);
	font-size: 0.95rem;
	line-height: 1.5;
	margin: 0 0 0.75rem;
}

/* ── rich empty states (checklist + chats first run) ─────── */

/* A centered graphic + title + one line of "what this is" + the primary action. Class-
   scoped titles/body so they win over .chat-body h2/p (which is more specific than a bare
   .empty-state-title would be). */
.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.5rem;
	padding: 2.25rem 1rem 1.5rem;
}
.empty-state-graphic {
	display: block;
	margin-bottom: 0.4rem;
}
.empty-state-graphic svg {
	display: block;
}
/* The sign-in illustration — left-aligned above the heading, same hand as the empty states. */
.login-graphic {
	display: block;
	margin: 0.25rem 0 1.1rem;
}
.login-graphic svg {
	display: block;
	margin: 0 auto;
}
.empty-state .empty-state-title {
	font: 700 1.05rem / 1.2 var(--sans);
	letter-spacing: -0.02em;
	color: var(--ink);
	margin: 0;
}
.empty-state .empty-state-body {
	font: 400 0.95rem / 1.5 var(--sans);
	color: var(--ink-3);
	max-width: 24rem;
	margin: 0 0 0.6rem;
}

/* ── bottom nav (authenticated pages only) ────────────────── */

.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 20;
	display: flex;
	gap: 1.25rem;
	justify-content: center;
	padding: 0.7rem var(--pad) calc(0.7rem + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 253, 249, 0.85);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-top: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
	.bottom-nav {
		background: #fffdf9;
	}
}
/* Keyboard up (app.js sets body.kb-open on text-field focus): hide the fixed nav. On iOS a
   position:fixed bottom bar floats up over the content when the keyboard opens; it's useless
   while typing anyway, so drop it until blur. The content keeps its bottom padding, so nothing
   shifts. Gated to touch pointers -- desktop has no soft keyboard, so the nav must stay. */
@media (pointer: coarse) {
	body.kb-open .bottom-nav {
		display: none;
	}
}
.bottom-nav a {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	color: var(--ink-3);
	text-decoration: none;
	font: 600 0.8rem / 1 var(--sans);
	letter-spacing: 0.01em;
	transition: color var(--tr);
}
.bottom-nav a::after {
	content: "";
	width: 1.5rem;
	height: 2px;
	border-radius: var(--radius-pill);
	background: transparent;
	transition: background-color var(--tr);
}
.bottom-nav a[aria-current="page"] {
	color: var(--ink);
}
.bottom-nav a[aria-current="page"]::after {
	background: var(--ink);
}
.bottom-nav a:hover {
	color: var(--accent-ink);
}
@media (pointer: coarse) {
	.bottom-nav a {
		flex-direction: column;
		min-height: 44px;
	}
}

/* ── settings: the member list + add form ─────────────────── */

#connected-accounts {
	margin-top: 1.75rem;
}
.integration-action {
	margin: 0.75rem 0;
}

/* Gmail linking stays in Home's phone column, with the existing illustration hand. */
.gmail-linking .integration-graphic {
	display: block;
	margin: 0 0 1rem;
}
.gmail-linking .integration-graphic svg {
	display: block;
	margin-inline: auto;
}
.gmail-linking p.integration-trust {
	margin-top: 1.25rem;
	color: var(--ink-2);
	font-size: 0.9rem;
}
.gmail-linking .integration-action {
	margin: 1.25rem 0 0.25rem;
}
.gmail-linking .btn {
	min-height: 44px;
}
.gmail-linking .integration-policies {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.25rem;
	font-size: 0.85rem;
}
.gmail-linking .integration-policies a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}
.gmail-linking p.integration-disconnect-note {
	margin: 0.5rem 0 1.25rem;
	color: var(--ink-2);
	font-size: 0.85rem;
}

.settings-message {
	color: var(--peach-deep);
	font: 600 0.85rem / 1.4 var(--sans);
	margin: 0 0 0.85rem;
}

/* Plan usage. */
.usage {
	margin: 0 0 1rem;
}
.usage-label {
	font: 600 0.72rem / 1 var(--sans);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-3);
}
/* The progress bar: a thin rounded track (100% = budget) with a fill
   proportional to usage. Overflow visible so the fill pokes past the
   right edge when over budget (capped at 130% in the markup). Peach
   under budget, peach-deep over. Soft, no glow. */
.usage-bar {
	height: 8px;
	background: var(--paper-2);
	border-radius: var(--radius-pill);
	margin-top: 0.5rem;
	overflow: visible;
}
.usage-bar-fill {
	height: 100%;
	background: var(--peach);
	border-radius: var(--radius-pill);
}
.usage-bar-fill.over {
	background: var(--peach-deep);
}

ul.members {
	list-style: none;
	padding: 0;
	margin: 0 0 1.25rem;
}
.member {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem 0.6rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--line);
}
.member:last-child {
	border-bottom: none;
}
.member-value {
	font-family: var(--sans);
	font-size: 0.9rem;
	color: var(--ink-2);
}
.member-note {
	font-size: 0.72rem;
	color: var(--ink-3);
	font-family: var(--sans);
}
.member-remove {
	margin-left: auto;
}
.member-remove button.link {
	color: var(--plum);
}
.member-remove button.link:hover {
	color: var(--plum-deep);
}

.member-name {
	font-weight: 600;
	color: var(--ink);
}

/* "Add phone" amend: a no-JS <details> that drops onto its own line
   under the member (flex-basis:100%) so the input never crowds the
   name/email line. */
.add-phone {
	flex-basis: 100%;
	margin-top: 0.15rem;
}
/* Shared disclosure-summary style for every no-JS <details> trigger on Settings
   (add-phone, feed-help, feed-url) -- one rule, not three byte-identical copies. */
.add-phone summary,
.feed-help summary,
.feed-url summary {
	cursor: pointer;
	font: 600 0.8rem / 1.4 var(--sans);
	color: var(--plum);
	width: max-content;
	transition: color var(--tr);
}
.add-phone summary:hover,
.feed-help summary:hover,
.feed-url summary:hover {
	color: var(--plum-deep);
}
/* Calendar-feed rows on Settings -> Calendar: the same reset+flex layout as the members
   list (ul.members/.member above), so label + Remove share the top line and the secret
   URL's <details> (flex-basis:100%) drops onto its own line beneath. Without this the
   rows stack under UA defaults (label / Remove / Show URL on three lines). */
ul.feeds {
	list-style: none;
	padding: 0;
	margin: 0 0 1.25rem;
}
.feed {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem 0.6rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--line);
}
.feed:last-child {
	border-bottom: none;
}
.feed-label {
	font-weight: 600;
	color: var(--ink);
}
.feed-remove {
	margin-left: auto;
}
.feed-remove button.link {
	color: var(--plum);
}
.feed-remove button.link:hover {
	color: var(--plum-deep);
}

/* "How do I find this URL?" disclosure on the calendar-feeds form. */
.feed-help {
	margin: 0.25rem 0 0.75rem;
}
.feed-help p {
	font-size: 0.85rem;
	margin: 0.4rem 0 0;
}
/* A feed's secret URL, collapsed behind a "Show URL" disclosure until expanded (less
   visual noise in the settings list, less shoulder-surfing). The expanded URL is a
   wrapping mono block so a long secret link never overflows the phone-width column.
   The summary style itself is shared above with .add-phone/.feed-help. */
.feed-url {
	flex-basis: 100%; /* like .add-phone: the disclosure drops onto its own line */
	margin-top: 0.25rem;
}
.feed-url[open] summary {
	margin-bottom: 0.3rem;
}
.feed-url code {
	display: block;
	font: 400 0.78rem / 1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
	color: var(--ink-2);
	background: var(--surface);
	border: 1px solid var(--line);
	padding: 0.4rem 0.5rem;
	border-radius: var(--radius);
	overflow-wrap: anywhere;
	word-break: break-all;
}
#feed-url::placeholder {
	color: var(--ink-3);
	opacity: 0.55;
}
/* Access notice: a standing rule, so a quiet peach-wash callout with
   a hairline peach edge — not a thick left bar, not a status banner. */
.settings-notice {
	margin: 0 0 1rem;
	padding: 0.8rem 0.95rem;
	background: var(--peach-wash);
	border: 1px solid var(--peach-line);
	border-radius: var(--radius);
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--ink-2);
}
form.phone-add {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
	margin: 0.5rem 0 0.15rem;
}
form.phone-add input {
	flex: 1 1 auto;
	min-width: 0;
	font: 400 0.95rem / 1.4 var(--sans);
	color: var(--ink);
	caret-color: var(--peach-deep);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 0.58rem 0.75rem;
	transition:
		box-shadow var(--tr),
		border-color var(--tr);
}
form.phone-add input::placeholder {
	color: var(--ink-3);
}
form.phone-add input:focus-visible {
	outline: none;
	border-color: var(--ink);
	box-shadow: var(--ring);
}
form.phone-add .btn {
	flex: none;
}

form.member-add {
	padding-top: 0.75rem;
	border-top: 1px solid var(--line);
}

/* ── list mutations: add-item form, create-list, pending rows ─── */

form.item-add {
	display: flex;
	gap: 0.6rem;
	/* flex-start, not stretch: the textarea auto-grows on a paste, and stretch would drag the
	   Add button to the same height. Both sit at the top; a 1-row textarea still lines up. */
	align-items: flex-start;
	margin: 0 0 1.1rem;
}
form.item-add textarea {
	flex: 1 1 auto;
	min-width: 0;
	font: 400 1rem / 1.4 var(--sans);
	color: var(--ink);
	caret-color: var(--peach-deep);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 0.72rem 0.85rem;
	/* One item per line: app.js grows the field to fit a paste, capped here so a huge list
	   scrolls inside the field instead of pushing the whole page down. resize off -- a manual
	   drag would fight the auto-grow. min-height holds the empty field at one row so it lines
	   up with the Add button (both share it, since flex-start no longer stretches them equal). */
	resize: none;
	overflow-y: auto;
	min-height: 2.9rem;
	max-height: 40vh;
	display: block;
	transition:
		box-shadow var(--tr),
		border-color var(--tr);
}
form.item-add textarea::placeholder {
	color: var(--ink-3);
}
form.item-add textarea:focus-visible {
	outline: none;
	border-color: var(--ink);
	box-shadow: var(--ring);
}
form.item-add .btn {
	flex: none;
	/* Match the textarea's resting row height and hold it as the textarea grows on a paste. */
	min-height: 2.9rem;
}

/* The index create action shares the existing heading overflow menu. */
@media (pointer: coarse) {
	.checklist-index-menu { --heading-menu-size: 44px; }
	.checklist-index-menu .list-menu-trigger,
	.checklist-index-menu .list-menu-item {
		min-width: 44px;
		min-height: 44px;
	}
}

/* The trash-can delete button on chat and checklist rows: a 16px
   monochrome inline SVG inheriting the link's ink color, with the
   44px touch target on coarse pointers. */
form.row-remove {
	flex: none;
	margin: 0;
	align-self: center;
}
form.row-remove button {
	background: none;
	border: none;
	padding: 0.25rem;
	color: var(--ink-3);
	opacity: 0.6;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
	transition:
		color var(--tr),
		opacity var(--tr);
}
form.row-remove button:hover {
	color: var(--peach-deep);
	opacity: 1;
}
form.row-remove button:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 1px;
}
@media (pointer: coarse) {
	form.row-remove button {
		min-height: 44px;
		min-width: 44px;
	}
}

/* Optimistically-appended rows (app.js), faded until the real view
   sync replaces them — the same "not yet confirmed" language as the
   unfilled check control. */
li.pending {
	opacity: 0.5;
}
.list-name {
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: -0.01em;
	flex: 1 1 auto;
	min-width: 0;
}

/* ── the More tab + recipes (read-only) ───────────────────── */

ul.more-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
ul.more-list li {
	border-bottom: 1px solid var(--line);
}
ul.more-list li:last-child {
	border-bottom: none;
}
ul.more-list a {
	display: block;
	padding: 0.85rem 0;
	color: var(--ink);
	text-decoration: none;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: -0.01em;
	transition: color var(--tr);
}
ul.more-list a:hover {
	color: var(--peach-deep);
}

/* Agentic tasks reuse the existing More/list/detail/chat vocabulary. The status pill is
   the only new primitive; state needs to remain scannable beside a long task title. */
ul.tasks {
	list-style: none;
	padding: 0;
	margin: 0;
}
.task-row {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--line);
}
.task-row:last-child { border-bottom: none; }
.task-row > a {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	flex-direction: column;
	gap: 0.2rem;
	color: var(--ink);
	text-decoration: none;
}
.task-row > a:hover .task-row-title { color: var(--peach-deep); }
.task-row-title { font-weight: 600; transition: color var(--tr); }
.task-row-progress {
	color: var(--ink-3);
	font-size: 0.85rem;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.task-status {
	display: inline-flex;
	align-items: center;
	min-height: 1.65rem;
	padding: 0.25rem 0.5rem;
	border-radius: var(--radius-pill);
	background: var(--paper-2);
	color: var(--ink-2);
	font: 600 0.72rem / 1 var(--sans);
	white-space: nowrap;
}
.task-status-running,
.task-status-queued { background: var(--peach-wash); color: var(--peach-deep); }
.task-status-succeeded { background: rgba(39, 89, 123, 0.12); color: var(--plum-deep); }
.task-status-failed,
.task-status-needs-review { color: var(--peach-deep); }
.task-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
}
.task-head h1 { min-width: 0; }
.task-goal { color: var(--ink-2); font-size: 0.95rem; }
.task-summary-note {
	margin: 0 0 0.85rem !important;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--peach-line);
	border-radius: var(--radius);
	background: var(--peach-wash);
	color: var(--ink-2);
	font-size: 0.82rem;
}
.task-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 1.1rem 0 0;
	padding: 0.85rem 0;
	border-block: 1px solid var(--line);
}
.task-facts > div { min-width: 0; }
.task-facts dt {
	color: var(--ink-3);
	font: 600 0.72rem / 1 var(--sans);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.task-facts dd { margin: 0.35rem 0 0; color: var(--ink-2); font-size: 0.85rem; }
.task-section { margin-top: 1.35rem; }
.task-section h2,
.task-chat h2 { margin-top: 0; }
.task-section p { color: var(--ink-2); }
.task-meta { margin-top: 0.35rem !important; color: var(--ink-3) !important; font-size: 0.82rem; }
.task-history { list-style: none; padding: 0; margin: 0; }
.task-history li { padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.task-history li:last-child { border-bottom: none; }
.task-history span { display: block; color: var(--ink-2); }
.task-history time { display: block; margin-top: 0.2rem; color: var(--ink-3); font-size: 0.75rem; }
.task-chat { margin-top: 1.5rem; padding-top: 1.35rem; border-top: 1px solid var(--line); }
.chat-body:has(.task-chat ul.msgs) { display: block; height: auto; min-height: 0; }
.task-chat ul.msgs { flex: none; height: auto; max-height: 24rem; min-height: 8rem; }
.task-closed { color: var(--ink-3); font-size: 0.9rem; }
.task-cancel {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
}
.task-cancel p { color: var(--ink-3); font-size: 0.85rem; margin-bottom: 0.75rem; }
.task-cancel .btn { color: var(--peach-deep); }
@media (pointer: coarse) {
	.task-row > a { min-height: 44px; }
}
@media (max-width: 360px) {
	.task-row,
	.task-head { flex-direction: column; }
	.task-facts { grid-template-columns: 1fr; }
}

/* Help copy + the two direct contact rows. This stays one semantic list inside the page's
   existing card -- no nested contact card -- and long deployment-specific addresses wrap. */
.more-help {
	margin: 0.6rem 0 0;
	color: var(--ink-2);
	font-size: 0.95rem;
	line-height: 1.45;
}
.more-help a,
.help-contact a {
	color: var(--peach-deep);
	text-underline-offset: 0.2em;
}
.help-contact {
	margin: 0.6rem 0 0;
}
.help-contact > div {
	display: grid;
	grid-template-columns: 3.5rem minmax(0, 1fr);
	gap: 0.75rem;
	align-items: baseline;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--line);
}
.help-contact > div:last-child {
	border-bottom: none;
}
.help-contact dt {
	color: var(--ink-3);
	font: 600 0.72rem / 1 var(--sans);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.help-contact dd {
	min-width: 0;
	margin: 0;
	font-size: 0.95rem;
	overflow-wrap: anywhere;
}
@media (pointer: coarse) {
	.more-help a,
	.help-contact a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
	}
}

/* renderRecipes: mirrors ul.chats/ul.lists (name grows, a meta column trails). */
ul.recipes {
	list-style: none;
	padding: 0;
	margin: 0;
}
ul.recipes li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--line);
}
ul.recipes li:last-child {
	border-bottom: none;
}
ul.recipes a {
	color: var(--ink);
	text-decoration: none;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: -0.01em;
	flex: 1 1 auto;
	min-width: 0;
	transition: color var(--tr);
}
ul.recipes a:hover {
	color: var(--peach-deep);
}
.recipe-meta {
	font: 500 0.8rem / 1 var(--sans);
	color: var(--ink-3);
	flex: none;
	font-variant-numeric: tabular-nums;
}

/* renderRecipe: the detail page. The top .recipe-meta line sits under
   the h1 as a small caption. */
p.recipe-meta {
	font: 500 0.85rem / 1.5 var(--sans);
	color: var(--ink-3);
	margin: 0 0 0.5rem;
}
.recipe-source a {
	color: var(--plum-deep);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.recipe-source a:hover {
	text-decoration-color: var(--peach-deep);
}

ul.ingredients {
	padding-left: 1.25rem;
	margin: 0.5rem 0 0;
}
ul.ingredients li {
	color: var(--ink-2);
	margin-top: 0.25rem;
	line-height: 1.5;
}

ol.steps {
	list-style: none;
	padding: 0;
	margin: 0.5rem 0 0;
}
.step {
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--line);
}
.step:last-child {
	border-bottom: none;
}
.step h3 {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: -0.02em;
	margin: 0 0 0.35rem;
	color: var(--ink);
}
.step-time {
	display: block;
	font: 500 0.8rem / 1.4 var(--sans);
	color: var(--ink-3);
	margin-bottom: 0.35rem;
}
.step ul.ingredients {
	margin-bottom: 0.35rem;
}
.step p {
	color: var(--ink-2);
	line-height: 1.55;
	margin: 0.35rem 0 0;
}

/* ── the calendar day-view (a 7-day agenda that reads as a calendar) ── */

/* Refresh sits under the h1, left-aligned, same placement as the index's
   "Create list" — a secondary action, not the page's primary CTA. */
.cal-refresh {
	margin: 0 0 1.2rem;
}

/* Header row: the h1 and Refresh share a line so the week nav sits directly beneath. */
.cal-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}
.cal-head .cal-refresh {
	margin: 0;
}

/* Week navigation: prev arrow, the week label, next arrow. A no-JS <a>; a disabled arrow is an
   inert dashed <span>. */
.cal-weeknav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0.4rem 0 1.3rem;
}
.cal-nav {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: var(--radius);
	border: 1.5px solid var(--line-strong);
	background: var(--surface);
	color: var(--peach-deep);
	font-size: 1.2rem;
	line-height: 1;
	text-decoration: none;
}
.cal-nav:hover {
	background: var(--peach-wash);
}
.cal-nav-off {
	opacity: 0.35;
	border-style: dashed;
}
.cal-range {
	font-weight: 700;
	color: var(--ink);
	font-size: 1rem;
}

.cal-days {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}
.cal-day {
	padding: 0.9rem 0.15rem;
	border-bottom: 1px solid var(--line);
}
.cal-day:last-child {
	border-bottom: none;
}
/* Today is the anchor of an agenda, so it gets a peach-wash plate and a peach
   heading — the one place the calendar spends color, so "today" reads at a glance.
   The plate carries 0.85rem of inner padding (vs the 0.15rem the other days use), so
   pull it out by the 0.7rem difference: the highlight bleeds slightly wider while the
   heading and events stay left-aligned with every other day instead of indented. */
.cal-day.cal-today {
	background: var(--peach-wash);
	border-bottom: none;
	border-radius: var(--radius);
	padding: 0.85rem 0.85rem;
	margin: 0 -0.7rem;
}

.cal-day-head {
	display: flex;
	align-items: baseline;
	gap: 0.55rem;
	margin: 0 0 0.7rem;
}
/* The day header — a real heading now, not an uppercase eyebrow: weekday + date
   in the ink voice so each day reads as a calendar row header. */
.cal-day-heading {
	font: 700 0.9rem / 1 var(--sans);
	letter-spacing: -0.01em;
	color: var(--ink);
	margin: 0;
}
.cal-today .cal-day-heading {
	color: var(--peach-deep);
}
.cal-today-tag {
	font: 700 0.72rem / 1 var(--sans);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--accent-ink);
	background: var(--peach);
	padding: 0.22rem 0.5rem;
	border-radius: var(--radius-pill);
}

.cal-empty {
	font: 500 0.9rem / 1.4 var(--sans);
	color: var(--ink-3);
	margin: 0;
}

ul.cal-events {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

/* Each row: a fixed-width time column, the title, an optional
   location, an optional recurring hint, then the source link or
   add-form pinned to the trailing edge. Wraps rather than truncates
   on narrow viewports. */
.cal-event {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.15rem 0.5rem;
	line-height: 1.4;
	--dot: var(--peach); /* own events; family overrides below */
}
/* Reserve the actions column independently of wrapping title/location text. */
.cal-event:has(> .cal-menu) {
	position: relative;
	padding-right: 2.5rem;
}
.cal-event.cal-family {
	--dot: var(--plum);
}
/* A leading accent dot on the time, color-coded by source — the standard
   calendar "which calendar is this on" cue. Inline on the time so it flows with
   the row and survives wrapping. */
.cal-time {
	font: 600 0.8rem / 1 var(--sans);
	color: var(--ink-2);
	font-variant-numeric: tabular-nums;
	flex: none;
	min-width: 3.6rem;
}
.cal-time::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--dot);
	margin-right: 0.45rem;
	vertical-align: 0.08em;
}
.cal-title {
	font: 500 0.95rem / 1.4 var(--sans);
	color: var(--ink);
}
.cal-location {
	font: 400 0.85rem / 1.4 var(--sans);
	color: var(--ink-3);
}
.cal-recurring {
	font: 500 0.72rem / 1 var(--sans);
	color: var(--ink-3);
}
.cal-source-hint {
	margin-inline-start: auto;
	font: 500 0.8rem / 1.4 var(--sans);
}
.cal-source-hint { color: var(--ink-3); }
/* /scheduled page: the overdue time label (renderScheduled in page.ts) gets the same
   accent as the rest of the peach-deep "needs attention" family. The built-in marker
   stays subordinate to the task description; the explanatory text reuses .cal-source-note. */
.sched-overdue {
	color: var(--peach-deep);
}
.sched-system {
	margin-inline-start: 0.08em;
	color: var(--ink-3);
	font-size: 0.75em;
	line-height: 0;
	vertical-align: super;
}

/* Per-event actions menu: a top-trailing ⋯ button that discloses a small dropdown with
   "Add to device calendar", "Add to Google Calendar", and "Cancel". Built on <details> so it works
   without JS; the items are absolutely positioned so opening the menu doesn't reflow the day list. */
.cal-menu {
	position: absolute;
	top: 0;
	right: 0;
}
.cal-menu-btn {
	cursor: pointer;
	list-style: none; /* drop the default <summary> disclosure triangle */
	color: var(--ink-3);
	font-weight: 700;
	font-size: 1.2rem;
	line-height: 1;
	padding: 0.1rem 0.4rem;
	border-radius: var(--radius);
}
.cal-menu-btn::-webkit-details-marker { display: none; }
.cal-menu-btn:hover,
.cal-menu[open] .cal-menu-btn {
	color: var(--ink);
	background: var(--marine-wash);
}
.cal-menu-items {
	position: absolute;
	right: 0;
	top: 1.7rem;
	z-index: 30; /* above the fixed .bottom-nav (z-20): a menu opened near the card bottom stays tappable */
	min-width: 12.5rem;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	box-shadow: 0 8px 24px rgba(40, 77, 92, 0.14);
	padding: 0.25rem;
}
.cal-menu-item {
	font: 500 0.85rem / 1 var(--sans);
	color: var(--ink);
	text-decoration: none;
	padding: 0.6rem 0.6rem;
	border-radius: var(--radius);
	white-space: nowrap;
}
.cal-menu-item:hover { background: var(--marine-wash); }
/* "Danger" without a red: peach-deep text carries the weight on-palette, matching .list-menu-danger. */
.cal-menu-delete { color: var(--peach-deep); }
.cal-menu-delete:hover { background: var(--peach-wash); }

/* Source note at the top of the calendar: "Showing events from your <linked calendar>." Explains
   the plum feed events and links to /settings; muted, matching .cal-legend's register. */
.cal-source-note {
	margin: 0 0 1rem;
	color: var(--ink-3);
	font-size: 0.82rem;
	line-height: 1.4;
}
/* Canonical member-list note: align its next-element gap with the 1.1rem gap
   below the list's add-item input. */
.member-todo-note {
	margin-bottom: 1.1rem;
}
.cal-source-note a {
	color: var(--plum-deep);
	text-underline-offset: 0.2em;
}

/* The delete-confirmation page (GET /calendar/<uid>/delete). */
.cal-confirm {
	max-width: 34rem;
}
.cal-confirm p {
	color: var(--ink-2);
	line-height: 1.5;
}
.cal-confirm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin-top: 1.25rem;
}
/* Destructive confirm, on-palette: white button with a peach-deep edge + text (no red), so it reads
   as the weighted "Cancel" against the neutral Go back while honoring the system's no-danger-red rule. */
.btn-danger {
	color: var(--peach-deep);
	border-color: var(--peach-deep);
}
.btn-danger:hover {
	background: var(--peach-wash);
	border-color: var(--peach-deep);
}

/* Household apps inherit Home's native Operate controls; no generated styles. */
.household-apps { margin-block-start: 2rem; }
.apps-totals { margin-block: 1.5rem; }
.apps-totals dl, .apps-history dl { margin: 0; }
.apps-totals dt, .apps-history dt { font-size: .875rem; color: var(--ink-2); }
.apps-totals dd, .apps-history dd { margin: .15rem 0 .75rem; font-weight: 600; overflow-wrap: anywhere; }
.apps-totals dd ul { padding-left: 1.25rem; font-weight: 400; }
.apps-totals, .apps-table { font-variant-numeric: tabular-nums; }
.apps-entry { margin-block: 1.25rem; }
.apps-field { margin-block: 1rem; }
.apps-field > label { display: block; margin-block-end: .4rem; font-weight: 600; }
.apps-field input:not([type=checkbox]), .apps-field textarea, .apps-field select {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: .7rem .8rem;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  color: var(--ink); font: inherit; caret-color: var(--peach-deep);
}
.apps-field input:focus-visible, .apps-field textarea:focus-visible, .apps-field select:focus-visible,
.apps-table:focus-visible, .apps-add summary:focus-visible, .apps-delete summary:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px;
}
.apps-field fieldset { border: 1px solid var(--line-strong); border-radius: 8px; padding: .75rem; }
.apps-field legend { font-weight: 600; }
.apps-check { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.apps-check input { width: 1.2rem; height: 1.2rem; accent-color: var(--ink); }
.apps-view, .apps-pages { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem; }
.apps-view [aria-current=page] { color: var(--on-dark); background: var(--ink); }
.apps-history { padding: 0; list-style: none; }
.apps-history > li { padding-block: 1.25rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.apps-delete { margin-block: .75rem; }
.apps-delete summary, .apps-history details > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.apps-delete button { color: var(--peach-deep); }
.apps-table { overflow-x: auto; max-width: 100%; scrollbar-color: var(--ink-3) var(--paper); }
.apps-table table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.apps-table caption { text-align: left; padding-block: .5rem; color: var(--ink-2); }
.apps-table th, .apps-table td { text-align: left; vertical-align: top; padding: .75rem; border-bottom: 1px solid var(--line); min-width: 7rem; max-width: 18rem; overflow-wrap: anywhere; }
.apps-table th { color: var(--ink-2); font-weight: 600; }
.apps-entry [role=status]:empty { display: none; }
.apps-entry [role=status] { overflow-wrap: anywhere; }
.apps-add > summary, .apps-entry .btn, .apps-view .btn, .apps-pages .btn { min-height: 44px; }
