/* ==========================================================================
   PayDrive marketing site
   Palette and type carried over from the Framer design; layout and motion rebuilt.
   ========================================================================== */

/* ---------------------------------------------------------------- fonts --- */
/* Self-hosted so no visitor request goes to Google. Latin subset (covers £ and €),
   from @fontsource 5.3.0; licence in fonts/OFL.txt. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

:root {
    --ink:      #141646;   /* navy — display type, dark grounds */
    --ink-90:   #23265c;
    --gold:     #e4b523;   /* primary action */
    --gold-ink: #8f6f0b;   /* gold that passes contrast on light grounds */
    --paper:    #f7f8f6;   /* page ground */
    --white:    #ffffff;
    --wash:     #faf0ce;   /* pale gold highlight */
    --flag:     #c4442a;   /* overdue / problem */
    --grey:     #63646e;   /* body copy */
    --grey-30:  #d9dad8;   /* hairlines */

    /* ledger ageing buckets — used by the hero ageing card */
    --age-current: #17805e;
    --age-d30:     #57a88c;
    --age-d60:     #e0952e;
    --age-d60p:    #c4442a;
    --age-d90p:    #8e2b1b;   /* deepest overdue, where a view splits 60+ into 61–90 and 90+ */

    --shell: 1120px;
    --r: 10px;

    --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --disp: var(--sans);
}

/* --------------------------------------------------------------- base --- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--grey);
    font: 400 17px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); margin: 0; font-family: var(--disp); font-weight: 600; }
p { margin: 0 0 1.1em; }
a { color: var(--ink); }
img, svg { max-width: 100%; }

.mono { font-family: var(--mono); }

.shell { width: min(100% - 48px, var(--shell)); margin-inline: auto; }
.shell--narrow { width: min(100% - 48px, 820px); }

.skip {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--ink); color: var(--white);
    padding: 10px 16px; border-radius: var(--r);
    font: 500 14px var(--sans); text-decoration: none;
    transition: top .15s ease;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------- typography --- */

.h-display {
    font-size: clamp(38px, 5.4vw, 68px);
    line-height: 1.08;
    letter-spacing: -.022em;
    font-weight: 700;
    margin-bottom: .5em;
}

.h-sec {
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.14;
    letter-spacing: -.016em;
    margin-bottom: .55em;
}

.h-cap {
    font-size: clamp(26px, 2.7vw, 34px);
    line-height: 1.18;
    letter-spacing: -.012em;
    margin-bottom: .6em;
}

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin: 0 0 1.4em;
}
.eyebrow--light { color: var(--gold); }

/* pale-gold marker behind the second hero line */
.mark {
    background: var(--wash);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    padding: .04em .16em;
    margin-left: -.16em;
}

.lede { font-size: 19px; line-height: 1.6; max-width: 34em; }
.lede--tight { margin-bottom: 2em; }

/* -------------------------------------------------------------- button --- */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: 500 15px/1 var(--sans);
    text-decoration: none;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.btn--lg { padding: 15px 28px; font-size: 16px; }

.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #d3a614; }

.btn--line { background: var(--white); border-color: var(--grey-30); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); }

