/* Supper Club design language: see .agent/harness/design.md.
   Loaded after daisyui.css. Plain CSS: the Tailwind browser build only
   processes the inline <style type="text/tailwindcss"> block. */

/* ---- The `supper` daisyUI theme (daisyUI's documented CDN method; the
   browser build can't load @plugin "daisyui/theme"). ---- */
[data-theme="supper"] {
  color-scheme: light;
  --color-base-100: #FBF6EC;          /* Paper */
  --color-base-200: #F4EBDB;          /* Linen */
  --color-base-300: #E4D5BB;          /* Deckle */
  --color-base-content: #2B201A;      /* Ink */
  --color-primary: #7B1E2C;           /* Wine */
  --color-primary-content: #FBF6EC;
  --color-secondary: #A9482A;         /* Terracotta */
  --color-secondary-content: #FFF8EE;
  --color-accent: #C9963F;            /* Brass */
  --color-accent-content: #2B201A;
  --color-neutral: #3A2A2D;           /* Aubergine ink */
  --color-neutral-content: #FBF6EC;
  --color-info: #4A6072;              /* Dusk */
  --color-info-content: #FBF6EC;
  --color-success: #4E6A34;           /* Olive */
  --color-success-content: #FBF6EC;
  --color-warning: #DDA63F;           /* Saffron */
  --color-warning-content: #2B201A;
  --color-error: #9E3426;             /* Brick */
  --color-error-content: #FFF4EE;
  --radius-selector: 1rem;
  --radius-field: 2rem;
  --radius-box: 0.25rem;
  --size-selector: 0.25rem;
  --size-field: 0.28125rem;           /* default buttons and inputs: 45 px */
  --border: 1px;
  --depth: 0;
  --noise: 0;

  --muted: #6E5B4D;                   /* Faded ink */
  --brass-dark: #8A6424;
  --font-display-stack: "Fraunces", "Iowan Old Style", Georgia, serif;
}

/* ---- Paper: linen table, faint grain, a candle's glow at the top ---- */
[data-theme="supper"] body {
  background-color: var(--color-base-200);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .12 0 0 0 0 .1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 90% 340px at 50% 0, #F7E7CC 0%, rgba(247, 231, 204, 0) 100%);
  background-repeat: repeat, no-repeat;
  color: var(--color-base-content);
  -webkit-font-smoothing: antialiased;
}

[data-theme="supper"] :focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Form control boundaries at >= 3:1 (Faded ink), not daisyUI's 20 % mix */
[data-theme="supper"] :is(.input, .select, .textarea, .checkbox, .toggle) {
  border-color: var(--muted);
}
[data-theme="supper"] .checkbox { --size: 1.5rem; border-radius: 0.375rem; }

/* Inherited pages keep daisyUI cards until their features redesign them;
   make them sit on the table like sheets rather than floating. */
[data-theme="supper"] .card { border: 1px solid var(--color-base-300); box-shadow: none; }
/* daisyUI mutes table heads and labels to 60 %, which is under 4.5:1 here */
[data-theme="supper"] .table :where(thead, tfoot),
[data-theme="supper"] .label { color: var(--muted); }
[data-theme="supper"] .card-title { font-family: var(--font-display-stack); font-weight: 500; }

.font-display { font-family: var(--font-display-stack); font-variation-settings: "SOFT" 50; }

/* ---- Skip link: hidden until focused ---- */
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 50;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  background: var(--color-base-100); color: var(--color-primary);
  border: 1px solid var(--color-primary); border-radius: 2rem; font-weight: 700;
}
.skip-link:focus { top: 0.75rem; }

