:root {
  --ink: #14232b;
  --muted: #5c6b73;
  --border: #dde5e8;
  --bg: #ffffff;
  --card: #ffffff;
  --primary: #0f7a63;
  --primary-dark: #0a5c4a;
  --accent-bg: #eaf5f1;
  --received: #b7791f;
  --received-bg: #fbf3e4;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.85em; }
.error { background: #fdecea; color: #9c2a1f; padding: 10px 14px; border-radius: 8px; border: 1px solid #f5c6c0; }
.notice { background: var(--accent-bg); color: var(--primary-dark); padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 16px; }
.referral-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.referral-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.referral-list li:last-child { border-bottom: none; padding-bottom: 0; }

/* Made vs. received get their own tinted panel with a colored top edge and icon,
   so the two directions of referral activity read as visually distinct at a glance. */
.referral-columns { gap: 20px; }
.referral-panel { border-radius: 12px; padding: 16px 18px; border: 1px solid var(--border); border-top: 3px solid var(--border); background: var(--card); }
.referral-panel h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1rem; }
.referral-panel-icon { font-size: 1.05rem; line-height: 1; }
.referral-count { margin-left: auto; font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent-bg); color: var(--primary-dark); }
.referral-panel-made { border-top-color: var(--primary); background: linear-gradient(180deg, var(--accent-bg) 0%, var(--card) 90px); }
.referral-panel-made .referral-panel-icon { color: var(--primary); }
.referral-panel-received { border-top-color: var(--received); background: linear-gradient(180deg, var(--received-bg) 0%, var(--card) 90px); }
.referral-panel-received .referral-panel-icon { color: var(--received); }
.referral-panel-received .referral-count { background: var(--received-bg); color: var(--received); }
@media (max-width: 640px) {
  .referral-columns { grid-template-columns: 1fr; }
}

.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.brand span { color: var(--primary); }
.brand-logo { height: 42px; width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav a { color: var(--ink); font-weight: 500; }
.main-nav .btn-outline { padding: 8px 16px; }

/* Hamburger toggle — hidden on desktop, shown next to the logo on narrow
   screens where the full nav row no longer fits without crowding. */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 2px; }

/* Mobile-only dropdown panel — separate markup from .main-nav so logged-out
   visitors get grouped "Sign up" / "Members" sections instead of the flat
   Log in / Sign up pair shown on desktop. Hidden outside the mobile
   breakpoint regardless of .open, so it never leaks into desktop layout. */
.mobile-nav { display: none; }

@media (max-width: 640px) {
  .header-inner { position: relative; }
  .mobile-nav-toggle { display: flex; }
  .main-nav { display: none; }
  .mobile-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    right: 0;
    width: 50%;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    padding: 14px 20px 18px;
    box-shadow: 0 6px 12px rgba(20, 35, 43, 0.08);
  }
  .mobile-nav-section { display: flex; flex-direction: column; gap: 2px; }
  /* Section headers ("Sign up", "Members") stand out as black; the actual
     links underneath are dark gray, so the headers read as labels rather
     than blending in with the items they're grouping. */
  .mobile-nav-section-title { margin: 0 0 4px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); }
  .mobile-nav a, .mobile-nav .link-btn { display: block; padding: 6px 0; color: var(--muted); font-weight: 500; }
  .mobile-nav-cta { text-align: center; }
}

.main-content { padding: 40px 20px 80px; min-height: 60vh; }

.btn-primary, .btn-outline, .link-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 0.95rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(20, 35, 43, 0.08); }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(15, 122, 99, 0.22); }
/* Delete-account confirm button — red instead of the usual green, and grayed
   out/inert until the confirm-text input matches, so it can't be clicked by
   accident. */