.btn--ghost { background: none; color: var(--ink); padding-inline: 12px; }
.btn--ghost:hover { background: #ecedeb; }

.btn:active { transform: translateY(1px); }

/* ----------------------------------------------------------------- nav --- */

.nav {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, background .2s ease;
}
.nav[data-stuck] {
    background: var(--paper);
    border-bottom-color: var(--grey-30);
}

.nav__in { display: flex; align-items: center; gap: 32px; height: 72px; }
.nav__links { display: flex; gap: 28px; margin-inline: auto; }
.nav__links a {
    font-size: 15px; text-decoration: none; color: var(--ink);
    padding: 4px 0; border-bottom: 1.5px solid transparent;
}
.nav__links a:hover { border-bottom-color: var(--gold); }
.nav__act { display: flex; align-items: center; gap: 8px; }

.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo__img { display: block; width: auto; height: 36px; }

/* The lockup carries its own navy ground, so on dark sections it sits on a
   light plate rather than disappearing into the background. */
.logo--plate {
    background: var(--white);
    border-radius: 6px;
    padding: 7px 10px;
}
.logo--plate .logo__img { height: 30px; }

/* ---------------------------------------------------------- side rail --- */

.rail {
    position: fixed; left: 22px; top: 50%; transform: translateY(-50%);
    z-index: 40;
    display: none;
}
.rail__body { position: relative; display: block; }
.rail__track {
    display: block;
    width: 2px; height: 240px;
    background: var(--grey-30);
}
/* Follows the scroll directly, so no transition: easing here would only read as lag. */
.rail__fill {
    display: block; height: 100%;
    background: var(--ink);
    transform: scaleY(0); transform-origin: top;
}

/* Once the script drives it, the rail shows only over the capabilities, and is hidden
   (not just faded) elsewhere so its links never take focus while out of sight. */
.rail--live { transition: opacity .35s ease, visibility 0s linear .35s; }
.rail--live:not(.is-on) { opacity: 0; visibility: hidden; }
.rail--live.is-on { transition-delay: 0s; }

/* The contents: one stop per capability, evenly down the track. Words only, no markers:
   the fill reaches a stop as its section becomes current. */
.rail__stops { display: none; list-style: none; margin: 0; padding: 0; }
.rail__stops li { position: absolute; left: 12px; top: calc(var(--i) * 25%); transform: translateY(-50%); }
.rail__stop {
    display: block; padding: 3px 4px;
    font-size: 12px; font-weight: 500; line-height: 1.2; color: var(--grey);
    text-decoration: none; white-space: nowrap;
}
.rail__stop:hover { color: var(--ink); }
.rail__stop[aria-current="true"] { color: var(--ink); font-weight: 600; }

@media (min-width: 1280px) { .rail { display: block; } }
/* The labels need ~115px of gutter; the 1120px shell leaves that from 1360px. */
@media (min-width: 1360px) { .rail__stops { display: block; } }

/* ---------------------------------------------------------------- hero --- */

.hero { padding: 72px 0 88px; }
.hero__in {
    display: grid; gap: 56px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 2em 0 1.4em; }
.hero__trust {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
    list-style: none; margin: 0; padding: 0;
    font-size: 12.5px; color: var(--gold-ink); letter-spacing: .02em;
}
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.hero__trust li + li::before {
    content: ""; width: 3px; height: 3px; border-radius: 50%;
    background: currentColor; opacity: .45;
}

/* ------------------------------------------------------- ageing visual --- */
/* Neil's AR ageing card (PAYD-1650), recoloured to the site's ageing buckets.
   Plays once on load: the bar grows, then the month-end forecast draws in. */

.aging {
    container-type: inline-size;
    margin: 0;
    background: var(--white);
    border: 1px solid rgba(20, 22, 70, .08);
    border-radius: 16px;
    padding: 22px 22px 20px;
    box-shadow:
        0 1px 2px rgba(20, 22, 70, .06),
        0 10px 24px -6px rgba(20, 22, 70, .10),
        0 36px 70px -18px rgba(20, 22, 70, .28);
}
/* "Illustrative data", under any figure that shows numbers or names. Below the hero
   card; inside the frame on the capability rail, where a sibling would join the grid. */
.fig-note {
    font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--grey); opacity: .6; text-align: right; margin: 10px 4px 0;
}
.shot .fig-note { margin: 10px 16px 0; }

.aging__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.aging__title { margin: 0; font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.aging__live { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--age-current); }
.aging__live i {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--age-current); box-shadow: 0 0 0 3px rgba(23, 128, 94, .18);
}

.aging__bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--grey-30); margin-bottom: 14px; }
.aging__bar span { height: 100%; transform-origin: left; animation: aging-grow .7s cubic-bezier(.3, .7, .2, 1) both; }
.aging__bar span:nth-child(1) { flex: 0 0 55%; background: var(--age-current); }
.aging__bar span:nth-child(2) { flex: 0 0 17%; background: var(--age-d30);  animation-delay: .08s; }
.aging__bar span:nth-child(3) { flex: 0 0 12%; background: var(--age-d60);  animation-delay: .16s; }
.aging__bar span:nth-child(4) { flex: 0 0 9%;  background: var(--age-d60p); animation-delay: .24s; }
.aging__bar span:nth-child(5) { flex: 1 1 auto; background: var(--age-d90p); animation-delay: .32s; }

