/* ════════════════════════════════════════════════════════════════
   NRP App — Design Tokens + Components
   NewRock Properties · v1.0 · Navy + White themes

   Stack: FastAPI + Jinja2. Drop this file in static/, link from your
   base template, and add data-theme="dark" or "light" to <html>.

     <html data-theme="dark">
       <link rel="stylesheet" href="{{ url_for('static', path='nrp-app.css') }}">
       <body class="nrp-app">…</body>

   Sidebar always uses the navy palette regardless of [data-theme].
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;1,400&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Inter+Tight:wght@400;500;600&display=swap');

/* ── Sidebar (always navy) ───────────────────────────────────── */
:root {
  --nrp-side-bg:         #2f3b46;
  --nrp-side-text:       #f5f1e8;
  --nrp-side-text-dim:   rgba(245,241,232,0.60);
  --nrp-side-text-mut:   rgba(245,241,232,0.45);
  --nrp-side-active-bg:  rgba(196,106,45,0.14);
  --nrp-side-active-rl:  #c46a2d;
  --nrp-side-divider:    rgba(245,241,232,0.08);
  --nrp-side-badge:      #c46a2d;
  --nrp-side-logo-ora:   #e08a4a;

  /* Brand-fixed (theme-independent) */
  --nrp-orange:          #c46a2d;
  --nrp-orange-soft:     #e08a4a;
  --nrp-orange-deep:     #a24e1a;

  /* Typography */
  --nrp-font-display:    'Plus Jakarta Sans', 'Inter Tight', system-ui, sans-serif;
  --nrp-font-logo:       'Newsreader', ui-serif, Georgia, serif;   /* wordmark only — exempt from the display swap */
  --nrp-font-body:       'Inter Tight', system-ui, -apple-system, sans-serif;
  --nrp-font-mono:       ui-monospace, 'SF Mono', Menlo, monospace;

  /* Sizes */
  --nrp-fs-page-title:   28px;
  --nrp-fs-section:      17px;
  --nrp-fs-body:         13px;
  --nrp-fs-body-sm:      12px;
  --nrp-fs-caption:      11.5px;
  --nrp-fs-eyebrow:      10px;

  /* Spacing */
  --nrp-s-1:  4px;  --nrp-s-2:  8px;  --nrp-s-3:  12px;
  --nrp-s-4:  16px; --nrp-s-5:  20px; --nrp-s-6:  24px;
  --nrp-s-7:  28px; --nrp-s-8:  32px;

  /* Radii */
  --nrp-r-sm: 4px;  --nrp-r-md: 6px;  --nrp-r-pill: 16px;

  /* Motion */
  --nrp-ease:    cubic-bezier(0.2, 0, 0.1, 1);
  --nrp-dur-fast: 120ms;
  --nrp-dur:      240ms;
}

/* ── Dark (navy) theme — DEFAULT ─────────────────────────────── */
:root,
[data-theme="dark"] {
  --nrp-bg:              #1a2028;
  --nrp-card:            #242d37;
  --nrp-card-raised:     #2c3641;
  --nrp-card-border:     #333e4a;
  --nrp-input-bg:        #1a2028;
  --nrp-input-border:    #3a4552;
  --nrp-row-border:      rgba(245,241,232,0.06);
  --nrp-row-hover:       rgba(245,241,232,0.04);
  --nrp-strip-bg:        rgba(245,241,232,0.025);

  --nrp-text:            #f5f1e8;
  --nrp-text-mid:        #a8b0b8;
  --nrp-text-dim:        #6b7680;
  --nrp-text-muted:      rgba(245,241,232,0.45);
  /* Faint placeholder — clearly a hint, not entered text. */
  --nrp-placeholder:     #4f5862;

  --nrp-orange-tint:        rgba(170,154,136,0.16);   /* warm-stone wash (was peach rgba(196,106,45,0.14)) */
  --nrp-orange-tint-strong: rgba(170,154,136,0.24);   /* warm-stone wash (was peach rgba(196,106,45,0.22)) */

  /* ──────────────────────────────────────────────────────────────────
     STATUS-COLOR RULE — read this before reaching for a tint.

       --nrp-orange*  in-progress / awaiting tenant action / pending
                      move-in. The "we're working on it" family.
                      Examples: WAITING FOR INFO hero pill, move-in
                      requirements band, addendum partially-signed.

       --nrp-warn*    needs landlord attention but NOT an error.
                      Examples: insurance expiring soon, optional info
                      missing, pet addendum sent and stalling.

       --nrp-info*    neutral state changes / read-only callouts.
                      Examples: "Bundled with addendum" badges, generic
                      help banners.

       --nrp-danger*  TRUE ERRORS ONLY. Don't reach for danger to
                      signal "important to do." That's --nrp-orange.
                      Examples: overdue rent, failed payment, expired
                      insurance, declined signature, hard validation
                      failures.

     If you find yourself painting a draft / waiting / pending / "needs
     this before move-in" surface in the danger family, you are
     describing a workflow state, not an error — use --nrp-orange.
     ────────────────────────────────────────────────────────────────── */

  --nrp-success:         #7db58a;
  --nrp-success-tint:    rgba(76,136,88,0.18);
  --nrp-info:            #8eb0d6;
  --nrp-info-tint:       rgba(75,110,150,0.20);
  --nrp-warn:            #d9a84e;
  --nrp-warn-tint:       rgba(217,168,78,0.18);
  --nrp-danger:          #cb5742;   /* brick red — dark-theme sibling, lifted for contrast on navy (was coral #d97560) */
  --nrp-danger-tint:     rgba(203,87,66,0.18);
  /* Subtle danger row wash — sits on top of --nrp-bg (dark navy) at low
     alpha so the row reads as warm-tinted, not "on fire." Hover bumps to
     the stronger value. Used by .nrp-row--danger; kept in the danger
     family so future urgency states (other than INCOMPLETE) can opt in. */
  --nrp-danger-bg-subtle:       rgba(203,87,66,0.08);
  --nrp-danger-bg-subtle-hover: rgba(203,87,66,0.14);

  --nrp-btn-primary-bg:  #f5f1e8;
  --nrp-btn-primary-fg:  #2f3b46;
  --nrp-btn-navy-bg:     #2f3b46;
  --nrp-btn-navy-fg:     #f5f1e8;
  --nrp-btn-success-bg:  #4c8858;
  --nrp-btn-danger-bg:   #cb5742;   /* collapsed: button fill == --nrp-danger (was a separate salmon #a6443a) */
}

/* ── Light (white) theme ─────────────────────────────────────── */
[data-theme="light"] {
  --nrp-bg:              #FFFFFF;       /* all-white page bg (was #F5F2EC cream) */
  --nrp-card:            #FFFFFF;
  --nrp-card-raised:     #F5F6F8;       /* cool grey (was #F0EBE0 cream) */
  --nrp-card-border:     #E4E6EA;       /* cards separate via border, Buildium-style (was #E5E0D6) */
  --nrp-input-bg:        #FFFFFF;
  --nrp-input-border:    #D7DAE0;       /* was #D9D3C5 */
  --nrp-row-border:      #EDEEF1;       /* was #ECE7DB */
  --nrp-row-hover:       #F7F8FA;       /* was #F5F1E8 */
  --nrp-strip-bg:        #F7F8FA;       /* was #F0EBE0 */

  --nrp-text:            #1E222A;       /* cool near-black (was #1A1814 warm) */
  --nrp-text-mid:        #565C66;       /* was #5A5448 */
  --nrp-text-dim:        #8A909B;       /* was #8A8273 */
  --nrp-text-muted:      rgba(30,34,42,0.55);
  /* Faint placeholder — much lighter than --nrp-text-dim so sample hints
     (e.g. "Jane Doe", "T1A 0A1") read as guidance, not filled-in values. */
  --nrp-placeholder:     #C2BCB0;

  /* Brand-fixed orange shifts slightly darker on cream for AA contrast */
  --nrp-orange:             #C8642E;
  --nrp-orange-soft:        #B8551E;
  --nrp-orange-deep:        #8E3F12;
  --nrp-orange-tint:        rgba(126,108,92,0.16);    /* warm-stone wash (was peach rgba(200,100,46,0.10)) */
  --nrp-orange-tint-strong: rgba(126,108,92,0.24);    /* warm-stone wash (was peach rgba(200,100,46,0.18)) */

  --nrp-success:         #2F6B3E;
  --nrp-success-tint:    rgba(47,107,62,0.12);
  --nrp-info:            #2B5878;
  --nrp-info-tint:       rgba(43,88,120,0.12);
  --nrp-warn:            #A66A0E;
  --nrp-warn-tint:       rgba(166,106,14,0.12);
  --nrp-danger:          #A02B1C;   /* brick red (was #A8321F) */
  --nrp-danger-tint:     rgba(160,43,28,0.12);
  /* Light-theme danger wash — derived from the cream surface, so the
     same row class reads as a warm pink-cream tint here instead of the
     dark-theme reddish-navy. */
  --nrp-danger-bg-subtle:       rgba(160,43,28,0.07);
  --nrp-danger-bg-subtle-hover: rgba(160,43,28,0.13);

  --nrp-btn-primary-bg:  #1F1B14;       /* near-black filled button */
  --nrp-btn-primary-fg:  #F5F2EC;
  --nrp-btn-navy-bg:     #2B3950;
  --nrp-btn-navy-fg:     #F5F2EC;
  --nrp-btn-success-bg:  #2F6B3E;
  --nrp-btn-danger-bg:   #A02B1C;   /* brick red — matches --nrp-danger */

  /* Modal scrim — warm dark on cream, lighter than the dark-mode scrim */
  --nrp-modal-scrim:     rgba(26,24,20,0.45);
}

/* Dark-theme scrim default (defined under :root so default = dark scrim) */
:root,
[data-theme="dark"] {
  --nrp-modal-scrim:     rgba(0,0,0,0.55);
}

/* ════════════════════════════════════════════════════════════════
   Legacy variable aliases — many older templates reference these
   pre-rebrand tokens (--color-primary, --text-muted, --bg-card,
   --border-light, etc.). Aliasing them onto NRP tokens lets every
   legacy template inherit the design-system palette without per-file
   rewrites. All new code must use the --nrp-* tokens directly.

   The selector list includes :root.dark-mode (the legacy theme class
   set by base.html's bootstrap script) so the alias overrides the
   inline blue palette in base.html with higher specificity.
   ════════════════════════════════════════════════════════════════ */
:root,
:root.dark-mode,
:root.light-mode,
[data-theme="dark"],
[data-theme="light"] {
  /* Surfaces */
  --bg-card:           var(--nrp-card);
  --bg-card-raised:    var(--nrp-card-raised);
  --bg-table-alt:      var(--nrp-strip-bg);
  --bg-strip:          var(--nrp-strip-bg);
  --bg-input:          var(--nrp-input-bg);

  /* Text */
  --text-primary:      var(--nrp-text);
  --text-default:      var(--nrp-text);
  --text-secondary:    var(--nrp-text-mid);
  --text-muted:        var(--nrp-text-mid);
  --text-very-muted:   var(--nrp-text-dim);
  --text-dim:          var(--nrp-text-dim);

  /* Borders */
  --border-light:      var(--nrp-row-border);
  --border-muted:      var(--nrp-row-border);
  --border-input:      var(--nrp-input-border);
  --border-card:       var(--nrp-card-border);

  /* Accent / semantic */
  --color-primary:     var(--nrp-orange);
  --color-primary-soft:var(--nrp-orange-soft);
  --color-primary-bg:  var(--nrp-orange-tint);
  --color-accent:      var(--nrp-orange);
  --color-success:     var(--nrp-success);
  --color-warn:        var(--nrp-warn);
  --color-warning:     var(--nrp-warn);
  --color-danger:      var(--nrp-danger);
  --color-info:        var(--nrp-info);
}

/* ════════════════════════════════════════════════════════════════
   Reset + base
   ════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

/* Native <dialog> needs margin:auto on the dialog (and on its UA-managed
   ::backdrop) to center when .showModal() is called. base.html's global
   `* { margin: 0 }` reset zeroes that out, which snaps every modal dialog
   to the top-left of the viewport. Restore the centering for any dialog
   element — selector specificity (0,0,0,1) beats * (0,0,0,0). */
dialog { margin: auto; }

html, body { height: 100%; }

body.nrp-app {
  margin: 0;
  background: var(--nrp-bg);
  color: var(--nrp-text);
  font-family: var(--nrp-font-body);
  font-size: var(--nrp-fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--nrp-orange); text-decoration: none; }
a:hover { color: var(--nrp-orange-soft); }

/* ── Inline link (orange + underlined). Use anywhere a click target is
   text-only and needs to read as a link, not floating raw text. ── */
.nrp-link {
  color: var(--nrp-orange);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  background: transparent; border: 0;
  font-family: inherit; font-size: inherit;
  padding: 0;
}
.nrp-link:hover { color: var(--nrp-orange-soft); }
.nrp-link--quiet { color: var(--nrp-text-mid); text-decoration-color: var(--nrp-text-dim); }
.nrp-link--quiet:hover { color: var(--nrp-text); text-decoration-color: var(--nrp-orange); }

::selection { background: var(--nrp-orange); color: #f5f1e8; }

.nrp-app ::-webkit-scrollbar { width: 10px; height: 10px; }
.nrp-app ::-webkit-scrollbar-track { background: var(--nrp-bg); }
.nrp-app ::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.25); border-radius: 5px;
}
.nrp-app ::-webkit-scrollbar-thumb:hover { background: rgba(128,128,128,0.4); }

/* ════════════════════════════════════════════════════════════════
   Icons (sprite glue)
   <use href="...nrp-icons.svg#i-foo"/> referenced from a host doc
   doesn't inherit any styling from the external SVG file — the
   inline preview embedded that style in the sprite's <defs>, but
   when the sprite is loaded via cross-document <use>, those styles
   are scoped out. This rule re-applies them on the host side so
   the chat / link / edit / chev-down icons actually render as
   strokes instead of black blobs.
   ════════════════════════════════════════════════════════════════ */
.nrp-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* ════════════════════════════════════════════════════════════════
   Layout shell
   ════════════════════════════════════════════════════════════════ */
.nrp-shell { display: flex; width: 100%; height: 100vh; overflow: hidden; }
.nrp-main  { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--nrp-bg); }
.nrp-content { flex: 1; overflow: auto; padding: 20px 26px; }

/* ════════════════════════════════════════════════════════════════
   Sidebar — owned by base.html, NOT styled here.
   The sidebar's classes (.sidebar, .nav-group, .nav-toggle, etc.)
   are already wired up in app/templates/base.html. The --nrp-side-*
   tokens above are exported only so other components can match
   the sidebar's color language if needed.
   ════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   Top bar
   ════════════════════════════════════════════════════════════════ */
.nrp-topbar {
  height: 52px; flex-shrink: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: var(--nrp-card);
  border-bottom: 1px solid var(--nrp-card-border);
  font-size: var(--nrp-fs-body);
  color: var(--nrp-text);
}
.nrp-topbar__crumbs { color: var(--nrp-text-dim); font-size: var(--nrp-fs-body-sm); }
.nrp-topbar__crumbs .sep { margin: 0 6px; opacity: 0.6; }
.nrp-topbar__crumbs .here { color: var(--nrp-text); font-weight: 500; }
.nrp-topbar__spacer { flex: 1; }
.nrp-topbar__user { display: flex; align-items: center; gap: 8px; }
.nrp-topbar__theme-toggle {
  background: transparent; border: 1px solid var(--nrp-card-border);
  color: var(--nrp-text-mid); cursor: pointer;
  padding: 5px 10px; border-radius: var(--nrp-r-sm);
  font-family: inherit; font-size: var(--nrp-fs-caption);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color var(--nrp-dur-fast), border-color var(--nrp-dur-fast);
}
.nrp-topbar__theme-toggle:hover {
  color: var(--nrp-text); border-color: var(--nrp-text-dim);
}

/* ════════════════════════════════════════════════════════════════
   Page header
   ════════════════════════════════════════════════════════════════ */
.nrp-page-crumbs { font-size: var(--nrp-fs-caption); color: var(--nrp-text-dim); margin-bottom: 6px; }
.nrp-page-crumbs a { color: var(--nrp-orange); cursor: pointer; }
.nrp-page-crumbs .sep { margin: 0 6px; opacity: 0.5; }
.nrp-page-crumbs .here { color: var(--nrp-text); }

.nrp-page-title {
  font-family: var(--nrp-font-display); font-weight: 600;   /* 600 — Jakarta 500 reads thin at display size */
  font-size: var(--nrp-fs-page-title); letter-spacing: -0.3px;   /* -0.3px — tight tracking fights Jakarta's geometry */
  color: var(--nrp-text); line-height: 1.05;
  font-synthesis-weight: none;
}
.nrp-page-title .accent { color: var(--nrp-orange-soft); font-style: italic; }

/* Wordmark lock — the display swap to Plus Jakarta must NOT reach the
   NewRock sidebar wordmark; it stays on Newsreader serif via --nrp-font-logo.
   App markup uses .brand-word (base.html's sidebar); .navy-side__word matches
   the design-system reference markup. */
.nrp-app .navy-side__word,
.nrp-app .brand-word { font-family: var(--nrp-font-logo); }
.nrp-page-subtitle { font-size: var(--nrp-fs-body-sm); color: var(--nrp-text-mid); margin-top: 4px; }

/* ════════════════════════════════════════════════════════════════
   Eyebrow / labels
   ════════════════════════════════════════════════════════════════ */
.nrp-eyebrow {
  font-family: var(--nrp-font-body);
  font-size: var(--nrp-fs-eyebrow); font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-dim);
}
.nrp-eyebrow--accent { color: var(--nrp-orange); }
.nrp-eyebrow--cream  { color: var(--nrp-text-muted); letter-spacing: 2px; font-weight: 500; }

/* ════════════════════════════════════════════════════════════════
   Card / panel
   ════════════════════════════════════════════════════════════════ */
.nrp-card {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  overflow: hidden;
}
.nrp-card__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--nrp-row-border);
}
.nrp-card--raised { background: var(--nrp-card-raised); }
.nrp-card__head--strip { background: var(--nrp-strip-bg); }
.nrp-card__num {
  font-family: var(--nrp-font-body); font-size: var(--nrp-fs-eyebrow);
  font-weight: 600; letter-spacing: 2px; color: var(--nrp-orange);
}
.nrp-card__title {
  font-family: var(--nrp-font-display); font-weight: 500;
  font-size: var(--nrp-fs-section); letter-spacing: -0.3px;
  color: var(--nrp-text);
}
.nrp-card__head .spacer { flex: 1; }
.nrp-card__head .nrp-link {
  color: var(--nrp-orange); font-size: var(--nrp-fs-caption); text-decoration: underline;
}
.nrp-card__body { padding: 14px 18px 18px; }
.nrp-card__body--tight { padding: 10px 18px 14px; }

/* Hero card — for the right-rail "headline" summary on detail pages
   (Application's Quick Summary, etc.). Slightly raised background +
   orange accent bar tells reviewers "this is the at-a-glance view." */
.nrp-card--hero {
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.nrp-card--hero > .nrp-card__head { border-left: 3px solid var(--nrp-orange); }

/* ════════════════════════════════════════════════════════════════
   Buttons
   ════════════════════════════════════════════════════════════════ */
.nrp-btn {
  font-family: var(--nrp-font-body); font-size: var(--nrp-fs-body);
  font-weight: 500;
  border: 1px solid transparent; border-radius: var(--nrp-r-sm);
  padding: 9px 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  line-height: 1;
  transition: background var(--nrp-dur-fast), color var(--nrp-dur-fast),
              border-color var(--nrp-dur-fast), filter var(--nrp-dur-fast);
}
.nrp-btn:focus-visible {
  outline: 2px solid var(--nrp-orange); outline-offset: 2px;
}
.nrp-btn:disabled, .nrp-btn[aria-disabled="true"] {
  opacity: 0.45; cursor: not-allowed; pointer-events: none;
}
.nrp-btn:active { transform: translateY(0.5px); }

/* Variant :hover rules pin color explicitly. When a .nrp-btn is rendered
   as an <a>, the global `a:hover { color: var(--nrp-orange-soft) }` rule
   (specificity 0,0,1,1) would otherwise outweigh the variant's resting
   color and turn the button text dark on hover — most visible on the
   accent (orange-on-orange) and navy variants. .nrp-btn--*:hover at 0,0,2,0
   beats a:hover at 0,0,1,1, so re-stating the color here locks it. */
.nrp-btn--primary { background: var(--nrp-btn-primary-bg); color: var(--nrp-btn-primary-fg); }
.nrp-btn--primary:hover { filter: brightness(1.06); color: var(--nrp-btn-primary-fg); }

.nrp-btn--accent { background: var(--nrp-orange); color: #f5f1e8; }
.nrp-btn--accent:hover { filter: brightness(1.08); color: #f5f1e8; }

/* Navy CTA — pure white text. The warm cream `--nrp-btn-navy-fg` token
   reads as orange-tinted against the dark navy at small font sizes, which
   conflicts with the system's "orange = action / accent" semantics.
   `!important` to guarantee win over any descendant link-color rule. */
.nrp-btn--navy { background: var(--nrp-btn-navy-bg); color: #ffffff !important; }
.nrp-btn--navy:hover { filter: brightness(1.12); color: #ffffff !important; }

.nrp-btn--ghost {
  background: transparent; color: var(--nrp-text);
  border-color: var(--nrp-input-border);
}
.nrp-btn--ghost:hover { border-color: var(--nrp-text-mid); color: var(--nrp-text); }

.nrp-btn--quiet { background: transparent; color: var(--nrp-text-mid); }
.nrp-btn--quiet:hover { color: var(--nrp-text); background: var(--nrp-row-hover); }

/* Trash / destructive icon: neutral by default, danger on hover only —
   so the row doesn't scream "delete me" in the resting state. */
.nrp-btn--danger-on-hover:hover { color: var(--nrp-danger); }

.nrp-btn--success { background: var(--nrp-btn-success-bg); color: #f5f1e8; }
.nrp-btn--success:hover { filter: brightness(1.08); color: #f5f1e8; }

.nrp-btn--danger { background: var(--nrp-btn-danger-bg); color: #f5f1e8; }
.nrp-btn--danger:hover { filter: brightness(1.08); color: #f5f1e8; }

.nrp-btn--sm    { padding: 6px 12px; font-size: var(--nrp-fs-body-sm); }
.nrp-btn--lg    { padding: 12px 20px; font-size: 14px; }
.nrp-btn--block { width: 100%; }
.nrp-btn--icon  { padding: 7px; }

/* ════════════════════════════════════════════════════════════════
   Legacy .btn / .btn-primary / .btn-danger / .btn-sm / .btn-success
   compatibility shims — many templates still use the pre-rebrand
   class set. These rules forward the visual treatment to the new
   .nrp-btn variants so 150+ legacy buttons stop rendering as
   browser-default blue. New code must use .nrp-btn directly.
   ════════════════════════════════════════════════════════════════ */
.btn {
  font-family: var(--nrp-font-body); font-size: var(--nrp-fs-body);
  font-weight: 500;
  border: 1px solid transparent; border-radius: var(--nrp-r-sm);
  padding: 9px 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  line-height: 1;
  background: transparent; color: var(--nrp-text);
  text-decoration: none;
  transition: background var(--nrp-dur-fast), color var(--nrp-dur-fast),
              border-color var(--nrp-dur-fast), filter var(--nrp-dur-fast);
}
.btn:focus-visible { outline: 2px solid var(--nrp-orange); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45; cursor: not-allowed; pointer-events: none;
}
.btn:active { transform: translateY(0.5px); }

/* Default = ghost-ish (Cancel buttons in legacy templates) */
.btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-secondary):not(.btn-approve):not(.btn-link-danger) {
  background: transparent; color: var(--nrp-text);
  border-color: var(--nrp-input-border);
}
.btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-secondary):not(.btn-approve):not(.btn-link-danger):hover {
  border-color: var(--nrp-text-mid);
}

.btn.btn-primary, .btn-primary {
  background: var(--nrp-btn-primary-bg); color: var(--nrp-btn-primary-fg);
  border-color: transparent;
}
.btn.btn-primary:hover, .btn-primary:hover { filter: brightness(1.06); }

.btn.btn-success, .btn-approve {
  background: var(--nrp-btn-success-bg); color: #f5f1e8;
  border-color: transparent;
}
.btn.btn-success:hover, .btn-approve:hover { filter: brightness(1.08); }

.btn.btn-danger, .btn-danger {
  background: var(--nrp-btn-danger-bg); color: #f5f1e8;
  border-color: transparent;
}
.btn.btn-danger:hover, .btn-danger:hover { filter: brightness(1.08); }

/* btn-secondary = ghost/outline */
.btn.btn-secondary {
  background: transparent; color: var(--nrp-text);
  border-color: var(--nrp-input-border);
}
.btn.btn-secondary:hover { border-color: var(--nrp-text-mid); }

/* Link-style danger (text only, no fill) */
.btn-link-danger {
  background: transparent; color: var(--nrp-danger);
  border-color: transparent; padding: 4px 8px;
}
.btn-link-danger:hover { background: var(--nrp-danger-tint); }

.btn.btn-sm, .btn-sm { padding: 6px 12px; font-size: var(--nrp-fs-body-sm); }
.btn-ghost {
  background: transparent; color: var(--nrp-text);
  border-color: var(--nrp-input-border);
}
.btn-ghost:hover { border-color: var(--nrp-text-mid); }

/* ════════════════════════════════════════════════════════════════
   Inputs
   ════════════════════════════════════════════════════════════════ */
/* base.html ships a global `input:not([type=checkbox]):not([type=radio]),
   select, textarea` rule with specificity 0,0,3,1 that paints a 1.5px
   border, blue focus ring, and `margin-bottom: 0.5rem`. Canonical
   .nrp-input / .nrp-select / .nrp-textarea need `!important` on border,
   margin, and the hover/focus colors to win — otherwise selects in the
   contacts toolbar light up blue while the search wrapper lights up
   orange, breaking the "one consistent control row" look. */
/* .nrp-input is locked at a fixed height (34px) and uses line-height
   for vertical centering — no top/bottom padding. This makes mixed
   rows of plain inputs and lockup inputs the same height every time
   (box-sizing: border-box), and keeps the value text on the same
   centerline as a $ prefix or /mo suffix inside .nrp-input-lockup.
   .nrp-textarea + .nrp-select stay on the older padding-based sizing
   below (textareas wrap multi-line; selects are native widgets where
   a fixed line-height fights the platform). */
.nrp-input {
  width: 100%;
  background: var(--nrp-input-bg);
  border: 1px solid var(--nrp-input-border) !important;
  border-radius: var(--nrp-r-sm);
  color: var(--nrp-text);
  font-family: var(--nrp-font-body); font-size: var(--nrp-fs-body);
  padding: 0 10px;
  height: 34px;
  box-sizing: border-box;
  line-height: 32px;
  outline: none;
  margin: 0 !important;
  transition: border-color var(--nrp-dur-fast), box-shadow var(--nrp-dur-fast);
}
.nrp-textarea, .nrp-select {
  width: 100%;
  background: var(--nrp-input-bg);
  border: 1px solid var(--nrp-input-border) !important;
  border-radius: var(--nrp-r-sm);
  color: var(--nrp-text);
  font-family: var(--nrp-font-body); font-size: var(--nrp-fs-body);
  padding: 8px 12px; outline: none;
  margin: 0 !important;
  transition: border-color var(--nrp-dur-fast), box-shadow var(--nrp-dur-fast);
}
.nrp-input::placeholder, .nrp-textarea::placeholder { color: var(--nrp-text-dim); }
/* Public application form (.intake-shell only): render placeholder/sample
   text as a faint hint so realistic samples don't read as already-entered
   values. Scoped to the applicant wizard — CRM placeholders are unchanged. */
.intake-shell input::placeholder,
.intake-shell textarea::placeholder { color: var(--nrp-placeholder); }
.nrp-input:hover, .nrp-textarea:hover, .nrp-select:hover {
  border-color: var(--nrp-text-dim) !important;
}
.nrp-input:focus, .nrp-textarea:focus, .nrp-select:focus {
  border-color: var(--nrp-orange) !important;
  box-shadow: 0 0 0 3px var(--nrp-orange-tint) !important;
}
.nrp-input:disabled, .nrp-textarea:disabled, .nrp-select:disabled {
  opacity: 0.5; cursor: not-allowed;
}
.nrp-input--error { border-color: var(--nrp-danger); }
.nrp-input--error:focus { box-shadow: 0 0 0 3px var(--nrp-danger-tint); }
/* Styled file picker — outline trigger with selected-filename text. Hide
   the native input, render a labelled button-styled trigger plus a
   filename slot. Pair with the file-picker JS in base.html to update the
   filename text on change. */
.nrp-file {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--nrp-font-body); font-size: 13px;
}
.nrp-file__input {
  position: absolute; opacity: 0; pointer-events: none;
  width: 1px; height: 1px;
}
.nrp-file__label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--nrp-r-sm);
  background: transparent; color: var(--nrp-text);
  border: 1px solid var(--nrp-input-border);
  font-weight: 500; cursor: pointer;
  transition: border-color var(--nrp-dur-fast);
}
.nrp-file__label:hover { border-color: var(--nrp-text-mid); }
.nrp-file__input:focus-visible + .nrp-file__label {
  outline: 2px solid var(--nrp-orange); outline-offset: 2px;
}
.nrp-file__name {
  color: var(--nrp-text-mid); font-size: 12.5px;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nrp-file__name:empty::before {
  content: 'No file chosen';
  color: var(--nrp-text-dim); font-style: italic;
}

/* Inline info / warn callout — token-based replacement for ad-hoc amber
   info banners. Used below cards / panels when a small explanatory note
   should sit visually distinct from body text but not as a card. */
.nrp-callout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--nrp-r-md);
  border: 1px solid var(--nrp-card-border);
  background: var(--nrp-strip-bg);
  font-size: 12.5px;
  color: var(--nrp-text-mid);
  line-height: 1.5;
}
.nrp-callout--info { color: var(--nrp-text-mid); }
.nrp-callout .nrp-icon { color: var(--nrp-orange); }

/* Numeric inline-input width modifiers — used wherever a count / duration /
   threshold sits next to a unit + helper on the same flex line. !important
   is required to beat base.html's global
   `input:not([type=checkbox]):not([type=radio]) { width: 100% }` rule,
   which has higher specificity than any reasonable class selector. flex:
   0 0 auto prevents flex parents from stretching the field. */
.nrp-input--num-sm { width: 80px !important; flex: 0 0 auto; text-align: center; }
.nrp-input--num-md { width: 120px !important; flex: 0 0 auto; text-align: center; }

/* Inline-form utility — one horizontal flex line for label + input + unit +
   helper. Use under an eyebrow group header (e.g. TIMING, ESCALATION) when
   the controls should sit on a single line, not stack. */
.nrp-form-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.nrp-form-inline__label { font-size: 13px; color: var(--nrp-text); }
.nrp-form-inline__unit  { font-size: 13px; color: var(--nrp-text); }
.nrp-form-inline__help  { font-size: 11.5px; color: var(--nrp-text-dim); }

.nrp-textarea { resize: vertical; min-height: 56px; }

.nrp-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--nrp-input-bg);
  border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-sm);
  padding: 0 12px;
  /* Match the rendered height of the .nrp-select / .nrp-input siblings
     in the toolbar so the controls read as one row of equal-sized
     boxes. Canonical .nrp-input / .nrp-select use 8px vertical padding
     + 1px border = 34px content + 2px border ≈ 36px; pin .nrp-search
     to the same. */
  height: 36px;
  box-sizing: border-box;
  color: var(--nrp-text-dim);
  font-size: var(--nrp-fs-body);
  transition: border-color var(--nrp-dur-fast), box-shadow var(--nrp-dur-fast);
}
.nrp-search:hover { border-color: var(--nrp-text-dim); }
.nrp-search:focus-within {
  border-color: var(--nrp-orange);
  box-shadow: 0 0 0 3px var(--nrp-orange-tint);
}
/* The leading magnifier icon. flex: 0 0 auto so the wrapper's flex:1
   input doesn't squish it; color via currentColor inherits from the
   wrapper's --nrp-text-dim. */
.nrp-search > .nrp-icon { flex: 0 0 auto; color: var(--nrp-text-dim); }
/* base.html's global `input:not(...)` rule (specificity 0,0,3,1)
   imposes 1.5px border, padding, and margin-bottom: 0.5rem on every
   bare <input>. The wrapper already supplies the chrome, so strip the
   inner input back to bare text — !important on every reset is
   required because the global selector outranks `.nrp-search input`
   (0,0,1,1) on every property. The lingering `margin-bottom` was
   pushing the input box below the icon's vertical center; zeroing it
   restores baseline alignment. */
.nrp-search input {
  background: transparent !important;
  border: 0 !important;
  outline: 0;
  padding: 0 !important;
  margin: 0 !important;
  width: auto;
  height: 100%;
  line-height: 1;
  color: var(--nrp-text); flex: 1;
  font-family: inherit; font-size: inherit;
}
.nrp-search input::placeholder { color: var(--nrp-text-dim); }

.nrp-label {
  display: block;
  font-family: var(--nrp-font-body);
  font-size: var(--nrp-fs-eyebrow); font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-dim); margin-bottom: 6px;
}
.nrp-help { font-size: var(--nrp-fs-caption); color: var(--nrp-text-dim); margin-top: 4px; }
.nrp-help--error { color: var(--nrp-danger); }

.nrp-checkbox { accent-color: var(--nrp-orange); }

/* ════════════════════════════════════════════════════════════════
   Pills / badges
   ════════════════════════════════════════════════════════════════ */
