:root {
  --content-width: 984px;
  --site-font: "Source Sans 3", system-ui, sans-serif;
  --ink: #21445f;
  --paper: #f7fbfd;
  --coral: #2f6f9e;
  --gold: #f2d27a;
  --line: #bfd1de;
  --card: #ffffff;
  --muted: #587080;
}

/* Switch with APP_THEME=midnight in the environment. */
body[data-theme="midnight"] {
  --ink: #eef3f7;
  --paper: #111923;
  --coral: #ff8b78;
  --gold: #e2b85d;
  --line: #354353;
  --card: #1b2733;
  --muted: #b5c0cb;
}

body[data-theme="midnight"] .site-header,
body[data-theme="midnight"] footer,
body[data-theme="midnight"] .site-header nav a,
body[data-theme="midnight"] .member,
body[data-theme="midnight"] .profile-card,
body[data-theme="midnight"] .account-nav-card,
body[data-theme="midnight"] .account-section,
body[data-theme="midnight"] .signup-card,
body[data-theme="midnight"] .empty {
  color: var(--ink);
}

body[data-theme="midnight"] .member,
body[data-theme="midnight"] .profile-card,
body[data-theme="midnight"] .account-nav-card,
body[data-theme="midnight"] .account-section,
body[data-theme="midnight"] .signup-card,
body[data-theme="midnight"] .empty,
body[data-theme="midnight"] .stat-tile {
  border-color: var(--line);
  background: var(--card);
}

body[data-theme="midnight"] .lede,
body[data-theme="midnight"] .profile-location,
body[data-theme="midnight"] .profile-action-note,
body[data-theme="midnight"] .profile-note-card p,
body[data-theme="midnight"] .profile-body,
body[data-theme="midnight"] .stat-tile span,
body[data-theme="midnight"] footer {
  color: var(--muted);
}

body[data-theme="default"] {
  background-color: var(--paper);
  background-image: url("/assets/legacy/writing-paper.gif");
  background-repeat: repeat;
  background-attachment: fixed;
}

body[data-theme="default"] .site-header {
  background-image: url("/assets/legacy/writing-paper.gif");
  background-repeat: repeat;
  background-attachment: fixed;
}

.messages-link {
  display: flex;
  align-items: center;
  gap: 5px;
}

.messages-link b {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 10px;
  background: var(--coral);
  color: #fff;
  font-size: 0.67rem;
}

.member-badge {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.55rem;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--coral);
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 0.82rem !important;
  font-weight: 800;
  letter-spacing: 0.03em;
  overflow: hidden;
  position: relative;
}
.member-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  overflow: hidden;
}

.member-badge img,
.member-avatar img,
.account-avatar img,
.avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-badge span,
.member-avatar span,
.account-avatar span,
.avatar span,
.profile-avatar span {
  display: grid;
  place-items: center;
}

.member-badge:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.account-menu {
  min-width: 12rem;
  border: 1px solid #8faabd;
  border-radius: 0.85rem;
  box-shadow: 0 10px 24px #21445f24;
  background: var(--card);
}

@media (min-width: 701px) {
  .site-header .dropdown:hover > .account-menu,
  .site-header .dropdown:focus-within > .account-menu {
    display: block;
  }
}

.account-menu .dropdown-item {
  color: var(--ink);
}

.account-menu .dropdown-item:hover,
.account-menu .dropdown-item:focus {
  background: color-mix(in srgb, var(--coral) 10%, var(--card));
  color: var(--ink);
}

.account-menu .logout-form button {
  width: 100%;
  padding: 0.25rem 1rem;
  text-align: left;
}