.aging__tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 18px; }
.tile { background: var(--paper); border: 1px solid var(--grey-30); border-radius: 10px; padding: 9px 8px 8px; min-width: 0; }
.tile--hot { background: #f8e4df; border-color: #eec3b9; }
.tile__l { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--grey); white-space: nowrap; }
.tile__l i { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.tile__v { font: 600 16px var(--mono); color: var(--ink); margin: 6px 0 2px; letter-spacing: -.02em; }
.tile--hot .tile__v { color: var(--age-d90p); }
.tile__n { font-size: 11px; color: var(--grey); }

.fc__title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fc__title b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.fc__title span { font-size: 11.5px; color: var(--grey); }
.fc { background: var(--paper); border: 1px solid var(--grey-30); border-radius: 12px; padding: 12px 14px 14px; }
.fc svg { display: block; width: 100%; height: auto; overflow: visible; }
.fc__grid { stroke: var(--grey-30); }
.fc__now { stroke: var(--ink); stroke-width: 2.25; stroke-linecap: round; }
.fc__proj { stroke-width: 2; stroke-dasharray: 5 4; stroke-linecap: round; }
.fc__proj--bad { stroke: var(--flag); }
.fc__proj--good { stroke: var(--gold); }
.fc__wedge { fill: var(--gold); fill-opacity: .16; }
.fc__dot { fill: var(--ink); stroke: var(--white); stroke-width: 2; }
.fc__dot--bad { fill: var(--flag); }
.fc__dot--good { fill: var(--gold); }
.fc__axis { font: 10px var(--sans); fill: var(--grey); }
.fc__gap { font: 600 11.5px var(--sans); fill: var(--gold-ink); }   /* sans: Plex Mono's dotted 0 reads as 8 at this size */
.fc__reveal { transform-box: fill-box; transform-origin: left; animation: aging-grow 1s .45s cubic-bezier(.4, 0, .2, 1) both; }
.fc__wedge, .fc__gap, .fc__end { animation: aging-fade .5s 1.35s both; }

.fc__stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--grey-30); }
.fc__k { font-size: 10.5px; font-weight: 600; color: var(--grey); line-height: 1.3; }
.fc__v { font: 600 19px var(--mono); letter-spacing: -.02em; color: var(--ink); margin: 4px 0 2px; }
.fc__stat--bad .fc__v { color: var(--flag); }
.fc__stat--good .fc__v { color: var(--gold-ink); }
.fc__s { font-size: 11px; color: var(--grey); line-height: 1.35; }

@keyframes aging-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes aging-fade { from { opacity: 0; } to { opacity: 1; } }

