/* ============================================================
   PROVIDER PORTAL — admin-shell layout adapted for a single
   provider editing their own listing.

   STRUCTURE (mirrors admin-shell.css):
     1. Theme-stable sidebar tokens
     2. .shell — sidebar + content grid
     3. .sidebar — brand, nav-items, footer
     4. .topbar — section title + actions (save/discard/session/theme)
     5. .admin-body / .admin-main / .admin-h1 / .section-label
     6. Buttons (.btn-primary, .btn-secondary, .btn-tertiary)
     7. Login shell — full-page centered, no sidebar
     8. Portal layout — single-column form (preview rail removed)
     9. Form widgets (preserved verbatim from the wizard era)
        — .ed-input, .ed-textarea, .ed-select, .ed-grid, .ed-field
        — logo, phone picker, chips, outlets, hours
     10. (was: live preview iframe — removed)
     11. Toast
     12. Responsive

   The site's main /style.css is NOT loaded here — every rule the
   portal needs is self-contained in this file plus /base.css for
   tokens (font, color, spacing, radius). That parity is the point
   of the refactor: portal and admin now share a layout grammar
   while remaining independently styleable.
   ============================================================ */


/* ----------------------------------------------------------------
   1. Theme-stable sidebar tokens — same colours regardless of
      light/dark theme so the chrome reads as a calm constant.
   ---------------------------------------------------------------- */
:root {
  --sidebar-bg:           #0B3C5D;
  --sidebar-bg-dark:      #04202F;
  --sidebar-text:         rgba(225, 238, 246, 0.72);
  --sidebar-text-strong:  #FFFFFF;
  --sidebar-accent:       #6FD3CD;
  --sidebar-accent-tint:  rgba(58, 175, 169, 0.14);
  --sidebar-hover:        rgba(255, 255, 255, 0.04);
  --sidebar-active:       rgba(255, 255, 255, 0.08);
  --sidebar-divider:      rgba(255, 255, 255, 0.08);
}


/* ----------------------------------------------------------------
   2. Shell — sidebar + content grid

   IMPORTANT: every display rule below that targets the top-level
   .portal-login-shell, .shell.portal-shell, or .login-step element
   has higher specificity than the user-agent `[hidden]` rule, which
   is at the attribute-selector level. Without an explicit
   [hidden] override the `hidden` attribute on these elements is
   silently defeated and login/editor views render simultaneously.
   ---------------------------------------------------------------- */
.portal-body {
  margin: 0;
  background: var(--bg);
  min-height: 100svh;
}
/* The portal owns the viewport — hide chrome injected by base.njk
   that doesn't belong inside the editor shell:
     - top-nav-static (the marketing site header)
     - site-footer    (legal/contact links — not relevant in an editor)
     - mobile-menu    (its burger trigger lives in the hidden top-nav)
     - floating-stack (theme toggle + back-to-top FAB — the topbar
                       already has its own theme toggle, and a sticky
                       sidebar makes back-to-top redundant). */
.portal-body .top-nav,
.portal-body .site-footer,
.portal-body .mobile-menu,
.portal-body .floating-stack { display: none; }

.shell.portal-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.shell.portal-shell[hidden] { display: none; }


/* ----------------------------------------------------------------
   3. Sidebar — brand, nav-items, footer
   ---------------------------------------------------------------- */
.portal-shell .sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}
[data-theme="dark"] .portal-shell .sidebar { background: var(--sidebar-bg-dark); }

.portal-shell .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 0 6px;
  text-decoration: none;
  color: inherit;
}
.portal-shell .brand:hover .brand-name-support { color: #fff; }
.portal-shell .brand .pulse {
  width: 24px;
  height: 24px;
  background: url('/symbol.svg') center / contain no-repeat;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  flex: none;
}
.portal-shell .brand-name {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 30, 'opsz' 144, 'WONK' 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--sidebar-text-strong);
}
.portal-shell .brand-name-support {
  font-weight: 600;
  color: var(--sidebar-text-strong);
  transition: color 0.15s;
}
.portal-shell .brand-name-finder {
  font-style: italic;
  font-weight: 400;
  font-variation-settings: 'SOFT' 60, 'opsz' 144;
  color: var(--sidebar-accent);
  margin-left: 3px;
}
.portal-shell .brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sidebar-accent);
  background: var(--sidebar-accent-tint);
  padding: 2px 6px;
  border-radius: 4px;
}

.portal-shell .nav-item {
  appearance: none;
  background: transparent;
  border: none;
  font: inherit;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background-color 0.15s, color 0.15s;
  position: relative;
}
.portal-shell .nav-item:hover {
  color: var(--sidebar-text-strong);
  background: var(--sidebar-hover);
}
.portal-shell .nav-item[aria-current="page"] {
  background: var(--sidebar-active);
  color: var(--sidebar-text-strong);
  font-weight: 600;
}
/* Active-tab rail — a 2px primary-tinted accent on the leading edge.
   Tabs swap content (not scroll position), so the active-state has
   to be louder than the previous scrollspy-era highlight. The rail
   is short of the full button height so dense sidebar groupings still
   read as a list, not a column of vertical bars. */
.portal-shell .nav-item[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--primary, #2bd4c4);
  box-shadow: 0 0 6px color-mix(in srgb, var(--primary, #2bd4c4) 60%, transparent);
}
.portal-shell .nav-item-icon {
  flex: none;
  opacity: 0.55;
  transition: opacity 0.15s;
}
.portal-shell .nav-item:hover .nav-item-icon,
.portal-shell .nav-item[aria-current="page"] .nav-item-icon {
  opacity: 0.95;
}

/* Per-section dirty dot — a tiny lagoon pulse on the right edge of
   any nav item whose corresponding section has unsaved changes.
   Provides at-a-glance provenance without forcing the user to scroll. */
.portal-shell .nav-item-dirty {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  flex: none;
  transition: background-color 0.18s, box-shadow 0.18s;
}
.portal-shell .nav-item[data-dirty="true"] .nav-item-dirty {
  background: var(--sidebar-accent);
  box-shadow: 0 0 0 3px rgba(111, 211, 205, 0.18);
  animation: navDirtyPulse 2.6s ease-in-out infinite;
}
@keyframes navDirtyPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(111, 211, 205, 0.16); }
  50%      { box-shadow: 0 0 0 5px rgba(111, 211, 205, 0.06); }
}

/* Sidebar group eyebrow — quiet section divider for the navigation
   clusters. Reads as a Mono caption so it never competes with the
   nav-items themselves; the negative space above each label visually
   separates the cluster without a hard rule. */
.portal-shell .sidebar-group-label {
  margin: 18px 0 6px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--sidebar-text) 65%, transparent);
}
/* The first group label after the brand sits a little tighter — the
   brand's own bottom-margin already supplies the breathing room. */
.portal-shell .brand + .sidebar-group-label,
.portal-shell .nav-item--health + .sidebar-group-label { margin-top: 14px; }

.portal-shell .sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--sidebar-divider);
}
.portal-shell .sidebar-foot-link,
.portal-shell .sidebar-foot-danger {
  appearance: none;
  background: transparent;
  border: none;
  font: inherit;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.portal-shell .sidebar-foot-link svg { margin-left: auto; opacity: 0.55; }
.portal-shell .sidebar-foot-link:hover,
.portal-shell .sidebar-foot-link:focus-visible {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-strong);
  outline: none;
}
.portal-shell .sidebar-foot-link:hover svg { opacity: 1; }
.portal-shell .sidebar-foot-danger {
  color: rgba(242, 128, 128, 0.78);
}
.portal-shell .sidebar-foot-danger:hover,
.portal-shell .sidebar-foot-danger:focus-visible {
  background: rgba(242, 128, 128, 0.12);
  color: #FFC5C5;
  outline: none;
}


/* ----------------------------------------------------------------
   4. Topbar — slim chrome with section title + actions
   ---------------------------------------------------------------- */