.message-count {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.message-count.message-count-unread {
  background: #c43d4d;
}

/* Administration benefits from the available desktop width; public pages keep
 * their intentionally narrower reading measure. */
.admin-container {
  max-width: none;
}

.unsafe-url-table {
  width: 100%;
  table-layout: fixed;
}

.unsafe-url-reports-card {
  max-width: none;
  width: 100%;
}

.unsafe-url-cell {
  width: 31%;
}

.url-report-select-column {
  width: 2.5rem;
}

.url-report-hide-column {
  width: 5rem;
}

.button.button-muted {
  padding: 8px 12px;
  background: color-mix(in srgb, var(--ink) 72%, var(--card));
}

.unsafe-url {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unsafe-url:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.unsafe-url-table tbody tr.url-report-row-hiding {
  opacity: 0;
  transform: translateX(0.75rem);
  transition: opacity 220ms ease, transform 220ms ease;
}

.unsafe-url-table tbody tr[data-url-report-id] {
  cursor: pointer;
}

.url-report-bulk-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.url-report-bulk-actions label {
  font-weight: 700;
}

.url-report-bulk-actions .form-select {
  width: min(15rem, 100%);
}

.logout-form {
  margin: 0;
}

.logout-form button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  padding: 4px;
}

.logout-form button:hover,
.logout-form button:focus {
  color: var(--coral);
  text-decoration: underline;
}
.account-shell {
  background: transparent;
  min-height: 70vh;
}
.account-shell > .container {
  max-width: var(--content-width);
}
.account-avatar {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow: hidden;
}
.account-member-summary {
  min-width: 0;
}
.account-member-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-nav-card,
.account-section,
.signup-card,
.legal-card,
.profile-card {
  border-radius: 1rem;
  border: 1px solid #8faabd;
  background: var(--card);
  box-shadow: 0 6px 18px #21445f1c;
  transition: box-shadow 160ms ease;
}

.account-nav-card:hover,
.account-section:hover,
.signup-card:hover,
.legal-card:hover,
.profile-card:hover {
  box-shadow: 0 10px 24px #21445f2b;
}
.account-nav .nav-link {
  display: flex;
  align-items: center;
  color: var(--ink);
  border-radius: 0.6rem;
  padding: 0.7rem 0.85rem;
}
.account-nav .message-count {
  margin-left: auto;
  transform: translateX(7px);
  color: #fff;
  float: none !important;
}
.account-nav .nav-link:hover,
.account-nav .nav-link:focus {
  background: color-mix(in srgb, var(--coral) 10%, var(--card));
}
.account-nav .nav-link.active {
  background: var(--coral);
  color: #fff;
}

.account-shell .btn-outline-primary {
  border-color: var(--coral);
  background: var(--card);
  box-shadow: 0 5px 14px #21445f12;
  color: var(--coral);
}

.account-shell .btn-outline-primary:hover,
.account-shell .btn-outline-primary:focus {
  border-color: var(--coral);
  background: var(--coral);
  box-shadow: 0 8px 18px #21445f24;
  color: #fff;
}

.account-shell .btn-primary {
  --bs-btn-bg: var(--coral);
  --bs-btn-border-color: var(--coral);
  --bs-btn-hover-bg: color-mix(in srgb, var(--coral) 82%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--coral) 82%, #000);
}

.search-shell .btn-primary {
  --bs-btn-bg: var(--coral);
  --bs-btn-border-color: var(--coral);
  --bs-btn-hover-bg: color-mix(in srgb, var(--coral) 82%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--coral) 82%, #000);
  font-weight: 700;
}

#mobile-search-filters {
  --bs-btn-bg: var(--coral);
  --bs-btn-border-color: var(--coral);
  --bs-btn-hover-bg: color-mix(in srgb, var(--coral) 82%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--coral) 82%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--coral) 72%, #000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--coral) 72%, #000);
  background-color: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.signup-card a[href="/auth/google"] {
  border-color: var(--coral);
  color: var(--coral);
}

.signup-card a[href="/auth/google"]:hover,
.signup-card a[href="/auth/google"]:focus {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.signup-card .btn-outline-primary {
  border-color: var(--coral);
  color: var(--coral);
}

.signup-card .btn-outline-primary:hover,
.signup-card .btn-outline-primary:focus {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.progress-bar {
  background-color: var(--coral);
}
.account-section {
  scroll-margin-top: 1.5rem;
}

.account-mobile-nav {
  display: none;
}

.account-menu-sheet {
  --bs-offcanvas-height: auto;
  height: auto;
  max-height: calc(100dvh - 0.75rem);
  border: 1px solid #8faabd;
  border-bottom: 0;
  border-radius: 1.25rem 1.25rem 0 0;
  background: var(--card);
  color: var(--ink);
}

.account-menu-sheet .offcanvas-header {
  border-bottom: 1px solid var(--line);
}

@media (max-width: 991px) {
  .account-navigation-column {
    display: none;
  }

  .account-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #8faabd;
    border-radius: 1rem;
    background: var(--card);
    box-shadow: 0 6px 18px #21445f1c;
  }

  .account-mobile-summary {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.6rem;
  }

  .account-mobile-summary .account-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    font-size: 0.8rem;
  }

  .account-mobile-summary div {
    display: grid;
    min-width: 0;
    line-height: 1.2;
  }

  .account-mobile-summary strong {
    font-size: 0.92rem;
  }

  .account-mobile-summary span:not(.account-avatar) {
    color: var(--muted);
    font-size: 0.76rem;
  }

  .account-mobile-menu-button {
    display: grid;
    gap: 0.1rem;
    min-height: 2.75rem;
    padding: 0.35rem 0.55rem;
    border: 0;
    border-radius: 0.7rem;
    background: color-mix(in srgb, var(--coral) 10%, var(--card));
    color: var(--coral);
    font: inherit;
    line-height: 1.1;
    text-align: right;
  }

  .account-mobile-menu-current {
    font-size: 0.9rem;
    font-weight: 700;
  }

  .account-mobile-menu-label {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    font-size: 0.72rem;
  }

  .account-mobile-menu-icon {
    width: 0.9rem;
    height: 0.9rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
  }

  .account-menu-sheet .offcanvas-body {
    padding-top: 0.75rem;
  }
}
.account-empty {
  border: 1px dashed var(--line);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  background: var(--card);
}
.account-empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: #f8f0df;
  font-size: 1.25rem;
}
.stat-tile {
  display: flex;
  min-height: 100px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  padding: 1rem;
}
.stat-tile strong {
  color: var(--coral);
  font:
    2rem var(--site-font),
    serif;
}
.stat-tile span {
  color: #59616d;
  font-size: 0.85rem;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--site-font);
}
.container {
  width: 100%;
  max-width: var(--content-width) !important;
  margin-inline: auto;
}
.site-header,
footer {
  max-width: 1120px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}