/* Narrow hero column and mobile: tiles go 3 + 2, then the stats stack. */
@container (max-width: 410px) {
    .aging__tiles { grid-template-columns: repeat(6, 1fr); }
    .aging__tiles .tile { grid-column: span 2; }
    .aging__tiles .tile:nth-child(4), .aging__tiles .tile:nth-child(5) { grid-column: span 3; }
}
@container (max-width: 360px) {
    .aging { padding: 18px 16px 16px; }
    .fc__stats { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------- stat band --- */

.band { background: var(--ink); color: #b9c6d2; padding: 52px 0; }
.band__in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.stat__v {
    font: 600 clamp(28px, 3vw, 38px)/1 var(--disp);
    color: var(--white); letter-spacing: -.018em; margin: 0 0 .5em;
}
.stat__v b { font-weight: 700; color: var(--gold); }
.stat__cur { font-size: .72em; font-weight: 700; color: var(--gold); margin-right: .02em; }
.stat__d { font-size: 14.5px; line-height: 1.55; margin: 0; }

/* ------------------------------------------------------------ sections --- */

.sec { padding: 84px 0; }

/* The reader's pain points, ruled like ledger lines. The red dot is the hero card's
   overdue marker: a plain statement, not a removable tag. */
.pains {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px;
    max-width: 760px; list-style: none; margin: 0; padding: 0;
}
.pains li {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 13px 0; border-top: 1px solid var(--grey-30);
    font-size: 17px; line-height: 1.4; color: var(--ink);
}
.pains li:nth-last-child(-n+2) { border-bottom: 1px solid var(--grey-30); }
.pains li::before {
    content: ""; flex: none;
    width: 7px; height: 7px; margin-top: .5em; border-radius: 50%;
    background: var(--flag);
}

/* ------------------------------------------------------- capabilities --- */

.cap { padding: 64px 0; border-top: 1px solid var(--grey-30); }
.cap__in {
    display: grid; gap: 56px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    align-items: center;
}
.cap--flip .cap__copy { order: 2; }
.cap--flip .shot { order: 1; }
.cap__copy p:last-child { margin-bottom: 0; }

.pill {
    display: inline-block;
    background: var(--wash);
    border-radius: 5px;
    padding: 7px 12px;
    font-size: 12.5px; color: var(--gold-ink);
    margin-top: .6em;
}

.shot {
    margin: 0;
    background: var(--white);
    border: 1px solid var(--grey-30);
    border-radius: 12px;
    padding: 0 0 12px;
    box-shadow: 0 24px 46px -30px rgba(20, 22, 70, .35);
    overflow: hidden;
}
.shot figcaption {
    padding: 12px 16px;
    border-bottom: 1px solid var(--grey-30);
    font-size: 10px; font-weight: 500; letter-spacing: .14em;
    text-transform: uppercase; color: var(--grey);
    text-align: center;
}

/* Drawn capability figures (Predict). These sit in the same frame as the
   captured ones, so they take the same inset, radius and ground — the card is what
   makes a drawing and a screenshot read as one rail.
   Line and fill classes carry ledger meaning, not colour names: the four ageing
   buckets, plus ink and hairline. Red is the oldest bucket and nothing else. */

.shot .engraving {
    display: block;
    width: calc(100% - 24px);
    height: auto;
    margin: 12px;
    border-radius: 7px;
    /* White, not --paper: the captured figures in this rail are screenshots of the
       application, whose own ground is #fff. A tinted ground behind the drawn ones
       would set them at a different value from the captured ones down the page. */
    background: var(--white);
}

.shot .engraving .ln-hair { fill: none; stroke: var(--grey-30);   stroke-width: 1; }
.shot .engraving .ln-a0   { fill: none; stroke: var(--age-current); stroke-width: 1; }
.shot .engraving .ln-a30  { fill: none; stroke: var(--age-d30);   stroke-width: 1; }
.shot .engraving .ln-a60  { fill: none; stroke: var(--age-d60);   stroke-width: 1; }
.shot .engraving .ln-a90  { fill: none; stroke: var(--age-d60p);  stroke-width: 1; }
.shot .engraving .fl-a0   { fill: var(--age-current); }
.shot .engraving .fl-a30  { fill: var(--age-d30); }
.shot .engraving .fl-a60  { fill: var(--age-d60); }
.shot .engraving .fl-a90  { fill: var(--age-d60p); }
.shot .engraving .fl-ink  { fill: var(--ink); }

.shot .engraving text {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .12em;
    text-transform: uppercase;
    fill: var(--grey);
}
.shot .engraving .t-i { fill: var(--ink); }

/* The drawing scales with the card, so past a point the annotations stop being
   readable. Rather than let the figure scroll inside a frame that clips, the type
   grows in user units as the drawing shrinks — the labels hold their apparent size.
   The figure is laid out with room for this. */
@media (max-width: 760px) {
    .shot .engraving text { font-size: 10px; }
}

/* Predict: Neil's treatment-paths figure (PAYD-1652). Drawn 500 wide rather than the
   engraving's original 420, so its type is set a size up to hold the same apparent size. */
.shot { position: relative; }
.shot .engraving--paths text { font-size: 9.5px; }
.shot .engraving--paths [class^="ln-a"] { stroke-width: 1.4; }
.shot .engraving--paths .bd-a0  { fill: var(--age-current); fill-opacity: .06; }
.shot .engraving--paths .bd-a30 { fill: var(--age-d30);     fill-opacity: .06; }
.shot .engraving--paths .bd-a60 { fill: var(--age-d60);     fill-opacity: .06; }
.shot .engraving--paths .bd-a90 { fill: var(--age-d60p);    fill-opacity: .06; transition: fill-opacity .6s ease; }
.shot .engraving--paths .bd-a90.is-lit { fill-opacity: .16; }

.paths__fade { opacity: 0; transition: opacity .45s ease; }
.paths__fade.is-on { opacity: 1; }
.paths__ghost { fill: var(--white); stroke: var(--age-d60); stroke-width: 1.4; stroke-dasharray: 2.5 2; }
.paths__pulse { fill: none; stroke: var(--age-d60); stroke-width: 1.5; }
.shot .engraving--paths .paths__trail { stroke: var(--age-d60p); stroke-width: 1.3; stroke-dasharray: 4 3; }
.paths__head { fill: none; stroke: var(--age-d60p); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.shot .engraving--paths .paths__pill { fill: var(--white); font-size: 9px; letter-spacing: .06em; text-transform: none; }
.shot .engraving--paths .paths__tag { font-weight: 600; }

/* Replay for the figures that play once on scroll; shown when the play-in ends. */
.replay {
    font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
    color: var(--grey); background: var(--white);
    border: 1px solid var(--grey-30); border-radius: 99px; padding: 6px 10px;
    cursor: pointer; opacity: 0; pointer-events: none;
    transition: opacity .3s, color .2s, border-color .2s;
}
.replay.is-on { opacity: 1; pointer-events: auto; }
.replay:hover { color: var(--ink); border-color: var(--grey); }
.paths__replay { position: absolute; right: 28px; bottom: 28px; }
@media (max-width: 760px) {
    .shot .engraving--paths text { font-size: 12px; }
    .shot .engraving--paths .paths__pill { font-size: 10px; }
}

/* Prioritise: Neil's My Diary (PAYD-1653). Shows the top five rather than an inner
   scroll, so the page scroll is never captured and nothing invites operating it.
   Red is lateness only; disputes take the muted navy the site has used for them. */
.diary { container-type: inline-size; padding: 12px 16px 4px; }
.diary__rule { margin: 0 0 12px; font-size: 10.5px; color: var(--grey); white-space: nowrap; }
.diary__arr {
    display: inline-block; width: 9px; height: 7px; margin: 0 2px; vertical-align: .05em;
    background: currentColor;
    clip-path: polygon(0 40%, 62% 40%, 62% 0, 100% 50%, 62% 100%, 62% 60%, 0 60%);
}
.diary__short { display: none; }

.diary__sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 16px; }
.diary__sum .tile__n { line-height: 1.3; }

.diary__head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; margin-bottom: 8px; }
.diary__head b { font-size: 11px; font-weight: 600; color: var(--grey); }
.diary__head span { font-size: 11.5px; color: var(--ink); }

.diary__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ev {
    display: grid; grid-template-columns: 18px 36px 1fr auto; gap: 9px; align-items: start;
    border: 1px solid var(--grey-30); border-radius: 10px; padding: 10px 11px;
}
.ev__no { font-size: 10px; color: var(--grey); padding-top: 9px; }
.ev__badge {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 34px; border-radius: 7px; line-height: 1.05;
    border: 1px solid #eec3b9; background: #f8e4df; color: var(--flag);
}
.ev__badge small { font-size: 7.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ev__badge strong { font: 600 11.5px var(--mono); }
.ev__main { min-width: 0; }
.ev__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.ev__tag {
    font-size: 8.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
    padding: 1px 5px; border-radius: 4px;
    background: var(--paper); color: var(--grey); border: 1px solid var(--grey-30);
}
.ev__tag--promise { background: var(--wash); color: var(--gold-ink); border-color: transparent; }
.ev__tag--dispute { background: #e8eaf3;     color: var(--ink-90);   border-color: transparent; }
.ev__desc { font-size: 11px; color: var(--grey); line-height: 1.4; margin-top: 3px; }
.ev__amt { text-align: right; white-space: nowrap; }
.ev__amt b { display: block; font: 600 12.5px var(--mono); color: var(--ink); }
.ev__amt span { font-size: 10px; color: var(--grey); }
.diary__end { text-align: center; font-size: 11px; color: var(--grey); margin: 12px 0 0; }

/* Narrow card: shorter rule, tiles stack with the figure to the right, rank number drops. */
@container (max-width: 400px) {
    .diary__sum { grid-template-columns: 1fr; }
    .diary__sum .tile { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
    .diary__sum .tile__v { margin: 0; grid-column: 2; grid-row: 1 / span 2; }
    .ev { grid-template-columns: 36px 1fr auto; }
    .ev__no { display: none; }
}
@container (max-width: 380px) {
    .diary__long { display: none; }
    .diary__short { display: inline; }
}

/* Collaborate: one account, seen by each function. The markup is credit control's view;
   the script swaps rows to another team's. A row not shared keeps its laid-out content
   (hidden) under the hatch, so every view is the same height and nothing jumps. */
.access { container-type: inline-size; padding: 14px 16px 0; }
.access__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.access__name { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.access__sub { margin: 2px 0 0; font-size: 11.5px; color: var(--grey); }
.access__bal { margin: 0; text-align: right; line-height: 1.2; }
.access__bal b { display: block; font: 600 16px var(--mono); color: var(--ink); letter-spacing: -.02em; }
.access__bal span { font-size: 10.5px; font-weight: 500; color: var(--flag); }

.access__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--grey-30); margin-bottom: 10px; }
.access__tab {
    position: relative; appearance: none; background: none; border: 0; cursor: pointer;
    font: 500 12px var(--sans); color: var(--grey); padding: 8px 4px 9px; white-space: nowrap;
}
.access__tab:hover { color: var(--ink); }
.access__tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.access__tab::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--gold); transform: scaleX(0); transform-origin: left;
}
.access__tab[aria-selected="true"]::after { transform: scaleX(1); }
/* During the tour the underline fills over each team's dwell, so the reader sees it moving on. */
.access--tour .access__tab[aria-selected="true"]::after { animation: access-dwell var(--dwell) linear both; }
@keyframes access-dwell { from { transform: scaleX(0); } }
.access__short { display: none; }

.access__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; transition: opacity .14s ease; }
.access__rows.is-swap { opacity: .25; }
.access__row {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center;
    border: 1px solid var(--grey-30); border-radius: 9px; padding: 7px 10px;
}
.access__row[data-can="act"] { border-color: #ecd68d; background: #fffcf1; }
.access__main { min-width: 0; }
.access__t { margin: 0; font-size: 12.5px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.access__t span { margin-left: 4px; font-size: 10.5px; font-weight: 500; color: var(--grey); }
.access__d { margin: 2px 0 0; font-size: 11px; line-height: 1.35; color: var(--grey); }
.access__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.access__side b { font: 600 12.5px var(--mono); color: var(--ink); }
.access__can {
    font-size: 8.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
    padding: 1px 5px; border-radius: 4px; background: var(--paper); color: var(--grey); border: 1px solid var(--grey-30);
}
.access__row[data-can="act"] .access__can { background: var(--wash); color: var(--gold-ink); border-color: transparent; }
.access__off { display: none; }
.access__row[data-can="off"] { border-style: dashed; background: repeating-linear-gradient(-45deg, #f6f7f5 0 7px, #f0f1ef 7px 14px); }
.access__row[data-can="off"] > div { visibility: hidden; }
.access__row[data-can="off"] .access__off {
    display: grid; place-items: center; position: absolute; inset: 0;
    font-size: 11px; color: var(--grey);
}
.access__count { margin: 10px 0 0; font-size: 11px; color: var(--grey); }
.access__count b { font-weight: 600; color: var(--ink); }

@container (max-width: 380px) {
    .access__long { display: none; }
    .access__short { display: inline; }
}

/* See: Neil's forecast-overdue waterfall (PAYD-1655). Static SVG so it reads without
   script; the script only builds the bars once on scroll. No tooltips: every value is
   already printed. Figures are Plex Sans, not Mono — Mono's dotted 0 reads as 8 here. */
.wf { container-type: inline-size; padding: 14px 18px 16px; }
.wf__title { margin: 0; font-size: 17px; line-height: 1.25; font-weight: 600; color: var(--ink); letter-spacing: -.01em; text-wrap: balance; }
.wf__sub { margin: 4px 0 6px; font-size: 12px; color: var(--grey); }
.wf__chart { display: block; width: 100%; height: auto; overflow: visible; }
.wf__grid line { stroke: var(--grey-30); stroke-opacity: .6; }
.wf__base { stroke: var(--grey-30); }
.wf__tick { font: 500 9.5px var(--sans); fill: var(--grey); }
.wf__lab { font: 10.5px var(--sans); fill: var(--grey); }
.wf__val { font: 600 10.5px var(--sans); fill: var(--ink); transition: opacity .4s; }
.wf__val--total { fill: var(--gold-ink); }
.wf__link { stroke: var(--grey); stroke-opacity: .5; stroke-dasharray: 2 3; transition: opacity .4s; }
.wf__bar { fill: var(--ink); transform-box: fill-box; transform-origin: bottom; }
.wf__bar--total { fill: var(--gold); }

.wf--go .wf__bar { animation: wf-rise .55s cubic-bezier(.3, .7, .2, 1) both; animation-delay: calc(var(--i) * .13s); }
.wf--pre .wf__val, .wf--pre .wf__link { opacity: 0; }
.wf--pre:not(.wf--go) .wf__bar { transform: scaleY(0); }
@keyframes wf-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.wf__say {
    display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
    margin-top: 12px; padding: 14px 16px; border-radius: 12px;
    background: var(--ink); color: #b9c6d2;
}
.wf__big { margin: 0; font: 600 28px/1 var(--mono); color: var(--gold); letter-spacing: -.03em; }
.wf__big small { display: block; margin-top: 5px; font: 500 10px/1.3 var(--sans); letter-spacing: 0; color: #b9c6d2; }
.wf__say p { margin: 0; font-size: 12.5px; line-height: 1.45; }
.wf__say strong { color: var(--white); font-weight: 600; }

/* Narrow card: the chart scales down, so its type is set up to hold its size. */
@container (max-width: 400px) {
    .wf { padding: 12px 14px 14px; }
    .wf__title { font-size: 16px; }
    .wf__lab { font-size: 13px; letter-spacing: -.02em; }
    .wf__val { font-size: 13.5px; letter-spacing: -.03em; }
    .wf__tick { font-size: 12px; }
    .wf__say { grid-template-columns: 1fr; gap: 8px; }
}

/* Connect: Neil's systems-to-one-view figure (PAYD-1656). The wires are measured from
   the live layout by script, so they re-route when the card narrows and the sources
   stack above the record. Plays once; no ambient traffic, no hover tracing. */
.conn { container-type: inline-size; }
.conn__body {
    position: relative; display: grid; align-items: center;
    grid-template-columns: minmax(122px, 144px) minmax(70px, 1fr) minmax(188px, 206px);
    padding: 22px 20px 18px;
}
.conn__wires { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.conn__wire { fill: none; stroke: var(--age-current); stroke-opacity: .3; stroke-width: 1.5; transition: stroke-opacity .25s; }
.conn__wire.is-live { stroke-opacity: 1; }
.conn__feed { stroke: var(--age-current); stroke-width: 2.5; stroke-linecap: round; }
.conn__hub-ring { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.conn__hub-ring--outer { fill: var(--white); }
.conn__hub-dot, .conn__packet { fill: var(--age-current); }
.conn__packet { stroke: var(--white); stroke-width: 1.5; }
.conn__ping { fill: none; stroke: var(--age-current); stroke-width: 1.5; }

.conn__srcs { position: relative; z-index: 1; display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; }
.conn__src {
    position: relative; padding: 8px 10px 7px; border-radius: 8px;
    background: var(--white); border: 1px solid var(--grey-30); border-left: 3px solid var(--grey-30);
    transition: border-color .3s;
}
.conn__src b { display: block; font: 600 10px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.conn__src span { display: block; margin-top: 2px; font-size: 10px; color: var(--grey); }
.conn__src.is-on { border-color: rgba(23, 128, 94, .25); border-left-color: var(--age-current); }
.conn__src.is-on::after {
    content: ""; position: absolute; right: -5px; top: 50%;
    width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
    background: var(--age-current); box-shadow: 0 0 0 3px var(--white);
}

.conn__rec {
    grid-column: 3; position: relative; z-index: 1;
    padding: 14px 14px 10px; border-radius: 14px;
    background: var(--ink); color: var(--white);
    box-shadow: 0 14px 30px -12px rgba(20, 22, 70, .55);
}
.conn__top { display: flex; justify-content: space-between; align-items: center; }
.conn__top .mono { font-size: 9.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: #b9c6d2; }
.conn__live { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--age-d30); transition: opacity .4s; }
.conn__live i { width: 6px; height: 6px; border-radius: 50%; background: var(--age-d30); box-shadow: 0 0 0 3px rgba(87, 168, 140, .2); }
.conn__name { margin: 9px 0 2px; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.conn__bal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; margin-bottom: 9px; }
.conn__bal b { font: 600 21px/1.1 var(--mono); color: var(--gold); letter-spacing: -.03em; }
.conn__bal span { font-size: 10.5px; color: #b9c6d2; white-space: nowrap; }
.conn__rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.conn__rows li {
    display: flex; justify-content: space-between; gap: 8px;
    padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 11px;
}
.conn__rows li:last-child { border-bottom: none; }
.conn__rows span { color: #b9c6d2; }
.conn__rows b { font: 500 11px var(--sans); color: rgba(255, 255, 255, .18); white-space: nowrap; transition: color .5s; }
.conn__rows b::before {
    content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 6px; vertical-align: 1px;
    border-radius: 50%; background: transparent; transition: background .3s;
}
.conn__rows li.is-on b { color: var(--white); }
.conn__rows li.is-on b::before { background: var(--age-d30); }
.conn__rows li.is-flash { animation: conn-flash 1s ease; }
@keyframes conn-flash { from { background: rgba(87, 168, 140, .22); } to { background: transparent; } }

.conn__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 18px 2px; font-size: 11.5px; color: var(--grey); }
.conn__sum { transition: opacity .5s; }
.conn__sum b { color: var(--ink); font-weight: 600; }

/* While playing in: the live badge dims and the summary waits for the last system. */
.conn--pre .conn__live { opacity: .35; }
.conn--pre .conn__sum { opacity: 0; }

@container (max-width: 470px) {
    .conn__body { grid-template-columns: 1fr; padding: 18px 14px 14px; }
    .conn__srcs { width: 64%; gap: 7px; }
    .conn__src { padding: 7px 10px 6px; }
    .conn__gap { height: 46px; }
    .conn__rec { grid-column: 1; }
    .conn__foot { padding: 0 14px 2px; }
}

/* ---------------------------------------------------------- quotes --- */

.quotes { background: var(--white); border-block: 1px solid var(--grey-30); }
.quotes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quotes blockquote {
    margin: 0; padding: 26px 24px;
    background: var(--paper);
    border-radius: 12px;
    border-top: 3px solid var(--gold);
}
.quotes blockquote p {
    font-size: 15.5px; line-height: 1.6; color: var(--ink-90);
}
.quotes cite {
    display: block; font-style: normal;
    font-size: 10.5px; letter-spacing: .07em;
    text-transform: uppercase; color: var(--grey);
}

/* ------------------------------------------------------------- about --- */

.folks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.folk {
    background: var(--white);
    border: 1px solid var(--grey-30);
    border-radius: 12px;
    padding: 28px;
}
.folk h3 { font-size: 22px; letter-spacing: -.01em; margin-bottom: .35em; }
.folk .eyebrow { margin-bottom: 1em; }
.folk__head { display: flex; align-items: center; gap: 18px; margin-bottom: 1.1em; }
.folk__head .eyebrow { margin-bottom: 0; }
.folk__img { flex: none; width: 104px; height: 104px; border-radius: 10px; background: var(--paper); }
.folk p:last-child { margin-bottom: 0; font-size: 15.5px; }

/* --------------------------------------------------------------- faq --- */

.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--grey-30); }
.faq details:last-child { border-bottom: 1px solid var(--grey-30); }
.faq summary {
    display: flex; justify-content: space-between; align-items: center; gap: 20px;
    padding: 20px 2px;
    cursor: pointer; list-style: none;
    font: 600 16.5px var(--sans); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font: 400 22px/1 var(--mono); color: var(--gold-ink);
    transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; padding-right: 40px; max-width: 62ch; }

/* -------------------------------------------------------------- book --- */

.book { background: var(--ink); color: #b9c6d2; padding: 88px 0; }
.book__in {
    display: grid; gap: 56px;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
}
.h-sec--light { color: var(--white); }
.book__copy p { max-width: 34em; }
.book__list { list-style: none; margin: 1.8em 0 0; padding: 0; font-size: 12.5px; }
.book__list li {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .14);
    letter-spacing: .04em;
}
.book__list li::before { content: "→"; color: var(--gold); }

/* Booking by email. The card is a preview of the draft the button opens: To, Subject, and
   the two prompts the mailto body pre-fills. Confirmation is ink, not green: green is the
   current ageing bucket on this page. */
.draft { background: var(--white); border-radius: 12px; padding: 6px 28px 28px; color: var(--grey); }
.draft__head { margin: 0; }
.draft__row {
    display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px;
    min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--grey-30);
}
.draft__row dt { font-size: 13px; color: var(--grey); }
.draft__row dd { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 15px; color: var(--ink); }
.draft__to { overflow-wrap: anywhere; user-select: all; }
.draft__clip {
    display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
    background: var(--white); border: 1px solid var(--grey-30); border-radius: 7px;
    color: var(--ink); cursor: pointer; transition: border-color .16s ease;
}
.draft__clip:hover, .draft__clip.is-done { border-color: var(--ink); }
.draft__ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.draft__ico--done { display: none; }
.draft__clip.is-done .draft__ico--copy { display: none; }
.draft__clip.is-done .draft__ico--done { display: block; }
.draft__status { font-size: 12.5px; color: var(--ink); }
.draft__status:empty { display: none; }
/* the prompts trail off into a dotted line, as fields left for the sender to fill */
.draft__body { padding: 20px 0 26px; font-size: 15px; color: var(--ink); }
.draft__body p { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.draft__body p:last-child { margin-bottom: 0; }
.draft__body p::after { content: ""; flex: 1; border-bottom: 1px dotted #b4b6b2; }

/* ------------------------------------------------------------- footer --- */

.foot { background: #0e1038; color: #9aa4c4; padding: 64px 0 28px; font-size: 14.5px; }
.foot__in {
    display: grid; gap: 40px;
    grid-template-columns: 1.6fr repeat(3, 1fr);
}
.foot__brand p { max-width: 26ch; margin-top: 1em; }
.foot__col { display: flex; flex-direction: column; gap: 10px; }
.foot__col h3 {
    font-size: 10px; font-weight: 600; letter-spacing: .16em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 4px;
}
.foot a { color: #cdd4e8; text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }
.foot address { font-style: normal; line-height: 1.6; }
.foot__legal {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
    margin-top: 52px; padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 11px; letter-spacing: .04em;
}
.foot__legal p { margin: 0; }

/* -------------------------------------------------------- responsive --- */

@media (max-width: 980px) {
    .hero__in,
    .cap__in,
    .book__in { grid-template-columns: 1fr; gap: 40px; }
    .cap--flip .cap__copy,
    .cap--flip .shot { order: initial; }
    .hero__dash { max-width: 520px; }
    .band__in,
    .quotes__grid,
    .folks { grid-template-columns: 1fr; gap: 28px; }
    .foot__in { grid-template-columns: 1fr 1fr; }
    .nav__links { display: none; }
    .nav__act { margin-left: auto; }
    .sec, .cap { padding: 56px 0; }
    .hero { padding: 48px 0 64px; }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    .folk__img { width: 84px; height: 84px; }
    .draft { padding: 4px 20px 22px; }
    .draft__send { width: 100%; }
    .shell, .shell--narrow { width: calc(100% - 36px); }
    .foot__in { grid-template-columns: 1fr; }
    .nav__signin { display: none; }
    .pains { grid-template-columns: 1fr; }
    .pains li:nth-last-child(2) { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
