/* The Mad Quaffers
   Burgundy limestone ground, oxblood ink, claret for action, brass for rules,
   verdigris for quiet status. Newsreader headlines, Albert Sans text. */

:root {
  --limestone: #e3e3d6;
  --paper: #f0f0e7;
  --ink: #2a0e16;
  --ink-soft: #5d4b4d;
  --claret: #7a1f2b;
  --claret-deep: #5c1520;
  --brass: #a8844a;
  --brass-soft: #cbb58c;
  --verdigris: #3e6b60;
  --alert: #9c2a1a;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --text: "Albert Sans", "Helvetica Neue", Arial, sans-serif;

  /* Major-third scale */
  --s-1: 0.8rem;
  --s0: 1rem;
  --s1: 1.25rem;
  --s2: 1.563rem;
  --s3: 1.953rem;
  --s4: 2.441rem;
  --s5: 3.052rem;
  --s6: 3.815rem;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --rule: 1px solid var(--brass-soft);
  --radius: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 106.25%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--limestone);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--s0);
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--claret);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--claret-deep);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.5em;
  font-optical-sizing: auto;
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(var(--s4), 5vw, var(--s5));
}

h2 {
  font-size: var(--s3);
}

h3 {
  font-size: var(--s1);
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

.lede {
  font-size: var(--s1);
  color: var(--ink-soft);
  max-width: 52ch;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: var(--s-1);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  background: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 10;
}

/* ------------------------------------------------------------------ header */

.site-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem var(--gutter);
  border-bottom: var(--rule);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: var(--s1);
  font-weight: 600;
  white-space: nowrap;
}

.brand:hover {
  color: var(--ink);
}

.brand svg {
  width: 38px;
  height: 38px;
}

.nav {
  display: flex;
  gap: 1.4rem;
  flex: 1;
  flex-wrap: wrap;
}

.nav a,
.nav-end a,
.nav-end button {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav a[aria-current="page"] {
  border-bottom-color: var(--claret);
}

.nav a:hover,
.nav-end a:hover {
  border-bottom-color: var(--brass);
}

.nav-end {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.nav-end form {
  margin: 0;
}

.nav-end button {
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .site-header {
    gap: 0.75rem 1.5rem;
  }
  .nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }
  .nav-end {
    margin-left: auto;
  }
}

/* ------------------------------------------------------------------ layout */

main {
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) 5rem;
  max-width: 1240px;
}

.page-head {
  margin-bottom: 2.5rem;
  max-width: 60rem;
}

.page-head p {
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(2rem, 5vw, 5rem);
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.stack > * + * {
  margin-top: 1rem;
}

section + section {
  margin-top: 3.5rem;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: var(--rule);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

.section-title h2 {
  margin: 0;
  font-size: var(--s2);
}

.site-footer {
  padding: 2rem var(--gutter);
  border-top: var(--rule);
  color: var(--ink-soft);
  font-size: var(--s-1);
}

/* ------------------------------------------------------------------ flash */

.flash {
  margin: 0 0 2rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--verdigris);
  background: var(--paper);
  max-width: 60rem;
}

.flash.error {
  border-left-color: var(--alert);
}

/* ------------------------------------------------------------------ forms */

label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}

.hint {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: var(--s-1);
  margin-top: 0.15rem;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b9b3a4;
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brass);
  outline-offset: 0;
  border-color: var(--brass);
}

.field {
  margin-bottom: 1.2rem;
  max-width: 36rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0 1.25rem;
  max-width: 48rem;
}

.field-row .field {
  max-width: none;
}

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-weight: 400;
  margin-bottom: 1rem;
  max-width: 40rem;
}

.check input {
  margin-top: 0.3rem;
  accent-color: var(--claret);
  width: 1.05rem;
  height: 1.05rem;
}

.check strong {
  display: block;
}

.form-error {
  color: var(--alert);
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--claret);
  background: var(--claret);
  color: #fbf6ef;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--claret-deep);
  border-color: var(--claret-deep);
  color: #fbf6ef;
  text-decoration: none;
}

.btn-quiet {
  background: transparent;
  color: var(--claret);
}

.btn-quiet:hover {
  background: var(--paper);
  color: var(--claret-deep);
}

.btn-danger {
  background: var(--alert);
  border-color: var(--alert);
}

.btn-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--claret);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.inline {
  display: inline;
  margin: 0;
}

