/* YES AI Hub look: colours and fonts taken from aihubportal.yes4youth.co.za */
:root {
  --teal: #012B39;
  --ink: #172028;
  --text: #454E58;
  --muted: #6B7580;
  --page: #FAFCFE;
  --surface: #FFFFFF;
  --line: #E6ECF2;
  --orange: #F9A726;
  --orange-hover: #EE9A12;
  --accent: #934F00;
  --ok-bg: #E3F6EA;
  --ok: #1E6B3A;
  --warn-bg: #FFF1D6;
  --warn: #934F00;
  --bad-bg: #FDE8E8;
  --bad: #9B2C2C;
  --note-bg: #EEF2F6;
  --radius: 12px;
  --font-heading: "Montserrat", system-ui, sans-serif;
  --font-body: "Questrial", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--font-heading); color: var(--ink); line-height: 1.15; margin: 0 0 0.5rem; }
h1 { font-weight: 800; font-size: clamp(2.1rem, 6vw, 3.25rem); }
h2 { font-weight: 700; font-size: 1.4rem; }
h3 { font-weight: 600; font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.topbar {
  background: var(--teal);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem clamp(1rem, 4vw, 2.5rem);
}
.brand { display: flex; align-items: center; gap: 0.65rem; color: #FFFFFF; text-decoration: none; }
.brand strong { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; }
.brand small { display: block; font-size: 0.75rem; color: #CFE6EE; }
.topnav { display: flex; align-items: center; gap: 1.25rem; }
.topnav a, .nav-button { color: #FFFFFF; text-decoration: none; font-family: var(--font-heading); font-weight: 500; font-size: 0.9rem; }
.inline-form { margin: 0; }
.nav-button { background: none; border: 0; padding: 0; cursor: pointer; }
.nav-button:hover, .topnav a:hover { text-decoration: underline; }

main { max-width: 1100px; margin: 0 auto; padding: clamp(1.75rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem); }

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.lead { font-size: 1.15rem; max-width: 42rem; }
.hero { margin-bottom: 2.5rem; }

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--orange-hover); }
.btn-quiet { background: transparent; box-shadow: inset 0 0 0 2px var(--orange); }
.btn-quiet:hover { background: var(--warn-bg); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 0 0 3rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }

.steps { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.steps li { display: flex; gap: 0.9rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
}

.pill { display: inline-block; font-family: var(--font-heading); font-weight: 500; font-size: 0.75rem; padding: 0.15rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-note { background: var(--note-bg); color: var(--text); }

.footer { border-top: 1px solid var(--line); padding: 1.25rem clamp(1rem, 4vw, 2.5rem); font-size: 0.85rem; color: var(--muted); text-align: center; }

section { margin-bottom: 2.5rem; }
.note { font-size: 0.9rem; color: var(--muted); max-width: 46rem; }

/* Evidence sources, strongest first */
.src-checked { background: var(--ok-bg); color: var(--ok); }
.src-document { background: #E6F1FB; color: #185FA5; }
.src-recorded { background: #EEEDFE; color: #534AB7; }
.src-declared { background: var(--note-bg); color: var(--text); }
.src-none { background: var(--bad-bg); color: var(--bad); }

.strength { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.strength-card { border-radius: var(--radius); padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.9rem; background: var(--surface); border: 1px solid var(--line); }
.strength-card.src-checked, .strength-card.src-document, .strength-card.src-recorded, .strength-card.src-declared, .strength-card.src-none { border-color: transparent; }
.strength-num { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; line-height: 1.1; }

.findings { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.findings li { display: flex; gap: 0.75rem; align-items: baseline; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; }

.evidence { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 0.95rem; }
.evidence th { text-align: left; font-family: var(--font-heading); font-weight: 600; font-size: 0.8rem; color: var(--muted); padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); }
.evidence td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.evidence tr:last-child td { border-bottom: 0; }
.evidence small { display: block; color: var(--muted); margin-top: 0.3rem; }

/* Forms */
.narrow { max-width: 34rem; }
.form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.field { display: grid; gap: 0.35rem; }
.field label, .field legend { font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.field fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password], .field input[type=date], .field select, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid #C9D4DE;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; border-color: var(--ink); }
.hint { margin: 0; font-size: 0.85rem; color: var(--muted); }
.error { margin: 0; font-size: 0.85rem; color: var(--bad); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
.error-box { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 0.75rem 1rem; }
.choices { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 0.55rem 1.2rem; border: 1.5px solid #C9D4DE; border-radius: 999px; font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; background: var(--surface); }
.choice input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.choices.stack { flex-direction: column; align-items: flex-start; }
.choice input:disabled + span { opacity: 0.45; }
[hidden] { display: none !important; }

/* Business-type picker: group cards first, then the kinds in that group */
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 0.35rem; }
.picker-search { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid #C9D4DE; border-radius: 10px; padding: 0.7rem 0.85rem; }
.picker-search:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; border-color: var(--ink); }
.sector-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 0.6rem; margin-top: 0.4rem; }
.sector-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; cursor: pointer; }
.sector-card:hover { border-color: var(--orange); }
.sector-card:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sector-card strong { font-family: var(--font-heading); font-weight: 600; color: var(--ink); }
.sector-card span { font-size: 0.85rem; color: var(--muted); }
.sector-card em { font-style: normal; margin-top: 0.3rem; }
.type-group { display: grid; gap: 0.6rem; margin-top: 0.4rem; }
.type-group h3 { margin: 0; }
.link-button { justify-self: start; background: none; border: 0; padding: 0; font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; color: var(--accent); cursor: pointer; }
.picked { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.picked:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--warn-bg); color: var(--ink); border-radius: 999px; padding: 0.3rem 0.4rem 0.3rem 0.85rem; font-family: var(--font-heading); font-weight: 600; font-size: 0.85rem; }
.chip button { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 1rem; line-height: 1; cursor: pointer; }

/* Offers, one per box */
.offers { display: grid; gap: 0.5rem; }
.offer-row { display: flex; align-items: center; gap: 0.6rem; }
.offer-num { flex: 0 0 1.4rem; font-family: var(--font-heading); font-weight: 700; color: var(--muted); text-align: right; }
.add-offer { justify-self: start; background: var(--surface); border: 1.5px dashed #C9D4DE; border-radius: 999px; padding: 0.45rem 1rem; font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; color: var(--ink); cursor: pointer; }
.add-offer:hover { border-color: var(--orange); }

.form-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 0.5rem; }
.back { font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; }

.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 0.5rem 0 1.5rem; }
.progress div { height: 100%; background: var(--orange); border-radius: 999px; }

/* Dashboard */
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.score { margin: 0; font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: var(--ink); }
.score span { font-size: 3.2rem; line-height: 1; }
.parts, .tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.2rem; }
.parts li, .tasks li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.parts small { display: block; color: var(--muted); font-size: 0.85rem; }
.part-score { font-family: var(--font-heading); font-weight: 700; color: var(--ink); white-space: nowrap; }
.btn-small { padding: 0.4rem 0.9rem; font-size: 0.85rem; white-space: nowrap; }

@media (max-width: 640px) {
  .topnav { gap: 0.9rem; }
  .brand small { display: none; }
  .evidence thead { display: none; }
  .evidence, .evidence tbody, .evidence tr, .evidence td { display: block; width: 100%; }
  .evidence tr { border-bottom: 1px solid var(--line); padding: 0.5rem 0; }
  .evidence td { border: 0; padding: 0.3rem 1rem; }
  .evidence td::before { content: attr(data-label); display: block; font-family: var(--font-heading); font-weight: 600; font-size: 0.75rem; color: var(--muted); }
  .findings li { flex-direction: column; gap: 0.4rem; }
}

/* Get ready: foundation tools */
.narrow-wide { max-width: 46rem; }
.section-title { margin: 2rem 0 0.75rem; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.tool { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.tool h2 { margin: 0; }
.tool p { margin: 0; }
.tool .btn { margin-top: auto; }
.tool-logo { max-height: 72px; max-width: 220px; object-fit: contain; }
.ok-box { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 0.75rem 1rem; }
.error-box ul { margin: 0; padding-left: 1.1rem; }
.working { display: flex; gap: 1rem; align-items: center; }
.working h2 { margin: 0 0 0.25rem; }
.working p { margin: 0; }
.spinner { flex-shrink: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--orange); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.chosen-logo { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.chosen-logo img { max-width: 240px; max-height: 160px; object-fit: contain; }
.chosen-logo h2 { margin-top: 0; }
.board { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; display: block; margin-bottom: 1rem; }
.board-form { display: grid; gap: 1rem; }
.again { margin-top: 1rem; }
details.brief { margin-top: 1.5rem; }
details.brief summary { cursor: pointer; list-style: none; }
details.brief summary h2 { display: inline; }
details.brief summary::-webkit-details-marker { display: none; }
details.brief summary::after { content: " +"; font-family: var(--font-heading); font-weight: 700; color: var(--accent); }
details.brief[open] summary::after { content: " –"; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0.5rem; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch span { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.8rem; border: 1.5px solid #C9D4DE; border-radius: 10px; background: var(--surface); font-size: 0.9rem; }
.swatch i { width: 1.2rem; height: 1.2rem; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.swatch i.any { background: conic-gradient(#0B4F5C, #F9A726, #B3261E, #1E4FBF, #0B4F5C); }
.swatch input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.kit-head { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.kit-logo { max-width: 260px; max-height: 150px; object-fit: contain; }
.kit-facts p { margin: 0 0 0.5rem; }
.dot { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 50%; vertical-align: -0.1rem; margin: 0 0.25rem 0 0.5rem; border: 1px solid var(--line); }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kit-item { margin: 0; padding: 0.75rem; }
.kit-item img { width: 100%; height: 170px; object-fit: contain; background: var(--note-bg); border-radius: 8px; display: block; }
.kit-item figcaption { font-size: 0.85rem; margin-top: 0.5rem; color: var(--muted); }
.pair { display: grid; grid-template-columns: 1fr 2fr; gap: 0.75rem; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }
.domain em { font-style: normal; margin-left: 0.4rem; }
.addresses { font-family: var(--font-heading); font-weight: 600; color: var(--ink); }

.task-detail { display: block; font-size: 0.8rem; color: var(--muted); }

/* Opportunities and the shortlist */
.opp-list { display: grid; gap: 0.75rem; }
.opp-row { display: block; color: inherit; text-decoration: none; }
.opp-row:hover { border-color: var(--orange); }
.opp-row:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.opp-row h2, .opp-row h3 { margin: 0.5rem 0 0.25rem; }
.opp-row p { margin: 0.25rem 0 0; }
.shortlist { display: grid; gap: 1rem; }
.match-head { display: flex; align-items: flex-start; gap: 0.9rem; }
.match-head > div { flex: 1; }
.match-head h3 { margin: 0; }
.match-head h3 a { color: var(--ink); }
.match-head .note { margin: 0.1rem 0 0; }
.rank { flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--teal); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; }
.explanation { margin: 0.75rem 0; }
.match details summary, .request-text summary { cursor: pointer; font-family: var(--font-heading); font-weight: 600; color: var(--accent); }
.checks { margin-top: 0.75rem; }
.error-box.small { font-size: 0.88rem; padding: 0.5rem 0.75rem; }
.plain-list { margin: 0.75rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; }
.request-text { margin: 1rem 0; }
.request-text p { margin: 0.5rem 0 0; white-space: pre-line; }
.req-table { display: grid; gap: 0.5rem; }
.req-row { display: grid; grid-template-columns: 2.2fr 1.1fr 1fr 1.2fr; gap: 0.5rem; }
.req-row select, .req-row input { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid #C9D4DE; border-radius: 10px; padding: 0.55rem 0.6rem; }
.req-head { font-family: var(--font-heading); font-weight: 600; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 760px) {
  .req-row { grid-template-columns: 1fr 1fr; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
  .req-head { display: none; }
}
.cite { font-family: var(--font-heading); font-size: 0.62rem; font-weight: 700; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 0.05rem 0.35rem; margin-left: 0.15rem; }

/* Responses and the YES dashboard */
.inline-row { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.inline-row .field { flex: 1 1 16rem; }
.approve { margin-top: 0.5rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-card .big { font-family: var(--font-heading); font-weight: 800; font-size: 2.2rem; color: var(--ink); line-height: 1.1; }
.bars { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; gap: 0.5rem; }
.bars li { display: grid; grid-template-columns: minmax(8rem, 1.2fr) 2fr 2.5rem; gap: 0.6rem; align-items: center; font-size: 0.9rem; }
.bars .bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--orange); border-radius: 999px; }
.bars b { text-align: right; font-family: var(--font-heading); }

/* Map pin and contact details */
.pin-map { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.pair.hours, .pair.dates { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .pair.dates { grid-template-columns: 1fr; } }

/* The brand journey */
.journey { margin-bottom: 1.25rem; }
.journey-steps { list-style: none; padding: 0; margin: 0.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.82rem; color: var(--muted); }
.journey-steps li.done { color: var(--ok); }
.journey-steps li.done::before { content: "✓ "; }
.journey-steps li.now { color: var(--ink); font-weight: 700; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.design-grid .form-actions { grid-column: 1 / -1; }
.design-card { position: relative; display: grid; gap: 0.5rem; cursor: pointer; }
.design-card input { position: absolute; top: 1rem; right: 1rem; width: 1.3rem; height: 1.3rem; accent-color: var(--orange); }
.design-card:has(input:checked) { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.design-frame { display: block; height: 340px; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.design-frame iframe { width: 200%; height: 680px; border: 0; transform: scale(0.5); transform-origin: 0 0; pointer-events: none; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; margin: 1.5rem 0; }
.summary-grid h2 { font-size: 1.05rem; }
.summary-grid p { margin: 0 0 0.5rem; }
.build-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; margin: 1.5rem 0; font-family: var(--font-heading); font-weight: 600; }
.launch-logo { max-width: 240px; max-height: 140px; object-fit: contain; display: block; margin: 0.5rem 0 1rem; }
.next-steps { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Registration: tabs across the top, like the brand form. */
.form-tabs { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem; padding: 0; margin: 0 0 1.25rem; }
.form-tabs li { border-top: 4px solid var(--line); padding-top: 0.35rem; font-family: var(--font-heading); font-weight: 600; font-size: 0.75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-tabs li.done { border-color: var(--ink); color: var(--ink); }
.form-tabs li.now { border-color: var(--orange); color: var(--ink); }

/* What does your business do: search, then ticked rows. */
.type-search { display: flex; gap: 0.5rem; }
.type-search input { flex: 1; min-width: 0; }
.group-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.group-chip { font: inherit; font-size: 0.85rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; cursor: pointer; color: var(--ink); }
.group-chip:hover { border-color: var(--orange); }
.group-chip:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.found { font-family: var(--font-heading); font-weight: 600; color: var(--ink); margin: 0.6rem 0 0; }
.type-results, .own-types { display: grid; gap: 0.45rem; }
.type-row { display: block; }
.type-row span { display: block; border-radius: 10px; padding: 0.6rem 0.9rem 0.6rem 2.6rem; text-align: left; position: relative; }
.type-row span::before { content: ""; position: absolute; left: 0.85rem; top: 0.8rem; width: 1.05rem; height: 1.05rem; border: 2px solid var(--ink); border-radius: 4px; background: var(--surface); }
.type-row input:checked + span { background: var(--warn-bg); border-color: var(--ink); }
.type-row input:checked + span::before { background: var(--ink); box-shadow: inset 0 0 0 3px var(--surface); }
.type-row small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.78rem; color: var(--muted); }
.type-row.offer span { border-style: dashed; }

/* The description and its AI help. */
.ai-help { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.ai-help .hint { flex-basis: 100%; margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Money on the gap: what they qualify for, and what each missing proof opens up. */
.money { display: grid; gap: 0.6rem; margin: 0 0 1.5rem; }
.money p { margin: 0; border-radius: var(--radius); padding: 0.9rem 1.1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.money-now { background: var(--ok-bg); color: var(--ok); }
.money-now a { color: var(--ok); font-family: var(--font-heading); font-weight: 600; }
.money-gap { background: var(--warn-bg); color: var(--ink); }
.money-gap span { flex: 1 1 14rem; }
.money strong { font-family: var(--font-heading); font-weight: 700; }
.blocked { list-style: none; padding: 0; margin: 0.5rem 0; display: grid; gap: 0.45rem; }
.blocked li { background: var(--warn-bg); border-radius: 10px; padding: 0.6rem 0.8rem; color: var(--ink); }

/* Closing soon, next steps, and what buyers say. */
.closing { margin: 0 0 1.5rem; }
.closing-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.closing-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; background: var(--surface); border: 1.5px solid var(--bad-bg); border-radius: var(--radius); padding: 0.75rem 1rem; }
.closing-list small { display: block; color: var(--muted); }
.next-steps ol { margin: 0.4rem 0 0; padding-left: 1.3rem; display: grid; gap: 0.35rem; }
.next-steps h2 small { font-size: 0.85rem; color: var(--bad); font-weight: 600; }
.feedback-summary .scores { columns: 2; }

/* Get your brand ready: the form's look (tabs, stage line, bottom bar) and its screens. */
.form-tabs.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stage { margin: 0 0 0.35rem; font-family: var(--font-heading); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.in-journey .form-actions { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; background: var(--page); padding: 0.75rem 0; border-top: 1px solid var(--line); }
.in-journey .form-actions .back { border: 1.5px solid var(--line); border-radius: 999px; padding: 0.55rem 1.4rem; text-decoration: none; }
.in-journey .form-actions .btn { flex: 1; max-width: 22rem; text-align: center; }
.logo-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.logo-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); cursor: pointer; padding: 1rem; text-align: center; }
.logo-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.logo-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px var(--orange); }
.logo-card:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.logo-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--orange); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.logo-icon svg { width: 30px; height: 30px; }
.logo-card strong { font-family: var(--font-heading); color: var(--ink); }
.colour-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.6rem; }
.colour-card { position: relative; display: grid; gap: 0.35rem; border: 1.5px solid var(--line); border-radius: 14px; padding: 0.6rem; background: var(--surface); cursor: pointer; }
.colour-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.colour-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px var(--orange); }
.colour-card:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.colour-card .halves { display: grid; grid-template-columns: 1fr 1fr; border-radius: 10px; overflow: hidden; height: 64px; }
.colour-card .halves b { display: inline-block; margin: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.85); color: var(--ink); font-size: 0.7rem; }
.colour-name { font-family: var(--font-heading); font-weight: 700; }
.colour-card small { color: var(--muted); }
.board-tap { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
.board-tap .board { grid-area: 1 / 1 / 3 / 4; width: 100%; }
.board-tap .cell { position: relative; z-index: 1; cursor: pointer; border-radius: 10px; }
.cell-1 { grid-area: 1 / 1; } .cell-2 { grid-area: 1 / 2; } .cell-3 { grid-area: 1 / 3; }
.cell-4 { grid-area: 2 / 1; } .cell-5 { grid-area: 2 / 2; } .cell-6 { grid-area: 2 / 3; }
.board-form:has(#logo-1:checked) .cell-1, .board-form:has(#logo-2:checked) .cell-2, .board-form:has(#logo-3:checked) .cell-3,
.board-form:has(#logo-4:checked) .cell-4, .board-form:has(#logo-5:checked) .cell-5, .board-form:has(#logo-6:checked) .cell-6 { box-shadow: inset 0 0 0 4px var(--orange); background: rgba(249, 167, 38, 0.12); }
.logo-more { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem; }
.logo-chosen { text-align: center; display: grid; justify-items: center; gap: 0.5rem; }
.logo-chosen img { max-width: min(100%, 360px); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; margin: 1rem 0; }
.tpl-card { position: relative; display: grid; gap: 0.5rem; align-content: start; }
.tpl-card h2 { margin: 0; font-size: 1.05rem; }
.tpl-card.is-selected { border-color: var(--ink); box-shadow: 0 0 0 3px var(--orange); }
.tpl-selected { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; background: var(--ink); color: #FFFFFF; border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.8rem; font-weight: 700; }
.tpl-frame { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.tpl-frame iframe { width: 250%; height: 250%; border: 0; transform: scale(0.4); transform-origin: 0 0; pointer-events: none; }
.tpl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.tpl-row .btn, .tpl-row form, .tpl-row button { width: 100%; text-align: center; }
.tpl-pick { width: 100%; font: inherit; font-family: var(--font-heading); font-weight: 700; padding: 0.6rem; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; }
.tpl-pick.is-on { background: var(--ink); color: #FFFFFF; }
.tpl-view { margin: 0; height: 100vh; display: flex; flex-direction: column; }
.tpl-view-frame { flex: 1; border: 0; width: 100%; }
.tpl-view-bar { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1rem; border-top: 1px solid var(--line); background: var(--surface); }
.tpl-card, .tpl-grid > * { min-width: 0; }
.tpl-frame { position: relative; width: 100%; }
.tpl-frame iframe { position: absolute; top: 0; left: 0; }
.tpl-row .btn { white-space: normal; padding-left: 0.5rem; padding-right: 0.5rem; }

/* Phones: the menu goes on its own row instead of running off the screen. */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: 0.4rem; }
  .topnav { width: 100%; flex-wrap: wrap; gap: 0.4rem 1rem; }
  .brand small { display: none; }
}
.closing-list small:first-of-type { color: var(--bad); font-weight: 600; }

.big-code { font-family: var(--font-heading); font-weight: 800; font-size: 2rem; letter-spacing: 0.08em; color: var(--ink); }

/* Sample documents (demo only) */
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.sample-card { display: flex; flex-direction: column; gap: 0.6rem; }
.sample-card h2 { font-size: 1.05rem; margin: 0; }
.sample-card p { margin: 0; flex: 1; }

/* Colours step: the card with the owner's exact colours */
.colour-own > input[type=radio] { inset: auto; top: 0.6rem; right: 0.6rem; width: 1px; height: 1px; }
.colour-own .own-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; height: 64px; }
.colour-own .own-pickers span { position: relative; }
.colour-own input[type=color] { position: static; opacity: 1; display: block; width: 100%; height: 64px; border: 0; padding: 0; border-radius: 10px; cursor: pointer; background: none; }
.colour-own .own-pickers b { position: absolute; left: 0.4rem; top: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.85); color: var(--ink); font-size: 0.7rem; pointer-events: none; }

/* ---- Application shell (signed-in work: dashboards, the YES console) -----------------
   Sidebar, page header, a light workspace and crisp panels on one grid. Neutral system font
   for data, the brand font for headings and figures. Flat colours, hairline borders. */
:root {
  --app-bg: #F4F6F9;
  --app-line: #E3E8EE;
  --app-line-soft: #EEF1F5;
  --app-ink: #101828;
  --app-text: #344054;
  --app-muted: #667085;
  --app-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
body.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; background: var(--app-bg);
           font-family: var(--app-ui); font-size: 14px; color: var(--app-text); line-height: 1.5; }
.app h1, .app h2, .app h3 { color: var(--app-ink); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: 0.5rem 0.8rem; border-radius: 6px; }

.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--teal); color: #C5D6DC; padding: 1rem 0.75rem; }
.side-brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem 1.1rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 0.75rem; }
.side-brand strong { display: block; font-family: var(--font-heading); font-size: 0.92rem; font-weight: 700; }
.side-brand small { display: block; font-size: 0.72rem; color: #8FAAB4; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.65rem; border-radius: 7px; color: #C5D6DC; text-decoration: none; font-size: 0.88rem; font-weight: 500; transition: background-color 120ms ease, color 120ms ease; }
.side-nav svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.side-nav a.on { background: rgba(255, 255, 255, 0.1); color: #fff; }
.side-nav a.on svg { stroke: var(--orange); opacity: 1; }
.side-foot { margin-top: auto; padding: 0.9rem 0.5rem 0; border-top: 1px solid rgba(255, 255, 255, 0.08); display: grid; gap: 0.6rem; }
.side-user b { display: block; color: #fff; font-size: 0.85rem; font-weight: 600; }
.side-user small { display: block; font-size: 0.75rem; color: #8FAAB4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot button { justify-self: start; background: none; border: 1px solid rgba(255, 255, 255, 0.18); color: #C5D6DC; border-radius: 6px; padding: 0.3rem 0.7rem; font: inherit; font-size: 0.8rem; cursor: pointer; }

.work { min-width: 0; display: flex; flex-direction: column; }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; padding: 1.6rem 2rem 1.25rem; background: #fff; border-bottom: 1px solid var(--app-line); }
.work-head h1 { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.work-sub { margin: 0.2rem 0 0; color: var(--app-muted); font-size: 0.9rem; }
.crumb { margin: 0 0 0.3rem; font-size: 0.8rem; color: var(--app-muted); }
.crumb a { color: var(--app-muted); }
.work-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.work-body { padding: 1.5rem 2rem 2.5rem; display: grid; gap: 1.25rem; max-width: 1360px; width: 100%; }
.work-foot { margin-top: auto; padding: 1rem 2rem 1.5rem; font-size: 0.75rem; color: var(--app-muted); }

/* Buttons in the app: rectangular, compact, one primary per view. */
.app .btn { border-radius: 8px; padding: 0.55rem 0.95rem; font-size: 0.85rem; box-shadow: none; transition: transform 140ms var(--ease-out), background-color 120ms ease; }
.app .btn-quiet { background: #fff; box-shadow: inset 0 0 0 1px var(--app-line); color: var(--app-ink); }
.app .btn-quiet:hover { background: #F9FAFB; }
.app .btn:active { transform: scale(0.97); }
.app .btn-small { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.kpi-row.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kc { background: #fff; border: 1px solid var(--app-line); border-radius: 10px; padding: 1rem 1.1rem; display: grid; gap: 0.2rem; align-content: start; color: inherit; text-decoration: none; }
a.kc:hover { border-color: #C9D2DC; }
.kc-label { font-size: 0.8rem; color: var(--app-muted); font-weight: 500; }
.kc-value { font-family: var(--font-heading); font-weight: 700; font-size: 1.75rem; color: var(--app-ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kc-value small { font-size: 0.85rem; color: var(--app-muted); font-weight: 600; letter-spacing: 0; }
.kc-sub { font-size: 0.8rem; color: var(--app-muted); }
.kc-sub.ok { color: var(--ok); } .kc-sub.warn { color: var(--warn); }
.mini { display: block; height: 6px; border-radius: 3px; background: var(--app-line-soft); overflow: hidden; margin-top: 0.45rem; }
.mini i { display: block; height: 100%; background: var(--teal); }

.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 1.25rem; min-width: 0; }
.pane { background: #fff; border: 1px solid var(--app-line); border-radius: 10px; min-width: 0; }
.pane-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--app-line-soft); }
.pane-head h2 { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 700; margin: 0; }
.pane-head .meta { font-size: 0.8rem; color: var(--app-muted); }
.pane-body { padding: 1rem 1.1rem; }
.pane-body > :last-child { margin-bottom: 0; }
.pane-foot { padding: 0.7rem 1.1rem; border-top: 1px solid var(--app-line-soft); font-size: 0.8rem; color: var(--app-muted); }
.a { color: #0B5E7A; font-weight: 600; text-decoration: none; }
.a:hover { text-decoration: underline; text-underline-offset: 2px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.tbl th { text-align: left; font-weight: 600; font-size: 0.76rem; color: var(--app-muted); padding: 0.55rem 1.1rem; background: #F9FAFB; border-bottom: 1px solid var(--app-line); white-space: nowrap; }
.tbl td { padding: 0.7rem 1.1rem; border-bottom: 1px solid var(--app-line-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #FAFBFC; }
.tbl .r { text-align: right; } .tbl .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tbl .t { color: var(--app-ink); font-weight: 600; text-decoration: none; }
.tbl .t:hover { text-decoration: underline; }
.tbl .sub { display: block; color: var(--app-muted); font-size: 0.78rem; margin-top: 0.1rem; font-weight: 400; }
.tbl .soon { color: var(--bad); font-size: 0.76rem; display: block; }
.tbl-wrap { overflow-x: auto; }

.st { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-ok { background: #ECFDF3; color: #067647; border-color: #ABEFC6; }
.st-warn { background: #FFFAEB; color: #B54708; border-color: #FEDF89; }
.st-bad { background: #FEF3F2; color: #B42318; border-color: #FECDCA; }
.st-note { background: #F9FAFB; color: #475467; border-color: var(--app-line); }

.seg { display: flex; gap: 3px; height: 8px; margin: 0.2rem 0 1rem; }
.seg span { background: var(--app-line-soft); border-radius: 2px; overflow: hidden; }
.seg i { display: block; height: 100%; background: var(--teal); }
.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-top: 1px solid var(--app-line-soft); font-size: 0.86rem; }
.kv li:first-child { border-top: 0; padding-top: 0; }
.kv small { display: block; color: var(--app-muted); font-size: 0.76rem; }
.kv .v { color: var(--app-ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1.1rem; border-top: 1px solid var(--app-line-soft); font-size: 0.86rem; }
.rows li:first-child { border-top: 0; }
.rows .grow { flex: 1; min-width: 0; }
.rows .grow small { display: block; color: var(--app-muted); font-size: 0.78rem; }
.rows .n { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--app-line-soft); color: var(--app-muted); font-size: 0.72rem; font-weight: 600; }
.rows .fig { flex: none; min-width: 5.5rem; font-family: var(--font-heading); font-weight: 700; color: var(--app-ink); font-variant-numeric: tabular-nums; }
.rows .hbar { flex: none; width: 34%; height: 6px; border-radius: 3px; background: var(--app-line-soft); overflow: hidden; }
.rows .hbar i { display: block; height: 100%; background: var(--teal); }

.callout { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #FFFBF2; border: 1px solid #FBE3B4; border-radius: 10px; padding: 0.9rem 1.1rem; }
.callout p { margin: 0; }
.callout .fig { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; color: var(--app-ink); margin-right: 0.4rem; }
.notice { border-radius: 8px; padding: 0.65rem 0.9rem; font-size: 0.86rem; margin: 0; }
.notice-ok { background: #ECFDF3; color: #067647; } .notice-bad { background: #FEF3F2; color: #B42318; } .notice-warn { background: #FFFAEB; color: #B54708; }
.empty { padding: 1.5rem 1.1rem; color: var(--app-muted); text-align: center; }

.brandline { display: flex; gap: 0.9rem; align-items: center; padding-bottom: 0.9rem; margin-bottom: 0.7rem; border-bottom: 1px solid var(--app-line-soft); }
.brandline img, .brandline .ph { width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--app-line); object-fit: contain; padding: 4px; background: #fff; flex: none; }
.brandline .ph { display: grid; place-items: center; font-family: var(--font-heading); font-weight: 700; color: var(--app-muted); background: var(--app-bg); }

.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--app-line-soft); }
.filters input, .filters select { font: inherit; font-size: 0.86rem; padding: 0.45rem 0.65rem; border: 1px solid var(--app-line); border-radius: 7px; background: #fff; color: var(--app-ink); }
.filters input[type=search] { min-width: 15rem; }
.score-pill { display: inline-block; min-width: 2.4rem; text-align: center; padding: 0.1rem 0.4rem; border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.8rem; }
.score-hi { background: #ECFDF3; color: #067647; } .score-mid { background: #FFFAEB; color: #B54708; } .score-lo { background: #FEF3F2; color: #B42318; }

@media (hover: hover) and (pointer: fine) { .side-nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; } }
.side-nav a:focus-visible, .a:focus-visible, .tbl .t:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .app .btn, .side-nav a { transition: none; } }

@media (max-width: 1100px) {
  .kpi-row.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body.app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem; overflow-x: auto; }
  .side-brand { border: 0; margin: 0; padding: 0 0.4rem 0 0; }
  .side-brand span { display: none; }
  .side-nav { display: flex; gap: 2px; }
  .side-nav a { white-space: nowrap; padding: 0.45rem 0.6rem; }
  .side-nav a.on { box-shadow: inset 0 -2px 0 var(--orange); }
  .side-foot { display: none; }
  .work-head, .work-body, .work-foot { padding-left: 1rem; padding-right: 1rem; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-row.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols.even { grid-template-columns: 1fr; }
  .filters input[type=search] { min-width: 0; flex: 1; }
  .tbl.stackable thead { display: none; }
  .tbl.stackable, .tbl.stackable tbody, .tbl.stackable tr, .tbl.stackable td { display: block; }
  .tbl.stackable tr { padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--app-line-soft); }
  .tbl.stackable td { padding: 0.1rem 0; border: 0; text-align: left; }
  .tbl.stackable td[data-label]::before { content: attr(data-label) ": "; color: var(--app-muted); }
}

.tnum { font-variant-numeric: tabular-nums; }
.pane .feedback-summary { border: 0; padding: 0; margin: 0; background: none; box-shadow: none; }
.app .evidence { width: 100%; }

.work-body > * { margin: 0; }
.work-body section { margin: 0; }
.tbl td.date, .tbl td[data-label="Closes"] { white-space: nowrap; }
.tbl td.r a, .tbl td.r .a { white-space: nowrap; }
.rows b.tnum { min-width: 2.2ch; text-align: right; }

/* Forms and detail pages inside the app shell */
.pane.form-pane { max-width: 760px; }
.pane.form-pane.wide-form { max-width: 1000px; }
.pane .form { margin-top: 0; }
.match-list { list-style: none; margin: 0; padding: 0; }
.match-item { padding: 1rem 1.1rem; border-top: 1px solid var(--app-line-soft); }
.match-item:first-child { border-top: 0; }
.match-top { display: flex; align-items: center; gap: 0.8rem; }
.match-top .grow { flex: 1; min-width: 0; }
.match-top small { display: block; color: var(--app-muted); font-size: 0.78rem; }
.match-item .explanation { margin: 0.6rem 0 0.5rem 2.3rem; font-size: 0.88rem; color: var(--app-text); }
.match-item .notice { margin: 0 0 0.5rem 2.3rem; }
.checks-detail { margin-left: 2.3rem; }
.checks-detail summary { cursor: pointer; font-size: 0.82rem; padding: 0.2rem 0; }
.checks-detail .tbl-wrap { margin-top: 0.5rem; border: 1px solid var(--app-line-soft); border-radius: 8px; }
summary.pane-head { cursor: pointer; list-style: none; }
.app .evidence th, .app .evidence td { font-size: 0.86rem; }
.app .section-title { font-size: 1rem; margin: 1.5rem 0 0.6rem; }
.app .request-text { margin-bottom: 1rem; }
.match-top .t, .rows .t { color: var(--app-ink); font-weight: 600; text-decoration: none; }
.match-top .t:hover, .rows .t:hover { text-decoration: underline; text-underline-offset: 2px; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.pane .request { margin: 0; font-size: 0.88rem; white-space: pre-line; }
.work-actions .st { align-self: center; font-size: 0.82rem; padding: 0.25rem 0.65rem; }

/* Older page parts inside the app shell */
.app .tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin: 0; }
.app .card { border-color: var(--app-line); border-radius: 10px; box-shadow: none; }
.app .sample-grid { margin-top: 0; }
.app .strength { margin: 0; }
.app .evidence-group h2, .app .work-body > section > h2 { font-size: 1rem; margin: 0 0 0.6rem; }
.kv.pane-body { padding: 1rem 1.1rem; }

/* Sign up on WhatsApp (login page) */
.wa-signup { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; margin-top: 2rem; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wa-signup h2 { font-size: 1.1rem; margin: 0 0 0.35rem; }
.wa-signup p { margin: 0 0 0.9rem; font-size: 0.93rem; }
.btn-wa { background: #25D366; color: #0B3D20; }
.btn-wa:hover { background: #1EBE5A; }
.wa-qr { margin: 0; text-align: center; flex: none; }
.wa-qr svg { display: block; width: 132px; height: 132px; }
.wa-qr figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; }
@media (max-width: 640px) { .wa-qr { display: none; } }

/* AI Copilot */
.copilot { display: flex; flex-direction: column; min-height: min(70dvh, 720px); max-width: 920px; }
.copilot-thread { flex: 1; padding: 1.25rem 1.25rem 0.5rem; display: grid; gap: 1rem; align-content: start; overflow-y: auto; }
.msg { display: grid; gap: 0.25rem; max-width: 82%; }
.msg .who { font-size: 0.72rem; font-weight: 600; color: var(--app-muted); }
.msg .bubble { padding: 0.7rem 0.9rem; border-radius: 12px; font-size: 0.9rem; line-height: 1.55; }
.msg .bubble p { margin: 0 0 0.5rem; } .msg .bubble p:last-child { margin: 0; }
.msg .bubble ul { margin: 0.2rem 0 0.5rem; padding-left: 1.1rem; } .msg .bubble li { margin: 0.15rem 0; }
.msg-ai .bubble { background: #F4F6F9; color: var(--app-ink); border-top-left-radius: 4px; }
.msg-me { justify-self: end; }
.msg-me .who { text-align: right; }
.msg-me .bubble { background: var(--teal); color: #fff; border-top-right-radius: 4px; }
.msg.thinking .bubble { color: var(--app-muted); }
.msg-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.2rem; }
.copilot-suggest { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0.25rem 1.25rem 0.9rem; }
.pane-body.copilot-suggest, .copilot-card .copilot-suggest { padding: 0; }
.copilot-card .copilot-suggest { margin-top: 0.6rem; }
.chip { display: inline-block; font: inherit; font-size: 0.82rem; padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid var(--app-line);
        background: #fff; color: var(--app-ink); cursor: pointer; text-decoration: none; transition: background-color 120ms ease, transform 140ms var(--ease-out); }
.chip:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .chip:hover { background: #F4F6F9; } }
.copilot-ask { display: flex; gap: 0.6rem; align-items: flex-end; padding: 0.9rem 1.25rem; border-top: 1px solid var(--app-line-soft); }
.copilot-ask textarea { flex: 1; font: inherit; font-size: 0.92rem; padding: 0.65rem 0.8rem; border: 1px solid var(--app-line); border-radius: 10px; resize: vertical; min-height: 2.75rem; max-height: 10rem; }
.copilot-ask textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.copilot-note { margin: 0; padding: 0 1.25rem 0.9rem; font-size: 0.75rem; color: var(--app-muted); }
@media (max-width: 640px) { .msg { max-width: 100%; } }

/* UX pass */
@media (min-width: 861px) { body.app { background: linear-gradient(to right, var(--teal) 248px, var(--app-bg) 248px); } }
.home-actions, .card .btn-wa { margin-top: 0.5rem; }
.card .btn + .btn-wa { margin-left: 0.4rem; }
.app input[type=file] { font: inherit; font-size: 0.88rem; padding: 0.55rem; border: 1px dashed #C9D2DC; border-radius: 10px; width: 100%; background: #FAFBFC; }
.app input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 0.82rem; margin-right: 0.8rem; padding: 0.45rem 0.8rem; border: 1px solid var(--app-line); border-radius: 7px; background: #fff; color: var(--app-ink); cursor: pointer; }
.doc-rows { margin: 0 -1.1rem; }
.doc-rows .t { color: var(--app-ink); font-weight: 600; text-decoration: none; }
