/* Shared styles for all clients.
   Clients change the look in clients/<id>/brand/theme.css by overriding these variables. */
:root {
  --ink: #16202b;          /* dark surfaces: header, auth story panel */
  --paper: #f5f5f2;        /* page background */
  --surface: #ffffff;      /* cards, panels */
  --text: #16202b;
  --muted: #6b7480;
  --line: #dfe2e5;
  --accent: #2a5d8f;       /* highlights, links, italic headline words */
  --button: #2a5d8f;
  --button-text: #ffffff;
  --on-ink: #ffffff;
  --on-ink-muted: #a9b4bf;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 4px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 18px; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }

/* ---------- App layout (logged in) ---------- */
body.app { min-height: 100vh; display: flex; flex-direction: column; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px clamp(16px, 4vw, 44px); background: var(--ink); color: var(--on-ink); }
.brand { color: var(--on-ink); font-family: var(--serif); font-size: 1.4rem; text-decoration: none; }
.brand img { display: block; height: 52px; width: auto; max-width: 60vw; }
.top nav { display: flex; gap: 22px; align-items: center; }
.top nav a { color: var(--on-ink); text-decoration: none; font-size: .9rem; font-weight: 600; opacity: .85; }
.top nav a:hover { opacity: 1; }
.who { color: var(--on-ink-muted); font-size: .9rem; }
.main { flex: 1; padding: clamp(28px, 5vw, 60px) 16px; }
.panel { max-width: 440px; margin: 0 auto; background: var(--surface); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius); }
.panel.wide { max-width: 980px; }
.foot { text-align: center; padding: 18px; font-size: .8rem; color: var(--muted); }

/* ---------- Forms ---------- */
label { display: block; margin-bottom: 16px; font-size: .9rem; font-weight: 600; color: var(--text); }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
button { width: 100%; padding: 15px 18px; font: inherit; font-weight: 600; background: var(--button); color: var(--button-text); border: 0; border-radius: var(--radius); cursor: pointer; }
button:hover { filter: brightness(1.12); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { padding-right: 64px; }
.pwd-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 3px; width: auto; padding: 6px 10px; background: none; color: var(--muted); font-size: .8rem; }
.err { background: #f8e8e6; color: #7c302a; border-left: 3px solid #a94b42; padding: 12px 14px; }
.ok  { background: #e8f3ea; color: #1f5a31; border-left: 3px solid #3b8150; padding: 12px 14px; }
.intro { color: var(--muted); margin: 0 0 28px; }
.alt { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.alt a { color: var(--text); font-weight: 600; }

/* ---------- Auth layout (login / signup) ---------- */
body.auth { background: var(--ink); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); }
.auth-story { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 36px clamp(24px, 5vw, 76px) 40px; background: var(--ink); color: var(--on-ink); }
.auth-brand { position: relative; z-index: 2; color: var(--on-ink); font-family: var(--serif); font-size: 1.4rem; text-decoration: none; }
.auth-brand img { display: block; height: 72px; width: auto; max-width: 80%; }
.auth-story-main { position: relative; z-index: 2; margin: auto 0; max-width: 680px; padding: 64px 0; }
.eyebrow { color: var(--accent); font-size: .85rem; font-weight: 700; margin: 0 0 20px; }
.auth-story h1 { font-size: clamp(2.8rem, 5.6vw, 5.2rem); line-height: .98; letter-spacing: -.04em; margin: 0 0 28px; }
.auth-story h1 em { color: var(--accent); }
.lede { color: var(--on-ink-muted); font-size: 1.1rem; line-height: 1.65; max-width: 540px; margin: 0; }
.auth-foot { position: relative; z-index: 2; margin: 0; color: var(--on-ink-muted); font-size: .8rem; opacity: .75; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 56px 28px; background: var(--paper); color: var(--text); }
.auth-form { width: min(430px, 100%); }
.auth-form h2 { font-size: clamp(2.2rem, 3.5vw, 2.9rem); letter-spacing: -.035em; margin-bottom: 12px; }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story-main { padding: 44px 0 20px; }
  .auth-story h1 { font-size: 2.8rem; }
  .auth-foot { display: none; }
}

/* ---------- Admin tables ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th, table.list td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { color: var(--muted); font-weight: 600; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: .8rem; background: var(--paper); white-space: nowrap; }
.tag.admin { background: var(--ink); color: var(--on-ink); }
button.small { width: auto; padding: 7px 12px; font-size: .85rem; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Sub headings inside panels */
h2.sub { font-size: 1.4rem; margin-top: 32px; }
.saved .tag { margin-bottom: 8px; }

/* Admin: read-only details */
.muted { color: var(--muted); }
.back { margin: 0 0 18px; font-size: .9rem; }
.back a { color: var(--muted); text-decoration: none; }
dl.facts { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 10px 24px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .9rem; font-weight: 600; }
dl.facts dd { margin: 0; line-height: 1.6; }
@media (max-width: 640px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 10px; } }

