/* Candbike partner portal — 2.21.762
 *
 * WHAT 2.21.761 GOT WRONG, seen on the live page and corrected here.
 *
 * 1. EVERY CONTROL SELECTOR WAS ONE CLASS. `.pp-btn`, `.pp-sw` and the rest
 *    are specificity (0,1,0), so any theme rule like `.site button` or
 *    `#content button` (0,1,1 / 1,0,1) beat them. On a logged-in page the
 *    theme repainted the switch as a brown pill. Every control below is now
 *    `.pp .pp-x` (0,2,0) AND carries an explicit reset, because scoping
 *    alone does not undo an inherited appearance.
 * 2. 60/30/10 WAS INVERTED. The accent was a full-width yellow slab — the
 *    largest object on the page. An accent that big is not an accent. The
 *    answer was never a different HUE, it was a smaller one: the primary is
 *    the brand sun in BOTH modes (one job, one colour) at its natural width,
 *    not stretched across the card.
 *    🔴 2.21.769: dark mode had been using ds-danger-ink — PINK — as the
 *    primary action. It passed contrast at 7.48:1, which is exactly why it
 *    survived review: I checked the number and never asked whether the colour
 *    was right for the job. The danger colour is not the action colour.
 * 3. NO TYPE SCALE. Everything sat within a few px of everything else, so
 *    nothing led. One ratio now: 30 / 20 / 15 / 13 / 11.
 * 4. CARDS AROUND NOTHING. The sign-in screen was two bordered boxes, the
 *    second about nine-tenths empty. The sign-in screen has no cards at all
 *    now; it is a 360px column on paper. Cards earn their border on the
 *    dashboard, where they hold real content.
 * 5. A THEME SWITCH ON A SIGNED-OUT PAGE. A stranger who has not signed in
 *    does not need a display preference, and it was sitting at the same
 *    visual weight as the title. It is gone from sign-in and demoted on the
 *    dashboard.
 *
 * Tokens are named for the JOB, never the value. Contrast is computed in
 * tools/tests/test-partner-portal-761.php, not checked by eye.
 *   light  ink 15.52/15.91/14.11 · muted 6.78/6.95/6.16
 *          owed 5.16/5.29/4.69   · paid  5.18/5.31/4.71
 *          white on coral 5.29   · ink on sun 10.62
 *   dark   ink 13.30/10.54/13.30 · muted 9.01/7.14/9.01
 *          owed 7.48/5.92/7.48   · paid 11.06/8.76/11.06
 * 🔴 Sun as text is 1.46:1 in light. Yellow is a fill here, never a word.
 *
 * The dark half is NOT invented: every value is lifted from cbk-dark.css,
 * which 2.21.675 generated as a scale and proved pair by pair.
 */
.pp{
  --ground:#FFFCF4; --raised:#FFFFFF; --sunk:#F6F1E4;
  --line:#E9E2D0; --line-strong:#8A8374;
  --ink:#222222; --ink-muted:#5E5950;
  --sun:#FDCE19; --on-sun:#222222;
  --owed:#B8472A; --paid:#1E7A4F;
  --action:#FDCE19; --on-action:#222222;   /* 10.62:1 */
  --r:12px;
}
.pp[data-theme="dark"]{
  --ground:#232323; --raised:#343434; --sunk:#232323;   /* ds-bg / ds-card / ds-surface */
  --line:#474747; --line-strong:#c4c4c4;                /* ink-800 / ink-300 */
  --ink:#ececec; --ink-muted:#c4c4c4;                   /* ink-100 / ink-300 */
  --owed:#f198c0; --paid:#bce4a5;                       /* ds-danger-ink / ds-ok-ink */
  --action:#FDCE19; --on-action:#232323;                /* 11.78:1 */
}

/* ── shell ──────────────────────────────────────────────────────────────── */
.pp{background:var(--ground);color:var(--ink);margin:0 auto;
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    font-size:15px;line-height:1.55;-webkit-text-size-adjust:100%}
.pp,.pp *,.pp *::before,.pp *::after{box-sizing:border-box}
.pp{max-width:680px}
.pp.pp-narrow{max-width:360px}
.pp.pp-auth{max-width:940px}

