/* RP Fitness corporate portal. Brand: red #e4022e, navy #002c41, ivory #F6F5EE, white. Montserrat, self-hosted.
   Always light. Mobile first. */
@font-face { font-family: Montserrat; src: url(/fonts/montserrat-400.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Montserrat; src: url(/fonts/montserrat-600.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Montserrat; src: url(/fonts/montserrat-800.woff2) format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
:root { color-scheme: light only; --red: #e4022e; --red-dark: #b8001f; --navy: #002c41; --ivory: #F6F5EE; --white: #fff; --ink: #002c41; --muted: #4a6170;
  --line: #dfe3d9; --radius: 14px; --shadow: 0 10px 30px rgba(0, 44, 65, .08); --font: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--navy); text-underline-offset: 3px; }
.top { background: var(--navy); padding: calc(14px + env(safe-area-inset-top)) 20px 14px; display: flex; align-items: center; justify-content: space-between; }
.top img { height: 30px; width: auto; display: block; }
.top a { color: var(--white); font-weight: 600; font-size: 15px; text-decoration: none; }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 20px 56px; }
h1 { font-weight: 800; font-size: clamp(30px, 7vw, 46px); line-height: 1.12; margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-weight: 800; font-size: 22px; margin: 0 0 12px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 22px; margin: 0 0 20px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.facts li::before { content: ""; flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--red); }
label { display: block; font-weight: 600; margin: 0 0 8px; }
input[type=email], input[type=text] { width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); min-height: 54px; }
input:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-color: var(--navy); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800; font-size: 17px; border: 0; border-radius: 10px;
  padding: 14px 22px; min-height: 54px; cursor: pointer; background: var(--red); color: var(--white); text-decoration: none; width: 100%; margin-top: 16px; }
.btn:hover { background: var(--red-dark); }
.btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.secondary { background: var(--white); color: var(--navy); border: 2px solid var(--navy); }
.msg { margin: 16px 0 0; padding: 14px 16px; border-radius: 10px; background: #eef6f0; color: #14532d; font-weight: 600; }
.msg.error { background: #fdecef; color: #8a0019; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.small { font-size: 14px; color: var(--muted); }
.ts { margin-top: 16px; min-height: 0; }
footer { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); text-align: center; font-size: 14px; color: var(--muted); }
footer a { color: var(--muted); }
[hidden] { display: none !important; }
@media (min-width: 700px) { .btn { width: auto; } main { padding-top: 64px; } .card { padding: 36px 34px; } }

/* ---------- Stage 2: forms, documents (Corporate Brief 3) ---------- */
.landing main, .form-main, .doc-main { flex: 1; }

/* Forms */
.form-main, .doc-main { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }
.progress { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: s; }
.progress li { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.progress li::before { content: ""; height: 6px; border-radius: 3px; background: var(--line); }
.progress li span { display: none; }
.progress li.done::before, .progress li.now::before { background: var(--red); }
.progress li.now { color: var(--navy); }
.field { margin: 0 0 18px; }
.field .opt { font-weight: 400; color: var(--muted); }
.hint { margin: -4px 0 8px; font-size: 14px; color: var(--muted); }
select, textarea, input[type=number], input[type=tel], input[type=url] { width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); min-height: 54px; }
select:focus-visible, textarea:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-color: var(--navy); }
.field.bad input, .field.bad select { border-color: #c4001f; }
.err { margin: 6px 0 0; color: #a3001b; font-weight: 600; font-size: 15px; }
.group { border: 0; padding: 0; margin: 0 0 20px; }
.group legend { font-weight: 800; font-size: 18px; margin: 0 0 12px; padding: 0; }
.pair { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .pair { grid-template-columns: 1fr 1fr; } }
.tick { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; margin: 0 0 18px; }
.tick input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--red); }
.tick label { font-weight: 600; margin: 0; }
.tick .err { grid-column: 2; }
.form-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.form-nav .btn { flex: 1 1 160px; }
.thanks-mark { width: 64px; height: 64px; border-radius: 50%; background: #1e8e4e; color: var(--white); font-size: 34px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 0 18px; }
.next-steps { padding-left: 44px; }
.next-steps li { margin: 0 0 10px; }

/* Documents */
.doc-sec { margin: 0 0 28px; }
.doc-sec h2 { font-size: 22px; }
.doc-sec ul { padding-left: 20px; }
.doc-sec li { margin: 0 0 8px; }
.placeholder { border: 2px dashed #e0a800; background: #fff8e1; color: #6b4a00; border-radius: 10px; padding: 12px 14px; font-weight: 600; }

/* ---------- Corporate Brief 4: desktop design pass ---------- */
:root { --wrap: 1200px; }
.foot-inner, .page-band-in { max-width: var(--wrap); }
.eyebrow { margin: 0 0 10px; font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.ico { width: 24px; height: 24px; display: block; }
.ico-sm { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 6px; color: #5ee08f; }
.badges li::before { content: none; }

/* Inner pages: a navy title band, and two columns on desktop. */
.page-band { background: var(--navy); color: var(--white); }
.page-band-in { margin: 0 auto; padding: 44px 20px 36px; }
.page-band h1 { color: var(--white); margin-bottom: 10px; }
.page-band .lead { color: rgba(255,255,255,.85); margin: 0; max-width: 60ch; }
.form-wide, .doc-wide { max-width: var(--wrap); }
.form-side { display: none; }
.doc-toc { display: none; }
@media (min-width: 1000px) {
  .page-band-in { padding: 72px 32px 56px; }
  .form-wide { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; padding: 48px 32px 96px; }
  .form-side { display: block; position: sticky; top: 96px; }
  .side-card h2 { font-size: 20px; margin-bottom: 12px; }
  .side-steps { padding-left: 20px; margin: 0 0 18px; color: var(--muted); }
  .side-steps li { margin-bottom: 8px; }
  .side-price { margin: 0 0 8px; } .side-price b { font-size: 28px; font-weight: 800; color: var(--navy); }
  .side-ticks { list-style: none; padding: 0; margin: 0 0 14px; } .side-ticks li { margin-bottom: 6px; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
  .doc-wide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 56px 32px 96px; align-items: start; }
  .doc-toc { display: block; position: sticky; top: 96px; font-size: 15px; }
  .doc-toc p { font-weight: 800; margin: 0 0 10px; }
  .doc-toc ul { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--line); }
  .doc-toc a { display: block; padding: 6px 14px; color: var(--muted); text-decoration: none; }
  .doc-toc a:hover { color: var(--navy); }
  .doc-body { max-width: 760px; }
  .thanks-main { max-width: 760px; padding-top: 80px; }
}
/* The stage 1 holding page's narrow <main> must not hold the landing page or the wide inner pages. */
.landing main, main.form-wide, main.doc-wide { max-width: none; padding-left: 0; padding-right: 0; }
.landing main { padding: 0; }
main.form-wide, main.doc-wide { max-width: var(--wrap); padding-left: 20px; padding-right: 20px; }
@media (min-width: 1000px) { main.form-wide, main.doc-wide { padding-left: 32px; padding-right: 32px; } }

/* Signing (Corporate Brief 4) */
.sign-main { max-width: 860px; }
.doc-box { max-height: 420px; overflow: auto; padding: 4px 4px 4px 0; border-top: 1px solid var(--line); margin-top: 10px; }
.doc-box p, .doc-box li { color: var(--ink); }
.sig-pad { display: block; width: 100%; height: 180px; border: 2px dashed var(--line); border-radius: 12px; background: var(--white); touch-action: none; }
.sig-clear { width: auto; margin-top: 10px; min-height: 44px; padding: 8px 16px; font-size: 15px; }
.dd-card h2 { margin-bottom: 8px; }
.dd-ok { color: #13612f; font-weight: 800; }

/* ---------- Stage 4: the company portal (Corporate Brief 5). Mobile first; the same tokens and pills as the landing preview. ---------- */
.portal-main { max-width: 960px; }
.portal-co { margin: 0 0 4px; font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.portal-co:empty { display: none; }
.portal .lead { margin-bottom: 22px; }
.tabs { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; margin: 0 0 20px;
  background: var(--white); border-radius: 14px; box-shadow: var(--shadow); }
.tabs button { font: inherit; font-weight: 800; font-size: 15px; color: var(--muted); background: transparent; border: 0; border-radius: 10px; min-height: 48px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button[aria-selected="true"] { background: var(--navy); color: var(--white); }
.tabs button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.tab-count { background: var(--red); color: var(--white); border-radius: 999px; font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.stats div { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; }
.stats span { font-size: 14px; font-weight: 600; color: var(--muted); }
.stats b { font-weight: 800; font-size: 28px; line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; }
.stats small { font-size: 13px; color: var(--muted); }
.stats .stat-main { grid-column: 1 / -1; background: var(--navy); }
.stats .stat-main span, .stats .stat-main small { color: rgba(255,255,255,.85); }
.stats .stat-main b { color: var(--white); font-size: 34px; }
.note-warm { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: #fff4e5; color: #7a4100; font-weight: 600; }
.prorata { margin: 0 0 14px; padding-left: 20px; font-size: 14px; color: var(--muted); }
.add-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.add-head h2 { margin: 0; }
.add-btn { width: auto; margin: 0; }
.add-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.add-card .msg { margin-bottom: 4px; }
.team-list, .inv-list, .notice-list { list-style: none; margin: 16px 0 0; padding: 0; }
.member, .inv { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "av who pill" "av who act"; align-items: center; gap: 4px 12px;
  padding: 14px 0; border-top: 1px solid var(--line); }
.inv { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who amount" "pill act"; }
.member .av { grid-area: av; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase; }
.member .who, .inv .who { grid-area: who; display: flex; flex-direction: column; min-width: 0; }
.who b { font-weight: 800; overflow-wrap: anywhere; }
.who .email { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.member .pill, .inv .pill { grid-area: pill; justify-self: end; }
.inv .pill { justify-self: start; }
.member .act, .inv .act { grid-area: act; justify-self: end; }
.inv .amount { grid-area: amount; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.pill { font-size: 13px; font-weight: 800; padding: 5px 10px; border-radius: 999px; white-space: nowrap; background: #e4eef6; color: #0b4a75; }
.pill.ok { background: #e3f5ea; color: #13612f; } .pill.warm { background: #fff1db; color: #7a4100; } .pill.quiet { background: #efefef; color: #555; }
.link-btn { font: inherit; font-weight: 800; font-size: 15px; color: var(--navy); background: transparent; border: 2px solid var(--line); border-radius: 10px;
  min-height: 44px; padding: 0 14px; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.link-btn:hover { border-color: var(--navy); }
.link-btn.remove { color: var(--red-dark); }
.link-btn.undo { border-color: var(--navy); }
.link-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.link-btn[disabled] { opacity: .6; }
.empty { margin: 16px 0 0; padding: 18px; border-radius: 12px; background: var(--ivory); color: var(--muted); text-align: center; }
.notice { padding: 16px 0; border-top: 1px solid var(--line); }
.notice h3 { margin: 2px 0 6px; font-weight: 800; font-size: 18px; }
.notice p { margin: 0 0 8px; }
.notice-date { font-size: 13px; font-weight: 600; color: var(--muted); }
.sheet { border: 0; border-radius: 18px; padding: 26px 22px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0,44,65,.3); color: var(--ink); background: var(--white); }
.sheet::backdrop { background: rgba(0, 44, 65, .55); }
.sheet h2 { font-size: 22px; }
@media (min-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr 1.4fr; }
  .stats .stat-main { grid-column: auto; }
  .member { grid-template-columns: 40px minmax(0, 1fr) auto auto; grid-template-areas: "av who pill act"; }
  .inv { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "who amount pill act"; gap: 4px 16px; }
  .inv .pill { justify-self: end; }
}

/* Stage 5 (Corporate Brief 6): the notice while the Direct Debit isn't active yet. */
.note-dd { margin: 0 0 14px; padding: 14px 16px; border-radius: 12px; background: #e4eef6; color: #0b3a5c; font-weight: 600; border-left: 5px solid var(--navy); }
/* Member sign up (Corporate Brief 6). Mobile first, 48px targets. */
.join-main { max-width: 760px; }
.join-main h1 { font-size: clamp(28px, 6vw, 40px); }
.dob { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 10px; }
.dob label { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0; }
.dob input { margin-top: 4px; text-align: center; }
.hq { list-style: none; counter-reset: hq; margin: 0 0 24px; padding: 0; }
.hq-item { counter-increment: hq; padding: 18px 0; margin: 0; border-top: 1px solid var(--line); }
.hq-q { margin: 0 0 12px; font-weight: 600; }
.hq-q::before { content: counter(hq) ". "; color: var(--red); font-weight: 800; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 360px; }
.yn-btn { font: inherit; font-weight: 800; font-size: 17px; min-height: 54px; border-radius: 12px; border: 2px solid var(--line); background: var(--white); color: var(--navy); cursor: pointer; }
.yn-btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.yn-btn:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.hq-detail { margin: 14px 0 0; }
.field.bad .yn-btn { border-color: #c4001f; }
.decl { background: var(--ivory); border-radius: 12px; padding: 18px 18px 6px; margin: 0 0 18px; }
.decl h2 { font-size: 18px; margin: 0 0 8px; }
.decl ul { margin: 0 0 14px; padding-left: 20px; }
.decl li { margin: 0 0 8px; }
.addr-hits { list-style: none; margin: 8px 0 0; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; }
.addr-hit { display: block; width: 100%; text-align: left; font: inherit; padding: 12px 14px; min-height: 48px; border: 0; border-top: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.addr-hits li:first-child .addr-hit { border-top: 0; }
.addr-hit:hover, .addr-hit:focus-visible { background: var(--ivory); }
.join .thanks-mark { margin: 24px 0 16px; }
.ml-key { margin: 0 0 6px; font-weight: 800; }
.notice-card h2 { margin-bottom: 8px; }
.notice-card .btn { width: auto; }
.q { font-weight: 800; color: var(--navy); margin: 0 0 8px; }
#existing-q .note-warm { margin-top: 12px; }
.code-line { font-family: Consolas, Menlo, monospace; font-size: 15px; background: #f6f5ee; border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-wrap: anywhere; user-select: all; }
/* Corporate Brief 13: Incomplete banner, Waiting and Ready, the email box for existing members */
.incomplete { margin: 0 0 14px; padding: 14px 16px; border-radius: 10px; background: #fff4e5; color: #7a4100; border-left: 6px solid #e08a00; }
.incomplete b { display: block; font-size: 17px; margin-bottom: 4px; }
.who .sub { font-size: 13px; color: var(--muted); }
.who .sub.invite-note { color: #8a4b00; font-weight: 600; }
.email-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.email-add input { flex: 1 1 200px; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; }
.email-add .err { flex-basis: 100%; margin: 0; }

/* ---------- CP1: the public site (docs/corporate/site-copy.md, laid out as docs/corporate/mockup.html). ---------- */
:root { --lp-ink: #2b3440; --lp-body: #3a4654; --lp-muted: #55606d; --lp-line: #e3e5e8; }
.red { color: var(--red); }
.tick-ico { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--red); }

/* Navigation: logo, the section links, Sign in and Apply. Below 1000px the section links move into a Menu. */
.nav { position: sticky; top: 0; z-index: 20; background: var(--navy); color: var(--white); padding-top: env(safe-area-inset-top); }
.nav-in { max-width: var(--wrap); margin: 0 auto; display: flex; align-items: center; gap: 12px 24px;
  padding: 10px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left)); min-height: 64px; }
.nav-logo { display: flex; align-items: center; min-height: 44px; flex: none; }
.nav-logo img { height: 26px; width: auto; display: block; }
.nav-links { display: none; flex: 1; gap: 4px 22px; }
.nav-links a, .nav-sign { color: var(--white); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 0; }
.nav-links a:hover, .nav-sign:hover { text-decoration: underline; }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-sign { display: none; }
.nav-cta { background: var(--red); color: var(--white); text-decoration: none; font-weight: 800; font-size: 15px; padding: 10px 18px; border-radius: 6px; min-height: 44px; display: inline-flex; align-items: center; }
.nav-cta:hover { background: var(--red-dark); }
.nav-menu { position: static; }
.nav-menu summary { list-style: none; cursor: pointer; color: var(--white); font-weight: 700; font-size: 15px; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center;
  border: 1px solid rgba(255,255,255,.4); border-radius: 6px; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:focus-visible, .nav a:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.nav-drop { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); border-top: 1px solid rgba(255,255,255,.15); box-shadow: 0 16px 30px rgba(0,0,0,.25);
  display: grid; padding: 6px max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left)); }
.nav-drop a { color: var(--white); text-decoration: none; font-weight: 600; font-size: 17px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.nav-drop a:last-child { border-bottom: 0; }
@media (max-width: 519.98px) { .nav-in { gap: 10px 12px; } .nav-end { gap: 10px; } .nav-cta { padding: 10px 14px; } }
@media (max-width: 399.98px) { .nav-logo img { height: 22px; } }
@media (min-width: 520px) { .nav-sign { display: inline-block; } .nav-drop-sign { display: none; } }
@media (min-width: 1000px) { .nav-links { display: flex; } .nav-menu { display: none; } .nav-end { margin-left: 0; } }

/* Sections */
body.landing { background: var(--white); }
.lp { background: var(--white); scroll-margin-top: 72px; }
.lp-ivory { background: var(--ivory); }
.lp-in { max-width: var(--wrap); margin: 0 auto; padding: 56px 20px; }
.lp-two { display: flex; flex-wrap: wrap; gap: 40px 48px; align-items: center; }
.lp-top { align-items: flex-start; }
.lp-col { flex: 1 1 420px; min-width: 0; }
.landing .eyebrow { margin: 0 0 12px; letter-spacing: .12em; color: var(--red); }
.landing h1 { font-weight: 800; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.08; color: var(--navy); margin: 0 0 20px; }
.landing h2 { font-weight: 800; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.15; color: var(--navy); margin: 0 0 32px; letter-spacing: -0.01em; }
.landing h3 { font-weight: 800; font-size: 19px; line-height: 1.3; color: var(--navy); margin: 0 0 8px; }
.landing p { color: var(--lp-body); }
.lp-lead { font-size: 18px; margin: 0 0 24px; max-width: 580px; }
.lp-small { font-size: 14px; margin: 0 0 24px; color: var(--lp-muted) !important; }
.lp-closing { margin: 32px 0 0; font-weight: 600; color: var(--navy) !important; }
.lp-btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.lp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 13px 24px; border-radius: 6px; font-weight: 800; font-size: 16px; text-decoration: none;
  background: var(--red); color: var(--white); border: 2px solid var(--red); text-align: center; }
.lp-btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.lp-btn:focus-visible, .who-card:focus-visible, .lp-link:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.lp-btn-ghost { background: var(--white); color: var(--navy); border: 1px solid #c9ccd1; }
.lp-btn-ghost:hover, .lp-btn-outline:hover { background: var(--ivory); border-color: var(--navy); }
.lp-btn-outline { background: var(--white); color: var(--navy); border-color: var(--navy); }
.lp-btn-white { background: var(--white); color: var(--red); border-color: var(--white); }
.lp-btn-white:hover { background: var(--ivory); border-color: var(--ivory); }
.lp-btn-line { background: transparent; color: var(--white); border-color: var(--white); }
.lp-btn-line:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.lp-link { color: var(--navy); font-weight: 700; }

/* Hero */
.lp-hero { background: var(--ivory); }
.lp-hero .lp-in { padding-top: 40px; padding-bottom: 56px; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; font-weight: 600; color: var(--lp-body); }
.trust li { display: flex; align-items: flex-start; gap: 8px; }
.hero-img img, .staff-img img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; display: block; }

/* Who is reading */
.lp-who .lp-in { padding-bottom: 8px; padding-top: 40px; }
.landing .who-intro { font-size: 15px; font-weight: 700; margin: 0 0 16px; letter-spacing: 0; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.who-card { display: block; text-decoration: none; border: 1px solid var(--lp-line); border-radius: 10px; padding: 20px 22px; background: var(--white); color: inherit; }
.who-card:hover { border-color: var(--navy); }
.who-t { display: block; font-weight: 800; font-size: 17px; color: var(--navy); margin-bottom: 4px; }
.who-d { display: block; font-size: 15px; color: var(--lp-muted); }

/* Text grids */
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 28px 32px; margin-bottom: 28px; }
.lp-grid-wide { margin-bottom: 40px; }
.lp-grid p { margin: 0; }

/* Pricing */
.price-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.price-card { flex: 1 1 420px; min-width: 0; background: var(--white); border-radius: 12px; padding: 28px 22px; }
.price-label { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--lp-muted) !important; }
.price { margin: 0 0 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.price-num { font-size: 32px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.price-per { font-size: 15px; color: var(--lp-body); }
.price-ticks { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; font-weight: 600; color: var(--lp-ink); }
.price-ticks li { display: flex; gap: 10px; align-items: flex-start; }
.price-small { margin: 0; font-size: 15px; color: var(--lp-muted) !important; }
.price-small strong { color: var(--lp-ink); }
.calc { flex: 1 1 380px; min-width: 0; background: var(--navy); color: var(--white); border-radius: 12px; padding: 28px 22px; }
.calc label { color: var(--white); font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.step-btn { width: 48px; height: 48px; flex: none; border-radius: 8px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: var(--white); font: inherit; font-size: 22px; cursor: pointer; }
.step-btn:hover { background: rgba(255,255,255,.12); }
.step-btn:focus-visible, .stepper input:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.stepper input { width: 96px; height: 48px; min-height: 48px; padding: 0 8px; border-radius: 8px; border: 0; text-align: center; font: inherit; font-size: 22px; font-weight: 800; color: var(--navy); background: var(--white); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-out { margin: 0; display: grid; gap: 16px; }
.calc-out div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc-out div:first-child { border-bottom: 1px solid rgba(255,255,255,.2); padding-bottom: 14px; }
.calc-out dt { font-size: 15px; }
.calc-out dd { margin: 0; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.landing .calc-below { margin: 0; font-size: 15px; font-weight: 600; color: #ffd6dd; }
.landing .calc-foot { margin: 18px 0 0; font-size: 13px; color: #c8d3da; }

/* How it works */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 28px; }
.how-steps li { border-top: 3px solid var(--red); padding-top: 18px; }
.how-steps p { margin: 0; }
.landing .how-n { margin: 0 0 6px; font-size: 14px; font-weight: 800; color: var(--red); }

/* For HR: the list and the portal picture */
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.admin-list strong { display: block; color: var(--navy); font-size: 17px; }
.admin-list span { color: var(--lp-body); }
.admin-csv { margin: 22px 0 0; display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--navy) !important; }
.csv-ico { flex: none; width: 22px; height: 22px; color: var(--red); }
.preview { margin: 0; background: var(--white); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,44,65,.14); overflow: hidden; font-size: 14px; color: var(--lp-ink); }
.pv-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #eef0f2; font-size: 12px; color: var(--lp-muted); }
.pv-dots { display: flex; gap: 6px; } .pv-dots i { width: 10px; height: 10px; border-radius: 50%; background: #c9ccd1; display: block; }
.pv-url { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-body { padding: 20px 18px; }
.pv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.landing .pv-co { margin: 0; font-size: 13px; color: var(--lp-muted); }
.landing .pv-title { margin: 0; font-weight: 800; font-size: 20px; color: var(--navy); }
.pv-add { background: var(--red); color: var(--white); font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.landing .pv-banner { background: #fff4e5; border: 1px solid #f2c98a; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #6b4300; margin: 0 0 16px; }
.pv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.pv-stats div { background: var(--ivory); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.pv-stats b { display: block; font-size: 18px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.pv-stats span { display: block; font-size: 12px; line-height: 1.3; color: var(--lp-muted); }
.pv-list { list-style: none; margin: 0; padding: 0; }
.pv-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #eef0f2; }
.pv-av { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-pill { font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pv-pill.ok { background: #e3f3e8; color: #17663a; } .pv-pill.warm { background: #fff4e5; color: #6b4300; } .pv-pill.quiet { background: #eef0f2; color: var(--lp-body); }
.landing .pv-caption { margin: 12px 0 0; font-size: 13px; color: var(--lp-muted); }
@media (max-width: 420px) { .pv-body { padding: 16px 14px; } .pv-stats { gap: 6px; } .pv-stats div { padding: 8px; } .pv-stats b { font-size: 15px; } .pv-add { padding: 7px 9px; } }

/* Finance: the supplier box */
.supplier { background: var(--ivory); border-radius: 12px; padding: 22px 22px; }
.landing .supplier h3 { font-size: 16px; margin: 0 0 12px; }
.supplier dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px 24px; font-size: 15px; }
.supplier dt { color: var(--lp-muted); font-size: 13px; font-weight: 600; }
.supplier dd { margin: 0; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }

/* Tax */
.tax-points { margin: 0 0 18px; padding-left: 20px; display: grid; gap: 10px; color: var(--lp-body); }
.tax-card { background: var(--white); border-radius: 12px; padding: 24px 20px; }
.tax-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 10px; }
.tax-table tr { border-bottom: 1px solid var(--lp-line); }
.tax-table tr:last-child { border-bottom: 0; }
.tax-table th { text-align: left; font-weight: 600; padding: 12px 12px 12px 0; color: var(--lp-ink); }
.tax-table td { text-align: right; font-weight: 800; color: var(--navy); padding: 12px 0; white-space: nowrap; vertical-align: top; }
.tax-table td span { display: block; font-weight: 500; font-size: 13px; color: var(--lp-muted); }
.landing .tax-closing { margin: 18px 0 0; font-size: 15px; font-weight: 600; color: var(--lp-ink); }

/* For your staff */
.staff-pics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; margin-bottom: 40px; }
.staff-row { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.staff-list { flex: 1 1 440px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; align-content: start; color: var(--lp-body); }
.staff-list li { display: flex; gap: 12px; }
.staff-list strong { color: var(--navy); }
.staff-ico { flex: none; color: var(--red); }
.join-card { flex: 1 1 380px; min-width: 0; background: var(--white); border-radius: 12px; padding: 24px 22px; }
.landing .join-card h3 { margin-bottom: 16px; font-size: 18px; }
.join-card ol { margin: 0 0 18px; padding-left: 20px; display: grid; gap: 10px; color: var(--lp-body); }
.landing .join-hours-h { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--navy); }
.landing .join-hours { margin: 0 0 12px; font-size: 14px; }
.landing .join-age { margin: 0; font-size: 14px; color: var(--lp-muted); }

/* Tour, FAQs, the closing band */
.tour-in { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--lp-line); }
.tour-in > div { flex: 1 1 420px; min-width: 0; }
.landing .lp-tour h2 { font-size: clamp(24px, 2.4vw, 32px); margin: 0 0 6px; }
.lp-tour p { margin: 0; }
.faq-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 32px; }
.landing .faq-cols h3 { font-size: 18px; margin: 0 0 12px; }
.faq { border-top: 1px solid var(--lp-line); padding: 4px 0; }
.faq:last-child { border-bottom: 1px solid var(--lp-line); }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 28px 12px 0; color: var(--lp-ink); position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 10px; font-size: 22px; line-height: 1; color: var(--red); }
.faq[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.faq p { margin: 0 0 14px; }
.landing .faq-contact { margin: 32px 0 0; font-size: 14px; color: var(--lp-muted); }
.faq-contact a { color: var(--lp-muted); }
.lp-cta { background: var(--red); text-align: center; }
.lp-cta .lp-in { padding-top: 64px; padding-bottom: 64px; }
.landing .lp-cta h2 { color: var(--white); margin: 0 auto 12px; }
.landing .lp-cta p { color: var(--white); font-size: 18px; margin: 0 0 28px; }
.lp-cta .lp-btns { justify-content: center; margin: 0; }

/* Footer (every built page) */
.site-foot { background: var(--navy); color: #d5dde2; padding: 40px 20px calc(32px + env(safe-area-inset-bottom)); font-size: 14px; text-align: left; }
.foot-inner { margin: 0 auto; display: grid; gap: 14px; }
.foot-inner img { display: block; height: 24px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-foot a { color: var(--white); }
.site-foot p, .landing .site-foot p { margin: 0; overflow-wrap: anywhere; color: #d5dde2; }

@media (min-width: 1000px) {
  .lp-in { padding: 72px 24px; }
  .lp-hero .lp-in { padding: 56px 24px 64px; }
  .lp-who .lp-in { padding: 48px 24px 8px; }
  .price-card, .calc { padding: 32px; }
  .tax-card, .join-card { padding: 28px; }
  .supplier { padding: 24px 28px; }
  .site-foot { padding-left: 24px; padding-right: 24px; }
}

/* The application: what you'll need, and the payment line */
.need-card h2 { font-size: 20px; margin: 0 0 12px; }
.need-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.need-list li { display: flex; gap: 10px; align-items: flex-start; }
.pay-note { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; background: #e4eef6; color: #0b3a5c; font-size: 15px; }
/* Brief CP1: the card choice under the Direct Debit button, and End access now beside Remove. */
.dd-card-choice { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(0, 44, 65, 0.12); }
.dd-card-choice .btn { margin-top: 8px; }
.member .act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.member .act .end-now { white-space: nowrap; }
/* Brief CP1 (signing): the final agreements (numbered clauses), the colleague box, the finance contact's link and page, the staff
   list download and Recent changes. */
.legal h2 { font-size: 18px; margin: 22px 0 8px; }
.legal h3 { font-size: 16px; margin: 16px 0 6px; }
.legal .doc-meta { color: var(--muted); font-size: 15px; margin: 8px 0 12px; }
.legal .clause { display: grid; grid-template-columns: 3.2em 1fr; gap: 0 6px; margin: 0 0 10px; }
.legal .clause-n { font-weight: 700; }
.legal ul { margin: 0 0 12px 3.2em; padding-left: 18px; }
.colleague h2 { margin-top: 0; }
.colleague form { margin-top: 14px; }
.dd-finance { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(0, 44, 65, 0.12); }
.dd-finance h3 { font-size: 16px; margin: 0 0 4px; }
.dd-finance .add-form { margin-top: 12px; }
.pay-choice .btn { width: 100%; margin-top: 12px; }
.pay-choice .small { margin: 6px 0 4px; }
.team-csv-row { margin: 16px 0 0; }
.changes { list-style: none; margin: 8px 0 0; padding: 0; }
.change { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.change-when { color: var(--muted); font-size: 14px; }

/* ---------- Brief CP3: the company portal redesign. Everything here is under body.cp, so the public pages are unchanged. ----------
   Lists not cards, one meaning per colour, a warning said once, Montserrat, navy text, ivory page, white panels, 12px corners and no
   shadows except menus and sheets. Phones (under 700px): rows of name, one line and the chip; a sheet from the bottom; a floating Add staff. */
body.cp { font-size: 14px; line-height: 1.45; --cp-muted: #4d6472; --cp-line: #dcd8cc; --cp-row: #ece9e0; }
.cp .cp-narrow { display: none; }
.cp .cp-sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cp-top { background: var(--navy); min-height: 64px; padding: env(safe-area-inset-top) max(40px, env(safe-area-inset-right)) 0 max(40px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; }
.cp-top-l { display: flex; align-items: center; gap: 20px; min-width: 0; }
.cp-logo img { height: 22px; width: auto; display: block; }
.cp-div { width: 1px; height: 24px; background: rgba(255,255,255,.25); flex: none; }
.cp-co { color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-co:empty { display: none; }
.cp-top-r { display: flex; align-items: center; gap: 12px; color: #fff; flex: none; position: relative; }
.cp-me-name { font-size: 13px; opacity: .85; }
.cp-badge { width: 32px; height: 32px; border-radius: 8px; background: var(--red); color: #fff; border: 0; font: inherit; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; padding: 0; cursor: default; }
.cp-signout { color: #fff; font-size: 13px; opacity: .85; }
.cp-signout:hover { opacity: 1; }
.cp-me-menu { position: absolute; right: 0; top: 42px; }
.cp-me-full { margin: 4px 12px 6px; font-weight: 600; color: var(--navy); font-size: 13px; }
.cp-badge:focus-visible, .cp-signout:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Brief CP5: the full width, lined up with the header's logo and Sign out (40px each side), no box on wide screens. */
.cp main.cp-main { max-width: none; width: 100%; margin: 0; padding: 32px 40px 48px; }
.cp-phone-co { display: none; }
.cp-state { font-size: 16px; color: var(--cp-muted); margin: 0 0 20px; }

.cp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cp-tile { background: #fff; border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; min-width: 0; }
.cp-tile > span { font-size: 12px; color: var(--cp-muted); font-weight: 600; }
.cp-tile b { font-size: 28px; font-weight: 800; margin-top: 6px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cp-tile small { font-size: 12px; color: var(--cp-muted); margin-top: 2px; }
.cp-prorata { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12px; color: var(--cp-muted); }

.cp-tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--cp-line); margin-top: 28px; flex-wrap: nowrap; }
.cp-tabs button { font: inherit; font-size: 14px; font-weight: 600; color: var(--cp-muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 0 9px; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.cp-tabs button[aria-selected="true"] { color: var(--navy); font-weight: 800; border-bottom-color: var(--red); }
.cp-tabs button:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.cp-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; margin-left: 4px; }

.cp-banners:not(:empty) { margin-top: 20px; display: grid; gap: 10px; }
.cp-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; border-radius: 10px; padding: 12px 16px; font-size: 13px; background: #fbf1dc; color: #6b4500; }
.cp-banner.red { background: #fdecef; color: #8a0019; }
.cp-banner.info { background: #e7eef2; color: var(--navy); }
.cp-bdot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; font-size: 11px; font-weight: 800; line-height: 14px; text-align: center; flex: none; }
.cp-btext { flex: 1 1 300px; min-width: 0; }
.cp-blink { font: inherit; font-weight: 800; font-size: 13px; color: inherit; background: none; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cp-bbtn { text-decoration: none; border: 1px solid currentColor; border-radius: 8px; padding: 6px 12px; }

.cp-tools { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.cp .cp-search { flex: 0 1 280px; width: 280px; min-width: 160px; height: 40px; min-height: 40px; border: 1px solid var(--cp-line); border-radius: 8px; padding: 0 14px; font: inherit; font-size: 14px; background: #fff; }
.cp-seg { display: flex; background: #fff; border: 1px solid var(--cp-line); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.cp-f { border: 0; background: transparent; color: var(--navy); border-radius: 6px; padding: 7px 14px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.cp-f[aria-pressed="true"] { background: var(--navy); color: #fff; }
.cp-grow { flex: 1; }
.cp-btn, .cp-btn2 { display: inline-flex; align-items: center; justify-content: center; height: 40px; border-radius: 8px; padding: 0 18px; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.cp-btn { border: 0; background: var(--navy); color: #fff; }
.cp-btn.cp-danger { background: #b3001f; }
.cp-btn2 { border: 1px solid var(--cp-line); background: #fff; color: var(--navy); font-weight: 600; padding: 0 16px; }
.cp-btn[disabled], .cp-btn2[disabled] { opacity: .6; cursor: default; }
.cp-btn:focus-visible, .cp-btn2:focus-visible, .cp-f:focus-visible, .cp-link:focus-visible, .cp-more:focus-visible, .cp-blink:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.cp-link { font: inherit; font-size: 13px; font-weight: 600; color: var(--navy); background: none; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cp-link:hover, .cp-blink:hover { color: var(--red); }
.cp-link.cp-red { color: #b3001f; }
.cp-small { font-size: 13px; color: var(--cp-muted); margin: 10px 0 0; }
.cp-msg { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: #e3f1e8; color: #1d6b40; font-weight: 600; font-size: 13px; }
.cp-msg.error { background: #fdecef; color: #8a0019; }

/* The tables */
.cp-table { background: #fff; border-radius: 12px; margin-top: 16px; }
.cp-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, 1fr) 48px; align-items: center; gap: 0 12px; padding: 12px 20px; border-bottom: 1px solid var(--cp-row); min-height: 58px; position: relative; }
.cp-row.cp-head { font-size: 12px; font-weight: 800; color: var(--cp-muted); min-height: 0; }
.cp-table > div:last-of-type > .cp-row:last-child, .cp-table > [role=list] > :last-child { border-bottom: 0; }
.cp-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cp-av { width: 34px; height: 34px; border-radius: 50%; background: #e7eef2; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: none; }
.cp-who-t { min-width: 0; }
.cp-name { font-weight: 600; overflow-wrap: anywhere; }
.cp-mail { font-size: 12px; color: var(--cp-muted); overflow-wrap: anywhere; }
.cp-chip { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; background: #efede6; color: var(--cp-muted); }
.cp-chip.green { background: #e3f1e8; color: #1d6b40; }
.cp-chip.blue { background: #e3ecf5; color: #0b4a75; }
.cp-chip.amber { background: #fbf1dc; color: #6b4500; }
.cp-chip.red { background: #fdecef; color: #b3001f; }
.cp-next, .cp-since { color: var(--cp-muted); font-size: 13px; min-width: 0; }
.cp-rowact { color: var(--navy); }
.cp-dots { display: flex; justify-content: flex-end; }
.cp-more { width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px; font-size: 18px; color: var(--cp-muted); cursor: pointer; }
.cp-more:hover, .cp-more[aria-expanded="true"] { background: var(--cp-row); color: var(--navy); }
.cp-empty { margin: 0; padding: 20px; color: var(--cp-muted); }
.cp-under { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--cp-muted); font-size: 12px; margin-top: 12px; }
.cp-under .cp-link { font-size: 12px; }
.cp-under-r { display: flex; gap: 16px; }
.cp-email { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cp .cp-email input { flex: 1 1 120px; min-width: 0; width: auto; height: 34px; min-height: 34px; border: 1px solid var(--cp-line); border-radius: 8px; padding: 0 10px; font-size: 16px; }
.cp-email .err { flex-basis: 100%; font-size: 12px; margin: 0; }
.cp-email.big input { height: 48px; min-height: 48px; flex-basis: 100%; }

/* The ⋯ menu and the header menu */
.cp-menu { position: absolute; z-index: 30; width: 260px; background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,44,65,.18); padding: 6px; }
.cp-mi { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 600; color: var(--navy); cursor: pointer; }
.cp-mi:hover, .cp-mi:focus-visible { background: #f3f1ea; outline: 0; }
.cp-mi.danger { color: #b3001f; }
.cp-mfoot { font-size: 11px; color: var(--cp-muted); padding: 4px 12px 8px; }

/* Invoices, notices, admins, details */
.cp-inv .cp-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) minmax(0, .8fr) minmax(0, 1fr) 48px; }
.cp-amount { font-weight: 800; font-variant-numeric: tabular-nums; }
.cp-adm .cp-row { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) 160px; }
.cp-adm .cp-dots .cp-link { white-space: nowrap; }
.cp-lead { margin: 20px 0 0; }
.cp-notice { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 4px 20px; padding: 16px 20px; border-bottom: 1px solid var(--cp-row); }
.cp-notice:last-child { border-bottom: 0; }
.cp-ndate { font-size: 13px; color: var(--cp-muted); font-weight: 600; }
.cp-nbody h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.cp-nbody p { margin: 0 0 8px; }
.cp-panel { background: #fff; border-radius: 12px; padding: 22px 24px; margin-top: 16px; }
.cp-panel:first-child { margin-top: 20px; }
.cp-panel h2 { font-size: 16px; font-weight: 800; margin: 0 0 8px; }
.cp-panel h3 { font-size: 14px; font-weight: 800; margin: 0 0 4px; }
.cp-panel > p { margin: 0 0 8px; }
.cp-sub { border-top: 1px solid var(--cp-row); margin-top: 16px; padding-top: 16px; }
.cp-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.cp-dl { margin: 0; display: grid; gap: 12px; }
.cp-dl > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.cp-dl dt { color: var(--cp-muted); font-weight: 600; font-size: 13px; }
.cp-dl dd { margin: 0; overflow-wrap: anywhere; }
.cp-form { margin-top: 8px; }
.cp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cp .cp-form label { font-size: 13px; margin-bottom: 6px; }
.cp .cp-form input[type=text], .cp .cp-form input[type=email], .cp .cp-form textarea { min-height: 44px; padding: 10px 12px; font-size: 16px; border-width: 1px; border-color: var(--cp-line); border-radius: 8px; }
.cp .cp-form .field { margin-bottom: 12px; }
.cp .cp-form .err { font-size: 13px; }
.cp-switch { margin-top: 12px; }
.cp-note { padding: 10px 14px; border-radius: 10px; background: #fbf1dc; color: #6b4500; font-weight: 600; font-size: 13px; }
.cp-fails { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; display: grid; gap: 8px; max-height: 200px; overflow: auto; }
.cp-fails li { background: #fdecef; color: #8a0019; border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
.cp-fail-r { display: block; font-weight: 600; }
.cp-changes { list-style: none; margin: 12px 0 0; padding: 0; max-height: 50vh; overflow: auto; }
.cp-change { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--cp-row); }
.cp-change:last-child { border-bottom: 0; }
.cp-change-t { font-weight: 600; }
.cp-change-w { font-size: 12px; color: var(--cp-muted); }

/* Dialogs: centred on a computer; a sheet from the bottom on a phone */
.cp-dialog { border: 0; border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--navy); background: #fff; box-shadow: 0 24px 60px rgba(0,44,65,.3); }
.cp-dialog::backdrop { background: rgba(0,44,65,.45); }
.cp-dlg-in { padding: 22px 24px 24px; max-height: calc(100vh - 48px); overflow: auto; box-sizing: border-box; }
.cp-dialog h2 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.cp-dialog p { margin: 0 0 8px; }
.cp-dlg-in:focus { outline: 0; }
.cp-handle { display: none; width: 40px; height: 4px; background: var(--cp-line); border-radius: 2px; margin: 0 auto 12px; }
.cp-sh-name { font-size: 16px; }
.cp-sh-line { font-size: 12px; color: var(--cp-muted); overflow-wrap: anywhere; }
.cp-sh-acts { display: grid; gap: 8px; margin-top: 14px; }
.cp-sh-btn { display: block; width: 100%; height: 48px; border: 1px solid var(--cp-line); background: #fff; color: var(--navy); border-radius: 10px; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.cp-sh-btn.danger { border-color: #f0c2ca; color: #b3001f; }
.cp-sh-foot { font-size: 11px; color: var(--cp-muted); text-align: center; margin-top: 8px; }
.cp footer { font-size: 12px; }

@media (max-width: 999.98px) {
  .cp-top { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  .cp main.cp-main { padding: 24px 24px 48px; }
  .cp-tiles { gap: 10px; }
  .cp-tile { padding: 14px 16px; }
  .cp-tabs { gap: 24px; }
  .cp .cp-search { flex: 1 1 200px; }
}

@media (max-width: 699.98px) {
  .cp .cp-wide, .cp .cp-wide-flex { display: none; }
  .cp .cp-narrow { display: inline; }
  .cp-top { min-height: 56px; padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
  .cp-logo img { height: 18px; }
  .cp-div, .cp-co, .cp-me-name, .cp-signout { display: none; }
  .cp-badge { cursor: pointer; }
  .cp main.cp-main { padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); }
  .cp-phone-co { display: block; font-size: 20px; font-weight: 800; margin: 0 0 14px; line-height: 1.25; overflow-wrap: anywhere; }
  .cp-phone-co:empty { display: none; }
  .cp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cp-tile { padding: 12px 14px; }
  .cp-tile > span { font-size: 11px; }
  .cp-tile b { font-size: 22px; margin-top: 2px; }
  .cp-tile-x { display: none; }
  .cp-tabs { gap: 22px; margin-top: 18px; }
  .cp-tabs button { padding: 10px 0 7px; }
  .cp-banners:not(:empty) { margin-top: 14px; }
  .cp-banner { padding: 10px 12px; font-size: 12px; }
  .cp-bdot { display: none; }
  .cp-btext { flex-basis: auto; }
  .cp-tools { margin-top: 14px; gap: 8px; }
  .cp .cp-search { flex: 1 1 100%; width: 100%; }
  .cp-seg { background: none; border: 0; padding: 0; gap: 8px; }
  .cp-f { border: 1px solid var(--cp-line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 12px; }
  .cp-f[aria-pressed="true"] { border-color: var(--navy); }
  .cp-grow { display: none; }
  .cp-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); height: 48px; border-radius: 24px; padding: 0 20px; font-size: 14px; box-shadow: 0 4px 12px rgba(0,44,65,.25); z-index: 20; }
  .cp-table { margin-top: 12px; }
  .cp-row.cp-head { display: none; }
  .cp-row.cp-person { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; gap: 12px; min-height: 44px; cursor: pointer; }
  .cp-person .cp-next, .cp-person .cp-since, .cp-person .cp-dots { display: none; }
  .cp-person .cp-chip { font-size: 11px; }
  .cp-person .cp-mail.cp-narrow { display: block; }
  .cp-person:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }
  .cp-inv .cp-invrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who amt" "x x" "chip pdf"; gap: 6px 12px; padding: 12px 14px; }
  .cp-invrow > .cp-who-t { grid-area: who; }
  .cp-invrow .cp-amount { grid-area: amt; }
  .cp-invrow .cp-invx { grid-area: x; font-size: 12px; }
  .cp-invrow .cp-invx:empty { display: none; }
  .cp-invrow .cp-chipcell { grid-area: chip; }
  .cp-invrow .cp-dots { grid-area: pdf; }
  .cp-adm .cp-admrow { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
  .cp-admrow .cp-since { display: none; }
  .cp-notice { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .cp-panel { padding: 18px 16px; }
  .cp-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cp-pair { grid-template-columns: minmax(0, 1fr); }
  .cp-under { flex-wrap: wrap; }
  .cp-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(0,44,65,.15); max-height: 90vh; }
  .cp-dlg-in { padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); max-height: 90vh; }
  .cp-handle { display: block; }
  .cp-dialog .cp-btns > * { flex: 1 1 140px; height: 48px; }
  .cp-me-menu { top: 40px; }
}
@media (max-width: 399.98px) { .cp-tabs { gap: 16px; } .cp-tabs button { font-size: 13px; } }