.panel {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.danger-zone {
  border-top: var(--rule);
  margin-top: 3rem;
  padding-top: 1.5rem;
}

/* ---------------------------------------------------------- the question */

.question {
  max-width: 54rem;
}

.question h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-style: italic;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.ask-form {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--ink);
  align-items: flex-end;
}

.ask-form input {
  border: 0;
  background: transparent;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  padding: 0.5rem 0;
  border-radius: 0;
}

.ask-form input::placeholder {
  color: #7d7070;
  opacity: 1;
}

.ask-form input:focus {
  outline: none;
}

.ask-form:focus-within {
  border-bottom-color: var(--claret);
}

.ask-form .btn {
  margin-bottom: 0.6rem;
  white-space: nowrap;
}

.examples {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.examples a {
  color: var(--ink-soft);
}

.tally {
  margin-top: 2.25rem;
  color: var(--ink-soft);
}

.answer {
  margin-top: 2.5rem;
  max-width: 46rem;
}

.answer-body {
  font-size: 1.08rem;
}

.answer-body p {
  max-width: none;
}

.cite {
  font-size: 0.72em;
  vertical-align: super;
  line-height: 0;
  text-decoration: none;
  font-weight: 700;
  padding: 0 0.1em;
}

.thinking {
  display: none;
  color: var(--ink-soft);
  font-family: var(--display);
  font-style: italic;
  font-size: var(--s1);
  margin-top: 2rem;
}

.htmx-request .thinking,
.thinking.htmx-request {
  display: block;
}

.sources {
  margin-top: 2rem;
}

/* -------------------------------------------------------- recommendations */

.rec-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rec {
  padding: 1rem 0 1.1rem;
  border-bottom: var(--rule);
}

.rec:first-child {
  padding-top: 0.25rem;
}

.rec-head {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.rec-name {
  font-family: var(--display);
  font-size: var(--s1);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.rec-name:hover {
  color: var(--claret);
}

.rec-index {
  font-weight: 700;
  color: var(--claret);
  font-size: var(--s-1);
  min-width: 1.2rem;
}

.rec-meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.rec-summary {
  margin: 0.35rem 0 0;
}

.quote {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
}

.verdict {
  font-size: var(--s-1);
  font-weight: 700;
  padding: 0.05rem 0.45rem;
  border-radius: 2px;
  white-space: nowrap;
}

.verdict-recommend {
  color: var(--verdigris);
  border: 1px solid var(--verdigris);
}

.verdict-mixed {
  color: #7b5a1d;
  border: 1px solid var(--brass);
}

.verdict-avoid {
  color: #fbf6ef;
  background: var(--alert);
  border: 1px solid var(--alert);
}

.filters {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 2rem;
}

.filters .field {
  margin: 0;
}

@media (max-width: 900px) {
  .filters {
    grid-template-columns: 1fr 1fr;
  }
}

.pager {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  align-items: center;
}

.detail-quote {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-style: italic;
  line-height: 1.3;
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--claret);
  max-width: 44rem;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.5rem;
  margin: 1.5rem 0;
}

.facts dt {
  color: var(--ink-soft);
}

.facts dd {
  margin: 0;
}

/* -------------------------------------------------------------------- map */

.map-shell {
  position: relative;
  height: calc(100vh - 220px);
  min-height: 460px;
  border: var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

#map {
  position: absolute;
  inset: 0;
}

.map-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: end;
}

.map-filters .field {
  margin: 0;
  min-width: 11rem;
  flex: 0 1 14rem;
}

.map-count {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.seal-pin {
  width: 26px;
  height: 26px;
  cursor: pointer;
  filter: drop-shadow(0 1px 1px rgba(42, 14, 22, 0.45));
  transition: transform 120ms ease-out;
}

.seal-pin:hover {
  transform: scale(1.18);
}

.seal-pin.avoid {
  opacity: 0.7;
}

.maplibregl-popup-content {
  font-family: var(--text);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  max-width: 280px;
}

.maplibregl-popup-content h3 {
  margin: 0 0 0.2rem;
}

.maplibregl-popup-content p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
}

.map-cluster {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #f5ecdf;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid var(--brass);
  cursor: pointer;
}

/* ------------------------------------------------------------- events */

.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.event-item {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: var(--rule);
}

.datemark {
  text-align: center;
  font-family: var(--display);
  line-height: 1;
  color: var(--claret);
}

.datemark .day {
  font-size: var(--s3);
  display: block;
}

.datemark .mon {
  font-size: var(--s-1);
  font-family: var(--text);
  font-weight: 600;
  color: var(--ink-soft);
}

.event-item a.title {
  font-family: var(--display);
  font-size: var(--s1);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.event-item a.title:hover {
  color: var(--claret);
}

.status-note {
  font-size: var(--s-1);
  font-weight: 700;
  color: var(--verdigris);
}

.status-note.cancelled,
.status-note.draft {
  color: var(--alert);
}

.calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar th {
  font-weight: 600;
  font-size: var(--s-1);
  color: var(--ink-soft);
  text-align: left;
  padding: 0.4rem;
}

.calendar td {
  vertical-align: top;
  height: 7rem;
  border: var(--rule);
  padding: 0.35rem 0.4rem;
  background: var(--paper);
}

.calendar td.outside {
  background: transparent;
  color: #9a9186;
}

.calendar td.today .num {
  background: var(--claret);
  color: #fbf6ef;
  border-radius: 50%;
}

.calendar .num {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.85rem;
}

.calendar .cal-event {
  display: block;
  font-size: 0.82rem;
  line-height: 1.25;
  margin-top: 0.25rem;
  padding: 0.2rem 0.35rem;
  border-left: 2px solid var(--claret);
  text-decoration: none;
  color: var(--ink);
  background: var(--limestone);
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar .cal-event.cancelled {
  text-decoration: line-through;
  border-left-color: var(--ink-soft);
}

.calendar .cal-event.draft {
  border-left-style: dashed;
}

.month-nav {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.month-nav h2 {
  margin: 0;
  min-width: 11ch;
}

@media (max-width: 760px) {
  .calendar-wrap {
    display: none;
  }
}

.rsvp-box {
  background: var(--paper);
  padding: 1.5rem;
  border-top: 3px solid var(--claret);
  border-radius: var(--radius);
}

.rsvp-box .state {
  font-family: var(--display);
  font-size: var(--s2);
  margin: 0 0 0.5rem;
}

.guest-list {
  columns: 2 12rem;
  padding-left: 1.1rem;
}

/* -------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

table.data th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--brass-soft);
  padding: 0.5rem 0.75rem 0.5rem 0;
  white-space: nowrap;
}

table.data td {
  border-bottom: var(--rule);
  padding: 0.6rem 0.75rem 0.6rem 0;
  vertical-align: top;
}

.pill {
  font-size: var(--s-1);
  font-weight: 600;
  white-space: nowrap;
}

.pill.invited {
  color: #7b5a1d;
}

.pill.active {
  color: var(--verdigris);
}

.pill.disabled,
.pill.failed {
  color: var(--alert);
}

/* ------------------------------------------------------------- admin */

.admin-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: -1rem 0 2.5rem;
  padding-bottom: 0.6rem;
  border-bottom: var(--rule);
  font-size: 0.93rem;
}

.admin-nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

.admin-nav a[aria-current="page"] {
  color: var(--claret);
  font-weight: 700;
}

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0;
  border-top: var(--rule);
  margin-bottom: 3rem;
}

.figures div {
  padding: 1rem 1rem 1rem 0;
  border-bottom: var(--rule);
}

.figures strong {
  font-family: var(--display);
  font-size: var(--s3);
  font-weight: 500;
  display: block;
  line-height: 1.1;
}

.figures a {
  color: inherit;
}

.email-preview {
  background: #fff;
  border: var(--rule);
  padding: 1.5rem 2rem;
  max-width: 40rem;
}

.account-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: -1rem 0 2.5rem;
  font-size: 0.95rem;
}

.account-nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

.account-nav a[aria-current="page"] {
  color: var(--claret);
  font-weight: 700;
}

/* ----------------------------------------------------------- sign in */

.gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.gate-art {
  background: var(--ink);
  color: #efe4d4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 4rem);
}

.gate-art svg {
  width: 88px;
  height: 88px;
}

.gate-art .motto {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.08;
  max-width: 13ch;
  margin: 0;
}

.gate-art .small {
  color: var(--brass-soft);
}

.gate-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
  max-width: 34rem;
}