.nrp-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--nrp-font-body);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.3px; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--nrp-r-pill);
  background: rgba(128,128,128,0.18); color: var(--nrp-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.nrp-pill--orange  { background: var(--nrp-orange-tint);    color: var(--nrp-orange); }
.nrp-pill--success { background: var(--nrp-success-tint);   color: var(--nrp-success); }
.nrp-pill--info    { background: var(--nrp-info-tint);      color: var(--nrp-info); }
.nrp-pill--warn    { background: var(--nrp-warn-tint);      color: var(--nrp-warn); }
/* Layered on top of nrp-pill--warn for "Opened" — same family,
   deeper saturation so a row of warn pills isn't five identical blobs. */
.nrp-pill--warn.nrp-pill--opened { background: var(--nrp-warn); color: #fff; }
/* Danger is the canonical "needs urgent attention" pill — used for
   INCOMPLETE rows, declined signatures, missing-consent flags. Filled
   red + white reads as a stop-sign at list density; the older red-on-
   tint variant lost in the visual hierarchy next to other warm pills
   (warn, orange) on cream. */
.nrp-pill--danger  { background: var(--nrp-danger);          color: #fff; }
/* Solid-fill danger reserved for high-priority lifecycle states
   (Waiting for info, Past due, blocking-move-in flags). Rendered
   identically to .nrp-pill--danger today — the historical tinted
   variant was retired above — but kept under a distinct name so
   call sites read intent ("this state blocks workflow", not just
   "this is bad") and so the two can diverge later without churn. */
.nrp-pill--danger-solid { background: var(--nrp-danger);     color: #fff; }
.nrp-pill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nrp-pill--danger-solid .nrp-pill__dot { background: #fff; }

.nrp-badge {
  background: var(--nrp-orange); color: #f5f1e8;
  font-size: 9px; font-weight: 600;
  padding: 2px 6px; border-radius: 10px;
  min-width: 16px; text-align: center; line-height: 1;
}

/* ════════════════════════════════════════════════════════════════
   Tabs
   ════════════════════════════════════════════════════════════════ */
.nrp-tabs {
  display: flex; gap: 26px;
  border-bottom: 1px solid var(--nrp-row-border);
  font-size: var(--nrp-fs-body);
}
.nrp-tabs__tab {
  background: transparent; border: 0;
  padding: 12px 0 14px;
  color: var(--nrp-text-mid); font-weight: 400;
  font-family: inherit; font-size: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex; align-items: center; gap: 7px;
  cursor: pointer;
  transition: color var(--nrp-dur-fast);
}
.nrp-tabs__tab:hover { color: var(--nrp-text); }
.nrp-tabs__tab:focus-visible { outline: 2px solid var(--nrp-orange); outline-offset: 2px; }
.nrp-tabs__tab.is-active {
  color: var(--nrp-text); font-weight: 500;
  border-bottom-color: var(--nrp-orange);
}
.nrp-tabs__count {
  background: var(--nrp-card-raised); color: var(--nrp-text-mid);
  font-size: 10px; font-weight: 600;
  padding: 1px 7px; border-radius: 10px;
  min-width: 18px; text-align: center;
}
/* Tab count variants — mirror the .nrp-pill--* tinted-bg/colored-fg pattern
   so a tab's count reads as a small color legend for the row pills below.
   Used by surfaces like the contacts list where the dominant row variant
   for a tab is known at render time. */
.nrp-tabs__count--info    { background: var(--nrp-info-tint);    color: var(--nrp-info); }
.nrp-tabs__count--warn    { background: var(--nrp-warn-tint);    color: var(--nrp-warn); }
.nrp-tabs__count--orange  { background: var(--nrp-orange-tint);  color: var(--nrp-orange); }
.nrp-tabs__count--success { background: var(--nrp-success-tint); color: var(--nrp-success); }
.nrp-tabs__count--danger  { background: var(--nrp-danger-tint);  color: var(--nrp-danger); }
/* Active tab always uses the brand-orange filled pill regardless of variant
   so the active state is unambiguous. */
.nrp-tabs__tab.is-active .nrp-tabs__count { background: var(--nrp-orange); color: #f5f1e8; }

/* Disabled tab — feature is gated off (e.g. Storage when project doesn't
   offer it). Visible so the layout is stable, but inert: no hover
   emphasis, no pointer cursor, dimmed colour. */
.nrp-tabs__tab.is-disabled,
.nrp-tabs__tab:disabled {
  color: var(--nrp-text-dim);
  cursor: not-allowed;
}
.nrp-tabs__tab.is-disabled:hover,
.nrp-tabs__tab:disabled:hover { color: var(--nrp-text-dim); }
.nrp-tabs__tab.is-disabled .nrp-tabs__count,
.nrp-tabs__tab:disabled .nrp-tabs__count { opacity: 0.55; }

.nrp-pilltabs { display: flex; gap: 8px; flex-wrap: wrap; }
.nrp-pilltab {
  padding: 6px 14px;
  font-size: var(--nrp-fs-body-sm); font-weight: 500;
  background: var(--nrp-card-raised);
  color: var(--nrp-text-mid);
  border-radius: var(--nrp-r-pill);
  border: 0; cursor: pointer; font-family: inherit;
  transition: background var(--nrp-dur-fast), color var(--nrp-dur-fast);
}
.nrp-pilltab:hover { color: var(--nrp-text); }
.nrp-pilltab.is-active { background: var(--nrp-text); color: var(--nrp-card); }

/* ════════════════════════════════════════════════════════════════
   Tables
   ════════════════════════════════════════════════════════════════ */
.nrp-table {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  overflow: hidden;
  font-size: var(--nrp-fs-body);
}
.nrp-table__row {
  display: grid; gap: 12px;
  padding: 14px 18px;
  align-items: center;
  border-bottom: 1px solid var(--nrp-row-border);
}
.nrp-table__row:last-child { border-bottom: 0; }
.nrp-table__row--head {
  font-size: 10.5px; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--nrp-text-dim); font-weight: 600;
  padding: 14px 18px;
}
.nrp-table__row--body {
  padding: 16px 18px;
  transition: background var(--nrp-dur-fast);
}
.nrp-table__row--body:hover { background: var(--nrp-row-hover); }

/* Generic "this row is in a danger / urgent state" treatment. Combines
   a 3px danger left rule (scannable across the table) with a subtle
   danger-tinted background (per-row warning at body-text scale). Used
   today for INCOMPLETE showing rows; any future status that maps to
   "urgent / needs attention" can opt in by adding this class.

   box-shadow inset is layered: the 3px stripe + an "inner" colorant
   that fakes a tinted background through the shadow stack. The actual
   `background` property is set so hover transitions feel correct and
   so explicit row backgrounds (e.g. is-needs-review) layer cleanly.
   The :hover rule is more specific than the .nrp-table__row--body:hover
   default (chained class) so the danger row stays in the danger family
   on hover instead of falling back to --nrp-row-hover. */
.nrp-row--danger {
  background: var(--nrp-danger-bg-subtle);
  box-shadow: inset 3px 0 0 var(--nrp-danger);
}
.nrp-table__row--body.nrp-row--danger:hover,
tr.nrp-row--danger:hover {
  background: var(--nrp-danger-bg-subtle-hover);
}

.nrp-table__cell-primary { color: var(--nrp-text); font-weight: 500; font-size: var(--nrp-fs-body); }
.nrp-table__cell-secondary { color: var(--nrp-text-mid); font-size: var(--nrp-fs-body-sm); margin-top: 2px; }
.nrp-table__cell-muted { color: var(--nrp-text-dim); font-size: var(--nrp-fs-caption); }
.nrp-result-line { color: var(--nrp-text-dim); font-size: var(--nrp-fs-caption); padding: 14px 6px; }

/* ════════════════════════════════════════════════════════════════
   Field row
   ════════════════════════════════════════════════════════════════ */
.nrp-field { display: flex; padding: 7px 0; font-size: var(--nrp-fs-body-sm); align-items: baseline; }
.nrp-field__label { width: 150px; color: var(--nrp-text-dim); font-size: var(--nrp-fs-caption); flex-shrink: 0; }
.nrp-field__value { color: var(--nrp-text); flex: 1; }
.nrp-field__value--accent { color: var(--nrp-orange); font-weight: 500; }

/* ════════════════════════════════════════════════════════════════
   Avatar — initials in a tinted disc, with optional status ring.

   .nrp-avatar-stack lays multiple avatars in a slight overlap (negative
   left margin on every avatar after the first). The 2px border matches
   the surrounding card bg so the overlap reads as separated discs
   rather than smudged together.

   Status rings (signed / pending / declined) layer a colored 2px ring
   around the disc using box-shadow so they don't disturb layout.
   ════════════════════════════════════════════════════════════════ */
.nrp-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--nrp-orange-tint); color: var(--nrp-text);
  font-size: 11px; font-weight: 600; letter-spacing: 0.4px;
  border-radius: 50%;
  width: 28px; height: 28px;
  flex-shrink: 0;
  border: 2px solid var(--nrp-card);
  position: relative;
}
.nrp-avatar--sm { width: 24px; height: 24px; font-size: 9px; }
.nrp-avatar--md { width: 32px; height: 32px; font-size: 11px; font-weight: 500; border-width: 0; }
.nrp-avatar--lg { width: 36px; height: 36px; font-size: 13px; }

/* ── Party chip — name + role + status with colored left-border accent.
   Use in a strip when 1–3 parties are present; collapse to +N pill at
   4+ parties so the row stays one line tall. ── */
.nrp-party-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 18px;
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-card-border);
  border-left: 3px solid transparent;
  max-width: 100%;
}
.nrp-party-chip[data-status="signed"]   { border-left-color: var(--nrp-success); }
.nrp-party-chip[data-status="pending"]  { border-left-color: var(--nrp-warn); }
.nrp-party-chip[data-status="declined"] { border-left-color: var(--nrp-danger); }

/* Active state — used when the chip doubles as a tab (e.g. Application
   detail co-applicant strip) and one chip's body content is currently shown
   below. Stronger border + raised background reads as the selected tab. */
.nrp-party-chip--active {
  border-color: var(--nrp-text-mid);
  background: var(--nrp-card-raised);
}
button.nrp-party-chip {
  cursor: pointer; font-family: inherit; outline: none;
  text-align: left;
}
button.nrp-party-chip:hover { border-color: var(--nrp-text-dim); }
button.nrp-party-chip:focus-visible { box-shadow: 0 0 0 3px var(--nrp-orange-tint); }
.nrp-party-chip.is-cancelled { opacity: 0.55; }
.nrp-party-chip__body { min-width: 0; }
.nrp-party-chip__name {
  font-size: var(--nrp-fs-body-sm); font-weight: 500;
  color: var(--nrp-text); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nrp-party-chip__meta {
  font-size: var(--nrp-fs-eyebrow); color: var(--nrp-text-dim);
  line-height: 1.2; margin-top: 2px;
  white-space: nowrap;
}
.nrp-party-chip--more {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  border-radius: 18px;
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-card-border);
  font-size: var(--nrp-fs-body-sm); font-weight: 500;
  color: var(--nrp-text-mid);
}

/* Status dot — bottom-right corner indicator. Drawn with ::after so the
   avatar's layout box is unaffected and the disc stays a clean circle in
   the stack (no halo crossing into the next avatar like a Venn diagram).
   The 2px border in card-bg color cuts the dot cleanly out of the avatar. */
.nrp-avatar[data-status]::after {
  content: '';
  position: absolute;
  right: -1px; bottom: -1px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid var(--nrp-card);
}
.nrp-avatar[data-status="signed"]::after   { background: var(--nrp-success); }
.nrp-avatar[data-status="pending"]::after  { background: var(--nrp-warn); }
.nrp-avatar[data-status="declined"]::after { background: var(--nrp-danger); }

.nrp-avatar-stack { display: inline-flex; align-items: center; }
.nrp-avatar-stack > .nrp-avatar + .nrp-avatar { margin-left: -10px; }
.nrp-avatar-stack > .nrp-avatar { transition: transform var(--nrp-dur-fast); }
.nrp-avatar-stack:hover > .nrp-avatar { transform: translateY(-1px); }

/* ── Multi-party signing summary ──
   Compact "1 of 2 signed · Send reminder" treatment. Pair with
   .nrp-avatar-stack and a <details> popover for per-signer detail. */
.nrp-lease-parties {
  display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.nrp-lease-parties__count {
  font-size: var(--nrp-fs-body-sm); color: var(--nrp-text-mid);
}
.nrp-lease-parties__count strong {
  color: var(--nrp-text); font-weight: 500;
}
.nrp-lease-parties__sep { color: var(--nrp-text-dim); margin: 0 6px; }

/* <details> popover for the full per-applicant breakdown. */
.nrp-parties-details {
  display: inline-block; position: relative;
}
.nrp-parties-details > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--nrp-orange);
  text-decoration: underline; text-underline-offset: 2px;
  font-size: var(--nrp-fs-body-sm);
}
.nrp-parties-details > summary::-webkit-details-marker { display: none; }
.nrp-parties-details > summary::marker { display: none; content: ''; }
.nrp-parties-details > summary:hover { color: var(--nrp-orange-soft); }
.nrp-parties-list {
  position: absolute; z-index: 60;
  /* Anchor above + right so the popover stays inside the card. The
     surrounding .nrp-card uses overflow:hidden (rounded corners), which
     would clip a downward popover spilling past the footer row. */
  bottom: calc(100% + 6px); top: auto;
  right: 0; left: auto;
  min-width: 320px; max-width: 480px;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.15);
  padding: 8px;
}
.nrp-party-row__name { flex-wrap: wrap; }
.nrp-party-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; min-width: 0;
  border-radius: var(--nrp-r-sm);
}
.nrp-party-row + .nrp-party-row { border-top: 1px solid var(--nrp-row-border); }
.nrp-party-row__body { flex: 1; min-width: 0; }
.nrp-party-row__name {
  font-size: var(--nrp-fs-body-sm); font-weight: 500;
  color: var(--nrp-text);
  display: inline-flex; align-items: center; gap: 6px;
}
.nrp-party-row__sub {
  font-size: var(--nrp-fs-caption); color: var(--nrp-text-dim);
  margin-top: 2px;
}
.nrp-party-row__status { margin-left: auto; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════
   Empty state, coming soon, skeleton
   ════════════════════════════════════════════════════════════════ */
.nrp-empty {
  text-align: center; padding: 48px 24px;
  color: var(--nrp-text-dim); font-size: var(--nrp-fs-body); font-style: italic;
}
.nrp-coming-soon {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 24px;
  background: var(--nrp-strip-bg);
  border-top: 1px solid var(--nrp-row-border);
}
.nrp-coming-soon__badge {
  font-size: var(--nrp-fs-eyebrow); font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-orange);
  padding: 4px 10px;
  background: var(--nrp-orange-tint);
  border-radius: var(--nrp-r-sm);
}
.nrp-coming-soon__title {
  font-family: var(--nrp-font-display); font-size: 16px; color: var(--nrp-text);
  letter-spacing: -0.2px;
}
.nrp-coming-soon__desc { font-size: var(--nrp-fs-body-sm); color: var(--nrp-text-mid); }

.nrp-skeleton {
  background: linear-gradient(90deg,
    var(--nrp-card-raised) 0%,
    var(--nrp-card-border) 50%,
    var(--nrp-card-raised) 100%);
  background-size: 200% 100%;
  animation: nrp-skeleton 1.4s linear infinite;
  border-radius: var(--nrp-r-sm); height: 12px;
}
@keyframes nrp-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ════════════════════════════════════════════════════════════════
   Toast
   ════════════════════════════════════════════════════════════════ */
.nrp-toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-left: 3px solid var(--nrp-orange);
  border-radius: var(--nrp-r-sm);
  padding: 12px 16px;
  color: var(--nrp-text); font-size: var(--nrp-fs-body);
  max-width: 340px;
}
.nrp-toast--success { border-left-color: var(--nrp-success); }
.nrp-toast--danger  { border-left-color: var(--nrp-danger); }
.nrp-toast--warn    { border-left-color: var(--nrp-warn); }

/* ════════════════════════════════════════════════════════════════
   Modal
   ════════════════════════════════════════════════════════════════ */
.nrp-modal-backdrop {
  position: fixed; inset: 0;
  background: var(--nrp-modal-scrim);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  /* Padding so the modal never touches viewport edges; overflow-y is a
     safety-net for the edge case where a modal's intrinsic max-height
     calc still exceeds dvh on tiny viewports (won't happen in practice
     given the dvh-aware max-height below, but cheap insurance). */
  padding: 40px 20px;
  overflow-y: auto;
}
.nrp-modal {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  width: 480px; max-width: 100%; overflow: hidden;
  /* vh fallback first for old WebKit / Firefox; dvh tracks the *visible*
     viewport so iOS Safari's URL bar doesn't push the foot off-screen.
     Without max-height, tall content (credit check with many applicants,
     AI review with long feedback, send modal with full signer list)
     just expanded the modal off-screen and the foot was unreachable. */
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  display: flex; flex-direction: column;
}
.nrp-modal--wide { width: 720px; }
.nrp-modal__head { padding: 18px 22px 14px; border-bottom: 1px solid var(--nrp-row-border); }
.nrp-modal__title {
  font-family: var(--nrp-font-display); font-weight: 500;
  font-size: 20px; letter-spacing: -0.4px; color: var(--nrp-text);
}
.nrp-modal__body {
  padding: 18px 22px; color: var(--nrp-text-mid); font-size: var(--nrp-fs-body);
  /* Internal scroll. flex:1 + min-height:0 is what enables `overflow-y:auto`
     to actually clip — without it the body would refuse to shrink below
     its intrinsic content height and the foot would push past the
     viewport (same Safari/Chrome quirk patched on `.modal__body`). */
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.nrp-modal__foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--nrp-row-border);
  background: var(--nrp-strip-bg);
}
/* Some .nrp-modal users wrap part or all of their __head/__body/__foot
   in a <form> (lease send modal, etc.). Without this rule the form
   becomes the only flex child and the body's flex+min-height chain is
   dormant. Mirrors the `.modal > form` bridge a few hundred lines down. */
.nrp-modal > form {
  display: flex; flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

/* ── Confirm dialog — narrow modal for yes/no prompts.
   Replaces the native browser confirm() which can't be styled. The
   global nrpConfirm() helper / [data-confirm] interceptor in base.html
   render it. ── */
.nrp-confirm {
  width: 420px; max-width: 92vw;
}
.nrp-confirm__body {
  padding: 18px 22px 22px;
  color: var(--nrp-text);
  font-size: var(--nrp-fs-body);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ════════════════════════════════════════════════════════════════
   Stat tile
   ════════════════════════════════════════════════════════════════ */
.nrp-stat__label {
  font-size: var(--nrp-fs-eyebrow); letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--nrp-text-dim); font-weight: 600;
}
.nrp-stat__value {
  font-family: var(--nrp-font-display); font-size: 24px; font-weight: 500;
  color: var(--nrp-text); letter-spacing: -0.3px; margin-top: 4px;
}
.nrp-stat__value--accent { color: var(--nrp-orange); }
.nrp-stat__sub { font-size: var(--nrp-fs-caption); color: var(--nrp-text-mid); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════════
   Screening Summary card
   ════════════════════════════════════════════════════════════════ */
.nrp-screening__ai {
  border: 0; cursor: pointer;
  font-family: var(--nrp-font-body);
  font-size: 11px;
}
.nrp-screening__ai strong { margin-left: 6px; }
.nrp-screening__ai-chev { width: 10px; height: 10px; margin-left: 4px; }

.nrp-screening__applicant {
  color: var(--nrp-text-mid);
  font-size: var(--nrp-fs-body-sm);
}

.nrp-screening__kpis {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.nrp-screening__kpi {
  background: var(--nrp-strip-bg);
  border-radius: var(--nrp-r-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.nrp-screening__kpi-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nrp-screening__kpi-body--full { flex: 1; }
.nrp-screening__kpi-label {
  font-size: var(--nrp-fs-eyebrow); letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--nrp-text-dim); font-weight: 600;
}
.nrp-screening__kpi-value {
  font-family: var(--nrp-font-display);
  font-size: 28px; font-weight: 500;
  color: var(--nrp-text);
  letter-spacing: -0.5px; line-height: 1.05;
}
.nrp-screening__kpi-unit {
  font-size: 14px; font-weight: 500;
  color: var(--nrp-text-mid);
  margin-left: 2px;
}
.nrp-screening__kpi-meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-top: 2px;
}
.nrp-screening__kpi-sub {
  font-size: 11px; color: var(--nrp-text-mid);
}
.nrp-screening__ring {
  transform: rotate(-90deg);
  flex-shrink: 0;
}

.nrp-screening__stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px; margin-top: 12px;
}
.nrp-screening__stat {
  background: var(--nrp-strip-bg);
  border-radius: var(--nrp-r-sm);
  padding: 14px 16px;
}
.nrp-screening__stat-value {
  font-family: var(--nrp-font-display);
  font-size: 18px; font-weight: 500;
  color: var(--nrp-text);
  letter-spacing: -0.2px; margin-top: 4px;
}
.nrp-screening__stat-value--warn { color: var(--nrp-warn); }

.nrp-screening__footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--nrp-row-border);
  font-size: var(--nrp-fs-body-sm);
}
.nrp-screening__footer-label { color: var(--nrp-text-mid); }

.nrp-screening__details { border-top: 1px solid var(--nrp-row-border); }
.nrp-screening__details > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 0;
  color: var(--nrp-text-mid);
  background: transparent;
  transition: color var(--nrp-dur-fast), background var(--nrp-dur-fast);
}
.nrp-screening__details > summary:hover {
  color: var(--nrp-text);
  background: var(--nrp-row-hover);
}
.nrp-screening__details > summary::-webkit-details-marker { display: none; }
.nrp-screening__chev {
  width: 10px; height: 10px;
  transition: transform var(--nrp-dur-fast);
}
.nrp-screening__details[open] .nrp-screening__chev { transform: rotate(180deg); }
.nrp-screening__details-body {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--nrp-row-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.nrp-screening__col-head {
  font-size: var(--nrp-fs-eyebrow); letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--nrp-text-dim); font-weight: 600;
  margin-bottom: 8px;
}
.nrp-screening__bullets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; grid-column: 1 / -1; margin-top: 4px; }
.nrp-screening__bullet-card {
  background: var(--nrp-strip-bg);
  border-radius: var(--nrp-r-sm);
  padding: 12px 14px;
}
.nrp-screening__bullet-card h4 {
  margin: 0 0 8px;
  font-size: var(--nrp-fs-body-sm);
  font-weight: 600;
  display: flex; gap: 6px;
  color: var(--nrp-text);
}
.nrp-screening__bullet-card h4 .count { color: var(--nrp-text-mid); font-weight: 400; }
.nrp-screening__bullet-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.nrp-screening__bullet-item {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: var(--nrp-fs-body-sm);
  color: var(--nrp-text);
  line-height: 1.45;
}
.nrp-screening__bullet-item .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}
.nrp-screening__bullet-item.is-positive .mark {
  background: var(--nrp-success-tint); color: var(--nrp-success);
}
.nrp-screening__bullet-item.is-warning .mark {
  background: var(--nrp-warn-tint); color: var(--nrp-warn);
}
.nrp-screening__bullet-empty {
  font-size: var(--nrp-fs-body-sm);
  color: var(--nrp-text-mid);
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════
   Row actions cluster — pattern for list/table row Actions cells.
   Primary labelled button + inline icon buttons (Chat, Copy link)
   + one overflow trigger for everything else. Defined once so every
   list adopts the same density and visibility — Chat-class actions
   stay one click away, never buried behind a 3-dot menu.
   ════════════════════════════════════════════════════════════════ */
/* Sidebar nav badge — small count pill that sits to the right of a nav label.
   Used for the To Do "due today + overdue" bubble. */
.nrp-nav-bubble {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 6px;
  font-size: 11px; font-weight: 600; line-height: 1;
  color: #fff; background: var(--nrp-orange);
  border-radius: 9px;
}

.nrp-row-actions {
  display: flex; align-items: center; gap: 8px;
  justify-content: flex-end;
}
.nrp-row-actions .nrp-btn--icon { color: var(--nrp-text-mid); }
.nrp-row-actions .nrp-btn--icon:hover {
  color: var(--nrp-text);
  background: var(--nrp-row-hover);
}
/* Primary action button in row-actions: fixed min-width so Launch /
   Review / Resume / Resend all occupy the same column and don't shift
   the row's icon cluster left or right between rows. Label centered
   inside the slot via the .nrp-btn default justify-content:center. */
.nrp-row-actions > .nrp-btn--sm:not(.nrp-btn--icon) {
  min-width: 92px;
  text-align: center;
}
/* Trailing icon cluster (chat / resend / overflow). Reserves a fixed
   slot wide enough for the max icon count so the primary button's
   left edge lines up across rows even when some icons are omitted
   (e.g. Resend hides for Submitted+ rows, overflow hides for
   Cancelled). Icons inside stay flush right; missing icons leave
   empty space on the LEFT of the slot, between primary and icons. */
.nrp-row-actions__icons {
  display: inline-flex; align-items: center; gap: 4px;
  justify-content: flex-end;
  min-width: 100px;
}

/* ════════════════════════════════════════════════════════════════
   Admin-pattern panel + mini-table (Applications list, etc.)
   Reused by any list page that needs the "title strip with inline
   filters, table, footer" layout. All rules use existing tokens —
   no new colours, fonts, or radii. Mirror of the canonical mock at
   screens/Applications.html.
   ════════════════════════════════════════════════════════════════ */
.panel {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  overflow: visible;
}
.panel__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--nrp-strip-bg);
  border-bottom: 1px solid var(--nrp-row-border);
  border-top-left-radius: var(--nrp-r-md);
  border-top-right-radius: var(--nrp-r-md);
  flex-wrap: wrap;
}
.panel__title {
  font-family: var(--nrp-font-display);
  font-size: 16px; font-weight: 500;
  color: var(--nrp-text);
  letter-spacing: -0.2px;
}
.panel__search {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--nrp-card); border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-sm);
  font-size: 12px; width: 240px;
}
.panel__search svg { width: 11px; height: 11px; color: var(--nrp-text-dim); flex-shrink: 0; }
.panel__search input {
  flex: 1; outline: none;
  font: inherit; font-size: 12px;
  color: var(--nrp-text); min-width: 0;
  /* base.html ships a global `input:not([type=checkbox]):not([type=radio])`
     rule with higher specificity than `.panel__search input`, painting a
     1.5px border + 6px radius + padded + opaque-bg inner box that nests
     inside our panel__search shell. Override with !important the same way
     .nrp-input does. */
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
}
/* Some browsers paint a clear/cancel button on type=search; strip it so
   the field stays flush. */
.panel__search input::-webkit-search-decoration,
.panel__search input::-webkit-search-cancel-button,
.panel__search input::-webkit-search-results-button,
.panel__search input::-webkit-search-results-decoration { -webkit-appearance: none; }
.panel__sep { width: 1px; height: 22px; background: var(--nrp-row-border); }
.panel__filter {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 12px;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-sm);
  font-size: 12px; cursor: pointer; font: inherit;
  color: var(--nrp-text);
}
.panel__filter:hover { border-color: var(--nrp-text-dim); }
.panel__filter .label {
  font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--nrp-text-dim); font-weight: 700;
}
.panel__filter .val { color: var(--nrp-text); font-weight: 500; }
.panel__filter svg { width: 10px; height: 10px; color: var(--nrp-text-dim); }
.panel__spacer { flex: 1; }
.panel__foot {
  padding: 10px 16px;
  border-top: 1px solid var(--nrp-card-border);
  background: var(--nrp-strip-bg);
  font-size: 11.5px; color: var(--nrp-text-mid);
  display: flex; align-items: center; gap: 10px;
  border-bottom-left-radius: var(--nrp-r-md);
  border-bottom-right-radius: var(--nrp-r-md);
}
.panel__foot__spacer { flex: 1; }
.panel__foot strong { color: var(--nrp-text); font-weight: 500; }

/* Mini-table — flat HTML table for list pages inside a .panel. */
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table thead th {
  text-align: left;
  font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--nrp-text-dim); font-weight: 700;
  padding: 11px 18px;
  background: transparent;
  border-bottom: 1px solid var(--nrp-row-border);
  white-space: nowrap;
}
.mini-table thead th.right { text-align: right; }
.mini-table tbody td {
  padding: 14px 18px;
  font-size: 13px; color: var(--nrp-text);
  border-bottom: 1px solid var(--nrp-row-border);
  vertical-align: middle;
}
.mini-table tbody tr:last-child td { border-bottom: 0; }
.mini-table tbody tr { transition: background 120ms; }
.mini-table tbody tr:hover { background: var(--nrp-row-hover); }
.mini-table td.right { text-align: right; }
.mini-table td.muted { color: var(--nrp-text-dim); }
.mini-table td.actions { white-space: nowrap; }

/* Applicant cell — 32px roster avatar (orange-tint chip) + name/email. */
.applicant-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.applicant-cell__av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--nrp-orange-tint); color: var(--nrp-orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  flex-shrink: 0;
}
.applicant-cell__body { min-width: 0; }
.applicant-cell__name {
  font-size: 13.5px; color: var(--nrp-text); font-weight: 500;
  line-height: 1.25;
}
.applicant-cell__name a { color: var(--nrp-text); text-decoration: none; }
.applicant-cell__name a:hover { color: var(--nrp-orange); }
.applicant-cell__email {
  font-size: 11.5px; color: var(--nrp-text-mid);
  margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Project cell — name + optional area/building sub. */
.project-cell { font-size: 13px; color: var(--nrp-text); font-weight: 500; }
.project-cell__sub { font-size: 11px; color: var(--nrp-text-dim); margin-top: 1px; }

/* Date cell — tabular-nums for column alignment, unset variant in dim. */
.date-cell { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--nrp-text); }
.date-cell--unset { color: var(--nrp-text-dim); }
.date-cell__add {
  color: var(--nrp-orange); text-decoration: none;
  font-size: 12.5px; margin-left: 6px;
}
.date-cell__add:hover { text-decoration: underline; }

/* Sent column — small "time ago" with channel chip. */
.sent-cell {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--nrp-text-mid);
}
.sent-cell__chan {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 4px;
  font-size: 8px; letter-spacing: 0.5px; font-weight: 700; text-transform: uppercase;
  background: var(--nrp-info-tint); color: var(--nrp-info);
}
.sent-cell--em-dash { color: var(--nrp-text-dim); font-size: 13px; padding-left: 2px; }

/* Row-actions cluster: primary CTA + icon buttons. The mini-table variant
   uses .row-actions (per mock) — separate from .nrp-row-actions which the
   grid-based nrp-table uses. Both can coexist. */
.row-actions { display: inline-flex; align-items: center; gap: 6px; }
.row-actions .icon-btn {
  width: 30px; height: 30px; border-radius: var(--nrp-r-sm);
  background: transparent; border: 1px solid transparent;
  color: var(--nrp-text-mid); cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.row-actions .icon-btn:hover {
  color: var(--nrp-orange);
  background: var(--nrp-card-raised);
  border-color: var(--nrp-card-border);
}
.row-actions .icon-btn svg { width: 14px; height: 14px; }

/* ════════════════════════════════════════════════════════════════
   Overflow menu (3-dot row actions, etc.)
   ════════════════════════════════════════════════════════════════ */
.nrp-menu-wrap { position: relative; display: inline-block; }
.nrp-menu-wrap__trigger { position: relative; }
.nrp-menu-wrap__trigger.has-unread::after {
  content: ''; position: absolute;
  top: 5px; right: 5px;
  width: 6px; height: 6px;
  background: var(--nrp-orange);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--nrp-card);
}
.nrp-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  min-width: 180px;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  padding: 4px; z-index: 50;
  display: none;
}
.nrp-menu[data-open="true"] { display: block; }
.nrp-menu form { margin: 0; display: block; }
.nrp-menu__item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px;
  background: transparent; border: 0; border-radius: var(--nrp-r-sm);
  color: var(--nrp-text);
  font-family: inherit; font-size: var(--nrp-fs-body);
  text-align: left; cursor: pointer; text-decoration: none;
  transition: background var(--nrp-dur-fast), color var(--nrp-dur-fast);
}
.nrp-menu__item:hover { background: var(--nrp-row-hover); }
.nrp-menu__item--danger { color: var(--nrp-danger); }
.nrp-menu__item--danger:hover { background: var(--nrp-danger-tint); }
.nrp-menu__sep {
  border: none; border-top: 1px solid var(--nrp-row-border);
  margin: 4px 0; height: 0; background: transparent;
}
.nrp-menu__icon { width: 14px; height: 14px; flex-shrink: 0; color: var(--nrp-text-mid); }
.nrp-menu__item--danger .nrp-menu__icon { color: currentColor; }

/* Toast — transient bottom-right notification */
.nrp-toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--nrp-card); color: var(--nrp-text);
  border: 1px solid var(--nrp-card-border);
  border-left: 3px solid var(--nrp-orange);
  border-radius: var(--nrp-r-sm);
  padding: 10px 14px;
  font-size: var(--nrp-fs-body);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--nrp-dur), transform var(--nrp-dur);
  z-index: 200;
}
.nrp-toast.is-visible { opacity: 1; transform: translateY(0); }

/* ── Edit-page primitives (per Edit Project Mock.html spec) ─────────────
   Shell, 12-col field grid, input lockup, rule cards, toggle switch,
   sticky footer, field labels/hints/errors. Designed to fit the existing
   --nrp-* token system. .nrp-toggle is a visual-only span; the form
   posts via a sibling/nested <input type=checkbox> kept in sync by JS.
   ──────────────────────────────────────────────────────────────────── */

/* Shell + body */
.nrp-edit-shell { max-width: 1100px; margin: 0 auto; padding: 8px 0 28px; }
.nrp-edit-body  { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }

/* 12-col field grid */
.nrp-field-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px 16px;
}
.nrp-field { display: flex; flex-direction: column; gap: 4px; }
.nrp-field__label {
  font-family: var(--nrp-font-body);
  font-size: 10px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-dim);
}
.nrp-field__label .req { color: var(--nrp-orange); margin-left: 2px; }
.nrp-field__hint  { font-size: 10.5px; color: var(--nrp-text-dim); margin-top: 2px; }
.nrp-field__error { font-size: 11px;   color: var(--nrp-danger);   margin-top: 4px; }

/* Span helpers for the 12-col grid */
.col-1  { grid-column: span 1; }
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* Inline-prefix lockup. Wrapper owns the chrome (border, height, focus
   ring). The inner .nrp-input loses its border + height and stretches
   to fill — line-height: 1 means the flex centering of the wrapper
   dictates vertical alignment, so the value, the $ prefix, and the
   /mo (or sqft) suffix all sit on the same centerline. Same height
   (34px, box-sizing: border-box) as a bare .nrp-input above so a row
   of mixed plain + lockup fields lines up. */
.nrp-input-lockup {
  display: flex;
  align-items: stretch;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid var(--nrp-input-border);
  border-radius: 4px;
  background: var(--nrp-input-bg);
  overflow: hidden;
}
.nrp-input-lockup:focus-within {
  outline: 2px solid var(--nrp-orange);
  outline-offset: 1px;
  border-color: var(--nrp-orange-soft);
}
.nrp-input-lockup .nrp-input {
  border: none !important;
  outline: none;
  height: 100%;
  /* Keep the bare-input line-height (32px) — <input> elements don't
     honor flex-parent centering for their own text content the way
     plain divs do, so resetting to line-height:1 leaves the value
     stuck to the top of the box. 32px (the lockup's inner height)
     puts the value on the centerline alongside the prefix/suffix. */
  line-height: 32px;
  padding: 0 10px;
  background: transparent;
  flex: 1 1 0;
  min-width: 0;
}
.nrp-input-lockup__prefix,
.nrp-input-lockup__suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11.5px;
  color: var(--nrp-text-dim);
  background: var(--nrp-strip-bg);
  border-left: 1px solid var(--nrp-input-border);
}
.nrp-input-lockup__prefix {
  border-left: none;
  border-right: 1px solid var(--nrp-input-border);
}
/* Error state — same red border the bare .nrp-input--error gets, applied
   to the wrapper since the wrapper owns the border in the lockup. */
.nrp-input-lockup.nrp-input--error { border-color: var(--nrp-danger); }
.nrp-input-lockup.nrp-input--error:focus-within {
  outline-color: var(--nrp-danger);
  border-color: var(--nrp-danger);
}

/* Rule cards — Property Settings */
.nrp-rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nrp-rule {
  display: grid; grid-template-columns: auto 1fr; gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  border-radius: 6px;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.nrp-rule:hover { border-color: var(--nrp-text-dim); }
.nrp-rule[data-on="false"] { opacity: 0.55; }
.nrp-rule__main  { display: flex; flex-direction: column; gap: 1px; }
.nrp-rule__title { font-size: 13px; font-weight: 500; color: var(--nrp-text); }
.nrp-rule__sub   { font-size: 11px; color: var(--nrp-text-mid); }
.nrp-rule__fee {
  grid-column: 2;
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px;
  width: max-content;
}
.nrp-rule[data-on="false"] .nrp-rule__fee { display: none; }
.nrp-rule__fee .nrp-input-lockup { width: 200px; }
/* In Property Settings rule cards the rule card already provides visual
   containment, so flatten the lockup: drop its outer border + bg, let the
   `$` become a plain prefix, and let the input itself carry the only
   visible border. Without this the `$ [40.00]` group looks like a nested
   bordered box inside the rule card. */
.nrp-rule__fee .nrp-input-lockup {
  border: none;
  background: transparent;
  overflow: visible;
}
.nrp-rule__fee .nrp-input-lockup:focus-within { outline: none; }
.nrp-rule__fee .nrp-input-lockup__prefix {
  border-right: none;
  background: transparent;
  padding: 0 6px 0 0;
}
.nrp-rule__fee .nrp-input-lockup .nrp-input {
  border: 1px solid var(--nrp-input-border);
  border-radius: 4px;
  background: var(--nrp-input-bg);
  padding: 7px 10px;
}
.nrp-rule__fee-suffix { font-size: 11.5px; color: var(--nrp-text-dim); }

/* Subordinate input row inside a rule (e.g. utility-fee description).
   Lives in column 2 so it aligns with the fee row above; hidden when
   the toggle is off so the row visually deflates with the rest. */
.nrp-rule__extra {
  grid-column: 2;
  margin-top: 8px;
  width: 100%;
  max-width: 360px;
}
.nrp-rule[data-on="false"] .nrp-rule__extra { display: none; }
.nrp-rule__extra .nrp-input { width: 100%; }

/* ──────────────────────────────────────────
   Property settings — tile selector + drawer (.nrp-pset-*)
   Compact 4-up tile row that replaces the 2x2 .nrp-rule-grid on the
   Edit Project page. Click a tile to focus it; the single drawer
   below re-renders to show that setting's fields. Toggle inside a
   tile flips the underlying hidden checkbox without activating the
   tile (separate intent — focusing vs enabling).
   ────────────────────────────────────────── */
.nrp-pset-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 14px;
}
.nrp-pset-tile {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 10px; align-items: center;
  padding: 12px 14px;
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
  text-align: left; color: inherit; font: inherit;
}
.nrp-pset-tile:hover { border-color: var(--nrp-text-dim); }
.nrp-pset-tile[data-on="false"] { background: var(--nrp-card); }
.nrp-pset-tile[data-on="false"] .nrp-pset-tile__title { color: var(--nrp-text-mid); }
.nrp-pset-tile.is-active {
  border-color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
}
/* Smaller toggle inside tile so the 4-up row stays one line tall. */
.nrp-pset-tile .nrp-toggle { width: 28px; height: 16px; }
.nrp-pset-tile .nrp-toggle::after { width: 12px; height: 12px; }
.nrp-pset-tile .nrp-toggle.is-on::after { transform: translateX(12px); }
.nrp-pset-tile__title { font-size: 12.5px; font-weight: 500; color: var(--nrp-text); }
.nrp-pset-tile__sub   { font-size: 11px; color: var(--nrp-text-mid); margin-top: 1px; }

.nrp-pset-drawer {
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-card-border);
  border-radius: 6px;
  padding: 16px 18px;
}
.nrp-pset-drawer__head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--nrp-row-border);
}
.nrp-pset-drawer__title { font-family: var(--nrp-font-display); font-size: 15px; font-weight: 500; color: var(--nrp-text); }
.nrp-pset-drawer__sub   { font-size: 11.5px; color: var(--nrp-text-mid); }
.nrp-pset-drawer__cascade {
  margin-left: auto;
  font-size: 11px; color: var(--nrp-orange);
  text-decoration: underline; cursor: pointer;
  background: transparent; border: 0; padding: 0; font-family: inherit;
}
.nrp-pset-drawer__cascade[hidden] { display: none; }
.nrp-pset-drawer__grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px 18px;
  align-items: start;
}
.nrp-pset-drawer__fee-row { display: flex; align-items: center; gap: 6px; }
.nrp-pset-drawer__fee-row .nrp-input-lockup { width: 130px; }
.nrp-pset-drawer__fee-suffix {
  font-size: 11.5px; color: var(--nrp-text-dim); white-space: nowrap;
}
.nrp-pset-drawer__off { color: var(--nrp-text-mid); font-size: 12.5px; padding: 4px 0; }

/* Inline cascade helper that lives WITH a specific toggle */
.nrp-rule__cascade {
  grid-column: 2;
  margin-top: 6px;
  font-size: 11px;
  color: var(--nrp-orange);
  text-decoration: underline;
  cursor: pointer;
  width: max-content;
}
.nrp-rule[data-on="false"] .nrp-rule__cascade { display: none; }

