/* ============================================================
   Club Platform — Toastmasters brand theme
   Based on Toastmasters International's official brand palette.
   Colors are exposed as CSS variables so a future club-type theme
   (e.g. community band) can override them without touching markup.
   ============================================================ */

:root {
  /* Official Toastmasters International palette */
  --tm-blue: #004165;
  /* Loyal Blue  */
  --tm-maroon: #772432;
  /* True Maroon */
  --tm-gray: #a9b2b1;
  /* Cool Gray   */
  --tm-yellow: #f2df74;
  /* Happy Yellow */
  --tm-black: #231f20;
  /* Fair Black  */
  --tm-white: #ffffff;

  /* Derived tints/shades for UI surfaces */
  --tm-blue-dark: #00314c;
  --tm-blue-tint: #eaf1f5;
  --tm-maroon-dark: #5c1b26;
  --tm-maroon-tint: #f4ecee;
  --tm-gray-tint: #f3f5f5;
  --tm-line: #d9e0e3;

  /* Semantic tokens (what components actually reference) */
  --bg: var(--tm-gray-tint);
  --surface: var(--tm-white);
  --text: var(--tm-black);
  --text-muted: #5c666b;
  --primary: var(--tm-blue);
  --accent: var(--tm-maroon);
  --highlight: var(--tm-yellow);
  --border: var(--tm-line);

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(35, 31, 32, .06), 0 4px 16px rgba(35, 31, 32, .06);
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--tm-blue);
  line-height: 1.2;
}

h1 {
  font-size: 1.75rem;
  letter-spacing: -.01em;
}

h2 {
  font-size: 1.25rem;
}

a {
  color: var(--tm-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / top navigation ---------- */
.tm-header {
  background: var(--tm-blue);
  color: var(--tm-white);
  border-bottom: 4px solid var(--tm-yellow);
}

.tm-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.tm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--tm-white);
  text-decoration: none;
  letter-spacing: .02em;
}

.tm-brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: block;
  object-fit: contain;
}

.tm-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: .95rem;
}

.tm-nav a {
  color: rgba(255, 255, 255, .9);
  text-decoration: none;
}

.tm-nav a:hover {
  color: var(--tm-yellow);
  text-decoration: none;
}

.tm-nav .who {
  color: rgba(255, 255, 255, .7);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--tm-maroon);
  color: #fff;
}

.btn-primary:hover {
  background: var(--tm-maroon-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--tm-blue);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--tm-blue-dark);
  color: #fff;
}

.btn-accent {
  background: var(--tm-yellow);
  color: var(--tm-blue);
}

.btn-accent:hover {
  background: #ecd558;
  color: var(--tm-blue);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--tm-blue);
}

.btn-ghost:hover {
  background: var(--tm-blue-tint);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card h2 {
  margin-top: 0;
}

.card--accent {
  border-left: 4px solid var(--tm-maroon);
}

.card--exec {
  background: var(--tm-maroon-tint);
  border: 1px solid #e3cdd2;
  border-left: 4px solid var(--tm-maroon);
}

.card--exec h2 {
  color: var(--tm-maroon);
}

.card_tophalf {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Badges / tags ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  font-family: var(--font-head);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.badge-blue {
  background: var(--tm-blue-tint);
  color: var(--tm-blue);
}

.badge-maroon {
  background: var(--tm-maroon-tint);
  color: var(--tm-maroon);
}

.badge-yellow {
  background: var(--tm-yellow);
  color: var(--tm-blue);
}

.badge-gray {
  background: #e7ebec;
  color: var(--text-muted);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--tm-blue-tint);
  color: var(--tm-blue);
  font-size: .8rem;
  font-weight: 600;
}

/* ---------- Tables (agenda, roster) ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.table th {
  text-align: left;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
}

.table tr:last-child td {
  border-bottom: none;
}

.table .unfilled {
  color: var(--tm-maroon);
  font-style: italic;
}

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tm-gray);
}

.pill--yes::before {
  background: #2e7d32;
}

.pill--no::before {
  background: var(--tm-maroon);
}

.pill--maybe::before {
  background: #c9a227;
}

/* ---------- Auth pages (allauth: login, signup, reset, logout) ---------- */
.auth-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: start center;
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--tm-yellow);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-card h1 {
  font-size: 1.4rem;
  margin: 0 0 4px;
}

