:root {
  color-scheme: light;
  --primary: #52587c;
  --secondary: #dd314c;
  --ink: #172033;
  --muted: #697386;
  --line: #e4e8ee;
  --paper: #f5f7fa;
  --gold: var(--secondary);
  --navy: var(--primary);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
template { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at top, #fff 0, var(--paper) 64%);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
body.branded-page {
  background: #222e59;
}
.portal-shell {
  width: min(100% - 2rem, 66rem);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0 1.5rem;
}
.account-shell {
  width: min(100% - 2.5rem, 82rem);
  align-items: stretch;
  gap: 1.75rem;
}
.account-shell > .account-brand-row { display: flex; justify-content: space-between; gap: 1.5rem; }
.account-brand-row > .wordmark { flex: 0 0 auto; align-self: center; }
.account-brand-ad { flex: 1 1 auto; width: 100%; max-width: 970px; min-width: 0; height: 124px; }
.account-brand-ad > a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.account-brand-ad img { display: block; max-width: 100%; max-height: 124px; width: auto; height: auto; object-fit: contain; }
.impersonation-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: .85rem 1rem; border: 2px solid #dd314c; border-radius: .75rem; background: #fff; color: #222e59; }
.impersonation-banner > div { display: grid; gap: .2rem; min-width: 0; }
.impersonation-banner > div span { overflow-wrap: anywhere; color: var(--muted); font-size: .88rem; }
.impersonation-banner form { flex: 0 0 auto; margin: 0; }
.impersonation-banner .button { width: auto; margin: 0; white-space: nowrap; }
.account-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  align-items: stretch;
  gap: 1.5rem;
  flex: 1;
}
.portal-nav {
  display: flex;
  flex-direction: column;
  padding: 1.25rem .8rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, .78);
}
.mobile-menu-toggle, .nav-close { display: none; }
.nav-backdrop { display: none; }
.nav-header { display: contents; }
.nav-heading {
  margin: .4rem .75rem 1rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.nav-item {
  display: block;
  width: 100%;
  padding: .85rem .75rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: .95rem;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}
.nav-item:hover { background: rgba(82, 88, 124, .1); }
.nav-item.is-current { background: var(--navy); color: #fff; }
.nav-dropdown-toggle::after {
  content: "";
  float: right;
  width: .45rem;
  height: .45rem;
  margin: .2rem .1rem 0 .5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.nav-dropdown-toggle[aria-expanded="true"]::after { transform: translateY(.2rem) rotate(225deg); }
.nav-submenu {
  margin: 0 0 .35rem .75rem;
  padding-left: .45rem;
  border-left: 2px solid var(--line);
}
.nav-subitem { padding-top: .65rem; padding-bottom: .65rem; font-size: .9rem; }
.nav-utility {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.nav-utility form { margin: 0; }
.nav-icon {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
}
.nav-icon:hover { background: rgba(82, 88, 124, .1); }
.nav-icon.is-current { background: var(--navy); color: #fff; }
.nav-icon svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; }
.mobile-menu-toggle:focus-visible, .nav-close:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; }
.nav-signout { color: var(--muted); }
.account-content { min-width: 0; }
.account-page { min-width: 0; }
.account-card {
  width: 100%;
  min-width: 42rem;
  min-height: 100%;
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.75rem);
}
.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0 0 0 1.25rem;
}
.account-tab {
  display: inline-block;
  padding: .8rem 1.05rem;
  border: 0;
  border-radius: .6rem .6rem 0 0;
  background: #eceef3;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}
.account-tab:hover { background: #e2e4ec; }
.account-tab.is-selected { background: var(--secondary); color: #fff; }
.pricing-admin-tab { background: #fff0f2; color: var(--secondary); }
.pricing-admin-tab:hover { background: #ffe2e7; }
.pricing-admin-tab.is-selected { background: var(--secondary); color: #fff; }
.account-tab:focus-visible, .nav-item:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; }
.tab-panel { padding-top: 1rem; }
.panel-placeholder {
  min-height: 12rem;
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  color: var(--muted);
}
.membership-card .member-details { max-width: 42rem; }
.account-content .account-card { width: 100%; min-width: 42rem; }
.subsection-title { margin: 1.5rem 0 .75rem; color: var(--navy); font-size: 1.05rem; }
.rating-list { display: grid; gap: 0; }
.rating-card { padding: .9rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.rating-card:first-child { padding-top: 0; }
.rating-card:last-child { padding-bottom: 0; border-bottom: 0; }
.rating-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.rating-card-heading h2 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.rating-kind { margin: 0 0 .3rem; color: var(--muted); font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.rating-status { flex: 0 0 auto; padding: .3rem .55rem; border-radius: 999px; background: #f0f2f8; color: var(--navy); font-size: .78rem; font-weight: 750; }
.rating-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .85rem; margin: 1rem 0 0; }
.rating-details dt { margin-bottom: .25rem; color: var(--muted); font-size: .74rem; font-weight: 750; }
.rating-details dd { margin: 0; color: var(--ink); font-size: .9rem; overflow-wrap: anywhere; }
.settings-tab-panel > .intro { margin-bottom: 1.15rem; }
.membership-terms-agreement { display: flex; align-items: flex-start; gap: .55rem; margin: .8rem 0; text-align: left; font-size: .88rem; line-height: 1.4; }
.membership-terms-agreement input { margin-top: .2rem; flex: 0 0 auto; }
.terms-open-button { margin: .5rem 0; }
.membership-terms-dialog { width: min(42rem, calc(100vw - 2rem)); max-height: min(80vh, 50rem); padding: 0; border: 0; border-radius: 1rem; color: var(--ink); box-shadow: 0 1rem 3rem rgba(0,0,0,.25); }
.membership-terms-dialog::backdrop { background: rgba(20, 30, 58, .68); }
.membership-terms-dialog-content { display: flex; flex-direction: column; gap: 1rem; max-height: min(80vh, 50rem); padding: 1.5rem; }
.membership-terms-dialog-content h2 { margin: 0; }
.membership-terms-copy { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.membership-terms-editor { display: block; width: 100%; min-height: 18rem; resize: vertical; font: inherit; line-height: 1.5; }
.profile-phone-form, .profile-address-form, .profile-emergency-form { margin: 0; }
.profile-edit-field { min-width: 0; }
.profile-edit-field dt { color: var(--muted); font-size: .88rem; }
.profile-edit-field dd { min-width: 0; }
.profile-edit-control { display: flex; align-items: stretch; gap: .55rem; }
.profile-edit-control .input { width: 100%; flex: 1 1 auto; min-width: 0; min-height: 2.75rem; padding: .55rem .65rem; color: var(--navy); font: inherit; font-size: .94rem; font-weight: 650; transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease; }
.profile-edit-control .input.is-saved { background: #eaf6ee; border-color: #78b98d; box-shadow: 0 0 0 2px rgba(73, 155, 99, .12); }
.profile-edit-control .profile-field-save { display: inline-flex; flex: 0 0 auto; width: auto; min-width: 5.5rem; align-self: center; margin: 0; padding: .55rem .9rem; transition: opacity .35s ease, transform .35s ease, background-color .2s ease; }
.profile-edit-control .profile-field-save[hidden] { display: none !important; }
.profile-edit-control .profile-field-save.is-saved, .profile-edit-control .profile-field-save.is-saved:hover { background: #2d8750; }
.profile-edit-control .profile-field-save.is-fading { opacity: 0; transform: translateY(-3px); }
.profile-field-status { min-height: 1.25rem; margin: .25rem 0 0; color: #84372c; font-size: .82rem; }
.profile-field-status:empty { display: none; }
.settings-age-control { display: flex; max-width: 32rem; align-items: center; gap: .85rem; }
.settings-age-control .input { max-width: 8rem; }
.settings-age-control span { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.settings-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .65rem; }
.advert-form { margin: 0; padding: 1.1rem; border: 1px solid var(--line); border-radius: .75rem; background: #f8f9fb; }
.advert-form h2, .advert-list-heading { margin: 0 0 .8rem; color: var(--navy); font-size: 1.15rem; }
.advert-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: .85rem; }
.advert-form-grid label { display: grid; align-content: start; gap: .4rem; min-width: 0; color: var(--muted); font-size: .82rem; font-weight: 700; }
.advert-form-grid .input { width: 100%; min-width: 0; }
.advert-list-heading { margin-top: 1.5rem; }
.advert-list { display: grid; gap: .8rem; }
.advert-admin-item { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
.advert-admin-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.advert-admin-summary > div { min-width: 0; }
.advert-admin-summary h3 { margin: 0 0 .35rem; color: var(--navy); font-size: 1rem; }
.advert-admin-summary a { display: block; overflow-wrap: anywhere; color: var(--muted); font-size: .84rem; }
.advert-admin-summary dl { display: flex; flex: 0 0 auto; gap: 1rem; margin: 0; }
.advert-admin-summary dl div { display: grid; gap: .2rem; }
.advert-admin-summary dt { color: var(--muted); font-size: .72rem; font-weight: 700; }
.advert-admin-summary dd { margin: 0; color: var(--navy); font-weight: 750; }
.advert-edit-form { flex: 1 1 auto; min-width: 0; margin: 0; }
.advert-actions { display: flex; align-items: center; gap: .65rem; }
.advert-actions form { margin: 0; }
.advert-actions > form:last-child { flex: 0 0 auto; }
.advert-delete-button { background: #fff0f2; color: #a62036; }
.advert-delete-button:hover { background: #ffe2e7; }
.settings-fields-table { width: 100%; min-width: 42rem; border-collapse: collapse; text-align: left; }
.settings-fields-table th, .settings-fields-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.settings-fields-table th { background: #f5f6f9; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.settings-fields-table tr:last-child td { border-bottom: 0; }
.settings-fields-table code { color: var(--navy); font-size: .82rem; overflow-wrap: anywhere; }
.settings-label-input { min-width: 11rem; min-height: 2.45rem; padding: .45rem .6rem; font-size: .86rem; }
.settings-key-input { min-width: 10rem; min-height: 2.45rem; padding: .45rem .6rem; font-size: .86rem; }
.settings-checkbox { display: inline-flex; align-items: center; gap: .4rem; margin: 0; color: var(--ink); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.settings-checkbox input { width: 1rem; height: 1rem; accent-color: var(--secondary); }
.add-import-field { width: auto; margin-top: .85rem; }
.settings-save { max-width: 16rem; }
.pricing-table { min-width: 46rem; }
.pricing-value { display: inline-flex; min-width: 9rem; align-items: center; gap: .45rem; color: var(--navy); font-weight: 700; }
.pricing-currency { font-size: .9rem; }
.pricing-price-input { width: 8rem; min-height: 2.45rem; padding: .45rem .6rem; font-size: .9rem; }
.membership-purchase-notice { margin: 1rem 0; padding: .85rem 1rem; border-radius: .6rem; }
.membership-purchase-notice.is-success { background: #eaf6ee; color: #256844; }
.membership-purchase-notice.is-error { background: #fff0ee; color: #84372c; }
.forms-library-card > .intro { margin-bottom: 1.25rem; }
.forms-search-label { display: block; margin: 1.25rem 0 .4rem; color: var(--navy); font-size: .86rem; font-weight: 750; }
.forms-search { width: 100%; max-width: 34rem; margin-bottom: 1.1rem; }
.forms-document-list { display: grid; gap: .65rem; }
.forms-document-row { display: grid; grid-template-columns: 2.55rem minmax(0, 1fr) auto; grid-template-areas: "icon details action"; align-items: center; gap: .9rem; min-width: 0; padding: .85rem .95rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; }
.forms-pdf-icon { display: grid; flex: 0 0 2.55rem; width: 2.55rem; height: 2.9rem; place-items: center; border-radius: .45rem; background: #fff0f1; color: var(--secondary); }
.forms-document-row > .forms-pdf-icon { grid-area: icon; }
.forms-pdf-icon svg { width: 1.65rem; height: 1.8rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.forms-document-main { grid-area: details; flex: 1 1 auto; min-width: 0; }
.forms-document-main h2 { margin: 0 0 .2rem; color: var(--navy); font-size: .96rem; line-height: 1.4; overflow-wrap: anywhere; }
.forms-document-main p { margin: 0; color: var(--muted); font-size: .79rem; }
.forms-document-row > .forms-download-button { grid-area: action; width: auto; min-height: 2.5rem; margin: 0; padding: .62rem .85rem; font-size: .82rem; text-decoration: none; white-space: nowrap; }
.forms-search-empty { margin-top: .85rem; }
.membership-offer-list { display: grid; gap: .8rem; }
.membership-offer { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
.membership-offer-main { min-width: 0; }
.membership-offer h3 { margin: 0 0 .4rem; color: var(--navy); font-size: 1rem; }
.membership-offer p { margin: .3rem 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.membership-offer .membership-offer-expiry { color: var(--navy); font-weight: 650; }
.membership-offer .membership-offer-unavailable { color: #84372c; }
.membership-offer-action { display: grid; flex: 0 0 auto; justify-items: end; gap: .65rem; }
.membership-offer-action > strong { color: var(--navy); font-size: 1.05rem; white-space: nowrap; }
.membership-offer-action .button:disabled { cursor: not-allowed; opacity: .56; }
.credit-balance-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .35rem 1rem; margin: 1rem 0; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--paper); }
.credit-balance-card > span { color: var(--muted); font-size: .9rem; font-weight: 700; }
.credit-balance-card > strong { grid-column: 2; grid-row: 1 / span 2; color: var(--navy); font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1; }
.credit-balance-card > small { grid-column: 1; color: var(--muted); line-height: 1.45; }
.credit-purchase-action { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.credit-purchase-action .button:disabled { cursor: not-allowed; opacity: .56; }
.membership-purchase-panel > .intro { margin-bottom: 1rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: .01em;
}
.brand-logo {
  display: block;
  width: min(19rem, 76vw);
  height: auto;
}
.mark {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: .77rem;
  letter-spacing: .04em;
}
.card {
  width: min(100%, 29rem);
  margin: auto 0;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 1px solid rgba(228, 232, 238, .9);
  border-radius: 1.15rem;
  background: #fff;
  box-shadow: 0 1.2rem 3.5rem rgba(23, 32, 51, .09);
}
.eyebrow {
  margin: 0 0 .75rem;
  color: var(--gold);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .15em;
}
h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 6vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.intro {
  margin: .9rem 0 1.7rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}
label {
  display: block;
  margin: 1.05rem 0 .45rem;
  color: #29354a;
  font-size: .9rem;
  font-weight: 700;
}
.input {
  width: 100%;
  min-height: 3rem;
  padding: .72rem .85rem;
  border: 1px solid #cbd2dc;
  border-radius: .55rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.input:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(221, 49, 76, .2);
}
.button {
  display: inline-flex;
  width: 100%;
  min-height: 3.05rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.35rem;
  padding: .75rem 1rem;
  border: 0;
  border-radius: .55rem;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}
.button:hover { background: #414766; }
.button:focus-visible { outline: 3px solid rgba(221, 49, 76, .55); outline-offset: 2px; }
.button-secondary { background: #eef1f5; color: var(--navy); }
.button-secondary:hover { background: #e1e6ed; }
.button-link { width: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.upload-form { max-width: 56rem; }
.upload-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.upload-title-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.upload-title-row h1 { min-width: 0; }
.download-template-button { width: auto; flex: 0 0 auto; margin: 0; font-size: .88rem; }
.upload-field-label { display: block; margin: 1.25rem 0 .45rem; color: var(--navy); font-size: .9rem; font-weight: 700; }
.upload-select {
  width: 100%;
  min-height: 2.9rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.csv-drop-area {
  display: flex;
  min-height: 16rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin-top: 1.4rem;
  padding: 2rem;
  border: 2px dashed #b8bfd0;
  border-radius: 1rem;
  background: linear-gradient(145deg, #f8f9fc, #f0f2f8);
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.csv-drop-area:hover, .csv-drop-area.is-dragging {
  border-color: var(--secondary);
  background: #fff5f6;
}
.csv-drop-area.is-dragging { transform: scale(1.01); }
.csv-drop-area svg { width: 3rem; height: 3rem; margin-bottom: .35rem; fill: none; stroke: var(--secondary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.csv-drop-area strong { color: var(--navy); font-size: 1.08rem; }
.csv-drop-area span { font-size: .88rem; }
.csv-drop-area .csv-file-name { max-width: 100%; margin-top: .45rem; color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }
.visually-hidden:focus + .csv-drop-area { outline: 3px solid rgba(221, 49, 76, .55); outline-offset: 3px; }
.upload-submit { max-width: 15rem; }
.upload-help { margin: .9rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.upload-notice { margin: 1rem 0; padding: .85rem 1rem; border-radius: .6rem; font-size: .9rem; line-height: 1.45; }
.upload-notice-success { background: #edf8f1; color: #256844; }
.upload-notice-error { background: #fff1ef; color: #84372c; }
.upload-history { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.upload-history h2 { margin: 0 0 1rem; color: var(--navy); font-size: 1.15rem; }
.upload-history-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: .65rem; }
.upload-history-table { width: 100%; border-collapse: collapse; font-size: .84rem; text-align: left; }
.upload-history-table th, .upload-history-table td { padding: .8rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.upload-history-table th { background: #f5f6f9; color: var(--muted); font-size: .76rem; font-weight: 750; white-space: nowrap; }
.upload-history-table tr:last-child td { border-bottom: 0; }
.upload-history-empty { margin: 0; padding: 1rem; border-radius: .6rem; background: #f7f8fa; color: var(--muted); font-size: .9rem; }
.review-shell { width: min(100% - 2.5rem, 82rem); }
.review-card { width: 100%; max-width: none; margin: 0; }
.review-complete-row { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.25rem; margin: 1rem 0 1.4rem; padding: 1rem 1.15rem; border: 1px solid #dfe4ec; border-radius: .85rem; background: #f1f3f7; transition: background .2s ease, border-color .2s ease; }
.review-complete-row.is-ready { border-color: #a6d7b7; background: #eaf7ed; }
.review-complete-button { display: inline-flex; width: min(100%, 22rem); min-height: 4.25rem; align-items: center; justify-content: center; gap: .7rem; margin: 0; border-radius: .7rem; font-size: 1.18rem; }
.review-complete-button:not(:disabled) { background: #26764b; box-shadow: 0 .35rem .8rem rgba(38, 118, 75, .18); }
.review-complete-button:not(:disabled):hover { background: #1e633e; }
.review-complete-button:disabled { background: #aeb4c0; color: #fff; cursor: not-allowed; box-shadow: none; }
.review-complete-icon { width: 1.55rem; height: 1.55rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.review-complete-note { flex: 1 1 18rem; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.review-summary { margin: 1.25rem 0; padding: .9rem 1rem; border-radius: .65rem; background: #f0f2f8; color: var(--navy); font-weight: 750; }
.review-list { display: grid; gap: .85rem; }
.review-row { overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; background: #fff; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.review-row[data-state="checking"] { border-color: #92a4d0; background: #f6f8fd; box-shadow: 0 0 0 3px rgba(82, 88, 124, .08); }
.review-row[data-state="ready"] { border-color: #a6d7b7; background: #f7fcf8; }
.review-row[data-state="ready-new"], .review-row[data-state="ready-existing"] { border-color: #a6d7b7; background: #f7fcf8; }
.review-row[data-state^="ready"] .review-row-heading { min-height: 2.5rem; padding: .35rem .75rem; }
.review-row[data-state^="ready"] .review-fields,
.review-row[data-state^="ready"] .review-row-actions,
.review-row[data-state^="ready"] .review-issue { display: none; }
.review-row[data-state="merge-pending"] { border-color: #e6c57f; background: #fffdf7; }
.review-row[data-state="duplicate"], .review-row[data-state="duplicate-file"], .review-row[data-state="invalid"], .review-row[data-state="hard-fail"] { border-color: #e7aaa2; background: #fff9f8; }
.review-row[data-state="unavailable"], .review-row[data-state="pending"] { border-color: #e6c57f; background: #fffdf7; }
.review-row[data-state="ready"] .review-email-field { background: #eaf7ed; }
.review-row[data-state="duplicate"] .review-email-field, .review-row[data-state="duplicate-file"] .review-email-field, .review-row[data-state="invalid"] .review-email-field, .review-row[data-state="hard-fail"] .review-email-field { background: #fff0ee; }
.review-row[data-state="ready"] .review-value-input { border-color: #72b887; }
.review-row[data-state="duplicate"] .review-value-input, .review-row[data-state="duplicate-file"] .review-value-input, .review-row[data-state="invalid"] .review-value-input, .review-row[data-state="hard-fail"] .review-value-input { border-color: #d98479; }
.review-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; }
.review-row-person { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; min-width: 0; }
.review-row-heading h2 { margin: 0; color: var(--navy); font-size: 1rem; }
.review-status { flex: 0 0 auto; color: var(--muted); font-size: .82rem; font-weight: 750; }
.review-row.is-imported .review-row-heading { min-height: 2.7rem; padding: .45rem .8rem; }
.review-row.is-imported .review-status { padding: .28rem .6rem; border-radius: 999px; background: #e6f5eb; color: #256844; }
.review-row.is-imported .review-issue { display: block; margin: 0; padding: .45rem .8rem; color: #38674a; background: #f3faf5; font-size: .82rem; }
.review-row[data-state="ready"] .review-status { color: #256844; }
.review-row[data-state="ready-new"] .review-status, .review-row[data-state="ready-existing"] .review-status { color: #256844; }
.review-row[data-state="merge-pending"] .review-status { color: #8a6214; }
.review-row[data-state="duplicate"] .review-status, .review-row[data-state="duplicate-file"] .review-status, .review-row[data-state="invalid"] .review-status { color: #a13d32; }
.review-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .65rem; padding: 0 1rem 1rem; }
.review-field { min-width: 0; padding: .65rem .75rem; border-radius: .55rem; background: #f7f8fa; }
.review-field-label { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .74rem; font-weight: 750; }
.review-field-value { display: block; color: var(--ink); font-size: .9rem; overflow-wrap: anywhere; }
.review-value-input { width: 100%; min-width: 0; padding: .5rem .6rem; font-size: .86rem; }
.review-row-actions { display: flex; justify-content: flex-end; padding: 0 1rem 1rem; }
.review-difference { display: grid; gap: .35rem; margin: .55rem 0 0; padding: .55rem 0 0; border: 0; border-top: 1px solid #dfe4ec; border-radius: 0; background: transparent; }
.review-difference legend { padding: 0; color: var(--navy); font-size: .76rem; font-weight: 750; }
.review-difference label { display: flex; gap: .45rem; align-items: baseline; color: var(--ink); font-size: .82rem; overflow-wrap: anywhere; }
.review-difference label span { color: var(--muted); }
.review-merge-save { min-height: 2.4rem; margin-top: .5rem; padding: .45rem .75rem; border: 0; border-radius: .5rem; background: var(--navy); color: #fff; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 750; }
.review-fields[data-merge-choices] > .review-merge-save { grid-column: 1 / -1; justify-self: start; }
.review-merge-save:disabled { opacity: .6; cursor: wait; }
.review-check-button { flex: 0 0 auto; min-height: 2.45rem; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: .5rem; background: #fff; color: var(--navy); cursor: pointer; font: inherit; font-size: .8rem; font-weight: 750; }
.review-check-button:hover { background: #eef1f5; }
.review-check-button:disabled { cursor: wait; opacity: .55; }
.review-issue { margin: 0 1rem .75rem; padding: .7rem .8rem; border-radius: .5rem; background: #fff0ee; color: #84372c; font-size: .86rem; line-height: 1.45; }
.review-submit-area { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.review-submit-area .button { max-width: 18rem; }
.review-submit-area .button:disabled { background: #9ba2b3; cursor: not-allowed; }
.review-submit-area p { margin: .7rem 0 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.review-history-link { color: var(--navy); font-weight: 750; text-decoration: underline; text-underline-offset: .15em; }
.review-history-link:hover { color: var(--secondary); }
.first-time-prompt {
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: .92rem;
  text-align: center;
}
.first-time-prompt a {
  color: var(--secondary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .15em;
}
.notice {
  margin: 1.2rem 0;
  padding: .85rem 1rem;
  border: 1px solid #f0c4bd;
  border-radius: .55rem;
  background: #fff6f4;
  color: #84372c;
  font-size: .92rem;
  line-height: 1.45;
}
.fine-print {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}
.member-details {
  display: grid;
  gap: 0;
  margin: 1.5rem 0 .5rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: #fff;
}
.member-details > div {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) 1.4fr;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
}
.member-details > div:last-child { border-bottom: 0; }
.member-details dt { color: var(--muted); font-size: .88rem; }
.member-details dd { margin: 0; color: var(--navy); font-size: .94rem; font-weight: 650; overflow-wrap: anywhere; }
.status-active { color: #256844; }
.membership-admin-shell { width: min(100% - 2rem, 90rem); }
.membership-admin-shell .account-layout { width: 100%; min-width: 0; grid-template-columns: 15rem minmax(0, 1fr); }
.membership-admin-content { width: 100%; min-width: 0; }
.membership-admin-header, .membership-admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.membership-admin-header { margin: 0 0 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.membership-admin-header > div { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.membership-admin-header h1 { margin: 0; }
.membership-admin-header a { color: var(--navy); font-weight: 700; }
.membership-admin-card { width: 100%; min-width: 0; margin: 1rem 0; }
.membership-admin-content > .membership-admin-card:first-of-type { margin-top: 0; }
.membership-admin-card h2 { margin-top: 0; }
.membership-admin-card > p, .membership-admin-section-heading p { color: var(--muted); }
.membership-admin-section-heading { margin-bottom: 1rem; }
.membership-admin-section-heading h2, .membership-admin-section-heading p { margin: 0 0 .4rem; }
.membership-admin-section-heading > .button { width: auto; flex: 0 0 auto; margin: 0; white-space: nowrap; }
.membership-admin-table { min-width: 58rem; }
.membership-admin-table td, .membership-admin-table th { padding: .7rem .65rem; }
.membership-admin-nav { display: block; text-decoration: none; }
.membership-type-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.membership-type-form > label { display: grid; align-content: start; gap: .4rem; color: var(--navy); font-size: .88rem; font-weight: 700; }
.membership-type-form small { color: var(--muted); font-size: .76rem; font-weight: 400; }
.membership-type-form .input, .membership-admin-search .input { width: 100%; }
.membership-admin-check { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.membership-admin-wide { grid-column: 1 / -1; }
.membership-admin-search { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin: 1rem 0; }
.membership-admin-search label { flex-basis: 100%; color: var(--navy); font-size: .88rem; font-weight: 700; }
.membership-admin-search .input { flex: 1 1 18rem; }
.membership-admin-notice { margin: 1rem 0; padding: .8rem 1rem; border-radius: .55rem; }
.membership-admin-notice.is-success { background: #eaf6ee; color: #256844; }
.membership-admin-notice.is-error { background: #fff0ee; color: #84372c; }
.rating-request-form, .rating-decision-form { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; min-width: 15rem; }
.rating-request-form .input, .rating-decision-form .input { min-width: 8rem; max-width: 15rem; }
.rating-request-form .button, .rating-decision-form .button { white-space: nowrap; }
.rating-request-form { min-width: 18rem; }
.rating-request-form select { flex: 1 1 11rem; }
.rating-decision-form input[name="denial_reason"] { flex: 1 1 12rem; }
.rating-decision-form input[name="amendment_note"] { flex: 1 1 14rem; }
.rating-batch-choice { display: block; margin: .55rem 0; color: var(--navy); }
.rating-batch-choice input { margin-right: .45rem; accent-color: var(--accent, #dd314c); }
@media (max-width: 48rem) {
  .impersonation-banner { align-items: stretch; flex-direction: column; }
  .impersonation-banner .button { width: 100%; }
  .membership-offer { align-items: flex-start; flex-direction: column; }
  .member-details > .profile-edit-field { grid-template-columns: minmax(5.5rem, .85fr) minmax(0, 1.15fr); gap: .5rem; }
  .profile-edit-control { align-items: center; gap: .35rem; }
  .profile-edit-control .input { padding-right: .4rem; padding-left: .4rem; font-size: .86rem; }
  .profile-edit-control .profile-field-save { min-width: 3.75rem; padding-right: .5rem; padding-left: .5rem; font-size: .82rem; }
  .membership-offer-action { width: 100%; align-items: center; justify-items: stretch; }
  .membership-offer-action .button { width: 100%; }
  .membership-admin-header, .membership-admin-section-heading { align-items: flex-start; flex-direction: column; }
  .membership-type-form { grid-template-columns: 1fr; }
  .membership-admin-wide { grid-column: auto; }
}
footer {
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
}
body.branded-page footer { color: rgba(255, 255, 255, .78); }
@media (max-width: 32rem) {
  .portal-shell { width: min(100% - 1.25rem, 29rem); padding-top: 1.25rem; }
  .card { padding: 1.4rem 1.15rem; }
}
@media (max-width: 48rem) {
  .account-shell { width: 100%; padding-right: 0; padding-left: 0; }
  .membership-admin-shell { width: 100%; padding-right: 0; padding-left: 0; }
  .account-shell > .account-brand-row { width: 100%; justify-content: space-between; gap: .75rem; padding-right: .625rem; padding-left: .625rem; }
  .account-brand-row > .wordmark { flex: 1 1 auto; min-width: 0; }
  .account-brand-row .brand-logo { width: min(19rem, 100%); }
  .account-brand-ad { display: none; }
  .account-layout { grid-template-columns: 1fr; gap: .9rem; padding-right: .625rem; padding-left: .625rem; }
  .membership-admin-shell .account-layout { width: 100%; grid-template-columns: minmax(0, 1fr); gap: .9rem; padding-right: .625rem; padding-left: .625rem; }
  .account-content { width: calc(100% + 1.25rem); margin-right: -.625rem; margin-left: -.625rem; }
  .account-content .account-card { width: 100%; border-right: 0; border-left: 0; border-radius: 0; }
  .membership-admin-shell .membership-admin-content { width: calc(100% + 1.25rem); margin-right: -.625rem; margin-left: -.625rem; }
  .membership-admin-shell .membership-admin-card { width: 100%; border-right: 0; border-left: 0; border-radius: 0; }
  .mobile-menu-toggle { display: inline-flex; width: 3rem; min-width: 3rem; height: 3rem; min-height: 3rem; flex: 0 0 3rem; align-items: center; justify-content: center; margin: 0; padding: .65rem; border: 1px solid rgba(255,255,255,.38); border-radius: .65rem; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
  .mobile-menu-toggle svg { display: block; width: 1.55rem; height: 1.55rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .portal-nav { position: fixed; z-index: 1001; top: 0; right: 0; bottom: 0; left: 0; display: flex; width: 100vw; max-width: 100vw; max-height: 100vh; max-height: 100dvh; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: .2rem; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: max(1rem, env(safe-area-inset-top)) .85rem max(1rem, env(safe-area-inset-bottom)); border-radius: 0; background: #fff; box-shadow: none; transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
  .portal-nav.is-open { transform: translateX(0); visibility: visible; transition-delay: 0s; }
  .nav-backdrop:not([hidden]) { position: fixed; z-index: 1000; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgba(12,18,37,.58); opacity: 1; }
  .nav-header { display: flex; min-height: 3rem; align-items: center; justify-content: space-between; gap: .75rem; padding: 0 .25rem .65rem; border-bottom: 1px solid var(--line); }
  .nav-heading { display: block; margin: .4rem .5rem; }
  .nav-close { display: grid; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center; border: 0; border-radius: .6rem; background: transparent; color: var(--navy); cursor: pointer; }
  .nav-close:hover { background: rgba(82,88,124,.1); }
  .nav-close svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .nav-item { width: 100%; min-height: 3rem; flex: 0 0 auto; padding: .8rem .75rem; text-align: left; }
  .nav-dropdown-toggle::after { margin-top: .55rem; }
  .nav-submenu { margin: 0 0 .35rem .75rem; }
  .nav-subitem { min-height: 2.8rem; padding: .7rem .75rem; }
  .nav-utility { width: 100%; justify-content: flex-start; gap: .65rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
  .nav-utility form { display: inline-flex; }
  .nav-icon { width: 3rem; height: 3rem; flex: 0 0 3rem; }
  body.nav-drawer-open { overflow: hidden; }
  .account-tabs { gap: .25rem; }
  .account-tab { flex: 1; padding: .75rem .5rem; font-size: .86rem; }
  .upload-title-row { align-items: center; flex-direction: row; gap: .55rem; }
  .upload-title-row h1 { flex: 0 1 auto; font-size: clamp(1.55rem, 7vw, 2.15rem); }
  .upload-title-actions { width: auto; flex: 0 0 auto; }
  .download-template-button { width: auto; min-height: 2.7rem; padding: .6rem .7rem; font-size: .78rem; white-space: nowrap; }
  .csv-drop-area { min-height: 12rem; margin-top: 1rem; padding: 1.1rem .8rem; border-radius: .75rem; }
  .csv-drop-area strong { font-size: 1rem; }
  .csv-drop-area span { max-width: 100%; font-size: .82rem; line-height: 1.45; }
  .upload-submit { width: 100%; max-width: none; margin-top: .75rem; }
  .upload-help { margin-top: .7rem; }
  .forms-document-row { grid-template-columns: 2.55rem minmax(0, 1fr); grid-template-areas: "icon details" ". action"; align-items: start; }
  .forms-document-row > .forms-download-button { width: 100%; text-align: center; }
  .advert-form-grid { grid-template-columns: 1fr; }
  .advert-admin-summary { flex-direction: column; }
  .advert-admin-summary dl { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-nav { transition-duration: .01ms; }
  .nav-dropdown-toggle::after { transition-duration: .01ms; }
}
@media (max-width: 64rem) {
  .account-brand-ad { display: none; }
  .advert-actions { align-items: stretch; flex-direction: column; }
  .advert-actions > form:last-child { flex: 0 0 auto; }
  .advert-actions > form:last-child .button { width: 100%; }
  .account-card { min-width: 0; }
  .account-content .account-card { min-width: 0; }
}