/* Toggle switch — visual-only span; pair with hidden checkbox for forms */
.nrp-toggle {
  flex-shrink: 0;
  width: 36px; height: 20px;
  border-radius: 10px;
  background: var(--nrp-input-border);
  position: relative;
  transition: background 120ms;
  cursor: pointer;
  display: inline-block;
}
.nrp-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 120ms;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.nrp-toggle.is-on { background: var(--nrp-orange); }
.nrp-toggle.is-on::after { transform: translateX(16px); }

/* Edit-page chrome — single-scroll-container model.

   The page scrolls naturally as one container (the window). Save/Cancel
   stay always-visible via the position:fixed footer rule below.

   Prior incarnation locked body scroll + made .nrp-edit-shell scroll
   internally so the footer would stay flex-pinned to the bottom of the
   viewport. That design's height chain
     body:has(.nrp-page--edit) overflow:hidden
       → .main-content height:100vh; overflow:hidden
         → .container height:100%
           → .nrp-page--edit flex column height:100%
             → .nrp-edit-shell flex:1; overflow-y:auto
   relied on every level winning specificity over earlier rules. On
   /projects/{id}/edit observed 2026-05-14, .main-content's `height:
   100vh` lost (rendered at 1561px against a 1419px viewport), leaving
   the page with TWO nested scroll containers (window 142px range +
   shell 197px range). Users hit "end of scroll" on one container while
   the other still had range — making the Hostnames section unreachable
   when Public site was also expanded.

   Single-container model removes that footgun entirely. The fixed
   footer below + the shell's padding-bottom (also below) replace the
   chrome's design intent ("footer always pinned, last fields not
   hidden under it") without the dual-scroll fragility. */
.nrp-edit-footer {
  background: var(--nrp-card);
  border-top: 1px solid var(--nrp-row-border);
}

/* Pin the edit-page footer to the viewport bottom regardless of the
   .nrp-page--edit flex chrome's working state. PR #59 tried this with
   `position: sticky`, but sticky requires the element to be INSIDE its
   scrollable ancestor — the macro renders <footer> as a SIBLING of
   .nrp-edit-shell (the overflow-y:auto element), so sticky had no
   stickable parent and silently fell back to static positioning.

   position:fixed sidesteps the DOM-relationship requirement entirely:
   the footer pins to viewport coordinates regardless of whether the
   flex chrome's height-chain (body:has → main-content height:100vh →
   container 100% → page 100%) is fully winning. On /projects/{id}/edit
   observed on 2026-05-14, main-content was 1561px instead of 1419px
   (viewport-h) — the height:100vh rule loses to an earlier-loaded rule
   we haven't pinpointed yet — so the window scrolled externally and
   the footer sat at document-bottom rather than viewport-bottom.

   The left:240px offset matches .main-content's margin-left so the
   footer doesn't overlap the left-rail sidebar. chat-only-mode hides
   the sidebar, so we reset to left:0 in that case (matches the
   existing .main-content { margin-left:0 !important } pattern). */
.nrp-page--edit .nrp-edit-footer {
  position: fixed;
  bottom: 0;
  left: 240px;
  right: 0;
  z-index: 40;
  box-shadow: 0 -4px 12px rgba(47, 59, 70, 0.04);
}
html.chat-only-mode .nrp-page--edit .nrp-edit-footer,
body.chat-only-mode .nrp-page--edit .nrp-edit-footer {
  left: 0;
}

/* Reserve space at the bottom of the scrollable shell so the last form
   fields aren't hidden behind the fixed footer. ~70px footer height +
   10px breathing room. */
.nrp-page--edit .nrp-edit-shell {
  padding-bottom: 80px;
}
.nrp-edit-footer__inner {
  max-width: 1100px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.nrp-edit-footer__meta {
  font-size: 11px; color: var(--nrp-text-mid);
  display: flex; align-items: center; gap: 10px;
}
.nrp-edit-footer__actions { display: flex; gap: 8px; }
.nrp-btn[disabled], .nrp-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* --fixed variant — pins the footer to the viewport bottom so it works
   inside layouts that don't provide the .nrp-page--edit flex chrome
   (e.g. the admin shell). Pages using this variant need their content
   wrapper to reserve bottom padding so the last fields aren't hidden
   under the bar. The matching body rule below adds 80px in that case. */
.nrp-edit-footer--fixed {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  box-shadow: 0 -4px 12px rgba(47, 59, 70, 0.04);
}
body:has(.nrp-edit-footer--fixed) { padding-bottom: 80px; }

/* Form hero — short serif title + descriptive sub used on dedicated
   create/edit pages above the first numbered section. Sized to sit
   alongside numbered .sec headers (18px) without competing. Distinct
   from unit-hero (which is a wider header strip with action chrome). */
.nrp-form-hero { margin-bottom: 18px; }
.nrp-form-hero__title {
  font-family: var(--nrp-font-display);
  font-size: 28px; font-weight: 500;
  color: var(--nrp-text);
  letter-spacing: -0.4px; line-height: 1.15;
  margin: 0;
}
.nrp-form-hero__sub {
  margin: 6px 0 0;
  font-size: 13px; color: var(--nrp-text-mid);
  max-width: 640px; line-height: 1.5;
}

/* Toggle row — full-width row holding a visual .nrp-toggle on the left
   plus a stacked title + sub. Used at the bottom of cards (Active flag,
   etc.) where a single boolean lives below a grid of regular fields.
   The outer <label> participates in click-to-toggle via the page JS that
   pairs .nrp-toggle with a hidden checkbox. */
.nrp-toggle-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--nrp-row-border);
  cursor: pointer;
}
.nrp-toggle-row__main { display: flex; flex-direction: column; gap: 2px; }
.nrp-toggle-row__title { font-size: 13.5px; font-weight: 500; color: var(--nrp-text); }
.nrp-toggle-row__sub   { font-size: 11.5px; color: var(--nrp-text-dim); }

/* Scope chips — a 3-col grid of selectable chips for picking a subset
   of related rows (e.g. projects to scope an incentive to). Each chip
   wraps a checkbox + name + monospace right-aligned code; the outer
   label flips data-on="true" to show the selected state (orange border
   + tinted bg). Token-only — borrows --nrp-orange-tint already defined
   for .nrp-pill--orange. */
.nrp-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.nrp-scope-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-sm);
  background: var(--nrp-input-bg);
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
  user-select: none;
}
.nrp-scope-chip:hover { border-color: var(--nrp-text-dim); }
.nrp-scope-chip input[type="checkbox"] { accent-color: var(--nrp-orange); margin: 0; }
.nrp-scope-chip__name { font-size: 12.5px; color: var(--nrp-text); }
.nrp-scope-chip__code {
  font-family: var(--nrp-font-mono);
  font-size: 10.5px; color: var(--nrp-text-dim);
  margin-left: auto;
}
.nrp-scope-chip[data-on="true"] {
  border-color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
}
.nrp-scope-chip[data-on="true"] .nrp-scope-chip__name { font-weight: 500; }

.nrp-scope-summary {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--nrp-strip-bg);
  border-radius: var(--nrp-r-sm);
  font-size: 11.5px; color: var(--nrp-text-mid);
  display: flex; align-items: center; gap: 8px;
}
.nrp-scope-summary strong { color: var(--nrp-text); font-weight: 500; }

@media (max-width: 720px) {
  .nrp-scope-grid { grid-template-columns: 1fr; }
}

/* Optional-field marker on a .nrp-field__label — sits beside the label
   text, calmer than the orange `.req` indicator next to required ones. */
.nrp-field__label .opt {
  color: var(--nrp-text-dim);
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: none;
  margin-left: 6px;
}

/* Key suggestion chips — a horizontal strip of dotted-name suggestions
   under the `.nrp-input` for a key field (content blocks, etc.). The
   first child uses the __hint variant as a labelled eyebrow. Token-only
   styling so the chip family can stand in for any "click to fill"
   shortcut on other admin forms. */
.nrp-key-chip-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 6px;
}
.nrp-key-chip {
  font-family: var(--nrp-font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-pill);
  background: var(--nrp-input-bg);
  color: var(--nrp-text-mid);
  cursor: pointer;
  transition: border-color 120ms, color 120ms, background 120ms;
}
.nrp-key-chip:hover {
  border-color: var(--nrp-orange);
  color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
}
.nrp-key-chip__hint {
  font-size: 10.5px;
  color: var(--nrp-text-dim);
  padding: 4px 0;
  margin-right: 4px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Editor + preview split — used inside a .nrp-card body for content
   editors that pair a textarea with a live preview pane. The right
   pane sits on --nrp-strip-bg to differentiate it from the editor.
   Collapses to a single column under 880px so the preview drops
   below the editor on narrow viewports. */
.nrp-editor-split {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 0;
}
.nrp-editor-split__editor {
  padding: 18px 20px;
  border-right: 1px solid var(--nrp-row-border);
}
.nrp-editor-split__preview {
  padding: 18px 20px;
  background: var(--nrp-strip-bg);
  border-bottom-right-radius: var(--nrp-r-md);
}

@media (max-width: 880px) {
  .nrp-editor-split { grid-template-columns: 1fr; }
  .nrp-editor-split__editor { border-right: none; border-bottom: 1px solid var(--nrp-row-border); }
  .nrp-editor-split__preview { border-bottom-right-radius: 0; }
}

/* Preview pane chrome — eyebrow with optional tab pair, white paper
   card showing the rendered output, meta line beneath. Designed to
   live inside .nrp-editor-split__preview. */
.nrp-preview-eyebrow {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
  margin-bottom: 10px;
}
.nrp-preview-eyebrow__tabs { display: flex; gap: 2px; }
.nrp-preview-tab {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: var(--nrp-r-sm);
  border: 1px solid transparent;
  color: var(--nrp-text-mid);
  cursor: pointer;
  background: transparent;
  letter-spacing: 0.4px; text-transform: uppercase; font-weight: 600;
}
.nrp-preview-tab.is-active {
  background: var(--nrp-card);
  border-color: var(--nrp-card-border);
  color: var(--nrp-text);
}

.nrp-preview-paper {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  padding: 18px 20px;
  min-height: 240px;
  overflow: auto;
}
.nrp-preview-paper__body { font-size: 13px; color: var(--nrp-text); line-height: 1.6; }
.nrp-preview-paper__body p + p { margin-top: 8px; }
.nrp-preview-paper__body strong { font-weight: 600; }
.nrp-preview-paper__body em { font-style: italic; }
.nrp-preview-paper__body h1,
.nrp-preview-paper__body h2,
.nrp-preview-paper__body h3 {
  font-family: var(--nrp-font-display);
  font-weight: 500; color: var(--nrp-text);
  letter-spacing: -0.2px;
  margin: 0 0 10px;
}
.nrp-preview-paper__body h1 { font-size: 19px; }
.nrp-preview-paper__body h2 { font-size: 17px; }
.nrp-preview-paper__body h3 { font-size: 15px; }
.nrp-preview-paper__body ul,
.nrp-preview-paper__body ol { padding-left: 22px; margin: 6px 0; }
.nrp-preview-paper__body code {
  font-family: var(--nrp-font-mono);
  font-size: 12px;
  background: var(--nrp-strip-bg);
  padding: 1px 4px;
  border-radius: var(--nrp-r-sm);
}
.nrp-preview-paper__body pre {
  font-family: var(--nrp-font-mono);
  font-size: 12px;
  background: var(--nrp-strip-bg);
  padding: 10px 12px;
  border-radius: var(--nrp-r-sm);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 6px 0;
}
.nrp-preview-paper__body a { color: var(--nrp-orange); text-decoration: underline; }
.nrp-preview-paper__empty {
  color: var(--nrp-text-dim);
  font-style: italic;
  font-size: 12.5px;
}
/* Raw view: monospace, pre-wrap, no inset chrome — copywriters need to
   see exactly what the API will return. */
.nrp-preview-paper__raw {
  font-family: var(--nrp-font-mono);
  font-size: 12px;
  color: var(--nrp-text);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  line-height: 1.5;
}

.nrp-preview-meta {
  margin-top: 12px;
  font-size: 11px;
  color: var(--nrp-text-dim);
  display: flex; gap: 12px; align-items: center;
}

/* Mono input — for keys and other identifier-style fields where users
   type dotted names. Pairs with .nrp-input (just swaps the font). */
.nrp-input--mono { font-family: var(--nrp-font-mono); }

/* Read-only key display on edit — the key is immutable post-create per
   the (key, locale) UNIQUE contract, so the edit form renders it as a
   bordered chip with a copy-to-clipboard affordance instead of an input. */
.nrp-key-readonly {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-sm);
  background: var(--nrp-strip-bg);
  font-family: var(--nrp-font-mono);
  font-size: 12.5px;
  color: var(--nrp-text);
  height: 34px; box-sizing: border-box;
  width: 100%;
}
.nrp-key-readonly__copy {
  flex-shrink: 0;
  background: transparent; border: none;
  color: var(--nrp-text-mid);
  padding: 4px;
  cursor: pointer;
  border-radius: var(--nrp-r-sm);
  display: inline-flex; align-items: center;
  margin-left: auto;
}
.nrp-key-readonly__copy:hover { color: var(--nrp-orange); background: var(--nrp-row-hover); }
.nrp-key-readonly__copy.is-copied { color: var(--nrp-success); }

/* ──────────────────────────────────────────
   Unit detail page
   Header: hero title + actions, listing-info card, tabs
   Body: two-col grid (left content + 320px sticky right rail),
         numbered .sec sections, pet/insurance rows, rail-card.
   Tokens only — no new colors / fonts.
   ────────────────────────────────────────── */
.unit-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; padding-bottom: 4px;
}
.unit-hero__title {
  font-family: var(--nrp-font-display); font-size: 28px; font-weight: 500;
  color: var(--nrp-text); letter-spacing: -0.5px; line-height: 1.15; margin: 0;
}
.unit-hero__actions { display: flex; gap: 8px; flex-shrink: 0; padding-top: 4px; }

.listing-info {
  position: relative;
  margin-top: 4px;
  background: var(--nrp-card); border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md); padding: 14px 18px;
}
.listing-info__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 28px; }
.listing-info__edit {
  position: absolute; top: 10px; right: 14px;
  font-size: 11px; color: var(--nrp-text-mid); text-decoration: none;
  letter-spacing: 0.4px;
}
.listing-info__edit:hover { color: var(--nrp-orange); }

.li-tile__label {
  font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600; margin-bottom: 4px;
}
.li-tile__value {
  font-family: var(--nrp-font-display); font-size: 17px; font-weight: 500;
  color: var(--nrp-text); line-height: 1.15; letter-spacing: -0.2px;
}
.li-tile__value--muted  { color: var(--nrp-text-dim); }
.li-tile__value--accent { color: var(--nrp-orange); }
.li-tile__value a       { color: var(--nrp-orange); text-decoration: none; }
.li-tile__value a:hover { text-decoration: underline; }
.li-tile__unit {
  font-size: 12px; color: var(--nrp-text-mid); margin-left: 2px;
  font-family: var(--nrp-font-body); font-weight: 400;
}

.unit-tabs { margin-top: 18px; }

.unit-grid {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 20px; margin-top: 22px; align-items: start;
}
.unit-grid__rail { position: sticky; top: 16px; }

.sec { margin-bottom: 22px; }
.sec__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.sec__num   { font-family: var(--nrp-font-display); font-style: italic; color: var(--nrp-orange); font-size: 16px; }
.sec__title { font-family: var(--nrp-font-display); font-size: 18px; font-weight: 500; color: var(--nrp-text); }
.sec__action { margin-left: auto; font-size: 12px; color: var(--nrp-orange); text-decoration: none; cursor: pointer; }
.sec__action:hover { text-decoration: underline; }
.sec__pill { margin-left: 8px; }

/* Light shaded heads — the numbered section's head becomes a shaded band
   joined to the card below it, matching the Active-lease rail card
   (strip-bg + orange left rule). CSS-only; the .sec / .sec__head / .nrp-card
   markup is unchanged. These layer on top of the base .sec rules above:
   the border/band are added while the 22px .sec gap and the head's
   flex/baseline/gap stay as-is. */
.sec {
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  overflow: hidden;
  /* keep the existing 22px gap between sections — do not change .sec margin */
}
.sec__head {
  padding: 13px 18px;                               /* was 0 0 12px (floating) */
  margin-bottom: 0;                                 /* band now sits flush on the card */
  background: var(--nrp-strip-bg);
  border-bottom: 1px solid var(--nrp-row-border);
  box-shadow: inset 2px 0 0 var(--nrp-orange);      /* orange left rule */
}
.sec > .nrp-card {
  border: 0;                                        /* the .sec wrapper now provides the border */
  border-radius: 0;
}

/* Lease-detail strip + 3-col detail-grid (overrides .nrp-field defaults inside) */
.lease-strip {
  padding: 14px 20px 4px; font-size: 12.5px; color: var(--nrp-text-mid);
  border-bottom: 1px solid var(--nrp-row-border);
}
.lease-strip a { color: var(--nrp-orange); text-decoration: none; }
.lease-strip a:hover { text-decoration: underline; }

.detail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px 24px; padding: 18px 20px;
}
.detail-grid .nrp-field { display: block; padding: 0; }
.detail-grid .nrp-field__label {
  width: auto; margin-bottom: 4px; display: block;
  font-size: 10px; letter-spacing: 1.6px;
}
.detail-grid .nrp-field__value { display: block; font-size: 13px; }
.detail-grid .nrp-field__value a { color: var(--nrp-orange); text-decoration: none; }
.detail-grid .nrp-field__value a:hover { text-decoration: underline; }

.nrp-card__empty {
  padding: 28px; text-align: center; color: var(--nrp-text-dim);
  font-size: 13px; font-style: italic;
}

/* Pet rows */
.pet-row {
  display: grid; grid-template-columns: 44px 1fr auto auto;
  align-items: center; gap: 14px; padding: 14px 18px;
  border-bottom: 1px solid var(--nrp-row-border);
}
.pet-row:last-child { border-bottom: 0; }
.pet-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--nrp-orange-tint); color: var(--nrp-orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.pet-name { font-size: 13.5px; font-weight: 500; color: var(--nrp-text); }
.pet-meta { font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 2px; }
.pet-fee  { font-family: var(--nrp-font-display); font-size: 14px; color: var(--nrp-text); text-align: right; }
.pet-fee__sub { font-size: 10.5px; color: var(--nrp-text-dim); text-align: right; }
.pet-actions  { display: flex; gap: 4px; }

/* Generic icon-button (used in pets, insurance, files, etc.) */
.icon-btn {
  width: 28px; height: 28px; border-radius: var(--nrp-r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent;
  color: var(--nrp-text-dim); cursor: pointer;
  transition: color var(--nrp-dur-fast) var(--nrp-ease),
              border-color var(--nrp-dur-fast) var(--nrp-ease),
              background var(--nrp-dur-fast) var(--nrp-ease);
}
.icon-btn:hover {
  color: var(--nrp-orange); border-color: var(--nrp-card-border);
  background: var(--nrp-card-raised);
}
.icon-btn svg { width: 14px; height: 14px; }

/* Renters-insurance rows */
.ins-row {
  display: grid; grid-template-columns: 140px 1fr auto auto;
  gap: 16px; padding: 14px 18px; align-items: center;
  border-bottom: 1px solid var(--nrp-row-border);
}
.ins-row:last-child { border-bottom: 0; }
.ins-carrier { font-size: 13.5px; font-weight: 500; color: var(--nrp-text); }
.ins-dates   { font-size: 11px;   color: var(--nrp-text-dim); margin-top: 2px; }
.ins-tenant  { font-size: 12.5px; color: var(--nrp-text-mid); }

/* Comments box */
.comments-card  { padding: 18px 20px; }
.comments-empty { color: var(--nrp-text-dim); font-style: italic; font-size: 12.5px; }

/* Right rail summary card */
.rail-card {
  padding: 18px 20px; background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md);
}
.rail-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; }
.rail-row + .rail-row { border-top: 1px solid var(--nrp-row-border); }
.rail-row__label { font-size: 12px; color: var(--nrp-text-mid); }
.rail-row__value { font-family: var(--nrp-font-display); font-size: 15px; font-weight: 500; color: var(--nrp-text); }
.rail-row__value--accent { color: var(--nrp-orange); }
/* Money values render in the body sans with tabular figures (never the serif
   display face) so columns of currency align — applied to every rail money
   value (deposit, rent, utility, total, …). */
.rail-row__value--money { font-family: var(--nrp-font-body); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.rail-row__value--accent.rail-row__value--money { font-size: 14px; }
.rail-link { font-size: 11.5px; color: var(--nrp-orange); text-decoration: none; cursor: pointer; }
.rail-link:hover { text-decoration: underline; }
.rail-link-row { text-align: right; padding-top: 6px; }
.rail-rent-row { margin-top: 8px; }
.rail-note {
  margin: 12px 0; padding: 10px 12px;
  background: var(--nrp-warn-tint); border-radius: var(--nrp-r-sm);
  font-size: 11.5px; color: var(--nrp-text); line-height: 1.5;
}
.rail-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; justify-content: space-between; }

/* ──────────────────────────────────────────
   Detail-page primitives shared across Tenant, Unit, Lease, etc.
   All layout-only — token vocabulary already defined above.
   ────────────────────────────────────────── */

/* Section header hint (11.5px text-mid, sits between title and action). */
.sec__hint {
  font-size: 11.5px; color: var(--nrp-text-mid);
  font-style: italic;
}

/* Variant: numbered section with no card (used for structural rows, e.g. Resident Center).
   The section's body is meant to render its own raised row, not a .nrp-card. */
.sec--bare > .nrp-card,
.sec--bare > .resident-row { box-shadow: none; }

/* listing-info strip — N-tile variant. The default .listing-info__grid is
   4-col; .listing-info__grid--5 / --3 etc override the column count without
   redefining tokens. */
.listing-info__grid--3 { grid-template-columns: repeat(3, 1fr); }
.listing-info__grid--5 { grid-template-columns: repeat(5, 1fr); }
.listing-info__grid--6 { grid-template-columns: repeat(6, 1fr); }

/* Sub-line below a li-tile value (11px text-dim — covers dates / co-tenants
   counts under a primary serif value). */
.li-tile__sub {
  margin-top: 4px;
  font-size: 11px; color: var(--nrp-text-dim);
}
.li-tile__sub--success { color: var(--nrp-success); }
.li-tile__sub--accent  { color: var(--nrp-orange); }
.li-tile__sub--warn    { color: var(--nrp-warn); }
.li-tile__sub--danger  { color: var(--nrp-danger); }

/* detail-grid column-count overrides for sections that don't fit 3-col. */
.detail-grid--2 { grid-template-columns: repeat(2, 1fr); }
.detail-grid--4 { grid-template-columns: repeat(4, 1fr); }
.detail-grid--5 { grid-template-columns: repeat(5, 1fr); }
.detail-grid .nrp-field--span2 { grid-column: span 2; }
.detail-grid .nrp-field__value--mono { font-family: var(--nrp-font-mono); font-size: 12.5px; }

/* Help-row strip — sits at the bottom of a card and gives context (e.g.
   the SMS opt-in explanation under Contact information). Uses the same
   wash as .nrp-strip-bg. */
.nrp-help-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 20px;
  background: var(--nrp-strip-bg);
  border-top: 1px solid var(--nrp-row-border);
  font-size: 11.5px; color: var(--nrp-text-mid); line-height: 1.5;
}
.nrp-help-row__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--nrp-text-dim);
  margin-top: 5px; flex-shrink: 0;
}
.nrp-help-row__dot--success { background: var(--nrp-success); }
.nrp-help-row__dot--warn    { background: var(--nrp-warn); }

/* Mini-table — small data-row table used for Leases / Recent files lists.
   Two-row vertical paddings, hairline row borders, no zebra. The table
   header row uses eyebrow vocabulary. */
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th {
  text-align: left; padding: 10px 18px;
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
  border-bottom: 1px solid var(--nrp-row-border);
  background: var(--nrp-strip-bg);
}
.mini-table td {
  padding: 12px 18px;
  font-size: 13px; color: var(--nrp-text);
  border-bottom: 1px solid var(--nrp-row-border);
  vertical-align: middle;
}
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table td a { color: var(--nrp-orange); text-decoration: none; }
.mini-table td a:hover { text-decoration: underline; }
.mini-table th.is-num   { text-align: right; }
.mini-table td.is-num   { text-align: right; font-family: var(--nrp-font-display); font-size: 14px; font-weight: 500; }
.mini-table td.is-num--accent { color: var(--nrp-orange); }
.mini-table td.is-mono  { font-family: var(--nrp-font-mono); font-size: 12.5px; color: var(--nrp-text-mid); }
.mini-table .mini-table__sub { font-size: 11px; color: var(--nrp-text-dim); margin-top: 2px; }

/* File-icon chip (used in Recent files mini-table). 28×32 raised card
   with mono "PDF" / "DOC" / etc label. */
.file-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 32px;
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  font-family: var(--nrp-font-mono); font-size: 9px; font-weight: 500;
  color: var(--nrp-text-mid); letter-spacing: 0.4px;
}

/* ──────────────────────────────────────────
   Tenant detail — hero, listing-info strip, two-col layout.
   (.unit-grid pattern is reused; tenant-hero is its own structure
   because it carries an avatar + meta row + pager group.)
   ────────────────────────────────────────── */
.tenant-hero {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding-bottom: 4px;
}
.tenant-hero__avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--nrp-orange-tint); color: var(--nrp-orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display); font-size: 22px; font-weight: 500;
  letter-spacing: -0.5px;
}
.tenant-hero__main { min-width: 0; }
.tenant-hero__main .unit-hero__title { line-height: 1.1; }
.tenant-hero__meta {
  margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-size: 12px; color: var(--nrp-text-mid);
}
.tenant-hero__meta a { color: var(--nrp-orange); text-decoration: none; }
.tenant-hero__meta a:hover { text-decoration: underline; }
.tenant-hero__meta .sep { color: var(--nrp-text-dim); }

/* Pager: 3-button cluster, hairline outline, internal border-left dividers. */
.tenant-pager {
  display: inline-flex;
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  overflow: hidden;
  background: var(--nrp-card);
}
.tenant-pager__btn {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--nrp-text-mid);
  background: transparent;
  border: 0;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--nrp-dur-fast) var(--nrp-ease),
              background var(--nrp-dur-fast) var(--nrp-ease);
}
.tenant-pager__btn + .tenant-pager__btn { border-left: 1px solid var(--nrp-card-border); }
.tenant-pager__btn:hover { color: var(--nrp-orange); background: var(--nrp-row-hover); }
.tenant-pager__btn.is-disabled {
  color: var(--nrp-text-dim); pointer-events: none; opacity: 0.55;
}

/* Tenant detail two-col grid (re-uses .unit-grid tokens but lives under
   its own hook so future divergence is easy). */
.tenant-grid {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 20px; margin-top: 22px; align-items: start;
}
.tenant-grid__rail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 960px) {
  .tenant-grid { grid-template-columns: 1fr; }
  .tenant-grid__rail { position: static; }
}

/* Active-lease rail card — orange-tinted variant of .rail-card. */
.rail-card--accent {
  background: var(--nrp-orange-tint);
  border-color: var(--nrp-orange-tint-strong);
}
.rail-card__title {
  font-family: var(--nrp-font-display); font-size: 17px; font-weight: 500;
  color: var(--nrp-text); letter-spacing: -0.2px;
}
.rail-card__sub {
  font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 2px;
}
.rail-card__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.rail-eyebrow {
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600; margin-bottom: 4px;
}
.rail-block { padding: 10px 0; border-top: 1px solid var(--nrp-row-border); }
.rail-block:first-of-type { border-top: 0; padding-top: 4px; }

/* Quick-actions rail — vertical stack of orange links. */
.rail-actions-list { display: flex; flex-direction: column; gap: 0; }
.rail-actions-list a {
  display: block; padding: 10px 0;
  color: var(--nrp-orange); text-decoration: none; font-size: 13px;
  border-bottom: 1px solid var(--nrp-row-border);
}
.rail-actions-list a:last-child { border-bottom: 0; }
.rail-actions-list a:hover { text-decoration: underline; }
.rail-actions-list a.is-danger { color: var(--nrp-danger); }

/* Resident Center row — single horizontal block with status dot + meta + actions. */
.resident-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
}
.resident-row__status { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.resident-row__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--nrp-success); flex-shrink: 0;
}
.resident-row__dot--off { background: var(--nrp-text-dim); }
.resident-row__title { font-size: 13.5px; color: var(--nrp-text); }
.resident-row__sub   { font-size: 11.5px; color: var(--nrp-text-dim); margin-top: 2px; }
.resident-row__actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Inline CTA inside an empty-state body. */
.nrp-card__empty a,
.nrp-card__empty button.nrp-link {
  color: var(--nrp-orange); text-decoration: none; font-style: normal;
  background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit;
  font-family: inherit;
}
.nrp-card__empty a:hover,
.nrp-card__empty button.nrp-link:hover { text-decoration: underline; }

/* Floating action button (compose email, etc.). */
.nrp-fab {
  position: fixed; bottom: 20px; right: 24px;
  z-index: 50;
}

/* ──────────────────────────────────────────
   Send-for-signature modal — layout primitives.
   All token-driven; no new colors or radii.
   ────────────────────────────────────────── */

/* Eyebrow row with trailing 1px hairline (used for the Signers / Landlord
   override section dividers inside the send modal). The ::after rule
   stretches to the right edge so the eyebrow text reads as a section
   header without a heavy border-bottom. */
.nrp-section-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
  margin-bottom: 8px;
}
.nrp-section-eyebrow::after {
  content: ''; flex: 1; height: 1px;
  background: var(--nrp-row-border);
}

/* Validation banner — full-width strip at the top of the modal body.
   Success / warn / danger variants tinted with existing tokens. */
.nrp-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  font-size: 12.5px; line-height: 1.4;
  color: var(--nrp-text);
}
.nrp-banner__icon { flex-shrink: 0; margin-top: 1px; }
.nrp-banner__title { font-weight: 600; }
.nrp-banner__sub   { color: var(--nrp-text-mid); margin-top: 2px; }
.nrp-banner--success {
  background: var(--nrp-success-tint);
  border-color: var(--nrp-success-tint);
  color: var(--nrp-text);
}
.nrp-banner--success .nrp-banner__icon { color: var(--nrp-success); }
.nrp-banner--warn {
  background: var(--nrp-warn-tint);
  border-color: var(--nrp-warn-tint);
}
.nrp-banner--warn .nrp-banner__icon { color: var(--nrp-warn); }
.nrp-banner--danger {
  background: var(--nrp-danger-tint);
  border-color: var(--nrp-danger-tint);
}
.nrp-banner--danger .nrp-banner__icon { color: var(--nrp-danger); }
.nrp-banner--info {
  background: var(--nrp-info-tint);
  border-color: var(--nrp-info-tint);
}
.nrp-banner--info .nrp-banner__icon { color: var(--nrp-info); }
.nrp-banner__list {
  margin: 6px 0 0; padding-left: 18px;
  font-family: var(--nrp-font-mono); font-size: 11.5px;
  color: var(--nrp-text-mid);
}

/* Signers list — single raised container, hairline-divided rows. */
.nrp-signers {
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  padding: 4px 14px;
}
.nrp-signers__row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--nrp-row-border);
}
.nrp-signers__row:last-child { border-bottom: 0; }
.nrp-signers__main { flex: 1; min-width: 0; }
.nrp-signers__name {
  font-size: 13.5px; font-weight: 500; color: var(--nrp-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nrp-signers__email {
  font-family: var(--nrp-font-body); font-size: 11.5px; color: var(--nrp-text-mid);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 2px;
}

/* Round 28px initials avatar. Tenant variant uses orange-tint surface;
   landlord variant uses neutral card surface with a hairline border. */
.nrp-avatar-sm {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display); font-weight: 500; font-size: 11px;
  letter-spacing: -0.2px; flex-shrink: 0;
}
.nrp-avatar-sm--tenant {
  background: var(--nrp-orange-tint); color: var(--nrp-orange);
  border: 1px solid var(--nrp-orange-tint-strong);
}
.nrp-avatar-sm--landlord {
  background: var(--nrp-card); color: var(--nrp-text-mid);
  border: 1px solid var(--nrp-card-border);
}

/* Compact role pill (3px 8px, 9.5px text). Re-uses .nrp-pill family
   colors but tighter padding than the standard status pill. */
.nrp-role-pill {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: var(--nrp-r-pill);
  font-size: 9.5px; letter-spacing: 1.4px;
  text-transform: uppercase; font-weight: 600;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  color: var(--nrp-text-mid);
  flex-shrink: 0;
}
.nrp-role-pill--primary {
  background: var(--nrp-orange-tint);
  border-color: var(--nrp-orange-tint-strong);
  color: var(--nrp-orange);
}

/* Hint text under a select / input (11.5px text-dim). */
.nrp-hint {
  font-size: 11.5px; color: var(--nrp-text-dim);
  line-height: 1.4; margin-top: 6px;
}

/* Custom select chevron — replaces native browser arrow with a
   token-tinted SVG so the control reads consistently in both themes.
   The .nrp-select rule already provides the box; this just swaps the
   indicator. Apply with class .nrp-select--chevron. */
.nrp-select--chevron {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%238A8273' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 7px;
  padding-right: 32px;
}

/* ──────────────────────────────────────────
   File-drop picker — large dashed-border zone with PDF chip + filename
   area + small "Choose file" trigger. The whole block is a <label>
   wrapping a hidden <input type="file">; CSS targets the descendants.
   Drag-and-drop state is toggled by the partial's JS via
   .nrp-file-drop--dragover.
   ────────────────────────────────────────── */
.nrp-file-drop {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--nrp-card-raised);
  border: 1px dashed var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  cursor: pointer;
  transition: border-color var(--nrp-dur-fast) var(--nrp-ease),
              background var(--nrp-dur-fast) var(--nrp-ease);
  position: relative;
}
.nrp-file-drop:hover,
.nrp-file-drop:focus-within,
.nrp-file-drop--dragover {
  border-color: var(--nrp-orange);
}
.nrp-file-drop__input {
  position: absolute; opacity: 0; pointer-events: none;
  width: 1px; height: 1px;
}
.nrp-file-drop__chip {
  flex-shrink: 0;
  width: 36px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  font-family: var(--nrp-font-mono); font-size: 9.5px; font-weight: 500;
  color: var(--nrp-text-mid); letter-spacing: 0.4px;
}
.nrp-file-drop--has-file .nrp-file-drop__chip {
  background: var(--nrp-success-tint);
  border-color: var(--nrp-success-tint);
  color: var(--nrp-success);
}
.nrp-file-drop__main { flex: 1; min-width: 0; }
.nrp-file-drop__name {
  font-size: 13px; font-weight: 500; color: var(--nrp-text-dim);
  font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nrp-file-drop--has-file .nrp-file-drop__name {
  color: var(--nrp-text); font-style: normal;
}
.nrp-file-drop__hint {
  font-size: 11.5px; color: var(--nrp-text-dim); margin-top: 4px;
}
.nrp-file-drop--has-file .nrp-file-drop__hint { color: var(--nrp-text-dim); }
.nrp-file-drop__choose {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 14px; font-size: 12.5px; font-weight: 500;
  background: transparent; color: var(--nrp-text);
  border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-sm);
  cursor: pointer;
  transition: color var(--nrp-dur-fast) var(--nrp-ease),
              border-color var(--nrp-dur-fast) var(--nrp-ease),
              background var(--nrp-dur-fast) var(--nrp-ease);
}
.nrp-file-drop:hover .nrp-file-drop__choose,
.nrp-file-drop:focus-within .nrp-file-drop__choose {
  color: var(--nrp-orange);
  border-color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
}
.nrp-file-drop__error {
  margin-top: 8px;
  font-size: 12px; color: var(--nrp-danger);
}

/* Page shell used by detail pages — 1200px max width, 80px bottom padding
   so the FAB doesn't overlap content on short pages. */
.nrp-detail-shell {
  max-width: 1200px; margin: 0 auto; padding: 24px 28px 80px;
}

/* ──────────────────────────────────────────
   Modal + form primitives (canonical going forward)

   .modal-backdrop > .modal > .modal__head + .modal__body + .modal__foot
   .field, .field__label, .field__input, .field__hint
   .field__affix-wrap / .field__affix and .field__suffix-wrap / .field__suffix
   .toggle-row · .section-eyebrow · .req
   ────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: var(--nrp-modal-scrim);
  z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal-backdrop.is-open { display: flex; }

.modal {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  width: 520px; max-width: 100%;
  /* vh fallback for old Safari/Firefox; dvh tracks the *visible* viewport
     so iOS Safari's URL bar doesn't push the modal's foot off-screen. */
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(47,59,70,0.10), 0 4px 12px rgba(47,59,70,0.06);
}
/* Several modals wrap their __head/__body/__foot in a <form> so the
   single submit fires on Enter and ties the file input + fields together
   (add renters insurance, add pet, add parking, add utilities…). That
   makes the form — not __head/__body/__foot — the only direct flex
   child of .modal, which breaks the body's `overflow-y: auto + flex +
   min-height: 0` chain (those properties only mean anything to a flex
   *child*). Chrome was lenient enough to scroll anyway; Safari clipped
   and stranded the foot below the viewport. Restoring the flex chain
   on the form itself fixes it for both. */
.modal > form {
  display: flex; flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}
/* Native <dialog> nodes that reuse the .modal chrome must respect the
   browser's open/closed state — author-level `display: flex` above
   otherwise overrides the user-agent `dialog:not([open]) { display: none }`
   rule and the dialog renders inline on initial paint. Restore the
   hide-when-closed behaviour while keeping the flex layout once
   showModal() flips the [open] attribute on. */
