/* Club Minutes. Every colour is a variable: light by default, dark when the device prefers it or the
   member picks it (name menu → Theme; saved in the browser as data-theme on <html>). */
:root {
  color-scheme: light;
  --bg: #eff5f7; --surface: #ffffff; --surface-2: #edf3f6; --surface-3: #dee8f0; --ink: #1f3a93;
  --border: #d7e1e5; --border-strong: #bfccd4; --text: #161a20; --muted: #545e68; --faint: #79848e;
  --accent: #234976; --accent-strong: #182c41; --accent-soft: #d7e4f1; --accent-text: #192760;
  --btn-bg: #182c41; --btn-text: #ffffff; --btn-hover: #23405f;
  --danger: #b3261e; --danger-soft: #fbe4e2; --danger-text: #8c1d18;
  --warn-soft: #fff1c9; --warn-text: #6a4a00; --warn-edge: #d9a520;
  --info-soft: #e3e8f3;
  --nav-bg: #15283e; --nav-text: #e0edf6; --nav-hover: rgba(255, 255, 255, .12); --nav-on: rgba(255, 255, 255, .2);
  --focus: rgba(39, 85, 130, .28); --mark: #fbe58a; --sheet-h: #95c0dc;
  --inperson-bg: #dcebc4; --inperson-edge: #7da04a; --online-bg: #d6e4f7; --online-edge: #5a86c4;
  --chart-1: #2a78d6; --chart-2: #eb6834; --chart-3: #1baf7a; --chart-4: #eda100; --chart-5: #e87ba4; --chart-6: #008300; --chart-7: #6250d6; --chart-8: #e34948;  /* chart series, checked for colour blindness */
  --shadow: 0 1px 2px rgba(20, 30, 10, .06), 0 4px 16px rgba(20, 30, 10, .05);
  --shadow-pop: 0 10px 30px rgba(20, 30, 10, .18);
  --radius: .8rem; --radius-sm: .55rem;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101014; --surface: #16191f; --surface-2: #1c1f26; --surface-3: #242932; --ink: #a9c1ff;
  --border: #282d36; --border-strong: #373f4c; --text: #dae4ec; --muted: #94a0ad; --faint: #717b88;
  --accent: #5f95ce; --accent-strong: #82aee1; --accent-soft: #162435; --accent-text: #82aee1;
  --btn-bg: #5f95ce; --btn-text: #0c1117; --btn-hover: #80abde;
  --danger: #ff8a80; --danger-soft: #3b1e1b; --danger-text: #ffb4ab;
  --warn-soft: #3a3116; --warn-text: #f2d68c; --warn-edge: #b38a1c;
  --info-soft: #23304a;
  --nav-bg: #11151c; --nav-text: #d4e1ec; --nav-hover: rgba(255, 255, 255, .08); --nav-on: rgba(255, 255, 255, .14);
  --focus: rgba(95, 149, 206, .3); --mark: #6b5a12; --sheet-h: #1d314880;
  --inperson-bg: #2c3d1c; --inperson-edge: #7da04a; --online-bg: #1e2f47; --online-edge: #5a86c4;
  --chart-1: #3987e5; --chart-2: #d95926; --chart-3: #199e70; --chart-4: #c98500; --chart-5: #d55181; --chart-6: #008300; --chart-7: #9085e9; --chart-8: #e66767;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-pop: 0 10px 30px rgba(0, 0, 0, .55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101014; --surface: #16191f; --surface-2: #1c1f26; --surface-3: #242932; --ink: #a9c1ff;
    --border: #282d36; --border-strong: #373f4c; --text: #dae4ec; --muted: #94a0ad; --faint: #717b88;
    --accent: #5f95ce; --accent-strong: #82aee1; --accent-soft: #162435; --accent-text: #82aee1;
    --btn-bg: #5f95ce; --btn-text: #0c1117; --btn-hover: #80abde;
    --danger: #ff8a80; --danger-soft: #3b1e1b; --danger-text: #ffb4ab;
    --warn-soft: #3a3116; --warn-text: #f2d68c; --warn-edge: #b38a1c;
    --info-soft: #23304a;
    --nav-bg: #11151c; --nav-text: #d4e1ec; --nav-hover: rgba(255, 255, 255, .08); --nav-on: rgba(255, 255, 255, .14);
    --focus: rgba(95, 149, 206, .3); --mark: #6b5a12; --sheet-h: #1d314880;
    --inperson-bg: #2c3d1c; --inperson-edge: #7da04a; --online-bg: #1e2f47; --online-edge: #5a86c4;
    --chart-1: #3987e5; --chart-2: #d95926; --chart-3: #199e70; --chart-4: #c98500; --chart-5: #d55181; --chart-6: #008300; --chart-7: #9085e9; --chart-8: #e66767;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-pop: 0 10px 30px rgba(0, 0, 0, .55);
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
body { margin: 0; font: 15.5px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
main { max-width: 68rem; margin: 1.8rem auto 3rem; padding: 0 1.1rem; }
h1 { font-size: 1.75rem; letter-spacing: -.015em; margin: .2rem 0 .8rem; }
h2 { font-size: 1.2rem; letter-spacing: -.01em; margin: 1.6rem 0 .6rem; } h3 { font-size: 1.02rem; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }  /* a soft underline: still clearly a link */
a:hover { color: var(--accent); text-decoration-color: currentColor; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .hint { color: var(--muted); font-size: .88rem; }
.cs { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
mark { background: var(--mark); color: inherit; border-radius: .2rem; padding: 0 .1rem; }
code { background: var(--surface-3); border-radius: .3rem; padding: .05rem .35rem; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--border); }

/* form fields everywhere */
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=url], input[type=date], input[type=time], input[type=number], input[type=password], input:not([type]),
select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: .45rem .65rem; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
fieldset { min-width: 0; }  select { max-width: 100%; }  /* long option text ("Every year on the 1st Thursday of January") mustn't widen a phone page */
/* Keyboard focus: a solid ring everywhere (the halo alone was faint) */
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 1.5rem; height: 1.5rem; }
textarea { resize: vertical; line-height: 1.45; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .35rem; background: var(--btn-bg); color: var(--btn-text);
  padding: .45rem .95rem; border-radius: var(--radius-sm); text-decoration: none; font-weight: 500; border: 1px solid transparent;
  transition: background .15s, border-color .15s; }
.btn:hover { background: var(--btn-hover); color: var(--btn-text); }
.btn.ghost { background: transparent; color: var(--accent-text); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
button.btn { cursor: pointer; font: inherit; font-weight: 500; } .btn.small { padding: .25rem .65rem; font-size: .86rem; }
.btn.big { display: flex; justify-content: center; width: 100%; padding: .8rem; font-size: 1.05rem; cursor: pointer; }
.btn:disabled, .btn:disabled:hover { opacity: .5; cursor: not-allowed; background: var(--btn-bg); }  /* off: dimmed, no hover */
.btn.ghost:disabled, .btn.ghost:disabled:hover { background: transparent; border-color: var(--border-strong); }
.btn.warn { background: #8a3b12; color: #fff; }
.btn.ghost.danger { color: var(--danger-text); border-color: var(--danger); } .btn.ghost.danger:hover { background: var(--danger-soft); }  /* can't be undone: Discard draft */
button.act { font: inherit; font-size: .86rem; padding: .25rem .8rem; border: 1px solid var(--border-strong); border-radius: 1rem;
  background: var(--surface); color: var(--text); cursor: pointer; transition: background .15s; }
button.act:hover { background: var(--accent-soft); } button.act.on { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
button.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .85rem; padding: 0 .2rem; }
button.linkbtn:hover { color: var(--danger); } button.linkbtn.more { color: var(--accent-text); margin-bottom: .2rem; }

/* badges, chips, messages */
.badge { font-size: .74rem; font-weight: 600; padding: .08rem .5rem; border-radius: 1rem; background: var(--info-soft); color: var(--text); }
.badge.warn { background: var(--warn-soft); color: var(--warn-text); } button.badge.open { border: 0; cursor: pointer; font-family: inherit; text-align: left; line-height: 1.3; }  /* Guests: the step opens the guest's application window */
.chip { display: inline-flex; align-items: center; gap: .25rem; background: var(--surface-3); border-radius: 1rem; padding: .12rem .65rem; font-size: .84rem; }
.chip a { color: inherit; text-decoration: none; } .chip a:hover { text-decoration: underline; }
.chip.late { background: var(--danger-soft); color: var(--danger-text); font-weight: 600; } .chip.warn { background: var(--warn-soft); color: var(--warn-text); }
.chip.ok { background: var(--accent-soft); color: var(--accent-text); }
.msg { padding: .7rem .9rem; border-radius: var(--radius-sm); text-align: left; border: 1px solid transparent; }
.msg.ok { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.msg.err { background: var(--danger-soft); color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.msg.warn { background: var(--warn-soft); color: var(--warn-text); border-color: var(--warn-edge); }
.note { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .95rem; line-height: 1.4; }
.note.ok { background: var(--accent-soft); } .note.err { background: var(--danger-soft); color: var(--danger-text); }
.missed { color: var(--danger); }

/* ---------- top bar ---------- */
nav.top { position: sticky; top: 0; z-index: 30; display: flex; gap: .25rem; align-items: center; padding: .5rem 1.1rem;
  background: var(--nav-bg); flex-wrap: wrap; box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
nav.top a { color: var(--nav-text); text-decoration: none; padding: .35rem .62rem; border-radius: .5rem; font-size: .95rem; transition: background .15s; }
nav.top a:hover { background: var(--nav-hover); } nav.top a.on { background: var(--nav-on); box-shadow: inset 0 -2px 0 var(--accent); }
nav.top .brand { font-weight: 700; display: flex; align-items: center; gap: .5rem; margin-right: .8rem; padding-left: 0; font-size: 1.02rem; }
nav.top .brand:hover { background: none; } nav.top .brand img { width: 30px; }
nav.top input[type=search] { padding: .38rem .8rem; border-radius: 2rem; border: 1px solid transparent; width: 13rem;
  background: rgba(255, 255, 255, .92); color: #1b1f17; }
nav.top .menu { position: relative; margin-left: .4rem; }
nav.top .menu summary { list-style: none; cursor: pointer; color: var(--nav-text); }
nav.top .menu summary::-webkit-details-marker { display: none; }
nav.top .me { background: var(--nav-on); padding: .3rem .8rem; border-radius: 2rem; font-weight: 500; }
nav.top .drop { position: absolute; right: 0; top: 2.4rem; z-index: 40; min-width: 13rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: .35rem; }
nav.top .drop a, nav.top .drop button { display: block; width: 100%; padding: .5rem .8rem; color: var(--text); text-align: left;
  background: none; border: 0; font: inherit; cursor: pointer; border-radius: .45rem; font-size: .93rem; }
nav.top .drop a:hover, nav.top .drop button:hover { background: var(--accent-soft); }
nav.top .drop form { margin: 0; } nav.top .drop .sep { border-top: 1px solid var(--border); margin: .3rem .2rem; }
nav.top .drop .themes { display: flex; gap: .25rem; padding: .3rem .5rem .4rem; align-items: center; font-size: .85rem; color: var(--muted); }
nav.top .drop .themes button { width: auto; flex: 1; text-align: center; padding: .3rem .4rem; border: 1px solid var(--border); font-size: .82rem; }
nav.top .drop .themes button.on { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.preview { background: var(--warn-soft); color: var(--warn-text); border-bottom: 1px solid var(--warn-edge); padding: .45rem 1rem; font-size: .9rem; text-align: center; }
.preview a { color: inherit; }
.preview.stage { background: #0b4f6c; color: #fff; border-color: #0b4f6c; }  /* staging server: not to be mistaken for the live app */
.adminbar { background: #8b1d1d; color: #fff; padding: .45rem 1rem; font-size: .9rem; text-align: center; }
.adminbar.viewas { background: #4b2a7a; } .adminbar a.updlink { color: #fff; font-weight: 600; margin-left: .6rem; }
.adminbar form { display: inline; margin-left: .6rem; }
.adminbar button { font: inherit; font-size: .85rem; padding: .12rem .7rem; border-radius: 1rem; border: 1px solid rgba(255, 255, 255, .8); background: transparent; color: #fff; cursor: pointer; }

/* ---------- tables: rounded, striped ---------- */
table.list { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: .4rem 0 1rem; }
.list th, .list td { padding: .6rem .85rem; text-align: left; border-bottom: 1px solid var(--border); }
.list thead th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.list tbody tr:nth-child(even) td { background: var(--surface-2); }
.list tbody tr:hover td { background: var(--accent-soft); }
.list tbody tr:last-child td { border-bottom: 0; }
.list.ticks { width: fit-content; max-width: 100%; display: block; overflow-x: auto; margin: .3rem 0 .4rem; }  /* a grid question: as wide as its columns, rows a tick high; scrolls inside on a narrow phone */
.list.ticks :is(th, td) { padding: .2rem .35rem; } .list.ticks td { text-align: center; } .list.ticks input { margin: 0; }
.list.ticks thead th { text-transform: none; letter-spacing: 0; font-size: .8rem; } .list.ticks tbody tr:nth-child(even) th { background: var(--surface-2); } .list.ticks tbody tr:hover th { background: var(--accent-soft); }
.list .nw { white-space: nowrap; } .list td.wrap { overflow-wrap: anywhere; }
code.wrap { overflow-wrap: anywhere; }
.sitesec select { max-width: 100%; }
button.chip { border: 0; cursor: pointer; font: inherit; font-size: .84rem; color: inherit; }
.list .n { text-align: right; font-variant-numeric: tabular-nums; }
.list td a { text-decoration: none; font-weight: 500; } .list td a:hover { text-decoration: underline; }
th.asc::after { content: " ▲"; } th.desc::after { content: " ▼"; } .list thead th { cursor: pointer; user-select: none; }
tr.yearrow th { text-align: left; padding: .9rem .85rem .45rem; font-size: 1rem; background: var(--surface); color: var(--accent-text);
  border-bottom: 2px solid var(--border-strong); text-transform: none; letter-spacing: 0; }
.list tbody tr.yearrow:hover th { background: var(--surface); }

/* page furniture */
.headrow { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.headrow h1, .headrow h2 { margin-bottom: .4rem; }
.filter { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; font-size: .92rem; color: var(--muted); }
.filter select { padding: .3rem .55rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; }  /* minutes page: Download PDF, View original */
.pager { display: flex; gap: .75rem; align-items: center; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; } @media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
.row { display: flex; gap: .5rem; flex-wrap: wrap; }
.videoguests { margin-top: .9rem; align-items: center; }  /* console Attendance: video guests, clear of the guest cards above */
[hidden] { display: none !important; }  /* .btn's display: inline-flex would otherwise show hidden buttons */
.ip { word-break: break-all; }  /* IPv6 addresses wrap instead of widening the table */
nav.tabs { display: flex; gap: .25rem; margin: .4rem 0 1.2rem; flex-wrap: wrap; background: var(--surface-3); padding: .25rem;
  border-radius: .7rem; width: fit-content; max-width: 100%; }
nav.tabs a { padding: .4rem .9rem; border-radius: .5rem; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .93rem; }
nav.tabs a:hover { color: var(--text); } nav.tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }

/* search results, lists of links */
.results { list-style: none; padding: 0; } .results > li { padding: .8rem 1rem; margin: .5rem 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.results > li p { margin: .25rem 0; } .results > li ul, .results > li ol { margin: .2rem 0; padding-left: 1.3rem; }  /* a report's own paragraphs and lists (a member's page), not cards */
.pagesearch { display: none; } .pagesearch input { width: 100%; border-radius: 2rem; }  /* phones: the bar's search is behind ☰ */
.results .sec { font-size: .8rem; color: var(--muted); margin: 0 .4rem; }
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.linkcard { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.3rem .8rem; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none;
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.linkcard:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.linkcard .ico { width: 2.6rem; height: 2.6rem; color: var(--accent); } .linkcard .label { font-weight: 600; }
.linkcard .host { font-size: .8rem; color: var(--muted); word-break: break-all; }

/* sign in */
.login { max-width: 25rem; margin: 3rem auto; padding: 2rem 1.8rem; text-align: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 1rem; box-shadow: var(--shadow); }
.login .loginlogo { width: 96px; }
.login h1 { font-size: 1.55rem; margin: .7rem 0 1.4rem; }
.login form { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; }
.login label { font-weight: 600; } .login input[type=email] { text-align: center; width: 100%; padding: .65rem .75rem; }
.login.apply { text-align: left; max-width: 56rem; } .login.apply .loginlogo, .login.apply h1 { display: block; margin-left: auto; margin-right: auto; text-align: center; }  /* a long form reads left-aligned */
.login.apply input:not([type=checkbox]):not([type=radio]), .login.apply select, .login.apply textarea { width: 100%; text-align: left; }
/* the signature box: the typed name in ink on a signing line, an x before it, as on a paper form */
.login.apply .sigline { display: flex; align-items: baseline; gap: .5rem; border-bottom: 2px solid var(--text); margin-top: .3rem; padding: 0 .3rem; }
.login.apply .sigline .x { font-size: 1.3rem; color: var(--muted); }
.login.apply form.profile .sigline input[name=signature] { border: 0; border-radius: 0; background: transparent; box-shadow: none; height: auto; padding: .3rem 0;
  font: italic 1.6rem Georgia, "DejaVu Serif", serif; color: var(--ink); }  /* ink: a signature, in each theme */
.login.apply .sigline:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.login.apply .sigline input[name=signature]:focus { outline: none; }
.sigfonts { margin: .3rem 0 .8rem; } .sigfonts > summary { width: fit-content; cursor: pointer; color: var(--accent-text); font-size: .9rem; } .sigfonts fieldset { margin-top: .4rem; }  /* under the signature line: the styles, folded */
.check [class^="sf-"] { padding: 0 .3rem; } .check [class^="sf-"] + .muted { margin-left: .5rem; }  /* a signature style and its name */
textarea.grow { width: 100%; field-sizing: content; min-height: 3.4em; }  /* grows with its words (older browsers: two rows, resizable) */
.req { color: var(--danger-text); font-weight: 700; margin-left: .15rem; }  /* the form's * on a required detail */
@media (min-width: 48rem) {  /* desktop: short fields share a row; phones keep one column */
  .login.apply form.profile { max-width: none; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1rem; align-items: start; }
  .login.apply form.profile :is(input:not([type=checkbox]):not([type=radio]), select) { box-sizing: border-box; height: 2.6rem; padding: .45rem .65rem; }  /* boxes side by side match (the sign-in page's email box is bigger) */
  .login.apply form.profile > .half { grid-column: span 6; margin: .9rem 0 0; }  /* a question ticked Half width */
  .login.apply form.profile > .half:has(table.ticks) { grid-column: 1 / -1; }
  .login.apply form.profile > * { grid-column: 1 / -1; } .login.apply form.profile > label { margin: .9rem 0 0; }
  .login.apply form.profile > label:is(:has([name=callsign]), :has([name=first_licensed]), :has([name=license_class]), :has([name=expires]), :has([name=state]), :has([name=zip])) { grid-column: span 3; }
  .login.apply form.profile > label:is(:has([name=city]), :has([name=phone]), :has([name=email])) { grid-column: span 6; }
}
@media (min-width: 64rem) { .login.apply form.profile > .half:has(table.ticks) { grid-column: span 6; grid-row: span 3; } }  /* a grid that fits half (club.grid_fits), up to three questions stacked beside it */
.login .help { color: var(--muted); font-size: .85rem; margin-bottom: .3rem; } .login .small { margin-top: 1.6rem; }
.or { color: var(--faint); margin: 1rem 0; }

/* account, profile, about, member pages */
.rename { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; } .rename .pkname { flex: 1 1 6rem; } .rename input { flex: 1 1 8rem; min-width: 0; padding: .25rem .45rem; }
.about dl, .contactcard { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; }
.about dt, .contactcard dt { color: var(--muted); } .about dd, .contactcard dd { margin: 0; min-width: 0; overflow-wrap: anywhere; } .contactcard dd.address { white-space: pre-line; }
.changelog h2, .changelog h3 { font-size: 1rem; margin: .8rem 0 .3rem; } .changelog li { margin: .2rem 0; }
.changelog details { border-bottom: 1px solid var(--border, #dde); padding: .4rem 0; } .changelog summary { cursor: pointer; }
.changelog pre, .deploynotes pre, .guide pre { overflow-x: auto; max-width: 100%; }  /* a long command scrolls inside its box on a phone */
.guide { overflow-wrap: break-word; } .guide code, .minutes.guide a { overflow-wrap: anywhere; word-break: normal; }  /* long paths and inline code wrap; words only if they must */
a[target="_blank"]:not([class])::after { content: "\00a0↗"; content: "\00a0↗" / " (opens in a new tab)"; }  /* another site, in a new tab: says so, to screen readers too; a no-break space keeps ↗ with the last word */
.guide pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .8rem; } .guide pre code { background: none; padding: 0; }
.guide img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); display: block; }
.guide .shot { border: 0; padding: 0; background: none; cursor: zoom-in; width: min(100%, 24rem); margin: .4rem 0; }  /* a thumbnail; tap for full size */
.guide .shot:hover img, .guide .shot:focus-visible img { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal.shotbig[popover] { width: fit-content; height: fit-content;  /* the picture's size, so the popover centres it and its ✕ */
   max-width: calc(100vw - 2rem); padding: 0; background: none; box-shadow: none; overflow: visible; }
.shotbig img { display: block; max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); border: 0; }
.modal.shotbig > .calclose { background: var(--surface); border-radius: 50%; width: 2rem; height: 2rem; }
.guide table { display: block; overflow-x: auto; border-collapse: collapse; } .guide th, .guide td { border: 1px solid var(--border); padding: .4rem .6rem; text-align: left; vertical-align: top; }
:target, .guide h2 { scroll-margin-top: 4rem; }  /* a link to #something lands below the sticky top bar */ .guide h2 + p, .guide h2 + ul { margin-top: .4rem; }
.toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 1.4rem; }  /* the guide's sections, as chips */
.toc a { background: var(--accent-soft); color: var(--accent-text); border-radius: 1rem; padding: .2rem .75rem; font-size: .88rem; text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.callout { margin: 1rem 0; padding: .6rem .9rem; border-left: 4px solid var(--accent); border-radius: var(--radius-sm); background: var(--info-soft); }
.callout p { margin: .3rem 0; } .calloutlabel { font-weight: 700; }
.callout.tip { background: var(--accent-soft); }
.callout.warning, .callout.important { background: var(--warn-soft); color: var(--warn-text); border-left-color: var(--warn-edge); }
.callout.caution { background: var(--danger-soft); color: var(--danger-text); border-left-color: var(--danger); }
.callout.warning a, .callout.important a, .callout.caution a, .callout.warning code, .callout.caution code { color: inherit; }
form.profile { max-width: 36rem; } main form.profile[action^="/admin/"] { max-width: none; }  /* Admin pages: the page's width, as Security and Updates */ form.profile > label { display: block; margin: .9rem 0; font-weight: 600; }
form.profile input, form.profile textarea { display: block; margin-top: .25rem; font-weight: normal; }
form.profile input[name=motion], form.profile input[type=email], form.profile input[type=tel], form.profile input[type=url], form.profile textarea { width: 100%; }
form.profile input[type=checkbox] { display: inline-block; margin: 0 .3rem 0 0; }
form.profile .hint { display: block; font-weight: normal; }
/* Guests: a paper application's two dates, each in its own box so they aren't mixed up */
fieldset.datebox { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: .6rem 0; padding: .5rem .9rem .7rem; }
fieldset.datebox legend { font-weight: 600; padding: 0 .3rem; }
fieldset.datebox label { display: block; margin-top: .3rem; }
form.profile fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 1rem 0; padding: .7rem 1rem; background: var(--surface); }
form.profile legend { font-weight: 600; float: left; width: 100%; padding: 0; margin-bottom: .4rem; }  /* inside the box, so a long one wraps cleanly */
form.profile legend + * { clear: both; } form.profile label.check { display: inline-flex; align-items: center; margin-right: 1.2rem; font-weight: normal; }
svg.lock { width: .85em; height: .85em; vertical-align: -.05em; fill: var(--faint); stroke: var(--faint); stroke-width: 2.2; } svg.lock rect { stroke: none; }
div.change { white-space: pre-line; }
article.mail { overflow-wrap: anywhere; border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; margin: .8rem 0; background: var(--surface); box-shadow: var(--shadow); }
article.mail h3 { margin: .2rem 0; } article.mail pre { white-space: pre-wrap; font: inherit; font-size: .9rem; margin: .5rem 0 0; }
pre.relnotes { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .88rem; max-height: 20rem; overflow-y: auto; }

/* inline forms and fold-downs that remain */
form.inline { display: inline-flex; gap: .3rem; align-items: center; margin: .15rem .2rem; flex-wrap: wrap; }
details.edit { display: inline-block; text-align: left; } details.edit > summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
details.edit[open] { display: block; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem .7rem; margin: .3rem 0; }
.swapreq form { display: inline; margin-left: .4rem; }

/* ---------- cards (business items, notes) ---------- */
.cards { display: flex; flex-direction: column; gap: .8rem; margin: .5rem 0 1.2rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .95rem 1.15rem; box-shadow: var(--shadow); }
:where(:not(.cards, .homegrid, .admintools)) > .card + .card { margin-top: .8rem; }  /* cards one under another, outside a .cards list or a grid (its gap spaces them): never touching */
.cards.rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 21rem)); justify-content: center; }  /* Video meeting: one size (at most 21rem, so a narrow screen never widens them), 1 to 3 across, centred */
form.card.room { max-width: none; }
.cards.choice .card { display: flex; flex-direction: column; } .cards.choice .card > :last-child { margin-top: auto; }  /* signed out at a room: Sign in and Join as a guest level */
.card.room > * { margin: .45rem 0; } .card.room > :first-child { margin-top: 0; } .card.room > :last-child { margin-bottom: 0; }  /* Video meeting's rooms: no page-sized gaps inside */
.card.room .btn { min-height: 44px; display: inline-flex; align-items: center; }  /* an easy tap on a phone */
.card.overdue { border-left: 4px solid var(--danger); } .card.done { background: var(--surface-2); } .card.done .card-text { color: var(--muted); }
.card-head { display: flex; gap: .8rem; align-items: flex-start; justify-content: space-between; }
.card-text { font-size: 1.04rem; white-space: pre-wrap; line-height: 1.45; } .cardopen .card-text { white-space: normal; }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem; }
.topacts { display: flex; gap: .35rem; flex-shrink: 0; } .topacts form { margin: 0; display: inline; } .topacts button.act { font-size: .82rem; padding: .2rem .65rem; }
@media (max-width: 560px) { .card-head { flex-direction: column; } }
.comments { margin-top: .6rem; } .comment { background: var(--surface-2); border-radius: .6rem; padding: .5rem .75rem; margin: .35rem 0; }
.comment .ctext { margin-top: .15rem; }  /* formatted (richtext.py): its paragraphs and lists make the line breaks */

.panel { margin-top: .7rem; padding: .7rem 0 .5rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.timeline { list-style: none; padding: 0; margin: 0; max-height: 22rem; overflow-y: auto; }
.timeline li { padding: .5rem .75rem; border-radius: .5rem; margin: .15rem 0; }
.timeline li:nth-child(odd) { background: var(--surface-2); } .timeline li:nth-child(odd) .chip { background: var(--surface-3); }
.tl-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .2rem; } .tl-comment { white-space: pre-wrap; }
ul.chowlog { max-width: 44rem; max-height: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .3rem; box-shadow: var(--shadow); }
ul.chowlist { margin: .3rem 0 1rem; }

/* modern forms */
form.modern label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .9rem; margin: .5rem 0; }
form.modern label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: normal; }
form.modern select { max-width: 100%; min-width: 0; } form.modern .formrow > label { min-width: 0; }
form.modern textarea { width: 100%; min-height: 5.5rem; }
form.modern input[type=date], form.modern .combo > input, form.modern select { height: 2.75rem; }
form.modern .formrow { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; margin-top: .4rem; }
form.modern .formrow label { margin: 0; } form.modern .hint { font-weight: normal; }
form.swapcard { max-width: 44rem; } .swapicon { font-size: 1.2rem; color: var(--muted); }

/* type-to-filter dropdown (combo.js) */
.combo { position: relative; display: inline-flex; align-items: stretch; }
.combo > input { padding-right: 2rem; width: 15rem; font-weight: normal; }
.combo-arrow { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: .2rem .4rem; }
.combo-menu { position: absolute; z-index: 20; top: calc(100% + .25rem); left: 0; min-width: 100%; max-height: 16rem; overflow-y: auto;
  margin: 0; padding: .25rem; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop); font-weight: normal; }
.combo-menu li { padding: .4rem .7rem; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; white-space: nowrap; border-radius: .4rem; }
.combo-menu li span { color: var(--faint); font-size: .85rem; } .combo-menu li.none { color: var(--faint); font-style: italic; }
.combo-menu li:hover, .combo-menu li.at { background: var(--accent-soft); }

/* ---------- chow lists ---------- */
ol.rotlist, ul.rotlist { max-width: 44rem; padding: 0; margin: .5rem 0 1.2rem; list-style: none; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
ol.rotlist > li, ul.rotlist > li { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .2rem .7rem; align-items: start;
  padding: .6rem .95rem; border-bottom: 1px solid var(--border); }
ol.rotlist > li:last-child, ul.rotlist > li:last-child { border-bottom: 0; }
ol.rotlist > li:nth-child(even), ul.rotlist > li:nth-child(even) { background: var(--surface-2); }
ol.rotlist > li.next { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
.rotlist .num { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font-size: .85rem; font-weight: 600; }
.rotlist li.next .num { background: var(--accent); color: var(--btn-text); }
.rot-main { min-width: 0; padding-top: .15rem; } .rot-name { font-weight: 600; }
.rot-name a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--faint); } .rot-name a:hover { color: var(--accent-text); }
.rot-limits { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.rot-note { flex-basis: 100%; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.rot-ops { display: flex; gap: .3rem; align-items: center; } .rot-ops form { margin: 0; display: inline; } .rot-ops button.act { font-size: .85rem; padding: .2rem .65rem; }
.rot-panel { grid-column: 1 / -1; margin-top: .3rem; }
.rot-panel .weeks { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin: .2rem 0 .4rem; font-size: .92rem; }
.rot-panel label.wk { display: inline-flex; gap: .3rem; align-items: center; font-weight: normal; flex-direction: row; margin: 0; }
.rot-panel > form.inline { display: block; margin-top: .7rem; }
.nights .dateblk { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3.2rem; min-height: 2.7rem;
  border-radius: var(--radius-sm); background: var(--surface-3); line-height: 1.05; }
.nights .dateblk b { font-size: 1.15rem; } .nights .dateblk small { font-size: .7rem; color: var(--muted); white-space: nowrap; }
ol.nights > li { grid-template-columns: 3.4rem 1fr auto; align-items: center; }
ol.nights > li.mine { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
ol.nights > li.mine .dateblk { background: var(--accent); color: var(--btn-text); } ol.nights > li.mine .dateblk small { color: var(--btn-text); opacity: .85; }
ol.nights > li.none .dateblk { opacity: .55; } ol.nights > li.tonight { box-shadow: inset 4px 0 0 var(--warn-edge); }

/* misc older bits */
nav.top .drop .ico { display: inline-block; width: 1.3rem; }
/* profile pictures (avatars.py, _avatar.html) */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex-shrink: 0; vertical-align: middle;
  background: var(--surface-3); color: #fff; font-weight: 600; overflow: hidden; }
.avatar.initials { background: hsl(var(--h) 38% 42%); letter-spacing: .02em; }
/* the letters out of the flow, so a link's underline (on hover) never runs under them: browsers carry it into the
   circle otherwise, even though it's its own box */
.avatar.initials { position: relative; } .avatar .ini { position: absolute; inset: 0; display: grid; place-items: center; }
.avatar.xs { width: 1.15rem; height: 1.15rem; font-size: .55rem; margin-right: .1rem; }
.avatar.sm { width: 1.75rem; height: 1.75rem; font-size: .72rem; }
.avatar.md { width: 1.5rem; height: 1.5rem; font-size: .62rem; margin-right: .4rem; }
.avatar.xl { width: 5.5rem; height: 5.5rem; font-size: 1.9rem; box-shadow: var(--shadow); }
nav.top .me { display: inline-flex; align-items: center; padding-left: .3rem; }
a.withavatar { display: inline-flex; align-items: center; gap: .55rem; }
.memberhead { display: flex; gap: 1.1rem; align-items: center; margin-bottom: .6rem; } .memberhead h1 { margin: 0 0 .2rem; }
.photorow { display: flex; gap: 1.1rem; align-items: center; max-width: 36rem; margin: .4rem 0 1rem; }
.photorow p.hint { margin: .4rem 0 0; } .photoform { display: inline; } label.filebtn { cursor: pointer; }
/* roster: list / card switch and member cards */
.viewswitch { display: inline-flex; background: var(--surface-3); border-radius: .55rem; padding: .2rem; gap: .15rem; margin-left: auto; }
.viewswitch a { display: grid; place-items: center; width: 2.1rem; height: 1.9rem; border-radius: .4rem; color: var(--muted); }
.viewswitch a:hover { color: var(--text); } .viewswitch a.on { background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow); }
.viewswitch svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.viewswitch a:last-child svg { fill: currentColor; stroke: none; }
form.filter { width: 100%; }
.membergrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1rem; margin: .6rem 0 1.2rem; }
.membercard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; padding: 1.2rem .9rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
.membercard:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.membercard .avatar.lg { width: 4.5rem; height: 4.5rem; font-size: 1.5rem; margin-bottom: .3rem; }
.mc-name { font-weight: 600; font-size: 1.05rem; } .mc-call { color: var(--muted); font-size: .88rem; }
.mc-meta { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; margin: .2rem 0; }
form.profile fieldset.fixed { background: var(--surface-2); }
/* a multi-select: the ticked items in the summary, the list (filterable when long) under it */
details.multi { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin: .3rem 0; }
details.multi > summary { padding: .5rem .7rem; cursor: pointer; list-style: none; }
details.multi > summary::-webkit-details-marker { display: none; }
details.multi > summary::after { content: " ▾"; color: var(--muted); } details.multi[open] > summary::after { content: " ▴"; }
details.multi[open] > summary { border-bottom: 1px solid var(--border); }
.multi-list { display: grid; gap: .4rem; padding: .5rem .7rem; }
/* only a long list of titles scrolls (and shows its scrollbar); the filter and Add a title stay in full view */
.multi-opts { display: grid; gap: .2rem; max-height: 14rem; overflow-y: auto; scrollbar-gutter: stable; }
form.profile .multi-list label.check { margin: 0; } fieldset.roles label.check .hint { display: inline; margin-left: .3rem; } .multi-list label.new { margin-top: .4rem; font-weight: normal; }
.multi-list label[hidden] { display: none; }
form.profile .fixedrow { display: flex; flex-wrap: wrap; gap: .8rem; }
form.profile .fixedrow label { flex: 1 1 9rem; margin: .2rem 0 .5rem; font-weight: 600; font-size: .9rem; }
form.profile input[readonly] { width: 100%; background: var(--surface-3); color: var(--muted); border-style: dashed; cursor: default; }
form.profile input[readonly]:focus { box-shadow: none; border-color: var(--border-strong); }
/* update available (admins) */
nav.top .me .dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #f2b33d; margin-left: .35rem; box-shadow: 0 0 0 2px var(--nav-bg); }
.updbar { background: var(--info-soft); color: var(--text); border-bottom: 1px solid var(--border); padding: .45rem 1rem; font-size: .9rem; text-align: center; }
nav.top .drop a.updnote { background: var(--warn-soft); color: var(--warn-text); font-weight: 600; margin-bottom: .2rem; }
nav.top .drop a.updnote small { display: block; font-weight: normal; font-size: .78rem; }
div.relnotes { background: var(--surface-2); border-radius: var(--radius-sm); padding: .3rem 1rem; margin: .4rem 0; max-height: 22rem; overflow-y: auto; font-size: .93rem; }
div.relnotes ul { padding-left: 1.2rem; margin: .5rem 0; } div.relnotes li { margin: .3rem 0; } div.relnotes p { margin: .5rem 0; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  /* iOS zooms the page into any field under 16px */
  input[type=text], input[type=search], input[type=email], input[type=tel], input[type=url], input[type=date], input[type=time], input[type=number], input[type=password], input:not([type]),
  select, textarea { font-size: 16px; }
  main { margin-top: 1.1rem; padding: 0 .8rem; }
  .pagesearch { display: block; margin-bottom: .6rem; }
  h1 { font-size: 1.5rem; }
  /* tables fit the screen: tighter cells, less important columns hidden */
  .list { font-size: .93rem; } .list th, .list td { padding: .55rem .4rem; }
  .list thead th { font-size: .66rem; letter-spacing: 0; }
  .list .opt { display: none; } .list th:empty, .list td:empty { padding: 0; }
  .cols { gap: 0; }
  /* business cards: the buttons as even rows, big enough to tap */
  .topacts { flex-wrap: wrap; width: 100%; }
  .topacts > * { flex: 1 1 0; }
  .topacts button.act { width: 100%; min-height: 2.4rem; font-size: .9rem; white-space: nowrap; }
  .pager { flex-wrap: wrap; }
}
/* top bar: ☰ (left) opens a drawer with every page; the meeting pill, clock, search and name stay in the bar,
   dropping out as the screen narrows (search into the drawer, then the clock, then the name text) */
nav.top { flex-wrap: nowrap; gap: .3rem; }
nav.top .spacer { flex: 1; }
nav.top .burger { font: inherit; font-size: 1.3rem; line-height: 1; color: var(--nav-text); background: none; border: 0;
  padding: .35rem .55rem; border-radius: .5rem; cursor: pointer; margin-left: -.4rem; }
nav.top .burger:hover, body.drawer-open nav.top .burger { background: var(--nav-hover); }
nav.top .brand { margin-right: .5rem; white-space: nowrap; }
nav.top .clock { color: var(--nav-text); opacity: .8; font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; margin: 0 .4rem; }
nav.top input[type=search] { width: 15rem; }
@media (max-width: 1000px) { nav.top input[type=search] { width: 11rem; } }
nav.top a.start { border: 1px solid var(--accent); border-radius: 2rem; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
nav.top a.start.soon, nav.top a.start.live { background: #f2b33d; color: #2a1d00; border-color: #f2b33d; font-weight: 600; }
nav.top a.start.soon { animation: startpulse 1.6s ease-in-out infinite; }
@keyframes startpulse { 50% { box-shadow: 0 0 0 .4rem transparent; } 0%, 100% { box-shadow: 0 0 0 0 #f2b33daa; } }
@media (max-width: 820px) { nav.top .barsearch { display: none; } }
@media (max-width: 760px) { nav.top { padding: .5rem .7rem; } nav.top .clock { display: none; } }
@media (max-width: 520px) { nav.top .brand span { display: none; } nav.top .me .name { display: none; } }
@media (max-width: 640px) { nav.top a.start .word { display: none; } }  /* "Continue (Nov 18)": the full button fits from about 640px */
.drawer { position: fixed; inset: 0; z-index: 50; visibility: hidden; transition: visibility 0s .2s; }
.drawer .scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .2s; }
.drawer .panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(17rem, 85vw); background: var(--nav-bg); color: var(--nav-text);
  transform: translateX(-100%); transition: transform .2s ease-out; padding: .8rem .7rem; overflow-y: auto; display: flex; flex-direction: column; gap: .1rem;
  box-shadow: 4px 0 18px rgba(0, 0, 0, .3); }
.drawer .panel a { color: var(--nav-text); text-decoration: none; padding: .6rem .8rem; border-radius: .5rem; font-size: 1rem; }
.drawer .panel a:hover { background: var(--nav-hover); } .drawer .panel a.on { background: var(--nav-on); box-shadow: inset 3px 0 0 var(--accent); }
.drawer .panel .sep { border-top: 1px solid var(--nav-hover); margin: .4rem .2rem; }
.drawer .panel a.kofi { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem;
  border-radius: 2rem; background: var(--nav-hover); font-size: .92rem; }  /* the menu's foot: Support Club Minutes */
.drawer .panel a.kofi .ico { width: 1.2rem; height: 1.2rem; color: #ff5e5b; }  /* Ko-fi's red, on the logo only (contrast) */
.drawer .panel form { margin: 0 0 .5rem; }
.drawer .panel input[type=search] { width: 100%; padding: .5rem .9rem; border-radius: 2rem; border: 1px solid transparent; font-size: 16px;
  background: rgba(255, 255, 255, .92); color: #1b1f17; }  /* the same light pill as the bar's search, in either theme */
@media (min-width: 821px) { .drawer .dsearch { display: none; } }

body.drawer-open { overflow: hidden; }
body.drawer-open .drawer { visibility: visible; transition: visibility 0s; }
body.drawer-open .drawer .scrim { opacity: 1; } body.drawer-open .drawer .panel { transform: none; }
@media (prefers-reduced-motion: reduce) { nav.top a.start.soon { animation: none; } .drawer, .drawer .scrim, .drawer .panel { transition: none; } }
/* home page */
.homegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); gap: 1rem; align-items: start; margin-top: 1rem; }
.homegrid h2 { font-size: 1.02rem; margin: 0 0 .5rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.homegrid p { margin: .35rem 0; } .homegrid .big { font-size: 1.2rem; font-weight: 600; }
.homegrid p.late, table.list tr.late td, table.list span.late { color: var(--danger-text); }
ul.plain { list-style: none; padding: 0; margin: .3rem 0; } ul.plain li { padding: .3rem 0; border-bottom: 1px solid var(--border); } ul.plain li:last-child { border: 0; }
nav.top .me .name { margin-right: .35rem; }
/* Links page editor (admins) */
form.linkedit input, form.linkedit select { width: 100%; } form.linkedit td { vertical-align: middle; }
form.linkedit .rowbtns { white-space: nowrap; } form.linkedit .rowbtns .btn { padding: .2rem .5rem; margin-left: .15rem; }
@media (max-width: 760px) { form.linkedit table, form.linkedit tbody, form.linkedit tr, form.linkedit td { display: block; }
  form.linkedit table.list { background: none; border: 0; box-shadow: none; }
  form.linkedit thead { display: none; } form.linkedit tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: .4rem; margin-bottom: 1.1rem; }
  form.linkedit tbody tr td { border: 0; background: none !important; padding: .3rem; }
  form.linkedit tr.folded td:not(:first-child):not(.rowbtns) { display: none; } }
@media (min-width: 761px) { form.linkedit .fold { display: none; } }
.iconpick { position: relative; } .iconpick summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .5rem; border: 1px solid var(--border-strong); border-radius: .5rem; background: var(--surface); }
.iconpick summary::-webkit-details-marker { display: none; } .iconpick summary small { color: var(--muted); }
.iconpick .ico { width: 1.4rem; height: 1.4rem; color: var(--accent); }
.iconpick .grid { position: absolute; z-index: 20; top: 2.3rem; left: 0; width: 22rem; max-width: 80vw; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: .25rem; padding: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.iconpick .grid button { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .4rem .2rem; border: 1px solid transparent;
  border-radius: .45rem; background: none; color: var(--text); cursor: pointer; font: inherit; font-size: .8rem; }
.iconpick .grid button:hover { background: var(--accent-soft); border-color: var(--accent); }
.iconpick .grid button small { font-size: .72rem; color: var(--muted); } .iconpick .grid .auto { font-weight: 600; justify-content: center; }
ul.checklist { list-style: none; padding: 0; margin: .3rem 0; } ul.checklist li { position: relative; padding: .35rem 0 .35rem 1.7rem; line-height: 1.4; }
ul.checklist li::before { content: ""; position: absolute; left: 0; top: .55rem; width: calc(1rem + 4px); height: calc(1rem + 4px); box-sizing: border-box; border: 2px solid var(--border-strong); border-radius: .25rem; }
ul.checklist li.late::before { border-color: var(--danger); }
/* Home's business items: each opens the item on the Business page. Pointing at one shows a faint tick in its box
   (what you can do there); a phone has no pointing, so the › says it opens */
ul.checklist.open li a { color: inherit; text-decoration: none; display: block; margin-left: -1.7rem; padding-left: 1.7rem; }  /* the box is part of the link: a tap on it opens the item */
ul.checklist.open li::before { pointer-events: none; }
ul.checklist.open li a::after { content: " ›"; color: var(--muted); }
/* the tick is a drawing laid over the box (same place and size), not a "✓" in some font: every browser centres it */
ul.checklist.open li::after { content: ""; position: absolute; left: 0; top: .55rem; width: calc(1rem + 4px); height: calc(1rem + 4px);
  background: var(--accent-text); opacity: 0; transition: opacity .15s; pointer-events: none;
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask: var(--tick) center / 75% no-repeat; mask: var(--tick) center / 75% no-repeat; }
/* the faint tick: on hover only where there's real pointing (a phone keeps "hover" on the last thing tapped, which looked
   ticked), while a finger is down on a phone, and for the keyboard */
@media (hover: hover) { ul.checklist.open li:hover::after { opacity: .5; } }
ul.checklist.open li:active::after, ul.checklist.open li:has(a:focus-visible)::after { opacity: .5; }
ul.checklist.open li a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }  /* the keyboard still shows where it is */
form.linkedit table.list { overflow: visible; }
/* calendar page */
.callegend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .85rem; color: var(--muted); }
.callegend span { display: inline-flex; align-items: center; gap: .3rem; }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; flex: none; margin-right: .35rem; vertical-align: middle; }
.k-events { background: var(--accent); } .k-chow { background: #d9932b; } .k-planning { background: #7b4fb0; }
.k-community { background: #2f7fc1; } .k-birthday { background: #d24f86; } .k-holiday { background: #3a9a5b; }
h2.calday { font-size: 1rem; margin: 1.1rem 0 .3rem; color: var(--accent-text); }
ul.agenda { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
ul.agenda li + li { border-top: 1px solid var(--border); } ul.agenda li.alt { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.caltime { font-variant-numeric: tabular-nums; color: var(--muted); }
/* an event: the whole row opens its details */
button.calopen { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; width: 100%; }
ul.agenda button.calopen { display: flex; align-items: baseline; gap: .5rem; padding: .65rem .75rem; min-height: 2.75rem; }
ul.agenda button.calopen:hover { background: var(--accent-soft); } button.calopen:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
ul.agenda .caltime { flex: none; width: 4.6rem; font-size: .9rem; } ul.agenda .dot { align-self: center; margin-right: 0; } ul.agenda .caltitle { min-width: 0; overflow-wrap: anywhere; }
table.month button.calopen { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 3px; }
table.month button.calopen:hover { background: var(--accent-soft); }
/* the details dialog */
dialog#calmodal, dialog.modal, .modal[popover] { border: 0; border-radius: var(--radius); padding: 0; width: min(28rem, calc(100vw - 2rem)); background: var(--surface); color: var(--text);
  box-shadow: 0 10px 40px rgba(0,0,0,.3); max-height: calc(100dvh - 2rem); overflow: auto; } dialog#calmodal::backdrop, dialog.modal::backdrop, .modal[popover]::backdrop { background: rgba(0,0,0,.45); }
dialog#calmodal .body, dialog.modal .body, .modal[popover] .body { padding: 1.1rem 1.25rem 1rem; } dialog#calmodal h2, dialog.modal h2, .modal[popover] h2 { margin: .1rem 2rem .6rem 0; font-size: 1.25rem; }
dialog#calmodal > form[method=dialog], dialog.modal form.x { position: absolute; top: .5rem; right: .5rem; margin: 0; }
button.calclose { font: inherit; background: none; border: 0; cursor: pointer; min-width: 2.5rem; min-height: 2.5rem; border-radius: 50%; color: var(--muted); }
button.calclose:hover { background: var(--accent-soft); }
.modal[popover] > .calclose { position: absolute; top: .5rem; right: .5rem; }  /* popover dialogs: no script needed */
td.evacts form { display: inline; } .modal[popover] { white-space: normal; text-align: left; }
dl.evinfo { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; } dl.evinfo dt { font-weight: 600; } dl.evinfo dd { margin: 0; }
dl.evinfo .agent { overflow-wrap: anywhere; }
.calcal { margin: 0; font-size: .85rem; color: var(--muted); } .calwhen { font-weight: 600; } .calnotes { white-space: pre-line; overflow-wrap: anywhere; }
table.month { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
table.month th { font-size: .75rem; color: var(--muted); padding: .3rem; font-weight: 600; }
table.month td { border: 1px solid var(--border); vertical-align: top; height: 5.5rem; padding: .2rem .25rem; overflow: hidden; }
table.month td.other { background: var(--surface-2); color: var(--faint); } table.month td.today .daynum { background: var(--accent); color: #fff; }
table.month .daynum { display: inline-block; min-width: 1.5rem; text-align: center; border-radius: 1rem; font-size: .85rem; text-decoration: none; }
table.month ul { list-style: none; padding: 0; margin: .15rem 0 0; font-size: .75rem; line-height: 1.25; }
table.month li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {  /* phones: a dot per event; tap the day for the details */
  table.month td { height: 3.4rem; padding: .15rem; } table.month li { display: inline; } table.month .caltime, table.month .caltitle, table.month li.more { display: none; }
  table.month .dot { margin-right: .1rem; } table.month button.calopen { display: inline; }
}
.feedlink { width: 100%; max-width: 40rem; font-family: ui-monospace, monospace; font-size: .8rem; }
h2.calrange { font-size: 1.05rem; margin: .3rem 0; }
.iconpick .iconsearch { grid-column: 1 / -1; width: 100%; padding: .35rem .6rem; }
.iconpick .brandhits { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; max-height: 14rem; overflow-y: auto; }
.iconpick .brandhits:empty { display: none; } .iconpick .brandhits small { overflow-wrap: anywhere; }
form.profile label.until { display: block; margin-top: .5rem; }
/* emoji(): the native emoji where the device draws color emoji (html.emoji, set in base.html), else the app's line icon */
.emo { display: none; font-size: 1rem; line-height: 1; } html.emoji .emo { display: inline; } html.emoji .emo-alt { display: none; }
.emo-alt { display: inline-flex; vertical-align: -.2em; } .emo-alt .ico { width: 1.15em; height: 1.15em; } .emoji-wrap { display: inline; }
button.calkind { font: inherit; display: inline-flex; align-items: center; gap: .1rem; padding: .3rem .55rem; margin: -.3rem -.2rem;
  border: 1px solid transparent; border-radius: 2rem; background: none; color: inherit; cursor: pointer; }
button.calkind:hover { border-color: var(--border-strong); } button.calkind[aria-pressed=false] { opacity: .5; text-decoration: line-through; }
button.calkind[aria-pressed=false] .dot { background: transparent !important; box-shadow: inset 0 0 0 2px var(--muted); }
table.month li.extra { display: none; }

/* Charts (Attendance): stacked bars in plain HTML; each bar's title is its tooltip, the table below has the numbers */
.chart { margin: 0 0 1.5rem; padding: 1rem 1rem .6rem 2.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.chart.wide-axis { padding-left: 4rem; } .chart.wide-axis .bars { justify-content: space-around; } .chart.wide-axis .legend { margin-left: -3rem; }  /* "$4,800" needs more room than "40" */
.chart .legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: 0 0 .8rem -1.4rem; }
.chart .legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .35rem; vertical-align: -.05rem; }
.chart .k1 { background: var(--chart-1); } .chart .k2 { background: var(--chart-2); } .chart .k3 { background: var(--chart-3); }
.chart .k4 { background: var(--chart-4); } .chart .k5 { background: var(--chart-5); } .chart .k6 { background: var(--chart-6); } .chart .k7 { background: var(--chart-7); } .chart .k8 { background: var(--chart-8); }
.chart .plot { position: relative; height: 11rem; }
.chart .grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.chart .grid span { position: absolute; right: 100%; margin-right: .4rem; transform: translateY(-50%); font-size: .75rem; color: var(--faint); }
.chart .bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart .bar { flex: 1 1 0; max-width: 1.6rem; display: flex; flex-direction: column; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; }
.chart .bar i { flex-basis: 0; min-height: 2px; } .chart .bar:hover, .chart .bar:focus-visible { opacity: .75; }
.chart figcaption { display: flex; justify-content: space-between; font-size: .75rem; color: var(--faint); margin-top: .3rem; }
table.list td select { max-width: 7.5rem; font-size: .8rem; display: block; margin-top: .2rem; }
@media (max-width: 760px) { table.list td select { max-width: 6.5rem; } }  /* Treasurer → Money fits 375px in Firefox too */
/* Treasurer → Amounts: the dues period only for dues, the yearly due date only for yearly dues (an older browser shows them all) */
.rateform:not(:has([name=kind] [value=dues]:checked)) :is(label:has([name=period]), label:has([name=due_month]), label:has([name=due_day]), .hint),
.rateform:not(:has([name=period] [value=year]:checked)) :is(label:has([name=due_month]), label:has([name=due_day])) { display: none; }
/* …and Add the change looks off until what it needs is filled in (a yearly due date only for yearly dues); a click on a row picks it (script) */
.rateform:is(:has(:is([name=start], [name=amount]):invalid), :has([name=kind] [value=dues]:checked):has([name=period] [value=year]:checked):has([name=due_month] [value="0"]:checked, [name=due_day]:placeholder-shown)) button { opacity: .45; pointer-events: none; }
tr[data-kind] { cursor: pointer; }
.swatch { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .4rem; vertical-align: -.05rem; } .swatch.k1 { background: var(--chart-1); } .swatch.k2 { background: var(--chart-2); } .swatch.k3 { background: var(--chart-3); } .swatch.k4 { background: var(--chart-4); } .swatch.k5 { background: var(--chart-5); } .swatch.k6 { background: var(--chart-6); } .swatch.k7 { background: var(--chart-7); } .swatch.k8 { background: var(--chart-8); }
input.cellinput { font: inherit; font-size: .9rem; width: 100%; min-width: 10rem; border: 1px solid transparent; background: transparent; color: inherit; padding: .15rem .3rem; border-radius: .3rem; } input.cellinput:hover, input.cellinput:focus { border-color: var(--border-strong); background: var(--surface); }
/* Business items: a small card that opens a dialog with the details, comments, history and actions */
article.bcard { cursor: pointer; transition: border-color .15s; } article.bcard:hover { border-color: var(--border-strong); }
button.cardopen { all: unset; display: block; width: 100%; cursor: pointer; } button.cardopen:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: .3rem; }
dialog.modal.wide, .modal[popover].wide { width: min(40rem, calc(100vw - 2rem)); } dialog.modal h3 { font-size: 1rem; margin: 1.1rem 0 .3rem; }
dialog.modal .dacts { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 .2rem; } dialog.modal .dacts form { margin: 0; }
details.hist { margin-top: 1rem; } details.hist summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
button.cardopen .card-text { display: block; }

/* Safari fills an empty date or time box with today's date in grey, which reads as a value: blank until it's in use.
   Only in Safari (.safari, set in base.html): Chrome and Edge keep their mm/dd/yyyy and --:-- -- hints */
.safari input:is([type=date], [type=time]):is([value=""], :not([value])):not(:focus)::-webkit-datetime-edit { color: transparent; }

/* a possible duplicate (calview.mark_duplicates, console.js similar()): highlighted, never hidden */
.duphint { color: var(--warn-text); font-size: .85rem; }
li.dup .caltitle, li.dup > strong { background: var(--warn-soft); border-radius: .2rem; }
/* Site page: one row per picture (what it looks like now, where it's used, Upload and Reset) */
.sitename input { flex: 1; max-width: 22rem; }
.sitepics { display: grid; gap: .6rem; container-type: inline-size; }
@container (max-width: 36rem) {  /* a narrow card (two to a row): the buttons go under the words */
  .sitepic { grid-template-columns: 6.5rem 1fr; } .sitepic .acts { grid-column: 2; } .sitepic form.backing select { margin: .25rem 0 0; width: 100%; } }
.sitepic { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 1rem; align-items: center; padding: .8rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sitepic .thumb { width: 6.5rem; height: 5rem; display: grid; place-items: center; border-radius: var(--radius-sm);
  background: repeating-conic-gradient(var(--border) 0 25%, transparent 0 50%) 0 0 / 12px 12px; }  /* see-through shows */
.sitepic .thumb img { max-width: 6rem; max-height: 4.5rem; }
.sitepic .thumbs { display: grid; gap: .3rem; } .sitepic .thumbs .thumb { height: 3.6rem; background: #fff; border: 1px solid var(--border); }
.sitepic .thumbs .thumb.ondark { background: #1b1f17; } .sitepic .thumbs img { max-height: 3.1rem; max-width: 5.5rem; }
.sitepic form.backing { margin: .35rem 0 0; } .sitepic form.backing select { margin-left: .3rem; max-width: 100%; }
.sitepic .about input[type=file] { max-width: 100%; } .sitepic .about { min-width: 0; }  /* lets the text and the menu wrap instead of widening the page */
.sitepic .thumb.favicon img { width: 32px; height: 32px; } .sitepic .thumb.icon img { width: 60px; height: 60px; border-radius: 13px; }
.sitepic .acts { display: flex; gap: .4rem; align-items: center; } .sitepic .acts form { margin: 0; }
@media (max-width: 560px) { .sitepic { grid-template-columns: 5rem 1fr; } .sitepic .thumb { width: 5rem; } .sitepic .acts { grid-column: 1 / -1; }
  .sitepic form.backing label { display: block; } .sitepic form.backing select { margin: .25rem 0 0; width: 100%; } }
/* the file box sits invisibly in its Upload… button: still reachable with the keyboard (Tab, then Space) */
.sitepic label.btn { position: relative; } .sitepic label.btn input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.sitepic label.btn:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
/* what's behind the club's logo (Site): dark ink on a see-through background still shows in dark mode */
img.logo.bg-circle { background: #fff; border-radius: 50%; }
img.logo.bg-square { background: #fff; border-radius: 14%; padding: 6%; box-sizing: border-box; }
/* Site: Save and Cancel appear once something is chosen; the card is marked until it's saved */
.sitepic form .pend { display: none; } .sitepic form.pending .pend { display: inline-flex; gap: .4rem; }
.sitepic form.pending .pick { display: none; }
.sitepic:has(form.pending) { border-color: var(--warn-edge); background: var(--warn-soft); }
.sitepic .unsaved { color: var(--warn-text); font-size: .8rem; font-weight: 600; margin-left: .3rem; }
/* Admin page: one card per tool */
.admintools { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .7rem; }
.admintools a.card { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: inherit; padding: .9rem 1rem; }
.admintools a.card:hover { border-color: var(--accent); } .admintools a.card b { font-size: 1.05rem; }
/* ‹ Admin, above each admin tool's page */
nav.crumb { margin: -.5rem 0 .8rem; font-size: .88rem; }
nav.crumb a { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .8rem .22rem .6rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--accent-text); text-decoration: none; font-weight: 500; line-height: 1.3;
  transition: background .15s, border-color .15s; }
nav.crumb a:hover { background: var(--accent-soft); border-color: var(--accent); }
nav.crumb a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Site → Colours: two small previews, each drawn with the palette set on it ---------- */
form.colours .row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin: .4rem 0; }
form.colours input[type=color] { width: 3rem; height: 2rem; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
form.colours input:disabled { color: var(--text); border-color: var(--border-strong); }  /* off, but still readable */
@media (max-width: 30rem) { form.colours .row > label.check { flex-basis: 100%; } }  /* a phone: the label on its own line, the colour and its hex together under it */
.swatch { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; vertical-align: middle; margin-left: .2rem; }
.themeprev { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; margin: .8rem 0; max-width: 40rem; }
.tp { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; color: var(--text); }
.tp-bar { background: var(--nav-bg); color: var(--nav-text); font-weight: 600; padding: .45rem .7rem; }
.tp-body { background: var(--bg); padding: .7rem; }
.tp-link { color: var(--accent-text); text-decoration: underline; }
.tp-btn { display: inline-block; background: var(--btn-bg); color: var(--btn-text); border-radius: var(--radius-sm); padding: .2rem .7rem; margin-left: .4rem; }
.tp-h { background: var(--sheet-h); border-radius: .3rem; font-weight: 600; padding: .1rem .4rem; margin: .6rem 0 .3rem; }
.tp-muted { color: var(--muted); font-size: .85rem; }

/* Admin → Site: each section a card; collapsible ones open from their heading */
.sitesec { margin: 0 0 1rem; } fieldset.sitesec { min-width: 0; } /* "Your own formats" only while it's ticked (CSS :has; an older browser just always shows it) */
/* Admin pages (the "‹ Admin" crumb, plugins' too), on a wide screen: short cards in two columns; anything else in the same
   box (text, Save, a lone form) keeps the full width, and so does a card holding a table or an editor. */
main:has(> .crumb a[href="/admin"]) form.profile { max-width: none; }
@media (min-width: 90rem) { main:has(> .crumb a[href="/admin"]) { max-width: 84rem; } }  /* a big screen: room for two cards side by side */
.card.sitesec { container-type: inline-size; }
.sitesec .fmtgrid { grid-template-columns: minmax(0, max-content) minmax(min(8rem, 100%), 20rem) minmax(0, 1fr); }  /* a long label wraps instead of pushing the boxes out */
@container (max-width: 32rem) {  /* a narrow card (two to a row): labels above their boxes, as on a phone */
  .sitesec .fmtgrid { grid-template-columns: 1fr; } .sitesec .fmtgrid > span { margin-bottom: .4rem; } }
@media (min-width: 62rem) {  /* two balanced columns: cards fill the left one, then the right, in page order, so the page ends level */
  main:has(> .crumb a[href="/admin"]) form:has(> .card.sitesec ~ .card.sitesec), main:has(> .crumb a[href="/admin"]) .cards:has(> .card ~ .card), main:has(> .crumb a[href="/admin"]):is(:has(> form.profile + form.profile), :has(> .card.sitesec ~ .card.sitesec)) { display: block; columns: 2; column-gap: 1rem; orphans: 1; widows: 1; }  /* a card is a line here: one alone may start a column */
  main:has(> .crumb a[href="/admin"]) form:has(> .card.sitesec ~ .card.sitesec) > *, main:has(> .crumb a[href="/admin"]) .cards:has(> .card ~ .card) > *, main:has(> .crumb a[href="/admin"]):is(:has(> form.profile + form.profile), :has(> .card.sitesec ~ .card.sitesec)) > * { column-span: all; }
  main:has(> .crumb a[href="/admin"]) form:has(> .card.sitesec ~ .card.sitesec) > .card.sitesec, main:has(> .crumb a[href="/admin"]) .cards:has(> .card ~ .card) > .card, main:has(> .crumb a[href="/admin"]):is(:has(> form.profile + form.profile), :has(> .card.sitesec ~ .card.sitesec)) > .card.sitesec, main:has(> .crumb a[href="/admin"]):is(:has(> form.profile + form.profile), :has(> .card.sitesec ~ .card.sitesec)) > form.profile:has(> .card.sitesec):not(:has(> .card.sitesec ~ .card.sitesec)) { column-span: none; break-inside: avoid; display: inline-block; width: 100%; vertical-align: top; margin-top: 0; }  /* inline-block: a column break keeps its bottom margin */
  main:has(> .crumb a[href="/admin"]) .cards:has(> .card ~ .card) > .card { margin-bottom: .8rem; }  /* columns have no gap: the list's own spacing (Updates, Stage) */
  :is(main:has(> .crumb a[href="/admin"]) form:has(> .card.sitesec ~ .card.sitesec), main:has(> .crumb a[href="/admin"]):is(:has(> form.profile + form.profile), :has(> .card.sitesec ~ .card.sitesec))) > .card.sitesec:has(table, [data-move]:not(.lines *), [data-into="qlist"], .hrow, input[name^="hint_"]) { column-span: all; display: block; }
}
.sitedates:has(input[name=preset]:not([value=custom]):checked) [data-own] { display: none !important; }  /* !important: over the columns' inline-block */ .sitesec h2 { margin: 0 0 .6rem; font-size: 1.15rem; }
details.sitesec > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.sitesec > summary::-webkit-details-marker { display: none; }
details.sitesec > summary::before { content: "›"; font-size: 1.3rem; line-height: 1; color: var(--muted); transition: transform .15s; }
details.sitesec[open] > summary::before { transform: rotate(90deg); }
details.sitesec > summary h2 { margin: 0; } details.sitesec[open] > summary { margin-bottom: .7rem; }
form .sitesec label.check { display: flex; width: 100%; gap: .6rem; align-items: flex-start; padding: .45rem 0; margin: 0; }
.sitesec label.check input { margin-top: .25rem; flex: none; }  /* a wrapped label mustn't squeeze the box */
.sitesec label.check.small input { margin-top: 0; }
.sitesec label.check.plughold { padding: 0 0 .6rem 1.6rem; }
form .sitesec details.plug { padding: 0 .7rem; } form .sitesec details.plug > summary { margin: 0 -.7rem; }  /* Features: one plugin, closed until opened */  /* Features: a plugin's update choice, under its tick */
main input.changed, main select.changed, main textarea.changed { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }  /* Site: changed, not saved yet */
main label.changed { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: var(--radius-sm); }  /* small text: the .25rem above would drop the box below its line */
.sitevideo .pair { display: flex; flex-wrap: wrap; column-gap: .8rem; margin-bottom: .5rem; }  /* Site → Video: name and address side by side */
.sitevideo .pair label { flex: 1 1 12rem; } .sitevideo .pair input { width: 100%; } .sitevideo label:has(> select) { display: block; margin: .5rem 0; }
.sitevideo label.check:has(> input[name^="guests"]:not(:checked)) + fieldset { display: none; }  /* members only: no guest rules to set */
.sitevideo .guestgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); column-gap: 1rem; }
label.check > input { flex: none; }  /* anywhere: a wrapped label mustn't squeeze its box (Settings, Roles) */
.fmtgrid { display: grid; grid-template-columns: max-content minmax(8rem, 20rem) 1fr; gap: .5rem .8rem; align-items: center; }
@media (max-width: 560px) { .fmtgrid { grid-template-columns: 1fr; } .fmtgrid span { margin-bottom: .4rem; } }
.agendagrid { display: grid; grid-template-columns: auto auto minmax(10rem, 16rem) 1fr; gap: .45rem .7rem; align-items: center; }
.agrow { display: contents; }  /* a row the ▲ ▼ buttons move, still laid out by the grid */
.moves { display: inline-flex; gap: .2rem; } .moves .btn { padding: .15rem .45rem; min-width: 2rem; justify-content: center; }
.moves .ico { width: 1.1em; height: 1.1em; flex: none; }  /* Safari draws an unsized SVG in a button at no width */
/* the {words} a text can use (site.html), closed until opened */
.wordsbtn { font: inherit; background: none; border: 0; padding: .3rem 0; margin: .2rem 0 .4rem; cursor: pointer; color: var(--accent); display: flex; width: fit-content; align-items: center; gap: .3rem; }
.wordsbtn:hover { text-decoration: underline; } .wordsbtn .ico { width: 1.1em; height: 1.1em; flex: none; }
.wordlist { display: grid; grid-template-columns: auto minmax(0, 1fr); margin: .4rem 0 0; font-size: .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.wordlist dt, .wordlist dd { margin: 0; padding: .35rem .6rem; border-bottom: 1px solid var(--border); } .wordlist dd { overflow-wrap: anywhere; }
.wordlist dt:nth-of-type(even), .wordlist dt:nth-of-type(even) + dd { background: var(--surface-2); }
/* a list editor (site.html): one panel, a striped row per item */
.lines { display: grid; gap: .4rem; max-width: 32rem; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .4rem; }
.lineslist { display: grid; min-width: 0; } .lines [data-addline] { justify-self: start; margin-left: .3rem; }
.linerow { display: flex; gap: .4rem; align-items: center; min-width: 0; padding: .3rem; border-radius: calc(var(--radius) - 2px); }
.linerow:nth-child(even) { background: var(--surface); } .linerow > input { flex: 1; min-width: 0; width: 100%; }
.qrow { display: flex; gap: .5rem; align-items: flex-start; } .qrow > details { flex: 1; min-width: 0; } .qrow > .moves { margin-top: .45rem; }
.officegrid { display: grid; grid-template-columns: minmax(0, 18rem) auto 4.2rem; gap: .45rem 1rem; align-items: center; justify-items: start; justify-content: start; }
.officegrid input[name^=title] { width: 100%; min-width: 0; box-sizing: border-box; }
.rolelist { display: grid; gap: .6rem; }
.rolelist details.role { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: .5rem .9rem; }
.rolelist details.role[open] > summary { margin-bottom: .4rem; } .rolelist .role p { margin: .3rem 0; }
.rolelist .role summary { cursor: pointer; } .rolelist .role summary span { display: inline-block; margin-left: 1.1em; } .rolelist .role fieldset { margin: .5rem 0; }
.rolelist details.role:has(.rmrole input:checked) > summary { text-decoration: line-through; opacity: .6; }  /* removed on Save */
.rolelist .role fieldset label.check { display: flex; gap: .4rem; margin: .15rem 0; }
.officegrid input[type=number] { width: 4rem; } .officegrid input[readonly] { background: var(--surface-2); }
@media (max-width: 560px) { .officegrid { gap: .45rem .6rem; } .officegrid .agh { font-size: .7rem; line-height: 1.2; } }
@media (max-width: 560px) { .agendagrid { grid-template-columns: auto auto minmax(0, 1fr); } .agendagrid .agh { display: none; }
  .agendagrid input[name^=hint] { grid-column: 2 / -1; margin-bottom: .6rem; } }
form.profile .sitesec input[type=number] { display: inline-block; width: 4.5rem; margin: 0 .35rem 0 0; }
form.sitewide textarea { width: 100%; field-sizing: content; min-height: 4lh; }  /* grows with its text where the browser can */
/* the certificate's fields only while it's ticked (CSS :has; an older browser just always shows them) */
.sitecert:has(input[name=cert_on]:not(:checked)) .certfields { display: none; }
/* Features → the club's own holidays: a row each; "+ Add a holiday" shows the next empty row (CSS only: a checkbox per row) */
.holrows .hrow { display: grid; grid-template-columns: minmax(8rem, 1fr) 9rem 10rem 5rem 5.5rem; gap: .5rem; margin: .35rem 0; align-items: center; }
.holrows .hrow.head span { font-size: .85rem; color: var(--muted); }
.holrows .hrow input[type=number] { width: 5rem; }
.holrows .more { position: absolute; opacity: 0; width: 1px; height: 1px; }        /* still reachable with Tab */
.holrows .more:focus-visible + .add { outline: 2px solid var(--accent); }
.holrows .more:not(:checked) + .add + .hrow, .holrows .more:checked + .add { display: none; }
.holrows .more:not(:checked) ~ .more + .add { display: none; }                      /* only the first one not used yet */
.holrows .after span { display: none; }  /* the column heading says it, except on phones */
@media (max-width: 560px) { .holrows .hrow { grid-template-columns: 1fr 1fr; } .holrows .hrow.head { display: none; } .holrows .after { display: flex; align-items: center; gap: .4rem; white-space: nowrap; grid-column: 1 / -1; } .holrows .after span { display: inline; }
  .holrows .hrow input[name^=hol_name] { grid-column: 1 / -1; } }
/* Remove: a checkbox shown as a button; ticked, the row dims and the button says Undo; it goes when the form is saved */
.holrows .rm { position: relative; } .holrows .rm input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.holrows .rm:has(input:focus-visible) { outline: 2px solid var(--accent); }
.holrows .rm .rm-undo, .holrows .rm:has(input:checked) .rm-do { display: none; } .holrows .rm:has(input:checked) .rm-undo { display: inline; }
.holrows .hrow:has(.rm input:checked) > :not(.rm) { opacity: .4; text-decoration: line-through; }
/* fields.js: a round ✕ inside the right edge of an optional date or time box, while it has a value (an iPhone fills a
   box in when tapped and its picker can't empty it) */
.clearwrap { position: relative; display: inline-flex; align-items: center; max-width: 100%; }
.clearwrap.block { display: flex; width: 100%; } .clearwrap > input { flex: 1 1 auto; min-width: 0; }
.clearwrap:has(> button.clearbox:not([hidden])) > input { padding-right: 2.7rem; }
/* the circle is small, but the button is the box's whole right end, full height and 2.6rem wide: easy to hit with a thumb */
button.clearbox { position: absolute; right: 0; top: 0; bottom: 0; width: 2.6rem; padding: 0; border: 0; border-radius: 0 var(--radius-sm, .4rem) var(--radius-sm, .4rem) 0;
  background: radial-gradient(circle, var(--surface-3) 0 .68rem, transparent .72rem); color: var(--muted); font-size: .75rem; line-height: 1;
  display: grid; place-items: center; cursor: pointer; touch-action: manipulation; }
button.clearbox:hover, button.clearbox:focus-visible { background: radial-gradient(circle, var(--border-strong) 0 .68rem, transparent .72rem); color: var(--text); }
button.clearbox:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
button.clearbox[hidden] { display: none; }
/* an empty date or time box keeps its size on iPhones, which otherwise shrink it to nothing */
input:is([type=date], [type=time]) { min-height: 2.4rem; min-width: 8.5rem; }
/* a date and a time side by side (the calendar event form): equal halves, the boxes lined up along the bottom */
.pairgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem .8rem; align-items: end; max-width: 26rem; }
.pairgrid > label { margin: 0; min-width: 0; } .pairgrid input, .pairgrid .clearwrap { width: 100%; min-width: 0; box-sizing: border-box; }
.pairgrid .clearwrap { display: flex; }
/* iPhones and iPads (the only browsers with -webkit-touch-callout): their own date and time box won't shrink to fit
   its space (it spilled into the next box) and centres its value; plain boxes size like the rest and read from the left */
@supports (-webkit-touch-callout: none) {  /* min-width: 0 only where two share a line: elsewhere an empty one shrank to a sliver (Guests' paper form, 2026-12-03) */
  input:is([type=date], [type=time]) { -webkit-appearance: none; appearance: none; }
  .pairgrid input:is([type=date], [type=time]) { min-width: 0; }
  input:is([type=date], [type=time])::-webkit-date-and-time-value { text-align: left; }
}
/* The Business forms' date boxes (Due, Hold): a real width on iPhones too, where the rule above lets an empty one
   shrink to a sliver (Jim, 2026-11-20); and a line under it, since Safari's date box shows no mm/dd/yyyy hint */
input[type=date].datebox { width: 100%; max-width: 14rem; min-width: 10rem; box-sizing: border-box; }
.datehint { font-weight: normal; font-size: .8rem; color: var(--muted); }
/* Lead a meeting → Start a new meeting: each label above its box, the button after with room to breathe; on a phone the
   date and the leader side by side, the button on its own line, full width */
.startform { display: flex; flex-wrap: wrap; gap: .9rem 1rem; align-items: flex-end; margin: .4rem 0 1.2rem; }
.startform label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; font-weight: 600; margin: 0; }
.startform select { min-width: 12rem; } .startform label > :is(input, select) { font-weight: normal; }
@media (max-width: 560px) {
  .startform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .startform label > * { width: 100%; min-width: 0; box-sizing: border-box; }
  .startform .btn { grid-column: 1 / -1; margin-top: .3rem; padding-block: .7rem; justify-content: center; text-align: center; }
}
/* Correct these minutes: each item's box grows with its text; the attendance radios centred under their heading */
form.correct textarea { width: 100%; field-sizing: content; min-height: 2.6em; font-weight: normal; }
form.correct details.sec { margin: 0 0 .8rem; padding: .6rem 1.15rem; }
form.correct details.sec > summary { cursor: pointer; font-weight: 600; list-style: none; padding: .2rem 0; }
form.correct details.sec > summary::-webkit-details-marker { display: none; }
form.correct details.sec > summary::after { content: " ▾"; color: var(--muted); } form.correct details.sec[open] > summary::after { content: " ▴"; }
form.correct details.sec[open] > summary { margin-bottom: .6rem; } form.correct details.sec > summary .muted { font-weight: normal; margin-left: .3rem; }
.att-edit td:not(:first-child), .att-edit th:not(:first-child) { text-align: center; }
form.correct fieldset.guest { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: .5rem .9rem .7rem; margin: 0 0 .7rem; }
form.correct fieldset.guest legend { font-weight: 600; padding: 0 .3rem; }
form.correct .item { display: flex; gap: .4rem; align-items: flex-start; flex-wrap: wrap; margin: 0 0 .5rem; } form.correct .item textarea { flex: 1 1 16rem; }
form.correct .item .hint { flex-basis: 100%; margin: 0; }
/* the preview of a correction: version now | new version, like a side-by-side diff */
table.diff { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0 0 1.2rem; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.diff th, table.diff td { padding: .4rem .7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
table.diff td.old { border-right: 1px solid var(--border); } table.diff th.part { background: var(--surface-2); }
table.diff tr.same td { color: var(--muted); }
table.diff tr.removed td.old, table.diff del { background: var(--danger-soft); color: var(--danger-text); }
table.diff tr.added td.new, table.diff ins { background: color-mix(in srgb, #2e7d32 22%, var(--surface)); }
table.diff del, table.diff ins { border-radius: 3px; padding: 0 .1em; } table.diff ins { text-decoration: underline; } table.diff del { text-decoration: line-through; }  /* not by colour alone */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Remove: a checkbox that strikes the row out (and back) */
form.correct .rm input { position: absolute; opacity: 0; width: 1px; height: 1px; }
form.correct .rm:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
form.correct .rm .on, form.correct .rm:has(:checked) .off { display: none; } form.correct .rm:has(:checked) .on { display: inline; }
form.correct :is(.item, .guest):has(> .rm :checked) :is(textarea, input:not([type=checkbox])) { text-decoration: line-through; opacity: .5; }
form.correct .rm { width: fit-content; }
/* Pictures on reports, business items and comments (pictures.py) */
.pics { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0; }
.pics .pic { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .2rem; position: relative; }
/* Remove: a round × on the picture's corner (Jim, 2026-11-21); 44px to tap on a touch screen */
.picx { position: absolute; top: .25rem; right: .25rem; width: 1.9rem; height: 1.9rem; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--danger-text);
  font: inherit; font-size: 1.25rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.picx:hover { background: var(--danger-soft); }
@media (pointer: coarse) { .picx { top: 0; right: 0; width: 2.75rem; height: 2.75rem; } }
.pics img { width: 8rem; height: 6rem; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; }
.picadd input[type=file] { max-width: 100%; }

/* Formatted text in reports, business items and comments (richtext.py) */
.itemtext { margin: .2rem 0 .6rem; } .itemtext p, .ctext p { margin: .25rem 0; } .itemtext ul, .itemtext ol, .ctext ul, .ctext ol { margin: .2rem 0; padding-left: 1.3rem; }
/* The formatting toolbar (format.js), above the text box you're typing in; one row that scrolls sideways, so its height never changes. With the script on, the
   pictures' own file boxes give way to its Picture button. */
.fmtbar { display: flex; flex-wrap: nowrap; overflow-x: auto; contain: inline-size; align-items: center; gap: .25rem; margin: 0 0 .2rem; }  /* contain: its buttons never widen the column it sits in (a phone page scrolled sideways) */
.fmtbar .fmt { flex: none; white-space: nowrap; min-width: 2.2rem; min-height: 2rem; padding: .1rem .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.fmtbar .fmt-b { font-weight: 700; } .fmtbar .fmt-i { font-style: italic; }
.fmtbar .fmt:hover, .fmtbar .fmt:focus-visible { background: var(--surface-2); }
.fmtbar .fmt[hidden] { display: none; } .fmtnote { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.fmt:disabled { opacity: .45; cursor: default; }
/* The toolbar's Link form (format.js) */
dialog.fmtlink input[type=text] { width: 100%; height: 2.75rem; font-weight: normal; } dialog.fmtlink .hint { font-weight: normal; } dialog.fmtlink label.check { margin-top: .8rem; }
dialog.fmtlink .err { color: var(--danger-text); margin: .3rem 0 0; } dialog.fmtlink .err:empty { display: none; }
.fmtpreview { background: var(--surface-2); border: 1px solid var(--border); border-radius: .5rem; padding: .4rem .7rem; margin: .2rem 0; min-height: 3rem; overflow-wrap: anywhere; }
.fmtcount { display: block; text-align: right; font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.fmtbar .fmt .ico { width: 1.2rem; height: 1.2rem; display: inline-block; vertical-align: middle; }  /* the toolbar's line icons (format.js) */
@media (pointer: coarse) { .fmtbar { gap: .4rem; } .fmtbar .fmt { min-width: 44px; min-height: 44px; font-size: 1.15rem; } .fmtbar .fmt .ico { width: 1.5rem; height: 1.5rem; } }  /* a finger-sized tap */
.js-fmt .picfield { display: none; }
.mention-menu { position: fixed; z-index: 40; min-width: 12rem; max-width: calc(100vw - 1rem); }  /* the @ list (format.js), under its box */
.itemtext .who, .ctext .who { white-space: nowrap; font-size: .75rem; background: var(--surface-3, #dee8f0); border-radius: .6rem; padding: 0 .4rem; text-decoration: none; color: var(--accent-text, #192760); }  /* a mention on the Business page, like the minutes' name pill */

@media (pointer: coarse) { form.correct .rm, form.correct input[type=radio] { min-height: 44px; } form.correct .rm { display: inline-flex; align-items: center; } form.correct input[type=radio] { min-width: 44px; } }  /* a finger-sized tap */
.guestapp label:not(.check) { display: block; margin: .3rem 0 .2rem; } table.list td .guestapp select, .guestapp input[type=email] { width: 100%; max-width: 100%; font-size: inherit; } .guestapp h3 { font-size: 1rem; margin: 1.1rem 0 .3rem; }
.guestapp .dacts { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 .2rem; } .guestapp .dacts form { margin: 0; }  /* Guests: a guest's application dialog */
.guestapp label.check { display: flex; align-items: center; gap: .5rem; margin: .8rem 0 0; } .guestapp label.check + .dacts { margin-top: .8rem; } .guestapp form + h3 { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.apply .watermark { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 0; font-size: min(22vw, 11rem); font-weight: 800; letter-spacing: .05em; color: rgba(127, 127, 127, .09); transform: rotate(-30deg); }  /* Site → Membership's Preview the form: faint, over the page, never in the way */
