/* These styles are generated from project.scss. */

:root {
  --mfc-primary: #f46c11;
  --mfc-primary-dark: #d85a05;
  --mfc-secondary: #6f8d2b;
  --mfc-accent: #2f512d;
  --mfc-warm: #c83d20;
  --mfc-text: #243d25;
  --mfc-muted: #5e6958;
  --mfc-surface: rgba(255, 255, 255, 0.92);
  --mfc-surface-strong: #fffdf8;
  --mfc-border: rgba(47, 81, 45, 0.15);
  --mfc-shadow: 0 24px 60px rgba(39, 67, 32, 0.14);
}

html {
  min-height: 100%;
}

body.app-body {
  min-height: 100vh;
  color: var(--mfc-text);
  background:
    radial-gradient(circle at top left, rgba(244, 108, 17, 0.26), transparent 30%),
    radial-gradient(circle at top right, rgba(111, 141, 43, 0.22), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #f7f4ec 48%, #eef5e7 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: var(--mfc-secondary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--mfc-accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 1rem 0 0;
}

.navbar {
  margin: 0 auto;
  padding: 0.85rem 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 40px rgba(47, 81, 45, 0.12);
  backdrop-filter: blur(18px);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--mfc-text);
  font-weight: 700;
  padding: 0.2rem 0;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--mfc-text);
}

.brand-logo {
  display: block;
  width: 5.6rem;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 22px rgba(47, 81, 45, 0.12));
}

.brand-title,
.brand-subtitle {
  display: block;
  line-height: 1.15;
}

.brand-title {
  font-size: 1.2rem;
  color: var(--mfc-accent);
}

.brand-subtitle {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mfc-muted);
}

.navbar-toggler {
  border: 0;
  box-shadow: none;
}

.navbar-light .navbar-toggler-icon {
  filter: sepia(1) saturate(4) hue-rotate(18deg);
}

.nav-link {
  color: var(--mfc-text);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.65rem 1rem;
}

.nav-link:hover,
.nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--mfc-primary-dark);
  background: rgba(244, 108, 17, 0.1);
}

.nav-link-button {
  background: linear-gradient(135deg, var(--mfc-primary), var(--mfc-warm));
  color: #fff;
  box-shadow: 0 14px 28px rgba(244, 108, 17, 0.26);
}

.nav-link-button:hover,
.nav-link-button:focus {
  color: #fff;
  background: linear-gradient(135deg, var(--mfc-primary-dark), #b8381f);
}

.page-shell {
  padding: 2rem 0 4rem;
}

body.thread-detail-page .page-shell {
  padding-bottom: 0.75rem;
}

.message-stack {
  margin-bottom: 1.5rem;
}

.site-footer {
  padding: 0 0 2.75rem;
}

.site-footer .container {
  display: grid;
  gap: 1rem;
}

.site-footer-shell {
  position: relative;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.94));
  box-shadow: var(--mfc-shadow);
  overflow: hidden;
}

.site-footer-shell::after {
  content: "";
  position: absolute;
  inset: auto -2rem -2rem auto;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 108, 17, 0.18), transparent 68%);
  pointer-events: none;
}

.site-footer-contact-band {
  padding: 0.15rem 0;
  text-align: center;
}

.site-footer-brand-logo,
.site-footer-contact {
  margin-left: auto;
  margin-right: auto;
}

.site-footer-brand-logo {
  display: block;
  width: min(100%, 240px);
  height: auto;
}

.site-footer-contact {
  color: var(--mfc-muted);
}

.site-footer-partners {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2rem;
}

.site-footer-partner-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  text-decoration: none;
}

.site-footer-partner-link:focus-visible {
  outline: 2px solid rgba(47, 81, 45, 0.55);
  outline-offset: 4px;
}

.site-footer-partner-logo {
  position: relative;
  display: block;
  max-width: min(100%, 180px);
  max-height: 68px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.site-footer-partner-logo-wide {
  max-width: min(100%, 410px);
  max-height: 58px;
}

.hero-section,
.content-section {
  position: relative;
  margin-bottom: 2rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.94));
  box-shadow: var(--mfc-shadow);
  overflow: hidden;
}