dialog.modal:not([open]) { display: none; }

.modal__head {
  padding: 18px 24px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
}
.modal__eyebrow {
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
}
.modal__title {
  font-family: var(--nrp-font-display);
  font-size: 22px; font-weight: 500; letter-spacing: -0.3px;
  line-height: 1.2; color: var(--nrp-text);
  margin: 4px 0 0;
}
.modal__close {
  width: 28px; height: 28px; border-radius: var(--nrp-r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent;
  color: var(--nrp-text-dim); cursor: pointer; flex-shrink: 0;
  transition: color var(--nrp-dur-fast) var(--nrp-ease),
              border-color var(--nrp-dur-fast) var(--nrp-ease),
              background var(--nrp-dur-fast) var(--nrp-ease);
}
.modal__close:hover {
  color: var(--nrp-text);
  background: var(--nrp-card-raised);
  border-color: var(--nrp-card-border);
}
.modal__close svg { width: 14px; height: 14px; }

.modal__body {
  padding: 18px 24px 0;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  /* Flex parent (.modal) sets max-height; without flex:1 + min-height:0
     the body would refuse to shrink below its intrinsic content
     height and the footer would push past the viewport. These two
     lines are what enables the inner scrollbar. */
  flex: 1 1 auto;
  min-height: 0;
}
.modal__body > :last-child { margin-bottom: 18px; }

.modal__foot {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--nrp-row-border);
  background: var(--nrp-card-raised);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* Field primitives — meant to replace inline-styled form rows everywhere */
.field { display: flex; flex-direction: column; }
.field__label {
  font-size: 11px; letter-spacing: 0.4px; color: var(--nrp-text-mid);
  font-weight: 600; margin-bottom: 4px;
}
.field__label .req { color: var(--nrp-orange); margin-left: 2px; }
.field__input {
  font-family: var(--nrp-font-text, var(--nrp-font-body));
  font-size: 13.5px; color: var(--nrp-text);
  background: var(--nrp-input-bg); border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-sm);
  padding: 8px 10px; width: 100%;
  transition: border-color var(--nrp-dur-fast) var(--nrp-ease),
              background var(--nrp-dur-fast) var(--nrp-ease);
  appearance: none;
}
.field__input::placeholder { color: var(--nrp-text-dim); }
.field__input:hover { border-color: var(--nrp-text-dim); }
.field__input:focus {
  outline: none;
  border-color: var(--nrp-orange);
  background: var(--nrp-card);
}
.field__input--error,
.field__input.field__input--error:focus { border-color: var(--nrp-danger); }

.field__hint  { font-size: 11px; color: var(--nrp-text-dim); margin-top: 4px; line-height: 1.4; }
.field__error { font-size: 11px; color: var(--nrp-danger);   margin-top: 4px; line-height: 1.4; display: none; }
.field--invalid .field__error { display: block; }
.field--invalid .field__input,
.field--invalid .nrp-input { border-color: var(--nrp-danger); }

/* Affix / suffix lockups — adornments live inside the input chrome.
   Use .field__affix-wrap (with --has-affix) and/or .field__suffix-wrap
   (with --has-suffix) on the .field. The wrap supplies the relative
   positioning; padding tweaks come from the modifier. */
/* Mock-faithful affix / suffix overlay — the wrap is just a relative
   positioning context; the input keeps its own border + height, so
   plain-input rows and lockup rows are guaranteed identical heights
   (both are bare .field__input with padding 8px 10px). The $ / /mo
   glyphs are absolutely positioned and vertically centered via
   top:50% + translateY(-50%), which puts them on the same centerline
   as the input's natural text baseline.

   padding-left/right uses !important to defeat any cached or
   shadow override (the bare .field__input has padding:8px 10px and
   without !important a stale cached version would let the value
   text spill under the absolute $ overlay). */
.field__affix-wrap, .field__suffix-wrap { position: relative; }
.field__affix-wrap .field__input,
.field__affix-wrap .nrp-input  { padding-left: 26px !important; }
.field__suffix-wrap .field__input,
.field__suffix-wrap .nrp-input { padding-right: 42px !important; }
.field__affix-wrap.field__suffix-wrap .field__input,
.field__affix-wrap.field__suffix-wrap .nrp-input { padding-left: 26px !important; padding-right: 42px !important; }

/* Affix / suffix font-size inherits from .field__input (13.5px) so the
   $ glyph's baseline lines up exactly with the value's baseline. With
   different sizes, top:50% centers each box on the same centerline
   but the text baselines drift by ~half a pixel — visible to the eye
   as the value sitting "below" the affix. */
.field__affix {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 13.5px; line-height: 1;
  color: var(--nrp-text-dim); pointer-events: none;
  font-family: var(--nrp-font-text, var(--nrp-font-body));
}
.field__suffix {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 11.5px; line-height: 1;
  color: var(--nrp-text-dim); pointer-events: none;
  font-family: var(--nrp-font-text, var(--nrp-font-body));
}

/* ════════════════════════════════════════════════════════════════
   Manual upload modal — modifiers + dropzones used by
   _upload_manual_modal.html. Label/eyebrow modifiers compose on top
   of .nrp-label and .nrp-eyebrow; the dropzone family is new.
   ════════════════════════════════════════════════════════════════ */

/* Inline modifiers on .nrp-label — the required asterisk (orange) and
   the lowercase (optional) hint that softens optional fields. */
.nrp-label__req { color: var(--nrp-orange); margin-left: 2px; }
.nrp-label__opt {
  margin-left: 6px;
  text-transform: none; letter-spacing: 0;
  color: var(--nrp-text-dim); font-weight: 400; font-size: 11px;
}

/* .nrp-eyebrow--rule extends the eyebrow with a 1px hairline that
   fills the remaining row width, so sections in dense modals get a
   visible divider without an explicit <hr>. Pair with `display:flex;
   align-items:center; gap:10px` on the wrapping element OR use the
   element directly — the ::after lays out as a flex child. */
.nrp-eyebrow--rule {
  display: flex; align-items: center; gap: 10px;
}
.nrp-eyebrow--rule::after {
  content: ""; flex: 1; height: 1px; background: var(--nrp-row-border);
}

/* Modal row ratios — name-heavier first, then equal/smaller siblings.
   Generic shapes, not field-specific, so other modals can reuse. */
.modal__row--3-2  { grid-template-columns: 3fr 2fr; }
.modal__row--unit { grid-template-columns: 1.4fr 1fr 1fr; }

/* Upload-dropzone — used by manual-upload paper/ID/income slots.
   Namespaced to avoid collision with the legacy .dropzone family on
   the Project Files tab. Two states (empty + filled) swap by toggling
   .upload-dropzone--filled on the same element. .upload-dropzone--sm
   is the compact variant for the optional supporting docs in the
   bottom row. */
.upload-dropzone {
  border: 1.5px dashed var(--nrp-input-border);
  border-radius: var(--nrp-r-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  background: var(--nrp-input-bg);
  transition: border-color 120ms, background 120ms;
  min-width: 0;
}
.upload-dropzone:hover { border-color: var(--nrp-text-dim); }
.upload-dropzone--filled {
  border-style: solid;
  border-color: var(--nrp-success);
  background: var(--nrp-success-tint);
}
.upload-dropzone--sm { padding: 10px 12px; gap: 10px; }

.upload-dropzone__icon {
  width: 36px; height: 36px; border-radius: var(--nrp-r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  color: var(--nrp-text-mid);
  flex-shrink: 0;
}
.upload-dropzone--sm .upload-dropzone__icon { width: 30px; height: 30px; }
.upload-dropzone--filled .upload-dropzone__icon {
  border-color: rgba(62,109,72,0.4);
  color: var(--nrp-success);
}

.upload-dropzone__main  { flex: 1; min-width: 0; }
.upload-dropzone__title { font-size: 13px; color: var(--nrp-text); font-weight: 500; }
.upload-dropzone--sm .upload-dropzone__title { font-size: 12.5px; }
.upload-dropzone__title .req { color: var(--nrp-orange); margin-left: 2px; }
.upload-dropzone__title .opt {
  margin-left: 6px;
  text-transform: none; letter-spacing: 0;
  color: var(--nrp-text-dim); font-weight: 400; font-size: 11px;
}
.upload-dropzone__meta {
  font-size: 11.5px; color: var(--nrp-text-dim); margin-top: 2px;
  font-family: var(--nrp-font-mono);
}
.upload-dropzone--sm .upload-dropzone__meta { font-size: 10.5px; margin-top: 1px; }
.upload-dropzone__action { flex-shrink: 0; }
.upload-dropzone__filename {
  font-family: var(--nrp-font-mono);
  font-size: 12.5px; color: var(--nrp-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-dropzone--sm .upload-dropzone__filename { font-size: 11.5px; }
.upload-dropzone__filemeta {
  font-size: 11px; color: var(--nrp-text-mid); margin-top: 2px;
  font-family: var(--nrp-font-mono);
}
.upload-dropzone--sm .upload-dropzone__filemeta { font-size: 10.5px; margin-top: 1px; }

.upload-dropzone-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-top: 8px;
}

/* Modal layout helpers — sub-row grids inside .modal__body */
.modal__row { display: grid; gap: 14px 16px; }
.modal__row--2col { grid-template-columns: 1fr 1fr; }
.modal__row--3col { grid-template-columns: 1fr 1fr 1fr; }
.modal__row--util { grid-template-columns: 2fr 3fr; }

/* Toggle-row card (single checkbox + stacked label/hint) */
.toggle-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px;
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  cursor: pointer;
}
.toggle-row input[type="checkbox"] {
  margin: 2px 0 0;
  accent-color: var(--nrp-orange);
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.toggle-row__label { font-size: 13px; font-weight: 500; color: var(--nrp-text); line-height: 1.3; }
.toggle-row__hint  { font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 2px; line-height: 1.4; }

/* Section eyebrow rule — uppercase label + flex-1 trailing line */
.section-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
  margin: 4px 0 0;
}
.section-eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--nrp-row-border);
}

/* ──────────────────────────────────────────
   PAD on-file summary row — tenant detail § 03 "PAD file information".
   One clean line: status pill · masked account · meta · right-aligned
   Banking-tab link. Spacing is gap only — no borders/underlines on the
   spans; the link underlines on hover. Masked number is body sans with
   tabular figures (not mono). ────────────────────────────────────────── */
.pad-onfile { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.pad-onfile__acct { font-size: 13.5px; color: var(--nrp-text); font-weight: 500; }
.pad-onfile__acct .num { font-variant-numeric: tabular-nums; letter-spacing: 0.4px; color: var(--nrp-text-mid); }
.pad-onfile__meta { font-size: 12px; color: var(--nrp-text-mid); }
.pad-onfile__link { margin-left: auto; font-size: 12.5px; color: var(--nrp-orange); text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.pad-onfile__link:hover { text-decoration: underline; }

/* ──────────────────────────────────────────
   Add / Change PAD modal — allocation tracker, notices, read-only
   payor block, and consent rows. These classes are emitted by
   _partials/modals/_add_pad.html (Task 9 redesign). Bar/status colour
   is driven by a data-state set in the modal's recalcAlloc():
   empty · under · full · over.
   ────────────────────────────────────────── */
.modal__notice {
  font-size: 12.5px; line-height: 1.45;
  padding: 10px 12px; border-radius: var(--nrp-r-sm);
  border: 1px solid var(--nrp-card-border);
  background: var(--nrp-card-raised); color: var(--nrp-text);
}
.modal__notice strong { font-weight: 600; }
.modal__notice--warn {
  border-color: var(--nrp-warn); background: var(--nrp-warn-tint);
}
.modal__notice--error {
  border-color: var(--nrp-danger); background: var(--nrp-danger-tint);
}

/* Read-only payor identity (sourced from the rental application) */
/* ── Add-PAD modal components ───────────────────────────────────────
   Reuses .modal*, .section-eyebrow, .field*, .nrp-pill*, .modal__foot--split.
   Only the PAD-specific pieces live here: read-only payor identity,
   packed bank field row, the allocation stat + roster card, and the
   attestation toggle rows. */

/* Payor (read-only identity from the rental application) */
.payor { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.payor__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--nrp-side-bg); color: var(--nrp-side-text);
  font-family: var(--nrp-font-display); font-size: 15px; font-weight: 500;
  letter-spacing: 0.3px;
}
.payor__name { font-size: 14px; font-weight: 600; color: var(--nrp-text); }
.payor__addr { font-size: 12.5px; color: var(--nrp-text-mid); margin-top: 2px; line-height: 1.4; }
.payor__src  { font-size: 11.5px; color: var(--nrp-text-dim); margin-top: 5px; }

/* Packed field row — fields keep their data widths and wrap naturally
   instead of stretching to fill the modal. */
.field-row { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-bottom: 4px; }

/* base.html ships a legacy global `input:not(...)` rule whose specificity
   (0,0,2,1) outranks the .field__input primitives. Inside the modal it leaks
   a smaller font-size, a bottom margin (which knocks the $ affix out of
   vertical centre), and a blue focus ring. Pin the modal's inputs to the
   design-system values. (These scoped overrides become unnecessary once the
   legacy global rule is retired.) */
#add-pad-backdrop .field__input {
  margin-bottom: 0;
  font-size: 13.5px;
}
#add-pad-backdrop .field__input:focus {
  border-color: var(--nrp-orange);
  box-shadow: 0 0 0 3px var(--nrp-orange-tint);
}

/* Currency input — $ affix inside, body font + tabular figures. */
.field__money { position: relative; }
#add-pad-backdrop .field__money .field__input {
  padding-left: 22px;
  font-family: var(--nrp-font-body); font-variant-numeric: tabular-nums;
}

/* Roster names act as links to that tenant's PAD. */
.alloc-person__link { cursor: pointer; text-decoration: none; color: var(--nrp-text); }
.alloc-person__link:hover { color: var(--nrp-orange); text-decoration: underline; }
.field__money .affix {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--nrp-text-dim); pointer-events: none;
}

/* Rent-allocation row + read-only Total-rent stat. */
.alloc-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 28px; margin-bottom: 14px; }
.stat__label { font-size: 11px; letter-spacing: 0.4px; color: var(--nrp-text-mid); font-weight: 600; margin-bottom: 5px; }
.stat__value {
  font-family: var(--nrp-font-body); font-variant-numeric: tabular-nums;
  font-size: 18px; font-weight: 500; color: var(--nrp-text);
  letter-spacing: -0.2px; padding-bottom: 2px;
}

/* Allocation summary card + tenant roster. */
.alloc-card {
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  padding: 12px 14px; margin-bottom: 6px;
}
.alloc-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.alloc-list { display: flex; flex-direction: column; gap: 8px; }
.alloc-person { display: flex; align-items: center; gap: 10px; }
.alloc-person__avatar {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--nrp-orange-tint); color: var(--nrp-orange);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.2px;
}
.alloc-person__name { font-size: 13px; color: var(--nrp-text); }
.alloc-person__meta { font-size: 11.5px; color: var(--nrp-text-dim); margin-left: auto; }

/* Attestation toggle rows (whole row is a <label>). */
.attest { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 4px; }
.attest-row {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 13px; cursor: pointer;
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  transition: border-color var(--nrp-dur-fast) var(--nrp-ease);
}
.attest-row:hover { border-color: var(--nrp-input-border); }
.attest-row input[type="checkbox"] {
  margin: 1px 0 0; width: 16px; height: 16px; flex-shrink: 0;
  accent-color: var(--nrp-orange); cursor: pointer;
}
.attest-row__text { font-size: 13px; color: var(--nrp-text); line-height: 1.45; }
.attest-row__text .terms { color: var(--nrp-text-dim); }
.attest-row__hint { font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 2px; }

/* Consent / make-default checkbox rows */
.modal__check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; line-height: 1.4; color: var(--nrp-text); cursor: pointer;
}
.modal__check input[type="checkbox"] {
  margin: 1px 0 0; flex-shrink: 0;
  width: 16px; height: 16px; accent-color: var(--nrp-orange);
}
.modal__check-wrap { margin-top: 2px; }

/* Modal field adornments — info pill + calendar icon overlay.
   The info pill rides on .field__label after the label text, and only
   exists in modals that need to explain a field via title-attr tooltip.
   The date-wrap mirrors .field__affix-wrap, but anchored on the right
   for a non-interactive icon (pointer-events:none — the native date
   picker stays clickable through it). */
.field__info {
  width: 13px; height: 13px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--nrp-card-border);
  color: var(--nrp-text-dim);
  font-size: 9px; font-weight: 700; cursor: help;
  letter-spacing: 0; text-transform: none;
  font-family: var(--nrp-font-body);
}
.field__date-wrap { position: relative; }
.field__date-wrap .field__input,
.field__date-wrap .nrp-input { padding-right: 34px !important; }
.field__date-icon {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--nrp-text-dim); pointer-events: none;
}

/* Upload zone — cream-tinted dashed-border drop target.
   Used by the renters-insurance modal; the same shell can be reused
   anywhere we want a file-pick + drag-drop affordance. The "is-drag"
   class is toggled on dragenter/dragover by the modal's inline JS. */
.upload {
  background: var(--nrp-card-raised);
  border: 1.5px dashed var(--nrp-orange-tint-strong);
  border-radius: var(--nrp-r-md);
  padding: 18px 18px;
  text-align: center;
  transition: border-color var(--nrp-dur-fast) var(--nrp-ease),
              background var(--nrp-dur-fast) var(--nrp-ease);
}
.upload:hover, .upload.is-drag {
  border-color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
}
.upload__icon {
  width: 28px; height: 28px;
  margin: 0 auto 6px;
  color: var(--nrp-orange);
  display: flex; align-items: center; justify-content: center;
}
.upload__icon svg { width: 24px; height: 24px; }
.upload__title {
  font-family: var(--nrp-font-display);
  font-size: 14px; font-weight: 500;
  color: var(--nrp-text); letter-spacing: -0.1px;
  line-height: 1.3;
}
.upload__hint {
  font-size: 12px; color: var(--nrp-text-mid);
  margin-top: 2px;
}
.upload__actions {
  margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.upload__or {
  font-size: 11px; color: var(--nrp-text-dim);
  text-transform: uppercase; letter-spacing: 1.2px;
}
.upload__formats {
  font-size: 11px; color: var(--nrp-text-dim);
  margin-top: 8px;
  font-family: var(--nrp-font-text, var(--nrp-font-body));
  letter-spacing: 0.2px;
}
/* Once a file is chosen, the bottom format-hint line is redundant —
   the staff already picked a file, telling them what types are
   accepted is wasted vertical space. */
.upload.is-done .upload__formats,
.upload.is-processing .upload__formats { display: none; }

/* Done / processing variants for the upload icon. Two SVGs share the
   icon slot (a check and a partial-arc spinner); CSS picks which is
   visible based on the .is-processing / .is-done state class on the
   parent zone. We avoid the [hidden] HTML attribute on the SVGs —
   it isn't honored on SVG elements in all browsers, which left both
   icons rendering side-by-side. */
.upload__icon--done svg { width: 28px; height: 28px; }
.upload.is-processing .upload__icon { color: var(--nrp-info, var(--nrp-text-mid)); }
.upload.is-done .upload__icon { color: var(--nrp-success, var(--nrp-orange)); }
.upload__icon [data-upload-spin] { display: none; }
.upload.is-processing .upload__icon [data-upload-check] { display: none; }
.upload.is-processing .upload__icon [data-upload-spin] { display: inline-block; }
.upload__spin { animation: nrp-spin 0.85s linear infinite; transform-origin: 50% 50%; }

/* Inline status line beneath the filename — replaces the old hint
   slot when an upload has been chosen. Tones reuse existing colour
   tokens; "processing" gets a leading spinner-style dot to reinforce
   the in-flight state. */
.upload__status {
  font-size: 12px;
  color: var(--nrp-text-mid);
  margin-top: 4px;
  line-height: 1.35;
  min-height: 1em;
}
.upload__status--processing { color: var(--nrp-info, var(--nrp-text-mid)); }
.upload__status--success    { color: var(--nrp-success, var(--nrp-text-mid)); font-weight: 500; }
.upload__status--error      { color: var(--nrp-danger, var(--nrp-text-mid)); }

/* Disable the dashed-orange hover effect once a file is chosen — the
   tile is in a "selected" state, so a hover glow reads wrong. */
.upload.is-done, .upload.is-processing { background: var(--nrp-card-raised); }
.upload.is-done:hover, .upload.is-processing:hover {
  border-color: var(--nrp-orange-tint-strong);
  background: var(--nrp-card-raised);
}

/* Tenant checklist — bordered card with row-divider lines, no zebra.
   Each row is a <label> wrapping a native checkbox + name + meta.
   Hover feedback comes from --nrp-row-hover; a checked row gets the
   orange tint for a quiet "yes, this one" affordance. */
.tenants-hint {
  font-size: 12.5px; color: var(--nrp-text-mid);
  line-height: 1.5; text-wrap: pretty;
  margin: 0;
}
.tenant-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  overflow: hidden;
}
.tenant-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  border-top: 1px solid var(--nrp-row-border);
  transition: background var(--nrp-dur-fast) var(--nrp-ease);
}
.tenant-row:first-child { border-top: 0; }
.tenant-row:hover { background: var(--nrp-row-hover); }
.tenant-row input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--nrp-orange);
  margin: 0; cursor: pointer; flex-shrink: 0;
}
.tenant-row__name {
  font-size: 13.5px; font-weight: 500;
  color: var(--nrp-text);
  flex: 1; min-width: 0;
}
.tenant-row__meta {
  font-size: 11.5px; color: var(--nrp-text-dim);
  font-family: var(--nrp-font-text, var(--nrp-font-body));
}
.tenant-row.is-checked { background: var(--nrp-orange-tint); }

/* Modal footer split layout — left-aligned legend + right-aligned
   action buttons, on the strip background. The base .modal__foot
   already supplies flex + 14px 24px padding; the split modifier just
   swaps the background and flips justify-content. */
.modal__foot--split {
  justify-content: space-between;
  background: var(--nrp-strip-bg);
}
.modal__foot-left {
  font-size: 11.5px; color: var(--nrp-text-dim);
  display: flex; align-items: center; gap: 6px;
}
.modal__foot-left .req { color: var(--nrp-orange); }
.modal__foot-actions { display: flex; gap: 8px; }

/* Document link pill — used in mini-table rows to open an attachment
   inline in a new tab. Sized like a small ghost button so it actually
   reads as clickable in a dense row, with a brief "Opening…" state
   the JS toggles on click (since the new-tab spinner is invisible
   from this page). */
.doc-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: var(--nrp-r-sm);
  border: 1px solid var(--nrp-card-border);
  background: var(--nrp-card-raised);
  color: var(--nrp-text);
  font-size: 11.5px; font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color var(--nrp-dur-fast) var(--nrp-ease),
              background var(--nrp-dur-fast) var(--nrp-ease),
              color var(--nrp-dur-fast) var(--nrp-ease);
}
.doc-link:hover {
  border-color: var(--nrp-orange);
  color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
}
.doc-link__icon { width: 12px; height: 12px; flex-shrink: 0; }
.doc-link__pending { display: none; font-style: italic; color: var(--nrp-text-mid); }
.doc-link.is-opening .doc-link__text    { display: none; }
.doc-link.is-opening .doc-link__pending { display: inline; }

/* Pet status pill — displays per-row state on the Pets section. Uses
   the existing semantic colour tokens; "neutral" = covered-by-lease,
   "success" = active addendum signed and effective, "warning" = pending
   or future-effective, "danger" = declined / void. */
.pet-status {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--nrp-r-sm);
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
  font-family: var(--nrp-font-text, var(--nrp-font-body));
}
.pet-status--neutral { background: var(--nrp-strip-bg); color: var(--nrp-text-mid); }
.pet-status--success { background: var(--nrp-success-tint); color: var(--nrp-success); }
.pet-status--warning { background: var(--nrp-warn-tint, var(--nrp-orange-tint)); color: var(--nrp-warn, var(--nrp-orange)); }
.pet-status--danger  { background: var(--nrp-danger-tint, var(--nrp-orange-tint)); color: var(--nrp-danger); }

/* One-line agreement banner above the Pets table. Same colour palette
   as .pet-status but full-width and slightly heavier weight. */
.pet-agmt-banner {
  font-size: 12.5px; font-weight: 500;
  padding: 8px 12px; margin-bottom: 10px;
  border-radius: var(--nrp-r-sm);
  border: 1px solid transparent;
}
.pet-agmt-banner--neutral { background: var(--nrp-strip-bg); color: var(--nrp-text-mid); }
.pet-agmt-banner--success { background: var(--nrp-success-tint); color: var(--nrp-success); }
.pet-agmt-banner--warning { background: var(--nrp-warn-tint, var(--nrp-orange-tint)); color: var(--nrp-warn, var(--nrp-orange)); }
.pet-agmt-banner--danger  { background: var(--nrp-danger-tint, var(--nrp-orange-tint)); color: var(--nrp-danger); }

/* Rent-change summary box inside the Add Pet modal — neutral surface
   for the read-only computed total. */
.rent-summary {
  font-size: 12.5px; color: var(--nrp-text-mid);
  background: var(--nrp-card-raised);
  border-radius: var(--nrp-r-sm);
  padding: 8px 12px;
}

/* Pet rows in the Add Pet modal stack vertically; subsequent rows get
   a top divider so multi-pet adds read clearly. */
.ap-pet-row + .ap-pet-row {
  border-top: 1px solid var(--nrp-row-border);
  padding-top: 12px; margin-top: 12px;
}
.ap-row-actions { margin-top: 8px; text-align: right; }

/* Autofill banner — quiet info pill that surfaces when AI populates
   form fields. The pill itself uses .nrp-pill .nrp-pill--info; the
   wrapper just hangs a small leading dot in front of the label and
   gives the row some breathing room above the next field. */
.ai-autofill { margin: 0 0 6px; }
.ai-autofill .nrp-pill { display: inline-flex; align-items: center; gap: 6px; }
.ai-autofill__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nrp-info, var(--nrp-orange));
  flex-shrink: 0;
}

/* Spinner glyph for loading buttons (.nrp-btn[data-loading="1"]) */
.nrp-btn[data-loading="1"] { position: relative; color: transparent !important; pointer-events: none; }
.nrp-btn[data-loading="1"]::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%;
  color: #f5f1e8;
  animation: nrp-spin 0.7s linear infinite;
}
@keyframes nrp-spin { to { transform: rotate(360deg); } }

/* ──────────────────────────────────────────────────────────────
   Admin shell (Admin Redesign v2)
   Mounted inside the main content pane (which already has
   margin-left:240px from .main-content) — adds a 240px secondary
   nav next to the navy sidebar plus the content stage.
   ────────────────────────────────────────────────────────────── */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--nrp-bg);
  font-family: var(--nrp-font-body);
}

.admin-nav {
  border-right: 1px solid var(--nrp-card-border);
  padding: 22px 0 40px;
  background: var(--nrp-bg);
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
}
.admin-nav__header {
  padding: 0 22px 14px;
  border-bottom: 1px solid var(--nrp-row-border);
  margin-bottom: 12px;
}
.admin-nav__eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--nrp-text-mid);
  font-weight: 600;
}
.admin-nav__title {
  font-family: var(--nrp-font-display);
  font-weight: 500;
  font-size: 22px;
  color: var(--nrp-text);
  letter-spacing: -0.3px;
  margin-top: 4px;
  line-height: 1.1;
}
.admin-nav__sub {
  font-size: 12px;
  color: var(--nrp-text-mid);
  margin-top: 4px;
  line-height: 1.5;
}
.admin-nav__group { padding: 6px 0 10px; }
.admin-nav__group-label {
  padding: 8px 22px 6px;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--nrp-text-dim);
  font-weight: 600;
}
.admin-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 22px;
  font-size: 13.5px;
  color: var(--nrp-text-mid);
  text-decoration: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: color 120ms, background 120ms;
}
.admin-nav__item .nrp-icon { width: 14px; height: 14px; opacity: 0.7; flex-shrink: 0; }
.admin-nav__item:hover { color: var(--nrp-text); background: var(--nrp-row-hover); }
.admin-nav__item.is-active {
  color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
  border-left-color: var(--nrp-orange);
  font-weight: 500;
}
.admin-nav__item.is-active .nrp-icon { opacity: 1; color: var(--nrp-orange); }

.admin-main { padding: 24px 32px 60px; min-width: 0; }

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 4px;
}
.admin-head__crumbs { font-size: 12px; color: var(--nrp-text-dim); }
.admin-head__crumbs a { color: var(--nrp-orange); text-decoration: none; cursor: pointer; }
.admin-head__crumbs a:hover { text-decoration: underline; }
.admin-head__crumbs .sep { margin: 0 6px; opacity: 0.5; }
.admin-head__crumbs .here { color: var(--nrp-text); }
.admin-head__title {
  font-family: var(--nrp-font-display);
  font-weight: 500;
  font-size: 28px;
  color: var(--nrp-text);
  letter-spacing: -0.4px;
  margin-top: 6px;
  line-height: 1.1;
}
.admin-head__sub {
  font-size: 13px;
  color: var(--nrp-text-mid);
  margin-top: 6px;
  max-width: 60ch;
  line-height: 1.5;
}

.admin-tabs { margin-top: 18px; }

.admin-panel { margin-top: 22px; }
/* Sparse list panels (Roles, Users, Property Managers, etc.) — cap so the
   2-3 column rows don't stretch into a wide empty band. Editor panels
   that need full-width keep the unmodified .admin-panel. */
.admin-panel--list { max-width: min(960px, 100%); }
.admin-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-bottom: 0;
  border-top-left-radius: var(--nrp-r-md);
  border-top-right-radius: var(--nrp-r-md);
}
.admin-panel__title {
  font-family: var(--nrp-font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--nrp-text);
}
.admin-panel__count {
  font-size: 11px;
  color: var(--nrp-text-dim);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--nrp-card-raised);
}
.admin-panel__spacer { flex: 1; }
.admin-panel__search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--nrp-input-bg);
  border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-sm);
  font-size: 12.5px;
  color: var(--nrp-text-mid);
  width: 220px;
}
.admin-panel__search svg { width: 13px; height: 13px; flex-shrink: 0; }
/* The base.html style block has a global
   `input:not([type=checkbox]):not([type=radio]) { border: 1.5px ... }` rule
   with specificity 0,0,2,1; match it with an attribute selector here so the
   nested-box look from that border gets overridden. */
.admin-panel__search input[type="text"] {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  margin: 0;
  padding: 0;
  height: 18px;
  line-height: 18px;
  font-size: 12.5px;
  color: var(--nrp-text);
  font-family: inherit;
  text-align: center;
}
.admin-panel__search input[type="text"]:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.admin-panel__body {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-bottom-left-radius: var(--nrp-r-md);
  border-bottom-right-radius: var(--nrp-r-md);
  overflow: hidden;
}

.admin-helptext {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.admin-helptext__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: 6px;
  color: var(--nrp-orange);
}
.admin-helptext__icon svg { width: 14px; height: 14px; }
.admin-helptext__title { font-size: 13px; font-weight: 500; color: var(--nrp-text); }
.admin-helptext__body {
  font-size: 12.5px;
  color: var(--nrp-text-mid);
  margin-top: 2px;
  line-height: 1.55;
}
.admin-helptext__body a { color: var(--nrp-orange); text-decoration: none; }
.admin-helptext__body a:hover { text-decoration: underline; }

/* When the admin or project shell is rendered, neutralize the .container's
   max-width centering + padding so the shell fills the full
   remainder past the navy sidebar (no empty gutter on the left). */
.container:has(> .admin-shell),
.container:has(> .proj-shell),
.container:has(> .marketing-shell) {
  max-width: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Lock document scroll on admin pages — the shell-style sections
   (.admin-shell) and the detail-style pages (.admin-detail-page,
   role/user detail) all sized themselves to natural content + chrome
   margins, which produced a 1-2px vestigial scrollbar when the page
   nearly filled the viewport. Scope the body lock with :has() so
   non-admin pages keep their natural document scroll.

   Scroll lives on .main-content (the area to the right of the navy
   sidebar) so the scrollbar docks to the viewport's right edge, not
   to the centered .container's right edge. */
body:has(.admin-shell),
body:has(.proj-shell),
body:has(.marketing-shell),
body:has(.admin-detail-page) { overflow: hidden; }
body:has(.admin-shell) .main-content,
body:has(.proj-shell) .main-content,
body:has(.marketing-shell) .main-content,
body:has(.admin-detail-page) .main-content {
  height: 100vh;
  overflow-y: auto;
}
.admin-shell { min-height: 0; height: 100%; }
.marketing-shell { min-height: 0; height: 100%; }

/* ──────────────────────────────────────────────────────────────
   Project detail shell (Project Detail redesign, Phase 1)
   Clone of the Admin shell above: a 2-col grid (project section
   rail + main pane) mounted inside the main content area, with
   the navy sidebar from base.html to its left. The rail replaces
   the old horizontal project tab strip; Website is an
   expand-in-place group nesting its six subsections.
   ────────────────────────────────────────────────────────────── */
.proj-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--nrp-bg);
  font-family: var(--nrp-font-body);
}

.proj-nav {
  border-right: 1px solid var(--nrp-card-border);
  padding: 22px 0 40px;
  background: var(--nrp-bg);
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
}
.proj-nav__header {
  padding: 0 22px 14px;
  border-bottom: 1px solid var(--nrp-row-border);
  margin-bottom: 12px;
}
.proj-nav__eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--nrp-text-mid);
  font-weight: 600;
}
.proj-nav__title {
  font-family: var(--nrp-font-display);
  font-weight: 500;
  font-size: 19px;
  color: var(--nrp-text);
  letter-spacing: -0.3px;
  margin-top: 4px;
  line-height: 1.15;
}
.proj-nav__sub {
  font-size: 11.5px;
  color: var(--nrp-text-mid);
  margin-top: 4px;
  line-height: 1.5;
}
.proj-nav__group { padding: 6px 0 10px; }
.proj-nav__group-label {
  padding: 8px 22px 6px;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--nrp-text-dim);
  font-weight: 600;
}
.proj-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 22px;
  font-size: 13px;
  color: var(--nrp-text-mid);
  text-decoration: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: color 120ms, background 120ms;
}
.proj-nav__item .nrp-icon { width: 14px; height: 14px; opacity: 0.7; flex-shrink: 0; }
.proj-nav__item:hover { color: var(--nrp-text); background: var(--nrp-row-hover); }
.proj-nav__item.is-active {
  color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
  border-left-color: var(--nrp-orange);
  font-weight: 500;
}
.proj-nav__item.is-active .nrp-icon { opacity: 1; color: var(--nrp-orange); }
/* Storage when the feature is off — same affordance as the old disabled
   tab (a non-navigable <button disabled> with the explainer tooltip). */
.proj-nav__item.is-disabled {
  color: var(--nrp-text-dim);
  cursor: not-allowed;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  text-align: left;
}
.proj-nav__count {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--nrp-text-dim);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.proj-nav__item.is-active .proj-nav__count { color: var(--nrp-orange); }

/* Expandable Website group (the bits the Admin nav lacks) */
.proj-nav__chev {
  width: 11px;
  height: 11px;
  margin-left: auto;
  color: var(--nrp-text-dim);
  transition: transform 180ms var(--nrp-ease);
  flex-shrink: 0;
}
.proj-nav__item.exp-open .proj-nav__chev { transform: rotate(90deg); }
.proj-nav__item.exp-open .proj-nav__count { margin-left: 0; }
.proj-nav__children {
  overflow: hidden;
  max-height: 0;
  transition: max-height 240ms var(--nrp-ease);
}
.proj-nav__children.open { max-height: 360px; }
.proj-nav__child {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 22px 6px 46px;
  font-size: 12.5px;
  color: var(--nrp-text-mid);
  text-decoration: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: color 120ms, background 120ms;
}
.proj-nav__child .nrp-icon { width: 13px; height: 13px; opacity: 0.7; flex-shrink: 0; }
.proj-nav__child:hover { color: var(--nrp-text); background: var(--nrp-row-hover); }
.proj-nav__child.is-active {
  color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
  border-left-color: var(--nrp-orange);
  font-weight: 500;
}
.proj-nav__child.is-active .nrp-icon { opacity: 1; color: var(--nrp-orange); }
.proj-nav__child .proj-nav__count { font-size: 10px; }

.proj-main { padding: 24px 32px 60px; min-width: 0; }
.proj-shell { min-height: 0; height: 100%; }

/* ──────────────────────────────────────────────────────────────
   Project section bodies (Phase 2 Track A — theme conformance)
   Shared styles lifted from repeated inline styles in
   projects/detail.html. Tokens only — no new colors/fonts/radii.
   ────────────────────────────────────────────────────────────── */

/* Flash / error banner at the top of a section body (Units save
   feedback, Features "Settings saved", hostname-CRUD errors). */
.nrp-flash {
  padding: 12px 16px;
  border-radius: 4px;
  margin-top: 18px;
  font-size: 13px;
}
.nrp-flash--success {
  background: var(--nrp-success-tint);
  border: 1px solid var(--nrp-success);
  color: var(--nrp-success);
}
.nrp-flash--danger {
  background: var(--nrp-danger-tint);
  border: 1px solid var(--nrp-danger);
  color: var(--nrp-danger);
}

/* Section header row above a table/card (Units / Extra Parking /
   Storage): display-serif title left, action buttons right. */
.proj-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 14px;
}
.proj-section-head__title {
  font-family: var(--nrp-font-display);
  font-size: 17px;
  color: var(--nrp-text);
}

