/* Fonts are served by the portal itself: no third party sees who opens the page. */
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat.woff") format("woff"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans.woff") format("woff"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-bold.woff") format("woff"); font-weight: 700; font-display: swap; }
:root {
  --crimson: #AB1D2C; /* Dulux Salsa Red, the office wall */ --crimson-dark: #8C1622; --crimson-tint: #F8E4E6;
  --navy: #1B2A41; --bg: #F5F3F4; --card: #FFFFFF; --ink: #1A1D26; --muted: #5A5862;
  --line: #E6E1E4; --line-soft: #EFEAED; --field: #D8D1D5; --ok: #1B2A41;
  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; }
body { min-height: 100vh; }
a { color: var(--crimson); }
a:hover { color: var(--crimson-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #2D6CDF; outline-offset: 2px; }

.shell { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.mast { background: var(--crimson); color: #fff; padding-block: 14px; padding-top: max(16px, env(safe-area-inset-top, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; gap: 12px; min-height: 64px; position: sticky; top: 0; z-index: 5; }
.logo { height: 44px; width: auto; display: block; }
.brand { display: flex; flex-direction: column; }
.brand b { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.brand span { font-size: 12px; opacity: .92; letter-spacing: .06em; text-transform: uppercase; }
.mast h1 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 700; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 22px; background: rgba(255,255,255,.16); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.mast .spacer { flex: 1; }
.linkish { background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; padding: 10px 4px; font-size: 14px; }

.main { flex: 1; padding-block: 18px 28px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px; outline: none; }
.loading { color: var(--muted); }
h2 { font-family: var(--display); font-size: 19px; margin: 0; }
h3 { font-family: var(--display); font-size: 17px; margin: 0; }
.hello h1 { font-family: var(--display); margin: 0; font-size: 26px; font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
p { margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.pad { padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }

.stagecard { display: block; text-decoration: none; color: inherit; padding: 14px 16px; }
.stagecard .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.bar { display: block; height: 8px; background: #ECE7EA; border-radius: 4px; position: relative; overflow: hidden; }
.bar i { display: block; position: absolute; inset: 0 auto 0 0; background: var(--navy); border-radius: 4px; width: 0; min-width: 8px; }
.task:hover, .task:visited, .secrow:hover, .secrow:visited, .stagecard:hover { color: inherit; }
.task:hover, .secrow:hover { background: #FBF9FA; }
.stagecard .more { display: block; margin-top: 10px; font-size: 14px; color: var(--crimson); font-weight: 600; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line-soft); }
.task { width: 100%; border: 0; background: none; text-align: left; padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; min-height: 64px; color: inherit; text-decoration: none; }
.task .txt { flex: 1; display: flex; flex-direction: column; }
.task .t { font-weight: 600; }
.task .s { font-size: 14px; color: var(--muted); }
.dot { width: 32px; height: 32px; flex: none; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.dot.todo { border: 2px solid var(--crimson); color: var(--crimson); }
.dot.done { background: var(--ok); color: #fff; }
.chev { color: #8A8388; flex: none; }

.alldone { background: var(--navy); color: #fff; border-radius: 14px; padding: 16px; }
.alldone b { font-family: var(--display); font-size: 18px; display: block; margin-bottom: 4px; }

.contact .avatar { width: 56px; height: 56px; border-radius: 28px; background: var(--crimson-tint); color: var(--crimson); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; flex: none; object-fit: cover; }
.team { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.team li { display: flex; align-items: center; gap: 12px; line-height: 1.35; }
.pill { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--crimson-tint); color: var(--crimson-dark); font-size: 12px; font-weight: 600; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--crimson); background: var(--crimson); color: #fff; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; flex: 1; text-align: center; }
.btn:hover { background: var(--crimson-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--field); }
.btn.secondary:hover { background: #faf8f9; color: var(--ink); }
.btn.big { min-height: 54px; font-size: 17px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.sm { min-height: 44px; flex: none; padding: 0 16px; font-size: 15px; }
.btn.outline { background: #fff; color: var(--crimson); }

.legal { font-size: 12px; line-height: 1.5; color: #6B6569; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > legend, .qlabel { font-weight: 500; font-size: 15px; }
.hint { font-size: 13px; color: var(--muted); }
.input, select.input, textarea.input { min-height: 48px; border: 1px solid var(--field); border-radius: 10px; padding: 10px 12px; background: #fff; width: 100%; }
textarea.input { min-height: 96px; resize: vertical; }
.money { position: relative; }
.money .input { padding-left: 28px; }
.money::before { content: "£"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.yn { display: flex; gap: 10px; }
.yn label { flex: 1; position: relative; }
.yn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.yn span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--field); border-radius: 10px; background: #fff; font-weight: 600; cursor: pointer; }
.yn input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.yn input:focus-visible + span { outline: 3px solid #2D6CDF; outline-offset: 2px; }
.repeat { border: 1px dashed var(--field); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.repeat-head { display: flex; justify-content: space-between; align-items: center; }
.textbtn { background: none; border: 0; color: var(--crimson); font-weight: 600; cursor: pointer; padding: 10px 0; min-height: 44px; text-align: left; }
.applicant-note { background: var(--crimson-tint); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.saved { font-size: 13px; color: var(--muted); min-height: 18px; }
.errorbox { background: #FBEAEA; color: #7A1020; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.infobox { background: #EAF0F8; color: #18304F; border-radius: 10px; padding: 10px 12px; font-size: 14px; }

.secrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; min-height: 56px; }
.secrow .state { font-size: 14px; color: var(--muted); white-space: nowrap; }
.secrow .state.ok { color: var(--ok); font-weight: 600; }

.doc { padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.doc .txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.doc .t { font-weight: 600; }
.doc .s { font-size: 14px; color: var(--muted); }
.doc .status { font-size: 14px; font-weight: 600; color: var(--ok); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.doc .status.resend { color: var(--crimson); }
.filepick { position: relative; }
.filepick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

.tl > li { display: flex; gap: 14px; padding: 12px 16px; }
.tl .mark { width: 28px; height: 28px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.tl .mark.done { background: var(--ok); color: #fff; }
.tl .mark.now { background: var(--crimson); box-shadow: 0 0 0 4px var(--crimson-tint); }
.tl .mark.later { border: 2px solid #CFC7CC; }
.tl .txt { display: flex; flex-direction: column; }

.fee { padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; }
.fee .amt { font-family: var(--display); font-weight: 800; font-size: 38px; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.tabs { position: sticky; bottom: 0; display: flex; background: #fff; border-top: 1px solid var(--line); padding: 6px 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.tabs a, .tabs button { flex: 1; min-height: 52px; border: 0; background: none; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; }
.tabs [aria-current="page"] { color: var(--crimson); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); z-index: 10; }

.login { padding-top: 24px; }
.login h2 { font-size: 26px; font-weight: 800; }
.code-input { letter-spacing: .3em; font-size: 22px; text-align: center; }

@media (min-width: 600px) { .shell { box-shadow: 0 0 0 1px var(--line); } }
.locked .task { cursor: default; min-height: 52px; padding-block: 10px; color: var(--muted); }
.locked .task:hover { background: none; }
.dot.lock { background: #EFEAED; color: var(--muted); }
.mortgage .mhead { font-size: 22px; text-wrap: balance; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.stats div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.stats dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.review { background: var(--crimson-tint); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.rems { border: 1px solid var(--line); border-radius: 12px; }
.rem { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 14px; font-variant-numeric: tabular-nums; }
.rem.sent { color: var(--muted); }
.rem.next { font-weight: 600; }

/* ---------- computers: sidebar layout ---------- */
.aside { display: none; }
.desktop-only { display: none; }
.body { flex: 1; display: flex; flex-direction: column; }
.nowrap { white-space: nowrap; }
.sidenav { display: flex; flex-direction: column; padding: 6px; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.navlink:hover { background: var(--bg); color: var(--ink); }
.navlink[aria-current="page"] { background: var(--crimson-tint); color: var(--crimson); font-weight: 600; }
.navlink.plain { padding-left: 4px; color: var(--muted); }
.navlink.sec { align-items: flex-start; }
.navlink.sec > span:last-child { line-height: 1.3; }
.dot.small { width: 24px; height: 24px; font-size: 12px; border-width: 2px; flex: none; }
.minitl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.minitl .mini { display: flex; gap: 12px; padding: 7px 0; position: relative; font-size: 14px; line-height: 1.35; }
.minitl .mini:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 30px; bottom: -6px; width: 2px; background: var(--line); }
.minitl .mk { width: 22px; height: 22px; flex: none; border-radius: 11px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; background: var(--card); }
.minitl .done .mk { background: var(--ok); color: #fff; }
.minitl .done .mk svg { width: 12px; height: 12px; }
.minitl .now .mk { background: var(--crimson); box-shadow: 0 0 0 3px var(--crimson-tint); }
.minitl .later .mk { border: 2px solid #CFC7CC; }
.minitl .later b { font-weight: 500; color: var(--muted); }

@media (min-width: 960px) {
  .shell { max-width: 1200px; box-shadow: none; }
  .mobile-only { display: none !important; }
  .desktop-only { display: inline-flex; align-items: center; }
  .mast { gap: 20px; border-radius: 0 0 16px 16px; }
  .mast h1 { font-size: 20px; padding-left: 20px; border-left: 1px solid rgba(255,255,255,.35); }
  .tabs { display: none !important; }
  .body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; padding-block: 24px 40px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); align-items: start; }
  .shell:not(.has-aside) .body { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; width: 100%; }
  .aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }
  .main { padding: 0; max-width: 760px; }
  .hello h1 { font-size: 32px; }
}
.tl .txt { gap: 2px; }
.tl-action { margin-top: 8px; align-self: flex-start; }
.fileicon { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--crimson-tint); color: var(--crimson); display: flex; align-items: center; justify-content: center; }
.rows { margin: 0; display: flex; flex-direction: column; }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.rows div:first-child { border-top: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; font-weight: 600; text-align: right; }
.dot.navdot { background: var(--crimson-tint); color: var(--crimson); }
.dot.navdot svg { width: 18px; height: 18px; }
.ovhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ovtotal { font-family: var(--display); font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; }
.ovtotal small { font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--muted); }
.overview .rows dt a { color: var(--ink); text-decoration: none; }
.overview .rows dt a:hover { color: var(--crimson); text-decoration: underline; }
.linkcard { text-decoration: none; color: var(--ink); }
.linkcard:hover { color: var(--ink); filter: brightness(.98); }
@media (min-width: 960px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Timeline at a glance, typical timings and plain-English explanations */
.usually { display: block; color: var(--navy); font-weight: 500; margin-top: 2px; }
details.explain { margin-top: 6px; font-size: 14px; }
details.explain summary { cursor: pointer; color: var(--crimson); font-weight: 600; min-height: 44px; display: flex; align-items: center; list-style: none; }
details.explain summary::-webkit-details-marker { display: none; }
details.explain summary::before { content: "+"; display: inline-block; width: 18px; font-weight: 700; }
details.explain[open] summary::before { content: "\2212"; }
details.explain p { margin: 0 0 4px 18px; color: var(--muted); }
details.allsteps { padding: 0; }
details.allsteps > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--crimson); min-height: 44px; list-style: none; }
details.allsteps > summary::-webkit-details-marker { display: none; }
details.allsteps[open] > summary { border-bottom: 1px solid var(--line-soft); }

/* Postcode finder */
.lookup-row { display: flex; gap: 8px; }
.lookup-row .input { flex: 1; min-width: 0; text-transform: uppercase; }
.lookup-row .btn { flex: none; min-width: 88px; }
.lookup-results:empty { display: none; }
.lookup-results .input { margin-top: 8px; }

/* Documents */
.doc.needs { background: var(--crimson-tint); }
.resend { color: var(--crimson-dark); }
.resend b { font-weight: 600; }

/* After completion */
.claim h3, .refer h3 { margin: 0; }

/* Required answers */
.field.invalid .input, .field.invalid .yn span { border-color: var(--crimson); box-shadow: 0 0 0 1px var(--crimson); }
.fielderror { color: #7A1020; font-size: 14px; font-weight: 600; }
.problems { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.problems .btn { margin-top: 2px; }

/* Sign-in and welcome */
.loginhero { text-align: center; align-items: center; padding: 8px 0 4px; }
.loginhero h2, .welcome h2 { font-size: 26px; line-height: 1.15; margin: 0; }
.faces { display: flex; justify-content: center; }
.faces img, .faces .avatar { width: 44px; height: 44px; border-radius: 22px; border: 3px solid var(--bg); margin-left: -10px; object-fit: cover; background: var(--crimson-tint); }
.faces img:first-child, .faces .avatar:first-child { margin-left: 0; }
.welcome .faces .avatar { width: 64px; height: 64px; border-radius: 32px; display: flex; align-items: center; justify-content: center; color: var(--crimson); font-family: var(--display); font-weight: 700; }
.welcome { align-items: stretch; }
.welcome > .faces, .welcome > h2, .welcome > .lead { text-align: center; }
.lead { font-size: 17px; color: var(--muted); margin: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li svg { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 11px; background: var(--crimson); color: #fff; margin-top: 1px; }
.login .card h3 { margin: 0; }
@media (min-width: 960px) {
  .login, .welcome { max-width: 460px; margin-inline: auto; width: 100%; }
}

/* Home screen tip and joint applicants */
.installtip .row { display: flex; gap: 12px; align-items: center; }
.installtip img { border-radius: 10px; flex: none; }
svg.inline { vertical-align: -3px; margin: 0 3px; }
.partner h3 { margin: 0; }
.partnerdone { display: flex; gap: 6px; align-items: center; color: var(--navy); margin: 0; }
.teamphoto { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; display: block; box-shadow: 0 6px 20px rgba(27, 42, 65, 0.18); }
@media (min-width: 960px) { .login { max-width: 520px; } }
/* Computers: team photo on the left, sign-in on the right, all above the fold */
@media (min-width: 960px) {
  .login:has(.teamphoto) { max-width: 1040px; display: grid; grid-template-columns: 1.25fr 1fr; column-gap: 40px; row-gap: 14px; align-items: start; padding-top: 12px; }
  .login:has(.teamphoto) > .loginhero { grid-column: 1; grid-row: 1 / span 4; text-align: left; align-items: stretch; }
  .login:has(.teamphoto) > :not(.loginhero) { grid-column: 2; }
  .login:has(.teamphoto) > form { margin-top: 0; }
}
@media (min-width: 960px) {
  .shell:not(.has-aside):has(.teamphoto) .body { max-width: 1000px; }
  .shell:not(.has-aside):has(.teamphoto) .main { max-width: none; }
}
.wholeteam { display: flex; flex-direction: column; gap: 10px; }
.teamphoto.small { border-radius: 10px; box-shadow: none; }

/* Day / Month / Year boxes */
.dateparts { display: flex; gap: 10px; }
.datepart { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.datepart.d, .datepart.m { width: 64px; }
.datepart.y { width: 92px; }
.datepart .input { text-align: center; }

/* Section progress, carried answers, done screens */
.secprogress { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.secprogress .bar { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.secprogress .bar i { display: block; height: 100%; background: var(--crimson); border-radius: 3px; }
details.carried { padding: 0; }
details.carried > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 10px; min-height: 44px; }
details.carried > summary::-webkit-details-marker { display: none; }
details.carried > summary::after { content: "Check"; margin-left: auto; color: var(--crimson); font-weight: 600; font-size: 14px; }
details.carried[open] > summary::after { content: "Hide"; }
details.carried > summary::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 11px; background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center no-repeat; }
.carried-body { padding: 0 16px 16px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.donescreen { text-align: center; align-items: center; }
.donescreen > .stack, .donescreen > .card, .donescreen > .btn { width: 100%; text-align: left; }
.bigtick { width: 64px; height: 64px; border-radius: 32px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; }
.bigtick svg { width: 32px; height: 32px; }
@media (min-width: 960px) { .donescreen { max-width: 520px; margin-inline: auto; width: 100%; } }
.files { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.files li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.files .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.files .textbtn { min-height: 44px; font-size: 14px; }

/* Milestones on the home screen */
.milestones { display: block; text-decoration: none; color: inherit; padding: 16px 12px 14px; }
.milestones:hover, .milestones:visited { color: inherit; }
.milestones ol { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.milestones li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 2px; }
.milestones li:not(:first-child)::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.milestones li.done:not(:first-child)::before, .milestones li.next:not(:first-child)::before { background: var(--navy); }
.milestones li.next:not(:first-child)::before { background: linear-gradient(90deg, var(--navy), var(--line)); }
.ms-dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: var(--card); border: 3px solid #CFC7CC; }
.done .ms-dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.next .ms-dot { border-color: var(--crimson); box-shadow: 0 0 0 4px var(--crimson-tint); }
.ms-label { font-family: var(--display); font-weight: 700; font-size: 13px; line-height: 1.2; }
.later .ms-label { color: var(--muted); font-weight: 600; }
.ms-date { font-size: 12px; color: var(--muted); }
.next .ms-date { color: var(--crimson); font-weight: 600; }
.milestones .more { display: block; margin-top: 12px; text-align: center; font-size: 14px; color: var(--crimson); font-weight: 600; }
@media (min-width: 960px) { .ms-label { font-size: 15px; } .ms-date { font-size: 13px; } .milestones { padding: 20px 16px 16px; } }
.tips .ticks { margin: 4px 0 2px; gap: 6px; }
.tips .ticks li svg { width: 18px; height: 18px; padding: 3px; }

/* Pick up where you left off */
.continue { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; border: 2px solid var(--crimson); }
.continue:hover, .continue:visited { color: inherit; }
.continue > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.continue .eyebrow { color: var(--crimson); }
.continue b { font-family: var(--display); font-size: 17px; }

/* Polish: documents on phones, partner items, empty states */
.partnerdoc { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--navy); }
@media (max-width: 599px) {
  .doc { flex-wrap: wrap; align-items: flex-start; }
  .doc .txt { flex: 1 1 100%; }
  .doc > .filepick { margin-left: 0; }
  .doc > .status { order: -1; margin-left: auto; }
  .doc:has(> .status) .txt { flex-basis: calc(100% - 110px); order: -2; }
}
.empty h2 { margin: 0; font-size: 20px; }
.ticks.soon li svg { background: var(--line); color: var(--muted); }
.partnerline { margin: -4px 4px 0; color: var(--muted); }
.partnerline .textbtn { display: inline; min-height: 0; padding: 12px 0; margin: -12px 0; /* 44px tap area without breaking the line */ font-size: inherit; color: var(--crimson); font-weight: 600; text-decoration: underline; }

/* Demo-only team view (stands in for the Tasks table in Airtable) */
ul.plain { list-style: none; margin: 0; padding: 0; }
.teamtask ul.files { margin: 0; padding-left: 18px; }
label.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
label.check input { width: 22px; height: 22px; accent-color: var(--crimson); }

/* Documents: one summary, then To send / With us / Checked */
.docsummary { display: grid; gap: 6px; padding: 16px; border-radius: var(--radius, 12px); background: #fff; border: 1px solid var(--line); }
.docsummary b { font-family: Montserrat, sans-serif; font-size: 18px; }
.docsummary.done { background: var(--ok-tint, #E8F4EC); border-color: transparent; }
.docsummary .bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.docsummary .bar i { display: block; height: 100%; background: var(--crimson); border-radius: 3px; }
.doc.ask { background: #FFF8E6; }
.doc.ask .btnrow { margin-top: 10px; }
.doc .textbtn.filepick { margin-top: 6px; }
.doc .status.muted { color: var(--muted); }
.checkedlist > summary { padding: 14px 16px; min-height: 44px; display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ok); cursor: pointer; }
.homelink { display: inline-flex; align-items: center; min-height: 44px; }
label.check input { flex: none; }
label.check { align-items: flex-start; }
label.check input { margin-top: 2px; }
.consent .optional { border-top: 1px solid var(--line); padding-top: 12px; }
.consent .optional label.check span { font-weight: 400; }
.consent label.check span { font-weight: 500; line-height: 1.45; }
.field.confirm label.check span { font-weight: 500; line-height: 1.45; }
.appt h2 { font-size: 22px; }
.appt .eyebrow { color: var(--crimson); }
.csteps .cstep { display: flex; gap: 12px; align-items: flex-start; }
.csteps .cstep .txt { display: grid; gap: 2px; }
ol.csteps { list-style: none; margin: 0; padding: 0; }

/* =========================================================================
   Visual layer (Nov 2026 refresh)
   One bold move: the team photo on sign-in and a crimson case header on the
   overview. Everything else is quieter: white top bar, softer cards, sentence-case labels.
   ========================================================================= */

/* Top bar: white, crimson logo, sits on a hairline */
.mast { background: rgba(255,255,255,.96); color: var(--ink); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.mast h1 { color: var(--ink); }
.logo { height: 38px; }
.icon-btn { background: var(--bg); color: var(--ink); }
.linkish { color: var(--muted); font-weight: 500; text-decoration: none; }
.linkish:hover { color: var(--crimson); text-decoration: underline; }

/* Cards: a touch more air and a softer edge; lists keep their hairlines */
.card { border-radius: 16px; border-color: #E9E4E7; }
.pad { padding: 18px; }
h2 { font-size: 20px; letter-spacing: -0.01em; }
.eyebrow { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--crimson); }
.stats dt { text-transform: none; letter-spacing: 0; font-size: 13px; }
.btn { border-radius: 12px; font-weight: 600; letter-spacing: .005em; transition: box-shadow .15s ease; }
.btn:not(.secondary):not(.outline) { background: #A51B2A linear-gradient(180deg, #BC2233, #A51B2A); border-color: #951826; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 4px 12px -4px rgba(171,29,44,.5); }
.btn:not(.secondary):not(.outline):hover { background: #8C1622 linear-gradient(180deg, #A51B2A, #8C1622); }
.btn.big { min-height: 56px; }
.input, select.input, textarea.input { min-height: 52px; border-radius: 12px; border-color: #D6CFD3; transition: border-color .15s ease, box-shadow .15s ease; }
.input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27,42,65,.12); outline: none; }
.dot.todo { border-width: 2px; }

/* Overview: crimson case header with the journey inside it */
.hero { background: linear-gradient(140deg, #C8253A 0%, #AB1D2C 50%, #8E1622 100%); color: #fff; box-shadow: 0 10px 30px -12px rgba(142,22,34,.55); border-radius: 0 0 24px 24px; margin: -18px -16px 4px; padding: 22px 16px 18px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.hero::after { content: none; }
.hero .hello h1 { color: #fff; font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; }
.hero .hello p { color: rgba(255,255,255,.82); margin-top: 6px; }
.hero.solo { padding-bottom: 24px; }
.hero .milestones { background: rgba(70,6,14,.2); border: 1px solid rgba(255,255,255,.12); color: #fff; border-radius: 16px; position: relative; z-index: 1; }
.hero .milestones li:not(:first-child)::before { background: rgba(255,255,255,.22); }
.hero .milestones li.done:not(:first-child)::before { background: #fff; }
.hero .milestones li.next:not(:first-child)::before { background: linear-gradient(90deg, #fff, rgba(255,255,255,.22)); }
.hero .ms-dot { background: #93182A; border-color: rgba(255,255,255,.45); }
.hero .done .ms-dot { background: #fff; border-color: #fff; color: var(--crimson); }
.hero .next .ms-dot { background: #fff; border-color: #fff; box-shadow: 0 0 0 5px rgba(255,255,255,.22); }
.hero .later .ms-label { color: rgba(255,255,255,.66); }
.hero .ms-date, .hero .next .ms-date { color: rgba(255,255,255,.8); }
.hero .next .ms-date { color: #fff; font-weight: 700; }
.hero .milestones .more { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.5); }

/* Sign in: the team photo is the page */
.shell.bare { max-width: none; background: #fff; }
.shell.bare .mast, .shell.bare .tabs, .shell.bare .aside { display: none !important; }
.shell.bare .body { display: block; padding: 0; max-width: none; margin: 0; }
.shell.bare .main { padding: 0; max-width: none; gap: 0; }
.signin { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #fff; }
.signin-hero { position: relative; min-height: 280px; height: clamp(280px, 82vw, 440px); max-height: 500px; display: flex; flex-direction: column; justify-content: flex-end; padding: max(18px, env(safe-area-inset-top, 0px)) 20px 44px; color: #fff; overflow: hidden; isolation: isolate; }
.signin-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 30%; z-index: -2; }
.signin-brand { width: 220px; height: auto; display: block; margin: 0 auto 10px; }
.signin-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,12,20,.45) 0%, rgba(10,12,20,0) 24%, rgba(10,12,20,.2) 50%, rgba(10,12,20,.9) 100%); }
.signin-copy { display: flex; flex-direction: column; gap: 14px; max-width: 34ch; }
.signin-copy h1 { font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1.04; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.signin-points { display: none; }
.signin-panel { flex: 1; background: #fff; border-radius: 24px 24px 0 0; margin-top: -24px; position: relative; padding: 28px 20px max(24px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 28px; }
.signin-inner { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 400px; margin: 0 auto; }
.signin-form { gap: 14px; }
.signin-form h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.signin-form .muted { font-size: 15px; }
.signin-form .field { margin-top: 4px; }
.signin-new { color: var(--muted); }
.signin-panel .legal { max-width: 400px; margin: auto auto 0; width: 100%; color: #7A7480; }
.code-input { font-family: var(--display); font-weight: 700; letter-spacing: .4em; }

@media (min-width: 960px) {
  .shell { max-width: none; }
  .mast { padding-inline: max(24px, calc((100vw - 1200px) / 2 + 24px)); min-height: 72px; border-radius: 0; }
  .logo { height: 42px; }
  .mast h1 { border-left-color: var(--line); }
  .body { max-width: 1200px; margin: 0 auto; width: 100%; }
  .shell:not(.has-aside):not(.bare) .body { max-width: 560px; }
  .hero { margin: 0 0 4px; border-radius: 20px; padding: 28px 28px 22px; gap: 22px; }
  .hero .hello h1 { font-size: 36px; }

  .signin { flex-direction: row; min-height: 100vh; }
  .signin-hero { flex: 1.25; height: auto; max-height: none; min-height: 100vh; padding: 36px 48px 48px; }
  .signin-hero::after { background: linear-gradient(180deg, rgba(10,12,20,.4) 0%, rgba(10,12,20,0) 20%, rgba(10,12,20,0) 48%, rgba(10,12,20,.88) 100%); }
  .signin-photo { object-position: 60% 40%; }
  .signin-brand { width: 320px; margin: 0 auto 28px; }
  .signin-copy { max-width: 560px; gap: 20px; }
  .signin-copy h1 { font-size: 60px; }
  .signin-points { display: flex; list-style: none; margin: 0; padding: 0; flex-direction: column; gap: 10px; font-size: 17px; }
  .signin-points li { display: flex; gap: 12px; align-items: center; }
  .signin-points svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; flex: none; }
    .signin-panel { flex: 1; margin: 0; border-radius: 0; padding: 48px; justify-content: center; }
  .signin-inner { margin: auto; }
  .signin-form h2 { font-size: 30px; }
  .signin-panel .legal { margin: 0 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .signin-copy { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
/* Sign-in: logo, heading and help text centred over the form */
.signin-form > h2, .signin-form > p.muted, .signin-new { text-align: center; }

/* Sturgess Club: member card in the Club launch colours (deep red, gold rule), then the perks */
.club { --club-red: #7D1619; --club-gold: #D4AF5F; --club-cream: #FBF8F1; --club-pink: #EBD3D3; }
.clubcard { container-type: inline-size; max-width: 440px; aspect-ratio: 856 / 540; background: var(--club-red); color: var(--club-cream); border-radius: 18px; padding: 2.6cqw; box-sizing: border-box; box-shadow: 0 10px 28px rgba(125, 22, 25, .28); }
.clubinner { height: 100%; box-sizing: border-box; border: 1.5px solid var(--club-gold); border-radius: 11px; padding: 5.5cqw 6cqw; display: flex; flex-direction: column; justify-content: space-between; }
.clubtop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.clubtop img { width: 34cqw; height: auto; display: block; }
.clubtag { font-family: Montserrat, sans-serif; font-weight: 700; font-size: max(11px, 2.4cqw); letter-spacing: .22em; text-transform: uppercase; color: var(--club-gold); border: 1.5px solid var(--club-gold); padding: .6em .55em .6em .8em; line-height: 1; }
.clubmid { display: flex; flex-direction: column; gap: 2.4cqw; }
.club .clubname { font-family: Cinzel, Montserrat, serif; font-weight: 700; font-size: 9cqw; line-height: 1; letter-spacing: .04em; color: var(--club-gold); margin: 0; }
.clubrule { width: 10cqw; height: 1.5px; background: var(--club-gold); }
.clubfoot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.clubfoot > div { display: flex; flex-direction: column; gap: 1.4cqw; min-width: 0; }
.clubfoot .r { align-items: flex-end; text-align: right; }
.clublbl { font-family: Montserrat, sans-serif; font-weight: 600; font-size: max(10px, 1.9cqw); letter-spacing: .2em; text-transform: uppercase; color: var(--club-pink); line-height: 1; }
.clubval { font-family: Montserrat, sans-serif; font-weight: 600; font-size: max(15px, 3.8cqw); letter-spacing: .06em; line-height: 1.1; overflow-wrap: anywhere; }
.clubperks summary { min-height: 44px; display: flex; align-items: center; padding: 0 16px; cursor: pointer; font-weight: 600; }
.clubperks ul { list-style: none; margin: 0; padding: 0 16px; }
.clubperks li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line, #E6E1DA); }
.clubperks li b { color: var(--club-red); }
.clubperks p { padding: 4px 16px 16px; }
.hero .clubbadge { display: inline-block; margin-top: 12px; font-family: Montserrat, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #93712A 0%, #7E601D 100%); border: 1.5px solid #D4AF5F; border-radius: 4px; padding: 8px 11px; line-height: 1; box-shadow: 0 2px 8px rgba(0,0,0,.18); }

/* Referral thank you and the protection review invitation */
.refer .referthanks { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--crimson-tint); color: var(--ink); font-size: 15px; line-height: 1.45; }
.refer .referthanks b { color: var(--crimson-dark); }
.protectreview h2 { margin: 0; }
.protectreview .btnrow { flex-direction: column; } .protectreview .btnrow .btn { width: 100%; }

/* Your home today: estimated value from the UK House Price Index */
.homevalue .hvalue { font-family: Montserrat, sans-serif; font-size: 30px; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }

/* Early repayment charge on the mortgage page */
.erc { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.erc h4 { margin: 0; font-size: 16px; }

/* Touch targets: at least 44px tall everywhere (audit 20 Nov 2026) */
.linkish { min-height: 44px; display: inline-flex; align-items: center; }
.overview .rows dt a { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }
.sidecard-more, a.small[href="#/progress"] { display: inline-flex; align-items: center; min-height: 44px; }
.partnerline .textbtn { padding: 13px 0; margin: -13px 0; }

/* Sign-in buttons while the request is out: a small spinner and no repeat taps */
.btn.busy { cursor: progress; opacity: .85; }
.btn.busy::before { content: ""; width: 16px; height: 16px; margin-right: 10px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.busy::before { animation: none; } }
