/* Aldwell Partners client portal. Loaded after the site's style.css on /portal/.
   Every class starts with pt- and every token with --pt- so nothing clashes with the site. */
:root {
  /* Matched to aldwellpartners.com (WordPress / Elementor theme) */
  --pt-ivory: #FAF6ED;        /* light section background */
  --pt-paper: #FFFCF6;        /* raised cards */
  --pt-navy: #14243A;         /* site navy */
  --pt-navy-2: #1E3350;
  --pt-gold: #BF8C61;         /* copper accent on navy */
  --pt-gold-text: #8D5B30;    /* copper text on cream */
  --pt-gold-soft: #EEE5D6;    /* quote-panel beige */
  --pt-line: #E4D9C7;
  --pt-muted: #5A6577;
  --pt-on-navy-muted: #C3CCD8;
  --pt-red: #8A2A20;
  --pt-red-soft: #F5DEDA;
  --pt-green: #2B5A33;
  --pt-green-soft: #DDEBDD;
  --pt-blue-soft: #E3E7EE;
  --pt-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --pt-text: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pt-head: 133px;           /* height of the site header that sits over the page top */
}

.pt-root :focus-visible { outline: 3px solid var(--pt-gold); outline-offset: 2px; }
.pt-wrap { max-width: var(--container, 1200px); margin: 0 auto; padding-inline: var(--gutter, 24px); }
.pt-muted { color: var(--pt-muted); }
[hidden] { display: none !important; }

.pt-demo-banner { background: var(--pt-gold-soft); color: var(--pt-gold-text); text-align: center; padding: 10px 16px; font-size: 14px; }