.hero-section::after,
.content-section::after {
  content: "";
  position: absolute;
  inset: auto -3rem -3rem auto;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(111, 141, 43, 0.2), transparent 68%);
  pointer-events: none;
}

.manage-lookup-section {
  padding: 2.35rem;
  padding-bottom: 2.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(111, 141, 43, 0.12);
  color: var(--mfc-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 42rem;
  color: var(--mfc-muted);
}

.hero-card,
.info-card {
  height: 100%;
  padding: 1.75rem;
  border: 1px solid var(--mfc-border);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(111, 141, 43, 0.1), rgba(47, 81, 45, 0.08) 65%, rgba(244, 108, 17, 0.11));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-card-label {
  margin-bottom: 1rem;
  color: var(--mfc-muted);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-study-card {
  height: auto;
}

.hero-brand-lockup {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.35rem;
  margin: 0 auto 2rem;
}

.hero-logo-card {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  text-align: center;
}

.hero-logo {
  width: min(100%, 19rem);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(47, 81, 45, 0.14));
}

.hero-logo-featured {
  width: min(100%, 21rem);
}

.hero-logo-copy {
  width: 100%;
}

.hero-heading {
  font-size: calc(3.5rem - 5pt);
}

.hero-spotlight-title {
  color: #000;
  font-size: calc(2.4rem - 2pt);
  font-weight: 800;
}

.hero-partner-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  max-width: none;
}

.hero-partner-group {
  max-width: none;
}

.hero-partner-group-body {
  position: relative;
  z-index: 1;
}

