/* Activate Topeka v2. Brand colors and the font arrive as variables from the site's theme row (layout.tsx);
   this file only defines neutrals and layout. Built from the brand kit (brand/, 13 Oct 2026): calm, one typeface,
   sentence case, gold only on the main button, each day marked by a small calendar page with the weekday on top. */
:root {
  --bg: #f6f7fa; --surface: #ffffff; --ink: #121a33; --muted: #566079; --line: #dde2ec; --soft: #eef1f7;
  --focus: var(--brand);
  --r: 10px; --r-sm: 8px; --tap: 44px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a1226; --surface: #111b36; --ink: #e9edf6; --muted: #a2adc6; --line: #26324f; --soft: #18244a; color-scheme: dark; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font); }
a { color: inherit; }
img { max-width: 100%; }
.icon { flex: none; vertical-align: -3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--brand); }
.bar { max-width: 1040px; margin: 0 auto; padding: 0 16px; height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; min-width: 0; }
.brand .lockup { display: block; height: 44px; width: auto; }
.brand .mark { display: block; width: 64px; height: 64px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.wordmark { font-weight: 800; font-size: 24px; letter-spacing: -0.01em; white-space: nowrap; color: #fff; }
.wm2 { color: var(--green-bright); }
.tagline { font-size: 12px; font-weight: 500; color: rgb(255 255 255 / 0.7); margin-top: 2px; }
.nav { display: flex; gap: 4px; }
.nav a { color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; padding: 0 12px; border-radius: var(--r-sm); min-height: var(--tap); display: inline-flex; align-items: center; }
.nav a:hover { background: rgb(255 255 255 / 0.08); }
.nav a[aria-current="page"] { background: rgb(255 255 255 / 0.14); }
@media (max-width: 520px) {
  .bar { height: auto; min-height: 64px; flex-wrap: wrap; gap: 0 6px; padding: 8px 12px; }
  .bar:has(.nav a:nth-child(3)) .nav { flex-basis: 100%; justify-content: space-between; border-top: 1px solid rgb(255 255 255 / 0.12); margin-top: 6px; padding-top: 4px; }
  .bar:has(.nav a:nth-child(3)) .nav a { flex: 1; justify-content: center; }
  .brand { gap: 8px; }
  .brand .lockup { height: 34px; }
  .brand .mark { width: 46px; height: 46px; }
  .wordmark { font-size: 16px; }
  .tagline { display: none; }
  .nav { gap: 0; }
  .nav a { padding: 0 8px; font-size: 14px; }
}

/* ---------- hero: the navy band with the headline and the mark large (from the Flag Poster look he liked) ---------- */
.site-header { box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.12); }
.hero { background: var(--brand); border-bottom: 6px solid var(--accent); }
.hero-inner { max-width: 1040px; margin: 0 auto; padding: 40px 16px 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-title { margin: 0; color: #fff; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; font-weight: 800; letter-spacing: -0.015em; max-width: 15ch; text-wrap: balance; }
.hero-mark { width: 180px; height: 180px; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark { animation: turn-in 900ms cubic-bezier(.2,.7,.2,1) both; }
  @keyframes turn-in { from { transform: rotate(-90deg) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (max-width: 520px) {
  .hero-inner { padding: 24px 16px 26px; gap: 14px; }
  .hero-mark { width: 84px; height: 84px; }
}

/* ---------- page ---------- */
.page { max-width: 1040px; margin: 0 auto; padding: 28px 16px 64px; }
.headline { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; font-weight: 800; color: var(--brand); margin: 0 0 20px; text-wrap: balance; }
h1 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; font-weight: 800; color: var(--brand); margin: 0 0 14px; text-wrap: balance; }
.crumb { margin: 0 0 12px; font-size: 14px; font-weight: 500; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.note { color: var(--muted); font-size: 14px; }
.note a { color: var(--ink); font-weight: 700; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--tap); padding: 0 16px; border-radius: var(--r-sm);
  font: 700 15px/1 var(--font); text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease; touch-action: manipulation; }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.btn:active { transform: scale(0.98); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, #000); border-color: transparent; }
.btn-quiet { background: var(--surface); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; }
.views { display: inline-flex; background: var(--soft); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.views a { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 38px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--muted); border-radius: 6px; }
.views a:hover { color: var(--ink); }
.views a[aria-current="page"] { background: var(--brand); color: #fff; }
.search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; min-height: var(--tap); color: var(--muted); background: var(--surface); }
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.search input { border: 0; outline: 0; background: transparent; font: 16px var(--font); color: var(--ink); width: 100%; min-height: 40px; }
.select select { font: 700 14px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); min-height: var(--tap); padding: 0 10px; }
.more { position: relative; }
.more summary { list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(420px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: 0 12px 32px rgb(10 18 38 / 0.14); }
@media (max-width: 640px) { .more-panel { position: static; width: 100%; margin-top: 8px; box-shadow: none; } .more { flex-basis: 100%; } }
fieldset { border: 0; margin: 0 0 12px; padding: 0; }
legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.org-picks { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px; }
.org-pick { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; }
.org-pick:hover { background: var(--soft); }
.org-pick input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.org-pick span:first-of-type { flex: 1; }
.count { color: var(--muted); font-size: 14px; margin-left: auto; font-variant-numeric: tabular-nums; }
.toolbar > * { min-width: 0; }
@media (max-width: 640px) {
  .toolbar { gap: 8px; }
  .views { flex: 1 1 100%; }
  .views a { flex: 1; justify-content: center; }
  .search { flex: 1 1 100%; }
  .select { flex: 1 1 auto; }
  .select select { width: 100%; }
}
.clear { font-size: 14px; font-weight: 700; color: var(--ink); }
.js .nojs-only { display: none; }

/* ---------- the date: a small calendar page, weekday on the band ---------- */
.tile { width: 64px; flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; text-align: center; line-height: 1; }
.tile-wd { display: block; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; padding: 6px 0; }
.tile-day { display: block; font-weight: 800; font-size: 28px; color: var(--brand); padding: 7px 0 4px; font-variant-numeric: tabular-nums; }
.tile-mon { display: block; font-weight: 700; font-size: 13px; color: var(--green); padding: 0 0 8px; }

/* ---------- list: one calendar page per day, that day's events beside it ---------- */
.days { display: grid; gap: 22px; max-width: 800px; }
.day { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; }
.day-head { margin: 0; position: sticky; top: 104px; }
.cards { display: grid; gap: 12px; }
@media (max-width: 520px) {
  .day { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }
  .tile { width: 56px; }
  .tile-day { font-size: 24px; }
  .day-head { top: 76px; }
}
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card-main { display: grid; gap: 6px; min-width: 0; }
.card-org { justify-self: start; font-weight: 700; font-size: 15px; color: var(--brand); text-decoration: none; }
.card-org:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-when { margin: 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 6px; }
.card-when span + span::before { content: "·"; margin-right: 6px; }
.card-time { font-weight: 700; color: var(--green); }
.card-title { font-size: 18px; line-height: 1.3; font-weight: 700; margin: 0; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-where { margin: 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 6px; }
.card-where span::after { content: "·"; margin-left: 6px; }
.card-where a { color: inherit; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.cost { font-size: 14px; color: var(--muted); flex-basis: 100%; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; color: var(--muted); font-size: 15px; }
.facts li { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.facts li .icon { margin-top: 3px; color: var(--brand); }
.facts a { color: inherit; }
.facts.big { font-size: 16px; gap: 8px; color: var(--ink); margin: 6px 0 20px; }
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-state h1 { color: var(--brand); }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-head h2 { margin: 0; font-size: 22px; color: var(--brand); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line); gap: 1px; }
.cal-dow { background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; text-align: center; padding: 8px 0; }
.cal-cell { background: var(--surface); min-height: 112px; padding: 6px; position: relative; min-width: 0; }
.cal-cell.empty { background: var(--bg); }
.cal-date { font-weight: 700; font-size: 14px; text-decoration: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.cal-cell.today .cal-date { background: var(--accent); color: var(--accent-ink); }
.cal-cell ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; }
.cal-cell li a { display: block; font-size: 12px; line-height: 1.3; text-decoration: none; padding: 3px 5px; border-radius: 5px; background: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cell li a:hover { background: color-mix(in srgb, var(--accent) 30%, var(--soft)); }
.cal-cell .t { font-weight: 700; margin-right: 4px; color: var(--green); }
.cal-cell .more-link { background: transparent; color: var(--muted); font-weight: 700; }
.cal-count { display: none; }
@media (max-width: 700px) {
  .cal-cell { min-height: 64px; padding: 4px; text-align: center; }
  .cal-cell ul { display: none; }
  .cal-date { width: 100%; height: 100%; min-height: 44px; border-radius: 8px; }
  .cal-cell.has .cal-count { display: block; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); min-width: 18px; padding: 0 5px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--brand); color: #fff; pointer-events: none; }
}

/* ---------- map ---------- */
.map { position: relative; z-index: 0; isolation: isolate; height: min(70vh, 620px); border-radius: var(--r); border: 1px solid var(--line); background: var(--soft); }
.leaflet-popup-content { font: 14px/1.4 var(--font); }
.leaflet-popup-content a { font-weight: 700; }

/* ---------- event page ---------- */
.event-page { max-width: 760px; }
.event-head { display: flex; gap: 16px; align-items: flex-start; }
.event-head h1 { margin: 4px 0 0; }
.description { margin-top: 24px; max-width: 65ch; }
.provenance { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.lede { font-size: 18px; color: var(--muted); max-width: 65ch; }
.section-head { font-size: 22px; color: var(--brand); margin: 32px 0 14px; }

/* ---------- organizations ---------- */
.org-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); max-width: 760px; }
.org-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 16px; border-top: 1px solid var(--line); }
.org-list li:first-child { border-top: 0; }
.org-list a { font-weight: 700; text-decoration: none; color: var(--brand); }
.org-list a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.site-footer { background: var(--brand-deep); color: rgb(255 255 255 / 0.85); }
.footer-inner { max-width: 560px; margin: 0 auto; padding: 44px 16px 32px; text-align: center; display: grid; gap: 20px; justify-items: center; }
.foot-brand .lockup { height: 48px; width: auto; display: block; }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand .mark { width: 72px; height: 72px; }
.foot-brand .wordmark { font-size: 26px; }
.subscribe { width: 100%; }
.sub-title { display: block; color: #fff; font-weight: 700; font-size: 18px; }
.sub-note { margin: 4px 0 12px; font-size: 15px; }
.sub-row { display: flex; gap: 8px; }
.sub-row input[type="email"] { flex: 1; min-width: 0; min-height: var(--tap); border-radius: var(--r-sm); border: 1px solid rgb(255 255 255 / 0.3); background: rgb(255 255 255 / 0.08); color: #fff; padding: 0 12px; font: 16px var(--font); }
.sub-row input::placeholder { color: rgb(255 255 255 / 0.6); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.sub-msg { min-height: 1.4em; margin: 8px 0 0; font-size: 14px; color: #fff; }
.powered { font-size: 13px; margin: 0; color: rgb(255 255 255 / 0.6); }
.powered a { color: rgb(255 255 255 / 0.85); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- accounts and organizer pages ---------- */
.auth { max-width: 480px; }
.manage { max-width: 960px; }
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-weight: 700; font-size: 15px; }
.field small { color: var(--muted); font-size: 14px; }
.field input, .field select, .field textarea { font: 16px/1.4 var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); min-height: var(--tap); padding: 8px 12px; width: 100%; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.field.inline { display: flex; align-items: center; gap: 10px; }
.field.inline select { width: auto; }
.row-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.row-fields .grow { grid-column: span 2; }
@media (max-width: 520px) { .row-fields .grow { grid-column: auto; } }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 700; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.stack > .btn { justify-self: start; }
.wide { width: 100%; }
.or { margin: 16px 0 0; }
.form-error { background: #FBEDEB; color: #8A2A1E; border: 1px solid #F0CFC9; border-radius: var(--r-sm); padding: 10px 14px; font-weight: 500; }
.form-ok { background: #E8F2EC; color: #1F5138; border: 1px solid #C9E0D2; border-radius: var(--r-sm); padding: 10px 14px; font-weight: 500; }
.manage-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.manage-head h1 { margin-bottom: 2px; }
.post-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 20px 20px; margin-top: 20px; max-width: 640px; }
.admin-links { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.admin-links a { font-weight: 700; color: var(--brand); }
.pill { display: inline-block; min-width: 24px; text-align: center; background: var(--soft); border-radius: 999px; padding: 1px 8px; font-size: 13px; font-weight: 700; }
.mine, .queue { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mine li, .queue li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.queue li.no-tile { grid-template-columns: minmax(0, 1fr); }
.mine-main { display: grid; gap: 4px; min-width: 0; }
.mine-title { font-weight: 700; font-size: 17px; color: var(--ink); }
a.mine-title { text-decoration: none; } a.mine-title:hover { text-decoration: underline; }
.queue-desc { margin: 4px 0 0; color: var(--ink); font-size: 15px; white-space: pre-line; }
.outbox-body { white-space: pre-wrap; font: 14px/1.5 var(--font); background: var(--soft); padding: 12px; border-radius: var(--r-sm); margin: 6px 0; overflow-wrap: anywhere; }
.status { justify-self: start; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.status.s-pending { background: #FBF1D6; color: #7A5A0C; }
.status.s-published { background: #E8F2EC; color: #1F5138; }
.status.s-rejected { background: #FBEDEB; color: #8A2A1E; }
@media (max-width: 520px) { .mine li, .queue li { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; } }
.event-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.also-panel { position: sticky; top: 108px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.also-inline { display: none; }
@media (max-width: 820px) { .event-form-grid { grid-template-columns: 1fr; } .also-side { display: none; } .also-inline { display: block; position: static; } }
.also-head { font-size: 16px; color: var(--brand); margin: 0 0 10px; }
.also { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.also li { display: grid; gap: 2px; padding-left: 10px; border-left: 3px solid var(--line); font-size: 14px; }
.also li.high { border-left-color: var(--accent); }
.also-kind { font-size: 12px; font-weight: 700; color: var(--green); }
.also-title { font-weight: 700; color: var(--ink); }
.card-actions form { margin: 0; display: contents; }
/* phone: with a third nav link (Manage / Sign in) the mark alone stands for the name */
@media (max-width: 520px) { body:has(.nav a:nth-child(3)) .day-head { top: 124px; } }
@media (max-width: 520px) { .card-when { flex-direction: column; } .card-when span + span::before { display: none; } }

/* ---------- dropdown menus (Add to Calendar, Get Directions) ---------- */
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; margin-left: 2px; transition: transform .15s ease; }
.menu[open] .caret { transform: rotate(180deg); }
.menu-list { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: 6px; min-width: 200px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgb(10 18 38 / 0.14); }
.menu-list a { display: flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink); }
.menu-list a:hover, .menu-list a:focus-visible { background: var(--soft); }

/* Sign in / Manage is an action, not a section: an outlined button set apart from Events and Organizations. */
.nav .nav-account { margin-left: 12px; border: 1.5px solid rgb(255 255 255 / 0.55); padding: 0 16px; }
.nav .nav-account:hover { border-color: #fff; background: rgb(255 255 255 / 0.08); }
.nav .nav-account[aria-current="page"] { background: #fff; color: var(--brand); border-color: #fff; }
@media (max-width: 520px) {
  .bar:has(.nav-account) .nav { flex-basis: 100%; justify-content: flex-start; border-top: 1px solid rgb(255 255 255 / 0.12); margin-top: 6px; padding-top: 6px; padding-bottom: 2px; }
  .bar:has(.nav-account) .nav a { flex: none; }
  .nav .nav-account { margin-left: auto; padding: 0 14px; }
}

/* ---------- pick several events, add them to a calendar together ---------- */
.card { position: relative; }
.card-pick { width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border-radius: var(--r-sm); }
.card-pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.card:has(.card-pick input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.pick-count { flex: 1 1 200px; font-weight: 700; }
.pick-bar .menu-list { top: auto; bottom: calc(100% + 6px); left: auto; right: 0; min-width: 240px; }
.menu-list button { display: flex; align-items: center; width: 100%; min-height: var(--tap); padding: 0 12px; border: 0; border-radius: 6px; background: none; font: 600 15px var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.menu-list button:hover, .menu-list button:focus-visible { background: var(--soft); }
.menu-hint { padding: 8px 12px 6px; font-size: 13px; line-height: 1.4; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }
/* With JavaScript the bar floats at the bottom of the screen, and only while something is ticked. */
.js .pick-bar { position: fixed; z-index: 40; left: 50%; bottom: 16px; width: min(560px, calc(100vw - 32px)); margin: 0; flex-wrap: nowrap;
  background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 12px 32px rgb(10 18 38 / 0.25);
  transform: translate(-50%, 0); transition: transform .22s cubic-bezier(.2,.7,.2,1), opacity .22s ease; }
.js .pick-bar:not(.on) { transform: translate(-50%, calc(100% + 32px)); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .16s ease-in, opacity .16s ease-in, visibility 0s .16s; }
.js .pick-bar .pick-clear { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.5); }
.js .pick-bar .pick-count { flex: 1 1 auto; min-width: 0; }
.js body:has(.pick-bar.on) .page { padding-bottom: 96px; }
@media (prefers-reduced-motion: reduce) { .js .pick-bar, .js .pick-bar:not(.on) { transition: none; } }
.pick-bar .btn { white-space: nowrap; }
@media (max-width: 520px) { .js .pick-bar { gap: 8px; padding: 10px; } .js .pick-bar .btn { padding: 0 12px; } .pick-count { font-size: 14px; } }

/* ---------- the card's corner: select + hide ---------- */
[hidden] { display: none !important; }
.card-corner { position: absolute; top: 2px; right: 2px; display: flex; }
.card-org { max-width: calc(100% - 44px); }
.js .card-org { max-width: calc(100% - 84px); }
.card-hide { display: none; }
.js .card-hide { display: block; }
.card-hide summary { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); cursor: pointer; }
.card-hide summary:hover, .card-hide[open] summary { background: var(--soft); color: var(--ink); }
.card-hide .menu-list { left: auto; right: 0; min-width: 260px; }
.menu-list button { white-space: normal; text-align: left; line-height: 1.3; padding: 8px 12px; }
.cal-cell li.over { display: none; }
.js .cal-cell li.over:not([hidden]) { display: list-item; }
.hidden-menu .menu-list { left: auto; right: 0; min-width: 280px; max-height: 60vh; overflow-y: auto; }
.hidden-row { display: flex; align-items: center; gap: 8px; padding-left: 12px; }
.hidden-row span { flex: 1; font-size: 14px; min-width: 0; }
.hidden-row button { width: auto; flex: none; color: var(--brand); font-weight: 700; }
.toast { position: fixed; z-index: 45; left: 50%; bottom: 16px; width: max-content; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 16px; border-radius: var(--r); background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 12px 32px rgb(10 18 38 / 0.25);
  transform: translate(-50%, 0); transition: transform .22s cubic-bezier(.2,.7,.2,1), opacity .22s ease; }
.toast:not(.on) { transform: translate(-50%, calc(100% + 32px)); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .16s ease-in, opacity .16s ease-in, visibility 0s .16s; }
.toast button { min-height: 40px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid rgb(255 255 255 / 0.5); background: transparent; color: #fff; font: 700 14px var(--font); cursor: pointer; }
body:has(.pick-bar.on) .toast { bottom: 96px; }
@media (prefers-reduced-motion: reduce) { .toast, .toast:not(.on) { transition: none; } }
/* Select all / Deselect all, at the right of the Organizations heading */
.org-all { display: flex; gap: 14px; justify-content: flex-end; margin: -30px 0 8px; min-height: 22px; }
.org-all a { font-size: 14px; font-weight: 700; color: var(--brand); text-underline-offset: 3px; padding: 2px 0; }
