/* The only stylesheet. Phone first; a laptop shows the same single column at a wider measure.

   The look is a cousin of the church's other internal tool: a Paper ground with a soft colour field
   behind it, Ink type, Periwinkle for the one main action, Sage for what is done, hairline rules and
   pill-shaped controls. Type is the phone's own font, sized in rem so the phone's text size setting
   carries through. Every touch target is at least 44 pixels. No inline style anywhere; elements are
   shown and hidden with the hidden attribute. */

:root {
  color-scheme: light;

  --paper: #FAF9F6;
  --surface: #FFFFFF;
  --surface-quiet: #F2F1EC;
  --ink: #252A36;
  --ink-soft: #3B3F4A;
  --muted: #5F6472;
  --line: rgba(37, 42, 54, 0.12);
  --line-strong: rgba(37, 42, 54, 0.26);
  --control-line: rgba(37, 42, 54, 0.54);   /* the outline of a control: 3 to 1 or more against paper and white */

  --brand: #4E56A0;
  --brand-deep: #343579;
  --brand-tint: #E9EBF7;
  --brand-fill: #6068B2;
  --brand-fill-press: #4E56A0;
  --on-fill: #FFFFFF;
  --chosen-fill: #6068B2;                   /* a chosen When, How or In touch lately: 3 to 1 or more against the card */
  --on-chosen: #FFFFFF;

  --good: #3F7A5D;
  --good-tint: #E8F1EC;
  --good-ink: #23452F;
  --warn-tint: #FFF3D6;
  --warn-ink: #4A3200;
  --bad-tint: #FFEBE6;
  --bad-ink: #6B2314;

  --blob-a: rgba(165, 223, 211, 0.50);
  --blob-b: rgba(96, 104, 178, 0.16);
  --blob-c: rgba(221, 229, 237, 0.90);

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-control: 12px;
  --radius: 20px;
  --radius-sheet: 28px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(37, 42, 54, 0.04), 0 10px 30px rgba(37, 42, 54, 0.06);
  --shadow-pop: 0 2px 6px rgba(22, 25, 34, 0.08), 0 20px 50px rgba(22, 25, 34, 0.20);
  --shadow-sheet: 0 30px 80px rgba(0, 0, 0, 0.28);
  --shadow-dock: 0 6px 18px rgba(96, 104, 178, 0.30);

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur: 160ms;
  --dur-reveal: 240ms;

  --tap: 44px;
  --gutter: 16px;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --paper: #161922;
    --surface: #22252E;
    --surface-quiet: #1D2029;
    --ink: #F1F1EC;
    --ink-soft: #D6D7DD;
    --muted: #A6AAB6;
    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.24);
    --control-line: rgba(255, 255, 255, 0.40);

    --brand: #A3A8E0;
    --brand-deep: #D3D6F5;
    --brand-tint: rgba(127, 134, 207, 0.22);
    --brand-fill: #5157A6;
    --brand-fill-press: #444A92;
    --chosen-fill: #A3A8E0;
    --on-chosen: #161922;

    --good: #8FB9A2;
    --good-tint: rgba(143, 185, 162, 0.18);
    --good-ink: #DCEBE2;
    --warn-tint: rgba(255, 191, 63, 0.16);
    --warn-ink: #FFE7B0;
    --bad-tint: rgba(255, 134, 116, 0.18);
    --bad-ink: #FFD9D1;

    --blob-a: rgba(96, 104, 178, 0.30);
    --blob-b: rgba(122, 225, 191, 0.10);
    --blob-c: rgba(57, 32, 124, 0.40);

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.30), 0 10px 30px rgba(0, 0, 0, 0.25);
    --shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.40), 0 20px 50px rgba(0, 0, 0, 0.50);
    --shadow-dock: 0 6px 18px rgba(0, 0, 0, 0.45);
  }
}

/* ---- ground ------------------------------------------------------------------------------------ */

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

[hidden] { display: none !important; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
  /* A control that takes focus is scrolled clear of the fixed button, never under it. */
  scroll-padding-bottom: calc(8rem + env(safe-area-inset-bottom));
}

/* On an iPhone, take the size the phone's own text setting asks for. */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html { font: -apple-system-body; }
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) calc(7rem + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  position: relative;
  z-index: 0;
}

/* The soft colour field behind the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, var(--blob-a) 0%, transparent 70%),
    radial-gradient(ellipse 55% 45% at 100% 8%, var(--blob-b) 0%, transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 100%, var(--blob-c) 0%, transparent 72%);
}

@media (prefers-reduced-transparency: reduce) {
  body::before { display: none; }
}

.brand-bar {
  height: 3px;
  margin: 0 calc(-1 * max(var(--gutter), env(safe-area-inset-left)));
  background: var(--brand-fill);
}

.top, main, .foot {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

.top { padding-top: max(18px, env(safe-area-inset-top)); }

.wordmark {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 6px 0 16px;
  font-size: 1.75rem;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h1:focus { outline: none; }

.title-block { margin-bottom: 4px; }
.title-block .chip { margin-top: 12px; }

p { margin: 0; }

a { color: var(--brand); }

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- buttons --------------------------------------------------------------------------------------- */