/* ---- Masthead ---- */
.masthead { border-bottom: 1px solid var(--color-base-300); }
.wordmark {
  white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--font-display-stack); font-style: italic; font-weight: 500;
  font-variation-settings: "SOFT" 100;
  font-size: 1.75rem; letter-spacing: -0.01em; color: var(--color-primary);
}
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--color-base-content); font-weight: 500;
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.nav-link:hover { text-decoration-color: var(--color-base-300); }
.nav-link[aria-current="page"] { color: var(--color-primary); text-decoration-color: var(--color-primary); }
.quiet-button {
  white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.25rem;
  color: var(--muted); font-weight: 500; cursor: pointer;
}
.quiet-button:hover { color: var(--color-primary); text-decoration: underline; text-underline-offset: 4px; }

/* ---- Type ---- */
.kicker {
  font-size: 0.75rem; line-height: 1rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.display-title {
  font-family: var(--font-display-stack); font-weight: 500; font-variation-settings: "SOFT" 50;
  font-size: 2.5rem; line-height: 2.75rem; letter-spacing: -0.015em;
}
.page-title {
  font-family: var(--font-display-stack); font-weight: 500; font-variation-settings: "SOFT" 50;
  font-size: 2rem; line-height: 2.375rem; letter-spacing: -0.01em;
}
.section-title {
  font-family: var(--font-display-stack); font-weight: 500; font-variation-settings: "SOFT" 50;
  font-size: 1.5rem; line-height: 1.875rem;
}
@media (min-width: 768px) {
  .display-title { font-size: 3.5rem; line-height: 3.75rem; }
  .page-title { font-size: 2.5rem; line-height: 2.875rem; }
  .section-title { font-size: 1.75rem; line-height: 2.125rem; }
}

/* ---- Sheet: paper on the linen table ---- */
.sheet {
  background: var(--color-base-100);
  border: 1px solid var(--color-base-300);
  border-radius: var(--radius-box);
  padding: 1.25rem;
}
@media (min-width: 768px) { .sheet { padding: 2rem; } }

/* ---- Ornamental rule: a hairline with a brass diamond, no glyph ---- */
.ornament-rule {
  position: relative; height: 1px; border: 0; margin: 2rem 0;
  background: var(--color-base-300); overflow: visible;
}
.ornament-rule::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; background: var(--color-accent);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 0 6px var(--color-base-200);
}

/* ---- Notices (flash) ---- */
.notice {
  background: var(--color-base-100); color: var(--color-base-content);
  border: 1px solid var(--color-base-300); border-left-width: 3px;
  border-radius: var(--radius-box); padding: 0.75rem 1rem;
  overflow-wrap: anywhere;
}
.notice-success { border-left-color: var(--color-success); }
.notice-error { border-left-color: var(--color-error); }
/* Signed out (contract 16): empty until a request is refused as signed
   out, then a strip that stays at the top of the viewport while the
   member scrolls, aligned with the page's content */
.signed-out:empty { display: none; }
.signed-out { position: sticky; top: 0; z-index: 40; padding: 0.75rem 1.25rem 0; }
.signed-out .notice { max-width: 56rem; margin: 0 auto; box-shadow: 0 2px 10px rgb(58 42 45 / 0.12); }
/* inline padding grows the tap target to 44 px without opening the line */
.signed-out-link { font-weight: 700; color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; padding: 0.75rem 0; white-space: nowrap; }
@media (min-width: 768px) { .signed-out { padding: 0.75rem 2rem 0; } }
/* /me's notice after an in-place action: gone, but its space stays until
   the next load, so nothing below it moves */
.notice-spent { visibility: hidden; }

/* ---- Avatar: initials on the member's tone ---- */
.avatar-seal {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  box-shadow: 0 0 0 2px var(--color-base-100);
  color: #FBF6EC; font-family: var(--font-display-stack); font-style: italic;
  font-size: 1rem; line-height: 1; letter-spacing: 0.02em; user-select: none;
}
.avatar-seal.avatar-sm { width: 2rem; height: 2rem; font-size: 0.8125rem; }