.btn-primary.danger-btn { background: #9c2a1f; }
.btn-primary.danger-btn:hover { background: #7a1f17; box-shadow: 0 6px 14px rgba(156, 42, 31, 0.22); }
.btn-primary:disabled, .btn-primary.danger-btn:disabled {
  background: #d8c3c1;
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary-dark); }
.btn-outline:hover { background: var(--accent-bg); text-decoration: none; transform: translateY(-1px); }
.btn-outline.small { padding: 4px 12px; font-size: 0.8rem; }
.full-width { width: 100%; text-align: center; }
.link-btn { background: none; border: none; padding: 0; color: var(--primary-dark); font-weight: 600; text-decoration: underline; }
.link-btn.small { font-size: 0.8rem; }
.inline-form { display: inline; }

/* Slightly more generous vertical rhythm and a sharper type scale than the
   original hero, while keeping the same white background and layout shape.
   The negative margin-top pulls the hero up into .main-content's 40px top
   padding (scoped to this page only), so the total gap above the eyebrow
   text is roughly half of what it was. */
.hero { text-align: center; padding: 32px 0 32px; margin-top: -20px; }
.eyebrow { margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; font-size: 0.85rem; color: var(--muted); }
.eyebrow span { color: var(--primary); }
.hero h1 { font-size: 2.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero p { max-width: 600px; margin: 0 auto 28px; color: var(--muted); font-size: 1.1rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* Attention-getting callout on the home page, below the embedded search
   content, pointing acupuncturists toward creating a listing. */
.attention-banner {
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 20px;
}
.attention-icon { display: inline-flex; align-items: center; font-size: 1.1em; line-height: 1; margin-right: 4px; }
/* Heading and body copy flow as one continuous line of text (wrapping
   normally, word by word) instead of the paragraph starting on its own
   line below the heading. */
.attention-content h2 { display: inline; margin: 0; font-size: 1.15rem; color: var(--primary-dark); }
.attention-content p { display: inline; margin: 0; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 1px 2px rgba(20, 35, 43, 0.03);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.feature-card:hover { box-shadow: 0 10px 24px rgba(20, 35, 43, 0.07); transform: translateY(-2px); border-color: var(--primary); }
.feature-card h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.6; }

@media (max-width: 720px) {
  /* .main-content padding-top (40px) + this margin-top (-42px) + this padding-top
     (24px) = a 22px gap above the eyebrow line — half of the 44px gap the
     desktop-shared -20px margin-top produces, scoped to mobile only. */
  .hero { padding: 24px 0 24px; margin-top: -42px; }
  .hero h1 { font-size: 2.1rem; }
  .eyebrow { font-size: 0.6rem; letter-spacing: 0.02em; white-space: nowrap; }
  .feature-grid { grid-template-columns: 1fr; }
}

.auth-card, .form-page, .dashboard, .search-page, .profile-page { max-width: 640px; margin: 0 auto; }

/* Letterhead-style layout for the Medical Referral Form, modeled on a standard
   clinical referral document rather than a plain web form. */
.medical-referral-form { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.referral-form-header { text-align: center; border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 20px; }
.referral-form-header h1 { margin: 4px 0 0; font-size: 1.5rem; }
.eyebrow-small { margin: 0; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.referral-form-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.referral-form-party h3 { margin: 0 0 10px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.referral-form-party p { margin: 0 0 4px; }
.referral-form-party-name { font-weight: 600; }
.referral-form-attestation { border-top: 1px solid var(--border); padding-top: 12px; }
/* "To:" and the (non-editable) letter date share one line instead of the date
   living further down as its own editable field. */
.referral-to-date-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .referral-form-parties { grid-template-columns: 1fr; gap: 20px; }
  .referral-to-date-row { flex-direction: column; gap: 4px; }
}
.search-page { max-width: 1040px; }
.profile-page { max-width: 100%; }
/* Pulls the page up to close roughly half of .main-content's 40px top padding,
   scoped to this page only so other pages' spacing is untouched. */
.form-page { max-width: 100%; margin-top: -20px; }
.form-page h1 { margin-top: 0; }

.edit-profile-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.edit-profile-header h1 { margin: 0; }
.edit-profile-heading { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.profile-privacy-note { margin: 0; }
/* "View public profile" button with the "Who can see your profile?" link
   stacked directly beneath it, right-aligned to match the button above. */
.edit-profile-header-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* Visibility picker modal (see profileEditPage in views.js) — a simple centered
   dialog, consistent with the card/border/radius language used elsewhere. */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 35, 43, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.modal-backdrop.hidden { display: none; }
.modal-box {
  background: var(--card);
  border-radius: 14px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(20, 35, 43, 0.25);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-header h2 { margin: 0; font-size: 1.15rem; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover { color: var(--ink); }
.modal-radio-list { display: flex; flex-direction: column; margin: 16px 0 20px; }
.modal-radio-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.modal-radio-option:last-child { border-bottom: none; }
.modal-radio-option > div { display: flex; flex-direction: column; gap: 2px; }
.modal-radio-title { font-weight: 600; }
.modal-radio-option input[type="radio"] { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--primary); }
.card-heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-heading-row h2, .card-heading-row h3 { margin: 0; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 20px; }
/* Cancel-membership section — same card shape as the rest of the edit-profile
   page, but a muted red border so it visually reads as the "dangerous"
   section without being as alarming as a full red-background block. */
.card.danger-zone { border-color: #f5c6c0; }
.card.danger-zone h2 { margin: 0 0 6px; font-size: 1.05rem; color: #9c2a1f; }
.card.danger-zone p { margin: 0 0 10px; }

.stacked-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.stacked-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 0.92rem; }
/* Field name and input sit side by side on one line instead of stacking. */
.stacked-form label.label-inline { flex-direction: row; align-items: center; gap: 10px; }
.stacked-form label.label-inline input { flex: 1; min-width: 0; }
.stacked-form input, .stacked-form textarea, .stacked-form select {
  font-weight: 400;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.2;
  /* Inputs/textareas/selects that sit on their own row (Bio, Affiliations,
     Clinic name, etc.) don't stretch to fill their container the way
     grid/flex-stretched fields do — their size/cols attribute gives them an
     intrinsic width the layout otherwise respects. width:100% fixes those and
     is harmless for fields inside a grid row or flex label-inline, since it
     just resolves to "fill this track/flex-basis" there. */
  width: 100%;
}
/* Locked fields (e.g. referring-party info pulled from the account) read as
   non-editable at a glance instead of looking like a normal empty-able input. */
.stacked-form input[readonly] { background: var(--accent-bg); color: var(--muted); cursor: default; }
/* Browsers give <select> its own native height/chrome by default, which doesn't
   match a plain text input even with identical padding. Strip that native styling
   so every field in a row lines up at the same height. */
.stacked-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--card);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235c6b73'><path d='M5.25 7.5l4.75 5 4.75-5H5.25z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 32px;
}
/* Modern soft-card fieldsets — shadow instead of a hard border, matching the
   rounded/shadowed cards used on the search and profile pages. */
.stacked-form fieldset {
  border: none;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(20, 35, 43, 0.05);
}
.stacked-form legend { font-weight: 700; font-size: 1.02rem; padding: 0; margin-bottom: 2px; }
.stacked-form legend .legend-note { font-weight: 400; margin-left: 8px; }
/* Publications onward: same soft-card look as a fieldset, but as a native
   <details>/<summary> so each section can expand/collapse. Kept as its own
   rule (rather than just adding the class to the .stacked-form fieldset
   selector) since <details> needs the [open] chevron-rotation hook below. */
.stacked-form details.collapsible-fieldset {
  border: none;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(20, 35, 43, 0.05);
}
.stacked-form details.collapsible-fieldset > summary {
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
  /* Without wrap, a summary's legend-note (and the "Clear" button on the
     Specialties/Techniques summaries) can run off the edge on a narrow phone
     instead of dropping to its own line. */
  flex-wrap: wrap;
}
.stacked-form details.collapsible-fieldset > summary::marker,
.stacked-form details.collapsible-fieldset > summary::-webkit-details-marker {
  display: none;
  content: '';
}
.stacked-form details.collapsible-fieldset > summary::before {
  content: '\25B8';
  display: inline-block;
  color: var(--muted);
  font-size: 0.85rem;
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}
.stacked-form details.collapsible-fieldset[open] > summary::before { transform: rotate(90deg); }
.stacked-form details.collapsible-fieldset > summary .legend-note { font-weight: 400; margin-left: 0; }
.stacked-form label.radio-option { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
/* Browser-default checkbox size (~13px) is a small target to hit with a
   finger — sized up close to the modal's radio buttons for an easier tap on
   touch screens, on every checkbox in the form (not just mobile — it's a
   welcome target size at any input method). */
.stacked-form label.radio-option input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--primary); }
/* A radio-option checkbox nested directly in a <legend> sits on the same line
   as the legend text instead of dropping to its own row below it. */
.stacked-form legend label.radio-option { display: inline-flex; margin-left: 10px; vertical-align: middle; }
/* Provider profiles have fewer fields per fieldset than acupuncturist profiles
   (no bio, specialties, techniques, etc.), so the default padding/gaps leave
   noticeably more empty space per field. Tighten just this variant — scoped to
   .form-page-compact so the acupuncturist edit form is untouched. */
.form-page-compact .stacked-form { gap: 10px; margin-top: 12px; }
.form-page-compact .stacked-form fieldset,
.form-page-compact .stacked-form details.collapsible-fieldset { padding: 14px 18px; gap: 9px; }
.form-page-compact .card { padding: 18px; margin-bottom: 14px; }
/* Full name gets more room than the two short selects beside it. */
.name-personal-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
/* Street address, city, state, and ZIP all on one row: 50% / 27.5% / 15% / 7.5%.
   Address+City are grouped together with a tight gap between just the two of them;
   State and ZIP (half the width of State) keep the normal spacing. */
.address-line-row { display: grid; grid-template-columns: 77.5fr 15fr 7.5fr; gap: 14px; align-items: start; }
.address-city-group { display: grid; grid-template-columns: 50fr 27.5fr; gap: 6px; }
/* License number, state, expiration, and (for acupuncturists) the "no license
   required" checkbox all sit on one line. Flexbox (not a fixed grid) so it can
   still wrap gracefully if a browser window is narrow, rather than forcing
   items into columns that don't fit. The checkbox label is allowed to grow
   into whatever room is left. */
.license-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.license-row .license-row-number { flex: 2 1 160px; }
.license-row .license-row-state { flex: 1 1 130px; }
.license-row .license-row-expire { flex: 1 1 140px; }
.license-row .license-row-no-license { flex: 3 1 260px; }
/* Years of experience sits beside Headline instead — pinned to a third of a
   normal field's width since it only needs 2-3 digits, with Headline taking
   the rest of the row. */
.headline-row { display: flex; align-items: center; gap: 14px; }
.headline-row .headline-row-headline { flex: 1 1 auto; }
.headline-row .headline-row-years { flex: 0 1 140px; min-width: 120px; }
/* Experience field: a plain-text input styled + boxed like the rest of the
   form's inputs, plus a small stacked up/down stepper standing in for a
   native number spinner. The box border/radius live on the wrapper so the
   input itself can sit borderless flush against the stepper's divider. */
.experience-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  overflow: hidden;
}
.experience-field input[type="text"] {
  flex: 1 1 0%;
  width: auto;
  min-width: 0;
  border: none;
  border-radius: 0;
}
.experience-field input[type="text"]:focus { outline: none; }
.experience-stepper { display: flex; flex-direction: column; border-left: 1px solid var(--border); flex: 0 0 auto; }
.experience-step {
  flex: 1;
  width: 24px;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.experience-step + .experience-step { border-top: 1px solid var(--border); }
.experience-step:hover { color: var(--primary-dark); background: var(--accent-bg); }

.hidden { display: none !important; }

/* Remove and Add sit right next to each other, tightly spaced. */
.row-actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; white-space: nowrap; }

/* Publications and credential rows are single flex lines — fields plus the
   Remove/Add actions all in a row — instead of fields stacked above the actions. */
#publications-list { display: flex; flex-direction: column; gap: 8px; }
.publication-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: flex; align-items: start; gap: 10px; flex-wrap: wrap; }
.publication-field { flex: 1 1 200px; min-width: 0; }
/* Holds either the typed-link input or (once a file's uploaded) the "attached"
   indicator in its place, plus the Upload file trigger — sized to line up with
   the description field beside it. */
.publication-link-group { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.publication-link-group .publication-url-input { flex: 1 1 160px; min-width: 0; }
.publication-uploaded-indicator { display: flex; align-items: center; gap: 10px; flex: 1 1 160px; }
.publication-upload-trigger { cursor: pointer; white-space: nowrap; }
.publication-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.publication-list li { padding-left: 18px; position: relative; }
.publication-list li::before { content: '\2197'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

#credentials-list { display: flex; flex-direction: column; gap: 10px; }
.credential-row { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.credential-field { flex: 1 1 140px; min-width: 0; }
.credential-field-state { flex-basis: 110px; }
.credential-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.credential-list li { border-left: 3px solid var(--border); padding-left: 12px; }
.credential-type { font-weight: 600; }
@media (max-width: 720px) {
  .publication-row, .credential-row, .education-row { flex-direction: column; align-items: stretch; }
  /* Same flex-basis-becomes-height trap as the license/headline rows above:
     .publication-field (200px) and .credential-field/.credential-field-state
     (140px/110px) are sized in pixels for their *width* on a row — once the
     row flips to a column those numbers size height instead, turning each
     field into a 110-200px-tall box. Resetting every direct child (not just
     the *-field classes) also catches .publication-link-group, which carries
     its own 200px basis. (.education-row's reset lives further down, after
     .education-field is declared — same specificity means source order
     decides the winner, and .education-field isn't defined yet at this point
     in the file.) */
  .publication-row > *, .credential-row > * { flex: 1 1 auto; min-width: 0; }
  .row-actions { justify-content: flex-start; }
}

#history-list { display: flex; flex-direction: column; gap: 10px; }
.history-row { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
#education-list { display: flex; flex-direction: column; gap: 10px; }
/* No flex-wrap here (unlike credential-row) — flex-wrap breaks items onto lines
   based on their *unshrunk* width, so with three text fields plus row-actions
   the actions button pair could still drop to their own line on a merely
   average-width screen even though every field is shrinkable. Forcing nowrap
   and letting the fields (flex-shrink: 1, min-width: 0) compress instead keeps
   Remove/+ Add genuinely on the same line as the fields at any desktop width;
   the mobile breakpoint below switches this row to a stacked column anyway. */
.education-row { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.education-field { flex: 1 1 120px; min-width: 60px; }
/* Blank-line-style gap between Practice history and Education history when a
   profile card shows both — the sibling combinator means a lone section (just
   one or the other) doesn't pick up extra top space it doesn't need. */
.profile-history-section + .profile-history-section { margin-top: 28px; }
.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.history-list li { border-left: 3px solid var(--border); padding-left: 14px; }
.history-title { font-weight: 700; margin: 0 0 2px; }
.history-meta { margin: 0 0 6px; }
.history-description { margin: 0; }
.history-description-row { display: flex; align-items: start; gap: 10px; flex-wrap: wrap; }
.history-description-field { flex: 1 1 200px; min-width: 0; }
@media (max-width: 720px) {
  .history-description-row { flex-direction: column; align-items: stretch; }
  /* Same flex-basis-becomes-height issue as the rows above: .history-
     description-field's 200px width basis would otherwise become a 200px
     height once this row becomes a column. */
  .history-description-row > * { flex: 1 1 auto; min-width: 0; }
  /* .education-row's own reset (see the media query after .credential-row
     above) has to live down here instead, after .education-field's 120px
     basis is declared — equal specificity means whichever rule comes later
     in the file wins the cascade, and .education-field wasn't defined yet
     up there. */
  .education-row { flex-direction: column; align-items: stretch; }
  .education-row > * { flex: 1 1 auto; min-width: 0; }
}

/* Three chip states: unselected (white/bordered), selected but not in the first
   3 picked (gray fill), and featured — one of the first 3 (green fill). */
.specialty-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; font-weight: 400; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  font-size: 0.82rem; line-height: 1.2; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.chip span:hover { border-color: var(--primary); }
.chip input:focus-visible + span { outline: 2px solid var(--primary-dark); outline-offset: 2px; }
.chip.selected-extra span { background: #e4e9ec; border-color: #c7d0d3; color: var(--ink); }
.chip.featured span { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Photo controls sit in a narrow left column beside the name/gender/pronouns and
   headline fields, instead of stacking above/below them — this is what keeps the
   Basics section short. */
.basics-top { display: flex; gap: 18px; align-items: flex-start; }
.photo-upload-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; width: 150px; text-align: center; }
.photo-upload-col .photo-upload-preview { margin: 0 auto; }
/* The native file input is visually hidden and its wrapping <label> is styled to
   look like the "Remove photo" link-button below it, so choosing and removing a
   photo read as a matching pair of actions instead of a browser-default button. */
.photo-upload-trigger { cursor: pointer; }
.file-input-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.basics-fields { flex: 1; display: flex; flex-direction: column; gap: 13px; min-width: 0; }
@media (max-width: 480px) {
  .basics-top { flex-direction: column; align-items: stretch; }
  /* wrap: the photo circle, its "2 MB max" caption, and the Choose/Remove
     links together are wider than a narrow phone in a single row — letting
     them wrap keeps every piece readable instead of squeezing or overflowing. */
  .photo-upload-col { width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; }
}

.dashboard-actions { display: flex; gap: 12px; margin-top: 16px; }

.profile-header-top { display: flex; gap: 18px; align-items: flex-start; }
.profile-header-info { flex: 1; }
/* Right-justified, inline with the photo row (not stacked below it). */
.profile-referral-cta { margin-left: auto; flex-shrink: 0; }
.profile-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.profile-photo.placeholder { display: flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--primary-dark); font-size: 2rem; font-weight: 700; }
.profile-header-info h1 { margin: 0; font-size: 1.4rem; line-height: 1.25; }
.profile-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Provider profile: Edit profile / Find an acupuncturist share the name row
   instead of stacking below the headline, and sit flush right when there's room. */
.profile-name-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.pronouns { font-size: 0.95rem; font-weight: 400; }
.telehealth-badge { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 0.85rem; color: var(--primary-dark); font-weight: 600; }
.profile-name-row + .headline { margin-top: 6px; }
.profile-header-section { margin-top: 14px; padding-top: 14px; }
.profile-header-section:first-child { margin-top: 0; padding-top: 0; }
.profile-header-section h2 { margin: 0 0 8px; font-size: 1.05rem; }
.profile-header-section p { margin: 0; }
/* Dense label/value table (matches .glance-meta) instead of stacked dt-over-dd
   blocks — the same credential facts take roughly half the vertical space. */
.profile-header-section dl { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 6px; align-items: baseline; }
.profile-header-section dt { margin: 0; white-space: nowrap; }
.profile-header-section dd { margin: 0; }
.headline { color: var(--primary-dark); font-weight: 600; margin: 0 0 4px; }

.verified-row { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.verified-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary); color: #fff; font-weight: 700; font-size: 0.8rem; padding: 4px 12px 4px 4px; border-radius: 999px; line-height: 1; }
.verified-badge.compact { padding: 4px; }
.verified-badge .check { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--primary); font-size: 0.72rem; font-weight: 900; line-height: 1; }
.license-number { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.license-line { color: var(--primary-dark); font-weight: 700; margin: 0 0 6px; }
.profile-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.verified-info-link { font-size: 0.85rem; }

.static-page { max-width: 640px; }
.static-page p { line-height: 1.6; }

/* Frameless profile layout, modeled on TherapyDen's practitioner pages:
   no boxed/shadowed cards, just plain content separated by hairline rules. */
.profile-page .card {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
}

/* Full-width identity strip: photo, name, and verified badge get the whole
   page width so they never have to fight a half-width column for room. */
.profile-identity.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px 20px 4px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(20, 35, 43, 0.05);
}

/* Row below: header details next to the "at a glance" card. */
.profile-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.profile-header.card {
  align-self: start;
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(20, 35, 43, 0.05);
}

/* Full-width rows below the header/glance grid, e.g. background and specialty teaser.
   Height follows content — no reserved space for a full 150-word bio. */
.profile-full-row.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(20, 35, 43, 0.05);
}

.bio-block h2 { margin: 0 0 8px; font-size: 1.05rem; }
.bio-block p { margin: 0; }
.bio-block .bio-toggle { margin-top: 8px; }

/* One line of space between the bio and the specialty teaser below it (only when both are present). */
.bio-block + .profile-specialize-row { margin-top: 1.25em; }

/* The flowing section (specialties/techniques/testimonials/history/publications) is
   still one continuous sheet internally — no gaps or rounding between its rows — but
   now reads as its own modern card (rounded + shadowed) instead of floating flush
   against the page background. */
.profile-main {
  margin-top: 0;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(20, 35, 43, 0.05);
}

/* Match every section title (Specialties, Techniques, Practice history,
   Publications, Testimonials) to the Credentials heading size. */
.profile-main h2 { margin: 0 0 8px; font-size: 1.05rem; }

/* Sections separated by whitespace on a plain white background. */
.profile-main > .card,
.profile-main > .profile-pair {
  padding: 22px 20px;
  margin: 0;
  background: var(--card);
}

/* Endorsement login/CTA line sits directly above the Specialties/Techniques
   pair, sharing that pair's side padding but with no bottom padding of its
   own so the two read as one grouped section. */
.profile-main > .endorse-prompt {
  padding: 22px 20px 0;
  margin: 0;
  background: var(--card);
}
.profile-main > .endorse-prompt + .profile-pair {
  padding-top: 14px;
}

.profile-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.profile-pair .card:only-child { grid-column: 1 / -1; }

/* "My Practice at a Glance" card, still a distinct rounded block but borderless. */
.profile-top .card.glance-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin: 0;
  box-shadow: 0 1px 3px rgba(20, 35, 43, 0.05);
}
/* Match the Credentials heading exactly (font-size, margin, line-height all affect
   where the glyphs actually sit) so the two headings line up pixel-for-pixel. */
.glance-card h2:first-child { margin-top: 0; font-size: 1.05rem; line-height: 1.5; }
.glance-row { display: flex; align-items: flex-start; gap: 12px; }
.glance-row + .glance-row { margin-top: 12px; }
.glance-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-bg); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; line-height: 1;
}
.glance-clinic { font-weight: 700; margin: 0 0 2px; }
.glance-address, .glance-phone { margin: 0 0 4px; color: var(--ink); }
.glance-address a { font-weight: 600; }
.glance-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border: 1px solid var(--border); border-radius: 999px;
  background: none; color: var(--ink); font-weight: 600; font-size: 0.85rem;
  font-family: inherit; cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.pill-btn:hover { border-color: var(--primary); background: var(--accent-bg); text-decoration: none; }
.glance-divider { height: 1px; background: var(--border); margin: 16px 0; }
.glance-meta { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 8px; align-items: baseline; }
.glance-meta dt { margin: 0; white-space: nowrap; }
.glance-meta dd { margin: 0; }
.glance-teaser { margin: 0; padding-top: 8px; }
.glance-teaser-link { font-weight: 700; font-size: 1.05rem; margin-left: 2px; }

.specialty-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.specialty-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 2px 0; }
.specialty-name { font-weight: 400; color: var(--primary-dark); }
.other-heading { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin: 14px 0 8px; }
.other-heading .legend-note { text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 0.85rem; margin-left: 8px; }
.endorse-count { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

.plain-specialty-list { list-style: none; margin: 0; padding: 0; column-count: 2; column-gap: 24px; }
.plain-specialty-list li { break-inside: avoid; padding: 3px 0; color: var(--ink); }

.testimonial { border-left: 3px solid var(--primary); padding: 4px 0 4px 14px; margin-bottom: 12px; }
.testimonial-content { font-style: italic; margin: 0 0 6px; }
.testimonial-author { margin: 0; font-weight: 600; }
.testimonial-form { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
.link-btn.danger { color: #9c2a1f; margin-top: 4px; }

dl { margin: 0; }
dt { font-weight: 700; margin-top: 12px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
dt:first-child { margin-top: 0; }
dd { margin: 2px 0 0; }

.search-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.search-page-head h1 { margin: 0; font-size: 1.5rem; }
.search-form-compact { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(20, 35, 43, 0.05); }
.search-row { display: flex; flex-wrap: wrap; gap: 8px; }
.search-row input, .search-row select { flex: 1 1 150px; min-width: 110px; }
.search-row input.zip-input { flex: 0 1 90px; min-width: 80px; }

/* Type-ahead dropdown for the combined search box — anchored to a wrapper
   around just the input (not the whole row) so it doesn't stretch under the
   Search button too. */
.search-suggest-wrap { position: relative; flex: 1 1 150px; min-width: 110px; }
.search-suggest-wrap-wide { flex: 1 1 320px; }
.search-suggest-wrap input { width: 100%; }
.search-suggest-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(20, 35, 43, 0.12);
  z-index: 20;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}
.search-suggest-list.hidden { display: none; }
.search-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.search-suggest-item:hover, .search-suggest-item.active { background: var(--accent-bg); }
.search-form-compact input, .search-form-compact select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.2;
}
.search-form-compact select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235c6b73'><path d='M5.25 7.5l4.75 5 4.75-5H5.25z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
  padding-right: 28px;
}
.search-form-compact button { flex: 0 0 auto; padding: 8px 20px; font-size: 0.9rem; }
.search-form-compact .search-row + .search-row { margin-top: 8px; }

.results-count { margin: 0 0 10px; }

.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.result-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20, 35, 43, 0.04);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.result-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(20, 35, 43, 0.09); transform: translateY(-2px); }
.result-card-top { display: flex; gap: 10px; align-items: center; }
.result-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.result-photo.placeholder { display: flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--primary-dark); font-weight: 700; font-size: 0.95rem; }
.result-name-block { min-width: 0; flex: 1; }
.result-name-block h3 { margin: 0; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.result-location-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.result-location { margin: 0; }
.result-view { flex-shrink: 0; }
.result-headline { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-specialty, .tag-technique { font-size: 0.7rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; line-height: 1.3; white-space: nowrap; }
.tag-specialty { background: var(--accent-bg); color: var(--primary-dark); }
.tag-technique { background: #eef1f2; color: var(--muted); }
.tag-hidden { display: none; }
.result-tags.expanded .tag-hidden { display: inline-block; }
.result-tags.expanded .tag-more { display: none; }
.tag-more { cursor: pointer; text-decoration: underline; }
.tag-more:hover { opacity: 0.8; }
.result-languages { margin: 0; }

.browse-section { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.browse-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.browse-header h2 { margin: 0; font-size: 1.15rem; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: underline; }
.breadcrumb a:hover { color: var(--primary-dark); }
.breadcrumb-sep { margin: 0 6px; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }
.browse-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--primary-dark);
}
.browse-item:hover { color: var(--primary); text-decoration: underline; }
.browse-count { color: var(--primary); font-size: 0.85rem; }
.browse-city-select {
  font-size: 0.78rem;
  padding: 2px 6px;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--card);
  max-width: 160px;
  vertical-align: baseline;
}
.browse-city-select:hover { border-color: var(--primary); color: var(--primary-dark); }

/* Split list+map layout for the "Map" view — results scroll in a fixed-width
   left column, the map fills the rest and stays put (sticky) as the list
   scrolls, same pattern as Realtor.com/Zillow/Redfin's map search. */
.search-map-layout { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; align-items: start; }
.search-map-layout .results-grid { grid-template-columns: 1fr; max-height: calc(100vh - 220px); overflow-y: auto; padding-right: 4px; }
.map-pane { position: sticky; top: 20px; height: calc(100vh - 220px); min-height: 420px; }
.practitioner-map { width: 100%; height: 100%; border-radius: 12px; border: 1px solid var(--border); }
.map-pane.map-loading .practitioner-map { opacity: 0.6; transition: opacity 0.15s ease; }
.map-unavailable {
  height: 100%; min-height: 420px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 6px; padding: 24px;
  background: var(--accent-bg); border: 1px dashed var(--border); border-radius: 12px;
}
.map-unavailable code { background: rgba(20, 35, 43, 0.06); padding: 1px 6px; border-radius: 4px; }
.result-card.result-card-active { border-color: var(--primary); box-shadow: 0 4px 14px rgba(20, 35, 43, 0.09); }
.map-infowindow a { color: var(--primary-dark); font-weight: 600; }

@media (max-width: 860px) {
  .search-map-layout { grid-template-columns: 1fr; }
  .search-map-layout .results-grid { max-height: none; overflow-y: visible; }
  /* Stacked single column on mobile — put the map above the list (its DOM
     order is after the list, for the desktop list-left/map-right layout, so
     this needs an explicit reorder rather than just following source order). */
  .map-pane { position: static; height: 420px; order: -1; }
}

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 0.85rem; text-align: center; }
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer .footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; font-size: 0.9rem; }
.site-footer .footer-links a { text-decoration: none; font-weight: 600; color: var(--ink); }
.site-footer .footer-links a:hover { text-decoration: underline; }

