@font-face {
  font-family: "Preon Hard";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/PreonHard_Regular_1.woff2") format("woff2");
}

@font-face {
  font-family: "Preon Loopless";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/PreonLoopless_Medium_1.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --black: #000000;
  --ink: #2a2a2a;
  --muted: #626763;
  --mint: #93dcce;
  --mint-dark: #008067;
  --state-green: #003e30;
  --mint-soft: #e9f8f5;
  --butter: #e2fc5a;
  --paper: #f6f7f5;
  --white: #ffffff;
  --line: #dce2de;
  --danger: #9c3028;
  --shadow: 0 22px 70px rgba(15, 42, 34, .13);
  font-family: "Preon Hard", "Avenir Next", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; background: var(--paper); scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; }
.hidden { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 11px 14px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.portal-header,
.login-layout,
.dashboard-hero,
.portal-shell,
footer {
  width: calc(100% - 28px);
  max-width: 1240px;
  margin-inline: auto;
}

.portal-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { width: 154px; color: var(--black); }
.brand img { width: 100%; height: auto; }
.header-actions { display: flex; align-items: center; gap: 13px; }
.readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 999px;
  font-family: "Preon Loopless", sans-serif;
  font-size: 0;
}
.readonly-badge svg { width: 18px; height: 18px; fill: var(--mint-dark); }
.text-button {
  border: 0;
  padding: 7px 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1, h2, h3, strong, .primary-button, .secondary-button, .primary-link, .section-tabs button {
  font-family: "Preon Loopless", "Avenir Next", sans-serif;
  font-weight: 500;
}
h1 { margin: 0; font-size: clamp(2.85rem, 12.5vw, 5rem); line-height: .96; letter-spacing: -.04em; }
h2 { margin: 0; font-size: clamp(1.65rem, 7vw, 2.25rem); line-height: 1.05; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 1.2rem; line-height: 1.15; }
.eyebrow, .kicker {
  margin: 0 0 12px;
  font-family: "Preon Loopless", sans-serif;
  font-size: .75rem;
  letter-spacing: .02em;
}
.eyebrow { display: inline-flex; padding: 8px 12px 6px; border: 1px solid currentColor; border-radius: 999px; }
.lede { max-width: 650px; margin: 23px 0 0; font-size: 1rem; line-height: 1.55; }

.login-view {
  min-height: calc(100vh - 76px);
  padding: 26px 0 60px;
  background: linear-gradient(to bottom, var(--mint) 0, var(--mint) 470px, var(--paper) 470px);
}
.login-layout { display: grid; min-width: 0; gap: 28px; }
.login-intro { min-width: 0; min-height: 334px; padding: 45px 0 30px; position: relative; overflow: hidden; }
.login-intro::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  right: -170px;
  top: 30px;
  border: 40px solid rgba(255, 255, 255, .45);
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-20deg);
}
.login-benefits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.login-benefits span { padding: 8px 11px 7px; border-radius: 999px; background: rgba(255, 255, 255, .52); font-size: .74rem; }

.login-card,
.portal-panel,
.membership-state {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}
.login-card { position: relative; z-index: 1; min-width: 0; max-width: 100%; border-radius: 24px; padding: 27px 21px; }
.card-copy { margin: 15px 0 25px; color: var(--muted); line-height: 1.5; }
#login-form label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .78rem; }
#login-email {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid #aeb8b2;
  border-radius: 13px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}
#login-email:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 4px rgba(0, 128, 103, .14); }
.field-error { margin: 10px 0 0; padding: 10px 12px; border-radius: 11px; background: #fff0ed; color: var(--danger); font-size: .78rem; }

.primary-button, .secondary-button, .primary-link {
  min-height: 49px;
  border: 1px solid var(--black);
  border-radius: 999px;
  padding: 13px 18px 11px;
  cursor: pointer;
  text-decoration: none;
}
.primary-button {
  width: 100%;
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--mint);
  color: var(--black);
  box-shadow: 0 4px 0 var(--black);
}
.primary-button svg { width: 18px; height: 18px; fill: currentColor; }
.primary-button:disabled { border-color: var(--line); background: #ecefed; color: #8c918e; box-shadow: none; cursor: wait; }
.secondary-button { margin-top: 18px; background: var(--white); color: var(--black); }
.primary-link { display: inline-flex; align-items: center; justify-content: center; background: var(--black); color: var(--white); }
.privacy-note { display: flex; align-items: flex-start; gap: 8px; margin: 19px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.privacy-note svg { flex: 0 0 auto; width: 16px; height: 16px; fill: var(--mint-dark); }
.login-sent { text-align: center; padding-block: 10px; }
.login-sent .state-icon { margin: 0 auto 22px; }
.login-sent p:not(.kicker) { color: var(--muted); line-height: 1.5; }
.state-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--mint-soft); }
.state-icon svg { width: 27px; height: 27px; fill: var(--mint-dark); }