/* the title lockup: a short yellow rule is the ONLY yellow on sign-in */
.pp .pp-h1{margin:0 0 6px;font-family:'Newsreader',Georgia,serif;
    font-size:30px;font-weight:600;line-height:1.15;letter-spacing:-.01em;color:var(--ink)}
.pp .pp-h1::after{content:"";display:block;width:34px;height:3px;border-radius:2px;
    background:var(--sun);margin-top:12px}
.pp .pp-lead{margin:0 0 26px;font-size:15px;color:var(--ink-muted);max-width:46ch}
.pp .pp-eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;
    font-weight:700;color:var(--ink-muted);margin:0 0 4px}

.pp .pp-head{display:flex;justify-content:space-between;align-items:flex-start;
    gap:16px;margin-bottom:28px}
.pp .pp-label{font-size:11px;letter-spacing:.14em;text-transform:uppercase;
    font-weight:700;color:var(--ink-muted);margin:0 0 14px}
.pp .pp-note{font-size:13px;color:var(--ink-muted);margin:14px 0 0;line-height:1.6}
.pp .pp-note strong{color:var(--ink);font-weight:600}
.pp a{color:var(--action);text-decoration:underline;text-underline-offset:2px}

/* ── cards: only where there is something to hold ───────────────────────── */
.pp .pp-card{background:var(--raised);border:1px solid var(--line);
    border-radius:var(--r);padding:22px;margin-bottom:14px}
/* sign-in has no cards. The form sits on paper. */
.pp.pp-narrow .pp-card{background:none;border:0;padding:0;margin:0 0 28px}

/* ── controls: scoped AND reset, so a theme cannot repaint them ─────────── */
.pp .pp-in,.pp .pp-btn,.pp .pp-sw,.pp .pp-link,.pp .pp-url{
    -webkit-appearance:none;appearance:none;font-family:inherit;
    box-shadow:none;text-shadow:none;letter-spacing:normal;text-transform:none}
.pp .pp-in,.pp .pp-url{display:block;width:100%;margin:0 0 10px;padding:12px 14px;
    min-height:46px;border:1px solid var(--line-strong);border-radius:10px;
    font-size:16px;line-height:1.3;background:var(--raised);color:var(--ink)}
.pp .pp-in::placeholder{color:var(--ink-muted);opacity:1}
.pp .pp-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;
    min-height:46px;padding:12px 22px;border:1px solid transparent;border-radius:10px;
    font-size:15px;font-weight:600;line-height:1;cursor:pointer;background:none;color:var(--ink)}
.pp .pp-btn-primary{background:var(--action);color:var(--on-action);border-color:var(--action)}
.pp .pp-btn-quiet{background:var(--raised);color:var(--ink);border-color:var(--line-strong)}
.pp .pp-btn-block{display:flex;width:100%}
/* the dashboard's Copy link sits under the URL field and does not need to span
   the card — a full-bleed accent is the 60, not the 10 */
.pp .pp-linkcol .pp-btn-block{width:auto;display:inline-flex}
.pp .pp-btn[disabled]{opacity:.55;cursor:default}
.pp .pp-btn:focus-visible,.pp .pp-sw:focus-visible,.pp .pp-in:focus-visible,
.pp .pp-link:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.pp .pp-link{background:none;border:0;padding:0;font-size:15px;font-weight:600;
    color:var(--action);cursor:pointer;text-decoration:underline;text-underline-offset:2px}

/* ── the switch: demoted. Sign-in does not get one at all. ──────────────── */
.pp.pp-narrow .pp-sw{display:none}
.pp .pp-sw{display:inline-flex;align-items:center;gap:8px;background:none;border:0;
    padding:6px 2px;min-height:44px;cursor:pointer;color:var(--ink-muted);
    font-size:12px;font-weight:600;border-radius:9999px}