.auth-card p {
  color: var(--text-muted);
}

.auth-card label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .82rem;
  color: var(--tm-blue);
  margin: 12px 0 4px;
}

.auth-card input[type=text],
.auth-card input[type=email],
.auth-card input[type=password],
.auth-card input:not([type]) {
  width: 100%;
  padding: 10px 12px;
  font-size: .95rem;
  font-family: var(--font-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--tm-blue);
  box-shadow: 0 0 0 3px rgba(0, 65, 101, .12);
}

.auth-card button,
.auth-card [type=submit],
.auth-card .button {
  margin-top: 18px;
  width: 100%;
  padding: 11px 16px;
  border: 0;
  cursor: pointer;
  background: var(--tm-maroon);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
}

.auth-card button:hover,
.auth-card [type=submit]:hover {
  background: var(--tm-maroon-dark);
}

.auth-card a {
  color: var(--tm-blue);
  font-weight: 600;
}

.auth-card ul {
  padding-left: 18px;
}

.auth-card .errorlist,
.auth-card [class*="error"] {
  color: var(--tm-maroon);
  font-size: .88rem;
}

/* ---------- Flash messages ---------- */
.messages {
  margin-bottom: 18px;
  display: grid;
  gap: 8px;
}

.flash {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  border: 1px solid;
}

.flash--success {
  background: #eef6ee;
  border-color: #cfe3cf;
  color: #24632a;
}

.flash--warning {
  background: #fdf6e6;
  border-color: #f0e0b0;
  color: #8a6d1a;
}

.flash--error {
  background: var(--tm-maroon-tint);
  border-color: #e3cdd2;
  color: var(--tm-maroon);
}

/* ---------- Meeting schedule / detail ---------- */
.meeting-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.meeting-when {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--tm-blue);
}

.role-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: var(--tm-blue-tint);
  color: var(--tm-blue);
  font-size: .8rem;
  font-weight: 600;
  margin: 2px 0;
}

.inline-form {
  display: inline;
}

.rsvp-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: .82rem;
}

.fmt-tag {
  text-transform: capitalize;
}

/* ---------- Officer management forms ---------- */
.mgmt label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .82rem;
  color: var(--tm-blue);
  display: block;
  margin: 12px 0 4px;
}

.mgmt input[type=text],
.mgmt input[type=time],
.mgmt input[type=number],
.mgmt select {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  min-width: 240px;
  background: #fff;
}

.mgmt input:focus,
.mgmt select:focus {
  outline: none;
  border-color: var(--tm-blue);
  box-shadow: 0 0 0 3px rgba(0, 65, 101, .12);
}

.mgmt ul {
  list-style: none;
  padding: 0;
  margin: 4px 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.mgmt ul label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
}

.mgmt .helptext {
  display: block;
  color: var(--text-muted);
  font-size: .8rem;
  margin-top: 2px;
}

.errorlist {
  color: var(--tm-maroon);
  font-size: .85rem;
  margin: 4px 0;
  padding-left: 16px;
}

/* ---------- View toggle (list / calendar) ---------- */
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-toggle a {
  padding: 6px 14px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .85rem;
  color: var(--tm-blue);
  background: #fff;
  text-decoration: none;
}

.view-toggle a+a {
  border-left: 1px solid var(--border);
}

.view-toggle a.active {
  background: var(--tm-blue);
  color: #fff;
}

/* ---------- Month calendar ---------- */
.cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 14px;
}

.cal-month {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--tm-blue);
}