.dashboard-view { padding-bottom: 70px; }
.dashboard-hero {
  display: grid;
  gap: 24px;
  padding: 47px 0 42px;
}
.dashboard-hero .lede { color: var(--muted); }
.membership-state { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 17px; box-shadow: none; }
.membership-state small { display: block; margin-bottom: 3px; color: var(--muted); font-size: .7rem; }
.membership-state strong { font-size: 1.05rem; }
.status-dot { width: 13px; height: 13px; border: 3px solid #c4e8df; border-radius: 50%; background: var(--mint-dark); }

.portal-shell { display: grid; gap: 14px; }
.section-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--white);
  scroll-snap-type: x proximity;
}
.section-tabs button {
  flex: 0 0 auto;
  min-height: 43px;
  padding: 11px 15px 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  scroll-snap-align: start;
}
.section-tabs button[aria-selected="true"] { background: var(--black); color: var(--white); }
.section-panels { min-width: 0; }
.portal-panel { min-height: 420px; border-radius: 23px; padding: 25px 20px; }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 25px; }
.updated-label { padding: 7px 10px; border-radius: 999px; background: var(--mint-soft); color: var(--mint-dark); font-size: .7rem; }

.overview-grid { display: grid; gap: 11px; }
.metric-card { min-height: 136px; display: grid; align-content: start; gap: 6px; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.metric-card.accent-card { border-color: transparent; background: var(--mint-soft); }
.metric-card small, .access-card small, .support-card small { color: var(--muted); font-size: .7rem; }
.metric-card strong { margin-top: 6px; font-size: 1.4rem; }
.metric-card span { color: var(--muted); font-size: .8rem; }
.community-callout { display: grid; gap: 20px; margin-top: 13px; padding: 22px; border-radius: 20px; background: var(--butter); }
.community-callout p:not(.kicker) { margin: 8px 0 0; color: var(--muted); }

.detail-grid { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.detail-grid div { padding: 15px 0; border-bottom: 1px solid var(--line); }
.detail-grid dt { margin-bottom: 5px; color: var(--muted); font-size: .72rem; }
.detail-grid dd { margin: 0; font-family: "Preon Loopless", sans-serif; }
.readonly-note, .empty-state { margin: 22px 0 0; padding: 15px; border-radius: 14px; background: var(--mint-soft); color: var(--muted); font-size: .8rem; line-height: 1.5; }

.invoice-list { display: grid; gap: 10px; }
.invoice-card { display: grid; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; }
.invoice-card header { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.invoice-card header span { padding: 6px 9px; border-radius: 999px; background: var(--mint-soft); color: var(--mint-dark); font-size: .7rem; }
.invoice-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.invoice-meta small { display: block; margin-bottom: 4px; color: var(--muted); font-size: .68rem; }
.invoice-meta strong { font-size: .9rem; }
.invoice-card a { color: var(--ink); font-family: "Preon Loopless", sans-serif; text-underline-offset: 3px; }

.people-section { margin-top: 28px; }
.people-section h3 { margin-bottom: 13px; }
.people-list { display: grid; gap: 9px; }
.person-card { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 15px; }
.person-avatar, .support-avatar { display: grid; place-items: center; border-radius: 50%; background: var(--mint); font-family: "Preon Loopless", sans-serif; }
.person-avatar { width: 42px; height: 42px; }
.person-card > div { min-width: 0; overflow-wrap: anywhere; }
.person-card > div > span { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.person-avatar { min-width: 42px; min-height: 42px; line-height: 1; }

.access-card, .support-card { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 19px; }
.access-card p { margin: 8px 0 0; color: var(--muted); }
.support-card { margin-top: 12px; grid-template-columns: 48px 1fr; align-items: center; }
.support-avatar { width: 48px; height: 48px; }
.support-card a { color: var(--ink); text-underline-offset: 3px; }

footer { min-height: 145px; padding-block: 28px; display: grid; justify-items: center; gap: 14px; text-align: center; color: var(--muted); font-size: .78rem; }
footer img { width: 150px; height: auto; }
footer p { margin: 0; }
footer a { color: inherit; }

:focus-visible { outline: 3px solid var(--mint-dark); outline-offset: 3px; }
.section-tabs button:focus-visible { outline-offset: -1px; }

@media (min-width: 760px) {
  .portal-header, .login-layout, .dashboard-hero, .portal-shell, footer { width: calc(100% - 48px); }
  .brand { width: 190px; }
  .readonly-badge { padding: 9px 13px; font-size: .75rem; }
  .login-view { padding-top: 45px; background: linear-gradient(115deg, var(--mint) 0 57%, var(--paper) 57%); }
  .login-layout { min-height: 650px; grid-template-columns: minmax(0, 1fr) minmax(380px, .72fr); gap: 64px; align-items: center; }
  .login-intro { min-height: auto; padding: 30px 0; overflow: visible; }
  .login-intro::after { width: 420px; height: 420px; right: -80px; top: -80px; border-width: 60px; }
  .login-card { padding: 39px; }
  .dashboard-hero { grid-template-columns: 1fr auto; align-items: end; padding: 70px 0 50px; }
  .membership-state { min-width: 230px; }
  .portal-panel { padding: 34px; }
  .overview-grid { grid-template-columns: repeat(3, 1fr); }
  .community-callout { grid-template-columns: 1fr auto; align-items: center; }
  .detail-grid { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .detail-grid .wide { grid-column: 1 / -1; }
  .invoice-card { grid-template-columns: 1fr auto; align-items: center; }
  .invoice-card header { min-width: 220px; }
  .invoice-meta { min-width: 340px; grid-template-columns: repeat(3, 1fr); }
  .access-card { grid-template-columns: 58px 1fr auto; align-items: center; }
  footer { min-height: 100px; grid-template-columns: auto 1fr auto; justify-items: initial; align-items: center; text-align: left; }
  footer img { width: 180px; }
  footer a { justify-self: end; }
}

@media (min-width: 1040px) {
  .portal-shell { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .section-tabs { position: sticky; top: 18px; display: grid; overflow: visible; padding: 8px; }
  .section-tabs button { width: 100%; text-align: left; }
  .portal-panel { min-height: 550px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (prefers-contrast: more) {
  :root { --line: #6d746f; --muted: #3e423f; }
  .readonly-badge, .login-card, .portal-panel, .metric-card, .invoice-card, .access-card, .support-card { border-width: 2px; }
}

/* Authenticated member portal — Claude Design visual-parity layer. */
.portal-authenticated {
  --portal-dark: #003e30;
  --portal-signal: #008067;
  --portal-mint: #93dcce;
  --portal-sunny: #e2fc5a;
  --portal-paper: #f7f8f6;
  --portal-ink: #000000;
  --portal-muted: #606661;
  --portal-line: #e2e6e2;
  background: var(--portal-paper);
}

.portal-authenticated .portal-header,
.portal-authenticated #portal-footer { display: none; }
.portal-authenticated #portal-main { min-height: 100dvh; }
.portal-authenticated .dashboard-view { min-height: 100dvh; padding: 0; }

.member-app { min-height: 100dvh; background: var(--portal-paper); }
.member-sidebar { display: block; min-height: 0; }
.member-sidebar-brand,
.member-sidebar-person { display: none; }
.member-workspace { position: relative; min-width: 0; }
.member-mobile-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--portal-line);
  background: #fff;
}
.member-mobile-header img { width: 148px; height: auto; }
.member-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--portal-mint);
  color: var(--portal-dark);
  font: 500 .82rem/1 "Preon Loopless", sans-serif;
}

.member-topbar {
  position: absolute;
  z-index: 4;
  top: 9px;
  right: 58px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}
.member-topbar h1 {
  display: none;
  font-size: 1.25rem;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.member-topbar-actions { display: flex; align-items: center; gap: 8px; }
.member-topbar .help-link { display: none; }
.help-link,
.quiet-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: var(--portal-dark);
  cursor: pointer;
  font: 500 .82rem/1 "Preon Loopless", sans-serif;
  text-decoration: none;
}
.member-topbar .dark-button { display: none; }

.section-panels {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding: 24px 16px calc(100px + env(safe-area-inset-bottom));
}
.portal-authenticated .portal-panel {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.portal-panel:focus { outline: none; }

.status-hero { margin-bottom: 22px; }
.status-pill,
.community-access-pill,
.inline-status {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 13px 7px;
  border-radius: 999px 0 0 999px;
  background: var(--portal-mint);
  color: var(--portal-dark);
  font: 500 .71rem/1 "Preon Loopless", sans-serif;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-pill::before,
.community-access-pill::before,
.inline-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--portal-signal);
}
.status-hero h2 {
  max-width: 820px;
  margin-top: 17px;
  color: var(--portal-ink);
  font-size: clamp(2rem, 9.7vw, 3.375rem);
  line-height: 1.03;
  letter-spacing: -.04em;
}
#hero-action-copy { display: inline-block; margin-left: .18em; }
.status-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--portal-muted);
  font-size: .96rem;
  line-height: 1.55;
}

.payment-alert {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 62, 48, .13);
  border-radius: 20px 0 0 20px;
  background: var(--portal-sunny);
  color: var(--portal-dark);
}
.payment-alert-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--portal-dark);
}
.payment-alert-icon svg { width: 21px; height: 21px; fill: var(--portal-sunny); }
.payment-alert strong { display: block; font-size: 1.05rem; line-height: 1.25; }
.payment-alert p { margin: 5px 0 0; font-size: .8rem; line-height: 1.45; }
.payment-alert .dark-button { grid-column: 1 / -1; justify-self: stretch; }