.site-header {
  width: 100%;
  max-width: none;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 1025;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  border-bottom: 1px solid var(--line);
  background-color: var(--paper);
}
.brand {
  display: block;
  align-self: center;
  width: min(1000px, 100%);
  line-height: 0;
}
.brand picture,
.brand img {
  display: block;
  width: 100%;
  height: auto;
}
.site-header nav {
  width: min(1000px, 100%);
  margin-inline: auto;
  justify-content: flex-end;
}
nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
a {
  color: inherit;
}
.site-header nav a {
  font-size: 0.92rem;
  text-decoration: none;
}
.button {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
  font: inherit;
  line-height: 1.5;
  padding: 13px 21px;
  text-decoration: none;
  font-weight: 700;
}
.btn {
  border-radius: 999px;
}
.button.small {
  padding: 8px 14px;
}
.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  box-sizing: border-box;
}
.header-messages {
  position: relative;
  width: 46px;
  padding: 0;
  border: 1px solid var(--coral);
  border-radius: 50%;
  background: var(--card);
  color: var(--coral);
}
.header-messages:hover,
.header-messages:focus-visible {
  background: color-mix(in srgb, var(--coral) 10%, var(--card));
  color: var(--coral);
}
.header-messages svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.header-unread-count {
  position: absolute;
  top: -5px;
  right: -7px;
  display: grid;
  min-width: 1.2rem;
  height: 1.2rem;
  padding-inline: 0.2rem;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: #c43d4d;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
}
.find-link svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}
.conversation-profile-link {
  color: inherit;
  text-decoration: none;
}
.conversation-profile-link:hover,
.conversation-profile-link:focus-visible {
  color: var(--coral);
  text-decoration: underline;
}
.google-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}
.google-mark {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}
.scroll-top {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1020;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: 0 3px 12px #21445f1f;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
}
.scroll-top:hover,
.scroll-top:focus-visible {
  border-color: var(--coral);
  color: var(--coral);
}
.search-result-limit-notice {
  margin: -0.5rem 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.mobile-search-filter-toggle,
.search-results-jump {
  display: none;
}
.nearby-search-results {
  margin-top: 2.5rem;
}
.contact-preferences-section {
  order: 10;
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.contact-preferences {
  margin: 0;
}
.contact-preferences legend {
  float: none;
  width: auto;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.signup-actions,
.profile-save-action {
  order: 11;
}
.hero {
  max-width: var(--content-width);
  margin: 0 auto 10px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 60px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 800;
}
.hero h1 {
  font:
    clamp(2.7rem, 4.2vw, 3.8rem)/0.98 var(--site-font),
    serif;
  letter-spacing: -0.06em;
  margin: 0.15em 0;
}
.lede {
  max-width: 510px;
  font-size: 1.18rem;
}
.text-link {
  margin-left: 22px;
  font-weight: 700;
}
.postcard {
  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 1.4142 / 1;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 2.05rem,
      #9ebbd01f 2.1rem,
      transparent 2.15rem
    ),
    #fffdf0;
  border: 10px solid #fffdf0;
  border-image: repeating-linear-gradient(
      135deg,
      #2f6f9e 0,
      #2f6f9e 12px,
      #fffdf0 12px,
      #fffdf0 24px,
      #d95d55 24px,
      #d95d55 36px,
      #fffdf0 36px,
      #fffdf0 48px
    )
    10;
  border-radius: 0.35rem;
  color: #21445f;
  padding: 44px 38px;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: rotate(3deg);
  box-shadow: 0 12px 24px #21445f1c;
}
.postcard::before {
  position: absolute;
  display: block;
  content: "";
  pointer-events: none;
}
.postcard::before {
  top: 24px;
  bottom: 24px;
  right: 40%;
  width: 1px;
  background: #9ebbd054;
}
.postcard::after {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 46px;
  height: 58px;
  border: 2px solid #21445f;
  background: transparent;
  content: "";
  pointer-events: none;
}
.postcard p {
  margin-bottom: 0.8rem;
  letter-spacing: 0.17em;
  font-size: 0.72rem;
  font-weight: 800;
}
.postcard strong {
  font:
    clamp(2.2rem, 4vw, 3.2rem) var(--site-font),
    serif;
  line-height: 1;
}
.postcard span {
  max-width: 230px;
  margin-top: 1.1rem;
}
.stats {
  background: var(--coral);
  color: #fff;
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 26px 20px;
}
.stats div {
  display: grid;
  padding: 0 clamp(14px, 3vw, 38px);
  text-align: center;
}
.stats div + div {
  border-left: 1px solid color-mix(in srgb, #fff 35%, transparent);
}
.stats strong {
  font:
    2rem var(--site-font),
    serif;
  color: var(--gold);
}
.stats span {
  font-size: 0.85rem;
}
.section {
  max-width: var(--content-width);
  margin: 20px auto;
  padding: 0 24px;
}
.section h2 {
  font:
    2.4rem var(--site-font),
    serif;
  margin-top: 0;
}
.empty {
  border: 1px dashed var(--line);
  padding: 40px;
  text-align: center;
  background: #fff;
}
.members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.member {
  background: var(--card);
  border: 1px solid #b4c8d6;
  border-radius: 0.85rem;
  box-shadow: 0 5px 14px #21445f12;
  padding: 20px;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}
.member:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px #21445f24;
}
.member strong,
.member small {
  display: block;
}

.member-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.member-summary-copy {
  min-width: 0;
}

.member-location {
  margin-top: 5px;
}

.member-summary-copy strong,
.member-summary-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-truncate {
  position: relative;
  overflow: hidden;
  text-overflow: clip !important;
  white-space: nowrap;
}

.member-truncate.is-truncated::after {
  position: absolute;
  right: 0;
  bottom: 0;
  content: "..";
  background: var(--card);
  padding-left: 0.12rem;
}

.member-gender {
  font-size: 0.78rem;
  font-weight: 600;
}

.member-facts {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  white-space: nowrap;
}

.member-facts .member-gender,
.member-facts .member-age {
  display: inline;
  overflow: visible;
  text-overflow: clip;
}

.member-age {
  color: var(--muted);
  font-size: 0.78rem;
}

.country-flag {
  display: inline-block;
  margin-right: 0.25rem;
  font-size: 1rem;
  line-height: 1;
  vertical-align: -0.05em;
}
.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: var(--gold);
  font-weight: 800;
  margin-bottom: 0;
  overflow: hidden;
}
footer {
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: #59616d;
}
footer span {
  color: #87909c;
}

.footer-link-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer-link-button:hover,
.footer-link-button:focus {
  color: var(--coral);
}

.cookie-modal {
  border: 1px solid #8faabd;
  border-radius: 1rem;
  background: var(--card);
  color: var(--ink);
}

.cookie-list {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
}

.cookie-list div {
  border-left: 3px solid var(--coral);
  padding-left: 0.85rem;
}

.cookie-list dt {
  margin-bottom: 0.2rem;
  font-weight: 700;
}

.cookie-list dd {
  margin: 0;
  color: var(--muted);
}

.legal-shell {
  min-height: 70vh;
}

.legal-card {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid #8faabd;
  border-radius: 1rem;
  background: var(--card);
  box-shadow: 0 8px 22px #21445f18;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.legal-card h1 {
  margin: 0 0 0.75rem;
  font:
    clamp(2.25rem, 5vw, 3.75rem) / 1 var(--site-font),
    serif;
  letter-spacing: -0.04em;
}

.legal-card h2 {
  margin: 2.25rem 0 0.65rem;
  font:
    1.55rem / 1.2 var(--site-font),
    serif;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
}

.legal-card li + li {
  margin-top: 0.35rem;
}

.legal-intro {
  max-width: 650px;
  font-size: 1.08rem;
}

.legal-updated {
  font-size: 0.85rem;
}
.signup-shell {
  background: transparent;
}
.content-card {
  border: 1px solid #8faabd;
  border-radius: 1rem;
  background: var(--card);
  box-shadow: 0 6px 18px #21445f1c;
  transition: box-shadow 160ms ease;
}

.content-card:hover {
  box-shadow: 0 10px 24px #21445f2b;
}

.empty.content-card {
  border-style: solid;
}

.search-heading {
  max-width: 680px;
}
.search-shell {
  padding-top: 20px !important;
}

.search-results {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.signup-shell > .container {
  max-width: var(--content-width) !important;
}
.signup-card {
  border-radius: 1.25rem;
  border: 1px solid #8faabd !important;
  box-shadow: 0 6px 18px #21445f1c !important;
}

.signup-card:hover {
  box-shadow: 0 10px 24px #21445f2b !important;
}
.signup-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: #6c757d;
  font-size: 0.85rem;
}
.signup-divider::before,
.signup-divider::after {
  height: 1px;
  flex: 1;
  background: #e4ddd2;
  content: "";
}
.signup-card .form-control,
.signup-card .form-select {
  border-color: #d9d0c2;
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
}
.signup-card .form-control:focus,
.signup-card .form-select:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 0.25rem #e95e4e20;
}
.signup-card .btn-primary {
  --bs-btn-bg: var(--coral);
  --bs-btn-border-color: var(--coral);
  --bs-btn-hover-bg: #cf4c3e;
  --bs-btn-hover-border-color: #cf4c3e;
  --bs-btn-active-bg: #b94134;
  --bs-btn-active-border-color: #b94134;
  border-radius: 999px;
  font-weight: 700;
}
.signup-actions {
  position: relative;
  z-index: 1;
}
.signup-actions .form-check {
  position: relative;
  z-index: 1;
}
.signup-actions .btn-primary {
  position: relative;
  z-index: 2;
  display: inline-block;
  width: auto;
}
.country-combobox {
  position: relative;
}
.country-results {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% - 1.65rem);
  right: 0;
  left: 0;
  max-height: 18rem;
  overflow-y: auto;
  border: 1px solid #d9d0c2;
  border-radius: 0.65rem;
  background: #fffefa;
}
.search-filters .country-results {
  top: 100%;
  right: auto;
  left: 0;
  width: max-content;
  min-width: 100%;
  max-width: min(30rem, calc(100vw - 2rem));
}
.country-results.is-open {
  display: block;
}
.country-results .list-group-item {
  border-width: 0 0 1px;
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}
.country-results .list-group-item:last-child {
  border-bottom: 0;
}
.preference-combobox {
  position: relative;
}
.preference-results {
  display: none;
  position: absolute;
  z-index: 30;
  top: 100%;
  right: auto;
  left: 0;
  width: max-content;
  min-width: 100%;
  max-width: min(42rem, calc(100vw - 2rem));
  max-height: 20rem;
  overflow-y: auto;
  border: 1px solid #8faabd;
  border-radius: 0.65rem;
  background: var(--card);
}
.preference-results.is-open {
  display: block;
}
.preference-results .list-group-item {
  border-width: 0 0 1px;
  padding: 0.65rem 0.85rem;
  text-align: left;
  white-space: nowrap;
}
.preference-results .list-group-item:last-child {
  border-bottom: 0;
}
.birth-picker-menu {
  min-width: min(22rem, calc(100vw - 3rem));
  border: 1px solid #d9d0c2;
  border-radius: 0.75rem;
}
.birth-picker-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.birth-picker-fields .mb-2 {
  margin-bottom: 0 !important;
}
.field-validation {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.875rem;
}
.field-validation.is-invalid {
  display: block;
}
.field-validation.is-invalid {
  color: #dc3545;
}

