/* TeamCal styles. Light and dark themes; every color comes from the variables below. */
:root {
  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #eef1f6; --text: #172033; --muted: #5a6679;
  --line: #e1e6ee; --accent: #1f5fd6; --accent-fg: #ffffff; --danger: #c62828; --ok: #1b7f3b;
  --shadow: 0 8px 30px rgba(15, 23, 42, .18); --radius: 12px; --we: rgba(30, 41, 59, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* corners: --r-sm for buttons, inputs, notes and menu rows; --r-md for boxes inside a card; --r-lg for cards */
  --r-sm: 8px; --r-md: 10px; --r-lg: 14px;
  --warn-bg: #fef3c7; --warn-fg: #92400e; --warn-line: #f59e0b;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e131a; --surface: #161d27; --surface-2: #1e2733; --text: #e7ecf3; --muted: #97a3b6;
  --line: #2a3441; --accent: #6b9cff; --accent-fg: #0b1220; --danger: #ff7b7b; --ok: #5fd08a;
  --shadow: 0 8px 30px rgba(0, 0, 0, .5); --we: rgba(0, 0, 0, .24); color-scheme: dark;
  --warn-bg: #3b2a0c; --warn-fg: #fcd34d; --warn-line: #b7791f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131a; --surface: #161d27; --surface-2: #1e2733; --text: #e7ecf3; --muted: #97a3b6;
    --line: #2a3441; --accent: #6b9cff; --accent-fg: #0b1220; --danger: #ff7b7b; --ok: #5fd08a;
    --shadow: 0 8px 30px rgba(0, 0, 0, .5); --we: rgba(0, 0, 0, .24); color-scheme: dark;
    --warn-bg: #3b2a0c; --warn-fg: #fcd34d; --warn-line: #b7791f;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 var(--font); background: var(--bg); color: var(--text); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
code { font-family: var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12px; } .spacer { flex: 1; }
.error { color: var(--danger); margin: 6px 0; font-weight: 500; }
#editorErr .btn { margin-top: 6px; font-weight: 600; }
.error.banner { margin: 8px 16px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--danger); border-radius: var(--r-sm); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- buttons and inputs ---- */
.btn, .icon-btn, .linklike {
  font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: var(--r-sm); padding: 7px 12px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover, .icon-btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary.newbtn { background: var(--nb, var(--accent)); border-color: var(--nb, var(--accent)); color: var(--nbf, var(--accent-fg)); }
.btn.danger { color: var(--danger); }
.btn.quiet { border-color: transparent; background: none; color: var(--muted); }
.btn.quiet:hover { background: var(--surface-2); color: var(--text); }
.btn.block { width: 100%; margin-top: 8px; padding: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { padding: 6px 10px; font-size: 18px; line-height: 1; }
.linklike { border: 0; background: none; padding: 8px 12px; width: 100%; justify-content: flex-start; border-radius: 0; }
.linklike:hover { background: var(--surface-2); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 10px; min-width: 0; width: 100%;
}
/* one size for every checkbox and radio: flex: none stops a long label from squeezing the box smaller */
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; flex: none; padding: 0; accent-color: var(--accent); cursor: pointer; }
/* a password with a Show / Hide button inside its right edge (common.js adds the button) */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { padding-right: 44px; }
.pw-eye { position: absolute; top: 0; right: 0; bottom: 0; width: 42px; display: grid; place-items: center; padding: 0; border: 0; background: none;
  color: var(--muted); cursor: pointer; border-radius: 0 var(--r-sm) var(--r-sm) 0; font: inherit; font-size: 12px; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--text); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
input::-ms-reveal { display: none; }   /* Edge's own eye button, so there are not two */
input[type="color"] { padding: 2px; width: 44px; height: 36px; cursor: pointer; }
textarea { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > span, .field > .lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; cursor: pointer; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.narrow { width: 72px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-md); margin: 0 0 14px; padding: 10px 14px 2px; }
legend { padding: 0 6px; font-weight: 600; font-size: 13px; }

/* ---- cards and centered pages ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.center-page { display: grid; place-items: center; min-height: 100%; padding: 16px; }
.center-page .card { width: min(520px, 100%); } .center-page .card.narrow { width: min(380px, 100%); }
.aside-link { text-align: center; margin: 14px 0 0; font-size: 14px; }
.note-ok { padding: 10px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent) 10%, transparent); }
/* small grey label, for example a sign-in's level or "Switched off" */
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
/* a one-line result under a form: green when it worked, red (with .error) when it did not */
.status-line { color: var(--ok); font-weight: 600; }
.status-line.error { color: var(--danger); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.brand { color: inherit; text-decoration: none; }
.brand.big { margin-bottom: 14px; } .brand.big h1 { font-size: 22px; white-space: normal; }
.logo { display: inline-block; width: 22px; height: 22px; border-radius: 6px; flex: none;
  background: url("brand/teamcal-mark.svg") center / contain no-repeat; }   /* the standard logo: the TeamCal mark */
.logo.has-icon { display: inline-grid; place-items: center; }
.logo-img { border-radius: 6px; object-fit: contain; flex: none; }
.ic { vertical-align: -2px; margin-right: 4px; flex: none; }
.btn .ic, .seg .ic, .chip .ic { margin-right: 0; }

/* ---- app shell ---- */
body.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.topbar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 10px 16px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav h2 { font-size: 17px; margin-left: 8px; min-width: 150px; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.seg button { font: inherit; border: 0; background: none; padding: 7px 14px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: block; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.menu-pop { position: absolute; right: 0; top: 42px; z-index: 20; min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 4px 0; }
.menu-pop a, .menu-pop .menu-who { display: block; padding: 8px 12px; text-decoration: none; color: var(--text); }
.menu-pop a, .menu-pop .linklike { display: flex; align-items: center; gap: 10px; }
.menu-pop .mi { flex: none; color: var(--muted); }
.menu-pop a:hover { background: var(--surface-2); }
.menu-who { border-bottom: 1px solid var(--line); margin-bottom: 4px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.legend.inline { padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.chip .dot { width: 13px; height: 13px; border-radius: 50%; background: var(--c); border: 2px solid var(--c); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.chip[aria-pressed="false"] { color: var(--muted); } .chip[aria-pressed="false"] .dot { background: transparent; }
/* each event type's legend pill is outlined in that type's color (paler while the type is hidden) */
.legend .chip { border: 1.5px solid var(--c, var(--line)); }
.legend .chip[aria-pressed="false"] { border-color: color-mix(in srgb, var(--c, var(--line)) 40%, var(--line)); }
.legend.static .chip { cursor: default; }
.cal-wrap { flex: 1; min-height: 0; padding: 0 16px 16px; display: flex; flex-direction: column; }
.cal-wrap > * { flex: 1 1 auto; min-height: 0; }

/* ---- week view ---- */
.wk { --gutter: 56px; --hh: 52px; position: relative; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.wk-sticky { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.wk-head, .wk-allday, .wk-body { display: grid; grid-template-columns: var(--gutter) repeat(var(--cols), minmax(0, 1fr)); }
.wk-dayhead { text-align: center; padding: 7px 4px 6px; border-left: 1px solid var(--line); min-width: 0; }
.wk-dayhead .dow { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.wk-dayhead .dom { display: inline-block; font-size: 20px; font-weight: 600; line-height: 1.5; min-width: 34px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.wk-dayhead.is-today .dom { background: var(--accent); color: var(--accent-fg); }
.wk-dayhead.is-today .dow { color: var(--accent); font-weight: 700; }
/* board-style day headings (wall screen): "Today" or the day name on the left, the date on the right */
.wk-dayhead.bdh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 12px; text-align: left; }
.wk-dayhead.bdh .dow { display: inline; font-size: 13px; letter-spacing: .08em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wk-dayhead.bdh .dom { font-size: 17px; font-weight: 700; line-height: inherit; min-width: 0; border-radius: 0; white-space: nowrap; }
.wk-dayhead.bdh.is-today .dom { background: none; color: inherit; }
.wk-allday { grid-auto-rows: minmax(24px, auto); padding-bottom: 3px; border-top: 1px solid var(--line);
  max-height: min(34vh, 160px); overflow-y: auto; overscroll-behavior: contain; }   /* a busy day cannot squeeze the hours away */
.wk-allday .wk-gutter { grid-row: 1; grid-column: 1; font-size: 10px; color: var(--muted); text-align: right; padding: 6px 6px 0 0; text-transform: uppercase; letter-spacing: .04em; }
.wk-allcell { border-left: 1px solid var(--line); grid-row: 1 / span var(--rows); cursor: cell; }
/* bars-only week (wall screen): the bar area fills the height, with the day columns running to the bottom */
.wk.allbars { --gutter: 8px; display: flex; flex-direction: column; }
.wk.allbars .wk-sticky { position: static; flex: 1 0 auto; display: flex; flex-direction: column; border-bottom: 0; }
.wk.allbars .wk-allday { flex: 1 0 auto; max-height: none; grid-template-rows: repeat(var(--rows), minmax(26px, auto)) 1fr; grid-auto-rows: auto; }
.wk.allbars .bar { font-size: 15px; }
.wk-dayhead.we, .wk-allcell.we, .wk-col.we, .mo-cell.we { background-color: var(--we); }
.wk-allcell.is-today, .wk-col.is-today { background-color: color-mix(in srgb, var(--accent) 7%, transparent); }
.wk-body { position: relative; }
.wk-hours { position: relative; height: calc(var(--hh) * var(--hours)); }
.wk-hour { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wk-hour.first { transform: translateY(2px); }
.wk[data-dense="2"] .wk-hour.odd, .wk[data-dense="3"] .wk-hour.no3 { visibility: hidden; }
.wk-col { position: relative; height: calc(var(--hh) * var(--hours)); border-left: 1px solid var(--line); cursor: cell;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hh) - 1px), var(--line) calc(var(--hh) - 1px), var(--line) var(--hh)); }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.wk-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.ev { position: absolute; z-index: 2; left: calc(var(--l) * 100% + 2px); width: calc(var(--w) * 100% - 4px);
  top: calc(var(--hh) * var(--t)); height: calc(var(--hh) * var(--d) - 2px); min-height: 18px;
  background: var(--c); color: var(--fg); border: 0; border-radius: 7px; padding: 2px 6px 2px 8px; text-align: left; font: inherit; font-size: 12px; line-height: 1.3;
  overflow: hidden; cursor: pointer; box-shadow: inset 3px 0 0 rgba(0, 0, 0, .22); }
.ev:hover { filter: brightness(1.07); }
.ev .t { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ev .tm { display: block; opacity: .9; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.short { display: flex; gap: 6px; align-items: baseline; }
.ev.short .t { white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.ev.short .tm { flex: 0 100 auto; min-width: 0; }

/* week view with the "next two weeks" panel beside it */
.wkp { display: grid; grid-template-columns: minmax(0, 1fr) clamp(230px, 28%, 380px); grid-template-rows: minmax(0, 1fr); gap: 10px; min-height: 0; }
.wkp > .wk, .wkp > .pn { min-height: 0; height: 100%; }
.pn { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pn-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 14px 8px; border-bottom: 1px solid var(--line); }
.pn-head h3 { font-size: 14px; } .pn-range { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pn-body { flex: 1; overflow: auto; padding: 2px 6px 8px; }
.pn-day { padding: 4px 2px 2px; }
.pn-date { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 8px 3px; }
.pn-day.is-today .pn-date { color: var(--accent); }
.pn-item { display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 9px; width: 100%; padding: 4px 8px; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; border-radius: 8px; }
.pn-item:hover { background: var(--surface-2); }
.pn-item .strip { align-self: stretch; border-radius: 4px; background: var(--c); }
.pn-time { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pn-ttl { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.pn-empty { padding: 20px 12px; text-align: center; color: var(--muted); }

/* bars (all-day and multi-day) and pills (timed events in month view) */
.bar, .pill { font: inherit; font-size: 13px; line-height: 1.3; text-align: left; cursor: pointer; border: 0; border-radius: 6px;
  margin: 1px 3px; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; z-index: 1; }
.bar { background: var(--c); color: var(--fg); font-weight: 600; font-size: 14px; }
.pill { background: color-mix(in srgb, var(--c) 17%, var(--surface)); color: var(--text); box-shadow: inset 3px 0 0 var(--c); padding-left: 9px; }
.pill .tm { color: var(--muted); margin-right: 5px; font-variant-numeric: tabular-nums; }
.pill.custom { background: var(--c); color: var(--fg); font-weight: 600; box-shadow: inset 3px 0 0 rgba(0, 0, 0, .22); }
.pill.custom .tm { color: inherit; opacity: .85; font-weight: 400; }
.bar:hover, .pill:hover { filter: brightness(1.06); }
.bar.cont-l, .pill.cont-l { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar.cont-r, .pill.cont-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rep { opacity: .8; margin-left: 4px; }

/* ---- month view ---- */
.mo { display: flex; flex-direction: column; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mo-head, .mo-week { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.mo-head { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.mo-head div { padding: 7px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.mo-week { position: relative; flex: 1 0 auto; min-height: 104px; border-top: 1px solid var(--line); }
.mo-head + .mo-week { border-top: 0; }
.mo-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.mo-cell { border-left: 1px solid var(--line); padding: 4px 7px; cursor: cell; font-variant-numeric: tabular-nums; }
.mo-cell:first-child { border-left: 0; }
.mo-bars { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: 28px; grid-auto-rows: minmax(22px, auto); align-content: start; padding-bottom: 6px; pointer-events: none; }
.mo-bars > .bar, .mo-bars > .pill { pointer-events: auto; }
.mo-cell .num { display: inline-block; min-width: 24px; text-align: center; border-radius: 999px; font-size: 12px; color: var(--muted); line-height: 22px; }
.mo-cell.other .num { opacity: .5; } .mo-cell.other { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.mo-cell.is-today .num { background: var(--accent); color: var(--accent-fg); font-weight: 700; }

/* ---- agenda ---- */
.ag { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 0; }
.ag-day { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; padding: 10px 18px; border-top: 1px solid var(--line); }
.ag-day:first-child { border-top: 0; }
.ag-date { font-weight: 600; } .ag-date small { display: block; color: var(--muted); font-weight: 400; }
.ag-day.is-today .ag-date { color: var(--accent); }
.ag-item { display: grid; grid-template-columns: 4px 130px 1fr auto; gap: 10px; align-items: center; padding: 5px 8px; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; border-radius: 8px; width: 100%; }
.ag-item:hover { background: var(--surface-2); }
.ag-item .strip { align-self: stretch; border-radius: 4px; background: var(--c); }
.ag-item .tm { color: var(--muted); font-variant-numeric: tabular-nums; } .ag-item .ty { color: var(--muted); font-size: 12px; }
.ag-empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---- dialogs ---- */
dialog.dlg { border: 0; padding: 0; border-radius: 16px; width: min(580px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog.dlg.small { width: min(400px, calc(100vw - 20px)); }
.only-phone { display: none; }
dialog::backdrop { background: rgba(8, 12, 20, .55); }
.dlg form { display: flex; flex-direction: column; max-height: calc(100dvh - 20px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg-head h3 { font-size: 17px; }
.dlg-body { padding: 16px 18px 4px; overflow: auto; }
.dlg-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.req-hint { margin: -6px 0 10px; }
.dt { display: flex; gap: 6px; }
.dt input[type="date"] { flex: 1 1 60%; } .dt input[type="time"] { flex: 1 1 40%; min-width: 120px; }
.repeat-box { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.repeat-box .row { margin-bottom: 8px; } .repeat-box select, .repeat-box input[type="date"] { width: auto; }
.weekdays { display: flex; gap: 6px; margin-bottom: 10px; }
.weekdays button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.weekdays button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 700; }
.radios .check { margin-bottom: 10px; }
/* "Mark completed": the event's text is struck through everywhere it shows */
.lbl-t.done, #fTitle.is-done { text-decoration: line-through; text-decoration-thickness: 2px; }
.done-check { margin: -4px 0 12px; } .done-check .muted { font-weight: 400; }
.done-badge { color: var(--ok); font-weight: 600; font-size: 13px; margin: 0 0 6px; }
.detail-meta { color: var(--muted); margin: 2px 0 10px; } .detail-notes { white-space: pre-wrap; }
.detail-rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 4px 0 12px; }
.detail-rows dt { color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 1px; } .detail-rows dd { margin: 0; overflow-wrap: anywhere; }
/* the Type list in the event dialog: each type with its icon and color (editor.js) */
.type-field { position: relative; }
.tp-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tp-btn { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px; width: 100%;
  display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer; min-height: 38px; }
.tp-btn:hover { border-color: var(--muted); }
.tp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tp-caret { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); flex: none; }
.tp-btn[aria-expanded="true"] .tp-caret { transform: translateY(2px) rotate(-135deg); }
.tp-chip { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; }
.tp-chip.dot { width: 12px; height: 12px; margin: 0 5px; border-radius: 50%; }
.tp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; max-height: 280px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); }
.tp-list:focus { outline: none; }
.tp-list li { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--r-sm); cursor: pointer; }
.tp-list li.on { background: var(--surface-2); }
.tp-list li[aria-selected="true"] { font-weight: 700; }
.tp-list li[aria-selected="true"]::after { content: ""; margin-left: auto; width: 5px; height: 10px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg) translate(-2px, -1px); flex: none; }
.type-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; } .type-badge i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }

/* ---- event type options (settings; the layout of the page itself is in settings.css) ---- */
.type-list { list-style: none; margin: 8px 0 14px; padding: 0; display: grid; gap: 8px; }
.type-list li { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; background: var(--surface); }
.type-top { display: flex; gap: 8px; align-items: center; }
.type-top input[type="text"] { flex: 1; }
.type-opts { margin-top: 6px; }
.type-opts > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 2px; }
.type-opts > summary .sample { margin-left: 10px; }
.sample { display: inline-block; padding: 1px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; vertical-align: middle; }
.sample.big { font-size: 13px; padding: 3px 12px; }
.opts-body { display: grid; gap: 10px; padding: 8px 4px 4px; }
.opt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.opt-label { min-width: 130px; font-size: 12px; font-weight: 600; color: var(--muted); }
.opt-row select { width: auto; max-width: 100%; } .opt-row input[type="text"] { width: 190px; }
.check.inline { display: inline-flex; margin: 0; }
.check.top { align-items: flex-start; } .check.top input { margin-top: 3px; }
.req-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hint { margin: -4px 0 0 142px; }
.btn-set { margin-top: 4px; }
.row.tight { margin: 0; }
.copyrow { display: flex; gap: 8px; } .copyrow input { font-family: var(--mono); font-size: 12px; }
.status { position: sticky; top: 8px; z-index: 10; margin: 0; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--ok); color: var(--ok); font-weight: 600; box-shadow: var(--shadow); }
.status.bad { border-color: var(--danger); color: var(--danger); }

/* ---- embed ---- */
body.embed { height: 100vh; height: 100dvh; overflow: hidden; }
body.nobars, body.nobars * { scrollbar-width: none; }
body.nobars *::-webkit-scrollbar { display: none; }
body.embed.transparent, body.embed.transparent .embed-app { background: transparent; }
.embed-app { height: 100%; display: flex; flex-direction: column; padding: 8px; gap: 6px; }
.embed-head { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.embed-head h1 { font-size: 15px; font-weight: 700; margin-right: auto; font-variant-numeric: tabular-nums; }
.embed-nav { display: flex; gap: 4px; }
/* wall screen: the buttons on the left, the date range on the right */
.src-dash .embed-nav { order: 1; } .src-dash .embed-head .seg { order: 2; }
.src-dash .embed-head h1 { order: 3; margin-right: 0; margin-left: auto; }
.src-dash #embedLegend { order: 4; } .src-dash .embed-head .newbtn { order: 5; }
/* The two header rows only split apart for an embed with an add button (SharePoint); elsewhere they act as one row, as before. */
.embed-top, .embed-row { display: contents; }
body.embed:not(.src-dash) .embed-head.has-add { flex-direction: column; align-items: stretch; gap: 8px; }
body.embed:not(.src-dash) .has-add .embed-top { display: flex; align-items: center; gap: 12px; }
body.embed:not(.src-dash) .has-add .embed-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
body.embed:not(.src-dash) .has-add :is(.embed-top, .embed-row, .legend) { min-width: 0; max-width: 100%; }   /* phones: the legend scrolls instead of widening the header */
/* a large add button on its own row, at the right, so it is quick to find */
body.embed:not(.src-dash) .embed-head.has-add .newbtn { margin-left: auto; padding: 7px 16px; font-size: 14px; font-weight: 600; gap: 7px; border-radius: 8px;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--nb, var(--accent)) 35%, transparent); }
body.embed:not(.src-dash) .embed-head.has-add .newbtn svg { width: 17px; height: 17px; }
/* Month view: today's cell is outlined in the same color as its date */
.embed .mo-cell.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
/* a today in a bottom corner follows the calendar's rounded corner instead of looking cut off */
.embed .mo-week:last-child .mo-cell.is-today:first-child { border-bottom-left-radius: calc(var(--radius) - 1px); }
.embed .mo-week:last-child .mo-cell.is-today:last-child { border-bottom-right-radius: calc(var(--radius) - 1px); }
.embed .cal-wrap { padding: 0; }
.embed .chip { padding: 2px 9px; font-size: 12px; }
/* wall screen: a bolder legend, so each color and icon can be picked out from across the room */
.src-dash .ev, .src-dash .bc, .src-dash .ag-item, .src-dash .pn-item { font-family: var(--f-events, var(--font)); }   /* Settings > Branding > Fonts */
.src-dash .chip { padding: 3px 11px 3px 9px; font-size: 14px; font-weight: 600; gap: 7px; }
.src-dash .chip .dot { width: 16px; height: 16px; }
.src-dash .chip .chip-ic { width: 19px; height: 19px; stroke-width: 2.8; }
/* wall screen: event bars and the Agenda panel a size up, to read from across the room */
.src-dash .wk.allbars .bar { font-size: 18px; padding: 4px 10px; }
.src-dash .wk.allbars .bar .ic { width: 17px; height: 17px; vertical-align: -2px; }
.src-dash .bc { font-size: 18px; }
.src-dash .bc .ic { width: 17px; height: 17px; }
.src-dash .pill { font-size: 15px; }
.src-dash .mo-bars > .bar { font-size: 16px; }
.src-dash .pn-head h3 { font-size: 16px; } .src-dash .pn-range { font-size: 13px; }
.src-dash .pn-date { font-size: 13px; }
.src-dash .pn-time { font-size: 13px; }
.src-dash .pn-ttl { font-size: 17px; }
.src-dash .pn-ttl .ic { width: 16px; height: 16px; vertical-align: -2px; }

/* ---- phones and small tablets: the calendar needs the screen, so the chrome around it stays thin ---- */
@media (max-width: 760px) {
  .wkp { grid-template-columns: 1fr; grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); }
  .cols2 { grid-template-columns: 1fr; } .hint { margin-left: 0; }
  .cal-wrap { padding: 0 8px 8px; }
  .wk { --gutter: 44px; }
  .ag-day { grid-template-columns: 1fr; } .ag-item { grid-template-columns: 4px 1fr; } .ag-item .ty { display: none; }
  .ag-item .strip { grid-row: span 2; } .ag-item .ttl { grid-column: 2; }   /* time above the title, both beside the color strip */
  /* wall screen opened on a phone: the dates alone in the week headings, so they don't run together */
  .src-dash .wk-dayhead.bdh { justify-content: center; padding: 8px 4px; }
  .src-dash .wk-dayhead.bdh .dow { display: none; }
  .src-dash .wk-dayhead.bdh.is-today .dom { color: var(--accent); }
  .only-phone { display: inline-flex; }

  /* three thin rows: who we are and what to do, then where we are, then which view */
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; padding: 6px 10px calc(4px + env(safe-area-inset-bottom, 0px)); align-items: center; }
  .topbar .brand { grid-column: 1; }
  .topbar .brand h1 { font-size: 16px; }
  .actions { grid-column: 2; grid-row: 1; margin-left: 0; gap: 6px; }
  .nav { grid-column: 1 / -1; grid-row: 2; gap: 4px; }
  .nav h2 { min-width: 0; font-size: 15px; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .seg { grid-column: 1 / -1; grid-row: 3; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: 1 0 auto; padding: 8px 12px; }

  /* search hides behind the magnifier until it is wanted */
  .search { grid-column: 1 / -1; grid-row: 4; flex: 1 1 100%; display: none; }
  body.searching .search { display: block; }
  body.searching .search-pop { width: calc(100vw - 20px); }

  /* one scrolling line of event types instead of two or three wrapped rows */
  .legend { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 10px 6px; }
  .legend::-webkit-scrollbar { display: none; }
  .legend .chip { flex: none; }
  .legend.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }

  /* the day and week grids: a touch is not a mouse pointer, so rows need room */
  .wk-dayhead { padding: 5px 2px; }
  .wk-allday { max-height: 28vh; }
  .wk.one .wk-head { display: none; }   /* the heading above already names the day */
  .wk.one { --gutter: 52px; }
  .bd { gap: 8px; }
}

/* ---- anything driven by touch: bigger targets, and type large enough that iPhones do not zoom in on a tap ---- */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; padding: 10px 12px; }
  .btn, .icon-btn, .seg button, .chip { min-height: 40px; }
  .btn, .seg button { padding-top: 9px; padding-bottom: 9px; }
  .check { min-height: 40px; }
  .tp-btn { min-height: 44px; } .tp-list li { padding: 11px 8px; }
  .pw-wrap > input { padding-right: 52px; } .pw-eye { width: 50px; }
  input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }
  .menu-pop a, .menu-pop .linklike { padding: 12px; }
  .search-item { padding: 11px 8px; }
  .ev, .bar, .pill, .bc, .ag-item { touch-action: manipulation; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .icon-btn, .chip, .ev, .bar, .pill { transition: filter .12s, background-color .12s; } }

/* ---- board view: one column per day, a card per event ---- */
.bd { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 10px; min-height: 0; height: 100%; }
.bd-col { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bd-col.we { background-color: color-mix(in srgb, var(--we) 100%, var(--surface)); }
.bd-col.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.bd-col.is-past { opacity: .72; }
.bd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.bd-dow { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.bd-col.is-today .bd-dow { color: var(--accent); }
.bd-dom { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bd-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 8px; cursor: cell; }
.bc { flex: none; display: block; width: 100%; background: var(--c); color: var(--fg); border: 0; border-radius: 9px; padding: 8px 10px 8px 12px;
  text-align: left; font: inherit; font-size: 15px; line-height: 1.3; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; box-shadow: inset 4px 0 0 rgba(0, 0, 0, .22); }
.bc:hover { filter: brightness(1.07); }
.bc-time { display: inline-flex; align-items: center; gap: 4px; margin-right: 7px; padding: 0 7px 0 5px; border-radius: 6px; font-weight: 700; white-space: nowrap;
  background: color-mix(in srgb, var(--fg) 20%, transparent); font-variant-numeric: tabular-nums; vertical-align: 1px; }
.bc-time .ic { margin: 0; }
.bc .bc-type { margin-right: 5px; }
.bc-sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; opacity: .85; }
.bd-more { flex: none; border: 0; background: var(--surface-2); color: var(--text); border-radius: 8px; padding: 6px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.bd-more:hover { background: var(--line); }
.day-list { display: grid; gap: 4px; padding-bottom: 14px; }
.day-list .ag-item { grid-template-columns: 4px 120px 1fr; }

/* ---- search, toast, small warnings ---- */
.search { position: relative; flex: 0 1 220px; min-width: 150px; }
.search input { padding: 7px 10px; }
.search-pop { position: absolute; left: 0; top: 40px; z-index: 30; width: min(460px, 92vw); max-height: 60vh; overflow: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 4px; }
.search-item { display: grid; grid-template-columns: 10px 112px minmax(0, 1fr); gap: 0 10px; align-items: baseline; width: 100%; text-align: left; border: 0; background: none;
  color: var(--text); font: inherit; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.search-item:hover, .search-item:focus-visible { background: var(--surface-2); }
.search-item i { width: 9px; height: 9px; border-radius: 50%; align-self: center; }
.si-when { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.si-ttl { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-meta { grid-column: 3; color: var(--muted); font-size: 12px; }
.search-none { padding: 12px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: 14px;
  background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; }
.toast-btn { border: 0; background: none; color: #93c5fd; font: inherit; font-weight: 700; cursor: pointer; padding: 2px 4px; }
.chip-warn { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-line); white-space: nowrap; }
.chip .chip-ic { width: 16px; height: 16px; color: var(--c); stroke-width: 2.6; }   /* a heavier line, so the legend reads from a distance */
.embed-head .seg button { padding: 4px 11px; font-size: 13px; }
.embed-head .btn, .embed-head .icon-btn { padding: 4px 11px; font-size: 13px; }
.embed-head .icon-btn { font-size: 17px; padding: 2px 10px; }

@media (max-width: 760px) {
  .bd { grid-template-columns: 1fr; grid-auto-rows: max-content; align-content: start; height: auto; overflow: auto; }
  .bd-body { overflow: visible; }

  /* the add/edit box fills the phone, with its title and buttons always in reach */
  dialog.dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .dlg form { max-height: 100dvh; height: 100dvh; }
  .dlg-head { position: sticky; top: 0; z-index: 2; background: var(--surface); padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .dlg-body { flex: 1; -webkit-overflow-scrolling: touch; }
  .dlg-foot { position: sticky; bottom: 0; background: var(--surface); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dlg-foot .btn { flex: 1 1 auto; justify-content: center; }
  .dlg-foot .btn.quiet, .dlg-foot .spacer { flex: 0 0 auto; }
  dialog.dlg.small { width: min(420px, calc(100vw - 20px)); height: auto; max-height: calc(100dvh - 40px); border-radius: 16px; margin: auto; }
  dialog.dlg.small .dlg form { height: auto; }
}

/* installed on a home screen: no browser bar, so give the top row a little more air */
@media (display-mode: standalone) {
  .topbar { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
}

/* ---- TeamCal + Dashboard product brand (the logo's blue, green and orange) ---- */
:root { --tc-blue: #1c4e8c; --tc-green: #43a047; --tc-orange: #f26a1b; --tc-ink: #3b4552; }
:root[data-theme="dark"] { --tc-blue: #7fb0f5; --tc-green: #5fd08a; --tc-orange: #ff8a45; --tc-ink: #c3cedc; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --tc-blue: #7fb0f5; --tc-green: #5fd08a; --tc-orange: #ff8a45; --tc-ink: #c3cedc; }
}
/* the full logo comes in a light-background and a dark-background version; show the one that suits the theme */
.lk-dark { display: none; }
:root[data-theme="dark"] .lk-light { display: none; }
:root[data-theme="dark"] .lk-dark { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lk-light { display: none; }
  :root:not([data-theme="light"]) .lk-dark { display: inline-block; }
}
/* a thin blue, green and orange stripe under a page's top bar */
.brand-stripe { position: relative; }
.brand-stripe::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--tc-blue) 0 62%, var(--tc-green) 62% 84%, var(--tc-orange) 84%); }
.by-line { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.by-line a { color: inherit; font-weight: 600; text-decoration: none; }
.by-line a:hover { color: var(--tc-blue); text-decoration: underline; }
.by-line img { vertical-align: -3px; margin-right: 2px; }

/* ---- the pages around the calendar (sign-in, error pages, set-up, My account, the user guide, Settings) ----
 * One look for all of them: the logo's blue for buttons and links, a white top bar with the brand stripe,
 * and page titles in bold blue. The calendar itself and the wall screen keep their own colors. */
body.center-page, body.doc-page, body.settings { --accent: var(--tc-blue); }
body.doc-page .topbar, body.settings .topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.center-page .brand.big h1 { color: var(--tc-blue); font-weight: 800; letter-spacing: -.01em; }

/* ---- wall screen: weather alerts take over the week view's last day column ---- */
.alert-col { position: absolute; top: 0; bottom: 0; z-index: 6; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px;
  padding: 14px 14px 10px; overflow: hidden; background: #b91c1c; color: #fff; border-radius: 0 var(--radius) var(--radius) 0;
  animation: al-glow 2.4s ease-in-out infinite; }
.al-item { text-align: left; }   /* the icon and heading are centered; the text under them reads left to right */
.al-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; }
.al-ic { flex: none; line-height: 0; }
.al-ic svg { width: 46px; height: 46px; overflow: visible; }
.al-cloud { fill: #fff; }
.al-bolt { fill: #facc15; animation: al-flash 1.8s ease-in-out infinite; }
.al-tri { fill: #facc15; transform-box: fill-box; transform-origin: center; animation: al-pulse 1.6s ease-in-out infinite; }
.al-mark { fill: none; stroke: #7f1d1d; stroke-width: 2.4; stroke-linecap: round; }
.alert-col h3 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.15; text-align: center; }
.al-until { margin: 3px 0 0; font-size: 13px; font-weight: 600; opacity: .9; }
.al-text { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.al-desc { margin: 12px 0 0; font-size: 13.5px; line-height: 1.35; opacity: .92; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.al-item.more { border-top: 1px solid rgba(255, 255, 255, .3); padding-top: 12px; }
.al-item.more .al-head { margin-bottom: 8px; }
.al-head > div { text-align: center; }
.al-item.more h3 { font-size: 16px; }
.al-item.more .al-ic svg { width: 30px; height: 30px; }
.al-foot { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.al-foot:last-child { margin-top: auto; }
@keyframes al-glow { 0%, 100% { box-shadow: inset 0 0 0 3px rgba(254, 202, 202, .35); } 50% { box-shadow: inset 0 0 0 3px rgba(254, 202, 202, .95); } }
@keyframes al-flash { 0%, 45%, 65%, 100% { opacity: 1; } 52% { opacity: .15; } 58% { opacity: 1; } 61% { opacity: .3; } }
@keyframes al-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ---- contact form (contact.php) ---- */
.center-page .card.contact-card { width: min(600px, 100%); }
.contact-card .brand h1 { white-space: normal; }
.contact-card .form-grid.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.contact-card textarea { resize: vertical; min-height: 140px; }
.contact-note { margin-top: 14px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- unread contact messages: a red dot on an Admin's initial ---- */
.avatar, .who-av { position: relative; }
.msg-dot { position: absolute; top: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 2px var(--surface, #fff); }
.msg-dot[hidden] { display: none; }
.menu-pop .msg-count, .s-nav .msg-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.menu-pop .msg-count[hidden], .s-nav .msg-count[hidden] { display: none; }

/* ---- formatted text: the editor (assets/richtext.js) for event notes and the invitation email, and the notes it wrote ---- */
.rt { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); position: relative; }
.rt:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.rt-bar select { width: auto; padding: 3px 6px; font-size: 13px; border-radius: 6px; }
.rt-font { max-width: 150px; } .rt-size { margin-right: 4px; }
.rt-btn { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 6px;
  background: none; color: var(--text); cursor: pointer; }
.rt-btn:hover { background: var(--surface); border-color: var(--line); }
.rt-btn[aria-pressed="true"] { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.rt-cbar { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 3px; border-radius: 2px; background: currentColor; }
.rt-pop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.rt-pop[hidden] { display: none; }
.rt-sw { width: 24px; height: 24px; padding: 0; border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.rt-sw:hover { box-shadow: 0 0 0 2px var(--accent); }
.rt-auto { font: inherit; font-size: 12px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.rt-any { width: 32px; height: 26px; }
.rt-url { flex: 1 1 200px; padding: 5px 8px; }
.rt-bad { flex-basis: 100%; color: var(--danger); font-size: 12px; }
.rt-area { min-height: 84px; max-height: 320px; overflow-y: auto; padding: 8px 10px; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; }
.rt.tall .rt-area { min-height: 300px; max-height: 560px; }
.rt.empty .rt-area::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rt-area ul, .rt-area ol, .rich ul, .rich ol { margin: 4px 0; padding-left: 24px; }
.rt-area a, .rich a { color: var(--accent); }
.rich { white-space: pre-wrap; overflow-wrap: anywhere; }
/* the color list's Black would vanish on the dark theme, so it shows as the theme's text color there */
:root[data-theme="dark"] :is(.rich, .rt-area) [style*="color: rgb(17, 24, 39)"] { color: var(--text) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.rich, .rt-area) [style*="color: rgb(17, 24, 39)"] { color: var(--text) !important; } }
@media (pointer: coarse) {
  .rt-btn { width: 38px; height: 38px; }
  .rt-bar select { font-size: 16px; padding: 6px 8px; }
  .rt-area { font-size: 16px; }
}