button {
  font: inherit;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 8px 18px;
  border: 1px solid var(--control-line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-weight: 550;
  line-height: 1.25;
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: default; }

button.primary {
  background: var(--brand-fill);
  border-color: transparent;
  color: var(--on-fill);
  font-weight: 650;
}

button.primary:active:not(:disabled) { background: var(--brand-fill-press); }

@media (hover: hover) {
  button:hover:not(:disabled) { border-color: var(--brand); }
  button.primary:hover:not(:disabled) { background: var(--brand-fill-press); }
  button.link:hover:not(:disabled) { text-decoration: underline; }
}

button.link {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 8px 10px;
  font-weight: 650;
}

button.link.small { font-size: 0.9375rem; }

.quiet-btn {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.icon-btn::-webkit-details-marker { display: none; }

.done-btn {
  margin-top: 14px;
  min-width: 8rem;
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand-deep);
  font-weight: 650;
}

/* ---- notices and chips ----------------------------------------------------------------------------- */

.lede {
  margin: 0 0 18px;
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 36em;
}

.notice {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-quiet);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.notice-warn { background: var(--warn-tint); color: var(--warn-ink); border-color: transparent; }

.notice-pause {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  background: var(--brand-tint);
  color: var(--brand-deep);
  border-color: transparent;
  font-weight: 550;
}

.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.4;
}

.chip-preview { background: var(--warn-tint); color: var(--warn-ink); }
.chip-good { background: var(--good-tint); color: var(--good-ink); }

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

/* ---- cards ----------------------------------------------------------------------------------------- */

.cards {
  display: grid;
  gap: 12px;
}

.card, .pool-row {
  position: relative;
  padding: 16px 16px 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  min-width: 0;
  overflow-wrap: anywhere;
}

.card.is-done { box-shadow: inset 4px 0 0 var(--good), var(--shadow-card); }

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.person-name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding-top: 6px;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.name-link {
  display: inline-block;
  margin: -10px 0;
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
}

.name-link:hover { text-decoration: underline; }
.icon-ext { width: 0.85em; height: 0.85em; margin-left: 0.3em; vertical-align: -0.05em; color: var(--muted); }

.meta {
  display: block;
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--muted);
}

.last-line {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
}

.done-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 12px;
}

.done-line, .saved-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--good-ink);
  font-weight: 650;
}

.icon-check { color: var(--good); stroke-width: 2.4; }
.icon-more { stroke-width: 3.2; }

.note-follows {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* The card's menu: a disclosure with one item. */
.menu { position: relative; flex: none; margin: -6px -8px 0 0; }
.menu > summary { list-style: none; }
.menu[open] > summary { background: var(--surface-quiet); color: var(--ink); }

.menu-pop {
  position: absolute;
  right: 0;
  top: calc(var(--tap) + 2px);
  z-index: 5;
  /* Never wider than the screen: at large text sizes the item wraps instead of running off the left edge. */
  min-width: min(13rem, calc(100vw - 2 * var(--gutter)));
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
}

.menu-item {
  display: block;
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

/* Skeleton cards while the week loads. */
.skeleton .bone {
  display: block;
  height: 0.9rem;
  margin-top: 10px;
  border-radius: 7px;
  background: var(--line);
  animation: breathe 1.6s ease-in-out infinite;
}

.skeleton .bone-name { width: 55%; height: 1.2rem; margin-top: 4px; }
.skeleton .bone-meta { width: 25%; }
.skeleton .bone-line { width: 75%; }
.skeleton .bone-btn { width: 7rem; height: var(--tap); border-radius: var(--radius-pill); margin-top: 14px; }

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ---- the small form -------------------------------------------------------------------------------- */

.contact-form, .ds-form, .pause-form {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

.group-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.group-label .quiet { font-weight: 450; }

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice { position: relative; display: inline-flex; }

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span, .chip-btn {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 8px 16px;
  border: 1px solid var(--control-line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.25;
}

.choice input:checked + span, .chip-btn[aria-pressed="true"] {
  background: var(--chosen-fill);
  border-color: transparent;
  color: var(--on-chosen);
}

.choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

.field { display: block; }

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--ink-soft);
}

input[type="date"], input[type="search"], input[type="email"], input[type="password"], input[type="text"] {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  font-size: max(1rem, 16px);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: var(--radius-control);
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"] { max-width: 16rem; }
input::-webkit-date-and-time-value { text-align: left; }

input:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.form-actions .primary { min-width: 8rem; }
.form-actions.stacked { flex-direction: column; align-items: stretch; }

.form-error {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bad-tint);
  color: var(--bad-ink);
  font-size: 0.9375rem;
}

.contact-form .form-error, .ds-form .form-error, .pause-form .form-error { margin-top: 0; }

/* ---- more names ------------------------------------------------------------------------------------ */

.more { margin: 18px 0 8px; }

.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  background: var(--surface);
  font-weight: 650;
}

.more-btn .icon { color: var(--brand); }
.more-status { margin-top: 10px; color: var(--ink-soft); }

.section-title {
  margin: 22px 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---- closed rows ----------------------------------------------------------------------------------- */

.rows {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.row + .row { border-top: 1px solid var(--line); }

.row > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px 12px 20px;
  font-size: 1.0625rem;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
  border-radius: var(--radius);
}

.row > summary::-webkit-details-marker { display: none; }

/* The title of a closed row is a heading (h2), so what the row holds sits under it; it looks like the row. */
.row-title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}
.row > summary:focus-visible { outline-offset: -3px; }
.icon-chev { color: var(--muted); transition: transform var(--dur) var(--ease); }
.row[open] > summary .icon-chev { transform: rotate(90deg); }

.row-body { padding: 0 16px 18px 20px; }
.row-body .cards { gap: 10px; }
.row-body .card { box-shadow: none; }

.sub-heading {
  margin: 18px 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.line-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.line-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 0;
}

/* The words take the row; Undo or Restore keeps its size and drops under them when the text is large. */
.line-item > .line-main { flex: 1 1 10rem; }
.line-item > button { flex: none; }

.line-item + .line-item { border-top: 1px solid var(--line); }
.line-main { min-width: 0; overflow-wrap: anywhere; }
.line-name { font-weight: 650; }
.line-sub { display: block; font-size: 0.9375rem; color: var(--ink-soft); }

.load-failed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 0;
}