.pp .pp-sw-track{position:relative;width:34px;height:20px;border-radius:9999px;
    background:var(--sunk);border:1px solid var(--line-strong);flex:0 0 auto;
    transition:background .18s}
.pp .pp-sw[aria-checked="true"] .pp-sw-track{background:var(--ink-muted);border-color:var(--ink-muted)}
.pp .pp-sw-knob{position:absolute;top:2px;left:2px;width:14px;height:14px;
    border-radius:9999px;background:var(--raised);transition:transform .18s}
.pp .pp-sw[aria-checked="true"] .pp-sw-knob{transform:translateX(14px)}

/* ── sign-in: the lead line, and the quiet second door ──────────────────── */
/* The first paragraph of the sign-in card IS the lead — styled here rather
 * than given a new class, so this redesign stays in one file and the release
 * stays ordinary instead of re-entering the booking path for a font size. */
.pp.pp-narrow .pp-card > .pp-note:first-child{
    font-size:15px;color:var(--ink-muted);margin:0 0 22px;max-width:46ch}
/* The second "card" was a bordered box about nine-tenths empty. It is a rule
 * and a link now. */
.pp.pp-narrow .pp-card + .pp-card{margin-top:26px;padding-top:22px;
    border-top:1px solid var(--line);border-radius:0}
.pp .pp-msg{font-size:14px;margin:10px 0 0;color:var(--owed);min-height:1.2em}
.pp .pp-msg.pp-ok{color:var(--paid)}
.pp .pp-msg.pp-dim{color:var(--ink-muted)}

/* ── the link + QR ──────────────────────────────────────────────────────── */
.pp .pp-linkrow{display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap}
.pp .pp-linkcol{flex:1;min-width:210px}
.pp .pp-code{display:inline-block;margin-bottom:10px;padding:7px 14px;background:var(--sunk);
    border:1px solid var(--line-strong);border-radius:8px;font-size:17px;
    font-weight:700;letter-spacing:.14em;color:var(--ink)}
.pp .pp-url{font-size:13px;background:var(--sunk);color:var(--ink-muted);margin-bottom:10px}
.pp .pp-qr{width:104px;height:104px;background:#fff;border:1px solid var(--line);
    border-radius:10px;padding:7px;flex:0 0 auto}
.pp .pp-qr canvas{display:block;width:100%!important;height:auto!important}