@media (max-width: 800px) {
  .gate {
    grid-template-columns: 1fr;
  }
  .gate-art {
    min-height: 40vh;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .actions {
    display: none;
  }
}

.mt {
  margin-top: 2rem;
}

.check-inline {
  margin: 0 0 0.6rem;
}

@media (max-width: 600px) {
  .ask-form {
    flex-wrap: wrap;
  }
  .ask-form .btn {
    margin: 0 0 0.75rem;
  }
}

/* Keep the footer at the bottom on short pages. */
body:has(> .site-header) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:has(> .site-header) > main {
  flex: 1;
  width: 100%;
}

.thinking.is-visible {
  display: block;
}

/* ------------------------------------------------------------ phones */

@media (max-width: 760px) {
  html {
    font-size: 100%;
  }

  main {
    padding: 1.25rem 1.1rem 3.5rem;
  }

  h1 {
    font-size: 2.15rem;
  }

  .page-head {
    margin-bottom: 1.5rem;
  }

  .lede {
    font-size: 1.05rem;
  }

  /* Header: brand and account on one row, the section nav on a second row that fits. */
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.35rem 0.75rem;
    padding: 0.7rem 1.1rem 0;
  }

  .brand {
    font-size: 1.1rem;
    gap: 0.5rem;
  }

  .brand svg {
    width: 30px;
    height: 30px;
  }

  .nav-end {
    gap: 0.9rem;
    margin: 0;
  }

  .nav-end a,
  .nav-end button {
    font-size: 0.88rem;
    padding: 0.5rem 0;
  }

  .nav {
    grid-column: 1 / -1;
    order: initial;
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -0.2rem;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    font-size: 0.9rem;
    padding: 0.65rem 0.2rem;
    white-space: nowrap;
  }

  /* Question box */
  .question h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .ask-form input {
    font-size: 1.25rem;
  }

  .examples {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tally {
    margin-top: 1.5rem;
  }

  section + section {
    margin-top: 2.5rem;
  }

  .section-title {
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }

  .section-title h2 {
    font-size: 1.45rem;
  }

  .section-title a {
    white-space: nowrap;
    font-size: 0.9rem;
  }

  .rec-name {
    font-size: 1.15rem;
  }

  /* Sign-in pages: a slim brand strip, form above the fold. */
  .gate {
    display: block;
  }

  .gate-art {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
  }

  .gate-art svg {
    width: 48px;
    height: 48px;
    flex: none;
  }

  .gate-art .motto {
    font-size: 1.2rem;
    max-width: none;
  }

  .gate-art .small {
    display: none;
  }

  .gate-form {
    padding: 2rem 1.25rem 3rem;
  }

  /* Map: compact filters, the map gets the screen. */
  .map-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .map-filters .field:first-child {
    grid-column: 1 / -1;
  }

  .map-filters .field {
    min-width: 0;
  }

  .map-filters .check-inline {
    margin: 0;
    align-items: center;
  }

  .map-count {
    margin: 0;
    align-self: center;
    text-align: right;
  }

  .map-shell {
    height: 68vh;
    min-height: 360px;
    margin: 0 -1.1rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .filters .field:first-child {
    grid-column: 1 / -1;
  }

  /* Tables scroll inside themselves instead of widening the page. */
  table.data {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.data td,
  table.data th {
    white-space: nowrap;
  }

  table.data td .small,
  table.data td .muted {
    white-space: normal;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .facts dt {
    margin-top: 0.6rem;
    font-size: 0.85rem;
  }

  .facts dd,
  .rec-summary,
  .quote {
    overflow-wrap: anywhere;
  }

  .detail-quote {
    font-size: 1.35rem;
  }

  .event-item {
    grid-template-columns: 3.2rem 1fr;
    gap: 0.75rem;
  }

  .rsvp-box {
    padding: 1.1rem;
  }

  .actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .admin-nav,
  .account-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 0;
    white-space: nowrap;
  }

  .figures {
    grid-template-columns: 1fr 1fr;
  }

  .figures strong {
    font-size: 1.6rem;
  }

  .email-preview {
    padding: 1rem;
  }
}

@media (max-width: 760px) {
  .site-header .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header .nav-end {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header .nav {
    grid-row: 2;
  }

  .map-filters .check-inline span {
    font-size: 0.9rem;
  }
}

@media (max-width: 370px) {
  .brand span {
    font-size: 1rem;
  }

  .nav a {
    font-size: 0.84rem;
  }
}