/* ---- Tag: outlined small caps; text and border share one colour ---- */
.tag {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.0625rem 0.5rem; border: 1px solid currentColor; border-radius: 9999px;
  font-size: 0.6875rem; line-height: 1rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.tag-muted { color: var(--muted); }
.tag-wine { color: var(--color-primary); }
.tag-terracotta { color: var(--color-secondary); }
/* A tag holding a name ("Hosts with Jean-Baptiste") wraps rather than
   pushing a narrow page sideways */
.tag-name { white-space: normal; max-width: 100%; overflow-wrap: anywhere; border-radius: 0.75rem; }

/* ---- Numbered list: menu-course numerals ---- */
.course-numeral {
  font-family: var(--font-display-stack); font-style: italic; font-weight: 400;
  font-variant-numeric: oldstyle-nums; font-size: 1.5rem; line-height: 1;
  color: var(--brass-dark); text-align: right;
}

/* ---- Forms ---- */
.field-label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 600; }
.check-label { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; cursor: pointer; font-weight: 600; }
.text-destructive { color: var(--color-error); }
.text-destructive:disabled { color: var(--muted); opacity: 0.5; }

/* ---- Invitation: the next dinner, set like a printed card ---- */
.invitation { display: flex; flex-direction: column; gap: 0.875rem; }
.invitation .display-title { overflow-wrap: anywhere; }
.invitation-date {
  font-family: var(--font-display-stack); font-variation-settings: "SOFT" 50;
  font-size: 1.375rem; line-height: 1.875rem; font-weight: 500;
}
@media (min-width: 768px) { .invitation-date { font-size: 1.625rem; line-height: 2.125rem; } }
.host-line { display: flex; align-items: center; gap: 0.75rem; }
.invitation-location { overflow-wrap: anywhere; }
.guest-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; font-weight: 600; }

/* Overlapping avatars read as a group (each has a 2 px Paper ring) */
.avatar-stack { display: inline-flex; flex-wrap: wrap; row-gap: 0.25rem; padding-left: 0.375rem; }
.avatar-stack > .avatar-seal { margin-left: -0.375rem; }
/* A couple's two avatars: the second overlaps the first, never wraps */
.avatar-pair { display: inline-flex; flex: none; }
.avatar-pair > .avatar-seal + .avatar-seal { margin-left: -0.375rem; }
.guest-group { display: flex; flex-direction: column; gap: 0.375rem; }
.group-title { font-size: 0.875rem; font-weight: 700; }

/* ---- Reply buttons: yes and no side by side, maybe quieter below.
   Pressed = filled in the status colour plus a CSS-drawn tick; the
   meaning is also in #my-reply. ---- */
.reply-group { display: flex; flex-direction: column; gap: 0.25rem; }
.reply-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; max-width: 26rem; }
.reply-maybe-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; }
[data-theme="supper"] .reply-btn {
  background: transparent; color: var(--color-base-content);
  border: 1px solid var(--color-base-content); box-shadow: none;
  padding-inline: 0.75rem; white-space: nowrap; gap: 0.375rem;
}
[data-theme="supper"] .reply-btn.btn-primary {
  background: var(--color-primary); color: var(--color-primary-content); border-color: var(--color-primary);
}
/* Maybe keeps one width pressed or not (03 QA): unpressed, its padding
   holds the room the tick and its gap (0.375rem + 0.375rem) take when
   pressed, and a transparent border matches the pressed one */