.portal-shell .topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.portal-shell .topbar-title {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.portal-shell .topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Save / Discard — primary CTA + ghost. The Save lives in the
   topbar so the provider can commit from anywhere in the form
   without scrolling to a sticky footer. */
.portal-shell .topbar-save {
  appearance: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 9px 14px;
  border-radius: 9999px;
  background: var(--cta);
  color: var(--cta-ink);
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s, transform 0.12s, box-shadow 0.15s, opacity 0.15s;
}
.portal-shell .topbar-save:hover:not(:disabled) {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.portal-shell .topbar-save:active:not(:disabled) { transform: translateY(0); }
.portal-shell .topbar-save:disabled {
  background: var(--surface-3);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}
.portal-shell .topbar-save[aria-busy="true"] { opacity: 0.92; cursor: progress; }
.portal-shell .topbar-save[aria-busy="true"] svg { display: none; }

.portal-shell .topbar-discard {
  appearance: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 9999px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.portal-shell .topbar-discard:hover:not(:disabled) {
  color: var(--danger-ink);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: var(--danger-tint);
}
.portal-shell .topbar-discard:disabled { opacity: 0.4; cursor: not-allowed; }

.portal-shell .topbar-dirty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep, var(--accent));
  font-weight: 600;
}
.portal-shell .topbar-dirty[hidden] { display: none; }
.portal-shell .topbar-dirty-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
  animation: navDirtyPulse 2.6s ease-in-out infinite;
}

/* Theme toggle + session bar — ported from admin-shell.css. */
.portal-shell .theme-toggle {
  appearance: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
  flex: none;
}
.portal-shell .theme-toggle:hover { color: var(--primary); transform: translateY(-1px); }
[data-theme="light"] .portal-shell .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .portal-shell .theme-toggle .icon-sun  { display: none; }
[data-theme="dark"]  .portal-shell .theme-toggle .icon-moon { display: none; }
[data-theme="dark"]  .portal-shell .theme-toggle .icon-sun  { display: block; }

.portal-shell .session-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 12px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-dim);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.portal-shell .session-bar .session-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
  transition: background-color 0.2s;
}
.portal-shell .session-bar .session-text {
  white-space: nowrap;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.portal-shell .session-bar .session-text strong {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}
.portal-shell .session-bar .session-timer {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  font-weight: 500;
}
/* Empty state — JS clears the timer text whenever the session has more
   than 30 minutes left. Collapse the slot so the chip doesn't carry a
   trailing margin around an invisible value. */
.portal-shell .session-bar .session-timer:empty { display: none; }
/* Warn state — under 30 minutes. Tints the digits amber so the chip
   reads as urgency without changing layout. */
.portal-shell .session-bar .session-timer[data-warn="1"] {
  color: var(--warning, #D9941C);
  font-weight: 700;
}
.portal-shell .session-bar.warn {
  background: var(--warn-tint);
  border-color: transparent;
  color: var(--warn-ink);
}
.portal-shell .session-bar.warn .session-dot { background: var(--warn); }
.portal-shell .session-bar.warn .session-text strong,
.portal-shell .session-bar.warn .session-timer { color: var(--warn-ink); }
.portal-shell .session-bar.danger {
  background: var(--danger-tint);
  border-color: transparent;
  color: var(--danger-ink);
}
.portal-shell .session-bar.danger .session-dot { background: var(--danger); }
.portal-shell .session-bar.danger .session-text strong,
.portal-shell .session-bar.danger .session-timer { color: var(--danger-ink); }

.portal-shell .signout-btn {
  appearance: none;
  background: transparent;
  border: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: currentColor;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.01em;
  opacity: 0.75;
  transition: opacity 0.15s, background 0.15s;
}
.portal-shell .signout-btn:hover { opacity: 1; background: rgba(11, 60, 93, 0.06); }
[data-theme="dark"] .portal-shell .signout-btn:hover { background: rgba(255, 255, 255, 0.08); }


/* ----------------------------------------------------------------
   5. Main, headings, section-label
   ---------------------------------------------------------------- */
.portal-shell .admin-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.portal-shell .admin-main.portal-main {
  padding: 28px 28px 96px;
  width: 100%;
  max-width: none; /* the split layout handles its own bounds */
}
.portal-shell .admin-h1 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 40, 'opsz' 120;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--text);
  line-height: 1.1;
}
.portal-shell .admin-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 24px;
  line-height: 1.55;
  max-width: 64ch;
}
.portal-shell .section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 24px 0 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.portal-shell .section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* ----------------------------------------------------------------
   6. Buttons — primary (CTA), secondary (outline), tertiary (ghost)
   ---------------------------------------------------------------- */
.portal-shell .btn-primary {
  appearance: none;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  min-height: 52px;
  border-radius: 9999px;
  background: var(--cta);
  color: var(--cta-ink);
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s, transform 0.12s, box-shadow 0.15s, opacity 0.15s;
}
.portal-shell .btn-primary:hover:not(:disabled) {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.portal-shell .btn-primary:disabled {
  background: var(--surface-3);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.portal-shell .btn-secondary {
  appearance: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9999px;
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.portal-shell .btn-secondary:hover:not(:disabled) {
  background: var(--primary-tint);
  border-color: var(--primary-tint);
  color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.portal-shell .btn-tertiary {
  appearance: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 9999px;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.portal-shell .btn-tertiary:hover { color: var(--primary); background: var(--primary-tint); }


/* ----------------------------------------------------------------
   7. (Login shell removed — now lives in style.css as `.auth-shell`,
       shared with /admin so both auth surfaces are visually identical.)
   ---------------------------------------------------------------- */

/* ----------------------------------------------------------------
   8. Portal layout — tabbed editor (single panel visible at a time)

   Only one .portal-panel is rendered at any moment; the others sit
   in the DOM with `hidden` so their inputs keep their state across
   tab switches but don't compete for screen real estate. The form
   wrapper claims the full main column with a generous reading-
   width cap so long lines don't sprawl on wide displays.

   Why tabs over the previous "long scroll w/ scrollspy" pattern:
     - The portal has 7 destinations of vastly different heights —
       Locations alone can be 5+ outlet cards. Forcing the user to
       scroll past every section to reach Account was hostile.
     - Tabs make "where am I?" unmistakable: the highlighted
       sidebar item == the rendered content. No drift between
       scroll position and aria-current.
     - The form still posts atomically; hidden panels still
       contribute their inputs to collectDraft().
   ---------------------------------------------------------------- */
.portal-shell .portal-layout {
  display: block;
  max-width: none;
}
.portal-shell .portal-form {
  display: block;
  min-width: 0;
  max-width: 880px;     /* reading-width cap — keeps line-lengths sane */
  margin: 0 auto;       /* centred under the topbar */
}
.portal-shell .portal-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.portal-shell .portal-panel[hidden] {
  display: none;
}
/* Soft fade on tab switch. JS toggles the class off-then-on each
   time a panel becomes active so the animation actually replays
   (CSS animations don't auto-restart when an element comes back
   from `hidden`). The transform is gentle — a 4px lift, not a
   slide — so frequent tab switching doesn't feel theatrical. */
.portal-shell .portal-panel.portal-panel--enter {
  animation: panelIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sub-group eyebrow inside merged panels (Listing details splits into
   "Identity" + "How participants reach you"). Quieter than .section-
   label, louder than .field-hint — sits halfway up the type scale so
   the eye reads it as a soft divider, not another heading. */
.portal-shell .portal-subgroup-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 4px 0 -4px;
}
.portal-shell .portal-subgroup-label--spaced { margin-top: 28px; }

/* Section labels can opt into extra top padding when they sit beneath
   another field (rather than the panel head). Used between the two
   chip pickers in Services & professions. */
.portal-shell .section-label--spaced { margin-top: 24px; }

/* Plain intro hint that sits above an input block without a label. */
.portal-shell .portal-field-intro { margin: -2px 0 12px; }


/* ----------------------------------------------------------------
   9. Form widgets — inputs, fields, label/hint utilities
   ---------------------------------------------------------------- */
.portal-shell .ed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.portal-shell .ed-field { display: flex; flex-direction: column; gap: 6px; }
.portal-shell .ed-field--wide { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .portal-shell .ed-grid { grid-template-columns: 1fr; }
}

.portal-shell .ed-input,
.portal-shell .ed-select,
.portal-shell .ed-textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 14px;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.portal-shell .ed-input:hover,
.portal-shell .ed-select:hover,
.portal-shell .ed-textarea:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border-strong)); }
.portal-shell .ed-input:focus,
.portal-shell .ed-select:focus,
.portal-shell .ed-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring-primary);
}
.portal-shell .ed-input--locked {
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--surface-2) 60%, var(--surface)) 0 8px,
    color-mix(in srgb, var(--surface-2) 90%, var(--surface)) 8px 10px
  );
  cursor: not-allowed;
  color: var(--text-dim);
}
.portal-shell .ed-textarea { resize: vertical; min-height: 96px; }
.portal-shell .ed-select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='%235F7E93' stroke-width='2' d='m5 8 5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