/* ---- the pool before the first list ------------------------------------------------------------------ */

.pool { margin-top: 8px; }
.filter-field { margin-top: 4px; }
.pool .filter { margin-bottom: 14px; }

.pool-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.name-text { color: var(--ink); }

.in-touch { margin-top: 14px; }

.mark-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 10px;
  padding: 6px 4px 6px 12px;
  border-radius: 12px;
  background: var(--surface-quiet);
}

.preview-tools { margin: 0 0 18px; }

.preview-btn {
  border-style: dashed;
  border-color: var(--warn-ink);
  color: var(--warn-ink);
  background: var(--warn-tint);
}

/* ---- footnote and account -------------------------------------------------------------------------- */

.foot { margin-top: 28px; }

.footnote {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.account {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 4px 0 0 -10px;
}

.preview-reset { margin-top: 0; }

/* ---- the fixed button ------------------------------------------------------------------------------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 18px max(var(--gutter), env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  background: linear-gradient(to top, var(--paper) 55%, rgba(250, 249, 246, 0));
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .dock { background: linear-gradient(to top, var(--paper) 55%, rgba(22, 25, 34, 0)); }
}

.dock-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: var(--measure);
  min-height: 54px;
  font-size: 1.0625rem;
  box-shadow: var(--shadow-dock);
}

/* ---- sheets ----------------------------------------------------------------------------------------- */

dialog.sheet {
  width: 100%;
  max-width: 34rem;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sheet);
  overflow: auto;
  overscroll-behavior: contain;
}

dialog.sheet::backdrop { background: rgba(22, 25, 34, 0.45); }

@media (min-width: 640px) {
  dialog.sheet { margin: auto; border-radius: var(--radius-sheet); }
}

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 10px 6px 24px;
  background: var(--surface);
}

.sheet-head h2 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sheet-body {
  padding: 4px 24px calc(24px + env(safe-area-inset-bottom));
  overflow-wrap: anywhere;
}

.sheet-person { font-weight: 650; color: var(--ink-soft); }
.sheet-text { color: var(--ink-soft); margin-bottom: 18px; }

.options { display: grid; gap: 8px; }

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid var(--control-line);
  border-radius: 14px;
  cursor: pointer;
  font-weight: 550;
}

.option input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  flex: none;
  accent-color: var(--chosen-fill);
}

.option:has(input:checked) { border-color: var(--chosen-fill); background: var(--brand-tint); color: var(--brand-deep); }

.search-status, .results { margin-top: 14px; }
.results:empty { margin-top: 0; }

.result-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.result { padding: 8px 0; }
.result + .result { border-top: 1px solid var(--line); }

.result-pick {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  font-weight: 400;
}

.result-pick:hover { background: var(--surface-quiet); }
.result-name { display: block; font-weight: 700; font-size: 1.0625rem; }

.result-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 0 12px;
}

.picked {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-quiet);
}

.picked-main { min-width: 0; }

/* ---- the sign-in page -------------------------------------------------------------------------------- */

.signin main { max-width: 26rem; padding-top: 12px; }

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

.panel .form-actions { margin-top: 4px; }
.panel .primary { width: 100%; min-height: 50px; }

.signin-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 14px 0 0 -10px;
}

.signin .notice { margin-bottom: 16px; }

/* ---- wider screens --------------------------------------------------------------------------------- */

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  h1 { font-size: 2.25rem; margin-bottom: 20px; }
  .cards, .pool-list { gap: 14px; }
  .card, .pool-row { padding: 20px 22px 22px 26px; }
  .row > summary { padding-left: 26px; }
  .row-body { padding-left: 26px; padding-right: 22px; }
}

/* ---- preferences ----------------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .chip-btn[aria-pressed="true"], .choice input:checked + span { outline: 3px solid CanvasText; outline-offset: -3px; }
  .card.is-done { border-left: 4px solid CanvasText; }
}