/* Buttons */
.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 2px; border: 1px solid transparent; font: 600 14px var(--pt-text); text-decoration: none; cursor: pointer; white-space: nowrap; }
.pt-btn[disabled] { opacity: .6; cursor: progress; }
.pt-btn--dark { background: var(--pt-navy); color: var(--pt-ivory); }
.pt-btn--dark:hover { background: #1E3350; color: var(--pt-ivory); }
.pt-btn--gold { background: var(--pt-gold); color: var(--pt-navy); font-weight: 700; }
.pt-btn--gold:hover { background: #CC9B70; color: var(--pt-navy); }
.pt-btn--ghost { background: transparent; border-color: #B8AC98; color: var(--pt-navy); font-weight: 500; }
.pt-btn--ghost:hover { background: var(--pt-paper); }
.pt-btn--ghost-light { background: transparent; border-color: #5A6684; color: var(--pt-ivory); font-weight: 500; }
.pt-btn--ghost-light:hover { background: var(--pt-navy-2); color: var(--pt-ivory); }
.pt-btn--block { width: 100%; min-height: 48px; font-size: 15px; }
.pt-linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; color: var(--pt-navy); }

/* Hero band */
.pt-band { background: var(--pt-navy); color: var(--pt-ivory); }
.pt-band__inner { padding-block: 40px 0; }
.pt-band__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.pt-eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #D4A57C; font-weight: 600; margin-bottom: 10px; }
.pt-band h1 { font: 400 clamp(32px, 5vw, 48px)/1.1 var(--pt-display); }
.pt-band .pt-sub { color: var(--pt-on-navy-muted); font-size: 14px; margin-top: 8px; }
.pt-band .pt-lede { color: #E4DED2; font-size: 17px; line-height: 1.55; max-width: 680px; margin-top: 14px; }
.pt-band__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pt-tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 28px; }
.pt-tabs a { padding: 12px 0; color: var(--pt-on-navy-muted); text-decoration: none; font-size: 14px; border-bottom: 3px solid transparent; }
.pt-tabs a[aria-current="page"] { color: var(--pt-ivory); border-bottom-color: var(--pt-gold); font-weight: 600; }
.pt-back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: #D4A57C; text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.pt-back:hover { color: var(--pt-ivory); }
.pt-band--detail .pt-band__inner { padding-bottom: 36px; }

/* Main layout */
.pt-main { padding-block: 36px 64px; display: flex; flex-direction: column; gap: 36px; }
.pt-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.pt-h2 { font: 400 clamp(24px, 3vw, 30px)/1.2 var(--pt-display); }
.pt-h3 { font: 500 20px/1.25 var(--pt-display); }
.pt-panel { background: var(--pt-paper); border: 1px solid var(--pt-line); padding: 22px 24px; }
.pt-panel--accent { border-top: 3px solid var(--pt-gold); }
.pt-cols { display: flex; flex-wrap: wrap; gap: 40px; }
.pt-cols > * { flex: 1 1 320px; min-width: 0; }
.pt-cols > .pt-wide { flex-basis: 420px; }

/* Action items */
.pt-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--pt-line); }
.pt-action:first-of-type { margin-top: 12px; }
.pt-action__title { font-weight: 600; }
.pt-action__meta { font-size: 13px; color: var(--pt-muted); margin-top: 2px; }
.pt-empty { color: var(--pt-muted); font-size: 15px; margin-top: 8px; }

/* Mandate cards */
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.pt-card { background: var(--pt-paper); border: 1px solid var(--pt-line); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.pt-card__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pt-card__meta { font-size: 13px; color: var(--pt-muted); margin-top: 3px; }
.pt-card__next { font-size: 14px; }
.pt-card__link { font-size: 14px; font-weight: 600; align-self: flex-start; padding-block: 6px; }
.pt-segs { display: flex; gap: 4px; }
.pt-seg { flex: 1 1 0; height: 5px; border-radius: 2px; background: #E2D7C4; }
.pt-seg.pt-on { background: var(--pt-gold); }
.pt-small { font-size: 13px; color: var(--pt-muted); margin-top: 6px; }

/* Pills */
.pt-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--pt-blue-soft); color: var(--pt-navy); }
.pt-pill--review { background: var(--pt-gold-soft); color: var(--pt-gold-text); }
.pt-pill--risk { background: var(--pt-red-soft); color: var(--pt-red); }
.pt-pill--done { background: var(--pt-green-soft); color: var(--pt-green); }
.pt-late { color: var(--pt-red); }
.pt-moved { color: var(--pt-gold-text); }

/* Stage timeline */
.pt-timeline { overflow-x: auto; }
.pt-timeline ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; min-width: 620px; }
.pt-step { flex: 1 1 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.pt-step b { font-weight: 600; }
.pt-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--pt-gold); background: var(--pt-gold); }
.pt-step--now .pt-dot { background: var(--pt-ivory); box-shadow: 0 0 0 4px #EBD8C2; }
.pt-step--now b { font-weight: 700; }
.pt-step--now .pt-state { color: var(--pt-gold-text); font-weight: 600; }
.pt-step--next .pt-dot { border-color: #B8AC98; background: var(--pt-ivory); }
.pt-step--next b, .pt-state { color: var(--pt-muted); }

/* Lists */
.pt-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 0; border-top: 1px solid var(--pt-line); }
.pt-rows > .pt-row:last-child { border-bottom: 1px solid var(--pt-line); }
.pt-row__title { font-weight: 600; }
.pt-row__meta { font-size: 13px; color: var(--pt-muted); margin-top: 2px; }
.pt-row__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pt-bar-item + .pt-bar-item { margin-top: 16px; }
.pt-bar-label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.pt-bar { height: 6px; border-radius: 3px; background: #E2D7C4; overflow: hidden; }
.pt-bar span { display: block; height: 100%; background: var(--pt-navy); }
.pt-activity { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.pt-team { background: var(--pt-navy); color: var(--pt-ivory); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.pt-team h2 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #D4A57C; }
.pt-team .pt-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Sign-in */
.pt-auth { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 56px; padding-block: 64px; }
.pt-auth__intro { flex: 1 1 360px; max-width: 480px; display: flex; flex-direction: column; gap: 16px; }
.pt-auth__intro h1 { font: 400 clamp(32px, 5vw, 44px)/1.12 var(--pt-display); }
.pt-auth__intro .pt-lede { font-size: 17px; line-height: 1.6; color: #37475F; }
.pt-eyebrow--dark { color: #8D5B30; margin-bottom: 0; }
.pt-form { flex: 1 1 340px; max-width: 440px; background: var(--pt-paper); border: 1px solid var(--pt-line); border-top: 3px solid var(--pt-gold); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.pt-form h2 { font: 500 24px/1.2 var(--pt-display); }
.pt-field { display: flex; flex-direction: column; gap: 6px; }
.pt-label { font-size: 14px; font-weight: 600; }
.pt-hint { font-size: 13px; color: var(--pt-muted); }
input[type="email"], input[type="text"], input[inputmode="numeric"], textarea {
  min-height: 44px; padding: 10px 12px; border: 1px solid #9C9384; border-radius: 2px; background: #fff; font: 15px var(--pt-text); color: var(--pt-navy); width: 100%;
}
textarea { resize: vertical; }
.pt-code-input { letter-spacing: .4em; font-size: 22px !important; text-align: center; }
.pt-divider { display: flex; align-items: center; gap: 10px; color: var(--pt-muted); font-size: 13px; }
.pt-divider::before, .pt-divider::after { content: ''; flex: 1; height: 1px; background: var(--pt-line); }
.pt-form-error { color: var(--pt-red); font-size: 14px; }
.pt-form-ok { color: var(--pt-green); font-size: 14px; }
.pt-loading { padding: 80px 24px; text-align: center; color: var(--pt-muted); }

/* Dialog */
.pt-dialog { border: 1px solid var(--pt-line); border-top: 3px solid var(--pt-gold); padding: 0; background: var(--pt-paper); color: var(--pt-navy); width: min(520px, calc(100vw - 32px)); }
.pt-dialog::backdrop { background: rgba(27, 39, 64, .45); }
.pt-dialog__form { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.pt-dialog__title { font: 500 22px/1.25 var(--pt-display); }
.pt-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.pt-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--pt-navy); color: var(--pt-ivory); padding: 12px 18px; font-size: 14px; max-width: calc(100vw - 32px); z-index: 20; }

@media (max-width: 640px) {
  .pt-wrap { padding-inline: 16px; }
  .pt-band__inner { padding-top: 28px; }
  .pt-form { padding: 24px 20px; }
  .pt-auth { padding-block: 40px; gap: 32px; }
}
@media (prefers-reduced-motion: no-preference) {
  .pt-btn { transition: background-color .15s; }
}

.pt-root { background: var(--pt-ivory); color: var(--pt-navy); font: 400 16px/1.5 var(--pt-text); min-height: 60vh; }
.pt-root p, .pt-root h1, .pt-root h2, .pt-root h3 { margin: 0; }
.pt-root a:where(:not(.pt-btn)) { color: var(--pt-navy); }
:where(.pt-root) a:where(:not(.pt-btn, .pt-back, .pt-tabs a)) { text-decoration: underline; text-underline-offset: 3px; }
:where(.pt-root) a:where(:not(.pt-btn, .pt-back, .pt-tabs a)):hover { color: #8D5B30; }
.pt-root .pt-band h1, .pt-root .pt-band h2 { color: var(--pt-ivory); }
.pt-root .pt-team h2 { color: #D4A57C; }
.pt-root .pt-tabs a { color: var(--pt-on-navy-muted); }
.pt-root .pt-tabs a[aria-current="page"] { color: var(--pt-ivory); }
.pt-root .pt-band a.pt-back { color: #D4A57C; }
.pt-root .pt-band a.pt-back:hover { color: var(--pt-ivory); }
.pt-signout { padding-block: 0 32px; font-size: 14px; color: var(--pt-muted); }


/* ---- Live-site match: running inside a WordPress page under the site's own header and footer ---- */
.pt-root, .pt-root * , .pt-root *::before, .pt-root *::after { box-sizing: border-box; }
.pt-root { letter-spacing: normal; text-align: left; }
.pt-root::before { content: ""; display: block; height: var(--pt-head); background: var(--pt-navy); }
@media (max-width: 1024px) { .pt-root { --pt-head: 110px; } }
@media (max-width: 767px) { .pt-root { --pt-head: 90px; } }
.pt-root .pt-btn { font: 500 12px/1 var(--pt-text); letter-spacing: .16em; text-transform: uppercase; border-radius: 0; min-height: 46px; padding: 0 22px; }
.pt-root .pt-btn--gold { background: var(--pt-gold); color: var(--pt-navy); }
.pt-root .pt-eyebrow { font: 500 11px/1.4 var(--pt-text); letter-spacing: .19em; text-transform: uppercase; color: var(--pt-gold); }
.pt-root .pt-eyebrow--dark { color: var(--pt-gold-text); }
.pt-root .pt-band h1, .pt-root .pt-auth__intro h1, .pt-root .pt-h2 { letter-spacing: -0.015em; }
.pt-root .pt-auth__intro h1 { color: var(--pt-navy); }
.pt-root .pt-pill { border-radius: 0; letter-spacing: .04em; }
.pt-root input, .pt-root textarea { border-radius: 0; font-family: var(--pt-text); }
.pt-root button { font-family: var(--pt-text); }
.pt-root h1:focus { outline: none; }
.pt-root .pt-signout { padding-block: 0 48px; }
.pt-root .wrap { max-width: var(--container, 1200px); margin: 0 auto; padding-inline: var(--gutter, 24px); }

/* ---- Signed-in portal: mandate tracker layout (design H) ---- */
.pt-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 80vh; background: #F3EEE4; }
.pt-side { background: var(--pt-navy); color: var(--pt-on-navy-muted); padding: 28px 16px; display: flex; flex-direction: column; gap: 24px; align-self: stretch; }
.pt-side__nav { position: sticky; top: 16px; }
.pt-side__nav { display: flex; flex-direction: column; gap: 4px; }
.pt-side__nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 14px; color: var(--pt-on-navy-muted); text-decoration: none; font: 400 15px/1.3 var(--pt-text); border-left: 2px solid transparent; }
.pt-side__nav a:hover { color: var(--pt-ivory); background: var(--pt-navy-2); }
.pt-side__nav a[aria-current="page"] { color: var(--pt-ivory); background: var(--pt-navy-2); border-left-color: var(--pt-gold); }
.pt-count { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; background: var(--pt-gold); color: var(--pt-navy); font: 600 12px/1 var(--pt-text); }
.pt-side__note { margin-top: auto !important; font-size: 13px; line-height: 1.5; border: 1px solid #2C3E5A; padding: 12px 14px; }
.pt-side__user { display: flex; gap: 12px; align-items: center; border-top: 1px solid #2C3E5A; padding-top: 18px; }
.pt-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--pt-gold-soft); color: var(--pt-navy); font: 600 13px var(--pt-text); flex: none; }
.pt-side__firm { color: var(--pt-ivory); font-weight: 600; font-size: 14px; }
.pt-side__name { font-size: 13px; }
.pt-side__out { background: none; border: 0; padding: 0; color: var(--pt-gold); font: 500 13px var(--pt-text); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pt-side__out:hover { color: var(--pt-ivory); }

.pt-pane { padding: 32px clamp(16px, 3vw, 40px) 56px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.pt-pane__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pt-titlerow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pt-root .pt-pane__head h1 { font: 400 clamp(30px, 3.4vw, 40px)/1.1 var(--pt-display); color: var(--pt-navy); letter-spacing: -0.015em; }
.pt-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--pt-navy); padding: 3px 8px; font: 600 12px var(--pt-text); color: var(--pt-navy); }
.pt-updated { color: var(--pt-muted); font-size: 14px; margin-top: 6px !important; }
.pt-pane__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.pt-actions-box { background: #FBF0DD; border: 1px solid #EBD3AE; padding: 20px 24px; }
.pt-actions-box h2 { font: 500 18px/1.3 var(--pt-text); color: var(--pt-navy); margin-bottom: 6px !important; }
.pt-ai { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid #EBD3AE; }
.pt-ai__title { font-weight: 600; color: var(--pt-navy); }
.pt-ai__meta { font-size: 13px; color: var(--pt-muted); }

.pt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pt-stat { background: var(--pt-paper); border: 1px solid var(--pt-line); border-top: 3px solid var(--pt-navy); padding: 18px 20px 20px; }
.pt-stat--gold { border-top-color: var(--pt-gold); }
.pt-stat--red { border-top-color: var(--pt-red); }
.pt-stat__n { font: 400 40px/1.1 var(--pt-display); color: var(--pt-navy); font-variant-numeric: tabular-nums; }
.pt-stat__l { font-size: 14px; color: var(--pt-muted); margin-top: 8px !important; }

.pt-split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.pt-tablecard { background: var(--pt-paper); border: 1px solid var(--pt-line); min-width: 0; }
.pt-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border-bottom: 1px solid var(--pt-line); }
.pt-filter { border: 1px solid #CDBFA8; background: transparent; color: var(--pt-navy); padding: 8px 12px; font: 500 13px var(--pt-text); cursor: pointer; }
.pt-filter[aria-pressed="true"] { background: var(--pt-navy); color: var(--pt-ivory); border-color: var(--pt-navy); }
.pt-tablewrap { overflow-x: auto; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--pt-navy); }
.pt-table th { text-align: left; font: 500 12px var(--pt-text); color: var(--pt-muted); padding: 12px 16px; border-bottom: 1px solid var(--pt-line); white-space: nowrap; background: none; }
.pt-table td { padding: 16px; border-bottom: 1px solid var(--pt-line); vertical-align: top; background: none; }
.pt-table tr:last-child td { border-bottom: 0; }
.pt-tr { cursor: pointer; }
.pt-tr:hover td { background: #F8F2E7; }
.pt-tr--on td { background: #F3EBDD; }
.pt-tr--on td:first-child { box-shadow: inset 3px 0 0 var(--pt-gold); }
.pt-table .pt-segs { width: 110px; margin-bottom: 6px; }
.pt-cell-strong { font-weight: 600; color: var(--pt-navy); }
a.pt-cell-strong { text-decoration: none; }
a.pt-cell-strong:hover { text-decoration: underline; }
.pt-cell-sub { font-size: 13px; color: var(--pt-muted); margin-top: 2px !important; }
.pt-root .pt-moved { color: var(--pt-gold-text); }
.pt-root .pt-ok { color: var(--pt-green); }
.pt-td-actions { white-space: nowrap; text-align: right; }
.pt-td-actions .pt-btn + .pt-btn { margin-left: 8px; }
.pt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.pt-detail { background: var(--pt-paper); border: 1px solid var(--pt-line); padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; scroll-margin-top: 16px; }
.pt-root .pt-detail__title { font: 400 28px/1.15 var(--pt-display); color: var(--pt-navy); }
.pt-dl__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pt-stages { list-style: none; padding: 0; margin: 10px 0 4px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.pt-stages li { font-size: 11px; line-height: 1.3; color: var(--pt-muted); }
.pt-stages li span { display: block; height: 5px; background: #E2D7C4; margin-bottom: 6px; }
.pt-stages .pt-st--done span { background: var(--pt-navy); }
.pt-stages .pt-st--now span { background: var(--pt-gold); }
.pt-stages .pt-st--now { color: var(--pt-navy); font-weight: 600; }
.pt-summary { color: #37475F; font-size: 14px; line-height: 1.55; }
.pt-root .pt-dh { font: 500 18px/1.3 var(--pt-display); color: var(--pt-navy); margin-top: 14px !important; padding-top: 14px; border-top: 1px solid var(--pt-line); }
.pt-dlist, .pt-timeline2 { list-style: none; padding: 0; margin: 0; }
.pt-dl { padding: 12px 0; border-bottom: 1px solid var(--pt-line); }
.pt-dl:last-child { border-bottom: 0; }
.pt-inline-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pt-timeline2 li { position: relative; padding: 0 0 12px 18px; font-size: 14px; color: var(--pt-navy); }
.pt-timeline2 li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--pt-navy); }
.pt-leads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 14px; border-top: 1px solid var(--pt-line); margin-top: 6px; }
.pt-file { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--pt-line); }
.pt-docs { padding: 20px 24px; }
.pt-docs__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 8px; }
.pt-docs .pt-files { margin-top: 4px; }

@media (max-width: 1280px) { .pt-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1024px) { .pt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .pt-app { grid-template-columns: minmax(0, 1fr); }
  .pt-side { padding: 12px 16px; gap: 12px; }
  .pt-side__nav { position: static; }
  .pt-side__nav { flex-direction: row; overflow-x: auto; }
  .pt-side__nav a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; padding: 10px 12px; }
  .pt-side__nav a[aria-current="page"] { border-bottom-color: var(--pt-gold); }
  .pt-side__note { display: none; }
  .pt-side__user { border-top: 0; padding-top: 0; }
  .pt-side { flex-direction: column; }
}
@media (max-width: 560px) {
  .pt-stats { gap: 10px; }
  .pt-stat { padding: 14px; }
  .pt-stat__n { font-size: 32px; }
  .pt-ai { flex-direction: column; align-items: flex-start; }
  .pt-table thead { display: none; }
  .pt-table, .pt-table tbody, .pt-table tr, .pt-table td { display: block; width: 100%; }
  .pt-table tr { padding: 8px 0; border-bottom: 1px solid var(--pt-line); }
  .pt-table td { border: 0; padding: 6px 16px; }
  .pt-td-actions { text-align: left; white-space: normal; }
  .pt-leads { grid-template-columns: 1fr; }
}

/* ---- v4: full-width mandates table, detail opens below the row ---- */
.pt-table { font-size: 15px; }
.pt-table td { padding: 18px 20px; }
.pt-table th { padding: 12px 20px; }
.pt-table th:nth-child(1) { width: 22%; } .pt-table th:nth-child(2) { width: 15%; } .pt-table th:nth-child(3) { width: 20%; } .pt-table th:nth-child(4) { width: 28%; }
.pt-table .pt-segs { width: 140px; }
.pt-rowlink { display: inline-flex; align-items: center; gap: 10px; }
.pt-caret { width: 8px; height: 8px; border-right: 2px solid var(--pt-gold); border-bottom: 2px solid var(--pt-gold); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.pt-rowlink[aria-expanded="true"] .pt-caret { transform: rotate(45deg); }
.pt-tr--on td { border-bottom-color: transparent; }
.pt-expand > td { padding: 0 20px 24px !important; background: #F3EBDD; box-shadow: inset 3px 0 0 var(--pt-gold); }
.pt-expand .pt-detail { border: 1px solid var(--pt-line); padding: 28px; gap: 12px; }
.pt-detail__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.pt-detail__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; }
.pt-detail__col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pt-expand .pt-stages { max-width: 760px; }
.pt-expand .pt-summary { max-width: 72ch; font-size: 15px; }
.pt-tiphint { color: var(--pt-muted); font-size: 13px; margin-top: -12px !important; }
@media (prefers-reduced-motion: reduce) { .pt-caret { transition: none; } }
@media (max-width: 900px) { .pt-detail__cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .pt-expand > td { padding: 0 8px 16px !important; }
  .pt-expand .pt-detail { padding: 18px; }
  .pt-table th:nth-child(n) { width: auto; }
}

/* ---- v5: Aldwell team screens ---- */
.pt-root input[type="date"], .pt-root input[type="number"], .pt-root select {
  min-height: 44px; padding: 8px 10px; border: 1px solid #9C9384; border-radius: 0; background: #fff; font: 15px var(--pt-text); color: var(--pt-navy); width: 100%;
}
.pt-side__label { font: 500 11px/1.4 var(--pt-text); letter-spacing: .19em; text-transform: uppercase; color: var(--pt-gold); padding: 0 14px; }
.pt-teamform { display: flex; flex-direction: column; gap: 12px; }
.pt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: end; }
.pt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pt-field--wide { grid-column: 1 / -1; }
.pt-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--pt-navy); min-height: 44px; }
.pt-check input { width: 18px; height: 18px; accent-color: var(--pt-navy); }
.pt-teamform--row { padding: 14px 0; border-bottom: 1px solid var(--pt-line); }
.pt-teamform--line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--pt-line); }
.pt-teamform--line .pt-form-error { grid-column: 1 / -1; }
.pt-line-actions { display: flex; gap: 8px; align-items: center; }
.pt-line-actions select { width: auto; min-width: 130px; }
.pt-line-grow { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pt-wslist { display: flex; flex-direction: column; gap: 8px; }
.pt-wsrow { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 10px; align-items: center; }
.pt-pct { display: flex; align-items: center; gap: 6px; color: var(--pt-muted); }
.pt-add { border: 1px dashed #CDBFA8; padding: 0 16px; margin-top: 4px; }
.pt-add > summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--pt-navy); }
.pt-add[open] { padding-bottom: 16px; }
.pt-add .pt-teamform--row { border-bottom: 0; padding-top: 0; }
.pt-clientsaid { background: #FBF0DD; border-left: 3px solid var(--pt-gold); padding: 10px 12px; font-size: 14px; color: var(--pt-navy); }
.pt-wsrow .pt-linklike { color: var(--pt-gold-text); font-size: 14px; }
.pt-detail--team .pt-hint { margin: 0; }
.pt-app--team .pt-side__note a { color: var(--pt-gold); }
@media (max-width: 1100px) { .pt-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .pt-grid, .pt-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .pt-teamform--line { grid-template-columns: minmax(0, 1fr); }
  .pt-wsrow { grid-template-columns: minmax(0, 1fr) 90px; }
  .pt-wsrow .pt-linklike { justify-self: start; }
}
.pt-docs > h2 { margin-bottom: 12px !important; }
.pt-tr--new td { animation: pt-new 3s ease-out; }
@keyframes pt-new { from { background: #F6E3C6; } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .pt-tr--new td { animation: none; background: #F8F2E7; } }
/* v7: mandate editor sections stacked top to bottom, full width */
.pt-detail__stack { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pt-detail__stack > .pt-dh { margin-top: 18px !important; padding-top: 18px; border-top: 1px solid var(--pt-line); }
.pt-detail__stack .pt-wslist, .pt-detail__stack form[data-action="teamUpdate"] { max-width: 760px; }
.pt-teamform textarea { min-height: 84px; resize: vertical; }