[data-theme="supper"] .reply-maybe {
  border: 1px solid transparent; color: var(--color-primary);
  padding-inline: 1.25rem; min-height: 44px;
}
[data-theme="supper"] .reply-maybe:hover { text-decoration: underline; text-underline-offset: 4px; }
[data-theme="supper"] .reply-yes[aria-pressed="true"] {
  background: var(--color-success); color: var(--color-success-content); border-color: var(--color-success);
}
[data-theme="supper"] .reply-maybe[aria-pressed="true"] {
  background: var(--color-warning); color: var(--color-warning-content);
  border: 1px solid var(--color-warning); padding-inline: 0.875rem;
}
[data-theme="supper"] .reply-no[aria-pressed="true"] {
  background: var(--color-error); color: var(--color-base-100); border-color: var(--color-error);
}
/* The tick: two borders of a small rotated box, in the text colour */
[data-theme="supper"] .reply-btn[aria-pressed="true"]::before {
  content: ""; display: inline-block; flex: none;
  width: 0.375rem; height: 0.75rem; margin-top: -0.2rem;
  border-style: solid; border-color: currentColor; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
@media (max-width: 359px) {
  [data-theme="supper"] .reply-main .reply-btn { padding-inline: 0.5rem; font-size: 0.9375rem; }
}

/* ---- Headcount: what the host cooks for ---- */
.headcount {
  display: flex; flex-direction: column; gap: 0.25rem;
  background: var(--color-base-200); border-radius: var(--radius-box); padding: 1rem 1.25rem;
}
.headcount-coming {
  font-family: var(--font-display-stack); font-variation-settings: "SOFT" 50;
  font-size: 1.375rem; line-height: 1.875rem; font-weight: 500;
}
.numeral {
  font-family: var(--font-display-stack); font-style: italic; font-variant-numeric: oldstyle-nums;
}
.headcount #not-replied { overflow-wrap: anywhere; }

/* ---- Tertiary action: Wine text, underline on hover/focus, thumb-sized ---- */
.link-tertiary {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--color-primary); font-weight: 600;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
}
.link-tertiary:hover, .link-tertiary:focus-visible { text-decoration-color: currentColor; }
/* A destructive action set as a text button stays Brick, whichever rule comes later */
.link-tertiary.text-destructive { color: var(--color-error); }
.link-tertiary.text-destructive:disabled { color: var(--muted); opacity: 0.5; }

/* ---- To-do strip and planning prompt: a sheet with a brass edge ---- */
.todo-strip { border-left: 3px solid var(--color-accent); }

/* ---- Months ahead: a menu of the year ---- */
.months-ahead { border-top: 1px solid var(--color-base-300); }
.months-ahead > li { border-bottom: 1px solid var(--color-base-300); }
.month-row {
  display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); align-items: center;
  gap: 0.25rem 1rem; min-height: 44px; padding: 0.625rem 0;
}
a.month-row:hover .month-name, a.month-row:focus-visible .month-name { color: var(--color-primary); }
.month-name {
  font-family: var(--font-display-stack); font-style: italic; font-size: 1.125rem;
  font-variant-numeric: oldstyle-nums; color: var(--brass-dark);
}
.month-detail { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .month-row { grid-template-columns: minmax(0, 1fr); } }
.tag-brick { color: var(--color-error); }

/* ---- Availability calendar: the month's evenings (contract 06).
   Plain CSS because the CDN builds don't generate every opacity variant
   (bg-error/15) or daisyUI colours for Tailwind's ring utilities. ---- */
.calendar-sheet { display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 479px) { .calendar-sheet { padding: 1.25rem 0.75rem; } }
.calendar-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 0.5rem; }
.calendar-heading { grid-column: 2; text-align: center; }
.calendar-page {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--color-base-content); border-radius: 9999px;
  font-family: var(--font-display-stack); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.calendar-page:hover { color: var(--color-primary); border-color: var(--color-primary); }
