@font-face {
  font-family: 'FitCollect Inter';
  src: url('inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Shared support surfaces inherit the active mobile or desktop palette. */
#help-screen { color: var(--text); min-width: 0; }
#help-screen.active { display: block; }
#help-screen .support-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
#help-screen h2 { font-size: 26px; margin: 4px 0; }
#help-screen h3 { font-size: 18px; margin: 0 0 18px; }
#help-screen a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
#help-screen .support-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; }
#help-screen :is(.support-compose, .support-faq, .support-history) { min-width: 0; }
#help-screen form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
#help-screen form > * { grid-column: 1; }
#help-screen :is(input, select) { height: 46px; }
#help-screen label { display: grid; gap: 8px; color: var(--text); font-size: 14px; font-weight: 600; }
#help-screen :is(input, select, textarea) { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--surface); font: inherit; }
#help-screen textarea { resize: vertical; min-height: 150px; }
#help-screen :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
#help-screen :is(button, input, select, textarea, a, summary):focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
#help-screen .support-note { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }
#help-screen .primary-button { width: auto; justify-self: start; display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; background: #292a31; color: #fff; padding: 12px 18px; }
#help-screen button svg { width: 18px; height: 18px; flex-shrink: 0; }
#help-screen button:disabled { opacity: .65; cursor: wait; }
#help-screen .support-faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
#help-screen summary { cursor: pointer; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--text); }
#help-screen .support-faq p { font-size: 14px; line-height: 1.65; color: var(--muted); }
#supportFeedback { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#help-screen .support-history { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
#help-screen .support-history h3 { margin: 0; }
#help-screen .filter-button { display: inline-flex; align-items: center; gap: 8px; color: var(--text); background: var(--surface); }
#supportTickets { display: grid; gap: 12px; font-size: 14px; }
#help-screen .support-ticket { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
#help-screen .support-ticket summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
#help-screen .support-ticket summary > span:first-child { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
#help-screen .support-ticket small { color: var(--muted); font-size: 12px; font-weight: 400; }
#help-screen .support-status { flex-shrink: 0; color: var(--text); font-size: 12px; }
#help-screen .support-ticket-body { padding-top: 20px; line-height: 1.65; overflow-wrap: anywhere; }
#help-screen .support-ticket-body p { white-space: pre-wrap; }
@media (max-width: 899px) {
  #help-screen .support-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  #help-screen { padding: 16px 4px; }
  #help-screen .support-heading a { font-size: 14px; }
}

body .desktop-alert > i, .bell-action::after { display: none; }
body .desktop-alert.has-unread-articles > i,
.bell-action.has-unread-articles::after {
  display: block;
  background: #e54862;
  border: 2px solid #fffaf7;
}

/* Reference styling is scoped to the desktop website. */
@media (min-width: 900px) {
  #settings-screen .theme-field {
    display: none;
  }

  body, body.light-theme, body[data-theme] {
    --bg: #f8eee5;
    --outside-bg: #f8eee5;
    --surface: #fffaf7;
    --surface-soft: #fcf5ef;
    --surface-lift: #fffdfb;
    --text: #14182a;
    --muted: #687083;
    --quiet: #737988;
    --border: #e9dfd9;
    --strong-border: #cfc5c1;
    --green: #292a31;
    --green-hover: #42434c;
    --green-soft: #fbe3e5;
    --neutral-soft: #f1ece9;
    --feature-start: #fce4df;
    --feature-mid: #fff5ee;
    --feature-end: #fffaf7;
    --search-bg: #fffaf7;
    background: #f8eee5;
    color: #14182a;
  }
  body .app-shell, body .app-shell :is(button, input, select, textarea) {
    font-family: 'FitCollect Inter', Arial, sans-serif;
    letter-spacing: 0;
  }
  body .app-shell { grid-template-columns: 280px minmax(0, 1fr); grid-template-rows: 70px 1fr; background: #f8eee5 !important; }
  body .desktop-sidebar { padding: 20px 24px; background: #fff8f3; border-right: 1px solid #fff; }
  body .desktop-sidebar-brand { gap: 16px; margin-bottom: 20px; flex-shrink: 0; }
  body .desktop-logo { width: 60px; height: 60px; flex-basis: 60px; background: #191e3c; color: #fff; font-size: 26px; font-weight: 750; }
  body .desktop-sidebar-brand strong { color: #080b13; font-size: 24px; font-weight: 750; }
  body .desktop-sidebar-brand small { margin-top: 4px; color: #7a7a80; font-size: 13px; }
  body .desktop-side-nav { gap: 4px; min-height: 0; overflow-y: auto; flex: 1; align-content: start; }
  body .desktop-side-item { min-height: 44px; gap: 20px; padding-inline: 16px; font-size: 16px; color: #252d4c; font-weight: 500; border-radius: 14px; }
  body .desktop-policy-links { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 12px 0; flex-shrink: 0; }
  body .desktop-policy-links button { padding: 4px 0; border: 0; background: transparent; color: #46516a; font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
  body .desktop-policy-links button:hover { text-decoration: underline; }
  body .desktop-gym-card { margin-top: 0; flex-shrink: 0; }
  body .desktop-side-item.active { background: #fce0e3; color: #171d38; border: 1px solid #fff; }
  body .desktop-side-item span, body .desktop-side-item.active span { display: flex; color: #252d4c; }
  body .desktop-gym-card { color: #252d4c; border-color: #e1d8d3; }
  body .desktop-gym-card > span { background: #ede9e7; }
  body .desktop-gym-card small { font-size: 13px; color: #7a7e8b; }
  body .desktop-gym-card b { font-size: 15px; color: #171d38; }
  body .topbar { height: 70px; min-height: 70px; border: 0; border-radius: 0 0 30px 0; background: #fff8f3 !important; gap: 24px; }
  body .desktop-breadcrumb { gap: 22px; font-size: 15px; }
  body .desktop-breadcrumb b { font-weight: 600; color: #13151d; }
  body .desktop-global-search { height: 42px; flex-basis: 365px; border-radius: 24px; background: #fffbf8; border-color: #e9e0dc; box-shadow: none; }
  body .topbar .desktop-global-search input { font-size: 13px; font-weight: 400; }
  body .desktop-alert { background: #fffaf7; border-radius: 50%; }
  body .desktop-alert i { background: #f6a6c6; }
  body .desktop-admin { gap: 14px; font-weight: 600; }
  body .desktop-admin span { background: #44464d; }
  body #appMain { background: #f8eee5; padding: 26px 30px; }
  body #home-screen.active { gap: 18px; grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr); }
  #home-screen .hero-copy .eyebrow { color: #7e8089; font-size: 18px; font-weight: 500; }
  #home-screen .hero-copy h1 { margin-top: 10px; font-size: 48px; font-weight: 780; line-height: 1.12; color: #08090c; }
  #home-screen .hero-copy > small { margin-top: 10px; font-size: 17px; color: #7d8291; font-weight: 500; }
  #home-screen .hero-status-card { margin-top: 26px; min-height: 86px; padding: 16px 24px; gap: 28px; border-radius: 16px; background: #f1f8f0; border-color: #cde2cc; }
  #home-screen .hero-status-icon { width: 52px; height: 52px; background: #2bb86b; color: #fff; }
  #home-screen .hero-status-card b { font-size: 18px; color: #111820; }
  #home-screen .hero-status-card small { font-size: 16px; color: #506078; }
  #home-screen .desktop-hero-add { top: 32px; min-height: 52px; padding-inline: 26px; border-radius: 14px; background: #292a31; border-color: #292a31; color: #fff; font-size: 16px; }
  #home-screen .metrics { gap: 16px; }
  #home-screen .metric-card { min-height: 150px; height: auto; padding: 22px; gap: 8px 20px; grid-template-columns: 58px minmax(0, 1fr); border: 1px solid #fff; border-radius: 16px; background: #fff0e4; }
  #home-screen .metric-card[data-filter='expired'] { background: #f1e8ff; }
  #home-screen .metric-card[data-filter='due-soon'] { background: #e5f2ff; }
  #home-screen .metric-card[data-filter='paid'] { background: #ffe8ed; }
  #home-screen .metric-card .dot { width: 58px; height: 58px; background: #ffdfc5; color: #141824; }
  #home-screen .metric-card[data-filter='expired'] .dot { background: #dfceff; }
  #home-screen .metric-card[data-filter='due-soon'] .dot { background: #c3e2ff; }
  #home-screen .metric-card[data-filter='paid'] .dot { background: #ffd1df; }
  #home-screen .metric-card .dot::after { display: none; }
  #home-screen .metric-card .dot svg { width: 28px; height: 28px; }
  #home-screen .metric-copy p { color: #242b48; font-size: 15px; font-weight: 600; }
  #home-screen .metric-copy small { color: #68728a; font-size: 14px; }
  #home-screen .metric-card strong { font-size: 29px; font-weight: 750; color: #080a10; }
  #home-screen .desktop-empty-panel, #home-screen .posts-panel { padding: 24px; border: 1px solid #fff; border-radius: 18px; background: #fffaf7; box-shadow: none; }
  #home-screen .desktop-collections { height: 310px; }
  #home-screen .desktop-collections:has(.has-records) { height: auto; min-height: 310px; }
  #home-screen .desktop-empty-state.has-records { display: flex; flex-direction: column; align-items: stretch; text-align: left; }
  #home-screen .desktop-empty-state.has-records > span { display: none; }
  #home-screen .desktop-empty-state.has-records > button { align-self: flex-start; }
  .desktop-record-list:empty { display: none; }
  .desktop-record-list { width: 100%; margin-top: 12px; }
  .desktop-record-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 10px 0; border-top: 1px solid #e9dfd9; }
  .desktop-record-row > span { color: #252d4c; font-size: 14px; overflow-wrap: anywhere; }
  .desktop-record-row > strong { font-size: 14px; color: #252d4c; }
  #home-screen .desktop-record-row > small { grid-column: 1 / -1; margin: 0; font-size: 12px; }
  #home-screen .posts-panel { grid-row: 3; min-height: 310px; height: 310px; }
  #home-screen .post-list { max-height: none; flex: 1; }
  #home-screen .desktop-members-summary { grid-column: 1 / -1; }
  #home-screen h2 { font-size: 20px; font-weight: 650; color: #14182a; }
  #home-screen .desktop-panel-head button { border-radius: 16px; background: #fffcfa; color: #454b5d; border-color: #e9dfd9; font-weight: 400; }
  #home-screen .desktop-empty-state > span svg { width: 54px; height: 54px; color: #b9bac4; }
  #home-screen .desktop-empty-state b { font-size: 17px; color: #252d4c; }
  #home-screen .desktop-empty-state small { color: #778198; }
  #home-screen .desktop-empty-state button, #home-screen .desktop-empty-state.compact button { border-radius: 16px; background: #292a31; border-color: #292a31; color: #fff; font-weight: 500; padding-inline: 20px; min-height: 40px; }
  #home-screen .post-card { background: transparent; border-color: #eee5df; }
  #home-screen .post-card summary b { color: #252d4c; font-weight: 600; }
  #home-screen .post-card summary small, #home-screen .post-card p { color: #707b91; }
  #home-screen .post-card summary:hover { background: #fff2ec; }
  #home-screen .post-card summary::after { display: none; }
  #home-screen .post-card .article-chevron { grid-column: 2; grid-row: 1 / 3; width: 20px; height: 20px; color: #252d4c; transition: transform 160ms ease; }
  #home-screen .post-card[open] .article-chevron { transform: rotate(90deg); }
  #home-screen :is(#desktop-collections-title, #posts-title) { display: flex; align-items: center; gap: 14px; }
  #home-screen :is(#desktop-collections-title, #posts-title) svg { width: 42px; height: 42px; padding: 10px; flex-shrink: 0; border-radius: 50%; background: #ffe2e9; }
  #appMain .screen:not(#home-screen) > .panel { background: #fffaf7; border-color: #fff; border-radius: 18px; padding: 28px; }
  #appMain .screen:not(#home-screen) :is(.member-card, .plan-card, .analytics-section, .impact-card) { background: #fffcfa; border-color: #e9dfd9; border-radius: 14px; }
  #appMain .screen:not(#home-screen) .analytics-kpi { background: #fff0e4; border-color: #fff; border-radius: 16px; }
  #appMain .screen:not(#home-screen) .analytics-kpi:nth-child(2) { background: #f1e8ff; }
  #appMain .screen:not(#home-screen) .analytics-kpi:nth-child(3) { background: #e5f2ff; }
  #appMain .screen:not(#home-screen) .analytics-kpi:nth-child(4) { background: #ffe8ed; }
  #appMain :is(input, select, textarea) { background: #fffdfa; border-color: #ddd4cf; color: #242938; border-radius: 10px; }
  #appMain textarea[readonly] { background: #f9f3ee; color: #616b7e; }
  #appMain :is(.primary-button, .member-actions a, .filter-chip.active), body .modal-card .primary-button { background: #292a31; border-color: #292a31; color: #fff; border-radius: 12px; }
  #appMain .filter-chip:not(.active), #appMain .filter-button { background: #fffcfa; color: #454b5d; border-color: #e5dcd6; border-radius: 12px; }
  #appMain .featured-plan { border-color: #c9b7e8; background: #f7f0ff !important; }
  #appMain .settings-list label { color: #454b5d; }
  body .modal-card { background: #fffaf7; border-radius: 18px; }
  #home-screen .desktop-hero-add:hover, #home-screen .desktop-empty-state button:hover, #appMain :is(.primary-button, .member-actions a):hover { background: #42434c; }
  body .desktop-sidebar svg, body .topbar svg, .desktop-add-member svg, .desktop-panel-head svg, .desktop-empty-state button svg { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
}
@media (min-width: 900px) and (max-width: 1250px) {
  body .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  body .desktop-sidebar { padding-inline: 16px; }
  body .desktop-sidebar-brand { gap: 10px; }
  body .desktop-sidebar-brand strong { font-size: 20px; }
  body .desktop-sidebar-brand small { font-size: 11px; }
  body .desktop-logo { width: 46px; height: 46px; flex-basis: 46px; font-size: 21px; }
  body #appMain { padding: 22px; }
  #home-screen .hero-copy h1 { font-size: 36px; }
  #home-screen .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body #home-screen.active { grid-template-columns: minmax(0, 1fr); }
  #home-screen .posts-panel { grid-column: 1; grid-row: 5; }
  #home-screen .desktop-members-summary { grid-row: 4; }
}
@media (max-width: 899px) {
  .metric-card .dot svg { display: none; }
  .article-chevron, #posts-title > svg { display: none; }
}