/* Row actions cell (Parking + Storage tables): Edit link · | · Delete.
   The delete is a real <button> inside its POST form, styled as a
   text action in the danger color. Scoped to .proj-main so it doesn't
   override the shared .nrp-row-actions utility (defined earlier with a
   different flex/icon-cluster contract) for other list/table UIs. */
.proj-main .nrp-row-actions {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  text-align: right;
  font-size: 12px;
}
.proj-main .nrp-row-actions__divider { color: var(--nrp-card-border); }
.proj-main .nrp-row-actions__delete {
  background: none;
  border: none;
  color: var(--nrp-danger);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* ──────────────────────────────────────────────────────────────
   Admin Redesign v2 — shared utilities lifted from per-template
   inline styles. Tokens only — no new colors/fonts/radii.
   ────────────────────────────────────────────────────────────── */

/* Sticky bottom save bar — used by any tab with editable globals
   (Auto-Reply, AI, Integrations, Screening Defaults, …). Cancel
   (ghost) + Save (navy) on the right; warn-pill slot on the left
   for "Unsaved changes". */
.admin-savebar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: 24px;
  background: var(--nrp-card);
  border-top: 1px solid var(--nrp-card-border);
  height: 56px;
  /* Outer strip spans full .admin-main width; inner content is
     constrained so its right edge aligns with the .admin-panel--list
     right edge above. */
}
.admin-savebar__inner {
  max-width: min(960px, 100%);
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-savebar__spacer { flex: 1; }
.admin-savebar__dirty { display: none; }
.admin-savebar.is-dirty .admin-savebar__dirty { display: inline-flex; }
/* Back-compat: savebars without __inner still center-align their buttons. */
.admin-savebar:not(:has(.admin-savebar__inner)) {
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Generic admin list-table pattern (User row from the mock).
   Header strip + grid rows joined to the panel body. */
.admin-list-table { width: 100%; }
.admin-list-row {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--nrp-row-border);
}
.admin-list-row--head {
  padding: 10px 18px;
  background: var(--nrp-card-raised);
  border-top: 0;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--nrp-text-mid);
  font-weight: 600;
}
.admin-list-row:hover:not(.admin-list-row--head) { background: var(--nrp-row-hover); }

/* Avatar circle (used in user list). */
.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nrp-orange-tint);
  color: var(--nrp-orange);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Icon-only action button used in row actions. */
.admin-iconbtn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--nrp-text-dim);
  cursor: pointer;
  transition: all 120ms;
}
.admin-iconbtn:hover {
  color: var(--nrp-orange);
  border-color: var(--nrp-card-border);
  background: var(--nrp-card-raised);
}
.admin-iconbtn svg { width: 14px; height: 14px; }

/* Stat tiles used by AI Costs (3-up grid). */
.admin-statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.admin-stat {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  padding: 14px 16px;
}
.admin-stat__label {
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--nrp-text-mid);
  font-weight: 600;
}
.admin-stat__value {
  font-family: var(--nrp-font-mono);
  font-size: 22px;
  color: var(--nrp-text);
  margin-top: 4px;
  font-weight: 500;
}
.admin-stat__sub {
  font-size: 11.5px;
  color: var(--nrp-text-dim);
  margin-top: 4px;
}

/* Shared modal chrome (replaces the inline
   "background: var(--bg-card); border-radius: 16px; padding: 1.75rem"
   pattern repeated across every admin section). */
.nrp-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.nrp-modal__overlay.is-open { display: flex; }
.nrp-modal__panel {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  width: min(560px, 92vw);
  /* vh fallback first; dvh tracks iOS Safari's visible viewport so
     the panel's foot doesn't get pushed under the URL bar. */
  max-height: 85vh;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nrp-modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--nrp-card-border);
}
.nrp-modal__title {
  font-family: var(--nrp-font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--nrp-text);
  flex: 1;
}
.nrp-modal__close {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--nrp-text-dim);
  cursor: pointer;
}
.nrp-modal__close:hover { color: var(--nrp-text); background: var(--nrp-row-hover); }
.nrp-modal__body {
  padding: 18px;
  overflow: auto;
  /* Same Safari fix as the other modal patterns: without flex:1 +
     min-height:0 the body refuses to shrink below its content height
     and the foot can be pushed off-screen on tall content. */
  flex: 1 1 auto;
  min-height: 0;
}
/* Form-wrapper bridge for any admin-section modal that wraps its
   __head/__body/__foot in a <form> (mirrors the same rule on .modal
   and .nrp-modal). Without it the form is the only flex child of the
   panel and the body's flex chain is dormant. */
.nrp-modal__panel > form {
  display: flex; flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}
.nrp-modal__foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid var(--nrp-card-border);
  background: var(--nrp-card-raised);
}

/* Slide-in animation used by the AI draft-reply notification log. */
@keyframes draft-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Tag-pill picker (project assignment in user modal, similar pickers
   in template tag and notification rule editors). */
.edit-proj-tag {
  display: inline-flex;
  align-items: center;
  background: var(--nrp-card-raised);
  color: var(--nrp-text-mid);
  padding: 2px 8px;
  border-radius: var(--nrp-r-pill);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.edit-proj-tag:hover { color: var(--nrp-text); }
.edit-proj-tag.selected {
  background: var(--nrp-orange);
  color: #f5f1e8;
  border-color: var(--nrp-orange);
}

/* Assignment-rules pills + add-row pattern (assignments.html). */
.assign-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--nrp-card-raised);
  padding: 3px 10px;
  border-radius: var(--nrp-r-pill);
  font-size: 12.5px;
  color: var(--nrp-text);
}
.assign-pill__rm {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--nrp-text-dim);
  font-size: 14px;
  padding: 0;
  line-height: 1;
}
.assign-pill__rm:hover { color: var(--nrp-danger); }
.assign-add-row { display: none; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.assign-add-row.is-visible { display: flex; }

/* Integrations form layout (sections/integrations.html). */
.admin-int-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 6px 14px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--nrp-row-border);
}
.admin-int-row:first-of-type { border-top: 0; }
.admin-int-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--nrp-text);
  padding-top: 8px;
}
.admin-int-required { color: var(--nrp-danger); margin-left: 2px; }
.admin-int-source { font-size: 11.5px; color: var(--nrp-text-dim); margin-top: 4px; }
.admin-int-source--db { color: var(--nrp-orange); }
.admin-int-hint { font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 4px; }
.admin-int-secret-actions { display: inline-flex; gap: 6px; margin-left: 6px; }
.admin-int-test-result { margin-top: 8px; font-size: 13px; }
.admin-int-test-result--ok { color: var(--nrp-success); }
.admin-int-test-result--fail { color: var(--nrp-danger); }
.admin-int-webhook {
  background: var(--nrp-card-raised);
  padding: 12px 14px;
  border-radius: var(--nrp-r-md);
  margin-bottom: 16px;
}

/* Property Managers admin section. */
.pm-table { width: 100%; border-collapse: collapse; }
.pm-table th {
  text-align: left; padding: 10px 18px;
  background: var(--nrp-card-raised);
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
  border-bottom: 1px solid var(--nrp-row-border);
}
.pm-table td {
  padding: 12px 18px;
  border-top: 1px solid var(--nrp-row-border);
  font-size: 13px; color: var(--nrp-text);
}
.pm-row:hover { background: var(--nrp-row-hover); }
.pm-action {
  background: none; border: 0; cursor: pointer;
  font-size: 12px; font-weight: 500;
  padding: 4px 8px; border-radius: 4px;
  color: var(--nrp-text-mid);
  transition: all 120ms;
}
.pm-action:hover { color: var(--nrp-text); background: var(--nrp-card-raised); }
.pm-action--delete:hover { color: var(--nrp-danger); background: var(--nrp-danger-tint); }
.pm-primary-badge {
  display: inline-flex; align-items: center;
  background: var(--nrp-success-tint); color: var(--nrp-success);
  padding: 2px 8px; border-radius: var(--nrp-r-pill);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}

/* Notifications admin (top-level). */
.notif-rule {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  margin-top: 12px;
  overflow: hidden;
}
.notif-rule__head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
}
.notif-rule__head:hover { background: var(--nrp-row-hover); }
.notif-rule__title { font-weight: 500; color: var(--nrp-text); font-size: 13.5px; flex: 1; }
.notif-rule__chev {
  width: 12px; height: 12px;
  transition: transform var(--nrp-dur-fast);
  color: var(--nrp-text-mid);
}
.notif-rule.is-open .notif-rule__chev { transform: rotate(90deg); }
.notif-rule__body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--nrp-row-border);
}
.notif-rule.is-open .notif-rule__body { display: block; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--nrp-text-dim);
  display: inline-block;
}
.notif-dot--on { background: var(--nrp-success); }

/* Template Tags admin (sidebar + panel layout). */
.tt-shell { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.tt-cat-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  font-size: 13px;
  color: var(--nrp-text-mid);
  cursor: pointer;
  border-radius: var(--nrp-r-sm);
  transition: all 120ms;
}
.tt-cat-btn:hover { color: var(--nrp-text); background: var(--nrp-row-hover); }
.tt-cat-btn.is-active {
  color: var(--nrp-orange);
  background: var(--nrp-orange-tint);
  font-weight: 500;
}
.tt-cat-count {
  font-size: 11px;
  color: var(--nrp-text-dim);
  background: var(--nrp-card-raised);
  padding: 1px 8px;
  border-radius: var(--nrp-r-pill);
}

/* ──────────────────────────────────────────
   Project detail — proj-hero header
   Used above the listing-info strip on the project detail page.
   ────────────────────────────────────────── */
.proj-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; padding-bottom: 4px;
}
.proj-hero__title {
  font-family: var(--nrp-font-display); font-size: 32px; font-weight: 500;
  color: var(--nrp-text); letter-spacing: -0.5px; line-height: 1.1;
}
.proj-hero__sub { margin-top: 6px; font-size: 12.5px; color: var(--nrp-text-mid); }
.proj-hero__sub a { color: var(--nrp-orange); text-decoration: none; }
.proj-hero__sub a:hover { text-decoration: underline; }
.proj-hero__sub .proj-hero__strong { color: var(--nrp-text); }
.proj-hero__actions { display: flex; gap: 8px; flex-shrink: 0; padding-top: 6px; }

/* ──────────────────────────────────────────
   Files tab — dropzone, filters, file rows, inline metadata editor,
   right-rail summary, sticky bulk save bar. Token-only — no new colors,
   fonts or radii beyond what's defined above.
   ────────────────────────────────────────── */

/* Neutral pill alias — same look as the default `.nrp-pill`, named so
   templates can be explicit about variant. */
.nrp-pill--neutral { background: rgba(128,128,128,0.18); color: var(--nrp-text); }

/* Two-column body grid for the Files tab. */
.files-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 20px; margin-top: 22px;
  align-items: start;
}

/* Drop zone — replaces the previous "+ Upload" card head. */
.dropzone {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--nrp-strip-bg);
  border: 1px dashed var(--nrp-orange-tint-strong);
  border-radius: var(--nrp-r-md);
  padding: 16px 20px;
}
.dropzone.is-drag { background: var(--nrp-orange-tint); border-color: var(--nrp-orange); }
.dropzone__main { display: flex; align-items: center; gap: 14px; }
.dropzone__icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--nrp-orange-tint); color: var(--nrp-orange);
  flex-shrink: 0;
}
.dropzone__title { font-size: 13.5px; font-weight: 500; color: var(--nrp-text); }
.dropzone__sub { font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 2px; }
.dropzone__sub b { color: var(--nrp-text); font-weight: 500; }

/* Filters bar above the file list. */
.files-filters {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px 12px; flex-wrap: wrap;
}
.files-filters .nrp-search { width: 240px; padding: 6px 10px; font-size: 12.5px; }
.files-filters .nrp-select { width: 160px; padding: 6px 10px; font-size: 12.5px; }
.files-filters__spacer { flex: 1; }
.files-filters__count { font-size: 12px; color: var(--nrp-text-mid); }

/* Help text below the section header — replaces per-row repeated copy. */
.files-helptext {
  font-size: 11.5px; color: var(--nrp-text-dim);
  padding: 10px 4px 14px; line-height: 1.55;
}
.files-helptext code {
  background: var(--nrp-strip-bg); border: 1px solid var(--nrp-row-border);
  padding: 1px 5px; border-radius: 3px; font-size: 10.5px;
}

/* Segmented List/Grid toggle. */
.seg {
  display: inline-flex; border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-sm); overflow: hidden; background: var(--nrp-input-bg);
}
.seg button {
  padding: 6px 12px; font-size: 11.5px; color: var(--nrp-text-mid);
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; border-right: 1px solid var(--nrp-input-border);
}
.seg button:last-child { border-right: 0; }
.seg button.is-on { background: var(--nrp-orange-tint); color: var(--nrp-orange); font-weight: 500; }

/* File list — column header strip + body rows in a 6-col grid. */
.files-list .scope-row {
  display: grid; grid-template-columns: 36px 1fr 130px 110px 90px 110px;
  gap: 14px; padding: 10px 18px;
  background: var(--nrp-strip-bg);
  border-bottom: 1px solid var(--nrp-row-border);
  font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
}
.files-list .scope-row > .scope-row__actions { text-align: right; }

.file-row {
  display: grid;
  grid-template-columns: 36px 1fr 130px 110px 90px 110px;
  align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--nrp-row-border);
  transition: background 120ms;
}
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--nrp-row-hover); }
.file-row.is-open { background: var(--nrp-strip-bg); }

.file-icon {
  width: 32px; height: 32px;
  background: var(--nrp-orange-tint); color: var(--nrp-orange);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  font-family: var(--nrp-font-body); font-size: 9px; font-weight: 600;
  letter-spacing: 0.5px;
}
.file-name { font-size: 13.5px; font-weight: 500; color: var(--nrp-text); }
.file-meta {
  font-size: 11px; color: var(--nrp-text-mid); margin-top: 2px;
  font-family: var(--nrp-font-body);
}
.file-cell { font-size: 12.5px; color: var(--nrp-text); }
.file-cell--mid { color: var(--nrp-text-mid); }
.file-actions { display: flex; gap: 4px; justify-content: flex-end; }

.icon-btn {
  width: 28px; height: 28px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent;
  color: var(--nrp-text-dim); cursor: pointer; transition: all 120ms;
}
.icon-btn:hover {
  color: var(--nrp-orange);
  border-color: var(--nrp-card-border);
  background: var(--nrp-card-raised);
}
.icon-btn .nrp-icon { width: 14px; height: 14px; }
.icon-btn--rotated .nrp-icon { transform: rotate(180deg); }

.file-name-link {
  display: inline-flex; align-items: center; gap: 0;
  color: var(--nrp-text); cursor: pointer; text-decoration: none;
  background: transparent; border: 0; padding: 0;
  font-family: inherit; text-align: left; min-width: 0;
}
.file-name-link:hover .file-name { color: var(--nrp-orange); }
.file-row.is-open .file-name { color: var(--nrp-orange); }

/* Inline metadata editor revealed when row is open. */
.file-meta-editor {
  grid-column: 1 / -1;
  padding: 14px 0 4px 50px;
  border-top: 1px dashed var(--nrp-row-border);
  margin-top: 12px;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px 16px;
  align-items: end;
}
.file-meta-editor .nrp-field { display: flex; flex-direction: column; gap: 4px; }
.file-meta-editor .nrp-field__label {
  font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
}
.file-meta-editor .col-2 { grid-column: span 2; }
.file-meta-editor .col-3 { grid-column: span 3; }
.file-meta-editor .col-4 { grid-column: span 4; }

.editor-actions {
  grid-column: 1 / -1;
  display: flex; justify-content: flex-end; gap: 8px;
  padding-top: 6px;
}
.editor-saved {
  margin-right: auto; font-size: 11px; color: var(--nrp-success);
  display: inline-flex; align-items: center; gap: 5px;
  opacity: 0; transition: opacity 200ms;
}
.editor-saved.is-on { opacity: 1; }
.editor-saved .nrp-icon { width: 12px; height: 12px; }

.public-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--nrp-text);
}
.public-toggle--disabled { color: var(--nrp-text-dim); }
.public-toggle__hint { font-size: 10.5px; color: var(--nrp-text-dim); margin-left: 4px; }

/* Right rail summary — reuses .rail-card from above (already token-styled);
   we add an info-tinted note variant for the public-files explainer. */
.rail-note--info {
  background: var(--nrp-info-tint);
  margin-top: 14px;
}
.rail-note--info code {
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-row-border);
  padding: 1px 5px; border-radius: 3px; font-size: 10.5px;
}

/* Sticky bulk save bar — appears only when 2+ rows have unsaved bulk
   metadata changes (multi-select reassign). Hidden by default. */
.save-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--nrp-card);
  border-top: 1px solid var(--nrp-row-border);
  z-index: 100;
  display: none;
}
.save-bar.is-on { display: block; }
.save-bar__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.save-bar__warn { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }

/* ── Image thumbnails + gallery (grid) view + lightbox ──────────────────
   Image attachments render a real thumbnail in the icon cell instead of an
   extension chip. The List/Grid toggle reflows the same rows into a photo
   gallery. Clicking any thumbnail opens the shared lightbox. */
.file-icon--img { padding: 0; background: var(--nrp-strip-bg); overflow: hidden; }
.file-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
  cursor: zoom-in; border-radius: 4px;
}

.files-list--grid {
  padding: 14px; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.files-list--grid .scope-row { display: none; }
.files-list--grid .file-row {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  padding: 10px; border: 1px solid var(--nrp-row-border);
  border-radius: var(--nrp-r-md); background: var(--nrp-card-raised);
}
.files-list--grid .file-row:hover { background: var(--nrp-row-hover); }
.files-list--grid .file-icon { width: 100%; height: 120px; border-radius: var(--nrp-r-sm); font-size: 12px; }
.files-list--grid .file-name-link { width: 100%; }
.files-list--grid .file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Declutter the card: hide the tabular scope/role/visibility cells; the
   metadata editor (admin) still works once a card is opened. */
.files-list--grid .file-row > .nrp-pill,
.files-list--grid .file-row > .file-cell { display: none; }
.files-list--grid .file-actions { justify-content: flex-start; }
/* An opened card spans the full row so the 12-col editor lays out normally. */
.files-list--grid .file-row.is-open { grid-column: 1 / -1; }

.img-lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10, 14, 20, 0.86);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.img-lightbox__img {
  max-width: 92vw; max-height: 86vh; object-fit: contain;
  border-radius: var(--nrp-r-sm); box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}
.img-lightbox__caption {
  position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
  color: rgba(245, 241, 232, 0.9); font-size: 12.5px;
}
.img-lightbox__close {
  position: absolute; top: 16px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); color: #fff; border: 0;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.img-lightbox__close:hover { background: rgba(255, 255, 255, 0.18); }
.img-lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); color: #fff; border: 0;
  font-size: 32px; line-height: 1; cursor: pointer;
}
.img-lightbox__nav:hover { background: rgba(255, 255, 255, 0.18); }
.img-lightbox__nav--prev { left: 20px; }
.img-lightbox__nav--next { right: 20px; }
.img-lightbox__nav[hidden] { display: none; }

/* ──────────────────────────────────────────
   Member chip selector — .nrp-mchip
   Used on the Application Detail page to switch which group member's
   data renders below. Selected state = navy fill (matches the active
   sidebar item) so figure/ground separation between selected and
   unselected chips reads at a glance. The 18px-radius .nrp-party-chip
   is intentionally NOT reused here — that family is a status pill
   (lease parties, signatures), not a selector.
   ────────────────────────────────────────── */
.nrp-mchip-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.nrp-mchip-row__label {
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600; min-width: 78px;
}
.nrp-mchip-row__count {
  font-size: 12.5px; color: var(--nrp-text-dim); white-space: nowrap;
}
.nrp-mchip-row__count b { color: var(--nrp-text); font-weight: 500; }

.nrp-mchip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  cursor: pointer;
  transition: background 120ms var(--nrp-ease),
              border-color 120ms var(--nrp-ease),
              box-shadow 120ms var(--nrp-ease);
  font-family: var(--nrp-font-body);
  color: var(--nrp-text);
  text-decoration: none;
}
button.nrp-mchip { font: inherit; text-align: left; outline: none; }
.nrp-mchip:hover {
  background: var(--nrp-card-raised);
  border-color: var(--nrp-card-border);
}
.nrp-mchip:focus-visible { outline: 2px solid var(--nrp-orange); outline-offset: 2px; }
.nrp-mchip.is-cancelled { opacity: 0.55; }

.nrp-mchip__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--nrp-orange-tint); color: var(--nrp-orange-deep);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.4px;
}
.nrp-mchip__text {
  display: flex; flex-direction: column; line-height: 1.25; min-width: 0;
}
.nrp-mchip__name {
  font-size: 13px; font-weight: 500; color: var(--nrp-text);
  white-space: nowrap;
}
.nrp-mchip__meta {
  font-size: 11.5px; color: var(--nrp-text-dim); margin-top: 1px;
  white-space: nowrap;
}

/* Selected — navy surface lifted from the sidebar's active item.
   Tokens (--nrp-side-bg / --nrp-side-text) are dark-mode-only; the
   light-theme palette doesn't redefine them, so the literal hex values
   are used directly to guarantee the same look in both themes. */
.nrp-mchip.is-selected,
.nrp-mchip[aria-selected="true"] {
  background: #2f3b46;
  border-color: #2f3b46;
  box-shadow: 0 1px 0 rgba(47,59,70,0.04),
              0 6px 14px -6px rgba(47,59,70,0.35);
}
.nrp-mchip.is-selected .nrp-mchip__name,
.nrp-mchip[aria-selected="true"] .nrp-mchip__name { color: #f5f1e8; }
.nrp-mchip.is-selected .nrp-mchip__meta,
.nrp-mchip[aria-selected="true"] .nrp-mchip__meta { color: rgba(245,241,232,0.65); }
.nrp-mchip.is-selected .nrp-mchip__avatar,
.nrp-mchip[aria-selected="true"] .nrp-mchip__avatar {
  background: rgba(245,241,232,0.14); color: #f5f1e8;
}

/* Overflow "+N" pill — same family, smaller, neutral surface so it
   reads as a meta control rather than another selectable member. */
.nrp-mchip--more {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-card-border);
  font-size: 12px; font-weight: 500;
  color: var(--nrp-text-mid);
  cursor: pointer;
}
button.nrp-mchip--more { font-family: inherit; outline: none; }
.nrp-mchip--more:hover { color: var(--nrp-text); border-color: var(--nrp-text-dim); }
.nrp-mchip--more:focus-visible { outline: 2px solid var(--nrp-orange); outline-offset: 2px; }

/* ── Addenda list — lease detail page ─────────────────────────────────── */
.nrp-addenda-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nrp-addenda-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--nrp-row-border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--nrp-text);
  font-size: 12.5px;
}
.nrp-addenda-row:hover {
  background: var(--nrp-row-hover, #fafafa);
}
.nrp-addenda-row__label { font-weight: 500; }
.nrp-addenda-row__date { color: var(--nrp-text-mid); }
.nrp-addenda-row__cta { color: var(--nrp-link); font-size: 11px; }


/* ════════════════════════════════════════════════════════════════
   Intake flow — public-facing rental application (/apply/*).
   Marketing-adjacent variant of the CRM: same tokens, same fonts,
   same components — just looser padding and a centered card.
   ════════════════════════════════════════════════════════════════ */

/* Page wrapper — flex column with header / main / footer. */
.intake-shell {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--nrp-strip-bg);
  color: var(--nrp-text);
  font-family: var(--nrp-font-body);
}

/* ─── Header ─────────────────────────────────────────────── */
.intake-header {
  background: #fff;
  border-bottom: 1px solid var(--nrp-card-border);
}
.intake-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.intake-header__brand {
  display: inline-flex; align-items: center; gap: 12px;
  justify-self: start;
  text-decoration: none;
  color: var(--nrp-text);
}
.intake-header__brand img {
  display: block;
  height: 36px; width: 36px;
  border-radius: 4px;
}
.intake-header__brand-word {
  font-family: var(--nrp-font-display);
  font-size: 16px; font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--nrp-text);
}
.intake-header__center {
  text-align: center; line-height: 1.2;
}
.intake-header__center .nrp-eyebrow {
  display: block; margin-bottom: 3px;
}
.intake-header__center-title {
  display: block;
  font-family: var(--nrp-font-display);
  font-size: 17px; font-weight: 500;
  letter-spacing: -0.4px;
  color: var(--nrp-text);
}
.intake-header__right {
  display: flex; align-items: center; gap: 16px;
  justify-self: end;
  font-size: 12.5px;
}
.intake-header__right a { color: var(--nrp-text-mid); text-decoration: none; }
.intake-header__right a:hover { color: var(--nrp-text); }

/* ─── Main + card ────────────────────────────────────────── */
.intake-main {
  flex: 1;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 64px 24px;
}
.intake-card {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  padding: 32px 40px;
}

/* ─── Typography ─────────────────────────────────────────── */
.nrp-display-md {
  font-family: var(--nrp-font-display);
  font-size: 32px; font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: var(--nrp-text);
  margin: 0;
}
.nrp-display-md em {
  font-style: italic;
  color: var(--nrp-orange);
}
.nrp-display-sm {
  font-family: var(--nrp-font-display);
  font-size: 22px; font-weight: 500;
  letter-spacing: -0.3px;
  line-height: 1.2;
  color: var(--nrp-text);
  margin: 0;
}
.nrp-body {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--nrp-text-mid);
  max-width: 52ch;
}

/* ─── Stepper (horizontal dot row) ───────────────────────── */
.intake-stepper {
  display: flex; align-items: center;
  gap: 0;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.intake-stepper__step {
  flex: 1;
  display: flex; align-items: center;
}
.intake-stepper__step:last-child { flex: 0 0 auto; }
.intake-stepper__dot {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--nrp-orange);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  cursor: default;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
/* Completed dots ARE clickable — make that obvious with cursor + a
   subtle lift on hover so the user knows. */
a.intake-stepper__dot { cursor: pointer; }
a.intake-stepper__dot:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(196,106,45,0.15);
}
.intake-stepper__dot--upcoming {
  width: 12px; height: 12px;
  background: transparent;
  border: 1.5px solid var(--nrp-card-border);
  cursor: not-allowed;
}
.intake-stepper__dot--current {
  background: var(--nrp-orange);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--nrp-orange);
  cursor: default;
  width: 16px; height: 16px;
}
.intake-stepper__dot--current::after {
  content: ""; width: 5px; height: 5px;
  background: #fff; border-radius: 50%;
}
.intake-stepper__dot--done svg {
  width: 10px; height: 10px;
  stroke: #fff;
  fill: none; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}
.intake-stepper__rule {
  flex: 1; height: 1px;
  background: var(--nrp-card-border);
  margin: 0 4px;
}

/* Caption below the stepper — clarifies what the dots represent and
   that completed ones can be revisited. */
.intake-stepper-caption {
  text-align: center;
  font-size: 11.5px;
  color: var(--nrp-text-mid);
  margin: 0 0 28px;
}
.intake-stepper-caption strong {
  color: var(--nrp-text);
  font-weight: 500;
}

/* Custom hover tooltip on each dot — replaces the browser-default
   title attribute (which is invisible on touch and slow on desktop).
   Tooltip arrows up from below the dot so it doesn't get clipped by
   the card edge above. */
.intake-stepper__dot[data-tip] { position: relative; }
.intake-stepper__dot[data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--nrp-side-bg);
  color: var(--nrp-side-text);
  font-family: var(--nrp-font-body);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--nrp-r-sm);
  opacity: 0; pointer-events: none;
  transition: opacity 140ms ease;
  z-index: 10;
}
.intake-stepper__dot[data-tip]:hover::before { opacity: 1; }
.intake-stepper__dot[data-tip]::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--nrp-side-bg);
  opacity: 0; pointer-events: none;
  transition: opacity 140ms ease;
}
.intake-stepper__dot[data-tip]:hover::after { opacity: 1; }

/* ─── Step heading (eyebrow + display title) ─────────────── */
.intake-stepheading {
  margin: 0 0 24px;
}
.intake-stepheading .nrp-eyebrow { display: block; margin-bottom: 6px; }
.intake-stepheading .nrp-display-md { margin-top: 0; margin-bottom: 8px; }

/* ─── Form sections + fields ─────────────────────────────── */
.intake-section {
  margin-top: 32px;
}
.intake-section:first-of-type { margin-top: 0; }
.intake-section__title {
  font-family: var(--nrp-font-display);
  font-size: 18px; font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--nrp-text);
  margin: 0 0 14px;
}

.intake-field {
  margin-bottom: 20px;
}
.intake-field:last-child { margin-bottom: 0; }
.intake-field .nrp-label {
  margin-bottom: 8px;
}
.intake-field .nrp-label .req {
  color: var(--nrp-orange);
  margin-left: 2px;
}
.intake-field .nrp-help { margin-top: 6px; font-size: 11.5px; }

/* Sized input variants for short data — phone, date, postal code. */
.nrp-input--short { width: 180px; max-width: 100%; }
.nrp-input--medium { width: 260px; max-width: 100%; }

/* Row of fields side-by-side (first/last name, city/province). */
.intake-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.intake-row > .intake-field { margin-bottom: 0; }
@media (max-width: 640px) {
  .intake-row { grid-template-columns: 1fr; gap: 0; }
  .intake-row > .intake-field { margin-bottom: 20px; }
}

/* ─── Custom checkbox — true square box, orange fill ───── */
/* Upgrades the existing .nrp-checkbox from accent-color-only to a
   full custom appearance. Keeps the existing input.nrp-checkbox
   markup contract so the four templates currently using it (todos,
   projects, contacts) gain the canonical look. */
input.nrp-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin: 0;
  border: 1.5px solid var(--nrp-card-border);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  vertical-align: middle;
  transition: border-color 120ms ease, background 120ms ease;
}
input.nrp-checkbox:hover { border-color: var(--nrp-text-mid); }
input.nrp-checkbox:checked {
  background: var(--nrp-orange);
  border-color: var(--nrp-orange);
}
input.nrp-checkbox:checked::after {
  /* Centered checkmark — rotate around the element's geometric center
     and nudge slightly up (-58%) so the visual weight of the strokes
     (which fall on the bottom-right of the unrotated rect) lands on
     the box's optical center rather than below it. */
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -58%) rotate(45deg);
}
input.nrp-checkbox:focus-visible {
  outline: 2px solid var(--nrp-orange);
  outline-offset: 2px;
}

/* Consent row pattern — checkbox + label inline-flex aligned to
   the first baseline of multi-line text. */
.intake-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.55;
  color: var(--nrp-text);
}
.intake-consent input.nrp-checkbox { margin-top: 3px; }
.intake-consent a { color: var(--nrp-orange); text-decoration: underline; text-underline-offset: 2px; }

/* ─── Error summary banner ─────────────────────────────── */
/* Lives at the top of a step when the form had validation errors.
   Reuses .nrp-banner / .nrp-banner--danger from the CRM stylesheet;
   adds an intake-specific helper for the "jump to field" list. */
.intake-error-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.intake-error-list li {
  margin-top: 4px;
  display: flex;
  gap: 6px;
}
.intake-error-list a {
  color: var(--nrp-danger);
  text-decoration: none;
  font-weight: 500;
}
.intake-error-list a:hover { text-decoration: underline; }

.nrp-input--error {
  border-color: var(--nrp-danger);
  background: var(--nrp-danger-tint);
}
.nrp-help--field-error {
  color: var(--nrp-danger);
  font-size: 11.5px;
  margin-top: 6px;
}

/* ─── Property summary card (Step 1 of 14) ─────────────── */
.intake-summary {
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.intake-summary__row + .intake-summary__row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--nrp-row-border);
}
.intake-summary__row .nrp-eyebrow { display: block; margin-bottom: 4px; }
.intake-summary__value {
  font-family: var(--nrp-font-display);
  font-size: 20px; font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--nrp-text);
}

/* ─── Action row (Back / Continue) ──────────────────────── */
.intake-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 0;
}
.intake-actions__back { margin-right: auto; }
.intake-actions__forward { margin-left: auto; }
.intake-actions svg { width: 12px; height: 12px; }

/* ─── Footer ─────────────────────────────────────────────── */
.intake-footer {
  border-top: 1px solid var(--nrp-card-border);
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--nrp-text-dim);
  background: #fff;
}
.intake-footer a { color: var(--nrp-text-mid); text-decoration: none; }
.intake-footer a:hover { color: var(--nrp-text); }

/* ─── Mobile tweaks ──────────────────────────────────────── */
@media (max-width: 720px) {
  .intake-header__inner {
    grid-template-columns: 1fr; gap: 10px;
    text-align: center;
  }
  .intake-header__brand { justify-self: center; }
  .intake-header__right { justify-self: center; gap: 12px; flex-wrap: wrap; }
  .intake-main { padding: 32px 16px; }
  .intake-card { padding: 24px 20px; border-radius: var(--nrp-r-md); }
  .nrp-display-md { font-size: 26px; }
}

/* ─── Intake entry-page hero (welcome, terms, tos) ────────
   Centered heading block + body paragraph leading the page.
   Used by templates that extend _layout.html directly (not the
   wizard). The form below stays left-aligned for normal field
   reading rhythm. */
.intake-hero {
  text-align: center;
  margin-bottom: 28px;
}
.intake-hero .nrp-eyebrow {
  display: block;
  letter-spacing: 1.8px;
  margin-bottom: 8px;
}
.intake-hero .nrp-display-md {
  margin: 0 auto 14px;
  max-width: 18ch;
}
.intake-hero .nrp-body {
  margin: 0 auto;
  max-width: 42ch;
  text-align: center;
}

/* Generic stack helper — vertical rhythm between blocks inside a
   card without resorting to inline margin styles. */
.intake-stack > * + * { margin-top: 20px; }
.intake-stack--lg > * + * { margin-top: 32px; }

/* Standard a11y utility — visually hidden but readable by screen
   readers. Used by intake debug markers (WELCOME_PAGE etc.) and any
   element that needs to live in the DOM for assistive tech but stay
   off the page visually. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Intake radios + yes/no fieldsets ───────────────────── */
/* Custom radio appearance — mirror the .nrp-checkbox treatment. */
input.nrp-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin: 0;
  border: 1.5px solid var(--nrp-card-border);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  vertical-align: middle;
  transition: border-color 120ms ease;
}
input.nrp-radio:hover { border-color: var(--nrp-text-mid); }
input.nrp-radio:checked { border-color: var(--nrp-orange); }
input.nrp-radio:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--nrp-orange);
  border-radius: 50%;
}
input.nrp-radio:focus-visible {
  outline: 2px solid var(--nrp-orange);
  outline-offset: 2px;
}

.intake-yesno {
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  padding: 14px 16px;
  margin: 0;
}
.intake-yesno legend {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--nrp-text);
  padding: 0 4px;
  margin-left: -4px;
}
.intake-yesno__options {
  display: flex;
  gap: 24px;
  margin-top: 10px;
}
.intake-yesno__options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--nrp-text);
  cursor: pointer;
}
.intake-yesno--error { border-color: var(--nrp-danger); background: var(--nrp-danger-tint); }

/* ─── Intake input affix (prefix/suffix) ─────────────────── */
/* Wrap a .nrp-input + a unit label ("$", "/ mo", "%", etc.). The
   affix sits inside a single border with the input. Used by intake
   currency / months fields. */
.intake-affix {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  background: #fff;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.intake-affix:focus-within {
  border-color: var(--nrp-orange);
  box-shadow: 0 0 0 3px rgba(196,106,45,0.14);
}
.intake-affix > .nrp-input {
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
}
.intake-affix > .nrp-input:focus { box-shadow: none; outline: none; }
.intake-affix__suffix,
.intake-affix__prefix {
  display: inline-flex; align-items: center;
  padding: 0 12px;
  font-size: 13px;
  color: var(--nrp-text-mid);
  background: var(--nrp-strip-bg);
  border-left: 1px solid var(--nrp-card-border);
}
.intake-affix__prefix { border-left: 0; border-right: 1px solid var(--nrp-card-border); }
.intake-affix--error { border-color: var(--nrp-danger); background: var(--nrp-danger-tint); }

/* Richer consent row — checkbox + title + help text. Used by the
   "consent to contact employer" pattern and similar two-line opt-ins. */
.intake-consent--rich { align-items: flex-start; }
.intake-consent__body { display: flex; flex-direction: column; gap: 4px; }
.intake-consent__title { font-weight: 500; color: var(--nrp-text); }
.intake-consent__help { font-size: 12.5px; color: var(--nrp-text-mid); line-height: 1.5; }

/* Sized variants for the input-affix container. */
.intake-affix--short { max-width: 180px; }
.intake-affix--medium { max-width: 240px; }
.intake-affix--wide { max-width: 320px; }

/* ─── Intake repeating rows (emergency contacts, references, etc.) */
.intake-repeating { display: flex; flex-direction: column; gap: 16px; }
.intake-repeating__row {
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  padding: 16px 18px;
  background: var(--nrp-strip-bg);
  display: flex; flex-direction: column; gap: 16px;
}
.intake-repeating__row legend,
.intake-repeating__row .intake-repeating__title {
  /* Browser-default <legend> straddles the fieldset border. Force it
     into normal block flow so the title sits cleanly inside the
     content area, left-aligned with the field labels below. */
  display: block;
  float: left;
  width: 100%;
  padding: 0;
  margin: 0;
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid);
}
/* Clear the float so the field rows below don't wrap next to it. */
.intake-repeating__row legend + *,
.intake-repeating__row .intake-repeating__title + * { clear: both; }
.intake-repeating__row.is-empty { display: none; }
.intake-row-delete {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--nrp-text-mid);
  cursor: pointer;
}
.intake-row-delete:hover { color: var(--nrp-danger); }
.intake-add-row {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  padding: 8px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--nrp-orange);
  background: transparent;
  border: 1px dashed var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  cursor: pointer;
  font-family: inherit;
}
.intake-add-row:hover { border-color: var(--nrp-orange); }
.intake-add-row svg { width: 12px; height: 12px; }
.intake-form-error {
  color: var(--nrp-danger);
  font-size: 13px;
  margin: 0 0 12px;
}