#calendar-next { grid-column: 3; }
.coverage-line, .date-reason { overflow-wrap: anywhere; }
.date-reason { border-left: 3px solid var(--color-accent); padding-left: 0.75rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
@media (min-width: 768px) { .calendar-grid { gap: 4px; } }
.calendar-weekday {
  text-align: center; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 0.25rem 0;
}
.calendar-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 0; min-height: 44px; padding: 0.25rem 0.125rem; border-radius: 0.375rem;
  border: 1px solid transparent; line-height: 1.1; overflow: hidden;
}
button.calendar-day { cursor: pointer; }
button.calendar-day:hover { border-color: var(--color-base-content); }
button.calendar-day[aria-pressed="true"] { border-color: var(--color-base-content); border-width: 2px; }
.calendar-day-number { font-family: var(--font-display-stack); font-size: 1rem; font-weight: 500; }
.calendar-day-count { font-size: 0.8125rem; }
.calendar-day-initials { display: none; font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--muted); overflow-wrap: anywhere; text-align: center; }
@media (min-width: 768px) {
  .calendar-day { min-height: 4.5rem; justify-content: flex-start; }
  .calendar-day-initials { display: block; }
}
.calendar-day-past { color: var(--muted); }
.day-all-free  { background-color: color-mix(in oklab, var(--color-success) 20%, var(--color-base-100)); }
.day-some-busy { background-color: color-mix(in oklab, var(--color-warning) 22%, var(--color-base-100)); }
.day-many-busy { background-color: color-mix(in oklab, var(--color-error) 16%, var(--color-base-100)); }
.calendar-day-dinner { box-shadow: inset 0 0 0 2px var(--color-primary); }
.calendar-day-dinner .calendar-day-number::after {
  content: ""; display: block; width: 5px; height: 5px; margin: 1px auto 0;
  border-radius: 9999px; background: var(--color-primary);
}
.calendar-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.8125rem; color: var(--muted); }
.calendar-legend li { display: inline-flex; align-items: center; gap: 0.375rem; }
.legend-swatch { display: inline-block; width: 0.875rem; height: 0.875rem; border-radius: 0.25rem; }
.legend-swatch.legend-dinner { box-shadow: inset 0 0 0 2px var(--color-primary); }
.day-detail { min-height: 3rem; border-top: 1px solid var(--color-base-300); padding-top: 0.75rem; overflow-wrap: anywhere; }
.day-detail-panel { display: flex; flex-direction: column; gap: 0.25rem; }
.day-detail-title { font-family: var(--font-display-stack); font-weight: 600; font-size: 1.1875rem; line-height: 1.625rem; }
.tag-olive { color: var(--color-success); }

/* ---- The evening finder ---- */
.finder-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.finder-controls > legend { grid-column: 1 / -1; padding: 0; }
@media (max-width: 559px) { .finder-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .finder-field:last-child { grid-column: 1 / -1; } }
.finder-error:empty, #finder-status:empty { display: none; }
/* the ring sits clear of the text, and of the Days select above it (the
   fieldset has no margin of its own) */
#finder-status { margin-top: 0.75rem; }
#finder-status:focus, #finder-current:focus { outline-offset: 4px; }
.finder-error, .change-warning { border-left: 3px solid var(--color-error); padding: 0.25rem 0 0.25rem 0.75rem; }
.suggestion-list { border-top: 1px solid var(--color-base-300); }
.suggestion {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.5rem 1rem;
  border-bottom: 1px solid var(--color-base-300); padding: 0.75rem 0;
}
.suggestion-text { min-width: 0; overflow-wrap: anywhere; }
.suggestion-date { font-family: var(--font-display-stack); font-size: 1.1875rem; line-height: 1.625rem; font-weight: 500; }
.suggestion-quality { font-size: 0.875rem; line-height: 1.375rem; }
.suggestion-busy { font-size: 0.875rem; line-height: 1.375rem; color: var(--muted); }
.pick-btn { min-width: 6.5rem; }
.pick-btn[aria-disabled="true"] { cursor: progress; opacity: 0.7; }
@media (max-width: 359px) { .suggestion { grid-template-columns: minmax(0, 1fr); } }

/* ---- Calling the month off, and early starts in After that ---- */
.cancel-month { border-top: 1px solid var(--color-base-300); padding-top: 1rem; }
.month-start { grid-column: 1 / -1; }
@media (min-width: 421px) { .month-start { grid-column: 2; } }

