/* Client portal: every page in portal/. Self-contained: it doesn't use site.css.
   First part: the design from the "2PeakGrowth Portal Mock" K approved. */
/* Layout: an app shell. Navy side menu on desktop, bottom tabs on phones, one clear next step on Home.
   A single light look on the Rainier morning colors: status always has words and a shape, never color alone. */
:root {
  --navy: #0B1B33; --navy-2: #142A4C; --navy-3: #1E3A63;
  --blue: #2563EB; --blue-dark: #1D4ED8; --blue-soft: #E6EEFE;
  --sky: #A9CBFC; --glacier: #EAF2F7; --glacier-2: #DCE8F1; --sunrise: #E58E5A; --sunrise-soft: #FCEBDF;
  --surface: #FFFFFF; --ink: #0B1B33; --text: #3D4A5C; --muted: #566273; --line: #D6E2EC; --line-2: #BCCDDB;
  --good: #1F5F3F; --good-soft: #E4F3EB; --warn: #7A4B00; --warn-soft: #FFF3DC; --bad: #8A1C1C; --bad-soft: #FDECEC;
  --head: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side: 248px; --tabs: 68px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--glacier); color: var(--text); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ol, ul, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(27px, 3.4vw, 36px); font-weight: 800; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
h4 { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--blue-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.on-navy :focus-visible { outline-color: #fff; }
svg { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: 10px; border: 1.5px solid transparent; font: 600 15.5px/1.2 var(--body); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-main { background: var(--blue); color: #fff; }
.btn-main:hover:not(:disabled) { background: var(--blue-dark); }
.btn-line { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--glacier); }
.btn-small { min-height: 38px; padding: 7px 13px; font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--blue-dark); text-decoration: underline; cursor: pointer; }

/* App shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--navy); color: #DCE7F3; display: flex; flex-direction: column; overflow: hidden; }
.side-in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 26px; height: 100%; padding: 24px 14px 20px; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; font: 800 19px var(--head); letter-spacing: -.02em; color: #fff; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo b { color: var(--sky); font-weight: 800; }
.logo.dark { color: var(--ink); }
.logo.dark b { color: var(--blue); }
.who { padding: 0 8px; }
.who strong { display: block; font: 700 15px/1.3 var(--head); color: #fff; }
.who span { font-size: 13px; color: #B9C9DC; }
.nav { display: grid; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: #DCE7F3; font-weight: 500; font-size: 15px; text-align: left; cursor: pointer; transition: background .15s; }
.nav a:hover { background: var(--navy-2); }
.nav a[aria-current=page] { background: #fff; color: var(--navy); font-weight: 600; }
.nav svg { width: 20px; height: 20px; flex: none; }
.side-foot { margin-top: auto; padding: 0 8px; display: grid; gap: 10px; font-size: 13px; }
.side-foot .linkish { color: #fff; text-align: left; }
.side .firs { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; opacity: .55; pointer-events: none; }

.topbar { display: none; }
.main { min-width: 0; padding: 36px 40px 64px; }
.page { max-width: 1040px; margin: 0 auto; display: grid; gap: 22px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 20px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.ref { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.staff { background: var(--navy-3); color: #fff; text-align: center; font-size: 13px; padding: 6px 12px; }

.tabs { display: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; min-width: 0; }
.panel > h2, .panel > h3 { margin-bottom: 6px; }

/* Your next step */
.next { position: relative; overflow: hidden; background: var(--navy); color: #DCE7F3; border-radius: 20px; padding: 30px 32px 34px; display: grid; gap: 12px; justify-items: start; }
.next > * { position: relative; z-index: 1; }
.next .firs { position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; }
.eyebrow { font: 600 13px var(--body); letter-spacing: .04em; color: #F4B48D; display: flex; gap: 8px; align-items: center; }
.eyebrow svg { width: 16px; height: 16px; }
.next h2 { color: #fff; font-size: clamp(24px, 3vw, 31px); font-weight: 800; max-width: 22em; }
.next p { max-width: 42em; }
.next .row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 6px; }
.meter { display: flex; align-items: center; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.meter .bar { width: 120px; background: rgba(255,255,255,.2); margin: 0; }
.meter .bar i { background: #fff; }
.bar { height: 8px; background: var(--glacier-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .4s; }

/* The climb: the build as an ascent, with Live at the summit */
.climb { position: relative; }
.climb-chart { position: relative; height: 150px; margin: 8px 0 4px; }
.climb-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stop { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); }
.stop svg { position: static; width: 100%; height: 100%; }
.stop.now { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.stop.now::after { content: ''; position: absolute; inset: -7px; border: 2px solid var(--sunrise); border-radius: 50%; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.85); opacity: 1; } 80%, 100% { transform: scale(1.25); opacity: 0; } }
.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.stages li { text-align: center; padding: 0 2px; min-width: 0; }
.stages strong { display: block; font: 700 14px/1.3 var(--head); color: var(--ink); }
.stages span { display: block; font-size: 13px; color: var(--muted); }
.stages li.upcoming strong { font-weight: 600; color: var(--muted); }
.stages li.now span { color: var(--ink); font-weight: 600; }
.stage-icon { display: none; }
.climb-help { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

.two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tiles { display: grid; gap: 10px; }
.tiles-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.next .next-note { font-size: 13.5px; color: #C9D6E6; margin-top: -2px; }
.tile { display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 14px; align-items: center; width: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--ink); transform: translateY(-1px); }
.tile .ic { width: 40px; height: 40px; display: grid; place-items: center; background: var(--glacier); border-radius: 10px; color: var(--navy); }
.tile .ic svg { width: 21px; height: 21px; }
.tile strong { display: block; font: 700 15px/1.3 var(--head); color: var(--ink); }
.tile span.t { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.tile .go { width: 18px; height: 18px; color: var(--muted); }


/* Status: a shape plus words */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; border-radius: 99px; padding: 3px 10px 3px 7px; background: var(--glacier); color: var(--ink); }
.status svg { width: 15px; height: 15px; flex: none; }
.status.done { background: var(--good-soft); color: var(--good); }
.status.prog { background: var(--blue-soft); color: var(--blue-dark); }
.status.no { background: var(--bad-soft); color: var(--bad); }

/* Forms */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .lbl { font-weight: 600; font-size: 14px; color: var(--ink); }
.hint { font-size: 13.5px; color: var(--muted); }
input[type=text], input[type=email], select, textarea { width: 100%; min-height: 46px; padding: 11px 13px; background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); border-radius: 10px; font-size: 16px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.16); }
::placeholder { color: #6B7787; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-stack { display: grid; gap: 18px; margin-top: 18px; }
.subhead { font: 700 16px var(--head); color: var(--ink); }

/* Sign-in */
.signin { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.signin-art { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--navy) 55%, var(--navy-2)); color: #DCE7F3; padding: 40px clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.signin-art > * { position: relative; z-index: 1; }
.signin-art .firs { position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 58%; pointer-events: none; }
.signin-art h1 { color: #fff; font-size: clamp(32px, 4.4vw, 50px); max-width: 11em; }
.signin-art p { margin-top: 14px; max-width: 28em; font-size: 17px; }
.signin-art .logo { padding: 0; }
.signin-form { display: grid; place-items: center; padding: 40px 24px; }
.signin-box { width: 100%; max-width: 400px; display: grid; gap: 16px; }
.signin-box h2 { font-size: 28px; font-weight: 800; }
.signin-box .btn { width: 100%; }
.code-input { font: 700 24px var(--head) !important; letter-spacing: .28em; text-align: center; }

/* Standalone pages */
.alone { min-height: 100vh; display: grid; place-items: center; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); position: relative; overflow: hidden; }
.alone .firs { position: absolute; left: 0; right: 0; bottom: 0; height: 200px; pointer-events: none; }
.alone-box { position: relative; z-index: 1; width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 34px; display: grid; gap: 14px; justify-items: start; }
.alone-box .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* Intake */
.intake { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 24px; align-items: start; }
.steps { position: sticky; top: 24px; padding: 18px; }
.steps .bar { margin: 8px 0 12px; }
.steps ol { display: grid; gap: 2px; }
.steps button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 8px; background: none; border: 0; border-radius: 8px; color: var(--muted); font-size: 14.5px; text-align: left; cursor: pointer; }
.steps button:hover { background: var(--glacier); }
.steps li.seen button { color: var(--ink); }
.steps li.here button { background: var(--blue-soft); color: var(--ink); font-weight: 600; }
.steps svg { width: 18px; height: 18px; flex: none; }
.pane { padding: 30px; }
.pane-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.pane h1 { font-size: 29px; margin-bottom: 8px; }
.pane-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.pane-actions .btn:only-child { margin-left: auto; }
.intake-phone-head { display: none; }

.picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pick { position: relative; display: grid; gap: 8px; align-content: start; padding: 10px; background: #fff; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.16); }
.pick:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.pick .chosen { display: none; position: absolute; top: 16px; right: 16px; background: var(--blue); color: #fff; border-radius: 99px; font-size: 12px; font-weight: 600; padding: 2px 9px; }
.pick:has(input:checked) .chosen { display: block; }
.pick strong { font: 700 15px var(--head); color: var(--ink); }
.menu-row { display: grid; grid-template-columns: 1fr 1.4fr 2fr .7fr 40px; gap: 6px; align-items: center; }
.menu-row input { min-height: 42px; padding: 8px 10px; font-size: 15px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.file { display: grid; gap: 6px; padding: 7px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; min-width: 0; }
.file i { display: block; aspect-ratio: 1; border-radius: 8px; background: linear-gradient(145deg, #F2D5B3, #BE8253) center / cover; }
.file:nth-child(2) i { background: linear-gradient(145deg, #DCE8F1, #8FB0C9); }
.file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.drop { display: grid; gap: 4px; justify-items: center; padding: 22px 14px; text-align: center; border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--glacier); color: var(--ink); cursor: pointer; font-weight: 500; }
.drop:hover, .drop:focus-within { border-color: var(--blue); background: var(--blue-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop svg { width: 24px; height: 24px; }
.drop span { font-size: 13.5px; color: var(--muted); font-weight: 400; }
.bullets { list-style: disc; padding-left: 20px; display: grid; gap: 3px; }
.review { padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; }
.review .top { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; }
.check-list { display: grid; gap: 8px; }
.check-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.check-list .l { display: flex; gap: 10px; align-items: center; min-width: 0; color: var(--ink); }
.check-list svg { width: 18px; height: 18px; flex: none; }
.msg { border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.good { background: var(--good-soft); color: var(--good); }
.msg.info { background: var(--blue-soft); color: var(--navy); }

/* Disclosure */
details.more { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
details.more + details.more { margin-top: 8px; }
details.more summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 11px 14px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary svg { width: 18px; height: 18px; flex: none; transition: transform .2s; }
details.more[open] summary svg { transform: rotate(180deg); }
.more-body { padding: 0 14px 16px; display: grid; gap: 10px; font-size: 15px; }
.history { display: grid; }
.history li { display: grid; gap: 6px; justify-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; padding-top: 2px; }
.history .date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.history .req { color: var(--ink); }
.empty { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 30px 18px; color: var(--muted); }
.empty svg { width: 34px; height: 34px; color: var(--navy-3); }
.empty strong { font: 700 17px var(--head); color: var(--ink); }
.empty p { max-width: 34em; }

.kv { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv b { color: var(--ink); font-weight: 600; user-select: all; }

/* Toast */
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 10px 16px 10px 12px; background: var(--navy); color: #fff; border-radius: 99px; font-size: 14.5px; font-weight: 500; box-shadow: 0 10px 28px rgba(11,27,51,.3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 17px; height: 17px; flex: none; }

/* Skeleton */
.sk { position: relative; overflow: hidden; background: var(--glacier-2); border-radius: 10px; }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-next { height: 190px; border-radius: 20px; }
.sk-a { height: 300px; border-radius: 16px; }

/* Page changes */
.fade-in { animation: rise .28s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 980px) {
  .main { padding: 28px 24px 56px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .tiles-wide { grid-template-columns: minmax(0, 1fr); }
  .intake { grid-template-columns: minmax(0, 1fr); }
  .steps { display: none; }
  .intake-phone-head { display: block; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
  .intake-phone-head .h { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink); font-weight: 600; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
  .chips { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; }
  .chips button { flex: none; display: flex; align-items: center; gap: 5px; min-height: 34px; padding: 4px 11px; background: var(--glacier); border: 1px solid transparent; border-radius: 99px; color: var(--ink); font-size: 13px; cursor: pointer; }
  .chips button svg { width: 14px; height: 14px; }
  .chips .here { background: var(--navy); color: #fff; font-weight: 600; }
}
@media (min-width: 981px) { .chips { display: none; } }

@media (max-width: 760px) {
  .shell { display: block; }
  .side { display: none; }
  .topbar { display: flex; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 8; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; background: var(--navy); color: #fff; padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--navy); }
  .topbar .logo { padding: 0; font-size: 17px; }
  .topbar .logo svg { width: 28px; height: 28px; }
  .main { padding-block: 22px calc(var(--tabs) + 30px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .tabs a { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: var(--tabs); padding: 6px 2px; background: none; border: 0; color: var(--muted); font-size: 11.5px; font-weight: 500; cursor: pointer; }
  .tabs svg { width: 22px; height: 22px; }
  .tabs a[aria-current=page] { color: var(--navy); font-weight: 700; }
  .tabs a[aria-current=page] span.ic { background: var(--glacier); }
  .tabs span.ic { display: grid; place-items: center; width: 46px; height: 28px; border-radius: 99px; }
  .focus .tabs { display: none; }
  .focus .main { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .pane-actions { position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; margin: 0; background: var(--surface); padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .pane-actions .btn { flex: 1; }
  .pane { padding: 22px 16px; }
  .next { padding: 24px 20px 28px; }
  .panel { padding: 18px 16px; }
  .climb-chart { display: none; }
  .stages { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stages li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 12px; text-align: left; padding: 0 0 18px; }
  .stages li:last-child { padding-bottom: 0; }
  .stages li:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: var(--line-2); }
  .stages li.done:not(:last-child)::before { background: var(--navy); }
  .stage-icon { display: block; grid-row: span 2; width: 32px; height: 32px; }
  .stage-icon svg { width: 100%; height: 100%; }
  .grid2, .grid3, .picker { grid-template-columns: minmax(0, 1fr); }
  .pick { grid-template-columns: 92px minmax(0, 1fr); column-gap: 12px; }
  .menu-row { grid-template-columns: 1fr 1fr; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
    .menu-head { display: none; }
  .signin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .signin-art { min-height: 230px; padding-block: 22px 70px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); gap: 22px; }
  .signin-art h1 { font-size: 28px; }
  .signin-art p { font-size: 15px; margin-top: 8px; }
  .signin-art .firs { height: 90px; }
  .signin-form { place-items: start center; padding-block: 28px 40px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .alone-box { padding: 24px 20px; }
  .toast { bottom: calc(var(--tabs) + 14px + env(safe-area-inset-bottom, 0px)); }
  .focus .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Real portal additions: what the mock didn't need ─────────────────────── */
[hidden] { display: none !important; }
a.logo { text-decoration: none; }
.side .firs, .next .firs { color: inherit; }
.nav a, .tabs a { text-decoration: none; }
.tile { color: inherit; text-decoration: none; }
.on-navy .linkish { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.stack { grid-template-columns: minmax(0, 1fr); }  /* keeps the phone's step chips from stretching the page */

/* Trees span their panel; the small stage icons only show on phones, where the chart is hidden */
.firs { width: 100%; }
.stages .stage-icon { display: none; }

/* The intake's text boxes have no type attribute, so they need the same look as typed ones */
input:not([type]) { width: 100%; min-height: 46px; padding: 11px 13px; background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); border-radius: 10px; font-size: 16px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
.menu-row input:not([type]) { min-height: 42px; padding: 8px 10px; font-size: 15px; }

/* Small spacing helpers, so no page needs an inline style (the security headers forbid them) */
.mt-4 { margin-top: 4px; } .mt-6 { margin-top: 6px; } .mt-8 { margin-top: 8px; } .mt-14 { margin-top: 14px; } .mt-18 { margin-top: 18px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.w-full { width: 100%; }
.center { text-align: center; }

/* Staff line: K always knows this is a staff session (clients never see it) */
.staff button { margin-left: 10px; font: 600 12px var(--body); background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 3px 8px; cursor: pointer; }

/* Messages from the server */
.msg { margin: 12px 0; }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--good-soft); color: var(--good); }

/* Progress bars: the width comes from data-p, set by the page's script */
.bar i { width: var(--p, 0%); }

/* The climb's five stops */
.stop-0 { left: 8%; top: 80%; } .stop-1 { left: 29%; top: 64%; } .stop-2 { left: 50%; top: 50%; } .stop-3 { left: 71%; top: 32%; } .stop-4 { left: 92%; top: 13%; }

/* Side menu and top bar */
.side-foot a { color: #fff; }
.topbar-links { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.topbar .call { color: #fff; }
.skip { position: absolute; z-index: 40; left: 12px; top: -60px; background: #fff; color: var(--navy); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
.who strong, .who span { overflow-wrap: anywhere; }

/* Site panel buttons */
.site-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Form layout */
.meta { font-size: 14px; color: var(--muted); }
.fields { display: grid; gap: 18px; margin-top: 18px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.field.bad input { border-color: var(--bad); }
.sec-title { font: 700 16px var(--head); color: var(--ink); }
.check { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.shots { list-style: disc; padding-left: 20px; display: grid; gap: 3px; margin-top: 6px; }
.more-body .fields { margin-top: 4px; }

/* Saved indicator */
.saved { font-size: 14px; color: var(--good); opacity: 0; transition: opacity .3s; }
.saved.show { opacity: 1; }
.saved.err { color: var(--bad); opacity: 1; }

/* Style picker: real template pictures */
.pick img { width: 100%; aspect-ratio: 9 / 13; object-fit: cover; object-position: top; border-radius: 8px; }
.pick span.blurb { font-size: 13.5px; line-height: 1.45; }
.pick a { font-size: 13.5px; }
.pick.plain { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 14px; }
.pick.plain .chosen { top: 50%; transform: translateY(-50%); }

/* Menu or services table: five columns */
.menu-rows { display: grid; gap: 8px; }
.menu-row { grid-template-columns: 1fr 1.4fr 2fr .8fr 1fr 40px; }
.menu-head { font-size: 13px; font-weight: 600; color: var(--muted); }

/* Files */
.files { margin: 12px 0; }
.file img, .file .noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--glacier); }
.file .noimg { display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }
.file button { font: 600 13px var(--body); background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 5px; color: var(--ink); cursor: pointer; }

/* Reviews, and the check-and-send list */
.review .field + .field { margin-top: 0; }
.todo { display: grid; gap: 8px; margin: 10px 0; }
.todo li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.todo button { font: 600 14px var(--body); background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; color: var(--ink); cursor: pointer; flex: none; }

/* Features and requests */
.more-body ul:not(.bullets) { list-style: disc; padding-left: 20px; display: grid; gap: 3px; }
.more-body h4 { margin-top: 2px; }
.upd, .confirm-box { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; justify-items: start; }
.upd textarea { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.history .req, .history .note { overflow-wrap: anywhere; }
.billed { margin-bottom: 12px; }

/* Standalone pages */
.alone-box .after-note { font-size: 14px; color: var(--muted); }
.signin-box a { color: var(--blue-dark); }

/* The form-sent page */
.done-panel { max-width: 600px; margin: 0 auto; display: grid; gap: 14px; justify-items: start; }
.phone-home { display: inline-block; margin-top: 10px; font-size: 14px; }

@media (max-width: 760px) {
  .stages .stage-icon { display: block; }
  .intake-phone-head { top: calc(56px + env(safe-area-inset-top, 0px)); }  /* stays below the top bar while scrolling */
  [data-page=intake] .pane :is(input, select, textarea) { scroll-margin-top: 230px; }  /* a focused box isn't hidden under those two bars */
  .row2, .row3, .hours { grid-template-columns: minmax(0, 1fr); }
  .menu-head { display: none; }
  .menu-row { grid-template-columns: 1fr 1fr; }
  .menu-row input[data-k=section], .menu-row input[data-k=name], .menu-row input[data-k=desc] { grid-column: 1 / -1; }
  .menu-row .icon-btn { justify-self: end; grid-column: 2; }
  .pick img { grid-row: span 3; }
  .pick.plain { grid-template-columns: none; }
}
