/* Member pages: big type, one thing per screen, thumb-sized buttons. */
.member-page {
  --m-bg: #fbfaf7; --m-fg: #1d1d1b; --m-muted: #5c5b57; --m-accent: #0b5cad; --m-on-accent: #fff; --m-card: #fff; --m-line: #e6e2d8;
  --m-go: #1f7a45; --m-on-go: #fff; --m-saved: #dff2e5; --m-unsaved: #fbe4e1; --m-bad: #a8231a;
  margin: 0; min-height: 100vh; background: var(--m-bg); color: var(--m-fg);
  font: 20px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  .member-page { --m-bg: #15161a; --m-fg: #ececea; --m-muted: #b4b4b0; --m-accent: #6fb0f5; --m-on-accent: #0b1a2e; --m-card: #1d1f25; --m-line: #2b2d33; --m-go: #6cc28f; --m-on-go: #0b1f13; --m-saved: #18392a; --m-unsaved: #3e1f1c; --m-bad: #ff9b91; }
}
.member-card { max-width: 32rem; margin: 0 auto; padding: 40px 20px 64px; }
.member-page h1 { font-size: clamp(2rem, 8vw, 2.6rem); line-height: 1.15; margin: 0 0 1rem; }
.member-page p { margin: 0 0 1rem; }
/* Not a link drawn as a button: it takes .member-button's colours, as a <button> does (TW #5404, the blank blue box). */
.member-page a:not(:where(.member-button)) { color: var(--m-accent); } /* :where: the same weight as ".member-page a" */
.member-page label { display: block; font-weight: 700; margin-bottom: .4rem; }
.member-page .member-hint { color: var(--m-muted); font-size: 1rem; margin: -.2rem 0 .6rem; text-wrap: pretty; }
.member-page input[type=email], .email-request-form input[type=text], .email-request-form textarea {
  box-sizing: border-box; width: 100%; font: inherit; font-size: 1.2rem; padding: 16px; margin-bottom: 16px;
  border: 2px solid var(--m-line); border-radius: 12px; background: var(--m-card); color: var(--m-fg);
}
.member-page input[type=email]:focus, .email-request-form input[type=text]:focus, .email-request-form textarea:focus { outline: 3px solid var(--m-accent); outline-offset: 1px; border-color: var(--m-accent); }
.member-button {
  display: block; width: 100%; min-height: 64px; font: inherit; font-size: 1.3rem; font-weight: 800; cursor: pointer;
  border: 0; border-radius: 12px; background: var(--m-accent); color: var(--m-on-accent);
}
.member-button.secondary { background: transparent; color: var(--m-accent); border: 2px solid var(--m-accent); min-height: 56px; font-size: 1.1rem; }
.member-page form { margin: 0 0 1rem; }
.member-muted { color: var(--m-muted); font-size: 1rem; }

/* The newsletter Yes button's confirm page (TW #3297): what was asked, then
   one giant gold button, the newsletter's gold. */
.join-asked { background: var(--m-card); border: 2px solid var(--m-line); border-radius: 14px; padding: 14px 16px; margin: 0 0 1.25rem; }
.join-asked p { margin: 0; }
.join-asked .member-muted { margin-bottom: .25rem; }
.join-asked-subject { font-weight: 700; text-wrap: pretty; }
/* Signed in on the sign-in page (TW #3344): the homepage's gold. */
.member-button.enter-members { background: #f6b62b; color: #121726; }
.member-button.join-confirm { min-height: 96px; padding: 16px 20px; font-size: 1.45rem; line-height: 1.25; background: #f6b62b; color: #121726; }
.join-close { text-align: center; }

/* The emailed link's page signs in by itself (TW #3233): "Signing you in…" first,
   the Sign me in button only if that hasn't happened within a few seconds. */
.signing-in { font-size: 1.2rem; font-weight: 700; }
.sign-in-fallback { animation: sign-in-fallback 0s 4s both; }
@keyframes sign-in-fallback { from { visibility: hidden; height: 0; overflow: hidden; } }
.member-alert { background: #fdecea; color: #8a1c13; padding: 14px 16px; border-radius: 12px; font-size: 1.05rem; }
.member-flash, .member-page .notice { background: #e8f3ec; color: #1f5c38; padding: 14px 16px; border-radius: 12px; font-size: 1.05rem; }

/* Task lists: one card per task, a thumb-sized Done button on the right. */
.member-page h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
.task-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.task-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; margin-bottom: 10px;
  background: var(--m-card); border: 2px solid var(--m-line); border-radius: 14px;
}
.task-card.is-overdue { border-color: #c0392b; }
.task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task-title { font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; }
.task-due { color: var(--m-muted); font-size: .95rem; }
.is-overdue .task-due { color: #c0392b; font-weight: 700; }
.task-notes { color: var(--m-muted); font-size: .95rem; }
.task-card form { margin: 0; }
.task-button {
  min-width: 88px; min-height: 56px; font: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer;
  border: 0; border-radius: 12px; background: var(--m-accent); color: var(--m-on-accent);
}
.task-button.undo { background: transparent; color: var(--m-muted); border: 2px solid var(--m-line); font-weight: 600; font-size: .95rem; }
.task-card.is-done .task-title { text-decoration: line-through; color: var(--m-muted); font-weight: 600; }
.teammate { border-top: 2px solid var(--m-line); padding: 12px 0; }
.teammate summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: 1.15rem; min-height: 44px; align-items: center; }
.teammate-name { font-weight: 700; }
.teammate-count { color: var(--m-muted); }
.teammate .task-list { margin-top: 10px; }
.sign-out { margin-top: 2.5rem; }

/* Resource requests (TW #3134): the form, the folder and the upload box. */
.request-form input[type=text], .request-form input[type=email], .request-form input[type=date],
.request-form select, .request-form textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 1.1rem; padding: 12px 14px; margin: 0 0 1.1rem;
  border: 2px solid var(--m-line); border-radius: 12px; background: var(--m-card); color: var(--m-fg);
}
.request-form :is(input, select, textarea):focus { outline: 3px solid var(--m-accent); outline-offset: 1px; border-color: var(--m-accent); }
.request-form fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.request-form legend { font-weight: 700; margin-bottom: .4rem; }
.member-page label.request-choice { display: flex; gap: .6rem; align-items: center; font-weight: 400; margin: 0 0 .6rem; min-height: 44px; }
.request-choice input { width: 1.3rem; height: 1.3rem; }
.request-summary { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0 0 1.5rem; }
.request-summary dt { font-weight: 700; }
.request-summary dd { margin: 0; overflow-wrap: anywhere; }
.request-list, .request-file-list, .request-upload-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.request-list li, .request-file-list li, .request-upload-list li { padding: .7rem 0; border-bottom: 1px solid var(--m-line); overflow-wrap: anywhere; }
.request-list .member-muted, .request-file-list .member-muted { display: block; font-size: .95rem; }
.request-file-list form { display: inline; margin: 0; }
.request-delete, .request-upload-button {
  font: inherit; font-size: .95rem; min-height: 44px; padding: 0 14px; margin-top: .3rem; margin-right: .4rem;
  border-radius: 10px; border: 2px solid var(--m-accent); background: transparent; color: var(--m-accent); cursor: pointer;
}
.request-drop {
  display: block; text-align: center; padding: 28px 16px; margin: 0 0 1rem; border: 3px dashed var(--m-line);
  border-radius: 16px; cursor: pointer; font-weight: 700; color: var(--m-accent);
}
.request-drop.is-over { border-color: var(--m-accent); background: var(--m-card); }
.request-drop input { display: block; margin: 12px auto 0; max-width: 100%; font-size: 1rem; }
.request-upload-list progress { display: block; width: 100%; height: 10px; margin: .4rem 0; }
.request-upload-name { font-weight: 700; display: block; }
.request-upload-state { display: block; color: var(--m-muted); }
.request-upload-list li[data-state=done] .request-upload-state { color: #1f7a45; font-weight: 700; }
.request-upload-list li[data-state=refused] .request-upload-state { color: #b3261e; }
.request-actions { display: flex; flex-direction: column; gap: .6rem; margin: 1.5rem 0; }
.request-actions form { margin: 0; }
a.member-button { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* Requests to email all members (TW #3138). */
.email-request-form textarea { font-size: 1.05rem; line-height: 1.45; resize: vertical; }
.email-request-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.email-request-card {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; margin-bottom: 10px;
  background: var(--m-card); border: 2px solid var(--m-line); border-radius: 14px;
}
.email-request-outcome { color: var(--m-muted); font-size: 1rem; }
.email-request-card.is-declined { border-color: #c0392b; }
.email-request-card.is-sent .email-request-outcome, .email-request-card.is-approved .email-request-outcome { color: var(--m-accent); }

/* A task's documents (TW #3238): one link per line, under the notes. */
.task-documents { list-style: none; margin: .35rem 0 .6rem; padding: 0; }
.task-documents li { margin: .2rem 0; }
.task-documents a { font-weight: 600; }

/* Ask someone (TW #3293): More options, the call-them note, the lines so far. */
.request-more { margin: 0 0 1.25rem; }
.request-more summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.request-call { margin: 0 0 1.25rem; padding: 14px 16px; border-radius: 12px; background: #fff4e0; color: #6b4300; font-weight: 700; }
.request-messages { margin: 1.5rem 0; }
.request-turn { margin: 0 0 1.25rem; padding: 14px 16px; border-radius: 12px; background: #e8f1fb; color: #0b3d75; font-weight: 700; }
.request-turn.is-yours { background: #e6f6ea; color: #14532d; }
.request-reply { margin: 0 0 1.5rem; }
@media (prefers-color-scheme: dark) {
  .request-turn { background: #13263d; color: #cfe3fa; }
  .request-turn.is-yours { background: #12301f; color: #c9efd6; }
  .request-call { background: #3a2a10; color: #f6dfb4; }
}

/* A member's settings (TW #4377): each choice a big, easy target. */
.member-settings fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.member-settings legend { font-size: 1.2rem; font-weight: 800; margin-bottom: .25rem; }
.member-choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; margin: 0 0 8px;
  border: 2px solid var(--m-line); border-radius: 12px; font-size: 1.1rem; cursor: pointer; }
.member-choice input { width: 22px; height: 22px; flex: none; }
.member-choice:has(input:checked) { border-color: var(--m-accent); }
/* Per room, with an example under each (TW #4427), and quiet hours (TW #4424). TW #4448 (Steve's pick B):
   each room's name in a solid band that folds it, each setting its own box (blue edge when on, grey when
   off), its picker and example inside under a thin line, each label beside its picker. One look for
   every picker, as tall as a finger. Off greys what's under it (still changeable, kept for later). */
.settings-intro { margin: 0 0 1.75rem; }
.settings-intro p { margin: 0 0 .75rem; }
.settings-intro ul { margin: 0 0 .75rem; padding-left: 1.2em; }
.settings-intro li { margin: 0 0 .45rem; }
.settings-email { overflow-wrap: anywhere; }
.settings-room, .settings-group { margin: 0 0 2rem; scroll-margin-top: 84px; } /* clear of the sticky menu bar */
.settings-room h2, .settings-group h2 { margin: 0 -16px 14px; font-size: 1.3rem; }
.settings-fold { display: flex; align-items: center; gap: .4em; width: 100%; min-height: 52px; padding: 12px 16px; border: 0; border-radius: 0;
  font: inherit; font-weight: 800; text-align: left; color: var(--m-on-accent); background: var(--m-accent); cursor: pointer; }
.settings-fold::after { content: ""; margin-left: auto; width: 10px; height: 10px; border: solid currentColor; border-width: 0 3px 3px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform .2s; } /* ▾ open, ▸ folded */
.settings-fold[aria-expanded=false]::after { transform: rotate(-45deg); }
.settings-fold:focus-visible { outline: 3px solid var(--m-fg); outline-offset: 2px; }
.settings-units { display: flex; flex-direction: column; gap: 14px; }
.settings-units[hidden] { display: none; }
.settings-unit { border: 2px solid var(--m-line); border-radius: 14px; background: var(--m-card); }
.settings-unit:has(> .settings-head input:checked) { border-color: var(--m-accent); }
.member-settings .settings-head .member-choice { border: 0; margin: 0; padding: 12px 14px; min-height: 52px; font-weight: 700; }
.member-settings .settings-head .member-choice input { align-self: flex-start; margin-top: 2px; }
.settings-body { margin: 0 14px; padding: 12px 0 14px 34px; border-top: 1px solid var(--m-line); }
.settings-unit:not(.settings-once, .settings-always, :has(> .settings-head input:checked)) > .settings-body { opacity: .45; }
.settings-unit:not(.settings-once, .settings-always, :has(> .settings-head input:checked)) > .settings-body .settings-example { text-decoration: line-through; text-decoration-thickness: 1px; }
/* New chats (TW #4579): a line on what they are; "Use these for all my chats too" is done once on Save, not a setting,
   so its box is dashed and its note never greys out. */
.member-settings .settings-lead { margin: 0; color: var(--m-muted); }
.settings-unit.settings-once { border-style: dashed; }
.settings-once-button { display: block; width: 100%; min-height: 52px; padding: 12px 14px; border: 0; border-radius: 12px; background: none; color: var(--m-accent);
  font: inherit; font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.settings-once-button:focus-visible { outline: 3px solid var(--m-fg); outline-offset: -3px; }
/* Your daily email (TW #4688, Steve's pick: four buttons). Always on, so never dimmed; its time on the fe-picker, then
   the four choices two by two and, under "I'll pick the days" only, a button for each day (CSS, no JavaScript needed). */
.settings-unit.settings-always { border-color: var(--m-accent); }
.member-settings .settings-label { display: block; margin: 0; padding: 12px 14px; min-height: 52px; font-weight: 700; }
.daily-time .fe-picker-wrapper { flex: 0 1 12rem; }
.daily-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.member-settings .daily-preset { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 0;
  padding: 4px 12px; border: 2px solid var(--m-line); border-radius: 12px; background: var(--m-card); font-size: 1rem; font-weight: 700;
  text-align: center; line-height: 1.2; cursor: pointer; }
.daily-preset input, .daily-day input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.member-settings .daily-preset:has(input:checked) { border-color: var(--m-accent); background: var(--m-accent); color: var(--m-on-accent); }
.daily-preset:has(input:focus-visible), .daily-day:has(input:focus-visible) { outline: 3px solid var(--m-fg); outline-offset: 2px; }
.daily-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.daily-days-unit:not(:has(input[value=pick]:checked)) .daily-days { display: none; }
.member-settings .daily-day { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 0;
  border: 2px solid var(--m-line); border-radius: 10px; background: var(--m-card); font-size: .88rem; font-weight: 800; cursor: pointer; }
.member-settings .daily-day:has(input:checked) { border-color: var(--m-accent); background: var(--m-accent); color: var(--m-on-accent); }
@media (min-width: 768px) { .daily-days { grid-template-columns: repeat(7, 3.4rem); } }
/* New chat notifications (TW #4942): a row per kind of message, its setting in words and a small Change, which opens
   the row's dialog (the chat's priority help's look, .important-help) of choices; High/urgent priority a plain line.
   Nesting is shown by indent and lines, never a thick rule down the left (the banned callout look). */
.notify-rows { display: grid; gap: 10px; }
.notify-row { display: grid; gap: 6px; padding: 12px 14px; border: 2px solid var(--m-line); border-radius: 12px; background: var(--m-card); position: relative; }
.notify-kind { font-size: 1.05rem; font-weight: 800; line-height: 1.25; }
.notify-now { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notify-value { font-size: 1.05rem; }
.notify-note { display: block; font-size: .9rem; color: var(--m-muted); }
.notify-change { flex: none; font: inherit; font-size: .98rem; font-weight: 700; min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 2px solid var(--m-accent); background: transparent; color: var(--m-accent); cursor: pointer; }
.notify-row > .autosave-note { top: 8px; bottom: auto; } /* clear of Change */
.notify-change:focus-visible { outline: 3px solid var(--m-fg); outline-offset: 2px; }
.member-settings .notify-fixed { margin: 14px 0 0; font-size: 1rem; }
.member-settings .notify-per-chat { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--m-line); font-size: 1rem; }
.notify-dialog { max-height: calc(100vh - 32px); overflow: auto; }
.member-page .notify-dialog p.notify-hint { margin: 0 0 12px; font-size: .98rem; color: var(--m-muted); }
.notify-choices { display: grid; gap: 6px; margin-bottom: 12px; }
.notify-choice { position: relative; display: block; margin: 0; padding: 8px 12px 8px 46px; min-height: 44px; box-sizing: border-box;
  border: 2px solid var(--m-line); border-radius: 12px; cursor: pointer; font-weight: 400; }
.notify-choice input { position: absolute; left: 14px; top: 11px; width: 20px; height: 20px; margin: 0; accent-color: var(--m-accent); }
.notify-choice b { display: block; font-size: 1.05rem; font-weight: 800; line-height: 1.3; }
.notify-choice span { display: block; margin-top: 2px; font-weight: 400; font-size: .92rem; color: var(--m-muted); line-height: 1.35; }
.notify-choice:has(input:checked) { border-color: var(--m-accent); box-shadow: inset 0 0 0 1px var(--m-accent); }
.notify-choice:has(input:focus-visible) { outline: 3px solid var(--m-fg); outline-offset: 2px; }
.member-settings .cq-rules { margin: 12px 0 0; font-size: .95rem; color: var(--m-muted); font-style: italic; }
.cq-back { margin: 0 0 .5rem; font-size: 1rem; }
.member-page .cq-lead { color: var(--m-muted); }
.member-page .cq-note { margin-top: 1rem; font-size: .95rem; color: var(--m-muted); }
/* Saved the moment it changes (TW #4862, the autosave controller): the card turns soft green for a moment with
   "Saved ✓" in its lower right, both fading; red with what went wrong if it didn't save. Without motion, just the words. */
.settings-unit { position: relative; }
.autosave-note { position: absolute; right: 10px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: inherit;
  font-size: .85rem; font-weight: 700; line-height: 1.3; color: var(--m-go); opacity: 0; pointer-events: none; }
.autosave-unsaved > .autosave-note { color: var(--m-bad); }
.autosave-saved { animation: autosave-saved var(--autosave-shown, 1.6s) ease-out; }
.autosave-unsaved { animation: autosave-unsaved var(--autosave-shown, 3.2s) ease-out; }
:is(.autosave-saved, .autosave-unsaved) > .autosave-note { animation: autosave-note var(--autosave-shown, 1.6s) ease-in forwards; }
@keyframes autosave-saved { 0%, 40% { background-color: var(--m-saved); } 100% { background-color: var(--m-card); } }
@keyframes autosave-unsaved { 0%, 70% { background-color: var(--m-unsaved); } 100% { background-color: var(--m-card); } }
@keyframes autosave-note { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .autosave-saved, .autosave-unsaved, :is(.autosave-saved, .autosave-unsaved) > .autosave-note { animation: none; }
  :is(.autosave-saved, .autosave-unsaved) > .autosave-note { opacity: 1; background: var(--m-card); }
}
.settings-detail { font-size: 1rem; font-weight: 600; color: var(--m-muted); margin: 0; white-space: nowrap; }
.settings-pick { display: flex; align-items: center; gap: 10px; }
.settings-select { flex: 1 1 auto; min-width: 0; min-height: 52px; font: inherit; font-size: 1.05rem; padding: 10px 40px 10px 14px; color: inherit;
  appearance: none; -webkit-appearance: none; border: 2px solid var(--m-line); border-radius: 12px; background: var(--m-card) no-repeat right 14px center / 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='2' fill='none'/%3E%3C/svg%3E"); }
.settings-example { font-size: .95rem; color: var(--m-muted); margin: 8px 0 0; font-style: italic; }
.settings-body > .settings-example:first-child { margin-top: 0; }
.settings-times { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.settings-times .fe-picker-wrapper { flex: 1 1 0; min-width: 0; }
/* The time boxes match the pickers above; no ▾, which won't fit beside the time on a phone. */
.member-settings .fe-picker-display { min-height: 52px; padding: 10px 6px; font-size: 1.05rem; white-space: nowrap; justify-content: center; text-align: center;
  border: 2px solid var(--m-line); border-radius: 12px; background: var(--m-card); }
.member-settings .fe-picker-display::after { content: none; }

/* A captain sets how to reach a teammate (TW #3043). */
.teammate-channel { margin: 10px 0 6px; }
.channel-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 8px; }
.channel-form label { margin: 6px 0 0; font-size: 1rem; }
.channel-form select, .channel-form input[type=text] {
  box-sizing: border-box; width: 100%; min-height: 48px; font: inherit; font-size: 1.05rem; padding: 8px 12px;
  border: 2px solid var(--m-line); border-radius: 12px; background: var(--m-card); color: var(--m-fg);
}
.channel-form select:focus, .channel-form input[type=text]:focus { outline: 3px solid var(--m-accent); outline-offset: 1px; border-color: var(--m-accent); }
.channel-form .member-button { margin-top: 6px; }

/* TW #8508: a member's OK of their mailing: "Would you rather write your own?" opens in place. */
.sender-ok-own { margin: 1.25rem 0; border: 2px solid var(--m-line); border-radius: 14px; padding: 12px 16px; background: var(--m-card); }
.sender-ok-own summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; min-height: 44px; display: flex; align-items: center; }
.sender-ok-own[open] summary { margin-bottom: .5rem; }
.sender-ok-own .member-button { margin-top: .75rem; }
.sender-ok-words p + p { margin-top: .75em; }
.email-request-form textarea.sender-ok-opening { min-height: 0; }