/* ---- Sign in with Yahoo: the provider's own colour, the one literal
   outside the palette (a provider exception, like Google's and Apple's
   buttons; design.md). Same 180 x 40 face as theirs, in a 44 px link. ---- */
.yahoo-signin { display: inline-flex; align-items: center; min-height: 44px; border-radius: 4px; }
.yahoo-signin-face {
  display: inline-flex; align-items: center; justify-content: center; width: 180px; height: 40px;
  border-radius: 4px; background: #6001D2; color: #FFFFFF; font-family: inherit;
  font-weight: 600; font-size: 0.9375rem; line-height: 1;
}
.yahoo-signin:hover .yahoo-signin-face { text-decoration: underline; }

/* ---- Members: reorder buttons ---- */
.move-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid var(--color-base-content); border-radius: 9999px; background: transparent; cursor: pointer;
}
.move-btn:hover:not(:disabled) { color: var(--color-primary); border-color: var(--color-primary); }
.move-btn:disabled { color: var(--muted); border-color: var(--color-base-300); cursor: default; }

[data-show] { transition: opacity .15s ease; }

/* ---- Menu card: the theme's description and note, set like a printed
   menu. One top hairline, no ornament of its own (the invitation's
   ornamental rule follows it). ---- */
.theme-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.375rem;
  text-align: center; border-top: 1px solid var(--color-base-300);
  padding: 1.25rem 0 0.25rem;
}
.theme-card > .kicker:not(:first-child) { margin-top: 1.25rem; }
.theme-description {
  font-family: var(--font-display-stack); font-style: italic; font-variation-settings: "SOFT" 50;
  font-size: 1.125rem; line-height: 1.75rem; max-width: 34rem;
  white-space: pre-line; overflow-wrap: anywhere;
}
.theme-note { max-width: 34rem; overflow-wrap: anywhere; }

/* A long theme steps down from display to the h1 size */
.display-title.display-title-long { font-size: 2rem; line-height: 2.375rem; }
@media (min-width: 768px) { .display-title.display-title-long { font-size: 2.5rem; line-height: 2.875rem; } }

/* Long unbroken names wrap in the guest list */
.guest-group p { overflow-wrap: anywhere; }

/* ---- Host details form ---- */
.field-help { margin-top: 0.375rem; font-size: 0.875rem; line-height: 1.375rem; color: var(--muted); }
.details-form .textarea { min-height: 7.5rem; line-height: 1.625rem; border-radius: 1rem; }
.details-save[aria-disabled="true"] { color: var(--muted); border-color: var(--muted); cursor: progress; }
.details-error:empty { display: none; }
.details-error {
  border-left: 3px solid var(--color-error); padding: 0.5rem 0 0.5rem 0.75rem;
}

/* ---- History: the club's record, by year ---- */
.history-list { border-top: 1px solid var(--color-base-300); }
.history-entry {
  display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 0.25rem 1rem;
  border-bottom: 1px solid var(--color-base-300); padding: 0.875rem 0;
}
.history-detail { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; overflow-wrap: anywhere; }
.history-title { font-family: var(--font-display-stack); font-weight: 600; font-size: 1.1875rem; line-height: 1.625rem; }
.history-title a { display: inline-flex; align-items: center; min-height: 44px; }
.history-title a:hover, .history-title a:focus-visible { color: var(--color-primary); text-decoration: underline; text-underline-offset: 4px; }
.history-teaser {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; white-space: pre-line; font-style: italic; color: var(--muted);
}
@media (max-width: 420px) { .history-entry { grid-template-columns: minmax(0, 1fr); } }