.profile-shell {
  min-height: 70vh;
  background: transparent;
}

.profile-backlink {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: #59616d;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.profile-backlink:hover,
.profile-backlink:focus {
  color: var(--coral);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}

.profile-card {
  border: 1px solid #8faabd;
  border-radius: 1.25rem;
  background: var(--card);
  box-shadow: 0 6px 18px #21445f1c;
  transition: box-shadow 160ms ease;
  overflow-wrap: anywhere;
}
.profile-shell {
  padding-top: 20px !important;
}

.profile-hero-card {
  grid-column: 1 / -1;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.profile-hero-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.profile-hero-copy {
  min-width: 0;
}

.profile-avatar {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  place-items: center;
  border: 6px solid #fffefa;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 8px 20px #18223018;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow: hidden;
}

.profile-avatar-large {
  width: 112px;
  height: 112px;
  border-width: 8px;
  font-size: 2rem;
}

.profile-hero-copy h1 {
  margin: 0;
  font:
    clamp(2.2rem, 5vw, 4rem) / 1 var(--site-font),
    serif;
  letter-spacing: -0.04em;
}

.profile-location {
  min-height: 1.5rem;
  margin: 0.6rem 0 0.8rem;
  color: #59616d;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.profile-hero-tags {
  margin-top: 1.15rem;
}
.profile-preference-note {
  margin-top: 0.65rem;
  color: #59616d;
  font-size: 0.85rem;
}

.profile-tag {
  border-radius: 999px;
  background: #f8f0df;
  padding: 0.35rem 0.7rem;
  color: #59616d;
  font-size: 0.85rem;
  font-weight: 700;
}
.member-gender-m {
  color: #4c7898;
}
.member-gender-f {
  color: #b06f83;
}
.member-gender-o {
  color: #75649a;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.profile-safety-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: 0.82rem;
}

.profile-safety-actions form {
  margin: 0;
}

.profile-safety-actions .text-link,
.profile-actions .text-link {
  margin-left: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.message-composer {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--paper);
}

.message-composer .form-control {
  min-height: 13rem;
  resize: vertical;
}

.message-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
}

.message-thread {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.conversation-layout {
  max-width: 960px;
  margin: 0 auto;
}

.mobile-chat-header {
  display: none;
}

.conversation-page-card {
  overflow: hidden;
}

.conversation-profile-card {
  padding: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.conversation-profile-card .profile-hero-content {
  align-items: flex-start;
}

.conversation-profile-card .profile-avatar-large {
  width: 76px;
  height: 76px;
  font-size: 1.4rem;
}

.conversation-profile-card h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.conversation-panel {
  min-width: 0;
  padding: 1.25rem;
}

.conversation-management {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.conversation-management form {
  margin: 0;
}

.conversation-management .text-link {
  margin-left: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.conversation-thread {
  max-height: calc(100vh - 15rem);
  min-height: 24rem;
  margin-top: 0;
  padding: 1.25rem 0.25rem 0.25rem;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.conversation-empty {
  margin: auto 0 0;
  color: var(--muted);
  text-align: center;
}

.message-removed-notice {
  margin: 0;
  color: var(--muted);
  font-style: italic;
}

.admin-removed-message {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-removed-message summary {
  cursor: pointer;
  color: var(--coral);
}

.admin-message-moderation {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.8rem;
}

.admin-message-moderation form {
  margin: 0;
}

.admin-message-moderation .text-link {
  padding: 0;
  border: 0;
  background: transparent;
}

.admin-message-url-report {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-message-url-report code {
  max-width: min(42rem, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-profile-report {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.admin-profile-report-hiding {
  opacity: 0;
  transform: translateX(0.35rem);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.profile-report-feedback {
  margin-top: 0.85rem;
}

.admin-profile-report code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.admin-profile-conversations {
  max-height: 18rem;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.admin-profile-conversation {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto auto auto;
  gap: 0.45rem 0.8rem;
  align-items: center;
  padding: 0.45rem 0.1rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  font-size: 0.86rem;
  text-decoration: none;
}

.admin-profile-conversation:hover,
.admin-profile-conversation:focus {
  color: inherit;
  background: color-mix(in srgb, var(--paper) 70%, var(--card));
}

.admin-profile-conversation span,
.admin-profile-conversation time {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .admin-profile-conversation {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-profile-conversation time {
    grid-column: 1 / -1;
  }
}

.conversation-thread .message-composer {
  position: sticky;
  bottom: -0.25rem;
  z-index: 2;
  margin-top: 0.5rem;
  padding: 1.25rem 0.25rem 0.5rem;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--card);
  box-shadow: none;
}

.conversation-safety-note {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid var(--coral);
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--paper) 82%, var(--card));
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.conversation-safety-note strong {
  color: var(--ink);
}

.conversation-thread .message-composer .form-control {
  min-height: 0;
  overflow-y: hidden;
  resize: none;
}


.message-bubble {
  width: min(78%, 42rem);
  padding: 0.85rem 1rem;
  border: 1px solid #8faabd;
  border-radius: 1rem;
  background: var(--card);
  box-shadow: 0 4px 12px #21445f12;
}

.message-bubble p {
  margin: 0;
}

.message-bubble .message-email-warning {
  margin-top: 0.7rem;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid var(--coral);
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--paper) 82%, var(--card));
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.message-email-warning strong {
  color: var(--ink);
}

.message-bubble small {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.message-bubble-sent {
  justify-self: end;
  background: color-mix(in srgb, var(--coral) 10%, var(--card));
}

.message-bubble-received {
  justify-self: start;
}

.admin-conversation-focus {
  outline: 3px solid color-mix(in srgb, var(--coral) 55%, transparent);
  outline-offset: 2px;
}

.conversation-list {
  display: grid;
  gap: 0.7rem;
}

.conversation-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--card);
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.conversation-row:hover,
.conversation-row:focus {
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 7px 18px #21445f1c;
}

.conversation-row .avatar {
  flex: 0 0 48px;
  margin-bottom: 0;
}

.conversation-main {
  min-width: 0;
  flex: 1;
}

.conversation-main strong,
.conversation-main small,
.conversation-preview {
  display: block;
}

.conversation-main small,
.conversation-direction,
.conversation-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.conversation-direction {
  margin-top: 0.25rem;
}

.conversation-direction {
  color: var(--ink);
}

.conversation-meta {
  display: grid;
  flex: 0 0 auto;
  gap: 0.35rem;
  justify-items: end;
  text-align: right;
}

.conversation-unread {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: var(--coral);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-action-note {
  color: #59616d;
  font-size: 0.88rem;
}

.account-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.account-photo-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--paper);
}

.account-photo-preview {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  cursor: zoom-in;
}

.account-photo-preview:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--coral) 55%, transparent);
  outline-offset: 3px;
}

.account-photo-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.55rem;
  object-fit: cover;
}

.account-photo-item p {
  min-height: 1.4em;
  margin: 0.55rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.photo-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.65rem;
}

.photo-actions form {
  margin: 0;
}

.photo-action-button {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border: 1px solid #8faabd;
  border-radius: 50%;
  background: var(--card);
  color: #4c7898;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.photo-action-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.photo-action-profile:hover,
.photo-action-profile:focus-visible {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
}

.photo-action-remove {
  color: #a5535e;
}

.photo-action-remove:hover,
.photo-action-remove:focus-visible {
  border-color: #a5535e;
  background: #a5535e;
  color: #fff;
}

.profile-crop-frame {
  height: min(68vh, 700px);
  min-height: 420px;
  overflow: hidden;
  background: #152b3b;
}

.profile-crop-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crop-modal-dialog {
  max-width: min(980px, calc(100vw - 2rem));
}

.profile-gallery-card {
  grid-column: 1 / -1;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.profile-section-heading {
  margin-bottom: 1rem;
}

.profile-photo-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.profile-photo-grid {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 0.75rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0.2rem;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.profile-photo-thumb {
  display: block;
  position: relative;
  width: clamp(112px, 16vw, 156px);
  height: clamp(112px, 16vw, 156px);
  flex: 0 0 auto;
  aspect-ratio: 1;
  overflow: visible;
  padding: 0;
  border: 1px solid #8faabd;
  border-radius: 0.85rem;
  background: var(--paper);
  cursor: zoom-in;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.profile-photo-thumb:hover,
.profile-photo-thumb:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #21445f2a;
  outline: none;
}

.profile-photo-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 0.85rem;
  object-fit: cover;
}

.profile-photo-tooltip {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  max-height: 100%;
  overflow-y: auto;
  border-radius: 0.85rem;
  background: #152b3bd9;
  padding: 0.65rem;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.15rem);
  transition: opacity 140ms ease, transform 140ms ease;
}

.profile-photo-thumb:hover .profile-photo-tooltip,
.profile-photo-thumb:focus-visible .profile-photo-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.profile-photo-strip-control {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #8faabd;
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
}

.profile-photo-strip-control:hover,
.profile-photo-strip-control:focus-visible {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
  outline: none;
}

.photo-lightbox {
  border: 1px solid #8faabd;
  background: #152b3b;
  color: #fff;
}

.photo-lightbox .modal-body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: min(70vh, 700px);
  padding: 0 1rem 1.25rem;
}

.photo-lightbox-figure {
  display: grid;
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin: 0;
  justify-items: center;
  gap: 0.75rem;
}

.photo-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
  object-fit: contain;
}

.photo-lightbox-figure figcaption {
  color: #d6e3eb;
  text-align: center;
}

.photo-lightbox-control {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  background: #ffffff18;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.photo-lightbox-control:hover,
.photo-lightbox-control:focus-visible {
  background: var(--coral);
  outline: none;
}

.profile-note-card {
  padding: 1.5rem;
}
.profile-note-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.profile-note-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  font-size: 1.2rem;
}

.profile-note-card h2,
.profile-section-card h2 {
  margin: 0 0 0.65rem;
  font:
    1.65rem / 1.15 var(--site-font),
    serif;
}
.profile-note-heading h2 {
  margin: 0;
}

.profile-note-card p {
  margin-bottom: 1.25rem;
  color: #59616d;
}
.profile-note-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.profile-note-actions .text-link {
  margin-left: 0;
}
.profile-note-actions span {
  color: var(--muted);
  font-size: 0.9rem;
}
.profile-note-actions span a {
  color: var(--coral);
  font-weight: 700;
}

.profile-details {
  display: grid;
  grid-column: 1 / -1;
  gap: 1.25rem;
}
@media (min-width: 701px) {
  .profile-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-section-about,
  .profile-section-work {
    grid-column: 1 / -1;
  }
}

.profile-section-card {
  padding: clamp(1.35rem, 3vw, 2rem);
}
.profile-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0 0.25rem;
}

.profile-last-active {
  margin: 0;
  color: #59616d;
  font-size: 0.9rem;
}

.moderation-card + .moderation-card {
  margin-top: 1.25rem;
}

.moderation-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
}

.moderation-filter label {
  font-weight: 700;
}

.moderation-filter .form-control,
.moderation-filter .form-select {
  width: auto;
  min-width: 10rem;
}

.moderation-score {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: #e8f0e9;
  color: #386149;
  font-weight: 700;
}

.moderation-score-flagged {
  background: #f8dfd8;
  color: #9d4536;
}

.admin-stat-grid,
.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.admin-operational-stat-grid {
  margin-top: 1rem;
}

.admin-stat,
.admin-action-card {
  padding: 1.25rem;
}

.admin-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-stat strong {
  display: block;
  margin-top: 0.4rem;
  color: var(--coral);
  font-size: 2rem;
}

.admin-stat-periods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.6rem 0 0;
}

.admin-stat-periods div {
  min-width: 0;
}

.admin-stat-periods dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
}

.admin-stat-periods dd {
  margin: 0.2rem 0 0;
  color: var(--coral);
  font-size: 1.35rem;
  font-weight: 800;
}

.admin-stat-link {
  color: inherit;
  text-decoration: none;
}

.admin-stat-link:hover,
.admin-stat-link:focus-visible {
  border-color: var(--coral);
  box-shadow: 0 9px 22px #21445f24;
  outline: none;
}

@media (min-width: 650px) {
  .admin-stat-wide {
    grid-column: span 2;
  }
}

.admin-action-card {
  display: flex;
  align-items: start;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
}

.admin-action-card > span {
  font-size: 1.7rem;
}

.admin-action-card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-action-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.profile-body {
  margin: 0;
  color: #3f4854;
}

.profile-language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.profile-language-list div {
  display: grid;
  gap: 0.2rem;
}

.profile-language-list span {
  color: #59616d;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-language-list strong {
  color: var(--ink);
}

@media (max-width: 700px) {
  .profile-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-search-filter-toggle {
    display: block;
  }
  .search-filters:not(.mobile-filters-open) .search-advanced-filter {
    display: none;
  }

  .search-postal-filter {
    order: 1;
  }

  .search-submit {
    order: 2;
  }
  .search-results-jump:not(.d-none) {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--coral);
    border-radius: 999px;
    background: var(--coral);
    box-shadow: 0 6px 18px #21445f33;
    color: #fff;
    font-weight: 700;
  }
  .site-header {
    gap: 8px;
    align-items: flex-start;
    padding: 10px;
  }
  .brand {
    width: min(380px, 100%);
  }
  .site-header nav {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 0;
  }
  .postcard {
    min-height: 200px;
  }
  .stats {
    padding-inline: 8px;
  }
  .stats div {
    padding-inline: 9px;
  }
  .stats span {
    font-size: 0.72rem;
  }
  footer {
    flex-wrap: wrap;
    gap: 16px;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .conversation-layout {
    grid-template-columns: 1fr;
  }

  body:has(.conversation-shell) .site-header,
  body:has(.conversation-shell) footer {
    display: none;
  }

  body:has(.conversation-shell) main {
    min-height: 100dvh;
  }

  .conversation-shell {
    min-height: 100dvh;
    padding: 0 !important;
  }

  .conversation-shell .container {
    max-width: none !important;
    padding: 0;
  }

  .conversation-shell .profile-backlink {
    display: none;
  }

  .conversation-shell .alert {
    margin: 0.75rem;
  }

  .conversation-layout {
    display: block;
    margin: 0;
  }

  .mobile-chat-header {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 2.25rem 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    min-height: 76px;
    padding: max(0.65rem, env(safe-area-inset-top)) 0.75rem 0.65rem;
    border-bottom: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 3px 12px #21445f12;
  }

  .mobile-chat-back {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: 50%;
    color: var(--coral);
    font-size: 1.4rem;
    text-decoration: none;
  }

  .mobile-chat-avatar {
    width: 44px;
    height: 44px;
    border-width: 3px;
    font-size: 0.8rem;
    box-shadow: none;
  }

  .mobile-chat-person {
    display: grid;
    min-width: 0;
    line-height: 1.2;
  }

  .mobile-chat-person strong,
  .mobile-chat-person .conversation-profile-link,
  .mobile-chat-person span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-chat-person strong,
  .mobile-chat-person .conversation-profile-link {
    color: var(--ink);
    display: block;
    font-size: 1rem;
    font-weight: 700;
  }

  .mobile-chat-person span,
  .mobile-chat-tags {
    color: var(--muted);
    font-size: 0.75rem;
  }

  .mobile-chat-tags {
    display: grid;
    gap: 0.1rem;
    max-width: 9.5rem;
    text-align: right;
    white-space: nowrap;
  }

  .mobile-chat-preference {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .conversation-page-card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .conversation-profile-card {
    display: none;
  }

  .conversation-panel {
    padding: 0;
  }

  .conversation-management {
    padding: 0.45rem 0.75rem;
    background: var(--card);
  }

  .conversation-thread {
    height: calc(100dvh - 76px);
    max-height: none;
    min-height: 0;
    padding: 0.85rem 0.75rem 0.25rem;
    background: color-mix(in srgb, var(--paper) 90%, var(--card));
  }

  .conversation-thread .message-composer {
    padding: 1rem 0 0.25rem;
  }

  .conversation-safety-note {
    margin-bottom: 0.55rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.74rem;
  }

  .conversation-thread .message-composer .button {
    min-height: 2.5rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
  }

  .profile-crop-frame {
    height: 58vh;
    min-height: 280px;
  }

  .profile-hero-content {
    align-items: flex-start;
  }

  .profile-avatar-large {
    width: 84px;
    height: 84px;
    font-size: 1.5rem;
  }

  .profile-note-card {
    order: 3;
  }
}

/* The search controls become a compact filter flow before Bootstrap's lg
 * layout. Keep Search first, then the toggle, then every optional filter. */
@media (max-width: 991px) {
  .mobile-search-filter-toggle {
    display: block;
    order: 1;
  }

  .search-query-filter {
    order: 0;
  }

  .search-filters .search-advanced-filter {
    order: 2;
  }

  .search-filters:not(.mobile-filters-open) .search-advanced-filter {
    display: none;
  }

  .search-filters .search-submit {
    order: 3;
  }
}
/* Message-risk indicators in moderator views. */
.admin-message-risk { margin-top: 0.2rem; }
.admin-message-risk span[aria-hidden="true"] { display: inline-flex; width: 1.15rem; height: 1.15rem; align-items: center; justify-content: center; margin-right: 0.2rem; border-radius: 50%; font-weight: 700; }
.admin-risk-low { color: #287a45; }
.admin-risk-low span[aria-hidden="true"] { color: #fff; background: #287a45; }
.admin-risk-medium { color: #856404; }
.admin-risk-medium span[aria-hidden="true"] { color: #856404; background: #fff3cd; }
.admin-risk-high { color: #9f1d25; font-weight: 700; }
.admin-risk-high span[aria-hidden="true"] { color: #fff; background: #b4232f; }
.risk-severity-square { display: inline-block; width: 0.75rem; height: 0.75rem; margin-left: 0.15rem; vertical-align: -0.08rem; border: 1px solid rgb(0 0 0 / 20%); border-radius: 0.15rem; }

.admin-risk-average {
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 400;
}
