/* Proplore app layer (2026-10-23). Load AFTER /static/brand/proplore/tokens.css on the signed-in pages
   (sign-in, welcome, invite, reset, Finder, review card, packet). It does three things and nothing else:

   1. Maps the app pages' legacy variable names (--bg, --panel, --accent …) onto the Proplore tokens, so a page that still
      says var(--accent) in an inline style takes the brand colour without a rewrite. Values only; the names stay.
   2. Sets the type: Besley for headings, Schibsted Grotesk for text, Spline Sans Mono for PINs, book/page and dates.
   3. Gives the app pages the few shared pieces they all need: the header lockup, the record list, status chips, the
      disclosure ("More …") pattern, and honest empty / loading / error lines.

   Rules: no gradient text, no all-caps eyebrow on everything, one primary action per screen, phone first (390 px).
   Do not add page layout here — each page owns its layout in its own <style>. */

:root {
  color-scheme: light;
  /* legacy names → Proplore tokens (the app pages' inline styles reference these names) */
  --bg: var(--pl-sand);
  --panel: var(--pl-white);
  --panel2: var(--pl-sand);
  --line: var(--pl-line);
  --text: var(--pl-deep);
  --muted: var(--pl-muted);
  --accent: var(--pl-teal);
  --link: var(--pl-coral-600);
  --good: var(--pl-ok);
  --warn: #8A6212;          /* "needs a check" as text on sand (the chip colour); gold --pl-gold is for fills on deep teal */
  --warn-fill: var(--pl-gold);
  --bad: var(--pl-danger);
  --chip: var(--pl-white);
  --focus: var(--pl-coral);
  --radius: var(--pl-r-md);
  --shadow: var(--pl-shadow-2);
}

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--pl-font-text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--pl-font-display); font-weight: 700; color: var(--pl-deep); letter-spacing: -0.01em; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--pl-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
input, select, textarea, button { font-family: inherit; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea {
  color: var(--text); background: var(--pl-white); border: 1.5px solid var(--line); border-radius: var(--pl-r-sm);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pl-teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pl-coral) 30%, transparent); }
::placeholder { color: color-mix(in srgb, var(--pl-muted) 70%, transparent); }

/* The app header: the horizontal lockup at the left, the session words at the right. */
.pl-app-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 22px; background: var(--pl-white); border-bottom: 1px solid var(--line); }
.pl-app-header__logo { display: inline-flex; align-items: center; text-decoration: none; }
.pl-app-header__logo img { height: 34px; width: auto; display: block; }
.pl-app-header__spacer { flex: 1; }
@media (max-width: 480px) { .pl-app-header { padding: 10px 14px; } .pl-app-header__logo img { height: 28px; } }

/* Mono data: PINs, deed book / page, dates in a list. */
.pl-data { font-family: var(--pl-font-mono); font-size: .92em; font-variant-numeric: tabular-nums; }

/* Status chips — the word is the record's own: new, on record, check, do not contact. Never a score. */
.pl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pl-r-pill);
  font: 600 12px/1.4 var(--pl-font-mono); letter-spacing: .04em; background: var(--pl-white); border: 1px solid var(--line); color: var(--pl-deep); }
.pl-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pl-chip--new { color: var(--pl-coral-600); }
.pl-chip--record { color: var(--pl-ok); }
.pl-chip--check { color: var(--warn); }
.pl-chip--dnc { color: var(--pl-danger); }
.pl-chip--quiet { color: var(--pl-muted); }

/* The record list — the product's core pattern: date · what the record says · where it came from · one chip. */
.pl-record { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.pl-record:first-child { border-top: 0; }
.pl-record > div { min-width: 0; }
.pl-record__date { font: 600 12px var(--pl-font-mono); color: var(--pl-muted); text-transform: uppercase; white-space: nowrap; }
.pl-record__title { font-weight: 600; }
.pl-record__src { display: block; font-size: 13px; color: var(--pl-muted); overflow-wrap: anywhere; }
@media (max-width: 480px) { .pl-record { grid-template-columns: 1fr auto; gap: 6px 12px; } .pl-record__date { grid-column: 1 / -1; } }

/* Disclosure: the page shows the short list; the rest opens on demand. A 44-px summary on the phone. */
.pl-more { border-top: 1px solid var(--line); }
.pl-more > summary { list-style: none; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; font-size: 14px; color: var(--pl-deep); }
.pl-more > summary::-webkit-details-marker { display: none; }
.pl-more > summary::before { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); margin: 0 6px 0 2px; transition: transform var(--pl-dur) var(--pl-ease); flex: none; }
.pl-more[open] > summary::before { transform: rotate(45deg); }
.pl-more > summary .pl-more__count { font: 500 12px var(--pl-font-mono); color: var(--pl-muted); margin-left: auto; }

/* Buttons shared by the app pages. One primary per screen. */
.pl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--pl-r-pill);
  font: 600 15px/1 var(--pl-font-text); text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background var(--pl-dur) var(--pl-ease), color var(--pl-dur) var(--pl-ease), border-color var(--pl-dur) var(--pl-ease); }
.pl-btn--primary { background: var(--pl-deep); color: var(--pl-sand); }
.pl-btn--primary:hover { background: var(--pl-teal); color: var(--pl-white); }
.pl-btn--accent { background: var(--pl-coral-600); color: var(--pl-white); }
.pl-btn--accent:hover { background: #A33024; }
.pl-btn--ghost { background: transparent; color: var(--pl-deep); border-color: var(--pl-deep); }
.pl-btn--ghost:hover { background: var(--pl-deep); color: var(--pl-sand); }
.pl-btn--quiet { background: var(--pl-white); color: var(--pl-deep); border-color: var(--line); }
.pl-btn--quiet:hover { border-color: var(--pl-deep); }
.pl-btn[disabled] { opacity: .55; cursor: default; }
.pl-btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* Cards and the honest states. */
.pl-card { background: var(--pl-white); border: 1px solid var(--line); border-radius: var(--pl-r-lg); padding: 20px; box-shadow: var(--pl-shadow-1); }
.pl-state { color: var(--pl-muted); font-size: 15px; line-height: 1.5; padding: 18px 0; }
.pl-state b { color: var(--pl-deep); font-weight: 600; }
.pl-state--error { color: var(--pl-danger); }
.pl-state--error b { color: var(--pl-danger); }
.pl-note { background: var(--pl-white); border: 1px solid var(--line); border-radius: var(--pl-r-md); padding: 12px 14px; font-size: 14px; color: var(--pl-muted); }
.pl-note b { color: var(--pl-deep); font-weight: 600; }
.pl-note--check { border-color: color-mix(in srgb, var(--pl-gold) 60%, var(--line)); }
.pl-note--check b { color: var(--warn); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