/* Small inline badge for legend / status pills inside repeating rows */
.intake-badge {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.4px; text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 8px;
  background: var(--nrp-strip-bg);
  color: var(--nrp-text-mid);
  border: 1px solid var(--nrp-card-border);
}
.intake-badge--success { background: var(--nrp-success-tint); color: var(--nrp-success); border-color: transparent; }
.intake-badge--info { background: var(--nrp-info-tint); color: var(--nrp-info); border-color: transparent; }
.intake-badge--muted { background: var(--nrp-strip-bg); color: var(--nrp-text-dim); border-color: transparent; }

.intake-field__readonly {
  font-size: 14px;
  color: var(--nrp-text);
  margin: 0;
  padding: 8px 0;
}

/* Property summary card (Preferences step). Eyebrow + name + spec
   grid (beds/baths/sqft/price). The brief explicitly drops the
   decorative hairline rules around the eyebrow — clean editorial. */
.intake-property-card {
  background: #fff;
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.intake-property-card__head {
  padding: 20px 22px 16px;
  text-align: center;
}
.intake-property-card__head .nrp-eyebrow {
  display: block;
  margin-bottom: 6px;
}
.intake-property-card__name {
  font-family: var(--nrp-font-display);
  font-size: 22px; font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--nrp-text);
  margin: 0;
}
.intake-property-card__unit {
  border-top: 1px solid var(--nrp-card-border);
  padding: 16px 22px 18px;
  background: var(--nrp-strip-bg);
}
.intake-property-card__unit-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--nrp-text-mid);
}
.intake-property-card__unit-head svg { color: var(--nrp-orange); }
.intake-property-card__specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-sm);
  overflow: hidden;
  background: #fff;
}
.intake-property-card__spec {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 8px;
  text-align: center;
  border-right: 1px solid var(--nrp-card-border);
}
.intake-property-card__spec:last-child { border-right: 0; }
.intake-property-card__spec-value {
  font-family: var(--nrp-font-display);
  font-size: 20px; font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--nrp-text);
}
.intake-property-card__spec-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--nrp-text-mid);
  margin-top: 2px;
}
.intake-property-card__spec--price .intake-property-card__spec-value {
  color: var(--nrp-orange);
}

/* ─── Intake review summary sections ─────────────────────── */
/* Used by the final review.html step to render each section's data
   as a labeled dl with an Edit link in the corner. */
.intake-review { display: flex; flex-direction: column; gap: 24px; }
.intake-review__section {
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  padding: 18px 20px;
  background: #fff;
}
.intake-review__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--nrp-row-border);
}
.intake-review__head h2 {
  font-family: var(--nrp-font-display);
  font-size: 17px; font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--nrp-text);
  margin: 0;
  display: flex; align-items: baseline; gap: 8px;
}
.intake-review__num {
  color: var(--nrp-orange);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0;
}
.intake-review__edit {
  font-size: 12px; font-weight: 500;
  color: var(--nrp-orange);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.intake-review__edit:hover { text-decoration: underline; }
.intake-review__dl {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr;
  column-gap: 16px;
  row-gap: 8px;
  margin: 0;
}
.intake-review__dl dt {
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--nrp-text-mid);
  align-self: center;
}
.intake-review__dl dd {
  font-size: 13.5px;
  color: var(--nrp-text);
  margin: 0;
}
.intake-review__dl dd.is-empty { color: var(--nrp-text-dim); font-style: italic; }
.intake-review__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13.5px;
}
.intake-review__empty { color: var(--nrp-text-dim); font-style: italic; font-size: 13.5px; margin: 0; }
.intake-review__skip { color: var(--nrp-text-dim); font-style: italic; font-size: 13.5px; margin: 0; }
.intake-review__subsection { margin-top: 12px; }
.intake-review__subsection h3 {
  font-size: 12px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--nrp-text-mid);
  margin: 0 0 6px;
}

.intake-review__submit {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  display: flex; flex-direction: column; gap: 12px;
}
.intake-review__submit p {
  margin: 0;
  font-size: 13px; color: var(--nrp-text-mid); line-height: 1.55;
}

/* ── Ad Studio: Brief panel ───────────────────────────────────────── */
.panel-brief {
  /* Inherits .panel base styling. */
}

.brief-placement {
  margin-top: 1rem;
}

.brief-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.brief-card {
  padding: 0.75rem 1rem;
  border: 1px solid var(--nrp-card-border);
  border-radius: 4px;
  background: var(--nrp-card-raised);
}

.brief-card-copy-preview {
  font-size: 0.9em;
  color: var(--nrp-text-mid);
  margin-bottom: 0.5rem;
}

.brief-readonly {
  margin: 0.5rem 0;
}

.brief-readonly p {
  margin: 0.25rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   Contacts list — hover-reveal row actions.

   Anchored in the row's final <td> (Move-in cell). Hidden at rest,
   `display: inline-flex` on row hover. The cell keeps its original
   move-in date underneath; the action group floats over.
   ═══════════════════════════════════════════════════════════════ */
.c-row__cell--actions { position: relative; }
.c-row__actions {
  display: none;
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  gap: 4px;
  padding: 4px;
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  white-space: nowrap;
  z-index: 2;
}
.c-row:hover .c-row__actions,
.c-row:focus .c-row__actions,
.c-row:focus-within .c-row__actions { display: inline-flex; }
.c-row__action {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 4px;
  font-family: inherit; font-size: 12px; font-weight: 500;
  line-height: 1;
  border: 1px solid var(--nrp-card-border);
  background: var(--nrp-card);
  color: var(--nrp-text);
  cursor: pointer;
  text-decoration: none;
}
.c-row__action:hover { background: var(--nrp-row-hover); color: var(--nrp-text); }
.c-row__action svg {
  width: 11px; height: 11px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.c-row__action--primary {
  background: var(--nrp-orange-tint);
  border-color: var(--nrp-orange-tint-strong);
  color: var(--nrp-orange);
}
.c-row__action--primary:hover {
  background: var(--nrp-orange-tint-strong);
  color: var(--nrp-orange);
}
.c-row:focus { outline: none; }
.c-row:focus-visible td:first-child { box-shadow: inset 2px 0 0 var(--nrp-orange); }

/* ═══════════════════════════════════════════════════════════════
   Quick Reply modal — small, opinionated reply surface.

   Reuses `.nrp-modal__*` chrome. Adds a last-message preview card
   and a roster avatar in the head.
   ═══════════════════════════════════════════════════════════════ */
.qr-modal .nrp-modal__panel {
  width: min(520px, calc(100vw - 48px));
}
.qr-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--nrp-card-border);
}
.qr-head__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--nrp-info-tint);
  color: var(--nrp-info);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display);
  font-size: 12.5px; font-weight: 600;
  flex-shrink: 0;
}
.qr-head__text { flex: 1; min-width: 0; }
.qr-head__title { font-size: 14px; font-weight: 600; color: var(--nrp-text); line-height: 1.25; }
.qr-head__sub { font-size: 11.5px; color: var(--nrp-text-mid); line-height: 1.35; margin-top: 1px; }
.qr-head__sub a { color: var(--nrp-orange); text-decoration: none; }
.qr-head__sub a:hover { text-decoration: underline; }
.qr-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.qr-preview {
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-row-border);
  border-radius: var(--nrp-r-md);
  padding: 10px 12px;
}
.qr-preview__eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--nrp-text-mid);
  margin-bottom: 4px;
}
.qr-preview__body {
  font-size: 12.5px; color: var(--nrp-text); line-height: 1.45;
  max-height: 80px; overflow: hidden;
  white-space: pre-wrap; word-wrap: break-word;
}
.qr-textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  font-family: var(--nrp-font-body);
  font-size: 13px; line-height: 1.45;
  padding: 10px 12px;
  background: var(--nrp-input-bg);
  color: var(--nrp-text);
  border: 1px solid var(--nrp-input-border);
  border-radius: var(--nrp-r-sm);
  outline: none;
  box-sizing: border-box;
}
.qr-textarea:focus { border-color: var(--nrp-orange); }
.qr-error {
  font-size: 12px;
  color: var(--nrp-danger);
  padding: 8px 12px;
  background: var(--nrp-danger-bg-subtle);
  border: 1px solid var(--nrp-danger-tint);
  border-radius: var(--nrp-r-sm);
}
.qr-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--nrp-card-border);
  background: var(--nrp-card-raised);
}
.qr-foot__left { flex: 1; }
.qr-foot__right { display: flex; gap: 8px; }

/* ═══════════════════════════════════════════════════════════════
   Contact Detail page (/contacts/<id>) — full-page chat surface.

   .cd-* covers: hero, two-column grid, conversation thread, day
   dividers, message bubbles (inbound + outbound), docked composer
   toolbar, right rail (Ryley suggestion, Details, Activity).
   ═══════════════════════════════════════════════════════════════ */

/* Hero */
.cd-hero {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 18px;
}
.cd-hero__avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--nrp-btn-navy-bg);
  color: var(--nrp-btn-navy-fg);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display);
  font-size: 20px; font-weight: 500;
  flex-shrink: 0;
}
.cd-hero__body { flex: 1; min-width: 0; }
.cd-hero__title {
  font-family: var(--nrp-font-display);
  font-size: var(--nrp-fs-page-title); font-weight: 500;
  letter-spacing: -0.4px;
  color: var(--nrp-text);
  line-height: 1.1;
  margin: 2px 0 4px;
}
.cd-hero__sub {
  font-size: 13px;
  color: var(--nrp-text-mid);
  font-variant-numeric: tabular-nums;
}
.cd-hero__sub .dot { margin: 0 6px; opacity: 0.55; }
.cd-hero__actions {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
  position: relative;
}

/* Grid */
.cd-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 920px) {
  .cd-grid { grid-template-columns: 1fr; }
}

/* Thread card */
.cd-thread {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 60vh;
}
.cd-thread__head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--nrp-row-border);
  background: var(--nrp-strip-bg);
}
.cd-thread__head--row {
  display: flex; align-items: center; gap: 10px;
}
.cd-thread__head--row .cd-eyebrow { flex: 1; }

/* Composer toolbar — pill-shaped count badge on the Files button. */
.cd-tool__badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 16px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700; line-height: 1;
  background: var(--nrp-orange-tint-strong);
  color: var(--nrp-orange);
}

/* Project Files modal — list of selectable rows + upload control. */
.cd-files-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--nrp-row-border);
  border-radius: var(--nrp-r-sm);
  background: var(--nrp-card);
  max-height: 320px;
  overflow-y: auto;
}
.cd-files-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--nrp-row-border);
  cursor: pointer;
  font-size: 13px;
}
.cd-files-row:last-child { border-bottom: 0; }
.cd-files-row:hover { background: var(--nrp-strip-bg); }
.cd-files-row__name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--nrp-text);
}
.cd-files-row__meta {
  font-size: 11px; color: var(--nrp-text-mid);
  font-variant-numeric: tabular-nums;
}
.cd-files-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 12.5px; color: var(--nrp-text-mid); font-style: italic;
}
.cd-files-upload {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px;
  border: 1px dashed var(--nrp-row-border);
  border-radius: var(--nrp-r-sm);
  background: var(--nrp-strip-bg);
}
.cd-files-upload__label {
  font-size: 11px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--nrp-text-mid);
}
.cd-files-upload__row { display: flex; align-items: center; gap: 8px; }
.cd-files-upload__row input[type="file"] {
  flex: 1; min-width: 0;
  font-size: 12.5px;
}
.cd-files-upload__hint {
  font-size: 11px; color: var(--nrp-text-mid); line-height: 1.4;
}
/* DEV-ONLY: Talk/Clear pill buttons next to the Conversation eyebrow.
   Visually flagged with a dashed border so they don't look like real
   product chrome. Remove this rule block when removing the dev tools. */
.cd-dev-btn {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px dashed var(--nrp-text-mid);
  border-radius: 999px;
  background: transparent; color: var(--nrp-text-mid);
  cursor: pointer; font-family: inherit;
  line-height: 1.2;
}
.cd-dev-btn:hover { color: var(--nrp-text); border-color: var(--nrp-text); }
.cd-dev-btn:disabled { opacity: 0.5; cursor: progress; }
.cd-dev-btn--danger { color: var(--nrp-danger); border-color: var(--nrp-danger); }
.cd-dev-btn--danger:hover { background: rgba(220, 38, 38, 0.08); color: var(--nrp-danger); border-color: var(--nrp-danger); }
.cd-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--nrp-text-mid);
}
.cd-thread__scroll {
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
  flex: 1 1 auto;
  height: 42vh;
}

/* System row — centered, italic in-thread notification used for events like
   "Showing booked", "Status changed", "Reassigned". Same shape family as
   the day-divider (1px rules to either side), but with an icon slot and
   the success colour so it reads as an outcome, not just a date marker. */
.cd-system-row {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0;
  font-size: 12px; color: var(--nrp-text-mid);
  font-style: italic;
}
.cd-system-row::before,
.cd-system-row::after {
  content: ""; flex: 1; height: 1px;
  background: var(--nrp-row-border);
}
.cd-system-row__icon { color: var(--nrp-success); font-style: normal; font-weight: 600; }

/* Day divider */
.cd-divider {
  display: flex; align-items: center; gap: 12px;
  font-size: 10px; font-weight: 600; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--nrp-text-mid);
  margin: 4px 0;
}
.cd-divider::before, .cd-divider::after {
  content: ""; flex: 1; height: 1px;
  background: var(--nrp-row-border);
}

/* Messages — inbound + outbound.
   Layout: a flex column with a head row (avatar + meta) on top and the
   message bubble on its own row below. The bubble spans the full width
   of the message block rather than being constrained to a column beside
   the avatar — gives long messages room to breathe and matches the
   screen mock. Outbound flips the head row via row-reverse so the
   avatar sits on the right with the meta to its left. */
.cd-msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cd-msg__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-msg__avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--nrp-info-tint); color: var(--nrp-info);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display);
  font-size: 10.5px; font-weight: 600;
  flex-shrink: 0;
}
.cd-msg__meta {
  flex: 1;
  min-width: 0;
  font-size: 9.5px; color: var(--nrp-text-mid);
  font-variant-numeric: tabular-nums;
}
.cd-msg__meta strong { color: var(--nrp-text); font-weight: 500; }
.cd-msg__meta .dot { margin: 0 4px; opacity: 0.55; }
/* Inbound bubbles use the same info-tint as the contact's avatar so the
   speaker's "voice" (avatar + bubble) reads as one unit. Outbound
   overrides below switch to the orange-tint family. */
.cd-msg__bubble {
  background: var(--nrp-info-tint);
  border: 1px solid var(--nrp-info-tint);
  border-radius: var(--nrp-r-md);
  padding: 8px 12px;
  font-size: 11.5px; line-height: 1.45;
  color: var(--nrp-text);
  white-space: pre-wrap; word-wrap: break-word;
}
.cd-msg__embed {
  margin-top: 4px;
  font-size: 10px; color: var(--nrp-text-mid);
}
.cd-msg__embed strong { color: var(--nrp-text); font-weight: 500; }

/* Outbound flip — head row reverses so the avatar pops to the right, meta
   text right-aligns, and the whole block shifts to the right edge of the
   conversation card so the staff "voice" reads as a column on the right
   (mirror of inbound on the left). Bubble is the orange-tint family. */
.cd-msg--out {
  max-width: 80%;
  margin-left: auto;
  align-items: flex-end;
}
.cd-msg--out .cd-msg__head { flex-direction: row-reverse; }
.cd-msg--out .cd-msg__avatar {
  background: var(--nrp-orange-tint);
  color: var(--nrp-orange);
}
.cd-msg--out .cd-msg__meta { text-align: right; }
.cd-msg--out .cd-msg__bubble {
  background: var(--nrp-orange-tint);
  border-color: var(--nrp-orange-tint-strong);
}
/* Internal-note bubble — agent-typed recommendation / status notes that the
   contact never sees. Yellow tint family + explicit "Client doesn't see this"
   hint so the operator can't mistake it for an outbound message. */
.cd-msg--internal {
  max-width: 80%;
  margin-left: auto;
  align-items: flex-end;
}
.cd-msg--internal .cd-msg__head { flex-direction: row-reverse; }
.cd-msg__avatar--internal {
  background: rgba(234, 179, 8, 0.18);
  color: #b45309;
}
.cd-msg--internal .cd-msg__meta { text-align: right; }
.cd-msg--internal .cd-msg__bubble {
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.45);
  color: var(--nrp-text);
}
.cd-msg__internal-tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.22);
  color: #b45309;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 14px;
  vertical-align: middle;
}
.cd-msg__internal-hint {
  margin-top: 3px;
  font-size: 9.5px;
  color: #b45309;
  font-style: italic;
  text-align: right;
}

.cd-msg__status {
  margin-top: 3px;
  font-size: 9.5px; color: var(--nrp-text-mid);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cd-msg__status .ok { color: var(--nrp-success); font-weight: 500; }
.cd-msg__status .bad { color: var(--nrp-danger); font-weight: 500; }
.cd-msg__status .dot { margin: 0 5px; opacity: 0.55; }

/* Docked composer */
.cd-composer {
  border-top: 1px solid var(--nrp-row-border);
  background: var(--nrp-card);
  display: flex; flex-direction: column;
}
.cd-composer__toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--nrp-strip-bg);
  border-bottom: 1px solid var(--nrp-row-border);
  flex-wrap: wrap;
}
.cd-tool {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 4px;
  background: transparent; border: 0;
  font-family: inherit;
  font-size: 11.5px; font-weight: 500;
  color: var(--nrp-text-mid);
  cursor: pointer;
  white-space: nowrap;
}
.cd-tool:hover { color: var(--nrp-orange); background: var(--nrp-row-hover); }
.cd-tool svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.cd-tool--channel {
  color: var(--nrp-text);
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-pill);
  padding: 3px 10px 3px 8px;
}
.cd-tool--channel:hover { color: var(--nrp-text); border-color: var(--nrp-text-mid); background: var(--nrp-card); }
.cd-tool__divider {
  width: 1px; height: 16px; background: var(--nrp-card-border);
  margin: 0 2px;
}
.cd-tool__spacer { flex: 1; }
.cd-tool__hint {
  font-size: 11px;
  color: var(--nrp-text-dim);
  white-space: nowrap;
}
.cd-tool__hint kbd {
  font-family: var(--nrp-font-body);
  font-size: 10.5px;
  padding: 1px 5px;
  background: var(--nrp-card-raised);
  border: 1px solid var(--nrp-card-border);
  border-radius: 3px;
  color: var(--nrp-text-mid);
}
.cd-textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  font-family: var(--nrp-font-body);
  font-size: 13px; line-height: 1.5;
  padding: 12px 16px;
  background: var(--nrp-card);
  color: var(--nrp-text);
  border: 0;
  outline: none;
  box-sizing: border-box;
}
.cd-textarea::placeholder { color: var(--nrp-text-dim); }
.cd-composer__foot {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--nrp-row-border);
}
.cd-composer__foot-left {
  flex: 1;
  font-size: 11.5px;
  color: var(--nrp-text-mid);
}
.cd-composer__foot-right { display: flex; gap: 8px; }
.cd-attach-input { display: none; }
.cd-attach-list {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px 14px 0;
}
.cd-attach-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-row-border);
  border-radius: var(--nrp-r-pill);
  font-size: 11px;
  color: var(--nrp-text-mid);
}
.cd-attach-pill button {
  background: transparent; border: 0; color: var(--nrp-text-dim);
  cursor: pointer; padding: 0; line-height: 1;
  font-size: 13px;
}
.cd-attach-pill button:hover { color: var(--nrp-danger); }

/* Right rail */
.cd-rail {
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 18px;
}
.cd-card {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  overflow: hidden;
}
.cd-card--featured {
  border-left: 3px solid var(--nrp-orange);
}
.cd-card__head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--nrp-row-border);
}
.cd-card__title {
  font-size: 13px; font-weight: 600; color: var(--nrp-text);
  flex: 1;
}
.cd-card__head-link {
  font-size: 12px; color: var(--nrp-orange); text-decoration: none;
}
.cd-card__head-link:hover { text-decoration: underline; }
.cd-card__head-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--nrp-orange);
  display: inline-flex; align-items: center; gap: 6px;
  flex: 1;
}
.cd-card__head-eyebrow svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
}
.cd-card__body { padding: 14px 16px; }
/* Scrollable card body — Activity card uses this so a long event list doesn't
   push the right rail past the composer. Capped at ~12 rows worth of items. */
.cd-card__body--scroll {
  max-height: 320px;
  overflow-y: auto;
}
.cd-card__ai-body {
  font-size: 13px; line-height: 1.5; color: var(--nrp-text);
  margin-bottom: 12px;
}
.cd-card__ai-actions { display: flex; gap: 8px; }

/* Details rows */
/* Showing-booked banner — sits at the top of the Details card so an upcoming
   appointment reads as the most important thing about the contact. Future
   showings use the orange accent; past showings dim to a quiet system tone. */
.cd-showing-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 12px;
  padding: 10px 12px;
  border-radius: var(--nrp-r-sm);
  background: var(--nrp-orange-tint);
  border-left: 3px solid var(--nrp-orange);
}
.cd-showing-banner__icon {
  width: 18px; height: 18px;
  color: var(--nrp-orange);
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.cd-showing-banner__text { flex: 1; min-width: 0; }
.cd-showing-banner__label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--nrp-orange);
}
.cd-showing-banner__when {
  font-size: 13px; font-weight: 600;
  color: var(--nrp-text);
  margin-top: 1px;
}
.cd-showing-banner__unit {
  font-size: 11.5px;
  color: var(--nrp-text-mid);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cd-showing-banner--past {
  background: var(--nrp-strip-bg);
  border-left-color: var(--nrp-text-mid);
}
.cd-showing-banner--past .cd-showing-banner__icon,
.cd-showing-banner--past .cd-showing-banner__label {
  color: var(--nrp-text-mid);
}

.cd-detail-list { display: flex; flex-direction: column; }
.cd-detail {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--nrp-row-border);
  font-size: 12.5px;
  min-height: 38px;
}
.cd-detail:first-child { border-top: 0; }
.cd-detail__label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--nrp-text-mid);
  flex: 0 0 90px;
}
.cd-detail__value {
  flex: 1; min-width: 0;
  color: var(--nrp-text);
  text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cd-detail__value a { color: var(--nrp-orange); text-decoration: none; }
.cd-detail__value a:hover { text-decoration: underline; }
.cd-detail__value--empty { color: var(--nrp-text-dim); }
.cd-substatus-select {
  font-family: inherit; font-size: 12.5px;
  padding: 3px 28px 3px 8px;
  border: 1px solid var(--nrp-row-border);
  border-radius: 6px;
  background: var(--nrp-card);
  color: var(--nrp-text);
  cursor: pointer;
  max-width: 100%;
  text-overflow: ellipsis;
  text-align-last: right;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--nrp-text-mid) 50%),
                    linear-gradient(135deg, var(--nrp-text-mid) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.cd-substatus-select:hover { border-color: var(--nrp-text-mid); }
.cd-substatus-select:disabled { opacity: 0.6; cursor: progress; }
.cd-substatus-select option { padding: 4px 10px; }
.cd-substatus-status {
  display: inline-block; margin-left: 6px;
  font-size: 11px; color: var(--nrp-text-mid);
}
.cd-mini-avatar {
  display: inline-flex; align-items: center; gap: 6px;
  vertical-align: middle;
}
.cd-mini-avatar__chip {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--nrp-orange-tint); color: var(--nrp-orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display);
  font-size: 9.5px; font-weight: 600;
}

/* Activity timeline */
.cd-activity { display: flex; flex-direction: column; gap: 12px; }
.cd-activity__item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: flex-start;
}
.cd-activity__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--nrp-text-mid);
  margin-top: 5px;
  justify-self: center;
}
.cd-activity__dot--staff { background: var(--nrp-orange); }
.cd-activity__dot--system { background: var(--nrp-success); }
.cd-activity__body {
  font-size: 12px; line-height: 1.4;
  color: var(--nrp-text);
}
.cd-activity__time {
  font-size: 11px;
  color: var(--nrp-text-mid);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* Overflow menu */
.cd-overflow {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 200px;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.10);
  display: none;
  flex-direction: column;
  padding: 4px;
  z-index: 50;
}
.cd-overflow.is-open { display: flex; }
.cd-overflow__item {
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  background: transparent; border: 0;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--nrp-text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}
.cd-overflow__item:hover { background: var(--nrp-row-hover); }
.cd-overflow__item--danger { color: var(--nrp-danger); }

/* ── AI suggests card — two stacked sub-blocks (template + appointment).
   Surfaces the AI's pick for the next-best reply path; both sub-blocks
   hide independently if AI confidence is low or no appointment was
   detected. If both hide, the whole featured card is hidden by JS. */
.cd-ai-loading {
  display: flex; flex-direction: column; gap: 8px;
  padding: 4px 0 2px;
}
.cd-ai-loading__row {
  height: 10px; border-radius: 4px;
  background: linear-gradient(90deg,
    var(--nrp-strip-bg) 25%,
    var(--nrp-row-border) 50%,
    var(--nrp-strip-bg) 75%);
  background-size: 200% 100%;
  animation: cd-ai-shimmer 1.4s ease-in-out infinite;
}
.cd-ai-loading__row--short { width: 60%; }
.cd-ai-loading__label {
  font-size: 11px; color: var(--nrp-text-mid);
  margin-top: 2px; font-style: italic;
}
@keyframes cd-ai-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.cd-ai-group {
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-row-border);
  border-radius: var(--nrp-r-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.cd-ai-group:last-child { margin-bottom: 0; }
.cd-ai-group__label {
  font-size: 9.5px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--nrp-text-mid);
  margin-bottom: 6px;
}
.cd-ai-group__value {
  font-size: 13px; font-weight: 500; color: var(--nrp-text);
  line-height: 1.4;
  display: flex; align-items: center; gap: 6px;
}
.cd-ai-group__value svg {
  width: 12px; height: 12px;
  color: var(--nrp-orange);
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.cd-ai-group__why {
  display: inline-block; margin-top: 4px;
  font-size: 11.5px; color: var(--nrp-orange);
  text-decoration: none; cursor: pointer;
  background: transparent; border: 0; padding: 0;
  font-family: inherit;
}
.cd-ai-group__why:hover { text-decoration: underline; }
.cd-ai-group__actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cd-ai-group__empty {
  font-size: 12.5px;
  color: var(--nrp-text-mid);
  font-style: italic;
  display: flex; align-items: center; gap: 6px;
}
.cd-ai-freeform {
  font-size: 11.5px;
  color: var(--nrp-text-mid);
  margin-top: 4px;
  line-height: 1.4;
}
.cd-ai-freeform__link {
  color: var(--nrp-orange);
  background: transparent; border: 0; padding: 0;
  font-family: inherit; font-size: inherit;
  cursor: pointer;
  text-decoration: none;
}
.cd-ai-freeform__link:hover { text-decoration: underline; }

/* Manual book-showing row — quiet affordance shown in the AI-suggests card
   only when no appointment was detected. Reads as secondary (ghost button)
   next to the orange detected-state Book showing. The icon needs the same
   stroke styling as the other sprite icons (.cd-tool svg / .cd-ai-group__value
   svg) or the line glyph renders as a filled blob. */
.cd-ai-manual {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--nrp-row-border);
}
.cd-ai-manual__hint { font-size: 11.5px; color: var(--nrp-text-dim); line-height: 1.3; }
.cd-ai-manual__ico {
  width: 12px; height: 12px; margin-right: 5px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── Why-this-template feedback modal — block styling for sections inside
   the modal body. The modal frame itself reuses .nrp-modal__*. */
.cd-why-fb__reason-block {
  background: var(--nrp-strip-bg);
  border: 1px solid var(--nrp-row-border);
  border-radius: var(--nrp-r-sm);
  padding: 10px 12px;
}
.cd-why-fb__suggested {
  font-size: 12px; color: var(--nrp-text-mid);
  margin-bottom: 6px;
}
.cd-why-fb__suggested strong { color: var(--nrp-text); font-weight: 600; }
.cd-why-fb__reason-label {
  font-size: 9.5px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--nrp-text-mid);
  margin-bottom: 4px;
}
.cd-why-fb__reason-body {
  font-size: 13px; line-height: 1.45; color: var(--nrp-text);
  white-space: pre-wrap;
}
.cd-why-fb__rating-label {
  font-size: 12.5px; font-weight: 500; color: var(--nrp-text);
  margin-bottom: 6px;
}
.cd-why-fb__rating-row { display: flex; gap: 8px; }
.cd-why-fb__rate-btn {
  padding: 6px 14px;
  font-size: 13px; font-family: inherit;
  border: 1.5px solid var(--nrp-row-border);
  border-radius: 8px;
  background: transparent; color: var(--nrp-text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.cd-why-fb__rate-btn:hover { background: var(--nrp-strip-bg); }

/* ── Composer template popover — opens from the toolbar Template button.
   AI-recommended template pinned at the top with an orange star + tint
   row background; all other templates listed below a divider. */
.cd-template-pop {
  position: absolute;
  z-index: 30;
  min-width: 280px; max-width: 360px;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  box-shadow: 0 4px 16px rgba(47,59,70,0.10), 0 2px 6px rgba(0,0,0,0.06);
  padding: 8px 0;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}
.cd-template-pop.is-open { display: block; }
.cd-template-pop__label {
  padding: 6px 14px 6px;
  font-size: 9.5px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--nrp-text-mid);
}
.cd-template-pop__item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  font-size: 12.5px; color: var(--nrp-text);
  cursor: pointer;
  background: transparent;
  border: 0; width: 100%; text-align: left;
  font-family: inherit;
}
.cd-template-pop__item:hover { background: var(--nrp-row-hover); }
.cd-template-pop__item--recommended {
  background: var(--nrp-orange-tint);
}
.cd-template-pop__item--recommended:hover {
  background: var(--nrp-orange-tint);
  filter: brightness(0.96);
}
.cd-template-pop__star {
  width: 14px; height: 14px;
  color: var(--nrp-orange);
  flex-shrink: 0;
  fill: currentColor;
}
.cd-template-pop__item:not(.cd-template-pop__item--recommended) .cd-template-pop__star {
  visibility: hidden;
}
.cd-template-pop__divider {
  border-top: 1px solid var(--nrp-row-border);
  margin: 4px 0;
}
.cd-template-pop__empty {
  padding: 14px;
  font-size: 12px;
  color: var(--nrp-text-mid);
  text-align: center;
}

/* Why-this-template popover — shown next to the AI sub-block when the
   operator clicks "Why this template?" / "Why this time?" */
.cd-why-pop {
  position: absolute;
  z-index: 35;
  width: 260px;
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  box-shadow: 0 4px 16px rgba(47,59,70,0.12);
  padding: 10px 12px;
  font-size: 12px; line-height: 1.45;
  color: var(--nrp-text);
  display: none;
}
.cd-why-pop.is-open { display: block; }
.cd-why-pop__title {
  font-size: 10px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--nrp-text-mid);
  margin-bottom: 4px;
}

/* ════════════════════════════════════════════════════════════════
   Application Detail (v3) — parties-row + 2-col Housing/Risk
   Replaces the legacy 3-column "evidence" layout. All rules use
   existing tokens; no new colors/fonts/radii.
   ════════════════════════════════════════════════════════════════ */

/* ── Decision banner (navy) ───────────────────────────────────── */
.c-banner {
  background: var(--nrp-side-bg);
  border-radius: var(--nrp-r-md);
  padding: 22px 28px;
  color: var(--nrp-side-text);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 28px;
  align-items: center;
  position: relative;
}
.c-banner__id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.c-banner__id > div { min-width: 0; }
/* The global top-bar (user name / notifications / UI-scale / theme / logout)
   is position:absolute at top:0.2rem and floats over the top-right of the
   page. The .container only reserves 1rem of top margin, so the dark banner
   slides under the bar and its dark text/controls become unreadable. Reserve
   extra top clearance on the page wrapper that holds the banner so the bar
   stays in the cream gap above it. Padding (not margin) is used so it can't
   collapse into .container's top margin. The bar is hidden ≤768px, so this
   only applies above that breakpoint. */
@media (min-width: 769px) {
  .page:has(> .c-banner) { padding-top: 16px; }
}
@media (max-width: 1180px) {
  .c-banner { grid-template-columns: 1fr auto; row-gap: 20px; }
  .c-banner__metrics { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid rgba(245,241,232,0.14); padding-top: 18px; }
}
.c-banner__crumb { font-size: 11px; color: rgba(245,241,232,0.55); letter-spacing: 0.3px; }
.c-banner__crumb a { color: var(--nrp-orange-soft); }
.c-banner__name { font-family: var(--nrp-font-display); font-size: 26px; font-weight: 500; letter-spacing: -0.3px; color: var(--nrp-side-text); line-height: 1.05; margin: 2px 0 4px; }
.c-banner__email { font-size: 12px; color: rgba(245,241,232,0.60); }

.c-banner__metrics {
  display: grid; grid-template-columns: repeat(4, auto);
  gap: 36px;
  padding-left: 28px;
  border-left: 1px solid rgba(245,241,232,0.14);
}
.c-banner__metric .label { font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase; color: rgba(245,241,232,0.55); font-weight: 600; margin-bottom: 4px; }
.c-banner__metric .val { font-family: var(--nrp-font-display); font-size: 19px; font-weight: 500; color: var(--nrp-side-text); letter-spacing: -0.2px; line-height: 1.1; }
/* Combined income reads as a positive/healthy figure — use the same bright
   emerald as the RTI "Healthy" band (#059669, set inline by
   _rent_to_income_color). The themed --nrp-success token is a dark forest in
   light mode and reads too dark on the navy banner; this fixed green stays
   bright on navy in both themes, and avoids the brand orange that looked
   like a red alert / competed with the Approve CTA. */
.c-banner__metric .val--accent { color: #059669; }
.c-banner__metric .val--dim { font-size: 13px; color: rgba(245,241,232,0.45); font-family: var(--nrp-font-body); font-style: italic; font-weight: 400; }
.c-banner__metric .val .unit { font-size: 12px; color: rgba(245,241,232,0.45); font-family: var(--nrp-font-body); font-weight: 400; }
.c-banner__metric .sub { font-size: 11px; color: rgba(245,241,232,0.50); margin-top: 2px; }
.c-banner__metric .sub--success { color: var(--nrp-success); }
.c-banner__metric .sub--warn    { color: var(--nrp-warn); }

.c-banner__actions { display: flex; flex-direction: column; gap: 8px; min-width: 170px; }
/* Slightly more compact decision buttons so the corner close (✕) has room
   to breathe — scoped to the banner; the global .nrp-btn is unchanged. */
.c-banner__actions .nrp-btn { padding: 7px 14px; font-size: var(--nrp-fs-body-sm); }
.c-banner__actions .nrp-btn--ghost { background: transparent; color: var(--nrp-side-text); border-color: rgba(245,241,232,0.30); }
.c-banner__actions .nrp-btn--ghost:hover { border-color: var(--nrp-side-text); }
/* Close-review affordance — subtle cream ✕ anchored to the top-right
   corner of the hero. Absolutely positioned so it adds no height to the
   banner; returns to the applications list. */
.c-banner__close {
  position: absolute;
  top: 10px; right: 6px;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: rgba(245,241,232,0.55);
  transition: color 120ms, background 120ms;
}
.c-banner__close:hover { color: var(--nrp-side-text); background: rgba(245,241,232,0.10); }
.c-banner__close svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.c-banner__hint { font-size: 11px; color: rgba(245,241,232,0.55); margin-top: 2px; text-align: center; }

.c-banner__chips {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.c-banner__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 4px;
  background: rgba(245,241,232,0.08);
  border: 1px solid rgba(245,241,232,0.16);
  border-radius: var(--nrp-r-pill);
  color: var(--nrp-side-text);
  font-size: 11.5px;
}
.c-banner__chip .av-solo { width: 20px; height: 20px; font-size: 9.5px; }
.c-banner__chip--guar { background: transparent; border-color: rgba(245,241,232,0.24); color: rgba(245,241,232,0.75); }

/* ── Avatars ──────────────────────────────────────────────────── */
.avstack { display: inline-flex; align-items: center; }
.avstack .av {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display); font-size: 14px; font-weight: 500;
  border: 2px solid var(--nrp-card);
  margin-left: -10px;
  flex-shrink: 0;
}
.avstack .av:first-child { margin-left: 0; }
.av--primary  { background: var(--nrp-orange-tint);  color: var(--nrp-orange); }
.av--co       { background: var(--nrp-info-tint);    color: var(--nrp-info); }
.av--co2      { background: var(--nrp-success-tint); color: var(--nrp-success); }
.av--co3      { background: var(--nrp-warn-tint);    color: var(--nrp-warn); }
.av--guar     { background: rgba(47,59,70,0.10);     color: var(--nrp-side-bg); }
.av--neutral  { background: var(--nrp-card-border);  color: var(--nrp-text-mid); }
.avstack--lg .av { width: 44px; height: 44px; font-size: 16px; margin-left: -12px; }
.avstack--lg .av:first-child { margin-left: 0; }
.avstack--sm .av { width: 26px; height: 26px; font-size: 11px; margin-left: -8px; }
.avstack--sm .av:first-child { margin-left: 0; }
.avstack__more {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(245,241,232,0.10);
  border: 2px solid var(--nrp-side-bg);
  color: rgba(245,241,232,0.75);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-body); font-size: 11px; font-weight: 500;
  margin-left: -10px;
}