.portal-shell .field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portal-shell .field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.portal-shell .field-hint {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 4px 0 0;
}
.portal-shell .field-hint .raw-echo { font-weight: 600; }
.portal-shell .field-optional {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: 6px;
}
.portal-shell .field-lock {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warn-ink);
  background: var(--warn-tint);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
}
.portal-shell .field-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}
.portal-shell .field-toggle input { accent-color: var(--primary); }

.portal-shell .raw-echo {
  font-family: var(--font-mono);
  color: var(--text-dim);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.portal-shell .raw-echo:empty::before { content: '—'; opacity: 0.4; }

.portal-shell .char-count { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }


/* ----------------------------------------------------------------
   Logo widget — pads-tile + actions
   ---------------------------------------------------------------- */
.portal-shell .logo-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 24px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.portal-shell .logo-row::before {
  content: 'Drop or upload';
  position: absolute;
  top: -10px;
  left: 16px;
  padding: 2px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portal-shell .logo-tile {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 220px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.portal-shell .logo-tile::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1px dashed color-mix(in srgb, var(--border-strong) 55%, transparent);
  pointer-events: none;
  opacity: 0.6;
}
.portal-shell .logo-preview {
  width: 100%;
  height: 100%;
  /* 10px inset mirrors the public surfaces (see search result card +
     provider detail page) so the editor previews the artwork the way
     visitors will actually see it. */
  padding: 10px;
  box-sizing: border-box;
  object-fit: contain;
  background: #fff;
  position: relative;
  z-index: 1;
}
.portal-shell .logo-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.portal-shell .logo-empty svg {
  width: 36px;
  height: 36px;
  color: color-mix(in srgb, var(--primary) 50%, var(--text-muted));
  stroke-width: 1.5;
}
.portal-shell .logo-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  justify-content: center;
}
.portal-shell .logo-actions::before {
  content: 'Specifications';
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portal-shell .logo-actions #logoHint {
  display: grid;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
}
.portal-shell .logo-spec {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.portal-shell .logo-spec:first-child { border-top: 0; padding-top: 0; }
.portal-shell .logo-spec strong {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portal-shell .logo-upload-label { align-self: flex-start; }
.portal-shell .logo-btn-row { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }

@media (max-width: 720px) {
  .portal-shell .logo-row { grid-template-columns: 1fr; }
  .portal-shell .logo-tile { max-width: 200px; justify-self: start; }
}


/* ----------------------------------------------------------------
   Phone picker
   ---------------------------------------------------------------- */
.portal-shell .phone-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.portal-shell .phone-type { flex: 0 0 auto; width: 160px; }
.portal-shell .phone-parts {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: var(--surface-2);
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 4px 10px;
  font-family: var(--font-mono);
}
.portal-shell .phone-parts[hidden] { display: none; }
.portal-shell .phone-parts .ed-input,
.portal-shell .phone-parts .ed-select {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 8px 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-align: center;
  width: 64px;
  min-width: 0;
}
.portal-shell .phone-parts .ed-input:focus { background: var(--surface); border-radius: 6px; box-shadow: none; }
.portal-shell .phone-parts .phone-area { width: 130px; text-align: left; }
.portal-shell .phone-parts .phone-prefix-sel { width: 90px; text-align: left; }
.portal-shell .phone-prefix {
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 0 2px 0 4px;
  font-weight: 600;
}
.portal-shell .phone-digit { letter-spacing: 0.08em !important; }


/* ----------------------------------------------------------------
   Chips (services + professions)
   ---------------------------------------------------------------- */
.portal-shell .chips-field { display: flex; flex-direction: column; gap: 12px; }
.portal-shell .chips-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}
.portal-shell .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  background: var(--primary-tint);
  color: var(--primary-ink);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.portal-shell .chip-remove {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary-ink);
  font-size: 13px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.portal-shell .chip-remove:hover { background: color-mix(in srgb, var(--primary) 32%, transparent); }
.portal-shell .chip-empty { font-size: 13px; color: var(--text-muted); padding: 8px 0; font-style: italic; }

.portal-shell .chips-input-row { position: relative; z-index: 60; }
.portal-shell .chips-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 60;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.portal-shell .chips-suggestions[hidden] { display: none; }
.portal-shell .chip-suggestion {
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.portal-shell .chip-suggestion:hover,
.portal-shell .chip-suggestion[aria-selected="true"] { background: var(--primary-tint); color: var(--primary-ink); }
.portal-shell .chip-suggestion mark { background: transparent; color: var(--primary); font-weight: 600; }
.portal-shell .chip-suggestions-empty {
  padding: 14px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  font-style: italic;
}


/* ----------------------------------------------------------------
   Outlets — card per location
   ---------------------------------------------------------------- */
.portal-shell .outlets-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.portal-shell .outlets-list:empty { display: none; }
.portal-shell .outlet-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.portal-shell .outlet-card[data-hidden="true"] {
  border-color: var(--warn);
  background: color-mix(in srgb, var(--warn-tint) 35%, var(--surface));
}
.portal-shell .outlet-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.portal-shell .outlet-card-title { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
.portal-shell .outlet-card-index {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  flex: none;
}
.portal-shell .outlet-name {
  background: var(--surface);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  padding: 8px 12px;
}
.portal-shell .outlet-card-chrome { display: inline-flex; align-items: center; gap: 10px; }
.portal-shell .outlet-delete {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.portal-shell .outlet-delete:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 42%, transparent);
  background: var(--danger-tint);
}
.portal-shell .outlet-card-body { display: grid; gap: 18px; }
.portal-shell .outlet-fieldset { border: 0; padding: 0; }
.portal-shell .outlet-fs-legend {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.portal-shell .outlet-address-grid {
  display: grid;
  grid-template-columns: 100px 120px 1fr 160px;
  gap: 10px;
}
.portal-shell .outlet-address-grid .ed-field { min-width: 0; }
.portal-shell .outlet-address-grid .ed-field:nth-child(5) { grid-column: 1 / 3; }
.portal-shell .outlet-address-grid .ed-field:nth-child(6) { grid-column: 3 / 4; }
.portal-shell .outlet-address-grid .ed-field:nth-child(7) { grid-column: 4 / 5; }
@media (max-width: 720px) {
  .portal-shell .outlet-address-grid { grid-template-columns: 1fr 1fr; }
  .portal-shell .outlet-address-grid .ed-field,
  .portal-shell .outlet-address-grid .ed-field--wide { grid-column: span 1 !important; }
  .portal-shell .outlet-address-grid .ed-field:nth-child(3),
  .portal-shell .outlet-address-grid .ed-field:nth-child(5) { grid-column: 1 / -1 !important; }
}
.portal-shell .outlet-address-grid .ed-select[data-role="type"]:has(option[value=""]:checked) {
  border-color: color-mix(in srgb, var(--warn) 55%, var(--border));
  background-color: color-mix(in srgb, var(--warn-tint) 28%, var(--surface));
  color: var(--warn);
}
.portal-shell .outlet-address-grid .ed-select[data-role="type"]:has(option[value=""]:checked):focus {
  border-color: var(--primary);
  background-color: var(--surface);
  color: var(--text);
}
.portal-shell [data-role="geocode-hint"] {
  min-height: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
.portal-shell [data-role="geocode-hint"].match-exact    { color: var(--success); }
.portal-shell [data-role="geocode-hint"].match-postcode { color: var(--warn); }
.portal-shell [data-role="geocode-hint"].match-none     { color: var(--danger); }


/* ----------------------------------------------------------------
   Hours grid — segmented day rows
   ---------------------------------------------------------------- */
.portal-shell .hours-grid {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.portal-shell .hours-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  transition: background 0.15s;
}
.portal-shell .hours-row:first-child { border-top: 0; }
.portal-shell .hours-row:has(input:checked) { background: var(--surface); }

.portal-shell .hours-day {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.portal-shell .hours-day input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid color-mix(in srgb, var(--border-strong) 60%, transparent);
  background: var(--surface);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.portal-shell .hours-day input:hover { border-color: var(--primary); }
.portal-shell .hours-day input:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}
.portal-shell .hours-day input:checked::after {
  content: '';
  width: 10px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m3 7 3 3 5-6'/></svg>") center/contain no-repeat;
}
.portal-shell .hours-day-name {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.15s;
  font-variant-numeric: tabular-nums;
}
.portal-shell .hours-row:has(input:checked) .hours-day-name { color: var(--text); font-weight: 600; }

.portal-shell .hours-times {
  display: inline-flex;
  align-items: stretch;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 9999px;
  overflow: hidden;
  justify-self: end;
}
.portal-shell .hours-times .hours-select {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 7px 28px 7px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  width: auto;
  min-width: 116px;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.portal-shell .hours-times .hours-select:hover { background: color-mix(in srgb, var(--primary-tint) 45%, transparent); }
.portal-shell .hours-times .hours-select:focus {
  background: var(--surface);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  box-shadow: none;
}
.portal-shell .hours-dash {
  display: inline-grid;
  place-items: center;
  width: 30px;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 14px;
  background: color-mix(in srgb, var(--primary-tint) 50%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}
.portal-shell .hours-closed {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  justify-self: end;
  padding-right: 4px;
  font-family: var(--font-display);
}
.portal-shell .hours-copy {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
  justify-self: end;
}
.portal-shell .hours-row:has(input:checked) .hours-copy { opacity: 1; }
.portal-shell .hours-copy:hover {
  background: var(--primary-tint);
  border-color: color-mix(in srgb, var(--primary) 24%, transparent);
  color: var(--primary);
}
.portal-shell .hours-copy.is-copied {
  background: var(--success-tint);
  color: var(--success-ink);
  border-color: color-mix(in srgb, var(--success) 24%, transparent);
}
.portal-shell .hours-row:has(input:checked) .hours-closed { display: none; }
.portal-shell .hours-row:not(:has(input:checked)) .hours-times,
.portal-shell .hours-row:not(:has(input:checked)) .hours-copy { display: none; }
@media (max-width: 640px) {
  .portal-shell .hours-row { grid-template-columns: 110px 1fr; }
  .portal-shell .hours-copy { grid-column: 2; justify-self: end; }
  .portal-shell .hours-times .hours-select { min-width: 96px; padding-left: 12px; padding-right: 24px; }
}

.portal-shell .outlets-add { align-self: flex-start; margin-bottom: 8px; }


/* ----------------------------------------------------------------
   10. (live preview iframe — removed; section intentionally empty)
   ---------------------------------------------------------------- */


/* ----------------------------------------------------------------
   11. Toast — bottom-right, mirrors admin's toast aesthetic
   ---------------------------------------------------------------- */
.portal-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  pointer-events: auto;
  min-width: 240px;
  max-width: 380px;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  font-weight: 500;
  animation: toastIn 0.24s ease-out;
}
.portal-toast[hidden] { display: none; }
.portal-toast.toast-success { border-left-color: var(--success); background: var(--success-tint); color: var(--success-ink); border-color: transparent; }
.portal-toast.toast-error   { border-left-color: var(--danger);  background: var(--danger-tint);  color: var(--danger-ink);  border-color: transparent; }
@keyframes toastIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}


/* ----------------------------------------------------------------
   12. Misc + responsive
   ---------------------------------------------------------------- */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
  flex: none;
}
.portal-shell .topbar-save[aria-busy="true"] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .portal-shell *,
  .portal-shell *::before,
  .portal-shell *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Below 860px — sidebar collapses to a horizontal nav strip. */
@media (max-width: 860px) {
  .shell.portal-shell { grid-template-columns: 1fr; }
  .portal-shell .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 14px 16px;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .portal-shell .brand { margin-bottom: 0; margin-right: auto; }
  .portal-shell .nav-item { width: auto; margin-bottom: 0; padding: 7px 12px; }
  .portal-shell .nav-item span:not(.nav-item-dirty) { display: none; }
  .portal-shell .sidebar-footer { display: none; }
}

@media (max-width: 640px) {
  .portal-shell .topbar {
    padding: 0 16px;
    gap: 10px;
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .portal-shell .session-bar { font-size: 11.5px; }
  .portal-shell .admin-main.portal-main { padding: 20px 16px 64px; }
  .portal-shell .admin-h1 { font-size: 26px; }
}

/* ────────────────────────────────────────────────────────────────────────
   Publish-to-search banner — sits at the top of the form when the merged
   record fails the completeness gate. Editorial, instructive, never alarmist.
   ──────────────────────────────────────────────────────────────────────── */
.portal-shell .publish-banner {
  position: relative;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary) 6%, var(--surface)) 0%,
    color-mix(in srgb, var(--accent)  6%, var(--surface)) 100%);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: 16px;
  padding: 22px 24px;
  margin: 0 0 28px;
  overflow: hidden;
}
.portal-shell .publish-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(160px 100px at 92% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(140px 80px at 8% 90%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%);
  pointer-events: none;
  border-radius: inherit;
}
.portal-shell .publish-banner > * { position: relative; }
.portal-shell .publish-banner-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
}
.portal-shell .publish-banner-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--primary) 80%, var(--text));
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: 999px;
}
.portal-shell .publish-banner-title {
  font-family: var(--font-display, var(--font-display-fallback, Georgia));
  font-variation-settings: 'SOFT' 50, 'opsz' 144;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--text);
  margin: 0;
}
.portal-shell .publish-banner-lede {
  color: var(--text-dim, var(--text-muted));
  font-size: 14px;
  line-height: 1.55;
  max-width: 64ch;
  margin: 0 0 16px;
}
.portal-shell .publish-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}
.portal-shell .publish-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.portal-shell .publish-item.is-pending {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
}
.portal-shell .publish-item.is-done {
  background: color-mix(in srgb, var(--success, #1F7A6B) 5%, var(--surface));
  border-color: color-mix(in srgb, var(--success, #1F7A6B) 22%, var(--border));
}
.portal-shell .publish-item-mark {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex: none;
}
.portal-shell .publish-item.is-done .publish-item-mark {
  background: color-mix(in srgb, var(--success, #1F7A6B) 18%, transparent);
  color: var(--success, #1F7A6B);
}
.portal-shell .publish-item.is-pending .publish-item-mark {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: color-mix(in srgb, var(--primary) 70%, var(--text));
}
.portal-shell .publish-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.portal-shell .publish-item-title {
  font-family: var(--font-display, Georgia);
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
  line-height: 1.25;
}
.portal-shell .publish-item-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.portal-shell .publish-item-fix {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.portal-shell .publish-item-fix:hover { background: var(--primary-hover, var(--primary)); transform: translateY(-1px); }
.portal-shell .publish-banner-foot {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
}

/* ────────────────────────────────────────────────────────────────────────
   Verified-field locks — quiet readonly affordance for fields the
   verification overlay set. Provider can't edit until support flips it.
   ──────────────────────────────────────────────────────────────────────── */
.portal-shell .is-verified-locked {
  background: color-mix(in srgb, var(--surface-2, var(--surface)) 70%, var(--primary-tint));
  border-color: color-mix(in srgb, var(--primary) 18%, var(--border-strong)) !important;
  cursor: not-allowed;
}
.portal-shell .is-verified-locked input,
.portal-shell .is-verified-locked select {
  pointer-events: none;
  opacity: 0.85;
}
.portal-shell .verified-lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  padding: 4px 9px;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: color-mix(in srgb, var(--primary) 75%, var(--text));
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ────────────────────────────────────────────────────────────────────────
   Outlet card — Remote / Online toggle
   ──────────────────────────────────────────────────────────────────────── */
.portal-shell .outlet-remote-toggle {
  border: 0;
  padding: 14px 16px;
  margin: 0 0 14px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  border-radius: 10px;
}
.portal-shell .field-toggle--block { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.portal-shell .field-toggle--block input[type="checkbox"] {
  margin-top: 3px;
  flex: none;
  width: 16px; height: 16px;
  accent-color: var(--accent);
}
.portal-shell .field-toggle-text { display: flex; flex-direction: column; gap: 4px; }
.portal-shell .field-toggle-text strong { font-size: 14px; color: var(--text); font-weight: 600; }
.portal-shell .field-toggle-hint { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }

.portal-shell .outlet-card.outlet-card--remote .outlet-fieldset[data-role="address-fieldset"] { display: none; }
.portal-shell .outlet-card.outlet-card--remote .outlet-remote-toggle {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ── 7. Active-status panel ──────────────────────────────────────────────
   Surfaces the rolling 30-day "I'm still active" countdown for CSV-inactive
   providers. The card colour-shifts through fresh → expiring → expired so
   the state is legible at a glance — green (>14 days), amber (≤14 days
   left), red (expired/never refreshed). A horizontal meter visualises the
   remaining window at the same colour. */
.portal-shell .nav-item--active-status { display: none; }
.portal-shell .nav-item--active-status[data-visible="1"] { display: flex; }
.portal-shell .nav-item-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: auto;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent);
  animation: navPulse 2.4s ease-out infinite;
  flex: none;
}
@keyframes navPulse {
  0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--accent) 50%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%,  transparent); }
  100% { box-shadow: 0 0 0 0   color-mix(in srgb, var(--accent) 0%,  transparent); }
}
.portal-shell .nav-item--active-status[data-tone="warn"] .nav-item-pulse { background: var(--warning, #D9941C); }
.portal-shell .nav-item--active-status[data-tone="bad"]  .nav-item-pulse { background: var(--danger,  #C03B3B); }

.portal-shell .active-status-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.portal-shell .active-status-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
  transition: background var(--dur-base) ease;
}
.portal-shell .active-status-card[data-state="fresh"]    { background: color-mix(in srgb, var(--success, #16A34A) 4%, var(--surface)); }
.portal-shell .active-status-card[data-state="fresh"]::before    { background: var(--success, #16A34A); }
.portal-shell .active-status-card[data-state="expiring"] { background: color-mix(in srgb, var(--warning, #D9941C) 5%, var(--surface)); }
.portal-shell .active-status-card[data-state="expiring"]::before { background: var(--warning, #D9941C); }
.portal-shell .active-status-card[data-state="expired"]  { background: color-mix(in srgb, var(--danger, #C03B3B) 5%, var(--surface)); }
.portal-shell .active-status-card[data-state="expired"]::before  { background: var(--danger, #C03B3B); }

.portal-shell .active-status-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.portal-shell .active-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.portal-shell .active-status-card[data-state="fresh"]    .active-status-pill { background: color-mix(in srgb, var(--success, #16A34A) 18%, var(--surface)); color: var(--success, #16A34A); border-color: color-mix(in srgb, var(--success, #16A34A) 35%, transparent); }
.portal-shell .active-status-card[data-state="expiring"] .active-status-pill { background: color-mix(in srgb, var(--warning, #D9941C) 18%, var(--surface)); color: var(--warning, #D9941C); border-color: color-mix(in srgb, var(--warning, #D9941C) 35%, transparent); }
.portal-shell .active-status-card[data-state="expired"]  .active-status-pill { background: color-mix(in srgb, var(--danger,  #C03B3B) 18%, var(--surface)); color: var(--danger,  #C03B3B); border-color: color-mix(in srgb, var(--danger, #C03B3B) 35%, transparent); }

.portal-shell .active-status-title {
  margin: 0;
  font-family: var(--font-display, var(--font-sans));
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.portal-shell .active-status-meter {
  position: relative;
  margin: 16px 0 12px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, var(--surface));
  overflow: hidden;
}
.portal-shell .active-status-meter-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width var(--dur-base) ease, background var(--dur-base) ease;
}
.portal-shell .active-status-card[data-state="fresh"]    .active-status-meter-fill { background: var(--success, #16A34A); }
.portal-shell .active-status-card[data-state="expiring"] .active-status-meter-fill { background: var(--warning, #D9941C); }
.portal-shell .active-status-card[data-state="expired"]  .active-status-meter-fill { background: var(--danger,  #C03B3B); width: 100% !important; }
.portal-shell .active-status-meter-ticks {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
}
.portal-shell .active-status-meter-ticks span {
  border-right: 1px solid color-mix(in srgb, var(--surface) 65%, transparent);
}
.portal-shell .active-status-meter-ticks span:last-child { border-right: 0; }

.portal-shell .active-status-line {
  margin: 4px 0 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}
.portal-shell .active-status-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.portal-shell .active-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-weight: 600;
}
.portal-shell .active-refresh-btn[data-just-refreshed="1"] {
  background: var(--success, #16A34A);
  border-color: var(--success, #16A34A);
}
.portal-shell .active-status-tip {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 60ch;
}

/* ── 8. Accepting-new-participants panel ────────────────────────────────
   Bulk-set toolbar at the top, then per-profession rows with a yes/no/
   clear chip group. The chip pattern matches the rest of the portal's
   tonal language: yes adopts a green tint, no adopts neutral muted, clear
   is a tiny ghost button that resets to "not set". */
.portal-shell .accepting-bulk {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  margin-bottom: 18px;
}
.portal-shell .accepting-bulk-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}
.portal-shell .accepting-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
}
.portal-shell .accepting-bulk-btn--yes {
  background: color-mix(in srgb, var(--success, #16A34A) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--success, #16A34A) 34%, transparent);
  color: var(--success, #16A34A);
}
.portal-shell .accepting-bulk-btn--yes:hover:not(:disabled) {
  background: color-mix(in srgb, var(--success, #16A34A) 22%, var(--surface));
}
.portal-shell .accepting-bulk-btn--no {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.portal-shell .accepting-bulk-btn--no:hover:not(:disabled) {
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  color: var(--text);
}
.portal-shell .accepting-bulk-hint {
  flex: 1 0 100%;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}
@media (min-width: 720px) {
  .portal-shell .accepting-bulk-hint { flex: 1; margin-top: 0; text-align: right; }
}

.portal-shell .accepting-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.portal-shell .accepting-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.portal-shell .accepting-empty a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.portal-shell .accepting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.portal-shell .accepting-row[data-state="yes"] {
  border-color: color-mix(in srgb, var(--success, #16A34A) 38%, transparent);
  background: color-mix(in srgb, var(--success, #16A34A) 5%, var(--surface));
}
.portal-shell .accepting-row[data-state="no"] {
  border-color: color-mix(in srgb, var(--text) 18%, transparent);
  background: color-mix(in srgb, var(--text) 3%, var(--surface));
}
.portal-shell .accepting-row-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.portal-shell .accepting-row-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.portal-shell .accepting-row-state {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portal-shell .accepting-row[data-state="yes"] .accepting-row-state { color: var(--success, #16A34A); }
.portal-shell .accepting-row[data-state="no"]  .accepting-row-state { color: var(--text); }

.portal-shell .accepting-row-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.portal-shell .accepting-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}
.portal-shell .accepting-chip:hover { background: color-mix(in srgb, var(--text) 5%, var(--surface)); color: var(--text); }
.portal-shell .accepting-chip[aria-checked="true"].accepting-chip--yes {
  background: var(--success, #16A34A);
  border-color: var(--success, #16A34A);
  color: var(--surface);
}
.portal-shell .accepting-chip[aria-checked="true"].accepting-chip--no {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}
.portal-shell .accepting-chip--clear {
  width: 28px;
  height: 28px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  opacity: 0.55;
}
.portal-shell .accepting-chip--clear:hover { opacity: 1; }
.portal-shell .accepting-row[data-state="unset"] .accepting-chip--clear { display: none; }

.portal-shell .accepting-foot {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Holiday card — Accepting panel, calendar-bound self-hide ─────────
   Two stacked states (off / on) live in the same card; JS toggles
   `hidden` on each body. The card adopts the sand palette in both
   states so the holiday colour reads consistently across the dashboard
   visibility card and this control. */
.portal-shell .section-label--with-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.portal-shell .section-label--with-meta .field-optional {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 11.5px;
  color: var(--text-muted);
}
.portal-shell .holiday-card {
  position: relative;
  background: color-mix(in srgb, var(--sand-300, #E2B664) 5%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--sand-400, #C99340) 28%, var(--border));
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 22px;
  overflow: hidden;
}
.portal-shell .holiday-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--sand-400, #C99340);
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
}
.portal-shell .holiday-card[data-state="on"] {
  background: color-mix(in srgb, var(--sand-300, #E2B664) 9%, var(--surface));
}
.portal-shell .holiday-card-line {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  max-width: 64ch;
}
.portal-shell .holiday-card-line strong {
  color: var(--text);
  font-weight: 600;
  font-feature-settings: 'tnum';
}
.portal-shell .holiday-card-eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--sand-400, #C99340) 80%, var(--text));
}
.portal-shell .holiday-card-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.portal-shell .holiday-quick {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.portal-shell .holiday-quick-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portal-shell .holiday-date-input {
  font-family: var(--font-mono);
  width: 180px;
  padding: 8px 12px;
  font-feature-settings: 'tnum';
}
.portal-shell .holiday-set-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.portal-shell .holiday-card-error {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger, #C03B3B) 10%, var(--surface));
  color: var(--danger, #C03B3B);
  font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--danger, #C03B3B) 28%, transparent);
}


/* ────────────────────────────────────────────────────────────────────────
   13. Listing-health dashboard — the new front door
   ────────────────────────────────────────────────────────────────────────

   Three stacked cards that answer the only three questions a provider
   opens the portal to ask: am I findable, how trusted does my listing
   read, what changed since I was last here.

   Cards share a single grammar:
     - .health-card              the chrome (radius / shadow / surface)
     - .health-card-head         eyebrow + pill row at the top
     - .health-card-title        Fraunces-set headline
     - .health-card-line         editorial-tone explanation underneath

   Per-card variants then layer their own state machinery:
     .health-card--visibility    data-state drives left-rail colour, pill
                                 fill, and which sub-detail block shows.
                                 States: unknown · incomplete · stale ·
                                 live · live-expiring.
     .health-card--trust         data-tier drives badge gradient + accent.
                                 Tiers: unverified · bronze · silver ·
                                 gold · platinum. CSS uses --tier-color
                                 (set inline by JS from a token-aliased
                                 palette in TIER_VIEW) so the badge stays
                                 a single `currentColor`-driven SVG.
     .health-card--activity      placeholder state — copy fills the slot.
   ──────────────────────────────────────────────────────────────────────── */

.portal-shell .portal-panel--health {
  /* Health is the front door — give the panel a touch more breathing room
     than the form sections that follow. The cards already carry their own
     padding; this just opens up the gap before the next section. */
  padding-bottom: 32px;
}
.portal-shell .health-h1 { margin-bottom: 6px; }
.portal-shell .health-sub { max-width: 60ch; margin-bottom: 24px; }

.portal-shell .health-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 0 0 16px;
  transition: border-color var(--dur-base) ease, box-shadow var(--dur-base) ease;
  /* Stagger the cards into view on first paint — one orchestrated reveal,
     not idle micro-interactions. Each card delays itself relative to the
     panel mounting so the dashboard composes top-down. The animation is
     CSS-only (no observer needed) and skipped under reduced-motion. */
  animation: healthCardIn 420ms var(--ease-out, cubic-bezier(.22,.61,.36,1)) both;
}
.portal-shell .health-card + .health-card { animation-delay: 90ms; }
.portal-shell .health-card + .health-card + .health-card { animation-delay: 180ms; }
@keyframes healthCardIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .portal-shell .health-card { animation: none; }
}

/* Left-rail accent — the visibility card uses it as a state semaphore;
   the other cards keep it muted (just brand accent) so the visibility
   card reads as the dominant signal of the three. */
.portal-shell .health-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: color-mix(in srgb, var(--accent) 60%, var(--surface));
  transition: background var(--dur-base) ease;
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
}

.portal-shell .health-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}
.portal-shell .health-card-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portal-shell .health-card-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  white-space: nowrap;
}
.portal-shell .health-card-title {
  font-family: var(--font-display, Georgia);
  font-variation-settings: 'SOFT' 50, 'opsz' 144;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--text);
  line-height: 1.18;
  margin: 0 0 8px;
}
.portal-shell .health-card-line {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 64ch;
  margin: 0;
}

/* ── Visibility card — state-driven theming ─────────────────────────── */
.portal-shell .health-card--visibility[data-state="incomplete"] { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.portal-shell .health-card--visibility[data-state="incomplete"]::before { background: color-mix(in srgb, var(--primary) 70%, var(--accent)); }
.portal-shell .health-card--visibility[data-state="incomplete"] .health-card-pill {
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  color:      color-mix(in srgb, var(--primary) 80%, var(--text));
  border-color: color-mix(in srgb, var(--primary) 32%, transparent);
}
.portal-shell .health-card--visibility[data-state="stale"] { background: color-mix(in srgb, var(--danger, #C03B3B) 4%, var(--surface)); }
.portal-shell .health-card--visibility[data-state="stale"]::before { background: var(--danger, #C03B3B); }
.portal-shell .health-card--visibility[data-state="stale"] .health-card-pill {
  background: color-mix(in srgb, var(--danger, #C03B3B) 16%, var(--surface));
  color:      var(--danger, #C03B3B);
  border-color: color-mix(in srgb, var(--danger, #C03B3B) 35%, transparent);
}
.portal-shell .health-card--visibility[data-state="live-expiring"] { background: color-mix(in srgb, var(--warning, #D9941C) 5%, var(--surface)); }
.portal-shell .health-card--visibility[data-state="live-expiring"]::before { background: var(--warning, #D9941C); }
.portal-shell .health-card--visibility[data-state="live-expiring"] .health-card-pill {
  background: color-mix(in srgb, var(--warning, #D9941C) 16%, var(--surface));
  color:      var(--warning, #D9941C);
  border-color: color-mix(in srgb, var(--warning, #D9941C) 35%, transparent);
}
.portal-shell .health-card--visibility[data-state="live"] { background: color-mix(in srgb, var(--success, #16A34A) 4%, var(--surface)); }
.portal-shell .health-card--visibility[data-state="live"]::before { background: var(--success, #16A34A); }
.portal-shell .health-card--visibility[data-state="live"] .health-card-pill {
  background: color-mix(in srgb, var(--success, #16A34A) 16%, var(--surface));
  color:      var(--success, #16A34A);
  border-color: color-mix(in srgb, var(--success, #16A34A) 35%, transparent);
}
/* Holiday — intentional self-hide. Uses the warm sand palette to
   distinguish from the alarm tones (warning amber / danger red) — this
   is a chosen state, not a problem state. */
.portal-shell .health-card--visibility[data-state="holiday"] {
  background: color-mix(in srgb, var(--sand-300, #E2B664) 6%, var(--surface));
}
.portal-shell .health-card--visibility[data-state="holiday"]::before {
  background: var(--sand-400, #C99340);
}
.portal-shell .health-card--visibility[data-state="holiday"] .health-card-pill {
  background: color-mix(in srgb, var(--sand-400, #C99340) 16%, var(--surface));
  color:      var(--sand-400, #C99340);
  border-color: color-mix(in srgb, var(--sand-400, #C99340) 38%, transparent);
}

/* Holiday detail block — sits inside the visibility card when on
   holiday. Two affordances: a one-line "set N days ago" caption and a
   prominent "End holiday" button that mirrors the in-Capacity cancel. */
.portal-shell .health-detail--holiday .health-holiday-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.portal-shell .health-holiday-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}
.portal-shell .health-holiday-line:empty { display: none; }

/* Sub-detail blocks. Each block lives inside the card and JS toggles
   `hidden` on exactly one at a time. */
.portal-shell .health-detail { margin-top: 18px; }
.portal-shell .health-detail .publish-checklist { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .portal-shell .health-detail .publish-checklist {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Reusable meter — the visibility card uses this for both the
   completion (axes met / total) and the active-status countdown.
   The fill colour follows the card's data-state, so the same DOM can
   render either a brand-tinted progress strip (incomplete) or an
   amber/red countdown (stale/expiring). */
.portal-shell .health-meter {
  position: relative;
  margin: 0 0 14px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, var(--surface));
  overflow: hidden;
}
.portal-shell .health-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 70%, var(--accent));
  transition: width var(--dur-base) ease, background var(--dur-base) ease;
}
.portal-shell .health-card--visibility[data-state="incomplete"] .health-meter-fill {
  background: color-mix(in srgb, var(--primary) 80%, var(--accent));
}
.portal-shell .health-card--visibility[data-state="stale"] .health-meter-fill {
  background: var(--danger, #C03B3B);
  width: 100% !important;
}
.portal-shell .health-card--visibility[data-state="live-expiring"] .health-meter-fill {
  background: var(--warning, #D9941C);
}
.portal-shell .health-meter-ticks {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
}
.portal-shell .health-meter-ticks span {
  border-right: 1px solid color-mix(in srgb, var(--surface) 65%, transparent);
}
.portal-shell .health-meter-ticks span:last-child { border-right: 0; }

.portal-shell .health-stale-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.portal-shell .health-tip {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 60ch;
}
.portal-shell .health-live-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.portal-shell .health-live-line {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.portal-shell .health-refresh-tertiary {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 12px;
}

/* ── Trust card — tier as certification ─────────────────────────────── */
.portal-shell .health-card--trust {
  /* The trust card carries a tier-coloured glow at the top-right corner —
     a quiet ambient cue that matches the badge gradient without making
     the whole card feel painted. */
  background:
    radial-gradient(220px 140px at 92% 6%, color-mix(in srgb, var(--tier-color, var(--accent)) 14%, transparent), transparent 70%),
    var(--surface);
}
.portal-shell .health-card--trust::before { background: var(--tier-color, var(--accent)); }
.portal-shell .health-card--trust .health-card-pill {
  background: color-mix(in srgb, var(--tier-color, var(--accent)) 14%, var(--surface));
  color:      color-mix(in srgb, var(--tier-color, var(--accent)) 80%, var(--text));
  border-color: color-mix(in srgb, var(--tier-color, var(--accent)) 30%, transparent);
}

.portal-shell .health-tier-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 14px 0 18px;
}
.portal-shell .health-tier-badge {
  flex: none;
  width: 56px;
  height: 56px;
  color: var(--tier-color, var(--fog-400));
  filter:
    drop-shadow(0 2px 4px color-mix(in srgb, var(--tier-color, var(--fog-400)) 30%, transparent))
    drop-shadow(0 1px 0 rgba(255,255,255,0.4) inset);
  transition: color var(--dur-base) ease;
}
.portal-shell .health-card--trust[data-tier="unverified"] .health-tier-badge .health-tier-mark { display: none; }
.portal-shell .health-tier-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.portal-shell .health-tier-title {
  margin: 0;
  /* Tier name reads as a proper-noun certification: small caps via
     OpenType, slightly tighter tracking. Falls back gracefully on
     systems without OpenType small-caps. */
  font-variant-caps: small-caps;
  letter-spacing: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--tier-color, var(--text));
  text-transform: lowercase;
}
.portal-shell .health-card--trust[data-tier="unverified"] .health-tier-title {
  color: var(--text-muted);
}
.portal-shell .health-tier-line {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 56ch;
}

.portal-shell .health-tier-signals {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.portal-shell .health-tier-signal {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface) 60%, var(--bg, var(--bg-page, var(--surface))));
  border: 1px solid var(--border);
  border-radius: 10px;
}
.portal-shell .health-tier-signal .signal-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portal-shell .health-tier-signal .signal-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.portal-shell .health-tier-foot {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 64ch;
}
@media (max-width: 640px) {
  .portal-shell .health-tier-signals { grid-template-columns: 1fr; }
  .portal-shell .health-tier-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Sidebar nav — health item pulse ───────────────────────────────────
   Mirrors the old active-status pulse but on the always-visible Health
   item. data-tone resolves to a colour the same way. */
.portal-shell .nav-item--health[data-tone="warn"] .nav-item-pulse { background: var(--warning, #D9941C); }
.portal-shell .nav-item--health[data-tone="bad"]  .nav-item-pulse { background: var(--danger,  #C03B3B); }
.portal-shell .nav-item--health[data-tone="good"] .nav-item-pulse { background: var(--success, #16A34A); }
.portal-shell .nav-item--health[data-tone="warn"] .nav-item-pulse,
.portal-shell .nav-item--health[data-tone="bad"]  .nav-item-pulse,
.portal-shell .nav-item--health[data-tone="good"] .nav-item-pulse {
  display: block;
}
.portal-shell .nav-item--health .nav-item-pulse { display: none; }


/* ────────────────────────────────────────────────────────────────────────
   14. Trust destination — full per-check ledger
   ────────────────────────────────────────────────────────────────────────

   Editor-register equivalent of the public Verified-by-SupportFinder
   panel. The dashboard's trust card answers "which tier?"; this page
   answers "what specifically is, or isn't, behind that tier?" Three
   actor-grouped sections — System auto / SupportFinder / Your activity
   — each rendering a stacked list of rows. Each row leads with the
   check's human label and a status pill, then a one-line blurb that
   explains what passing the check actually attests to, then a meta
   row of dates (stamped / expires) when concrete data exists.
   ──────────────────────────────────────────────────────────────────── */

.portal-shell .portal-panel--trust .admin-h1 { margin-bottom: 6px; }
.portal-shell .portal-panel--trust .admin-sub { max-width: 64ch; margin-bottom: 24px; }

.portal-shell .trust-empty {
  border: 1px dashed var(--border);
  background: color-mix(in srgb, var(--surface) 55%, var(--bg, var(--bg-page, var(--surface))));
  padding: 22px;
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Re-affirm prompt — calls attention only when a re-affirmable check
   is stale or near expiry. Lagoon teal because it's a positive
   maintenance moment, not a problem ("you have signal worth
   keeping"). The body+button layout collapses to a stacked column on
   narrow widths. */
.portal-shell .trust-reaffirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin: 0 0 22px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 14px;
}
.portal-shell .trust-reaffirm-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.portal-shell .trust-reaffirm-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
}
.portal-shell .trust-reaffirm-line {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  max-width: 64ch;
}
.portal-shell .trust-reaffirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.portal-shell .trust-groups {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.portal-shell .trust-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.portal-shell .trust-group-head {
  margin: 0 0 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.portal-shell .trust-group-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.portal-shell .trust-group-title {
  margin: 0 0 4px;
  font-family: var(--font-display, Georgia);
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--text);
  line-height: 1.2;
}
.portal-shell .trust-group-blurb {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 64ch;
}

.portal-shell .trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.portal-shell .trust-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.portal-shell .trust-row:last-child { border-bottom: 0; }
.portal-shell .trust-row--empty {
  padding: 14px 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 13.5px;
}
.portal-shell .trust-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.portal-shell .trust-row-label {
  font-family: var(--font-display, Georgia);
  font-variation-settings: 'opsz' 96, 'SOFT' 30;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
  line-height: 1.3;
}
.portal-shell .trust-row-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  /* Default tone — neutral. Per-tone overrides below. */
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.portal-shell .trust-row-pill[data-tone="good"] {
  background: color-mix(in srgb, var(--success, #16A34A) 14%, var(--surface));
  color: var(--success, #16A34A);
  border-color: color-mix(in srgb, var(--success, #16A34A) 32%, transparent);
}
.portal-shell .trust-row-pill[data-tone="warn"] {
  background: color-mix(in srgb, var(--warning, #D9941C) 14%, var(--surface));
  color: var(--warning, #D9941C);
  border-color: color-mix(in srgb, var(--warning, #D9941C) 32%, transparent);
}
.portal-shell .trust-row-pill[data-tone="bad"] {
  background: color-mix(in srgb, var(--danger, #C03B3B) 14%, var(--surface));
  color: var(--danger, #C03B3B);
  border-color: color-mix(in srgb, var(--danger, #C03B3B) 32%, transparent);
}
.portal-shell .trust-row-blurb {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 72ch;
}
.portal-shell .trust-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 4px 0 0;
}
.portal-shell .trust-row-meta dt {
  display: inline;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}
.portal-shell .trust-row-meta dd {
  display: inline;
  margin: 0 14px 0 0;
  font-size: 12.5px;
  color: var(--text);
  font-feature-settings: 'tnum';
}
@media (max-width: 640px) {
  .portal-shell .trust-group { padding: 18px 16px; }
  .portal-shell .trust-row-head { flex-direction: column; align-items: flex-start; }
}


/* ────────────────────────────────────────────────────────────────────────
   15. Account destination — auxiliary, terminal, destructive
   ────────────────────────────────────────────────────────────────────────

   Three card-stacked sub-sections: sign-in email reference, sign-out
   affordance, and the revert-to-NDIS-base destructive action with a
   loss enumeration. The revert card carries a danger treatment — red
   left rail, danger button — so the consequence is legible before
   the click. The plain confirm() prompt is retained for the OK/cancel
   guard; designing a custom modal is a follow-up.
   ──────────────────────────────────────────────────────────────────── */

.portal-shell .account-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 20px;
  overflow: hidden;
}
.portal-shell .account-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: color-mix(in srgb, var(--accent) 50%, var(--surface));
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
}
.portal-shell .account-card-line {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  max-width: 64ch;
}
.portal-shell .account-card-line strong { color: var(--text); font-weight: 600; }
.portal-shell .account-card-eyebrow {
  margin: 14px 0 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.portal-shell .account-loss-list {
  margin: 0 0 12px;
  padding: 0 0 0 18px;
  list-style: disc;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}
.portal-shell .account-loss-list li { margin: 0 0 4px; }
.portal-shell .account-card-foot {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}
.portal-shell .account-card-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Danger variant — the revert card. Red left-rail, red-tinted surface,
   matching button. The action sits behind a confirm() guard so the
   visual emphasis doesn't have to be doom-coded; it's a clear "this is
   the irreversible one" signal, not a panic button. */
.portal-shell .section-label--danger {
  color: var(--danger, #C03B3B);
  margin-top: 28px;
}
.portal-shell .account-card--danger {
  background: color-mix(in srgb, var(--danger, #C03B3B) 4%, var(--surface));
  border-color: color-mix(in srgb, var(--danger, #C03B3B) 26%, transparent);
}
.portal-shell .account-card--danger::before {
  background: var(--danger, #C03B3B);
}
.portal-shell .btn-danger,
.portal-shell .account-revert-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  background: var(--danger, #C03B3B);
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--danger, #C03B3B) 80%, #000);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--danger, #C03B3B) 30%, transparent);
  transition: background 120ms ease, transform 100ms ease, box-shadow 120ms ease;
}
.portal-shell .btn-danger:hover,
.portal-shell .account-revert-btn:hover {
  background: color-mix(in srgb, var(--danger, #C03B3B) 88%, #000);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--danger, #C03B3B) 30%, transparent);
}
.portal-shell .btn-danger:active,
.portal-shell .account-revert-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--danger, #C03B3B) 30%, transparent);
}


/* ────────────────────────────────────────────────────────────────────────
   16. Revert confirmation modal — native <dialog>
   ────────────────────────────────────────────────────────────────────────

   Replaces the browser confirm() that used to gate revert. The dialog
   is not scoped to .portal-shell because it lives at the document
   root (above the editor view) so the modal still works on browsers
   that fail to scope <dialog> inside fixed-positioning ancestors. The
   styles still respect the design tokens; just the selectors don't
   ride .portal-shell.
   ──────────────────────────────────────────────────────────────────── */

.revert-modal {
  /* Reset the user-agent dialog defaults to a clean slate so token-driven
     styling can take over. The native dialog comes with margin: auto
     (centring) and a lot of UA padding; we keep the centring and replace
     the rest. */
  border: 1px solid var(--border, #D4DDE6);
  border-radius: 18px;
  padding: 0;
  background: var(--surface, #FFFFFF);
  color: var(--text, #1C2127);
  box-shadow: 0 28px 64px rgba(11, 60, 93, 0.18), 0 10px 24px rgba(11, 60, 93, 0.10);
  max-width: 520px;
  width: calc(100% - 32px);
  font-family: var(--font-sans);
}
.revert-modal::backdrop {
  background: color-mix(in srgb, var(--deep-900, #041725) 55%, transparent);
  backdrop-filter: blur(2px);
}
.revert-modal[open] {
  animation: revertModalIn 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes revertModalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .revert-modal[open] { animation: none; }
}

.revert-modal-form {
  position: relative;
  padding: 28px 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}
.revert-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--text-muted, #657382);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.revert-modal-close:hover {
  background: color-mix(in srgb, var(--text, #1C2127) 8%, transparent);
  color: var(--text, #1C2127);
}

.revert-modal-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--danger, #C03B3B);
}
.revert-modal-eyebrow--inline {
  margin-top: 6px;
  color: var(--text-muted, #657382);
}
.revert-modal-title {
  margin: 0;
  font-family: var(--font-display, Georgia);
  font-variation-settings: 'SOFT' 50, 'opsz' 144;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--text, #1C2127);
  line-height: 1.18;
}
.revert-modal-lede {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text, #1C2127);
}
.revert-modal-lede strong { color: var(--danger, #C03B3B); }
.revert-modal-list {
  margin: 0;
  padding: 0 0 0 20px;
  list-style: disc;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text, #1C2127);
}
.revert-modal-list li { margin: 0 0 4px; }
.revert-modal-foot {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted, #657382);
  font-style: italic;
  line-height: 1.5;
}
.revert-modal-confirm {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.revert-modal-confirm-label {
  font-size: 13px;
  color: var(--text, #1C2127);
}
.revert-modal-confirm-label code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: color-mix(in srgb, var(--danger, #C03B3B) 10%, transparent);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--danger, #C03B3B);
}
.revert-modal-input {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  padding: 10px 14px;
}
.revert-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.revert-modal-actions .btn-tertiary {
  padding: 9px 14px;
  font-size: 13.5px;
}
.revert-modal-actions .btn-danger {
  padding: 10px 18px;
  font-size: 13.5px;
}
.revert-modal-actions .btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