.hero-partner-card {
  width: 100%;
  max-width: none;
  padding: 1.5rem;
  border: 1px solid var(--mfc-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 34px rgba(47, 81, 45, 0.08);
}

.hero-partner-card strong,
.hero-partner-card span {
  display: block;
}

.hero-partner-card span {
  margin-top: 0.25rem;
  color: var(--mfc-muted);
  font-size: 0.95rem;
}

.hero-partner-group a,
.community-partners-card a,
.participant-details-section a,
.col-lg-5 .info-card a {
  color: var(--mfc-primary);
}

.hero-partner-group a:hover,
.hero-partner-group a:focus-visible,
.community-partners-card a:hover,
.community-partners-card a:focus-visible,
.participant-details-section a:hover,
.participant-details-section a:focus-visible,
.col-lg-5 .info-card a:hover,
.col-lg-5 .info-card a:focus-visible {
  color: var(--mfc-primary-dark);
}

.hero-lead {
  max-width: 46rem;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 1.5rem;
}

.upcoming-session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.upcoming-session-card {
  display: block;
  height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--mfc-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 34px rgba(47, 81, 45, 0.08);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.upcoming-session-card:hover,
.upcoming-session-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(244, 108, 17, 0.35);
  box-shadow: 0 22px 42px rgba(47, 81, 45, 0.12);
  color: inherit;
}

.upcoming-session-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.upcoming-session-date,
.upcoming-session-status,
.upcoming-session-link {
  font-weight: 700;
}

.upcoming-session-date {
  color: var(--mfc-primary-dark);
}

.upcoming-session-status {
  color: var(--mfc-secondary);
}

.upcoming-session-link {
  display: inline-flex;
  margin-top: auto;
  color: var(--mfc-accent);
}

.empty-session-state {
  padding: 1.5rem;
  border: 1px dashed rgba(47, 81, 45, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.stat-row-centered {
  margin-top: 0;
}

.stat-chip {
  min-width: 14rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px rgba(47, 81, 45, 0.08);
}

.stat-chip strong,
.stat-chip span {
  display: block;
}

.stat-chip span {
  margin-top: 0.3rem;
  color: var(--mfc-muted);
}

.hero-highlight-question {
  color: var(--mfc-primary);
  font-size: clamp(2rem, 3.8vw, 3.3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-highlight-qr {
  display: block;
  width: min(100%, 260px);
  height: auto;
}

.who-can-join-qr {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
}

.who-can-join-qr-image {
  display: block;
  width: min(100%, 220px);
  margin: 0 auto;
  height: auto;
}

.feature-list {
  display: grid;
  gap: 1rem;
}

.feature-item {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.feature-card,
.card {
  border: 1px solid var(--mfc-border);
  border-radius: 24px;
  background: var(--mfc-surface);
  box-shadow: 0 18px 34px rgba(47, 81, 45, 0.08);
}

.contact-card {
  border: none;
  background: transparent;
  box-shadow: none;
}

.contact-section {
  border: none;
  box-shadow: none;
}

.participant-details-section {
  border: none;
  background: transparent;
  box-shadow: none;
}

.participant-details-section::after {
  display: none;
}

.commitment-section .section-heading {
  max-width: 52rem;
  margin-bottom: 1.25rem;
}

.commitment-section .section-heading h2 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.commitment-section .feature-card {
  border-color: rgba(47, 81, 45, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(47, 81, 45, 0.06);
}

.commitment-section .card-body {
  padding: 1.7rem 1.4rem;
}

.commitment-section .h4 {
  margin-bottom: 0.8rem;
  font-size: 1.15rem;
  line-height: 1.2;
}

.contact-section::after {
  display: none;
}

.card-body {
  padding: 1.5rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(244, 108, 17, 0.14), rgba(111, 141, 43, 0.14));
  color: var(--mfc-primary-dark);
  font-weight: 800;
}

.btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.78rem 1.35rem;
  border-width: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--mfc-primary), var(--mfc-warm));
  box-shadow: 0 16px 30px rgba(244, 108, 17, 0.24);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: linear-gradient(135deg, var(--mfc-primary-dark), #b8381f);
}

.btn-outline-primary {
  border: 1px solid rgba(47, 81, 45, 0.22);
  color: var(--mfc-secondary);
  background: rgba(255, 255, 255, 0.8);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background: rgba(111, 141, 43, 0.1);
  color: var(--mfc-accent);
}

.form-control,
.form-select,
textarea,
input,
select {
  border-radius: 18px;
  border-color: rgba(47, 81, 45, 0.16);
  box-shadow: none;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus,
select:focus {
  border-color: rgba(244, 108, 17, 0.42);
  box-shadow: 0 0 0 0.25rem rgba(244, 108, 17, 0.14);
}

.list-group {
  gap: 0.9rem;
}

.list-group-item {
  margin-bottom: 0;
  border: 1px solid var(--mfc-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(87, 63, 168, 0.06);
}

.list-group-item + .list-group-item {
  border-top-width: 1px;
}

.badge {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}

.bg-primary {
  background-color: var(--mfc-primary) !important;
}

.bg-secondary {
  background-color: var(--mfc-secondary) !important;
}

.alert {
  border: 1px solid transparent;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(47, 81, 45, 0.08);
}

.alert-debug {
  color: var(--mfc-text);
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(47, 81, 45, 0.18);
}

.alert-error {
  color: #982f1e;
  background-color: rgba(200, 61, 32, 0.12);
  border-color: rgba(200, 61, 32, 0.2);
}

.alert-success {
  color: #274826;
  background-color: rgba(111, 141, 43, 0.16);
  border-color: rgba(111, 141, 43, 0.24);
}

.alert-warning {
  color: #8a5800;
  background-color: rgba(244, 108, 17, 0.14);
  border-color: rgba(244, 108, 17, 0.22);
}

.auth-shell {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-top: 1rem;
}

.auth-panel {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--mfc-shadow);
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.section-back-link {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--mfc-secondary);
}

.thread-grid {
  display: grid;
  gap: 1rem;
}

.thread-card {
  display: block;
  padding: 1.4rem;
  border: 1px solid var(--mfc-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 34px rgba(47, 81, 45, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.thread-card:hover,
.thread-card:focus {
  transform: translateY(-2px);
  border-color: rgba(244, 108, 17, 0.2);
  box-shadow: 0 22px 40px rgba(47, 81, 45, 0.12);
}

.thread-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.thread-label,
.thread-time {
  display: block;
  font-size: 0.82rem;
  color: var(--mfc-muted);
}

.thread-label {
  margin-bottom: 0.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.thread-summary {
  color: var(--mfc-text);
}

.thread-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(111, 141, 43, 0.12);
  color: var(--mfc-secondary);
  font-size: 0.84rem;
  font-weight: 700;
}

.conversation-card,
.form-card {
  height: 100%;
}

.dhq-lookup-card-plain {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.conversation-header-card {
  margin-bottom: 1rem;
  padding: 0.85rem 1.15rem;
}

.conversation-header-card::after {
  display: none;
}

.conversation-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.conversation-title {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.conversation-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.participant-info-toggle {
  padding: 0.45rem 0.9rem;
}

.conversation-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Support thread: “Mark as unread” — compact, strong enabled vs disabled contrast */
.support-mark-unread-btn {
  border: 1px solid #b35900;
  background-color: #fff4e0;
  color: #5c2f00;
  font-weight: 600;
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 0.2rem 0.5rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.support-mark-unread-btn:hover:not(:disabled) {
  background-color: #ffe2b8;
  border-color: #8f4500;
  color: #3d1f00;
}

.support-mark-unread-btn:focus-visible {
  border-color: #8f4500;
  box-shadow: 0 0 0 0.2rem rgba(179, 89, 0, 0.35);
}

.support-mark-unread-btn:active:not(:disabled) {
  background-color: #ffd69a;
  border-color: #7a3b00;
}

.support-mark-unread-btn:disabled,
.support-mark-unread-btn[disabled] {
  border: 1px dashed #adb5bd;
  background-color: #f1f3f5;
  color: #868e96;
  font-weight: 500;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.conversation-card-expanded .card-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: clamp(22rem, calc(100vh - 20.5rem), 48rem);
  padding: 1.25rem;
}

.conversation-participant-card .card-body {
  max-height: clamp(22rem, calc(100vh - 20.5rem), 48rem);
  overflow-y: auto;
}

.participant-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.participant-panel-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-width: 2rem;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.participant-meta {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.participant-meta dt {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mfc-muted);
}

.participant-meta dd {
  margin: 0.15rem 0 0;
}

.participant-dhq-link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-start;
  gap: 0.55rem;
}

.participant-dhq-link {
  word-break: break-all;
  font-size: 0.9rem;
  line-height: 1.35;
}

.participant-copy-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  min-width: 2.1rem;
  padding: 0;
}

.participant-copy-link-button svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.participant-copy-link-button-success {
  border-color: rgba(38, 208, 184, 0.36);
  color: #0c665b;
  background: rgba(38, 208, 184, 0.12);
}

.participant-session-list {
  margin-top: 1.15rem;
}

.participant-session-item {
  padding: 0.4rem 0;
}

.participant-session-link {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(108, 99, 255, 0.16);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.participant-session-link:hover,
.participant-session-link:focus {
  border-color: rgba(255, 93, 143, 0.3);
  box-shadow: 0 12px 22px rgba(84, 73, 245, 0.1);
  transform: translateY(-1px);
  color: var(--mfc-text);
}

.participant-session-item small {
  color: var(--mfc-muted);
}

.participant-session-link-label {
  margin-top: 0.15rem;
  color: var(--mfc-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.conversation-stream {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.85rem;
  margin-right: -0.45rem;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 0.25rem 0;
}

.chat-row {
  display: flex;
}

.chat-row-inbound {
  justify-content: flex-start;
}

.chat-row-outbound {
  justify-content: flex-end;
}

.chat-bubble-shell {
  display: grid;
  gap: 0.45rem;
  max-width: min(76%, 44rem);
}

.chat-row-outbound .chat-bubble-shell {
  justify-items: end;
}

.chat-message-label {
  padding: 0 0.35rem;
  color: var(--mfc-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-bubble {
  position: relative;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(47, 81, 45, 0.14);
  border-radius: 1.5rem;
  box-shadow: 0 16px 30px rgba(47, 81, 45, 0.08);
}

.message-bubble-inbound {
  border-top-left-radius: 0.55rem;
  background: linear-gradient(180deg, rgba(111, 141, 43, 0.12), rgba(255, 255, 255, 0.98));
}

.message-bubble-outbound {
  border-top-right-radius: 0.55rem;
  background: linear-gradient(180deg, rgba(244, 108, 17, 0.14), rgba(255, 255, 255, 0.98));
}

.message-bubble-top {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.chat-timestamp {
  color: var(--mfc-muted);
  font-size: 0.77rem;
  font-weight: 600;
}

.message-body {
  color: var(--mfc-text);
  line-height: 1.55;
}

.message-meta,
.profile-meta {
  display: grid;
  gap: 1rem;
}

.message-meta div,
.profile-meta div {
  display: grid;
  gap: 0.2rem;
}

.message-meta dt,
.profile-meta dt {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mfc-muted);
}

.message-meta dd,
.profile-meta dd {
  margin: 0;
  color: var(--mfc-text);
}

.chat-message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.35rem;
  color: var(--mfc-muted);
  font-size: 0.8rem;
}

.chat-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(111, 141, 43, 0.15);
  color: #274826;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

.chat-error {
  max-width: min(76%, 44rem);
  margin-top: -0.05rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(200, 61, 32, 0.18);
  border-radius: 1rem;
  background: rgba(200, 61, 32, 0.08);
  color: #982f1e;
  font-size: 0.88rem;
}

.chat-composer {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(47, 81, 45, 0.12);
}

.chat-composer-main {
  flex: 1;
}

.chat-composer-main ul.errorlist {
  margin: 0 0 0.6rem;
  padding-left: 1.2rem;
  color: #8d233f;
}

.chat-composer-input {
  min-height: 3.4rem;
  padding: 0.95rem 1.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.98rem;
}

.chat-composer-input::placeholder {
  color: rgba(102, 112, 133, 0.82);
}

.chat-send-button {
  min-width: 7.5rem;
}

.empty-state-card {
  padding: 2rem;
  border: 1px dashed rgba(47, 81, 45, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.empty-state-compact {
  padding: 1.5rem;
  text-align: left;
}

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

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, var(--mfc-primary), var(--mfc-secondary));
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(244, 108, 17, 0.22);
}

.action-grid {
  display: grid;
  gap: 1rem;
}

.action-card {
  display: block;
  padding: 1.2rem;
  border: 1px solid rgba(47, 81, 45, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--mfc-text);
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.action-card:hover,
.action-card:focus {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.96);
  color: var(--mfc-text);
  box-shadow: 0 18px 34px rgba(47, 81, 45, 0.1);
}

.quick-actions-card .card-body {
  padding: 1rem 1.1rem;
}

.quick-actions-card .action-grid {
  gap: 0.75rem;
}

.quick-actions-card .action-card {
  padding: 0.9rem 1rem;
  border-radius: 18px;
}

.quick-actions-card .action-card p {
  font-size: 0.94rem;
  line-height: 1.35;
}

.calendar-card .card-body {
  padding: 1.5rem;
}

.calendar-card-compact .card-body {
  padding: 1.25rem;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.calendar-month-label {
  font-size: 1.25rem;
  line-height: 1.2;
  text-align: center;
}

.calendar-nav-button {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  line-height: 1.2;
}

.calendar-legend {
  color: var(--mfc-muted);
  font-size: 0.95rem;
}

.calendar-grid {
  display: grid;
  gap: 0.85rem;
}

.calendar-grid-desktop,
.calendar-grid-compact {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
  padding: 0.5rem;
  color: var(--mfc-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 11rem;
  padding: 0.9rem;
  border: 1px solid rgba(47, 81, 45, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.calendar-day-compact {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 2.35rem;
  padding: 0.2rem;
  border-radius: 14px;
}

.calendar-day-muted {
  opacity: 0.55;
}

.calendar-day-today {
  border-color: rgba(244, 108, 17, 0.35);
  box-shadow: inset 0 0 0 1px rgba(244, 108, 17, 0.12);
}

.calendar-day-has-event {
  border-color: rgba(111, 141, 43, 0.4);
  background: linear-gradient(180deg, rgba(111, 141, 43, 0.18), rgba(244, 108, 17, 0.12));
}

.calendar-day-has-event .calendar-day-number {
  color: var(--mfc-accent);
}

.calendar-day-click-target {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}

.calendar-day-click-target:hover,
.calendar-day-click-target:focus-visible {
  color: inherit;
  text-decoration: none;
}

.calendar-day-click-target:focus-visible {
  outline: 2px solid rgba(47, 81, 45, 0.6);
  outline-offset: 2px;
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.calendar-day-number {
  font-size: 0.72rem;
  font-weight: 800;
}

.calendar-day-indicator {
  position: absolute;
  bottom: 0.24rem;
  width: 0.26rem;
  height: 0.26rem;
  border-radius: 999px;
  background: var(--mfc-primary);
}

.calendar-day-link {
  font-size: 0.82rem;
  font-weight: 700;
}

.calendar-day-events {
  display: grid;
  gap: 0.6rem;
}

.calendar-event {
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(244, 108, 17, 0.1), rgba(111, 141, 43, 0.08));
}

.calendar-event-time {
  color: var(--mfc-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calendar-event-status {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.calendar-event-status-open {
  color: #274826;
}

.calendar-event-status-booked {
  color: #982f1e;
}

.calendar-signup-link {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.calendar-empty {
  color: var(--mfc-muted);
  font-size: 0.92rem;
}

.manage-appointment-list {
  display: grid;
  gap: 1rem;
}

.manage-appointment-card {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem;
  border: 1px solid var(--mfc-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 34px rgba(47, 81, 45, 0.08);
}

.manage-appointment-main {
  flex: 1;
}

.manage-appointment-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.manage-booking-meta {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.85rem;
  color: var(--mfc-muted);
}

.manage-appointment-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 12rem;
}

.manage-appointment-actions form {
  margin: 0;
}

.manage-appointment-actions .btn {
  width: 100%;
}

.lookup-panel-plain {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.lookup-panel-plain > div {
  padding-top: 0.9rem;
}

.lookup-results-panel-plain {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.lookup-results-panel-plain > div {
  padding-top: 0.15rem;
}

.manage-appointments-section {
  padding-top: 1.2rem;
}

.manage-appointments-section .manage-appointment-list {
  margin-top: 0.85rem;
}

.resource-map {
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
}

.resource-map-status {
  min-height: 1.5rem;
}

.pantry-map-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.resources-focus-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.resources-matters-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 767.98px) {
  .site-header {
    padding-top: 0.75rem;
  }

  .navbar {
    border-radius: 20px;
    padding: 0.75rem 0;
  }

  .hero-section,
  .content-section {
    padding: 1.5rem;
    border-radius: 24px;
  }

  .manage-lookup-section {
    padding: 1.75rem;
    padding-bottom: 2rem;
  }

  .manage-appointments-section {
    padding-top: 1rem;
  }

  .manage-appointments-section .manage-appointment-list {
    margin-top: 0.65rem;
  }

  .hero-brand-lockup {
    margin-bottom: 1.5rem;
  }

  .hero-logo-featured {
    width: min(100%, 16rem);
  }

  .brand-subtitle {
    display: none;
  }

  .brand-logo {
    width: 4.4rem;
  }

  .brand-title {
    font-size: 1rem;
  }

  .page-shell {
    padding-top: 1.25rem;
  }

  .dashboard-header,
  .conversation-header-bar,
  .conversation-title-row,
  .thread-card-top,
  .conversation-header,
  .message-bubble-top,
  .profile-hero,
  .calendar-toolbar,
  .calendar-mobile-item,
  .manage-appointment-card,
  .manage-appointment-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-avatar {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 1.25rem;
    font-size: 1.5rem;
  }

  .calendar-card .card-body {
    padding: 1.25rem;
  }

  .manage-appointment-actions {
    width: 100%;
    min-width: 0;
  }

  .chat-bubble-shell,
  .chat-error {
    max-width: 100%;
  }

  .chat-row-outbound .chat-bubble-shell {
    justify-items: stretch;
  }

  .conversation-header-actions,
  .chat-composer {
    width: 100%;
  }

  .conversation-participant-card {
    width: 100%;
  }

  .chat-send-button {
    width: 100%;
  }

  .conversation-card-expanded .card-body {
    height: clamp(18rem, calc(100vh - 12.5rem), 38rem);
  }
}