.overview-grid,
.overview-lower-grid,
.membership-layout,
.company-grid,
.community-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.overview-grid { margin-bottom: 14px; }
.metric-card {
  min-width: 0;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 21px;
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  background: #fff;
  color: var(--portal-ink);
  box-shadow: none;
  text-align: left;
}
.metric-card-button { width: 100%; cursor: pointer; }
.metric-card-button:hover { border-color: var(--portal-signal); }
.metric-card small,
.metric-card > span,
.metric-card > span b {
  color: var(--portal-muted);
  font-size: .76rem;
  line-height: 1.45;
}
.metric-card > span b { color: var(--portal-dark); }
.metric-card strong {
  max-width: 100%;
  color: var(--portal-ink);
  font-size: 1.3rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.event-card,
.lead-card,
.membership-facts,
.renewal-card,
.change-card,
.history-block,
.company-card,
.change-callout,
.community-hero,
.community-rules {
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  background: #fff;
}
.event-card {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 25px;
  overflow: hidden;
  border-color: var(--portal-dark);
  border-radius: 32px 0 0 32px;
  background: var(--portal-dark);
  color: #fff;
}
.event-card::before,
.event-card::after,
.community-hero::before,
.community-hero::after {
  content: "";
  position: absolute;
  border: 22px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
  opacity: .14;
  transform: rotate(26deg);
  pointer-events: none;
}
.event-card::before { width: 210px; height: 210px; right: -72px; top: -88px; color: var(--portal-mint); }
.event-card::after { width: 100px; height: 100px; right: -28px; top: -35px; color: #fff; border-width: 13px; }
.event-card > * { position: relative; z-index: 1; }
.event-card .kicker { color: var(--portal-mint); }
.event-card h3 { max-width: 420px; color: #fff; font-size: 1.65rem; }
.event-card p:not(.kicker) { max-width: 480px; margin: 10px 0 19px; color: #d9eee9; font-size: .84rem; line-height: 1.55; }

.lead-card { min-height: 260px; padding: 25px; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lead-actions > a { max-width: 100%; white-space: normal; }
.lead-phone { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 8px; color: var(--portal-ink); text-decoration: underline; text-underline-offset: 3px; }
.lead-contact-hint { display: block; margin-top: 12px; color: var(--portal-muted); font-size: .75rem; line-height: 1.5; }
.lead-card .kicker,
.company-card > h3,
.history-block > h3,
.community-rules .kicker {
  color: var(--portal-dark);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lead-identity { display: flex; align-items: center; gap: 13px; margin: 22px 0 18px; }
.lead-identity > span:last-child { min-width: 0; }
.lead-identity strong,
.lead-identity small { display: block; }
.lead-identity strong { font-size: 1.1rem; line-height: 1.2; overflow-wrap: anywhere; }
.lead-identity small { margin-top: 4px; color: var(--portal-muted); font-size: .73rem; }
.support-avatar { width: 48px; height: 48px; color: var(--portal-dark); }
.lead-card > p:not(.kicker) { margin: 0 0 20px; color: var(--portal-muted); font-size: .82rem; line-height: 1.55; }

.dark-button,
.mint-button,
.outline-button {
  min-height: 48px;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--portal-dark);
  border-radius: 999px 0 0 999px;
  padding: 13px 18px 11px;
  cursor: pointer;
  font: 500 .8rem/1 "Preon Loopless", sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.dark-button { background: var(--portal-dark); color: #fff; }
.mint-button { border-color: var(--portal-mint); background: var(--portal-mint); color: var(--portal-dark); }
.outline-button { background: transparent; color: var(--portal-dark); }
.dark-button:hover,
.mint-button:hover,
.outline-button:hover { transform: translateY(-2px); }

.page-intro { max-width: 750px; margin-bottom: 25px; }
.page-intro h2 { color: var(--portal-ink); font-size: clamp(2rem, 8.5vw, 2.7rem); line-height: 1.04; }
.page-intro p { margin: 13px 0 0; color: var(--portal-muted); font-size: .9rem; line-height: 1.6; }

.membership-facts,
.renewal-card,
.change-card,
.history-block,
.company-card,
.change-callout,
.community-rules { padding: 22px; }
.membership-facts { margin: 0; }
.membership-facts > div,
.company-details > div {
  display: grid;
  gap: 5px;
  padding: 15px 0;
  border-bottom: 1px solid var(--portal-line);
}
.membership-facts > div:first-child,
.company-details > div:first-child { padding-top: 0; }
.membership-facts > div:last-child,
.company-details > div:last-child { padding-bottom: 0; border-bottom: 0; }
.membership-facts dt,
.company-details dt { color: var(--portal-muted); font-size: .73rem; }
.membership-facts dd,
.company-details dd { margin: 0; color: var(--portal-ink); font: 500 .94rem/1.35 "Preon Loopless", sans-serif; overflow-wrap: anywhere; }
.membership-aside { display: grid; gap: 14px; }
.renewal-card { border-color: var(--portal-mint); background: var(--portal-mint); color: var(--portal-dark); }
.renewal-card p { margin: 0 0 22px; line-height: 1.52; }
.renewal-card > strong,
.renewal-card > small { display: block; }
.renewal-card > strong { font-size: 1.35rem; }
.renewal-card > small { margin-top: 5px; font-size: .7rem; }
.change-card p { margin: 14px 0 19px; color: var(--portal-muted); font-size: .82rem; line-height: 1.55; }
.history-block { margin-top: 14px; }
.history-block > p { margin: 8px 0 18px; color: var(--portal-muted); font-size: .875rem; line-height: 1.6; }
.history-table-wrap { overflow-x: auto; }
.history-block table { width: 100%; min-width: 620px; border-collapse: collapse; }
.history-block th,
.history-block td { padding: 13px 12px; border-bottom: 1px solid var(--portal-line); text-align: left; font-size: .875rem; }
.history-block th { color: var(--portal-muted); font-weight: 400; }
.readonly-note,
.invoice-footnote {
  margin: 16px 0 0;
  padding: 0;
  background: transparent;
  color: var(--portal-muted);
  font-size: .72rem;
}

.invoice-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.invoice-filters button {
  min-height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--portal-line);
  border-radius: 999px 0 0 999px;
  padding: 11px 16px 9px;
  background: #fff;
  color: var(--portal-muted);
  cursor: pointer;
  font: 500 .77rem/1 "Preon Loopless", sans-serif;
  white-space: nowrap;
}
.invoice-filters button.active { border-color: var(--portal-dark); background: var(--portal-dark); color: #fff; }
.portal-authenticated .invoice-list { gap: 10px; container-type: inline-size; }
.portal-authenticated .invoice-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 19px;
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}
.portal-authenticated .invoice-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.invoice-card header strong,
.invoice-card header small { display: block; }
.invoice-card header small { margin-top: 4px; color: var(--portal-muted); font-size: .69rem; }
.invoice-status {
  flex-shrink: 0;
  padding: 7px 10px 6px;
  border-radius: 999px 0 0 999px;
  background: #eef1ef;
  color: var(--portal-dark);
  font: 500 .66rem/1 "Preon Loopless", sans-serif;
  white-space: nowrap;
}
.invoice-status::before { content: "●"; margin-right: 5px; }
.invoice-status-paid { background: var(--portal-mint); }
.invoice-status-open { background: var(--portal-sunny); }
.portal-authenticated .invoice-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.portal-authenticated .invoice-meta .invoice-download { grid-column: 1 / -1; }

.company-grid { margin-bottom: 14px; }
.company-card > h3 { margin-bottom: 18px; }
.company-details { margin: 0; }
.portal-authenticated .people-section { margin-top: 0; }
.people-section > p { margin: 17px 0 0; color: var(--portal-muted); font-size: .72rem; line-height: 1.5; }
.portal-authenticated .person-card {
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--portal-line);
  border-radius: 0;
}
.portal-authenticated .person-card:last-child { border-bottom: 0; }
.change-callout { display: grid; gap: 18px; align-items: center; border-radius: 20px 0 0 20px; }
.change-callout h3 { font-size: 1.2rem; }
.change-callout p { margin: 7px 0 0; color: var(--portal-muted); font-size: .8rem; line-height: 1.5; }

.community-hero {
  position: relative;
  min-height: 285px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 25px;
  overflow: hidden;
  border-color: var(--portal-mint);
  border-radius: 32px 0 0 32px;
  background: var(--portal-mint);
  color: var(--portal-dark);
}
.community-hero::before { width: 230px; height: 230px; right: -72px; top: -80px; color: #fff; }
.community-hero::after { width: 112px; height: 112px; right: -22px; top: -26px; color: var(--portal-dark); border-width: 14px; }
.community-hero > * { position: relative; z-index: 1; }
.community-hero h3 { margin-top: 16px; font-size: 1.85rem; }
.community-hero > p { max-width: 550px; margin: 11px 0 20px; line-height: 1.55; }
.community-hero > div { display: flex; flex-wrap: wrap; gap: 9px; }
.community-grid { margin-top: 14px; }
.community-rules ul { margin: 20px 0 0; padding: 0; list-style: none; }
.community-rules li { position: relative; padding: 14px 0 14px 28px; border-bottom: 1px solid var(--portal-line); font-size: .82rem; line-height: 1.5; }
.community-rules li:last-child { border-bottom: 0; }
.community-rules li::before { content: "✓"; position: absolute; left: 0; color: var(--portal-signal); font-weight: 700; }

.updated-label { display: block; margin-top: 16px; color: var(--portal-muted); font-size: .68rem; text-align: right; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Mobile destinations retain readable labels and can grow with text zoom. */
.portal-authenticated .section-tabs {
  position: fixed;
  z-index: 80;
  inset: auto 0 0;
  min-height: calc(76px + env(safe-area-inset-bottom));
  height: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow-x: auto;
  padding: 6px 5px env(safe-area-inset-bottom);
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
  border-radius: 0;
  background: var(--portal-dark);
  scroll-snap-type: x proximity;
}
.portal-authenticated .section-tabs button {
  min-width: 0;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1 1 auto;
  padding: 7px 3px;
  border: 0;
  border-radius: 12px 0 0 12px;
  background: transparent;
  color: #c8ded8;
  font-size: .75rem;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.section-tabs .nav-label-short { display: none; }
.portal-authenticated .section-tabs button svg { width: 20px; height: 20px; fill: currentColor; }
.portal-authenticated .section-tabs button[aria-selected="true"] { background: var(--portal-mint); color: var(--portal-dark); }
.portal-authenticated .section-tabs button[data-section="membership"] { display: none; }
@media (max-width: 899px) {
  .section-tabs .nav-label-full { display: none; }
  .section-tabs .nav-label-short { display: inline; }
  .section-panels { padding-bottom: calc(5rem + 40px + env(safe-area-inset-bottom)); }
  /* The reduced destination count applies only to bottom navigation. */
  .portal-authenticated .section-tabs:has(#invoices-tab[hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Membership dates and billing cadence stay visible on every screen size. */
.invoice-group { min-width: 0; padding: 14px; border: 1px solid var(--portal-signal); border-radius: 22px; background: #eaf7f3; }
.invoice-group > h3 { margin: 0 0 8px; font-size: 1rem; }
.invoice-group > p { margin: 0 0 14px; font-size: .8rem; line-height: 1.5; color: var(--portal-dark); }
.invoice-group .invoice-card + .invoice-card { margin-top: 10px; }
.invoice-relation { grid-column: 1 / -1; margin: 0; font-size: .78rem; line-height: 1.5; color: var(--portal-dark); overflow-wrap: anywhere; }
.invoice-card header > div { min-width: 0; overflow-wrap: anywhere; }

@media (min-width: 620px) {
  .section-panels { padding-inline: 24px; }
  .overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-grid .metric-card { display: flex; }
  .overview-lower-grid,
  .company-grid,
  .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-alert { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .payment-alert .dark-button { grid-column: auto; justify-self: end; }
  .change-callout { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Use the available document width, not the viewport (desktop has a sidebar). */
@container (min-width: 760px) {
  .portal-authenticated .invoice-card { grid-template-columns: minmax(220px, 1fr) auto; align-items: center; }
  .portal-authenticated .invoice-meta { min-width: 390px; grid-template-columns: 1fr 1fr auto; }
  .portal-authenticated .invoice-meta .invoice-download { grid-column: auto; }
}

@media (min-width: 900px) {
  .member-app { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .member-sidebar {
    position: sticky;
    top: 0;
    min-height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 31px 20px 25px;
    overflow-y: auto;
    background: var(--portal-dark);
    color: #fff;
  }
  .member-sidebar-brand { width: 184px; display: block; margin: 0 10px 45px; }
  .member-sidebar-brand img { width: 100%; height: auto; filter: invert(1); }
  .member-mobile-header { display: none; }
  .member-workspace { min-height: 100dvh; }
  .member-topbar {
    position: static;
    min-height: 68px;
    padding: 10px 32px;
    border-bottom: 1px solid var(--portal-line);
    background: #fff;
  }
  .member-topbar h1 { display: block; font-size: 1.05rem; }
  .member-topbar .help-link { display: inline-flex; }
  .member-topbar .dark-button { display: inline-flex; }
  .portal-authenticated .section-tabs {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .portal-authenticated .section-tabs button,
  .portal-authenticated .section-tabs button[data-section="membership"] {
    width: 100%;
    min-height: 49px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 13px;
    padding: 12px 14px 10px;
    border-radius: 12px 0 0 12px;
    color: #d6e7e2;
    font-size: .78rem;
    text-align: left;
  }
  .portal-authenticated .section-tabs button svg { width: 19px; height: 19px; }
  .portal-authenticated .section-tabs button[aria-selected="true"] { background: var(--portal-mint); color: var(--portal-dark); }
  .member-sidebar-person {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    margin-top: auto;
    padding: 24px 9px 0;
    border-top: 1px solid rgba(255, 255, 255, .17);
  }
  .member-sidebar-person strong,
  .member-sidebar-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .member-sidebar-person strong { color: #fff; font-size: .75rem; }
  .member-sidebar-person small { margin-top: 3px; color: #b8d4cc; font-size: .64rem; }
  .section-panels { max-width: 1120px; padding: 34px 32px 64px; }
  .status-hero { margin-bottom: 26px; }
  .payment-alert { min-height: 96px; padding: 19px 23px; }
  .metric-card { min-height: 158px; padding: 24px; }
  .overview-lower-grid { grid-template-columns: minmax(0, 1.42fr) minmax(310px, 1fr); gap: 14px; }
  .event-card,
  .lead-card { min-height: 290px; padding: 29px; }
  .membership-layout { grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 14px; }
  .membership-facts,
  .renewal-card,
  .change-card,
  .history-block,
  .company-card,
  .change-callout,
  .community-rules { padding: 27px; }
  .community-hero { min-height: 330px; padding: 32px; }
  .community-hero h3 { font-size: 2.2rem; }
}

@media (min-width: 1280px) {
  .member-app { grid-template-columns: 272px minmax(0, 1fr); }
  .member-topbar { padding-inline: 40px; }
  .section-panels { padding: 40px 40px 72px; }
}

@media (max-width: 389px) {
  .section-panels { padding-inline: 12px; }
  .member-mobile-header,
  .member-topbar { padding-inline: 12px; }
  .member-topbar-actions { gap: 7px; }
  .metric-card,
  .lead-card,
  .membership-facts,
  .renewal-card,
  .change-card,
  .history-block,
  .company-card,
  .change-callout,
  .community-rules { padding: 18px; }
  .payment-alert { padding: 17px; }
  .dark-button,
  .mint-button,
  .outline-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .dark-button,
  .mint-button,
  .outline-button { transition: none; }
  .dark-button:hover,
  .mint-button:hover,
  .outline-button:hover { transform: none; }
}

@media (prefers-contrast: more) {
  .portal-authenticated .metric-card,
  .event-card,
  .lead-card,
  .membership-facts,
  .renewal-card,
  .change-card,
  .history-block,
  .company-card,
  .change-callout,
  .community-hero,
  .community-rules,
  .portal-authenticated .invoice-card { border-width: 2px; }
}
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.history-heading h3 { margin: 0; }
.history-heading .outline-button { min-height: 44px; }
.history-footnote { font-size: .875rem; line-height: 1.6; }
.history-table-wrap:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.member-app [hidden], .history-block [hidden], #invoice-refresh[hidden] { display: none !important; }
#invoices-tab[hidden] { display: none !important; }
/* Read-only financial overview, nested inside the permission-gated invoice tab. */
.billing-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; margin: 0 0 20px; }
.billing-overview[hidden] { display: none; }
.billing-summary-card { min-width: 0; padding: 22px; border: 1px solid var(--border, #ddd); border-radius: 16px; background: #fff; }
.billing-summary-card h3 { margin: 0 0 16px; font-size: 19px; }
.billing-summary-card dl { margin: 0; }
.billing-summary-card dl > div { padding: 10px 0; border-bottom: 1px solid #eee; }
.billing-summary-card dt { color: #666; font-size: 13px; }
.billing-summary-card dd { margin: 5px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.billing-summary-card p, .billing-disclaimer { font-size: 13px; line-height: 1.6; color: #555; overflow-wrap: anywhere; }
.billing-summary-card .billing-state { display: inline-block; margin: 0; padding: 6px 12px; border-radius: 20px; background: #f3f4f3; color: #003e30; font-weight: 700; }
.billing-summary-card .billing-source { font-size: 12px; margin-bottom: 0; }
.billing-shared { margin: 16px 0; padding: 14px 16px; border-left: 3px solid #00876c; border-radius: 0 10px 10px 0; background: #e8f7f3; }
.billing-shared h4 { margin: 0 0 6px; color: #003e30; font-size: 15px; }
.billing-shared p { margin: 4px 0; color: #003e30; }
.billing-disclaimer { margin: 0 0 24px; padding: 16px; background: #f7f8f7; border-radius: 12px; }
/* A verified paid pair is one settlement; documents are subordinate links. */
.portal-authenticated .invoice-card.invoice-settlement {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  border-color: var(--portal-signal);
}
.invoice-settlement > header { grid-column: 1 / -1; }
.invoice-settlement-summary { min-width: 0; }
.invoice-settlement-summary small {
  display: block;
  margin-bottom: 5px;
  color: var(--portal-muted);
  font-size: .8rem;
}
.invoice-settlement-amount { display: block; font-size: 1.5rem; overflow-wrap: anywhere; }
.invoice-settlement-documents {
  display: grid;
  align-content: start;
  min-width: 0;
  border-top: 1px solid var(--portal-line);
  padding-top: 7px;
}
.invoice-document {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
  min-width: 0;
}
.invoice-document[hidden] { display: none !important; }
.invoice-document a { display: inline-flex; align-items: center; min-height: 44px; }
.invoice-document > span:first-child { padding-block: 12px; }
.invoice-document-number, .invoice-document-date { color: var(--portal-muted); font-size: .8rem; overflow-wrap: anywhere; }
.invoice-document-recipient { color: var(--portal-muted); font-size: .8rem; overflow-wrap: anywhere; flex-basis: 100%; }
.invoice-settlement-note { grid-column: 1 / -1; margin: 0; color: var(--portal-muted); font-size: .8rem; line-height: 1.5; }
@container (min-width: 760px) {
  .portal-authenticated .invoice-card.invoice-settlement { grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr); }
  .invoice-settlement-summary { align-self: center; }
  .invoice-settlement-documents { border-top: 0; border-left: 1px solid var(--portal-line); padding: 0 0 0 20px; }
}

/* Barter is an agreed service exchange, not a missing invoice. */
.barter-card { background: var(--portal-mint, #e6f5f1); border: 1px solid var(--portal-dark, #00483d); border-radius: 18px; padding: clamp(20px, 3vw, 32px); margin: 0 0 24px; }
.barter-card h3 { margin: 6px 0 16px; font-size: 1.6rem; }
.barter-card p { max-width: 78ch; line-height: 1.6; }
.barter-note { font-size: .95rem; }
.barter-card[hidden], .barter-hidden { display: none !important; }