/* Review */
.decide { margin: 24px 0 8px; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.decide h2.sub { margin-top: 0; }
.decide-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.tag.state-pending { background: var(--accent); color: var(--ink); }
.tag.state-accepted { background: #1f5a31; color: #fff; }
.tag.state-declined { background: #7c302a; color: #fff; }
.tag.state-more_info { background: #f3e2b8; color: #5a4210; }

/* Space: engagement + invitations */
.engaged, .invites { list-style: none; padding: 0; margin: 0; }
.engaged li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.invites { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.invites a { font-weight: 600; text-decoration: none; }

/* Space: one card per role */
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.role-card { border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 20px 22px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.role-card h3 { font-size: 1.25rem; margin: 0; }
.role-card p { margin: 0; color: var(--muted); }
.role-card .role-label { font-size: .75rem; font-weight: 700; color: var(--accent); }
.role-card details { font-size: .9rem; }
.role-card summary { cursor: pointer; color: var(--muted); }
.role-card dl.facts { grid-template-columns: 1fr; gap: 2px; margin-top: 8px; }
.role-card dl.facts dd { margin-bottom: 6px; }
.role-link { margin-top: auto; padding-top: 6px; font-weight: 600; text-decoration: none; }

/* Admin filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.filters select { width: auto; margin: 0; padding: 9px 12px; }
td .tag { margin: 0 4px 4px 0; }

/* Account: forgot link, settings */
.forgot { margin: 14px 0 0; font-size: .9rem; }
.forgot a { color: var(--muted); }
.settings-form { max-width: 620px; }
.settings-form label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.settings-form label.check input { width: auto; margin: 0; }
.settings-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

.decide label.check { display: flex; gap: 8px; align-items: center; }
.decide label.check input { width: auto; margin: 0; }

/* Profile */
.profile-wait { display: flex; gap: 14px; align-items: center; padding: 18px 20px; background: var(--paper); border-left: 3px solid var(--accent); }
.profile-wait p { margin: 0; }
.spinner { flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.profile-form textarea { resize: vertical; }
.profile-card { border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 16px 20px; margin: 0 0 20px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.profile-card p { margin: 0; }
.ai-uses td { vertical-align: top; }
.ai-uses select { margin: 0; }

/* Inside: add a way to engage */
.engage .eyebrow { margin-bottom: 8px; }
.engage-q { margin: 22px 0; }
.engage-label { font-weight: 600; margin: 0 0 10px; }
.engage-options { display: flex; flex-wrap: wrap; gap: 8px; }
.engage-options .opt { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; font-size: .9rem; letter-spacing: 0; text-transform: none; cursor: pointer; }
.engage-options .opt input { width: auto; margin: 0; }
.engage-options .opt:has(input:checked) { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.engage-submit { width: auto; padding: 14px 26px; margin-top: 8px; }

/* Slide-in panel (inside the space). Full screen on phones. */
.panel-backdrop { position: fixed; inset: 0; background: rgba(7, 18, 31, .45); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.panel-backdrop.open { opacity: 1; pointer-events: auto; }
.side-panel { position: fixed; top: 0; right: 0; height: 100%; height: 100dvh; width: min(580px, 100vw); background: var(--paper); z-index: 1001;
  display: flex; flex-direction: column; box-shadow: -24px 0 60px rgba(0, 0, 0, .25); transform: translateX(100%); transition: transform .38s cubic-bezier(.22, .61, .36, 1); }
.side-panel.open { transform: none; }
.side-panel-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--ink); color: var(--on-ink); }
.side-panel-title { font-family: var(--serif); font-size: 1.1rem; }
.side-panel-close { width: 40px; height: 40px; padding: 0; background: transparent; color: var(--on-ink); font-size: 1.1rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; }
.side-panel iframe { flex: 1; width: 100%; border: 0; background: var(--paper); }
html.panel-locked, html.panel-locked body { overflow: hidden; }
@media (max-width: 640px) { .side-panel { width: 100vw; } }
@media (prefers-reduced-motion: reduce) { .side-panel, .panel-backdrop { transition: none; } }

.button-link { display: inline-block; padding: 12px 20px; background: var(--button); color: var(--button-text); text-decoration: none; font-weight: 600; border-radius: var(--radius); }

/* Common header (logged in) */
.top nav a.on { opacity: 1; box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 4px; }
.nav-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .2); }
@media (max-width: 760px) {
  .top { flex-wrap: wrap; }
  .top nav { flex-wrap: wrap; gap: 10px 16px; width: 100%; }
  .top .who, .nav-sep { display: none; }
}

/* Inside: initiatives to engage in */
.init-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.init-card { border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.init-pic { aspect-ratio: 16 / 9; background: var(--ink) center / cover no-repeat; }
.init-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.init-body h3 { font-size: 1.25rem; margin: 0; }
.init-body p { margin: 0; color: var(--muted); }
.init-seeking { font-size: .9rem; }
.init-actions { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.small-link { padding: 9px 14px; font-size: .9rem; }

/* Needs your attention */
.attention { margin: 8px 0 28px; padding: 18px 22px; background: var(--paper); border-left: 3px solid var(--accent); }
.attention h2.sub { margin: 0 0 10px; font-size: 1.15rem; }
.attention ul { list-style: none; margin: 0; padding: 0; }
.attention li { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.attention li:first-child { border-top: 0; }
.attention li.urgent span { font-weight: 600; }
.attention li a { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* Header badges */
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 4px; border-radius: 10px; background: var(--accent); color: var(--ink); font-size: .72rem; font-weight: 700; text-align: center; vertical-align: 1px; }
.badge.soft { background: rgba(255, 255, 255, .15); color: var(--on-ink); }

/* Mobile menu */
.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; background: transparent; border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius); flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--on-ink); transition: transform .2s, opacity .2s; }
@media (max-width: 760px) {
  .top { flex-wrap: wrap; }
  .top .nav-toggle { display: flex; }
  .top nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 0; padding-top: 12px; }
  .top.menu-open nav { display: flex; }
  .top nav a { width: 100%; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .1); box-shadow: none !important; }
  .top nav a.on { color: var(--accent); }
  .top .who { display: block; padding: 12px 0 4px; }
  .nav-sep { display: none; }
  .top.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .top.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .top.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* My profile: account */
.panel.account { margin-top: 24px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.account-grid h3 { font-size: 1.1rem; margin-bottom: 12px; }

/* Delete account */
.danger-zone { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-zone summary { cursor: pointer; color: #9b2c24; font-weight: 600; }
.danger-zone form { max-width: 520px; margin-top: 12px; }
.danger-zone label.check { display: flex; gap: 8px; align-items: center; }
.danger-zone label.check input { width: auto; margin: 0; }
button.danger { background: #9b2c24; color: #fff; }

/* Community follow-up */
.filters .export { margin-left: auto; font-weight: 600; text-decoration: none; }
.followup select { max-width: 260px; }
.tag.fu-contacted { background: #e7eef7; }
.tag.fu-in_conversation { background: #f3e2b8; color: #5a4210; }
.tag.fu-matched { background: #1f5a31; color: #fff; }
.tag.fu-not_now { background: #eee; color: #777; }

/* Email preferences */
.email-prefs { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 560px; }
.email-prefs label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.email-prefs label.check input { width: auto; margin: 0; }

/* Your impact + invite */
.impact-line { margin: -6px 0 22px; font-size: .9rem; color: var(--accent); font-weight: 600; }
.invite-card { margin: 32px 0 8px; padding: 22px 24px; border: 1px solid var(--line); background: var(--paper); }
.invite-card h2.sub { margin-top: 0; }
.invite-card select { max-width: 360px; }
.invite-row { display: flex; gap: 10px; align-items: center; }
.invite-row input { margin: 0; flex: 1; font-size: .85rem; background: var(--surface); }
.invite-share { display: flex; gap: 22px; margin-top: 12px; font-weight: 600; font-size: .9rem; }
.invite-share a { text-decoration: none; }
@media (max-width: 560px) { .invite-row { flex-direction: column; align-items: stretch; } }

.data-export { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Review team (059) */
.team-list { list-style: none; padding: 0; margin: 0 0 16px; }
.team-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.team-list form { margin: 0; }
.team-tools details { margin-top: 14px; }
.team-tools summary { cursor: pointer; font-weight: 600; }
.team-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.team-row label { flex: 1 1 260px; margin-bottom: 0; }
.people-filter { margin: 10px 0; }
.people-pick { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; margin-bottom: 12px; }
.people-pick label.check { display: flex; gap: 10px; align-items: center; margin: 0; padding: 7px 0; font-weight: 400; border-bottom: 1px solid var(--line); }
.people-pick label.check:last-child { border-bottom: 0; }
.people-pick label.check input { width: auto; margin: 0; }
.small-note { font-size: .85rem; margin: 6px 0 0; }

/* Review workspace (060) */
.confidential { padding: 10px 14px; background: var(--paper); border-left: 3px solid var(--ink); font-size: .9rem; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 18px; }
.review-read dl.facts { grid-template-columns: 1fr; gap: 2px; }
.review-read dl.facts dd { margin-bottom: 12px; }
.review-work > .decide:first-child { margin-top: 0; }
@media (max-width: 900px) { .review-grid { grid-template-columns: 1fr; } .review-work { order: -1; } }
.criterion { border: 0; padding: 0; margin: 0 0 18px; }
.criterion legend { font-weight: 700; padding: 0; }
.criterion .hint { margin: 2px 0 8px; font-size: .88rem; }
.scale { display: flex; gap: 6px; margin-bottom: 8px; }
.scale label { margin: 0; }
.scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; border-radius: var(--radius); }
.scale input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.scale input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.team-crit { margin-bottom: 16px; }
.team-crit h3 { font-size: 1rem; margin: 0 0 6px; }
.team-crit ul { list-style: none; padding: 0; margin: 0; }
.team-crit li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.score { display: inline-block; min-width: 22px; padding: 0 6px; background: var(--paper); font-weight: 700; text-align: center; }
.comment-form { margin-top: 12px; }
.comment-form textarea { margin-bottom: 10px; }
.review-list { list-style: none; padding: 0; margin: 0; }
.review-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-cta { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* Owner journey and overview (062) */
.journey { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; padding: 0; margin: 18px 0 26px; counter-reset: none; }
.journey li { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.journey li:not(:last-child)::after { content: ""; width: 28px; height: 1px; background: var(--line); margin: 0 10px; }
.journey .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); flex: 0 0 auto; }
.journey li.done { color: var(--text); }
.journey li.done .dot { background: var(--accent); border-color: var(--accent); }
.journey li.current { color: var(--text); font-weight: 700; }
.journey li.current .dot { width: 14px; height: 14px; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.journey.on-dark li { color: var(--on-ink-muted); }
.journey.on-dark li.done, .journey.on-dark li.current { color: var(--on-ink); }
.journey.on-dark li:not(:last-child)::after { background: rgba(255, 255, 255, .25); }
.journey.on-dark .dot { background: transparent; border-color: rgba(255, 255, 255, .4); }
.journey.on-dark li.done .dot { background: var(--accent); border-color: var(--accent); }
@media (max-width: 640px) { .journey { flex-direction: column; gap: 10px; } .journey li:not(:last-child)::after { display: none; } }
.hero-back { color: inherit; font-size: .9rem; margin-left: 10px; }
.stage-panel { padding: 22px 24px; background: var(--paper); border-left: 3px solid var(--accent); margin-bottom: 24px; }
.stage-panel h2 { margin: 0 0 10px; font-size: 1.35rem; }
.stage-panel p { margin: 0 0 10px; }
.stage-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 14px !important; }
.kpc-note { margin: 0 0 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); }
.kpc-note cite { display: block; margin-top: 8px; font-style: normal; font-size: .85rem; color: var(--muted); }
.next-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.next-steps > li { position: relative; padding: 18px 0 18px 46px; border-bottom: 1px solid var(--line); counter-increment: step; }
.next-steps > li::before { content: counter(step); position: absolute; left: 0; top: 18px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.next-steps > li.done::before { content: "✓"; background: var(--accent); border-color: var(--accent); color: var(--ink); }
.next-steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.next-steps p { margin: 0; }
.copy-row { display: flex; gap: 8px; margin-top: 10px; max-width: 620px; }
.copy-row input { margin: 0; }
.copy-row button { flex: 0 0 auto; }
.supporters { list-style: none; padding: 0; margin: 6px 0 0; }
.supporters li { padding: 6px 0; }
.owner-foot { margin-top: 28px; }

/* Owner runs the initiative (063) */
.edit-public { margin-top: 12px; max-width: 620px; }
.edit-public summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }
.pic-preview { display: block; max-width: 240px; margin: 0 0 12px; border: 1px solid var(--line); }
.share-row { margin-top: 12px; max-width: 720px; }
.share-label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); }
.copy-row { flex-wrap: wrap; align-items: center; max-width: none; }
.copy-row input { flex: 1 1 260px; }
.share-btn { padding: 7px 12px; font-size: .85rem; font-weight: 600; border: 1px solid var(--line); text-decoration: none; color: var(--text); border-radius: var(--radius); }

/* Matching: people who could help (066) */
.match-list { list-style: none; padding: 0; margin: 0 0 14px; }
.match-list li { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.match-list p { margin: 4px 0 0; font-size: .93rem; }
.match-score { display: inline-block; margin-left: 6px; padding: 0 7px; font-size: .8rem; font-weight: 700; background: var(--paper); border: 1px solid var(--line); }
.match-list form { margin: 0; flex: 0 0 auto; }
.match-find { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Introductions (069) */
.match-main { flex: 1 1 auto; min-width: 0; }
.intro-form { margin-top: 8px; }
.intro-form summary { cursor: pointer; display: inline-block; font-weight: 600; font-size: .9rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.intro-form form { margin-top: 10px; }
.match-sub { font-size: 1rem; margin: 18px 0 6px; }
.st-accepted { background: var(--accent); color: var(--ink); }
.invitation .kpc-note { white-space: normal; }
.invite-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-top: 18px; }
.invite-actions details { flex: 1 1 260px; }
.invite-actions summary { cursor: pointer; font-weight: 600; padding: 10px 0; }

/* Asks for help (071) */
.ask-list { list-style: none; padding: 0; margin: 10px 0 14px; }
.ask-list li.ask { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ask-list li.ask.st-done { opacity: .6; }
.ask-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ask-list p { margin: 6px 0 0; font-size: .93rem; }
.ask-status-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Offers of help (073) */
.offer-list { list-style: none; padding: 0 0 0 14px; margin: 10px 0 0; border-left: 2px solid var(--line); }
.offer-list li { padding: 8px 0; }
.offer-list li.st-declined { opacity: .6; }
.offer-list p { margin: 4px 0 0; }
.ask-group { margin-bottom: 28px; }

/* Challenge page editor (075) */
.draft-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0 26px; }
.challenge-form { max-width: 760px; }
.challenge-form textarea { line-height: 1.55; }
.challenge-link { margin: 10px 0 0; }

/* Challenge public page (076) */
.challenge-status { margin: 0 0 18px; }
.challenge { max-width: 1120px; margin: 0 auto; }
.challenge-owner-bar { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 16px; background: var(--paper); border-left: 3px solid var(--accent); }
.challenge-hero { position: relative; padding: clamp(48px, 9vw, 110px) clamp(20px, 5vw, 56px); background: var(--ink) var(--hero, none) center / cover no-repeat; color: var(--on-ink); border-radius: var(--radius); overflow: hidden; }
.challenge-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.35)); }
.challenge-hero-inner { position: relative; max-width: 760px; }
.challenge-hero .eyebrow { color: var(--on-ink-muted); }
.challenge-hero h1 { color: var(--on-ink); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; margin: 8px 0 14px; }
.challenge-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--on-ink); opacity: .9; margin: 0 0 26px; }
.challenge-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.challenge-count { font-size: .92rem; color: var(--on-ink-muted); }
.challenge-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; padding: 40px 0; }
@media (max-width: 860px) { .challenge-body { grid-template-columns: 1fr; gap: 24px; } }
.challenge-main h2 { margin: 28px 0 10px; }
.challenge-main h2:first-child { margin-top: 0; }
.challenge-main p { line-height: 1.7; }
.challenge-stats { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.challenge-stats li { padding: 14px 18px; background: var(--paper); border-left: 3px solid var(--accent); font-weight: 600; }
.challenge-vision { margin: 28px 0 0; padding: 20px 24px; border-left: 3px solid var(--ink); font-size: 1.1rem; line-height: 1.6; }
.challenge-card { padding: 24px; border: 1px solid var(--line); background: var(--surface); position: sticky; top: 90px; }
.challenge-card h2 { margin: 0 0 10px; font-size: 1.3rem; }
.challenge-card h3 { font-size: 1rem; margin: 18px 0 6px; }
.challenge-card ul { margin: 0 0 20px; padding-left: 18px; }
.challenge-led { margin-top: 14px; font-size: .9rem; }

/* Solution rooms (077) */
.rooms-switch { padding: 14px 18px; background: var(--paper); margin: 0 0 22px; }
.rooms-switch p { margin: 0 0 10px; }
.hero-link { color: var(--on-ink); font-weight: 600; }
.room-start { max-width: 680px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; }
@media (max-width: 860px) { .room-grid { grid-template-columns: 1fr; } }

/* Room public page, sharing, requests (078) */
.room-public { max-width: 760px; }
.room-join { margin: 30px 0 18px; padding: 22px 24px; border: 1px solid var(--line); background: var(--surface); }
.room-join h2 { margin-top: 0; }
.room-share { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.share-grid { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.share-grid > div { flex: 1 1 360px; }
.qr { border: 1px solid var(--line); background: #fff; padding: 6px; }
.room-cards { list-style: none; padding: 0; display: grid; gap: 12px; }
.room-cards li { padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); }
.room-cards p { margin: 6px 0; }

/* Checkbox and radio rows (079): box on the left, normal text */
label.check { display: flex; align-items: flex-start; gap: 10px; text-transform: none; letter-spacing: normal; font-weight: 400; font-size: .95rem; color: var(--text); margin: 14px 0; }
label.check input[type=checkbox], label.check input[type=radio] { width: auto; flex: 0 0 auto; margin: 3px 0 0; padding: 0; border: 0; box-shadow: none; background: none; }
label.check span { flex: 1 1 auto; }

/* Participant space (080) */
.participant-initiative { padding: 22px 0; border-bottom: 1px solid var(--line); }
.participant-initiative h2 { margin: 4px 0 6px; }
.participant-initiative h3 { font-size: 1rem; margin: 16px 0 6px; }
.participant-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .account-grid { grid-template-columns: 1fr; } }
.account-block { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
summary.danger { color: #b42318; cursor: pointer; font-weight: 600; }

/* ===================================================================================
   Workspace design layer (084)
   Navy for orientation and key moments, paper for reading and work.
   Shared and variable-based; each client sets its colours in brand/theme.css.
   =================================================================================== */
:root { --ink-2: #1f2a36; --link: var(--accent); --gold-on-ink: var(--accent); --soft: rgba(0, 0, 0, .04); }
body.app { font-size: 16px; }
.main a:not(.button-link):not(.btn-gold) { color: var(--link); }

/* Full-width navy band at the top of a page (sits under the header, edge to edge) */
.band { margin: calc(-1 * clamp(28px, 5vw, 60px)) -16px 0; padding: clamp(36px, 6vw, 72px) clamp(16px, 6vw, 80px) clamp(32px, 5vw, 56px);
        background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.band-inner { max-width: 1120px; margin: 0 auto; position: relative; }
.band .eyebrow { color: var(--gold-on-ink); margin: 0 0 12px; }
.band .eyebrow a { color: inherit !important; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.band h1 { color: var(--on-ink); font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; max-width: 900px; margin: 0 0 14px; }
.band .lede { color: var(--on-ink-muted); font-size: clamp(1.02rem, 1.6vw, 1.18rem); line-height: 1.6; max-width: 720px; margin: 0; }
.band .back { margin: 0 0 22px; font-size: .9rem; }
.band .back a { color: var(--on-ink-muted) !important; text-decoration: none; }
.band .back a:hover { color: var(--on-ink) !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { border: 1px solid rgba(255, 255, 255, .2); padding: 6px 12px; font-size: .82rem; color: var(--on-ink-muted); border-radius: 999px; }

/* Work area under a band: wide, calm, readable */
.work { max-width: 1120px; margin: clamp(24px, 4vw, 44px) auto 0; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); align-items: start; }
@media (max-width: 900px) { .work-grid { grid-template-columns: 1fr; } }
.sheet { background: var(--surface); border: 1px solid var(--line); padding: clamp(22px, 3.5vw, 36px); }
.sheet + .sheet { margin-top: 20px; }
.sheet h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 6px 0 14px; }
.sheet p { line-height: 1.65; }
.sheet .eyebrow { margin: 0; }
.sheet-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }

/* Navy side panel for "who and what next" */
.dark-panel { background: var(--ink); color: var(--on-ink); padding: clamp(22px, 3vw, 30px); }
.dark-panel + .dark-panel { margin-top: 20px; }
.dark-panel h2, .dark-panel h3 { color: var(--on-ink); }
.dark-panel h2 { font-size: 1.5rem; margin: 6px 0 14px; }
.dark-panel .eyebrow { color: var(--gold-on-ink); margin: 0; }
.dark-panel p, .dark-panel .muted { color: var(--on-ink-muted); }
.dark-panel a:not(.button-link):not(.btn-gold) { color: var(--on-ink) !important; }
.dark-panel input, .dark-panel textarea { background: rgba(255, 255, 255, .95); }
.dark-panel label { color: var(--on-ink-muted); }
.dark-panel button.ghost { color: var(--on-ink); border-color: rgba(255, 255, 255, .3); }
.people { list-style: none; padding: 0; margin: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.people li:first-child { border-top: 0; }
.people .initials { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700;
                    background: var(--paper); color: var(--ink); }
.people small { display: block; color: var(--on-ink-muted); font-size: .82rem; }

/* Gold action button (for meaningful moves, used sparingly) */
.btn-gold { display: inline-block; background: var(--accent); color: var(--ink) !important; padding: 11px 18px; font-weight: 700; font-size: .9rem;
            text-decoration: none; border-radius: 999px; border: 0; width: auto; cursor: pointer; }
button.btn-gold { font-family: inherit; }

/* Compact list rows (scan fast) */
.rows { list-style: none; padding: 0; margin: 0; }
.rows li { padding: 14px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows .row-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rows p { margin: 6px 0 0; }
/* Room on the design layer (084) */
.room-angle { font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; margin: 12px 0 0; }
.dark-panel .label, .dark-panel label.check span { color: var(--on-ink); }
.dark-panel .copy-row input { color: var(--text); }
.dark-panel .share-links { display: flex; gap: 18px; margin: 12px 0; font-size: .92rem; }
.dark-panel .qr { margin-top: 6px; }
.dark-panel details summary { color: var(--on-ink); cursor: pointer; font-weight: 600; }
.dark-rows li { border-top-color: rgba(255, 255, 255, .1); }
.dark-rows p { color: var(--on-ink-muted); }
.dark-panel .ask-status-form { margin-top: 10px; }

/* Knowledge Pledges (085) */
.pledges { margin-top: 20px; }
.pledge-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.pledge { padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--paper); }
.pledge-text { font-family: var(--serif); font-size: 1.12rem; margin: 0; line-height: 1.45; }
.pledge-meta { margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
.pledge-close summary { cursor: pointer; font-size: .88rem; margin-top: 8px; color: var(--link); }
.pledge-close form { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.pledge-close label { flex: 1 1 100%; }
.pledge-form { margin-top: 18px; }
.pledge-form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pledge-form-row label { flex: 0 1 220px; margin-bottom: 0; }
.done-mark { color: #1f5a31; font-weight: 700; }

/* KPC home on the design layer (086) */
.home-band h1 em { font-style: italic; color: var(--gold-on-ink); font-weight: 400; }
.home-band h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
.attention-sheet { border-left: 3px solid var(--accent); }
.att-rows li { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.att-rows li a { white-space: nowrap; font-weight: 600; }
.att-rows li.urgent span { font-weight: 600; }
.att-rows li.att-more { display: none; }
.show-all .att-rows li.att-more { display: flex; }
.att-toggle { margin-top: 10px; }
.difference { margin: 30px 0; }
.move-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 12px; }
.move-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--ink); color: var(--on-ink) !important; text-decoration: none;
             border: 1px solid transparent; transition: border-color .2s, transform .2s; min-height: 190px; }
.move-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.move-type { font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: var(--gold-on-ink); font-weight: 700; }
.move-card strong { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; line-height: 1.2; }
.move-text { color: var(--on-ink-muted); font-size: .92rem; line-height: 1.5; flex: 1; }
.move-cta { color: var(--gold-on-ink); font-weight: 700; font-size: .9rem; }
.work-grid .sheet + .sheet, .difference + .sheet { margin-top: 20px; }
.row-head-line { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.row-head-line > a { white-space: nowrap; font-weight: 600; }
.stream { list-style: none; padding: 0; margin: 8px 0 0; }
.stream li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.stream li:first-child { border-top: 0; }
.stream p { margin: 4px 0 0; color: var(--muted); }
.ev-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--line); }
.ev-help .ev-dot, .ev-moved .ev-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(201, 162, 90, .18); }
.ev-room .ev-dot { background: var(--ink); }
.engaged details summary { color: var(--on-ink-muted) !important; font-size: .85rem; cursor: pointer; margin-top: 6px; }
.engaged dl.facts dt { color: var(--on-ink-muted); }
.engaged dl.facts dd { color: var(--on-ink); }
.dark-panel select { width: 100%; }
.invite-panel label { margin-top: 10px; }

/* Initiatives list and initiative as a place (087) */
.list-eyebrow { margin: 34px 0 12px; }
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.place-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text) !important;
              transition: border-color .2s, transform .2s; }
.place-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.place-pic { height: 150px; background: var(--ink) center / cover no-repeat; color: var(--gold-on-ink); display: grid; place-items: center;
             font-family: var(--serif); font-size: 2.6rem; }
.place-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.place-body strong { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; line-height: 1.2; }
.place-text { color: var(--muted); line-height: 1.5; }
.place-seeking { font-size: .92rem; line-height: 1.5; flex: 1; }
.place-card .move-type { color: var(--link); }
.place-card .move-cta { color: var(--link); }
.initiative-band { background: linear-gradient(90deg, rgba(7, 18, 31, .97), rgba(7, 18, 31, .78) 60%, rgba(7, 18, 31, .55)), var(--hero, none) center / cover no-repeat, var(--ink); }
.story p { line-height: 1.7; }

/* Owner page, asks on the design layer (088) */
.band .journey { margin: 26px 0 0; }
.dark-note { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .15); color: var(--on-ink); }
.dark-note cite { color: var(--on-ink-muted); }
.dark-panel .share-row { margin-top: 14px; }
.dark-panel .share-label { color: var(--on-ink-muted); }
.dark-panel .share-links { display: flex; gap: 16px; margin: 6px 0 0; font-size: .9rem; }
.asks-work { max-width: 860px; }
.asks-work .sheet + .sheet { margin-top: 20px; }
.ask-group .eyebrow a { text-decoration: none; }
.sheet .ask-list li.ask:first-child { padding-top: 6px; }
.sheet .offer-list { border-left-color: var(--accent); }