.cal {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal th {
  background: var(--tm-blue);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 8px 6px;
  text-align: center;
}

.cal td {
  vertical-align: top;
  height: 96px;
  width: 14.28%;
  border: 1px solid var(--border);
  padding: 4px;
}

.cal-off {
  background: var(--tm-gray-tint);
}

.cal-off .cal-daynum {
  color: var(--tm-gray);
}

.cal-today {
  background: var(--tm-blue-tint);
}

.cal-today .cal-daynum {
  background: var(--tm-maroon);
  color: #fff;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.cal-daynum {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cal-event {
  display: block;
  margin: 2px 0;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--tm-blue);
  color: #fff;
  font-size: .72rem;
  line-height: 1.3;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-event:hover {
  background: var(--tm-blue-dark);
  text-decoration: none;
}

.cal-event--mine {
  background: var(--tm-maroon);
}

.cal-event--mine:hover {
  background: var(--tm-maroon-dark);
}

.cal-event__time {
  font-weight: 700;
  margin-right: 4px;
}

.cal-key {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 2px;
}

.cal-key--mine {
  background: var(--tm-maroon);
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: .85rem;
  margin-top: 10px;
}

.cal-legend>span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* RSVP status icons (calendar events + legend) */
.rsvp-icon {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  background: #fff;
  vertical-align: middle;
}

.rsvp-icon--yes {
  color: #1e7d32;
}

.rsvp-icon--no {
  color: var(--tm-maroon);
}

.rsvp-icon--maybe {
  color: #b7860b;
}

/* Keep icons legible on the colored event chips */
.cal-event .rsvp-icon {
  margin-right: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05);
}

/* ---------- User menu (top-right) ---------- */
.clubswitch>summary {
  cursor: pointer;
  list-style: none;
}

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

.clubswitch__pill {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .82rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .clubswitch__pill {
    max-width: 120px;
  }
}

/* Section label within the account dropdown (e.g. "Configure"). */
.usermenu__section {
  padding: 6px 10px 2px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.usermenu {
  position: relative;
}

.usermenu>summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

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

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--tm-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .95rem;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .7);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.usermenu__menu {
  position: absolute;
  right: 0;
  top: 120%;
  background: #fff;
  color: #231f20;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
  min-width: 210px;
  padding: 6px;
  z-index: 60;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  /* scroll if the list is long */
}

.usermenu__head {
  padding: 8px 10px 4px;
}

.usermenu__head strong {
  display: block;
}

.usermenu__menu a,
.usermenu__menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  color: #231f20;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.usermenu__menu a:hover,
.usermenu__menu button:hover {
  background: #eef1f3;
}

.usermenu__hr {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}

.impersonation-bar {
  background: var(--tm-maroon);
  color: #fff;
  text-align: center;
  padding: 7px 12px;
  font-size: .9rem;
}

.impersonation-bar a {
  color: #fff;
  text-decoration: underline;
}

/* ---------- Officer overview ---------- */
.officer-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

@media (min-width: 820px) {
  .officer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.view-toggle-link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  color: var(--tm-blue);
}

.bignum {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  color: var(--tm-blue);
  line-height: 1;
}

.statbar {
  display: flex;
  height: 14px;
  width: 100%;
  background: #e7ebec;
  border-radius: 999px;
  overflow: hidden;
}

.statbar__seg {
  height: 100%;
}

.statbar__seg--yes {
  background: #2e7d32;
}

.statbar__seg--maybe {
  background: #c9a227;
}

.statbar__seg--no {
  background: var(--tm-maroon);
}

/* ---------- Misc ---------- */
.muted {
  color: var(--text-muted);
}

.stack>*+* {
  margin-top: 14px;
}

/* Vertical only — must not reset the horizontal padding that `.container`
   provides on the same element (main.container.page). */
.page {
  padding-top: 28px;
  padding-bottom: 48px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  flex-wrap: wrap;
}

.hr {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 20px 0;
}

/* Never let media or wide boxes force horizontal page scroll. */
img,
svg,
video {
  max-width: 100%;
  height: auto;
}

body {
  overflow-x: hidden;
}

/* Responsive label helpers: show the full label on wide screens, the short one
   on phones (and vice-versa). */
.show-sm {
  display: none;
}

/* Burger menu (mobile main-nav). Hidden on desktop; the inline links show. */
.navburger {
  display: none;
  position: relative;
}

.navburger>summary {
  list-style: none;
  cursor: pointer;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px 8px;
}

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