/* ---- My calendar: connections, the provider chooser, steps, blackouts ---- */
.connections, .blackouts { border-top: 1px solid var(--color-base-300); }
.connection, .blackout { border-bottom: 1px solid var(--color-base-300); padding: 0.875rem 0; }
.connection { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.connection-label {
  font-family: var(--font-display-stack); font-weight: 600; font-size: 1.1875rem; line-height: 1.625rem;
  overflow-wrap: anywhere;
}
.connection-status { overflow-wrap: anywhere; }
.connection-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem 1.25rem; margin-top: 0.25rem; }
.replace-link > summary { list-style: none; cursor: pointer; }
.replace-link > summary::-webkit-details-marker { display: none; }
.replace-form { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.5rem; width: min(100%, 26rem); }
.blackout { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.busy-button[aria-disabled="true"], .connection-sync[aria-disabled="true"] {
  color: var(--muted); border-color: var(--muted); cursor: progress;
}
.form-error:empty { display: none; }
.form-error { border-left: 3px solid var(--color-error); padding: 0.5rem 0 0.5rem 0.75rem; }
.coverage-line { color: var(--muted); font-size: 0.875rem; line-height: 1.375rem; overflow-wrap: anywhere; }

/* The provider chooser: radio pills; the chosen one shows its panel (no JS) */
.provider-choice { border: 0; padding: 0; min-width: 0; }
.provider-pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.125rem;
  border: 1px solid var(--muted); border-radius: var(--radius-field); cursor: pointer; font-weight: 600;
}
.provider-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.provider-pill:has(input:checked) { background: var(--color-neutral); color: var(--color-neutral-content); border-color: var(--color-neutral); }
.provider-pill:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }
#add-calendar:has(.provider-choice input) .provider-panel,
#add-calendar:has(.provider-choice input) .link-form { display: none; }
#add-calendar:has(#provider-google:checked) #panel-google,
#add-calendar:has(#provider-apple:checked) #panel-apple,
#add-calendar:has(#provider-outlook:checked) #panel-outlook,
#add-calendar:has(#provider-yahoo:checked) #panel-yahoo,
#add-calendar:has(#provider-other:checked) #panel-other { display: block; }
#add-calendar:has(#provider-apple:checked) .link-form,
#add-calendar:has(#provider-outlook:checked) .link-form,
#add-calendar:has(#provider-yahoo:checked) .link-form,
#add-calendar:has(#provider-other:checked) .link-form { display: block; }