.static-page h2 { margin-top: 32px; margin-bottom: 8px; font-size: 1.15rem; }
.static-page h3 { margin-top: 20px; margin-bottom: 6px; font-size: 1rem; }
.static-page ul { line-height: 1.6; padding-left: 20px; }
.static-page .muted.small { font-size: 0.85rem; }

.admin-dashboard { max-width: 880px; margin: 0 auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.admin-header h1 { margin: 0; }
.admin-list { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; }
.admin-row-info h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.small-btn { padding: 8px 14px; font-size: 0.85rem; }

.admin-summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.status-badge { display: inline-flex; align-items: center; font-weight: 700; font-size: 0.78rem; padding: 4px 12px; border-radius: 999px; }
.status-badge.expired { background: #fdecea; color: #9c2a1f; }
.status-badge.expiring { background: #fff4e0; color: #93590a; }
.admin-row-expired { border-color: #f5c6c0; }
.admin-row-expiring_soon { border-color: #f5d99c; }

@media (max-width: 720px) {
  .feature-grid, .grid-2, .grid-3, .grid-4, .grid-5, .profile-pair, .profile-top, .name-personal-row, .address-line-row, .address-city-group { grid-template-columns: 1fr; }
  /* Reset every item's flex-basis, which sizes *height* once the row switches
     to a column — without this, e.g. "Years of experience" (basis 140px) or
     License number (basis 160px) end up that many pixels tall instead of
     full width. This has to repeat the two-class selectors above (rather
     than a single ".license-row > *") to match their specificity — a lower-
     specificity reset here would lose the cascade to those rules and this
     bug would silently come right back. */
  .license-row, .headline-row { flex-direction: column; align-items: stretch; }
  .license-row .license-row-number,
  .license-row .license-row-state,
  .license-row .license-row-expire,
  .license-row .license-row-no-license,
  .headline-row .headline-row-headline,
  .headline-row .headline-row-years { flex: 1 1 auto; min-width: 0; }
  .profile-header-top { flex-direction: column; align-items: center; text-align: center; }
  .plain-specialty-list { column-count: 1; }
  .profile-pair { gap: 24px; }
  .profile-pair .card:first-child { padding-bottom: 20px; margin-bottom: 20px; }
  .profile-top { gap: 20px; }
  .profile-name-row { justify-content: center; }

  /* Edit/create-profile form: tighter card and fieldset padding so more of a
     phone's width goes to the fields themselves rather than to whitespace —
     the desktop padding (24px card + 20px fieldset, nested) eats close to a
     third of a typical phone's viewport. */
  .form-page .card { padding: 16px; }
  .stacked-form fieldset,
  .stacked-form details.collapsible-fieldset { padding: 14px 16px; }
  /* Heading and the "View public profile" / "Who can see your profile?"
     actions each get their own full-width row instead of competing for space
     next to a wrapping h1 — easier to read and tap. */
  .edit-profile-header { flex-direction: column; align-items: stretch; }
  .edit-profile-header-actions { align-items: stretch; }
  .edit-profile-header-actions #view-public-profile-btn { text-align: center; }
}