/* ── money: the numbers lead, the labels follow ─────────────────────────── */
.pp .pp-tiles{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.pp .pp-tile{flex:1;min-width:148px;background:var(--raised);border:1px solid var(--line);
    border-radius:var(--r);padding:18px}
.pp .pp-big{font-family:'Newsreader',Georgia,serif;font-size:32px;font-weight:700;
    color:var(--ink);line-height:1;letter-spacing:-.01em}
.pp .pp-tile .pp-label{margin:10px 0 0}
.pp .pp-sub{font-size:12px;color:var(--ink-muted);margin-top:3px}

/* ── the proof table ────────────────────────────────────────────────────── */
.pp .pp-table{width:100%;border-collapse:collapse}
.pp .pp-table th{text-align:left;padding:0 8px 10px;font-size:11px;font-weight:700;
    letter-spacing:.12em;text-transform:uppercase;color:var(--ink-muted);
    border-bottom:1px solid var(--line)}
.pp .pp-table th:last-child{text-align:right}
.pp .pp-table td{padding:12px 8px;border-bottom:1px solid var(--line);font-size:14px;color:var(--ink)}
.pp .pp-table td.pp-dim{color:var(--ink-muted)}
.pp .pp-table td.pp-num{text-align:right;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.pp .pp-table tr:last-child td{border-bottom:0}
.pp .pp-empty{padding:22px 8px;color:var(--ink-muted);font-size:14px}

.pp .pp-deal{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.pp .pp-deal-rate{font-size:18px;font-weight:700;color:var(--ink)}

/* ── phone ──────────────────────────────────────────────────────────────── */
@media (max-width:640px){
  .pp .pp-h1{font-size:25px}
  .pp .pp-big{font-size:28px}
  .pp .pp-card{padding:18px}
  .pp .pp-tile{min-width:100%}
  .pp .pp-qr{width:92px;height:92px}
}
@media (prefers-reduced-motion:reduce){
  .pp .pp-sw-track,.pp .pp-sw-knob{transition:none}
}

/* Standalone /partner-portal/ chrome — outside .pp, so keyed off <html>.
 * 5E5950 on FFFCF4 = 6.78:1 · c4c4c4 on 232323 = 9.01:1 (both measured). */
.pp-brand{font-family:'Newsreader',Georgia,serif;font-size:17px;font-weight:600;color:#5E5950}
html.pp-dark .pp-brand{color:#c4c4c4}


/* ══ SIGN-IN: a sequence, not a pile ════════════════════════════════════════
 * 2.21.762 showed every step at once — email field, sign-in button, code
 * field, second sign-in button, status line and a five-field application
 * form, all on one screen. Twelve controls before the visitor had done
 * anything, and a code box that meant nothing until a code existed.
 * One view at a time now, each replacing the last. */
.pp-auth .pp-split{display:grid;grid-template-columns:1fr;gap:28px;align-items:start}
@media (min-width:901px){
  .pp-auth .pp-split{grid-template-columns:1fr 420px;gap:64px;padding:16px 0 48px}
}
.pp-auth .pp-aside{padding-top:4px}
.pp-auth .pp-h1{font-size:34px;line-height:1.18;margin:4px 0 0;max-width:15ch}
.pp-auth .pp-h1::after{margin-top:18px}
.pp-auth .pp-value{list-style:none;margin:26px 0 0;padding:0}
.pp-auth .pp-value li{position:relative;padding-left:22px;margin-bottom:10px;
    font-size:15px;color:var(--ink-muted)}
.pp-auth .pp-value li::before{content:"";position:absolute;left:0;top:9px;
    width:7px;height:7px;border-radius:50%;background:var(--action)}
.pp-auth .pp-aside-foot{margin:28px 0 0;font-size:12px;letter-spacing:.1em;
    text-transform:uppercase;font-weight:700;color:var(--line-strong)}
@media (max-width:900px){
  .pp-auth .pp-h1{font-size:26px;max-width:none}
  .pp-auth .pp-value{display:none}      /* on a phone the form is the page */
  .pp-auth .pp-aside-foot{display:none}
}

/* the panel is the only card on this screen */
.pp-auth .pp-panel{background:var(--raised);border:1px solid var(--line);
    border-radius:16px;padding:30px 28px}
@media (max-width:640px){ .pp-auth .pp-panel{padding:22px 20px;border-radius:12px} }

.pp .pp-step[hidden]{display:none}
.pp .pp-step-h{font-family:'Newsreader',Georgia,serif;font-size:23px;font-weight:600;
    color:var(--ink);margin:0 0 6px;line-height:1.25}
.pp .pp-step-p{font-size:14px;color:var(--ink-muted);margin:0 0 22px;line-height:1.6}
.pp .pp-step-p strong{color:var(--ink);font-weight:600;word-break:break-word}

/* a placeholder is not a label: it leaves exactly when typing starts */
.pp .pp-lab{display:block;font-size:13px;font-weight:600;color:var(--ink);
    margin:0 0 6px}
.pp .pp-lab .pp-opt{font-weight:400;color:var(--ink-muted)}
.pp .pp-in + .pp-lab{margin-top:16px}
.pp .pp-ta{min-height:88px;resize:vertical;line-height:1.5}
.pp .pp-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.pp .pp-code-in{font-size:24px;letter-spacing:.42em;text-align:center;
    font-variant-numeric:tabular-nums;padding-left:0;padding-right:0}

.pp .pp-btn-block{margin-top:18px}
.pp .pp-back{background:none;border:0;padding:0 0 14px;font:inherit;font-size:13px;
    font-weight:600;color:var(--ink-muted);cursor:pointer}
.pp .pp-back:hover{color:var(--ink)}
.pp .pp-foot{margin:20px 0 0;padding-top:18px;border-top:1px solid var(--line);
    font-size:14px;color:var(--ink-muted)}
.pp .pp-msg:empty{margin:0;min-height:0}

/* ══ 2.21.771 — the sign-in gets the Tour Desk shape, and a pulse ═══════════
 * Compared side by side with /guide-view/ (Tour Desk), which the owner likes
 * and which is right: it is CENTRED and single-column with air around it — a
 * small brand line, a big serif title, one calm instruction, ONE card, one
 * sun button. Nothing competes.
 * The partner sign-in was two columns: a value proposition on the left
 * fighting a form on the right. It read like paperwork. Same content, Tour
 * Desk's shape: the promise becomes the title, the three selling points move
 * under the card where they belong, and the form is the only thing in the
 * middle of the screen.
 * Motion: a short staggered rise on load and a settle when a step changes, so
 * the page has a rhythm instead of appearing all at once like a document.
 * Every bit of it is inside prefers-reduced-motion. */
@media (min-width:901px){
  .pp-auth .pp-split{grid-template-columns:minmax(0,1fr);gap:0;
      max-width:470px;margin:0 auto;padding:24px 0 56px}
}
.pp-auth{max-width:none}
.pp-auth .pp-aside{text-align:center;padding:0 0 30px}
.pp-auth .pp-h1{font-size:40px;max-width:none;margin:6px auto 0;line-height:1.1}
.pp-auth .pp-h1::after{margin:16px auto 0}
.pp-auth .pp-eyebrow{letter-spacing:.18em}
/* the three promises are GONE from this screen. Tried as a quiet row under
   the card first; they are nested inside the aside, so they rendered above
   it and broke the calm that makes Tour Desk work. The title already carries
   the promise — "Send us guests. Earn on every one." — and the apply step
   explains the rest to anyone who needs it. Verified in the live browser. */
.pp-auth .pp-value{display:none}
.pp-auth .pp-aside-foot{display:none}
.pp-auth .pp-panel{max-width:470px;margin:0 auto;padding:36px 34px}
.pp-auth .pp-split{display:flex;flex-direction:column}
.pp-auth .pp-panel{order:2}
.pp-auth .pp-aside{order:1}

/* ── rhythm ──────────────────────────────────────────────────────────────
   One idea: everything rises a little, in order, once. 320ms is long enough
   to read as deliberate and short enough that a returning partner never
   waits for it. */
@keyframes cbk-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.pp-auth .pp-aside{animation:cbk-rise .34s cubic-bezier(.22,.8,.3,1) both}
.pp-auth .pp-panel{animation:cbk-rise .34s cubic-bezier(.22,.8,.3,1) .07s both}
.pp-auth .pp-value{animation:cbk-rise .34s cubic-bezier(.22,.8,.3,1) .14s both}
/* a step change is a settle, not a jump */
.pp .pp-step{animation:cbk-rise .26s cubic-bezier(.22,.8,.3,1) both}
/* the one action answers the press */
.pp .pp-btn{transition:transform .12s ease,filter .12s ease}
.pp .pp-btn-primary:active{transform:translateY(1px)}
.pp .pp-btn-primary:hover{filter:brightness(1.04)}
/* the rule under the title draws itself — the only ornament on the page */
@keyframes cbk-draw{from{width:0}to{width:34px}}
.pp-auth .pp-h1::after{animation:cbk-draw .5s cubic-bezier(.22,.8,.3,1) .22s both}

@media (prefers-reduced-motion:reduce){
  .pp-auth .pp-aside,.pp-auth .pp-panel,.pp-auth .pp-value,
  .pp .pp-step,.pp-auth .pp-h1::after{animation:none}
  .pp .pp-btn{transition:none}
}
@media (max-width:900px){
  .pp-auth .pp-h1{font-size:28px}
  .pp-auth .pp-panel{padding:24px 20px}
}