.setup-steps-title { font-family: var(--font-display-stack); font-weight: 600; font-size: 1.1875rem; line-height: 1.625rem; }
.setup-steps { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .setup-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.setup-steps figure { display: flex; flex-direction: column; gap: 0.625rem; margin: 0; }
.setup-steps img { height: 120px; width: auto; max-width: 100%; align-self: flex-start; }
.setup-steps figcaption { display: flex; gap: 0.625rem; align-items: baseline; }
.setup-step-numeral {
  font-family: var(--font-display-stack); font-style: italic; font-size: 1.375rem;
  font-variant-numeric: oldstyle-nums; color: #8A6424; flex: none;
}
.setup-text-steps { list-style: decimal; padding-left: 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.5rem; }
.setup-steps-more > summary { list-style: none; cursor: pointer; }
.setup-steps-more > summary::-webkit-details-marker { display: none; }

/* ---- My calendar: the usual week (contract 6b) ---- */
.tag-brass { color: var(--brass-dark); }
.usual-days { border-top: 1px solid var(--color-base-300); }
.usual-days > li { border-bottom: 1px solid var(--color-base-300); }
.usual-day-summary {
  display: flex; align-items: center; gap: 0.75rem; min-height: 52px; padding: 0.375rem 0;
  list-style: none; cursor: pointer;
}
.usual-day-summary::-webkit-details-marker { display: none; }
.usual-day-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.usual-day-name { font-family: var(--font-display-stack); font-size: 1.1875rem; line-height: 1.625rem; }
.usual-day-note { font-size: 0.875rem; line-height: 1.375rem; color: var(--muted); overflow-wrap: anywhere; }
.usual-day-free { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
/* The chevron: two borders of a small rotated box, turning when open */
.usual-chevron {
  flex: none; width: 0.5rem; height: 0.5rem; margin: 0 0.25rem 0.25rem 0.25rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 150ms ease;
}
.usual-day[open] .usual-chevron { transform: rotate(-135deg); margin: 0.375rem 0.25rem 0 0.25rem; }
.usual-day-form { display: flex; flex-direction: column; gap: 1rem; padding: 0.25rem 0 1.25rem; }
.usual-kinds { border: 0; padding: 0; margin: 0; min-width: 0; }
.usual-day-form:has(input[name="kind"][value="free"]:checked) .usual-note { display: none; }
.usual-note { max-width: 26rem; }
.usual-week-summary { font-size: 1.0625rem; line-height: 1.625rem; }
.usual-exceptions { border-top: 1px solid var(--color-base-300); padding-top: 1.25rem; }
.usual-exceptions-title { font-family: var(--font-display-stack); font-weight: 600; font-size: 1.1875rem; line-height: 1.625rem; }
.usual-exception-list { border-top: 1px solid var(--color-base-300); }
.usual-exception {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid var(--color-base-300); padding: 0.375rem 0;
}
.usual-remove { min-height: 44px; }
.usual-exception-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; }
#usual-exception-status:focus, #usual-exception-error:focus { outline-offset: 4px; }
.suggestion-ideal { font-size: 0.875rem; line-height: 1.375rem; color: var(--muted); }
.usual-exception-field { flex: 1 1 12rem; max-width: 20rem; }

/* ---- Dinner feed (contract 07): the invitation's calendar links, the /me sheet ---- */
.calendar-links { display: flex; flex-wrap: wrap; column-gap: 1.25rem; margin-top: -0.25rem; }
.feed-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.feed-link-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.feed-link-row #feed-url { flex: 1 1 16rem; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.875rem; }
/* A live region: always rendered (screen readers may skip one that appears
   and speaks at once), but out of the flow, like a screen-reader-only
   element, while it has nothing to say */
.feed-copy-status { font-size: 0.875rem; line-height: 1.375rem; color: var(--color-success); font-weight: 600; }
.feed-copy-status:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#dinner-feed-status:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.feed-reminders { border-top: 1px solid var(--color-base-300); padding-top: 1.25rem; }
.feed-reminders-title { font-family: var(--font-display-stack); font-weight: 600; font-size: 1.1875rem; line-height: 1.625rem; }
.feed-reset { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.5rem; font-size: 0.875rem; }

/* ---- Invites (Members page): the row's feedback and the hand-copy
   fallback sit under the member ---- */
.invite-status { font-size: 0.875rem; line-height: 1.375rem; color: var(--color-success); font-weight: 600; }
/* Always rendered, like .feed-copy-status: an empty row's feedback leaves
   the flow, not the accessibility tree */
.invite-feedback:has(.invite-status:empty):has(.invite-manual[hidden]) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.invite-manual { margin-top: 0.5rem; }
/* a long unbroken first name mustn't widen the page at 320 px */
.invite-manual-label { overflow-wrap: anywhere; }
.invite-manual textarea { font-size: 0.9375rem; field-sizing: content; }

/* ---- Privacy policy: readable prose on one sheet ---- */
.policy ul { list-style: disc; padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.policy p, .policy li { max-width: 65ch; }
.policy a, a.policy-link { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.policy a:focus-visible, a.policy-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.policy code { font-size: 0.875em; overflow-wrap: anywhere; }

/* ---- Couples: My calendar's Hosting sheet ---- */
.couple-ask, .couple-declined, .couple-notice { display: flex; flex-direction: column; gap: 0.5rem; }
.couple-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; }
/* "No" and "OK" are two letters: give them a whole 44 px target */
.couple-form > .link-tertiary { min-width: 44px; justify-content: center; }
.couple-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
#partner { flex: 1 1 14rem; min-width: 0; max-width: 100%; }
.couple-form { display: inline; }