/* Avatar overrides scoped to the navy decision banner — the default
   cream-on-navy tints disappear on navy without these. */
.c-banner .av--primary,
.c-banner__chip .av--primary { background: rgba(224,138,74,0.22); color: var(--nrp-orange-soft); }
.c-banner .av--co,
.c-banner__chip .av--co      { background: rgba(142,176,214,0.20); color: #B9D2EC; }
.c-banner .av--co2,
.c-banner__chip .av--co2     { background: rgba(140,200,160,0.20); color: #B6DEC2; }
.c-banner .av--co3,
.c-banner__chip .av--co3     { background: rgba(220,180,90,0.22);  color: #E6CE92; }
.c-banner .av--guar,
.c-banner__chip .av--guar    { background: rgba(245,241,232,0.14); color: rgba(245,241,232,0.85); }
.c-banner .avstack .av { border-color: var(--nrp-side-bg); }

.av-solo {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display); font-size: 12px; font-weight: 500;
  flex-shrink: 0;
}

/* ── Warn / info callout row ──────────────────────────────────── */
.c-warn {
  background: var(--nrp-warn-tint);
  border: 1px solid var(--nrp-card-border);
  border-left: 3px solid var(--nrp-warn);
  border-radius: var(--nrp-r-sm);
  padding: 10px 16px;
  margin-top: 12px;
  font-size: 12.5px; color: var(--nrp-text);
  display: flex; align-items: center; gap: 10px;
}
.c-warn--info { background: var(--nrp-info-tint); border-left-color: var(--nrp-info); }
.c-warn strong { font-weight: 500; }
.c-warn a { color: var(--nrp-orange); font-weight: 500; margin-left: auto; }

/* ── Parties card (full-width) ────────────────────────────────── */
.parties-card {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  margin-top: 22px;
  overflow: hidden;
}
.section-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--nrp-row-border);
  background: var(--nrp-strip-bg);
}
.section-head__eyebrow { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--nrp-orange); font-weight: 600; }
.section-head__title { font-family: var(--nrp-font-display); font-size: 17px; font-weight: 500; color: var(--nrp-text); letter-spacing: -0.2px; }
.section-head__sub { font-size: 11.5px; color: var(--nrp-text-dim); margin-left: 4px; }
.section-head__actions { margin-left: auto; display: flex; gap: 14px; align-items: baseline; }
.section-head__actions a { color: var(--nrp-orange); font-size: 11.5px; }

.party-row {
  display: grid;
  grid-template-columns: 44px minmax(190px, 1.3fr) minmax(220px, 1.6fr) 130px 150px 28px;
  gap: 20px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--nrp-row-border);
  position: relative;
}
@media (max-width: 1180px) {
  .party-row {
    grid-template-columns: 40px minmax(160px, 1.2fr) minmax(180px, 1.4fr) 110px 44px 22px;
    gap: 14px;
    padding: 14px 18px;
  }
  .party-row__credit-body { display: none; }
  .party-row__credit { justify-content: center; }
}
@media (max-width: 960px) {
  .party-row {
    grid-template-columns: 36px 1fr auto 22px;
    grid-template-rows: auto auto;
    row-gap: 8px;
  }
  .party-row__av { grid-row: 1 / span 2; }
  .party-row__work { grid-column: 1 / span 3; padding-left: 48px; margin-left: -48px; }
}
.party-row:last-child { border-bottom: 0; }
.party-row--guar { background: rgba(47,59,70,0.025); }
.party-row--guar::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--nrp-info);
  opacity: 0.45;
}
.party-row__av {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display); font-size: 14px; font-weight: 500;
  flex-shrink: 0;
}
.party-row__id { min-width: 0; }
.party-row__name-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.party-row__name { font-size: 14.5px; font-weight: 500; color: var(--nrp-text); letter-spacing: -0.1px; }
.party-row__role {
  font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
}
.party-row__role--primary { color: var(--nrp-orange); }
.party-row__role--guar    { color: var(--nrp-info); }
.party-row__contact { font-size: 11.5px; color: var(--nrp-text-mid); display: flex; gap: 12px; flex-wrap: wrap; }
.party-row__contact .mono { font-family: var(--nrp-font-mono); font-size: 11px; }
.party-row__work { min-width: 0; }
.party-row__work-title {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--nrp-text); margin-bottom: 3px;
}
.party-row__work-title strong { font-weight: 500; }
.party-row__work-title .dim { color: var(--nrp-text-mid); }
.party-row__work-meta { font-size: 11px; color: var(--nrp-text-mid); display: flex; gap: 12px; flex-wrap: wrap; }
.party-row__work-meta .mono { font-family: var(--nrp-font-mono); font-size: 10.5px; }
.party-row__income {
  text-align: right;
  font-family: var(--nrp-font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--nrp-orange);
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.party-row__income .unit { font-size: 11px; color: var(--nrp-text-mid); font-family: var(--nrp-font-body); font-weight: 400; }
.party-row__income-sub { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--nrp-text-mid); font-weight: 600; margin-top: 3px; text-align: right; }
.party-row__credit { display: flex; align-items: center; gap: 10px; }
.party-row__credit-body { display: flex; flex-direction: column; gap: 2px; }
.party-row__credit-score {
  font-family: var(--nrp-font-display); font-size: 15px; font-weight: 500; color: var(--nrp-text);
  letter-spacing: -0.2px; line-height: 1; font-variant-numeric: tabular-nums;
}
.party-row__credit-label { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--nrp-text-mid); font-weight: 600; }
.party-row__credit--awaiting .party-row__credit-score { color: var(--nrp-text-dim); font-style: italic; font-family: var(--nrp-font-body); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.party-row__consent {
  font-size: 10.5px; color: var(--nrp-success);
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 2px; font-weight: 500;
}
.party-row__consent::before { content: "\2713"; font-size: 11px; font-weight: 700; }
.party-row__consent--missing { color: var(--nrp-warn); }
.party-row__consent--missing::before {
  content: "!"; font-weight: 700; width: 12px; height: 12px; border-radius: 50%;
  background: var(--nrp-warn); color: var(--nrp-card);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; line-height: 1;
}
.party-row__more {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--nrp-text-dim); font-size: 14px; line-height: 1;
  text-decoration: none;
}
.party-row__more:hover { background: var(--nrp-strip-bg); color: var(--nrp-text); }
.party-row__missing {
  font-size: 11.5px;
  color: var(--nrp-text-dim);
  font-style: italic;
}

/* Compact credit donut for the parties row */
.cscore {
  --ring-color: var(--nrp-success);
  --ring-pct: 100%;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) 0 var(--ring-pct), var(--nrp-card-border) var(--ring-pct) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cscore__inner {
  width: 30px; height: 30px;
  background: var(--nrp-card);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--nrp-font-display); font-size: 12px; font-weight: 500;
  color: var(--nrp-text); letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
}
.cscore--empty { background: var(--nrp-card-border); }
.cscore--empty .cscore__inner { color: var(--nrp-text-dim); font-size: 11px; font-family: var(--nrp-font-body); font-weight: 500; }
.cscore--excellent { --ring-color: var(--nrp-success); }
.cscore--good      { --ring-color: var(--nrp-info); }
.cscore--fair      { --ring-color: var(--nrp-warn); }
.cscore--poor      { --ring-color: var(--nrp-danger); }

/* Parties footer — household roll-ups */
.parties-foot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--nrp-strip-bg);
  border-top: 1px solid var(--nrp-row-border);
}
.parties-foot__tile {
  padding: 12px 22px;
  border-left: 1px solid var(--nrp-row-border);
  display: flex; flex-direction: column; gap: 3px;
}
.parties-foot__tile:first-child { border-left: 0; }
.parties-foot__label { font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--nrp-text-mid); font-weight: 600; }
.parties-foot__value {
  font-family: var(--nrp-font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--nrp-text);
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: baseline; gap: 5px;
}
.parties-foot__value .unit { font-size: 11px; color: var(--nrp-text-mid); font-family: var(--nrp-font-body); font-weight: 400; }
.parties-foot__value--awaiting { font-family: var(--nrp-font-body); font-style: italic; font-weight: 400; font-size: 13px; color: var(--nrp-text-dim); letter-spacing: 0; }
.parties-foot__value--success { color: var(--nrp-success); }
.parties-foot__value--warn    { color: var(--nrp-warn); }
.parties-foot__sub { font-size: 11px; color: var(--nrp-text-dim); }
.parties-foot__sub--success { color: var(--nrp-success); }
.parties-foot__sub--warn    { color: var(--nrp-warn); }

/* ── Lower grid: Housing | Risk ───────────────────────────────── */
.lower-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
@media (max-width: 960px) {
  .lower-grid { grid-template-columns: 1fr; }
}
.lower-col {
  background: var(--nrp-card);
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  overflow: hidden;
}

/* `.sub` is scoped to `.lower-col` so it never collides with
   `.c-banner__metric .sub`, which colors the small text under each
   metric label. A bare `.sub` rule would paint divider lines across
   the navy banner. */
.lower-col .sub {
  padding: 16px 22px;
  border-bottom: 1px solid var(--nrp-row-border);
}
.lower-col .sub:last-child { border-bottom: 0; }
.lower-col .sub__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.lower-col .sub__title {
  font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--nrp-text); font-weight: 600;
}
.lower-col .sub__title--missing { color: var(--nrp-text-dim); }
.lower-col .sub__count { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--nrp-text-dim); font-weight: 600; }
.lower-col .sub__action { margin-left: auto; font-size: 11px; color: var(--nrp-orange); font-weight: 500; }

/* Read-only field grid — scoped to lower-col so it doesn't collide
   with the global form-input .field/.field__label rules. */
.lower-col .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.lower-col .fields--1 { grid-template-columns: 1fr; }
.lower-col .field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lower-col .field__label { font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--nrp-text-mid); font-weight: 600; }
.lower-col .field__value { font-size: 13px; color: var(--nrp-text); word-break: break-word; line-height: 1.35; }
.lower-col .field__value .mono { font-family: var(--nrp-font-mono); font-size: 12px; }

.empty-sub { font-size: 11.5px; color: var(--nrp-text-dim); font-style: italic; }

/* Address tile */
.addr-tile {
  padding: 12px 14px;
  background: var(--nrp-strip-bg);
  border-radius: var(--nrp-r-sm);
  margin-top: 8px;
}
.addr-tile:first-of-type { margin-top: 0; }
.addr-tile__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.addr-tile__who { font-size: 12px; font-weight: 600; color: var(--nrp-text); }
.addr-tile__role { font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--nrp-text-mid); font-weight: 600; }
.addr-tile__addr { font-size: 13px; color: var(--nrp-text); line-height: 1.4; margin-bottom: 4px; }
.addr-tile__addr .mono { font-family: var(--nrp-font-mono); font-size: 12px; }
.addr-tile__meta { font-size: 11.5px; color: var(--nrp-text-mid); display: flex; gap: 14px; flex-wrap: wrap; }
.addr-tile__meta .mono { font-family: var(--nrp-font-mono); font-size: 11px; }
.addr-tile__edit { margin-left: auto; font-size: 10.5px; color: var(--nrp-orange); }

/* Compact list row (refs, emergency, pets, vehicles, docs) */
.item-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--nrp-row-border);
  font-size: 12.5px;
}
.item-row:last-child { border-bottom: 0; }
.item-row--missing { opacity: 0.65; }
.item-row__icon {
  width: 22px; height: 22px; border-radius: var(--nrp-r-sm);
  background: var(--nrp-card-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--nrp-text-dim); font-size: 9.5px; font-weight: 600; letter-spacing: 0.2px;
}
.item-row__body { min-width: 0; }
.item-row__name { color: var(--nrp-text); font-weight: 500; }
.item-row__name--missing { color: var(--nrp-text-dim); font-style: italic; font-weight: 400; }
.item-row__meta { font-size: 11px; color: var(--nrp-text-mid); margin-top: 2px; }
.item-row__meta .mono { font-family: var(--nrp-font-mono); font-size: 10.5px; }
.item-row__right { font-size: 11px; color: var(--nrp-text-dim); }
.item-row__right--missing { font-style: italic; }
.item-row__right a { color: var(--nrp-orange); }

/* Household credit summary (3-tile) inside Risk column */
.credit-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px 14px;
  background: var(--nrp-strip-bg);
  border-radius: var(--nrp-r-sm);
  margin-bottom: 10px;
}
.credit-summary__tile { display: flex; flex-direction: column; gap: 3px; }
.credit-summary__label { font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--nrp-text-mid); font-weight: 600; }
.credit-summary__value {
  font-family: var(--nrp-font-display); font-size: 18px; font-weight: 500; color: var(--nrp-text);
  letter-spacing: -0.2px; font-variant-numeric: tabular-nums;
}
.credit-summary__value .unit { font-size: 11px; color: var(--nrp-text-mid); font-family: var(--nrp-font-body); font-weight: 400; }
.credit-summary__value .mono { font-family: var(--nrp-font-mono); font-size: 14px; }
.credit-summary__value--success { color: var(--nrp-success); }
.credit-summary__value--warn    { color: var(--nrp-warn); }

.credit-summary__caption {
  font-size: 11.5px; color: var(--nrp-text-mid);
  display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
}
.credit-summary__caption a { margin-left: auto; color: var(--nrp-orange); font-weight: 500; }

/* Single-line consent summary inside the Credit Check sub (awaiting
   state). Shares vocabulary with .credit-summary / .parties-foot__tile —
   strip-bg tile, icon + text + action affordance. */
.consent-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--nrp-strip-bg);
  border-radius: var(--nrp-r-sm);
  font-size: 12px;
}
.consent-summary__icon {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--nrp-success-tint); color: var(--nrp-success);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.consent-summary__icon--warn { background: var(--nrp-warn-tint); color: var(--nrp-warn); }
.consent-summary__text { color: var(--nrp-text-mid); flex: 1; }
.consent-summary__text strong { color: var(--nrp-text); font-weight: 500; }
.consent-summary__action { font-size: 11px; color: var(--nrp-orange); font-weight: 500; }

button.nrp-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Small pill (distinct from the larger .nrp-pill — kept separate so
   the parties-row + lower-col surfaces can use a tighter footprint
   without affecting other pages). */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--nrp-r-pill); font-size: 10px; letter-spacing: 0.3px; font-weight: 500; }
.pill__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill--success { background: var(--nrp-success-tint); color: var(--nrp-success); }
.pill--info    { background: var(--nrp-info-tint);    color: var(--nrp-info); }
.pill--warn    { background: var(--nrp-warn-tint);    color: var(--nrp-warn); }
.pill--danger  { background: var(--nrp-danger-tint);  color: var(--nrp-danger); }
.pill--orange  { background: var(--nrp-orange-tint);  color: var(--nrp-orange); }
.pill--neutral { background: var(--nrp-card-border);  color: var(--nrp-text-mid); }

/* ─── Credit-check in-flight status (Risk panel branch a) ──────────────
   Renders when view.in_flight_checks is non-empty. See:
   docs/superpowers/specs/2026-05-22-credit-check-status-design.md */
.cc-status {
  background: var(--nrp-card-bg, #fff);
  border: 1px solid var(--nrp-row-border, #e5e7eb);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.cc-status__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.cc-status__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--nrp-text-strong, #111827);
}
.cc-status__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--nrp-row-border, #e5e7eb);
  border-top-color: var(--nrp-accent, #1e3a8a);
  border-radius: 50%;
  animation: cc-status-spin 0.9s linear infinite;
  display: inline-block;
}
@keyframes cc-status-spin { to { transform: rotate(360deg); } }
.cc-status__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cc-status__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 12.5px;
}
.cc-status__name {
  color: var(--nrp-text-strong, #111827);
}
.cc-status__pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--nrp-pill-bg, #eff6ff);
  color: var(--nrp-pill-fg, #1e3a8a);
}
.cc-status__foot {
  font-size: 11px;
  color: var(--nrp-text-mid, #6b7280);
  margin-top: 8px;
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════
   Admin → Integrations (redesign). UI only. Reuses .panel / .panel__head
   (navy via .admin-main override), .rail-card / .rail-card--accent,
   .nrp-tabs, .nrp-input, .nrp-select, .nrp-btn*, .nrp-pill*. Adds the
   provider-page-specific .int-* structure. Tokens only — no new colours.
   ════════════════════════════════════════════════════════════════ */

/* Provider tab strip with status dots */
.int-tabswrap { overflow-x: auto; margin-top: 18px; }
.int-tabswrap .nrp-tabs { min-width: max-content; gap: 22px; }
.int-tabswrap .nrp-tabs__tab { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.int-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.int-dot--green { background: var(--nrp-success); }
.int-dot--warn  { background: var(--nrp-warn); }
.int-dot--red   { background: var(--nrp-danger); }
.int-dot--none  { background: transparent; box-shadow: inset 0 0 0 1.5px var(--nrp-text-dim); }

/* Content grid */
.int-grid { display: grid; grid-template-columns: minmax(0,1fr) 304px; gap: 24px; align-items: start; margin-top: 22px; }
@media (max-width: 1180px) { .int-grid { grid-template-columns: 1fr; } }

/* Panel body padding (bg/border/radius come from .panel) */
.int-panelbody { padding: 20px 22px 24px; }

/* Status chip on the navy head — tints tuned for the navy ground */
.int-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--nrp-font-body); font-size: 10.5px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; padding: 3px 10px; border-radius: var(--nrp-r-pill); border: 1px solid transparent; }
.int-pill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.int-pill--green { background: rgba(76,136,88,0.22); color: #8fc79c; border-color: rgba(125,181,138,0.35); }
.int-pill--warn  { background: rgba(217,168,78,0.20); color: #e0b463; border-color: rgba(217,168,78,0.35); }
.int-pill--none  { background: rgba(245,241,232,0.10); color: rgba(245,241,232,0.62); border-color: rgba(245,241,232,0.22); }

/* Inbound webhook strip */
.int-webhook { max-width: 560px; background: var(--nrp-strip-bg); border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md); padding: 12px 14px; margin-bottom: 24px; }
.int-webhook__label { font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--nrp-text-dim); }
.int-webhook__row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.int-webhook__url { font-family: var(--nrp-font-mono); font-size: 12.5px; color: var(--nrp-text); background: var(--nrp-card); border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-sm); padding: 6px 10px; flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
.int-webhook__hint { font-size: 11.5px; color: var(--nrp-text-dim); margin-top: 8px; }

/* Section eyebrow inside body */
.int-seclabel { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--nrp-text-mid); margin: 4px 0 14px; }

/* Packed field grid — sized to data, never stretched */
.int-fields { display: flex; flex-wrap: wrap; gap: 18px 24px; }
.int-field { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.int-field__label { font-family: var(--nrp-font-body); font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--nrp-text-mid); }
.int-field__label .req { color: var(--nrp-text-dim); margin-left: 1px; }
.int-control { display: flex; align-items: center; gap: 8px; }
.int-control .nrp-input, .int-control .nrp-select { flex: 1; width: auto; min-width: 0; }
.int-secret-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.int-field__help { font-size: 11.5px; color: var(--nrp-text-dim); }
.int-field__source { font-size: 11px; color: var(--nrp-text-dim); display: inline-flex; align-items: center; gap: 6px; }
.int-src-tag { font-size: 9px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: var(--nrp-card-raised); color: var(--nrp-text-mid); font-family: var(--nrp-font-body); }
.int-field .error { color: var(--nrp-danger); font-size: 11.5px; margin-top: 2px; }

/* Small neutral outline button (Show / Clear / Copy-in-field) — never danger */
.int-mini { background: transparent; border: 1px solid var(--nrp-input-border); color: var(--nrp-text-mid); border-radius: var(--nrp-r-sm); font-family: var(--nrp-font-body); font-size: 12px; font-weight: 500; padding: 0 11px; height: 34px; cursor: pointer; flex: 0 0 auto; transition: border-color 120ms, color 120ms; }
.int-mini:hover { border-color: var(--nrp-text-mid); color: var(--nrp-text); }
.int-mini:disabled { opacity: .4; cursor: not-allowed; }

/* OAuth connection block (QuickBooks) */
.int-oauth { max-width: 620px; border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md); overflow: hidden; margin-bottom: 24px; }
.int-oauth__main { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--nrp-strip-bg); border-left: 3px solid var(--nrp-success); flex-wrap: wrap; }
.int-oauth__main.is-warn { border-left-color: var(--nrp-warn); }
.int-oauth__icon { width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--nrp-card); border: 1px solid var(--nrp-card-border); color: var(--nrp-text-mid); }
.int-oauth__icon .nrp-icon { width: 18px; height: 18px; }
.int-oauth__title { font-size: 14px; font-weight: 500; color: var(--nrp-text); }
.int-oauth__sub { font-size: 12px; color: var(--nrp-text-mid); margin-top: 2px; }
.int-oauth__actions { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* Not-configured note */
.int-note { display: flex; align-items: flex-start; gap: 10px; max-width: 560px; padding: 11px 14px; border-radius: var(--nrp-r-md); border: 1px solid var(--nrp-card-border); background: var(--nrp-strip-bg); font-size: 12.5px; color: var(--nrp-text-mid); line-height: 1.5; margin-bottom: 22px; }
.int-note .nrp-icon { width: 15px; height: 15px; color: var(--nrp-orange); flex-shrink: 0; margin-top: 1px; }

/* Right rail */
.int-rail { display: flex; flex-direction: column; gap: 16px; }
.int-rail-body { padding: 16px 18px; }
.int-about-body { padding: 0 18px 16px; }
.int-health-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.int-stat { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--nrp-row-border); font-size: 12.5px; }
.int-stat:first-child { border-top: 0; padding-top: 0; }
.int-stat__k { color: var(--nrp-text-mid); white-space: nowrap; }
.int-stat__v { color: var(--nrp-text); font-weight: 500; text-align: right; white-space: nowrap; }
.int-stat__v.is-warn { color: var(--nrp-warn); }
.int-stat__v .mono { font-family: var(--nrp-font-text, var(--nrp-font-mono)); }
.int-stat__v .num { font-variant-numeric: tabular-nums; }
.int-about { font-size: 12.5px; color: var(--nrp-text-mid); line-height: 1.55; }
.int-about__docs { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; color: var(--nrp-orange); text-decoration: none; }
.int-about__docs .nrp-icon { width: 13px; height: 13px; }
.int-about__docs:hover { color: var(--nrp-orange-soft); text-decoration: underline; }
.int-usedby { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--nrp-row-border); }
.int-usedby__k { font-size: 9px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--nrp-text-dim); margin-bottom: 8px; }
.int-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.int-chip { font-size: 11px; color: var(--nrp-text-mid); background: var(--nrp-card-raised); border-radius: var(--nrp-r-pill); padding: 3px 10px; }

/* Sticky save bar pinned to the content pane bottom */
.int-actionbar { position: sticky; bottom: 0; margin: 28px -32px -60px; padding: 14px 32px; background: color-mix(in srgb, var(--nrp-bg) 92%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-top: 1px solid var(--nrp-card-border); display: flex; align-items: center; gap: 12px; z-index: 5; }
.int-actionbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.int-actionbar .nrp-btn { white-space: nowrap; }
.int-dirty[hidden] { display: none; }
.int-test-result { font-size: 12.5px; }
.int-test-result--ok { color: var(--nrp-success); }
.int-test-result--fail { color: var(--nrp-warn); }

/* ──────────────────────────────────────────
   Inspections office surface (2c) — two shared utilities promoted here so the
   re-skinned office templates never inline them (theme pass, 2026-06-16).
   ────────────────────────────────────────── */

/* Applicable-type chip — a quiet mono tag (move_in / move_out / periodic /
   vacant). One per type on the templates list. */
.nrp-type-chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--nrp-r-sm);
  border: 1px solid var(--nrp-card-border); background: var(--nrp-strip-bg);
  color: var(--nrp-text-mid); font-family: var(--nrp-font-mono);
  font-size: 11px; line-height: 1.6; white-space: nowrap;
}
.nrp-type-chip + .nrp-type-chip { margin-left: 5px; }

/* Sticky page-level action bar — Save/Cancel pinned to the bottom, offset by
   the shipped 240px sidebar (collapses to 64px). Promoted from the inline copy
   in admin/_vendor_form.html so screens 1 & 5 reuse it rather than re-inlining. */
.nrp-action-bar {
  position: fixed; bottom: 0; left: 240px; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 14px 32px;
  background: color-mix(in srgb, var(--nrp-bg) 92%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid var(--nrp-card-border);
}
body.sb-collapsed .nrp-action-bar { left: 64px; }
.nrp-action-bar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nrp-action-bar .dirty-pill { display: none; }
.nrp-action-bar.is-dirty .dirty-pill { display: inline-flex; }
.nrp-action-bar .nrp-btn .nrp-icon { width: 13px; height: 13px; }
@media (max-width: 768px) { .nrp-action-bar { left: 0; } }


/* ── Inspection template builder (template_edit.html + inspection_templates.js)
   Theme-only re-skin of the JS-rendered editor — spec screen 5. The DOM is
   built by inspection_templates.js + the inert render helpers
   (inspection_templates_render.js / inspection_option_widget.js), so the
   item-row / section-header / option-widget chrome is styled here off the
   data-* attributes those helpers emit. ADD-ONLY; no existing rule modified.
   ─────────────────────────────────────────────────────────────────────── */

/* Centered ~880px shell, room for the sticky save bar. */
.nrp-tpl-shell { max-width: 880px; margin: 0 auto; padding: 8px 0 96px; }
.nrp-tpl-shell .nrp-page-subtitle { margin-bottom: 18px; }
.nrp-tpl-shell .nrp-edit-body { gap: 12px; margin-top: 18px; }

/* Visually-hidden form control — kept in the a11y/tab order, painted by a
   sibling .nrp-toggle / chip. (The checkbox stays the save's source of truth.) */
.nrp-vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* A field block that sits below the grid (legend + chip grid). */
.nrp-field-block { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }
.nrp-field-block > legend {
  padding: 0; margin-bottom: 8px; display: block;
}
.nrp-field-block .opt {
  text-transform: none; letter-spacing: 0.3px;
  color: var(--nrp-text-dim); font-weight: 500;
}

/* 01 — Applicable-type chips (move_in / move_out / periodic / vacant).
   Mono pill-chips per the mock's .type-check (not boxed checkbox cells):
   content-sized pills, monospace label, pill radius, orange tint + orange ink
   when checked. The row lays out flex-wrap (see .inspection-template-editor
   .nrp-type-chips below). */
.nrp-type-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.nrp-tchip {
  display: inline-flex; align-items: center; gap: 7px; margin: 0;
  padding: 6px 11px; cursor: pointer; user-select: none;
  border: 1px solid var(--nrp-input-border); border-radius: var(--nrp-r-pill);
  background: var(--nrp-card);
  font-family: var(--nrp-font-mono); font-size: 12px; font-weight: 500;
  color: var(--nrp-text-mid);
  transition: border-color 120ms, background 120ms, color 120ms;
}
.nrp-tchip:hover { border-color: var(--nrp-text-dim); }
.nrp-tchip__box {
  width: 13px; height: 13px; border-radius: 3px; flex-shrink: 0;
  border: 1.5px solid var(--nrp-input-border);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; transition: background 120ms, border-color 120ms;
}
.nrp-tchip__box::after {
  content: ''; width: 7px; height: 4px; opacity: 0;
  border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff;
  transform: translateY(-1px) rotate(-45deg); transition: opacity 120ms;
}
.nrp-tchip__name { font-size: 12px; color: inherit; }
.nrp-tchip[data-on="true"] { border-color: var(--nrp-orange); background: var(--nrp-orange-tint); color: var(--nrp-orange); }
.nrp-tchip[data-on="true"] .nrp-tchip__name { font-weight: 500; }
.nrp-tchip[data-on="true"] .nrp-tchip__box { background: var(--nrp-orange); border-color: var(--nrp-orange); }
.nrp-tchip[data-on="true"] .nrp-tchip__box::after { opacity: 1; }
.nrp-tchip:focus-within { outline: 2px solid var(--nrp-orange); outline-offset: 1px; }
/* Pills wrap naturally (flex-wrap) at any width — no grid breakpoint needed. */

/* 01 — Active toggle row (a .nrp-toggle painted from the hidden checkbox).
   Scoped under .nrp-tpl-shell: .nrp-toggle-row / __title / __sub are a SHARED
   component (also used by the incentives admin form), so the builder's overrides
   must not redeclare the bare selectors — that would leak onto other pages. */
.nrp-tpl-shell .nrp-toggle-row { margin-top: 16px; }
.nrp-tpl-shell .nrp-toggle-row__hit {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin: 0;
}
.nrp-tpl-shell .nrp-toggle-row .nrp-toggle { margin-top: 1px; }
.nrp-tpl-shell .nrp-toggle-row__text { display: flex; flex-direction: column; gap: 1px; }
.nrp-tpl-shell .nrp-toggle-row__title { font-size: 13px; font-weight: 500; color: var(--nrp-text); }
.nrp-tpl-shell .nrp-toggle-row__sub { font-size: 11px; color: var(--nrp-text-mid); }
.nrp-tpl-shell .nrp-toggle-row__hit:focus-within .nrp-toggle {
  outline: 2px solid var(--nrp-orange); outline-offset: 2px;
}

/* Inline toggle (Photo required, inside the per-item config). */
.nrp-toggle-inline {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer; margin: 0;
}
.nrp-toggle-inline__text { font-size: 12.5px; color: var(--nrp-text); }
.nrp-toggle-inline:focus-within .nrp-toggle {
  outline: 2px solid var(--nrp-orange); outline-offset: 2px;
}

/* 02 — Signatures. */
.nrp-tpl-sigs { border: 0; margin: 12px 0 0; padding: 0; min-width: 0; }
.nrp-sig-row {
  border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md);
  background: var(--nrp-card-raised); padding: 12px 14px; margin-top: 10px;
}
.nrp-sig-row__head { display: flex; align-items: center; gap: 10px; }
.nrp-sig-row__role { font-size: 13px; font-weight: 600; color: var(--nrp-text); }
.nrp-sig-row__opt { margin-left: 0; }
.nrp-sig-row__toggle {
  margin: 0 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.nrp-sig-row__togtext {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--nrp-text-dim);
}
.nrp-sig-row__toggle:focus-within .nrp-toggle {
  outline: 2px solid var(--nrp-orange); outline-offset: 2px;
}
.nrp-sig-row__stmt { margin-top: 10px; }

/* 02 — soft signature warnings (never blocking). */
.nrp-tpl-sig-warnings { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.nrp-sig-warning {
  display: flex; align-items: flex-start; gap: 8px; margin: 0;
  padding: 8px 11px; border-radius: var(--nrp-r-sm);
  background: var(--nrp-warn-tint); color: var(--nrp-text);
  font-size: 12px; line-height: 1.4;
}
.nrp-sig-warning__icon { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: var(--nrp-warn); }

/* 03 — Sections canvas. */
.nrp-tpl-canvas { display: block; }
.nrp-tpl-sections { display: flex; flex-direction: column; gap: 12px; }

/* Empty state. */
.nrp-tpl-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; padding: 28px 18px;
  border: 1px dashed var(--nrp-card-border); border-radius: var(--nrp-r-md);
  background: var(--nrp-strip-bg);
}
.nrp-tpl-empty__msg { margin: 0; font-size: 13px; color: var(--nrp-text-mid); }

/* Section card. */
.nrp-section-card {
  border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md);
  background: var(--nrp-card); overflow: hidden;
}
.nrp-section-card__head,
.nrp-section-card [data-section-header] {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--nrp-strip-bg);
  border-bottom: 1px solid var(--nrp-card-border);
}
.nrp-section-card__name { flex: 1; max-width: 360px; }
.nrp-section-card__count { background: rgba(128,128,128,0.16); }

/* Drag grips (helper emits ⠿ in a [data-drag-handle] span). */
.nrp-section-card [data-drag-handle],
.nrp-item-list [data-drag-handle] {
  cursor: grab; color: var(--nrp-text-dim); font-size: 14px; line-height: 1;
  flex-shrink: 0; user-select: none; padding: 0 2px;
}
.nrp-section-card [data-drag-handle]:active,
.nrp-item-list [data-drag-handle]:active { cursor: grabbing; }
/* CSS-dotted grip fallback span (no grip icon exists in nrp-icons.svg). */
.nrp-grip {
  display: inline-block; width: 8px; height: 14px; flex-shrink: 0;
  background-image: radial-gradient(currentColor 1px, transparent 1.4px);
  background-size: 4px 4px; color: var(--nrp-text-dim); opacity: 0.7;
}

/* Per-section row-action control buttons (helper emits ▲ ▼ ✕ glyph buttons
   carrying data-action). Quiet icon buttons; remove reads danger on hover. */
.nrp-section-card [data-section-header] [data-action],
.nrp-item-list [data-item-row] [data-action] {
  appearance: none; background: transparent; border: 1px solid transparent;
  border-radius: var(--nrp-r-sm); cursor: pointer; padding: 3px 6px;
  color: var(--nrp-text-mid); font-size: 12px; line-height: 1;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.nrp-section-card [data-section-header] [data-action]:hover,
.nrp-item-list [data-item-row] [data-action]:hover {
  background: var(--nrp-row-hover); color: var(--nrp-text); border-color: var(--nrp-card-border);
}
.nrp-section-card [data-section-header] [data-action="section-remove"]:hover,
.nrp-item-list [data-item-row] [data-action="item-remove"]:hover {
  color: var(--nrp-danger); border-color: var(--nrp-danger);
}

/* Item list. */
.nrp-item-list { list-style: none; margin: 0; padding: 8px 12px 4px; }
.nrp-item-eyebrow {
  display: flex; align-items: center; gap: 8px;
  margin: 0 12px 6px; padding: 0 6px 6px;
  border-bottom: 1px solid var(--nrp-card-border);
}
/* "Item" grows like the row's name so the trailing labels track the right cluster. */
.nrp-item-eyebrow > span:first-child { flex: 1 1 auto; }
.nrp-item-eyebrow > span {
  font-size: 9.5px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--nrp-text-dim);
}
.nrp-item-empty {
  list-style: none; padding: 10px 6px; font-size: 12px;
  color: var(--nrp-text-dim); font-style: italic;
}

/* Item rows (helper-built [data-item-row]). Flex, not a fixed grid: renderItemRow
   emits 7 children (8 with a photo marker) — drag handle, name, type chip, config
   summary, [photo], then ▲ ▼ ✕ — so a fixed N-column grid wraps the controls. */
.nrp-item-list [data-item-row] {
  list-style: none; display: flex; align-items: center; gap: 8px;
  padding: 7px 6px; border-radius: var(--nrp-r-sm);
  transition: background 120ms;
}
.nrp-item-list [data-item-row] + [data-item-row] { border-top: 1px solid var(--nrp-row-border); }
.nrp-item-list [data-item-row]:hover { background: var(--nrp-row-hover); }
.nrp-item-list [data-item-name] {
  font-size: 13px; color: var(--nrp-text); cursor: pointer;
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nrp-item-list [data-item-name]:hover { color: var(--nrp-orange-soft); text-decoration: underline; }
.nrp-item-list [data-type-chip] {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  padding: 2px 8px; border-radius: var(--nrp-r-sm);
  border: 1px solid var(--nrp-card-border); background: var(--nrp-strip-bg);
  color: var(--nrp-text-mid); font-family: var(--nrp-font-mono);
  font-size: 10.5px; line-height: 1.6; white-space: nowrap;
}
.nrp-item-list [data-config-summary] { font-size: 11px; color: var(--nrp-text-dim); }
.nrp-item-list [data-photo-required] { font-size: 12px; }
/* The trailing control buttons (▲▼✕) cluster at the row's right edge: the first
   one's auto left-margin absorbs the free space (flex), pushing all three right. */
.nrp-item-list [data-item-row] [data-action="item-up"] { margin-left: auto; }

/* Footer add-item button. */
.nrp-add-item { margin: 4px 12px 12px; }

/* Per-item config sub-form (opens under a selected row). */
.nrp-item-config {
  display: flex; flex-direction: column; gap: 12px;
  margin: 0 12px 12px; padding: 14px;
  border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md);
  background: var(--nrp-card-raised);
}
.nrp-item-config .nrp-field { gap: 4px; }
.nrp-type-fields:empty { display: none; }
.nrp-type-fields { display: flex; flex-direction: column; gap: 10px; }