.navburger__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  min-width: 190px;
  padding: 6px 0;
}

.navburger__menu a {
  display: block;
  padding: 10px 16px;
  color: var(--tm-blue);
  font-size: .95rem;
  text-decoration: none;
}

.navburger__menu a:hover {
  background: #eef1f3;
}

/* =====================================================================
   Responsive / mobile (phones and small tablets)
   ===================================================================== */
@media (max-width: 640px) {

  /* A small, consistent margin around the screen edges (respecting notches). */
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .page {
    padding-top: 16px;
    padding-bottom: 40px;
  }

  /* Collapse the main nav under a burger; keep the account avatar visible. */
  .nav-inline {
    display: none;
  }

  .navburger {
    display: inline-block;
  }

  /* Responsive label swap. */
  .hide-sm {
    display: none !important;
  }

  .show-sm {
    display: inline !important;
  }

  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.12rem;
  }

  /* Header: tighten the top bar and give the nav room to breathe. */
  .tm-header .container {
    height: 54px;
  }

  .tm-nav {
    gap: 12px;
    font-size: .9rem;
  }

  .tm-brand {
    font-size: .98rem;
  }

  /* Cards a touch tighter. */
  .card {
    padding: 15px;
  }

  /* Titles/toolbars wrap and left-align rather than overflow. */
  .section-title {
    justify-content: flex-start !important;
  }

  /* Form controls: full width, and >=16px to stop iOS auto-zoom. Overrides
     inline min-width used on some selects (e.g. Manage roles). */
  select,
  textarea,
  input[type=text],
  input[type=email],
  input[type=password],
  input[type=search],
  input[type=number],
  input[type=url],
  input[type=date],
  input[type=time],
  input[type=datetime-local] {
    max-width: 100%;
    font-size: 16px;
  }

  .member-select,
  .mgmt select,
  .rsvp-row select {
    min-width: 0 !important;
    width: 100%;
  }

  .rsvp-row {
    gap: 6px;
  }

  .rsvp-row>form,
  .rsvp-row>.inline-form {
    display: flex;
  }

  /* Wide data tables scroll horizontally instead of breaking the layout. */
  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .table th,
  .table td {
    padding: 8px 10px;
    font-size: .9rem;
  }

  /* Meeting cards stack the info and the action column. */
  .meeting-card {
    flex-direction: column;
  }

  .meeting-card>div[style*="text-align:right"],
  .meeting-card>div[style*="text-align: right"] {
    text-align: left !important;
  }

  /* Buttons are easy to tap and wrap onto their own line when needed. */
  .btn {
    padding: 9px 14px;
  }

  .btn-sm {
    padding: 7px 12px;
  }

  /* Month calendar: compact cells so all 7 columns fit a phone. */
  .cal {
    table-layout: fixed;
  }

  .cal th {
    font-size: .62rem;
    padding: 4px 0;
  }

  .cal td {
    height: 66px;
    padding: 2px;
  }

  .cal-daynum {
    font-size: .7rem;
    margin-bottom: 2px;
  }

  .cal-event {
    font-size: .6rem;
    padding: 1px 3px;
  }

  .cal-event__time {
    margin-right: 2px;
  }

  .cal-role-pill {
    font-size: .55rem;
    padding: 0 4px;
  }

  .cal-nav {
    flex-wrap: wrap;
  }

  /* Dropdowns: pin just below the header and fit within the viewport so they
     aren't clipped by the page's horizontal-overflow guard. */
  .usermenu__menu {
    position: fixed;
    top: 58px;
    right: 10px;
    left: auto;
    min-width: 220px;
    max-width: calc(100vw - 20px);
  }

  .navburger__menu {
    position: fixed;
    top: 58px;
    left: 10px;
    right: auto;
    min-width: 200px;
    max-width: calc(100vw - 20px);
  }
}

/* Extra-small phones. */
@media (max-width: 380px) {
  .tm-nav {
    gap: 9px;
    font-size: .85rem;
  }

  .cal td {
    height: 58px;
  }

  .cal-event {
    font-size: .55rem;
  }
}