/* Inline option-list editor (helper-built [data-option-widget]). */
.nrp-item-config [data-option-widget] {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.nrp-item-config [data-option-row] {
  list-style: none; display: flex; align-items: center; gap: 6px;
}
.nrp-item-config [data-option-row] input {
  flex: 1; min-width: 0; height: 32px; padding: 0 10px;
  background: var(--nrp-input-bg);
  border: 1px solid var(--nrp-input-border); border-radius: var(--nrp-r-sm);
  color: var(--nrp-text); font-family: var(--nrp-font-body); font-size: 13px;
}
.nrp-item-config [data-option-row] button {
  appearance: none; background: transparent; border: 1px solid transparent;
  border-radius: var(--nrp-r-sm); cursor: pointer; padding: 4px 7px;
  color: var(--nrp-text-mid); font-size: 12px; line-height: 1;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.nrp-item-config [data-option-row] button:hover:not(:disabled) {
  background: var(--nrp-row-hover); color: var(--nrp-text); border-color: var(--nrp-card-border);
}
.nrp-item-config [data-option-row] button:disabled { opacity: 0.35; cursor: default; }

/* Validation-error highlight (the JS tags [data-validation-error] on a 422).
   Targets both the legacy canvas (.nrp-section-card / [data-item-row]) and the
   two-pane outline nodes ([data-section] / [data-outline-item]) the redesigned
   builder tags. */
.nrp-section-card[data-validation-error],
.nrp-item-list [data-item-row][data-validation-error],
[data-section][data-validation-error],
[data-outline-item][data-validation-error] {
  outline: 2px solid var(--nrp-danger); outline-offset: -1px;
  border-radius: var(--nrp-r-sm);
}

/* Save status host + the saved-OK confirmation. */
.nrp-tpl-save-status { margin-top: 12px; }
.nrp-tpl-save-status [data-save-error] {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: var(--nrp-r-sm);
  background: var(--nrp-danger-tint); border: 1px solid var(--nrp-danger-tint);
  color: var(--nrp-danger); font-size: 12.5px;
}
.nrp-save-ok { font-size: 12.5px; color: var(--nrp-success); font-weight: 500; }

/* 409 conflict modal. */
/* z-index 1000/1001 = the app's modal-scrim tier (.modal-backdrop), so this
   body-attached overlay sits ABOVE the shell sidebar/chrome (z-index 100–200)
   and actually blocks. 80/81 rendered underneath the sidebar. */
.nrp-tpl-conflict-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20,26,33,0.55);
}
.nrp-tpl-conflict {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 1001; width: min(440px, calc(100vw - 32px));
  background: var(--nrp-card); border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md); padding: 18px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}
.nrp-tpl-conflict__msg { margin: 0 0 16px; font-size: 13px; line-height: 1.5; color: var(--nrp-text); }
.nrp-tpl-conflict__actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ─── Inspection Template Builder (ITB) — Task 5 shell + tokens ─────────── */

/* Header grid: 01 Template details ‖ 02 Signatures */
.itb-header-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .itb-header-grid { grid-template-columns: 1fr; }
}

/* ── 03 builder: an inset bordered box (.itb-frame = mock .builder) inside the
   card's padded body (.nrp-tpl-builder__body, 14px 16px). The frame holds the
   strip bar (.itb-strip-header = .builder__bar) above the two-pane grid
   (.itb-builder = .pane). Metrics copied from the mock <style>, not eyeballed. */
.itb-frame {
  border: 1px solid var(--nrp-card-border);
  border-radius: var(--nrp-r-md);
  overflow: hidden;
  background: var(--nrp-card);
}

/* Strip bar (.builder__bar): title + count, strip-bg, row-border underline. */
.itb-strip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--nrp-row-border);
  background: var(--nrp-strip-bg);
}
.itb-strip-header__title {
  font-family: var(--nrp-font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--nrp-text);
}

/* Two-pane grid (.pane): 296 px outline ‖ fill detail; panes scroll inside. */
.itb-builder {
  display: grid;
  grid-template-columns: 296px 1fr;
  min-height: 460px;
}
@media (max-width: 900px) {
  .itb-builder { grid-template-columns: 1fr; }
}

/* Panes scroll independently; the divider is the outline's right border
   (mock .outline border-right — one rule, no double border). */
.itb-outline,
.itb-detail {
  overflow-y: auto;
}
.itb-outline {
  border-right: 1px solid var(--nrp-row-border);
}
@media (max-width: 900px) {
  .itb-outline { border-right: 0; border-bottom: 1px solid var(--nrp-row-border); }
}

/* ── Two-pane builder outline — renderOutline → [data-outline] / [data-section]
   / [data-outline-item]. Nav-only per the mock: collapse + select + flags;
   reorder is drag (SortableJS), item edit/delete lives in the detail pane,
   section rename is the inline-but-plain name input, section delete is a quiet
   hover ✕. All scoped under [data-outline] so nothing leaks (cf. abe9dae5). */
[data-outline] { padding: 8px; overflow: auto; }

[data-outline] [data-section] { margin-bottom: 4px; }
[data-outline] [data-section-header] {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px; border-radius: var(--nrp-r-sm);
  position: relative; cursor: grab;
}
[data-outline] [data-section-header]:hover { background: var(--nrp-row-hover); }
[data-outline] [data-section-header]:active { cursor: grabbing; }

/* Collapse chevron */
[data-outline] [data-action="section-collapse"] {
  appearance: none; background: transparent; border: 0; padding: 0;
  display: inline-flex; align-items: center; cursor: pointer;
  color: var(--nrp-text-dim); flex-shrink: 0; width: 14px; height: 14px;
}
[data-outline] [data-action="section-collapse"] svg { width: 12px; height: 12px; transition: transform 120ms; }
[data-outline] [data-section][data-collapsed] [data-action="section-collapse"] svg { transform: rotate(-90deg); }

/* Section name — editable, but reads as plain display text (mock .ol-sec__name);
   the input chrome surfaces only on hover/focus so rename stays discoverable. */
[data-outline] [data-section-name] {
  flex: 1; min-width: 0;
  font-family: var(--nrp-font-display); font-size: 13.5px; font-weight: 600;
  color: var(--nrp-text);
  background: transparent; border: 1px solid transparent;
  border-radius: var(--nrp-r-sm); padding: 2px 5px;
}
[data-outline] [data-section-name]:hover { border-color: var(--nrp-input-border); }
[data-outline] [data-section-name]:focus { background: var(--nrp-input-bg); border-color: var(--nrp-orange); outline: none; }

[data-outline] [data-item-count] {
  flex-shrink: 0; font-size: 10px; color: var(--nrp-text-dim);
  font-variant-numeric: tabular-nums;
}

/* Section delete — quiet, revealed on header hover. */
[data-outline] [data-action="section-remove"] {
  appearance: none; background: transparent; border: 0; padding: 2px;
  cursor: pointer; color: var(--nrp-text-dim); flex-shrink: 0;
  opacity: 0; transition: opacity 120ms, color 120ms;
}
[data-outline] [data-action="section-remove"] svg { width: 12px; height: 12px; display: block; }
[data-outline] [data-section-header]:hover [data-action="section-remove"] { opacity: 1; }
[data-outline] [data-action="section-remove"]:hover { color: var(--nrp-danger); }

/* Item list + rows */
[data-outline] [data-item-list] { list-style: none; margin: 0; padding: 2px 0 4px; }
[data-outline] [data-outline-item] {
  list-style: none; border-radius: var(--nrp-r-sm); position: relative;
  display: flex; align-items: center;
}
[data-outline] [data-outline-item]:hover { background: var(--nrp-row-hover); }
[data-outline] [data-outline-item][data-selected] {
  background: var(--nrp-orange-tint); box-shadow: inset 2px 0 0 var(--nrp-orange);
}

/* The whole row is the select affordance (a <button> for keyboard a11y). */
[data-outline] [data-action="item-select"] {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
  padding: 6px 8px 6px 26px; text-align: left; font: inherit; color: inherit;
}
[data-outline] [data-type-tag] {
  flex-shrink: 0; font-family: var(--nrp-font-mono);
  font-size: 8.5px; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--nrp-text-mid);
  border: 1px solid var(--nrp-card-border); border-radius: 3px; padding: 1px 4px;
}
[data-outline] [data-item-name] {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--nrp-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
[data-outline] [data-outline-item][data-selected] [data-item-name] { font-weight: 600; }
[data-outline] [data-flags] { display: inline-flex; gap: 4px; flex-shrink: 0; padding-right: 8px; color: var(--nrp-text-dim); }
[data-outline] [data-flag] svg { width: 12px; height: 12px; display: block; }
[data-outline] [data-flag][data-on] { color: var(--nrp-orange); }

/* Add item (per-section ghost link) + add section (ghost button). */
[data-outline] [data-action="add-item"] {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 500; color: var(--nrp-orange);
  padding: 5px 8px 5px 26px;
}
[data-outline] [data-action="add-item"] svg { width: 11px; height: 11px; }
[data-outline] [data-action="add-item"]:hover { text-decoration: underline; text-underline-offset: 2px; }
[data-outline] [data-action="add-section"] {
  appearance: none; cursor: pointer; background: var(--nrp-card);
  display: inline-flex; align-items: center; gap: 6px;
  margin: 8px 8px 4px; padding: 7px 12px;
  border: 1px solid var(--nrp-input-border); border-radius: var(--nrp-r-sm);
  font-size: 12px; font-weight: 500; color: var(--nrp-text-mid);
  transition: background 120ms, border-color 120ms, color 120ms;
}
[data-outline] [data-action="add-section"] svg { width: 12px; height: 12px; }
[data-outline] [data-action="add-section"]:hover {
  border-color: var(--nrp-orange); color: var(--nrp-orange); background: var(--nrp-orange-tint);
}

/* Collapsible sections — CSS-only; JS toggles [data-collapsed] on [data-section]. */
[data-section][data-collapsed] [data-item-list],
[data-section][data-collapsed] [data-action="add-item"] { display: none; }

/* ── Detail pane — renderDetail → [data-detail-pane]. Single column (every
   field is full-width per the mock). Keyed on the data-attributes render.js
   emits; scoped under [data-detail-pane] so nothing leaks. */
[data-detail-pane] {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 20px; overflow: auto;
}
[data-detail-pane] [data-detail-heading] { display: flex; flex-direction: column; gap: 4px; }
[data-detail-pane] [data-detail-eyebrow] {
  margin: 0; font-family: var(--nrp-font-body);
  font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--nrp-text-mid);
}
[data-detail-pane] [data-detail-section-name] {
  color: var(--nrp-text-mid); font-weight: 600; letter-spacing: 0; text-transform: none;
}
[data-detail-pane] [data-detail-item-title] {
  margin: 0; font-family: var(--nrp-font-display);
  font-size: 19px; font-weight: 600; letter-spacing: -0.2px; color: var(--nrp-text);
}
/* Labeled fields — eyebrow label stacked over the control. */
[data-detail-pane] [data-detail-name-label],
[data-detail-pane] [data-detail-type-label],
[data-detail-pane] [data-detail-help-label],
[data-detail-pane] [data-type-config] [data-type-config-field] {
  display: flex; flex-direction: column; gap: 5px;
}
[data-detail-pane] [data-detail-name-label] > span:first-child,
[data-detail-pane] [data-detail-type-label] > span:first-child,
[data-detail-pane] [data-detail-help-label] > span:first-child,
[data-detail-pane] [data-type-config] .nrp-field__label {
  font-family: var(--nrp-font-body); font-size: 10px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--nrp-text-mid);
}
[data-detail-pane] [data-help-text] { min-height: 60px; resize: vertical; }

/* Response-type segmented control (renderDetail emits [data-response-type] with
   per-type [data-type-option] buttons; [data-selected] = active). */
[data-detail-pane] [data-response-type] {
  display: inline-flex; flex-wrap: wrap; align-self: flex-start;
  border: 1px solid var(--nrp-input-border); border-radius: var(--nrp-r-sm); overflow: hidden;
}
[data-detail-pane] [data-type-option] {
  appearance: none; font-family: var(--nrp-font-body);
  font-size: 12px; font-weight: 500; color: var(--nrp-text-mid);
  background: var(--nrp-card); border: 0; border-left: 1px solid var(--nrp-input-border);
  padding: 7px 13px; cursor: pointer; transition: background 120ms, color 120ms;
}
[data-detail-pane] [data-type-option]:first-child { border-left: 0; }
[data-detail-pane] [data-type-option][data-selected] {
  background: var(--nrp-orange-tint); color: var(--nrp-orange); font-weight: 600;
}

/* Type-config (the option editor / max / unit — the mock's "Condition set"). */
[data-detail-pane] [data-type-config]:empty { display: none; }
[data-detail-pane] [data-type-config] { display: flex; flex-direction: column; gap: 10px; }

/* Capture flag-cards (renderDetail emits [data-capture] → two [data-cap] cards,
   each a hidden checkbox + the reused .nrp-toggle visual + title/sub). */
[data-detail-pane] [data-capture] { display: flex; gap: 10px; }
[data-detail-pane] [data-cap] {
  flex: 1; border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-sm);
}
[data-detail-pane] [data-cap] > label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  margin: 0; padding: 11px 12px;
}
[data-detail-pane] [data-cap] .nrp-cap-text { display: flex; flex-direction: column; }
[data-detail-pane] [data-cap] .nrp-cap-text b { font-size: 12.5px; font-weight: 500; color: var(--nrp-text); }
[data-detail-pane] [data-cap] .nrp-cap-text span { font-size: 11px; color: var(--nrp-text-dim); margin-top: 1px; }

/* Footer ghost-links (Duplicate / Move to… left, Delete item right). */
[data-detail-pane] [data-detail-footer] {
  display: flex; align-items: center; gap: 14px;
  margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--nrp-row-border);
}
[data-detail-pane] [data-detail-footer] [data-action] {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--nrp-text-mid); padding: 0;
}
[data-detail-pane] [data-detail-footer] [data-action] svg { width: 13px; height: 13px; }
[data-detail-pane] [data-detail-footer] [data-action]:hover { color: var(--nrp-text); }
[data-detail-pane] [data-detail-footer] [data-action="item-remove"] { margin-left: auto; }
[data-detail-pane] [data-detail-footer] [data-action="item-remove"]:hover { color: var(--nrp-danger); }

/* Empty state */
[data-detail-empty] { display: flex; align-items: center; justify-content: center; min-height: 220px; padding: 24px; }
[data-detail-empty-msg] { margin: 0; font-size: 13px; color: var(--nrp-text-dim); }

/* ── Static shell (Jinja template) — scoped under the editor root so the
   generic class names cannot leak onto other pages. The header components the
   mock calls for (pill-chips, the Active toggle row, signature blocks, the
   sticky save bar) are ALREADY the shared, themed components this page renders:
   the applicable-type chips are .nrp-tchip (controller renderHeader), the Active
   row is .nrp-toggle-row, signatures are .nrp-sig-row, and the save bar is the
   global .nrp-action-bar. So only the chip-row container + the form body need
   layout here; the rest reuse what exists (no duplicate class families). ── */
.inspection-template-editor .nrp-edit-body { display: flex; flex-direction: column; gap: 14px; }

/* Applicable-types pill-chip row (item 3). The chips themselves are the shared
   .nrp-tchip component; this only lays the row out. */
.inspection-template-editor .nrp-type-chips { display: flex; flex-wrap: wrap; gap: 7px; }

/* ── 03 builder card body: the padded inset (14px 16px, mock .nrp-card__body)
   that frames the bordered .itb-frame. The "Checklist structure" count sits
   right of the bar title (mock .builder__bar .meta, margin-left:auto). ── */
.nrp-tpl-builder__body { padding: 14px 16px; }
.nrp-tpl-builder .itb-strip-header__count {
  margin-left: auto;
  font-size: 11.5px; color: var(--nrp-text-dim); font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════════
   Marketing → Website hub + per-site switcher (2026-06-20)
   Ported from the design mock as reusable .nrp-* utilities. Existing
   --nrp-* tokens only. See docs/superpowers/specs/2026-06-20-...-design.md
   ════════════════════════════════════════════════════════════════ */

/* Flip a right-chevron to point left (no left-chevron symbol exists). */
.nrp-flip-x { transform: scaleX(-1); }

/* Hub header */
.nrp-site-hub-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.nrp-site-hub-head__title { font-family: var(--nrp-font-display); font-size: 30px; font-weight: 600; color: var(--nrp-text); letter-spacing: -0.4px; line-height: 1.05; }
.nrp-site-hub-head__sub { font-size: 12.5px; color: var(--nrp-text-mid); margin-top: 6px; }

/* Stat strip */
.nrp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.nrp-stat { background: var(--nrp-card); border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md); padding: 15px 18px; text-align: left; font-family: inherit; }
button.nrp-stat { width: 100%; cursor: pointer; }
.nrp-stat.is-clickable { transition: border-color 120ms; }
.nrp-stat.is-clickable:hover { border-color: var(--nrp-text-dim); }
.nrp-stat.is-clickable:focus-visible { outline: none; border-color: var(--nrp-orange); box-shadow: 0 0 0 3px var(--nrp-orange-tint); }
.nrp-stat.is-active { border-color: var(--nrp-orange); background: var(--nrp-orange-tint); }
.nrp-stat__label { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--nrp-text-dim); font-weight: 600; }
.nrp-stat__value { font-family: var(--nrp-font-display); font-size: 27px; font-weight: 500; color: var(--nrp-text); letter-spacing: -0.4px; margin-top: 5px; display: flex; align-items: baseline; gap: 7px; }
.nrp-stat__value .unit { font-size: 13px; color: var(--nrp-text-mid); font-weight: 500; }
.nrp-stat__value--accent { color: var(--nrp-orange); }
.nrp-stat__sub { font-size: 11px; color: var(--nrp-text-mid); margin-top: 3px; }

/* Toolbar + segmented control */
.nrp-site-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.nrp-site-toolbar .nrp-search { flex: 1; min-width: 220px; max-width: 340px; }
.nrp-site-toolbar__spacer { flex: 1; }
.nrp-site-toolbar__sort { font-size: 12px; color: var(--nrp-text-mid); }
.nrp-site-toolbar__sort strong { color: var(--nrp-text); font-weight: 500; }
.nrp-segmented { display: inline-flex; border: 1px solid var(--nrp-input-border); border-radius: var(--nrp-r-sm); overflow: hidden; background: var(--nrp-input-bg); }
.nrp-segmented button { padding: 0 13px; height: 34px; font-size: 12px; font-family: inherit; color: var(--nrp-text-mid); background: transparent; border: 0; border-right: 1px solid var(--nrp-input-border); cursor: pointer; }
.nrp-segmented button:last-child { border-right: 0; }
.nrp-segmented button.is-active { background: var(--nrp-orange-tint); color: var(--nrp-orange); font-weight: 600; }
.nrp-segmented button:focus-visible { outline: 2px solid var(--nrp-orange); outline-offset: -2px; }

/* Rollup table */
.nrp-site-table { background: var(--nrp-card); border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md); overflow: hidden; }
.nrp-site-row { display: grid; grid-template-columns: minmax(0,1fr) 124px 176px 232px 116px; align-items: center; gap: 16px; padding: 0 20px; text-decoration: none; color: inherit; }
.nrp-site-row--head { height: 42px; background: var(--nrp-strip-bg); border-bottom: 1px solid var(--nrp-row-border); font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--nrp-text-dim); font-weight: 600; }
.nrp-site-row--body { min-height: 64px; padding-top: 13px; padding-bottom: 13px; border-bottom: 1px solid var(--nrp-row-border); cursor: pointer; transition: background 120ms; }
.nrp-site-row--body:last-child { border-bottom: 0; }
.nrp-site-row--body:hover { background: var(--nrp-row-hover); }
.nrp-site-row--attention { box-shadow: inset 3px 0 0 var(--nrp-orange); }
.nrp-site-name-cell { min-width: 0; }
.nrp-site-name { font-size: 13.5px; font-weight: 500; color: var(--nrp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrp-site-meta { font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 2px; }
.nrp-site-meta .code { font-family: var(--nrp-font-mono); font-size: 10.5px; color: var(--nrp-text-dim); }
.nrp-site-readiness { display: flex; align-items: center; gap: 10px; }
.nrp-site-readiness__meter { flex: 1; height: 5px; border-radius: 3px; background: var(--nrp-row-border); overflow: hidden; min-width: 60px; }
.nrp-site-readiness__bar { height: 100%; background: var(--nrp-orange); border-radius: 3px; }
.nrp-site-readiness__bar.is-full { background: var(--nrp-success); }
.nrp-site-readiness__txt { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--nrp-text-mid); white-space: nowrap; min-width: 30px; }
.nrp-site-readiness__txt.is-full { color: var(--nrp-success); }
.nrp-site-domain { font-family: var(--nrp-font-mono); font-size: 12px; color: var(--nrp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrp-site-domain--none { font-family: var(--nrp-font-body); color: var(--nrp-text-dim); font-style: italic; }
.nrp-site-domain__sub { font-family: var(--nrp-font-body); font-size: 10.5px; color: var(--nrp-text-dim); margin-top: 2px; }
.nrp-site-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.nrp-site-updated { font-size: 11.5px; color: var(--nrp-text-mid); white-space: nowrap; }
.nrp-site-row--body .nrp-site-chev { color: var(--nrp-text-dim); width: 16px; height: 16px; opacity: 0; transition: opacity 120ms, transform 120ms; }
.nrp-site-row--body:hover .nrp-site-chev { opacity: 1; transform: translateX(2px); }

/* Switcher (workspace header) */
.nrp-site-switcher__bar { margin-bottom: 20px; }
.nrp-site-switcher__back { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--nrp-text-mid); text-decoration: none; margin-bottom: 12px; }
.nrp-site-switcher__back:hover { color: var(--nrp-orange); }
.nrp-site-switcher__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.nrp-site-switcher { position: relative; }
.nrp-site-switcher__btn { display: inline-flex; align-items: center; gap: 12px; background: var(--nrp-card); border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md); padding: 8px 12px 8px 14px; cursor: pointer; font-family: inherit; text-align: left; transition: border-color 120ms; }
.nrp-site-switcher__btn:hover { border-color: var(--nrp-text-dim); }
.nrp-site-switcher.is-open .nrp-site-switcher__btn { border-color: var(--nrp-orange); box-shadow: 0 0 0 3px var(--nrp-orange-tint); }
.nrp-site-switcher__btn:focus-visible { outline: none; border-color: var(--nrp-orange); box-shadow: 0 0 0 3px var(--nrp-orange-tint); }
.nrp-site-switcher__name { display: block; font-family: var(--nrp-font-display); font-size: 26px; font-weight: 600; color: var(--nrp-text); letter-spacing: -0.4px; line-height: 1.1; }
.nrp-site-switcher__meta { display: block; font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 3px; }
.nrp-site-switcher__caret { color: var(--nrp-text-mid); flex-shrink: 0; transition: transform 120ms; }
.nrp-site-switcher.is-open .nrp-site-switcher__caret { transform: rotate(180deg); }
.nrp-site-switcher__pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 80; width: 380px; max-width: calc(100vw - 32px); max-height: 440px; background: var(--nrp-card); border: 1px solid var(--nrp-card-border); border-radius: var(--nrp-r-md); box-shadow: 0 14px 40px rgba(26,24,20,0.22); display: none; flex-direction: column; overflow: hidden; }
.nrp-site-switcher.is-open .nrp-site-switcher__pop { display: flex; }
.nrp-site-switcher__search { padding: 10px; border-bottom: 1px solid var(--nrp-row-border); flex-shrink: 0; }
.nrp-site-switcher__list { overflow-y: auto; overflow-x: hidden; padding: 6px; }
.nrp-site-switcher__opt { display: grid; grid-template-columns: minmax(0,1fr) 86px; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--nrp-r-sm); cursor: pointer; text-decoration: none; }
.nrp-site-switcher__opt:hover { background: var(--nrp-row-hover); }
.nrp-site-switcher__opt.is-current { background: var(--nrp-orange-tint); }
.nrp-site-switcher__opt-name { display: block; font-size: 13px; font-weight: 500; color: var(--nrp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrp-site-switcher__opt.is-current .nrp-site-switcher__opt-name { color: var(--nrp-orange); }
.nrp-site-switcher__opt-meta { display: block; font-size: 11px; color: var(--nrp-text-mid); margin-top: 1px; }
.nrp-site-switcher__opt-ready { display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.nrp-site-switcher__opt-mini { width: 38px; height: 4px; border-radius: 2px; background: var(--nrp-row-border); overflow: hidden; }
.nrp-site-switcher__opt-mini > span { display: block; height: 100%; background: var(--nrp-orange); }
.nrp-site-switcher__opt-mini > span.is-full { background: var(--nrp-success); }
.nrp-site-switcher__opt-pct { font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--nrp-text-dim); min-width: 16px; }
.nrp-site-switcher__foot { border-top: 1px solid var(--nrp-row-border); padding: 9px 12px; flex-shrink: 0; }
.nrp-site-switcher__foot a { font-size: 12px; color: var(--nrp-orange); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.nrp-site-switcher__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.nrp-site-switcher__progress { font-size: 11.5px; color: var(--nrp-text-mid); }
.nrp-site-switcher__progress strong { color: var(--nrp-text); font-weight: 600; }
.nrp-site-switcher__step { display: inline-flex; gap: 4px; }
.nrp-site-switcher__step a { width: 22px; height: 22px; border-radius: var(--nrp-r-sm); border: 1px solid var(--nrp-input-border); background: var(--nrp-card); color: var(--nrp-text-mid); display: inline-flex; align-items: center; justify-content: center; }
.nrp-site-switcher__step a:hover { border-color: var(--nrp-orange); color: var(--nrp-orange); }

/* Responsive: drop domain + updated on narrow screens */
@media (max-width: 768px) {
  .nrp-stats { grid-template-columns: repeat(2, 1fr); }
  .nrp-site-row { grid-template-columns: minmax(0,1fr) 110px 140px; }
  .nrp-site-row > :nth-child(4), .nrp-site-row > :nth-child(5) { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   Marketing section shell (2026-06-21)
   Marketing is a first-class section like Admin: navy sidebar +
   persistent Marketing section-nav column + content. Mirrors the
   .admin-shell / .admin-nav pattern (existing tokens only). The hub
   and the per-site website workspace both render under this shell.
   ════════════════════════════════════════════════════════════════ */
.marketing-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--nrp-bg);
  font-family: var(--nrp-font-body);
}
.marketing-nav {
  border-right: 1px solid var(--nrp-card-border);
  padding: 22px 0 40px;
  background: var(--nrp-bg);
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
}
.marketing-nav__header {
  padding: 0 22px 14px;
  border-bottom: 1px solid var(--nrp-row-border);
  margin-bottom: 12px;
}
.marketing-nav__eyebrow {
  font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--nrp-text-mid); font-weight: 600;
}
.marketing-nav__title {
  font-family: var(--nrp-font-display); font-weight: 500; font-size: 22px;
  color: var(--nrp-text); letter-spacing: -0.3px; margin-top: 4px; line-height: 1.1;
}
.marketing-nav__group { padding: 6px 0 10px; }
.marketing-nav__group-label {
  padding: 8px 22px 6px;
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--nrp-text-dim); font-weight: 600;
}
.marketing-nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 22px;
  font-size: 13.5px; color: var(--nrp-text-mid);
  text-decoration: none; border-left: 2px solid transparent;
  cursor: pointer; transition: color 120ms, background 120ms;
}
.marketing-nav__item .nrp-icon { width: 14px; height: 14px; opacity: 0.7; flex-shrink: 0; }
.marketing-nav__item:hover { color: var(--nrp-text); background: var(--nrp-row-hover); }
.marketing-nav__item.is-active {
  color: var(--nrp-orange); background: var(--nrp-orange-tint);
  border-left-color: var(--nrp-orange); font-weight: 500;
}
.marketing-nav__item.is-active .nrp-icon { opacity: 1; color: var(--nrp-orange); }
.marketing-nav__item.is-muted { color: var(--nrp-text-dim); cursor: default; }
.marketing-nav__item.is-muted:hover { background: transparent; color: var(--nrp-text-dim); }
.marketing-nav__n {
  margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--nrp-text-dim);
}
.marketing-main { padding: 24px 32px 60px; min-width: 0; }
/* ════════════════════════════════════════════════════════════════
   New User screen (admin/user_new.html)
   Dedicated full-page guided form that replaced the Add User modal.
   Mounts inside the existing admin shell (.admin-shell → .admin-main),
   so the navy sidebar + admin secondary nav come from base.html /
   admin/_shell.html. Classes are namespaced .admin-nu-* per house rules
   (.scope/.seg already exist globally — these must not collide).
   ════════════════════════════════════════════════════════════════ */

/* Two-column guided sections: left heading block + right fields, hairline between */
.admin-nu-section {
  display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start;
  padding: 22px 0; border-bottom: 1px solid var(--nrp-row-border);
}
.admin-nu-section:last-child { border-bottom: 0; }
.admin-nu-section__num { font-family: var(--nrp-font-display); font-style: italic; color: var(--nrp-orange); font-size: 14px; }
.admin-nu-section__title { font-family: var(--nrp-font-display); font-size: 18px; font-weight: 500; margin-top: 3px; }
.admin-nu-section__sub { font-size: 12px; color: var(--nrp-text-mid); margin-top: 7px; line-height: 1.55; }

/* Form + sticky invitation-preview rail */
.admin-nu-layout { display: grid; grid-template-columns: 1fr 308px; gap: 32px; align-items: start; margin-top: 20px; }

/* Segmented control (account status) */
.admin-nu-seg { display: inline-flex; background: var(--nrp-strip-bg); border: 1px solid var(--nrp-input-border); border-radius: 6px; padding: 2px; gap: 2px; }
.admin-nu-seg__opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 4px; font-size: 12.5px; font-weight: 500; color: var(--nrp-text-mid); cursor: pointer; border: 0; background: transparent; font-family: inherit; }
.admin-nu-seg__opt .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.admin-nu-seg__opt.is-on { background: var(--nrp-card); color: var(--nrp-text); box-shadow: 0 1px 2px rgba(47,59,70,0.10); }
.admin-nu-seg__opt[data-val="active"].is-on  { color: var(--nrp-success); }
.admin-nu-seg__opt[data-val="invited"].is-on { color: var(--nrp-orange); }

/* Role picker (multi-select) */
.admin-nu-rolepick { display: flex; flex-direction: column; gap: 8px; }
.admin-nu-role { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--nrp-card-raised); border: 1px solid var(--nrp-card-border); border-radius: 8px; cursor: pointer; transition: border-color 120ms, background 120ms; text-align: left; }
.admin-nu-role:hover { border-color: var(--nrp-text-dim); }
.admin-nu-role.is-on { border-color: var(--nrp-orange); background: var(--nrp-orange-tint); }
.admin-nu-role__ico { width: 32px; height: 32px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--nrp-card); border: 1px solid var(--nrp-card-border); color: var(--nrp-text-mid); }
.admin-nu-role.is-on .admin-nu-role__ico { background: var(--nrp-orange); border-color: var(--nrp-orange); color: #f5f1e8; }
.admin-nu-role__ico .nrp-icon { width: 15px; height: 15px; }
.admin-nu-role__name { font-size: 13.5px; font-weight: 500; color: var(--nrp-text); }
.admin-nu-role__sub { font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 1px; }
.admin-nu-role__check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--nrp-input-border); display: inline-flex; align-items: center; justify-content: center; color: transparent; flex-shrink: 0; }
.admin-nu-role.is-on .admin-nu-role__check { background: var(--nrp-orange); border-color: var(--nrp-orange); color: #fff; }
.admin-nu-role__check .nrp-icon { width: 12px; height: 12px; }

/* Permission preview */
.admin-nu-perm { margin-top: 12px; background: var(--nrp-strip-bg); border: 1px solid var(--nrp-card-border); border-radius: 8px; padding: 14px 16px; }
.admin-nu-perm__head { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--nrp-text-mid); font-weight: 600; }
.admin-nu-perm__head .nrp-icon { width: 13px; height: 13px; color: var(--nrp-orange); }
.admin-nu-perm__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; margin-top: 10px; }
.admin-nu-perm__role { break-inside: avoid; padding: 6px 0; }
.admin-nu-perm__role-name { font-size: 12px; font-weight: 600; color: var(--nrp-text); }
.admin-nu-perm__cap { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--nrp-text-mid); margin-top: 4px; }
.admin-nu-perm__cap .nrp-icon { width: 12px; height: 12px; color: var(--nrp-success); margin-top: 2px; flex-shrink: 0; }
.admin-nu-perm__empty { font-size: 12.5px; color: var(--nrp-text-dim); margin-top: 8px; }

/* Project scope (radio pair) */
.admin-nu-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-nu-scope__opt { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 13px 15px; background: var(--nrp-card-raised); border: 1px solid var(--nrp-card-border); border-radius: 8px; cursor: pointer; text-align: left; }
.admin-nu-scope__opt:hover { border-color: var(--nrp-text-dim); }
.admin-nu-scope__opt.is-on { border-color: var(--nrp-orange); background: var(--nrp-orange-tint); }
.admin-nu-scope__radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--nrp-input-border); margin-top: 1px; position: relative; }
.admin-nu-scope__opt.is-on .admin-nu-scope__radio { border-color: var(--nrp-orange); }
.admin-nu-scope__opt.is-on .admin-nu-scope__radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--nrp-orange); }
.admin-nu-scope__title { display: block; font-size: 13px; font-weight: 500; color: var(--nrp-text); }
.admin-nu-scope__sub { display: block; font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 2px; }

/* Project chip multiselect */
.admin-nu-projects { margin-top: 12px; }
.admin-nu-projects[hidden] { display: none; }
.admin-nu-projects__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.admin-nu-projects__count { font-size: 12px; color: var(--nrp-text-mid); }
.admin-nu-projects__count b { color: var(--nrp-orange); }
.admin-nu-projects__link { font-size: 12px; color: var(--nrp-orange); text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit; }
.admin-nu-projects__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.admin-nu-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--nrp-card-raised); border: 1px solid var(--nrp-card-border); color: var(--nrp-text-mid); font-size: 12.5px; cursor: pointer; transition: all 120ms; }
.admin-nu-chip:hover { border-color: var(--nrp-text-dim); color: var(--nrp-text); }
.admin-nu-chip.is-on { background: var(--nrp-orange-tint); border-color: var(--nrp-orange); color: var(--nrp-orange); font-weight: 500; }
.admin-nu-chip__check { width: 12px; height: 12px; display: none; }
.admin-nu-chip.is-on .admin-nu-chip__check { display: inline-flex; }

/* Info note */
.admin-nu-note { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; background: var(--nrp-info-tint); border: 1px solid color-mix(in srgb, var(--nrp-info) 24%, transparent); border-radius: 8px; }
.admin-nu-note__ico { width: 28px; height: 28px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--nrp-info); border-radius: 6px; color: #fff; }
.admin-nu-note__ico .nrp-icon { width: 15px; height: 15px; }
.admin-nu-note__title { font-size: 13px; font-weight: 500; color: var(--nrp-text); }
.admin-nu-note__body { font-size: 12.5px; color: var(--nrp-text-mid); margin-top: 2px; line-height: 1.5; }
.admin-nu-note__body b { color: var(--nrp-text); font-weight: 500; }

/* Toggle rows */
.admin-nu-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-nu-trow { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 12px 14px; background: var(--nrp-card-raised); border: 1px solid var(--nrp-card-border); border-radius: 8px; cursor: pointer; }
.admin-nu-trow__title { font-size: 13px; font-weight: 500; color: var(--nrp-text); }
.admin-nu-trow__sub { font-size: 11.5px; color: var(--nrp-text-mid); margin-top: 1px; }

/* Invitation-preview rail (the one accented rail card) */
.admin-nu-summ { position: sticky; top: 26px; }
.admin-nu-summ__card { background: var(--nrp-card); border: 1px solid var(--nrp-card-border); border-left: 3px solid var(--nrp-orange); border-radius: var(--nrp-r-md); overflow: hidden; }
.admin-nu-summ__head { padding: 12px 16px; background: var(--nrp-strip-bg); border-bottom: 1px solid var(--nrp-row-border); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--nrp-text-mid); font-weight: 600; }
.admin-nu-summ__body { padding: 16px; }
.admin-nu-summ__who { display: flex; align-items: center; gap: 12px; }
.admin-nu-summ__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--nrp-side-bg); color: #f5f1e8; font-family: var(--nrp-font-logo); font-size: 16px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.admin-nu-summ__name { font-size: 14px; font-weight: 600; color: var(--nrp-text); }
.admin-nu-summ__email { font-size: 12px; color: var(--nrp-text-mid); font-family: var(--nrp-font-mono); word-break: break-all; }
.admin-nu-summ__row { display: flex; flex-direction: column; gap: 5px; padding: 13px 0; border-top: 1px solid var(--nrp-row-border); margin-top: 13px; }
.admin-nu-summ__label { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--nrp-text-dim); font-weight: 600; }
.admin-nu-summ__val { font-size: 12.5px; color: var(--nrp-text); }
.admin-nu-summ__pills { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-nu-summ__foot { padding: 12px 16px; background: var(--nrp-strip-bg); border-top: 1px solid var(--nrp-row-border); display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--nrp-text-mid); }
.admin-nu-summ__foot .nrp-icon { width: 14px; height: 14px; color: var(--nrp-info); flex-shrink: 0; }

/* Sticky action bar — sticks to the bottom of the main column (robust against
   the collapsible navy sidebar; no hardcoded left offset). */
.admin-nu-bar { position: sticky; bottom: 0; z-index: 20; margin: 24px -32px 0; background: var(--nrp-card); border-top: 1px solid var(--nrp-row-border); }
.admin-nu-bar__inner { padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-nu-bar__meta { font-size: 12px; color: var(--nrp-text-mid); display: flex; align-items: center; gap: 8px; }
.admin-nu-bar__meta .nrp-icon { width: 14px; height: 14px; color: var(--nrp-text-dim); }
.admin-nu-bar__meta b { color: var(--nrp-text); font-weight: 500; font-family: var(--nrp-font-mono); }
.admin-nu-bar__actions { display: flex; gap: 8px; }
.admin-nu-bar .nrp-btn svg.lead { width: 13px; height: 13px; margin-right: -2px; }

/* Visually-hidden native inputs that the styled buttons/labels reflect (keeps
   the form submittable without JS while the styled controls drive visuals). */
.admin-nu-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Responsive */
@media (max-width: 1180px) {
  .admin-nu-layout { grid-template-columns: 1fr; }
  .admin-nu-summ { position: static; }
}
@media (max-width: 760px) {
  .admin-nu-section { grid-template-columns: 1fr; gap: 14px; }
  .admin-nu-scope, .admin-nu-toggles, .admin-nu-perm__grid { grid-template-columns: 1fr; }
}
