/* Co-Design Hub v2 components (1 Oct 2026). Tokens only, from tokens.css. Mobile-first; WCAG 2.2 AA targets (44px taps). */

/* ---------- app shell helpers ---------- */
.hb-wrap { max-width: var(--fo-max); margin: 0 auto; padding: 0 var(--fo-gutter); }
.hb-section { padding: clamp(3rem, 2rem + 4vw, 6rem) 0; }
.hb-eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: var(--fo-micro); letter-spacing: .02em; color: var(--fo-green); text-transform: none; }
.hb-eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--fo-yellow); }
.hb-title { margin: .6rem 0 0; font-weight: 300; font-size: var(--fo-display-m); letter-spacing: var(--fo-track-display); line-height: 1.06; text-wrap: balance; }
.hb-title b { font-weight: 800; }
.hb-sub { color: var(--fo-ink-2); font-size: var(--fo-body-l); max-width: 56ch; margin: 1rem 0 0; }

/* ---------- "For you" chooser ---------- */
.hb-foryou { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.hb-chip { min-height: 44px; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: var(--fo-radius-pill); border: 1.5px solid var(--fo-line); background: var(--fo-card); color: var(--fo-ink); font: 600 var(--fo-small)/1 var(--fo-font); cursor: pointer; transition: background .2s, border-color .2s, transform .2s var(--fo-ease-back); }
.hb-chip:hover { border-color: var(--fo-green); }
.hb-chip[aria-pressed="true"] { background: var(--fo-green); border-color: var(--fo-green); color: var(--fo-white); }
.hb-chip .n { font-weight: 800; opacity: .7; }

/* ---------- stage ribbon (the five stages, people walk along it) ---------- */
.hb-stages { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; counter-reset: s; }
.hb-stages li { position: relative; padding: 3.2rem .25rem 0; text-align: center; font-weight: 800; font-size: var(--fo-small); color: var(--fo-ink-3); counter-increment: s; }
.hb-stages li::before { content: counter(s); position: absolute; top: 0; left: 50%; translate: -50% 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--fo-paper-2); color: var(--fo-ink-3); font-size: var(--fo-small); }
.hb-stages li::after { content: ""; position: absolute; top: 19px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 2px; background: var(--fo-line); }
.hb-stages li:last-child::after { display: none; }
.hb-stages li.done { color: var(--fo-ink); }
.hb-stages li.done::before { background: var(--fo-green); color: var(--fo-white); content: "\2713"; }
.hb-stages li.done::after { background: var(--fo-green); }
.hb-stages li.now { color: var(--fo-green); }
.hb-stages li.now::before { background: var(--fo-yellow); color: var(--fo-ink); box-shadow: 0 0 0 6px rgba(224, 190, 0, .25); }
.hb-stages small { display: block; font-weight: 500; color: var(--fo-ink-3); margin-top: .2rem; font-size: var(--fo-micro); }
@media (max-width: 640px) {
  .hb-stages { grid-template-columns: 1fr; gap: 0; }
  .hb-stages li { text-align: left; padding: .6rem 0 1.1rem 3.3rem; min-height: 56px; }
  .hb-stages li::before { left: 0; translate: 0 0; top: .35rem; }
  .hb-stages li::after { left: 19px; right: auto; top: 46px; bottom: -6px; width: 2px; height: auto; }
}

/* ---------- trust bar (live counts; demo counts from local data) ---------- */
.hb-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 2rem; }
@media (min-width: 760px) { .hb-kpis { grid-template-columns: repeat(5, 1fr); } }
.hb-kpi { background: var(--fo-card); border-radius: 22px; padding: 1.1rem 1.2rem; box-shadow: var(--fo-shadow-card); }
.hb-kpi b { display: block; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); font-weight: 800; letter-spacing: var(--fo-track-display); color: var(--fo-green); line-height: 1; }
.hb-kpi span { font-size: var(--fo-micro); color: var(--fo-ink-2); font-weight: 600; }

/* ---------- toolbar: search + filters ---------- */
.hb-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1.5rem 0 1.25rem; }
.hb-search { flex: 1 1 260px; min-height: 48px; border-radius: var(--fo-radius-pill); border: 1.5px solid var(--fo-line); background: var(--fo-card); padding: 0 1.2rem; font: 500 var(--fo-body)/1 var(--fo-font); color: var(--fo-ink); }
.hb-search:focus { outline: 3px solid var(--fo-green); outline-offset: 2px; }
.hb-select { min-height: 48px; border-radius: var(--fo-radius-pill); border: 1.5px solid var(--fo-line); background: var(--fo-card); padding: 0 1rem; font: 600 var(--fo-small)/1 var(--fo-font); color: var(--fo-ink); }

/* ---------- idea cards ---------- */
.hb-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .hb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .hb-grid { grid-template-columns: repeat(3, 1fr); } }
.hb-card { position: relative; display: flex; flex-direction: column; gap: .7rem; background: var(--fo-card); border-radius: var(--fo-radius-card); padding: 1.35rem 1.35rem 1.2rem; box-shadow: var(--fo-shadow-card); transition: transform .35s var(--fo-ease-out); }
.hb-card:hover { transform: translateY(-3px); }
.hb-card__top { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.hb-tag { display: inline-flex; align-items: center; gap: .35rem; font-size: var(--fo-micro); font-weight: 700; color: var(--fo-ink-2); background: var(--fo-paper-2); border-radius: var(--fo-radius-pill); padding: .3rem .7rem; }
.hb-tag--stage { background: var(--fo-green-10); color: var(--fo-green); }
.hb-tag--eg { background: transparent; color: var(--fo-ink-3); padding: 0; font-weight: 600; }
.hb-card h3 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: var(--fo-track-tight); line-height: 1.2; }
.hb-card h3 a { color: var(--fo-ink); text-decoration: none; }
.hb-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.hb-card p { margin: 0; color: var(--fo-ink-2); font-size: var(--fo-small); line-height: 1.55; }
.hb-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding-top: .6rem; border-top: 1px solid var(--fo-line); }
.hb-meta { font-size: var(--fo-micro); color: var(--fo-ink-3); font-weight: 600; }

/* ---------- the vote button: one tap, big target, clear state ---------- */
.hb-vote { position: relative; z-index: 2; min-width: 88px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: var(--fo-radius-pill); border: 2px solid var(--fo-green); background: var(--fo-card); color: var(--fo-green); font: 800 var(--fo-small)/1 var(--fo-font); cursor: pointer; transition: background .2s, color .2s, transform .25s var(--fo-ease-back); }
.hb-vote:hover { background: var(--fo-green-10); }
.hb-vote:active { transform: scale(.94); }
.hb-vote svg { width: 18px; height: 18px; }
.hb-vote[aria-pressed="true"] { background: var(--fo-green); color: var(--fo-white); box-shadow: var(--fo-shadow-cta); }
.hb-vote--lg { min-height: 60px; min-width: 100%; font-size: var(--fo-body); }
.hb-pop { position: absolute; pointer-events: none; font-weight: 800; color: var(--fo-green); animation: hb-pop .8s var(--fo-ease-out) forwards; }
@keyframes hb-pop { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -34px); } }

/* ---------- vote meter: little people, one per 10 votes ---------- */
.hb-people { display: flex; flex-wrap: wrap; gap: 3px; margin-top: .25rem; }
.hb-people i { width: 9px; height: 14px; border-radius: 5px 5px 2px 2px; background: var(--fo-mint); position: relative; }
.hb-people i::before { content: ""; position: absolute; top: -6px; left: 1.5px; width: 6px; height: 6px; border-radius: 50%; background: inherit; }
.hb-people i.on { background: var(--fo-green); }
.hb-people i.me { background: var(--fo-yellow); }

/* ---------- idea page ---------- */
.hb-idea { display: grid; gap: 2rem; }
@media (min-width: 960px) { .hb-idea { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.hb-panel { background: var(--fo-card); border-radius: var(--fo-radius-panel); padding: clamp(1.4rem, 1rem + 2vw, 2.4rem); box-shadow: var(--fo-shadow-card); }
.hb-sticky { position: sticky; top: 96px; }
.hb-log { list-style: none; margin: 0; padding: 0; }
.hb-log li { position: relative; padding: 0 0 1.4rem 1.8rem; border-left: 2px solid var(--fo-line); margin-left: 6px; }
.hb-log li::before { content: ""; position: absolute; left: -8px; top: .2rem; width: 14px; height: 14px; border-radius: 50%; background: var(--fo-green); box-shadow: 0 0 0 4px var(--fo-paper); }
.hb-log li.next::before { background: var(--fo-paper-2); border: 2px dashed var(--fo-ink-3); }
.hb-log time { font-size: var(--fo-micro); font-weight: 700; color: var(--fo-ink-3); }
.hb-log p { margin: .2rem 0 0; }

/* ---------- submit wizard ---------- */
.hb-wizard { max-width: 720px; margin: 0 auto; }
.hb-progress { height: 8px; border-radius: 8px; background: var(--fo-paper-2); overflow: hidden; margin-bottom: 1.5rem; }
.hb-progress > i { display: block; height: 100%; width: 0; background: var(--fo-green); transition: width .5s var(--fo-ease-out); }
.hb-step { display: none; }
.hb-step.on { display: block; animation: hb-in .45s var(--fo-ease-out); }
@keyframes hb-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hb-field { display: grid; gap: .5rem; margin: 1.25rem 0; }
.hb-field label { font-weight: 800; }
.hb-field .hint { font-size: var(--fo-micro); color: var(--fo-ink-3); }
.hb-input, .hb-textarea { width: 100%; min-height: 52px; border-radius: var(--fo-radius-field); border: 1.5px solid var(--fo-line); background: var(--fo-card); padding: .9rem 1rem; font: 500 var(--fo-body)/1.5 var(--fo-font); color: var(--fo-ink); }
.hb-textarea { min-height: 130px; resize: vertical; }
.hb-input:focus, .hb-textarea:focus { outline: 3px solid var(--fo-green); outline-offset: 2px; }
.hb-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.hb-option { min-height: 64px; border-radius: 18px; border: 1.5px solid var(--fo-line); background: var(--fo-card); padding: .8rem 1rem; text-align: left; font: 700 var(--fo-small)/1.3 var(--fo-font); color: var(--fo-ink); cursor: pointer; }
.hb-option[aria-pressed="true"] { border-color: var(--fo-green); background: var(--fo-green-10); box-shadow: inset 0 0 0 1px var(--fo-green); }
.hb-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.hb-btn { min-height: 52px; padding: 0 1.4rem; border-radius: var(--fo-radius-pill); border: 1.5px solid var(--fo-line); background: var(--fo-card); font: 700 var(--fo-body)/1 var(--fo-font); color: var(--fo-ink); cursor: pointer; }
.hb-done { text-align: center; padding: 2rem 0; }
.hb-done .big { font-size: var(--fo-display-m); font-weight: 800; letter-spacing: var(--fo-track-display); }

/* ---------- status page ("what happened to my idea") ---------- */
.hb-status { display: grid; gap: 1rem; }
.hb-status .hb-card { flex-direction: row; flex-wrap: wrap; align-items: center; }
.hb-empty { text-align: center; padding: 3rem 1rem; color: var(--fo-ink-2); }

/* ---------- utility ---------- */
.hb-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.hb-between { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.hb-note { font-size: var(--fo-micro); color: var(--fo-ink-3); }
@media (prefers-reduced-motion: reduce) { .hb-card, .hb-vote, .hb-step.on, .hb-pop, .hb-progress > i { transition: none; animation: none; } }

/* ---------- v2 (1 Oct 2026, David's feedback): the three pathways on a green angled panel ---------- */
.hb-paths { position: relative; margin-top: clamp(2rem, 1rem + 3vw, 3.5rem); padding: clamp(1.25rem, .8rem + 2vw, 2.5rem); border-radius: var(--fo-radius-panel); background: var(--fo-deep); overflow: hidden; }
.hb-paths::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, var(--fo-green) 0 38%, transparent 38%); opacity: .55; }
.hb-paths__grid { position: relative; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .hb-paths__grid { grid-template-columns: repeat(3, 1fr); } }
.hb-path { position: relative; display: grid; grid-template-rows: auto 1fr; border-radius: var(--fo-radius-card); background: var(--fo-card); color: var(--fo-ink); text-decoration: none; overflow: hidden; min-height: 44px; transition: transform .4s var(--fo-ease-back), box-shadow .4s; }
.hb-path:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55); color: var(--fo-ink); }
.hb-path img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--fo-paper); }
.hb-path__txt { padding: 1.1rem 1.25rem 1.3rem; display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.hb-path b { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: var(--fo-track-tight); line-height: 1.15; }
.hb-path span { display: block; font-size: var(--fo-small); color: var(--fo-ink-2); margin-top: .2rem; }
.hb-path .go { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--fo-action); color: var(--fo-white); font-weight: 800; box-shadow: var(--fo-shadow-cta); }
.hb-path--lead { outline: 3px solid var(--fo-yellow); outline-offset: -3px; }

/* campaign line (suburb + year + focus) */
.hb-campaign { display: inline-flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.hb-campaign span { font-weight: 700; font-size: var(--fo-micro); padding: .4rem .8rem; border-radius: var(--fo-radius-pill); background: var(--fo-green-10); color: var(--fo-green); }

/* scoring: community 40, expert 30, feasibility 30 */
.hb-score { display: grid; grid-template-columns: 4fr 3fr 3fr; gap: 4px; margin-top: 1rem; max-width: 520px; }
.hb-score i { display: block; height: 14px; border-radius: 7px; background: var(--fo-green); }
.hb-score i:nth-child(2) { background: var(--fo-yellow); } .hb-score i:nth-child(3) { background: var(--fo-sage); }
.hb-score-key { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .6rem; font-size: var(--fo-micro); font-weight: 700; color: var(--fo-ink-2); }

/* partner types (who rallies behind the campaign) */
.hb-rally { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.hb-rally span { padding: .7rem 1.1rem; border-radius: var(--fo-radius-pill); background: var(--fo-card); box-shadow: var(--fo-shadow-card); font-weight: 700; }

/* the crowd gets its own stage: a band with no words, so people never sit behind text */
.hb-band { height: 70svh; min-height: 420px; position: relative; }
.hb-band__cap { position: absolute; left: 0; right: 0; bottom: 2rem; text-align: center; font-weight: 800; color: var(--fo-ink-3); font-size: var(--fo-small); }
/* hero headline for the hub: sized to fit beside the crowd (fixes clipping, 1 Oct) */
.hb-hero-h { font-size: clamp(2.6rem, 1.3rem + 4.2vw, 5rem) !important; max-width: 12ch !important; }
.fo-scene--hero .fo-scene__text { max-width: 38rem; }

/* ---------- round 2 (CRITIQUE-2, 1 Oct 2026) ---------- */
.hb-tag--lead { background: var(--fo-yellow); color: var(--fo-ink); }
.hb-more { display: none; font-weight: 700; font-size: var(--fo-small); text-decoration: none; }
.hb-split { grid-column: 1 / -1; margin: 2rem 0 .25rem; }
.hb-clock { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: var(--fo-small); color: var(--fo-ink); background: var(--fo-card); border-radius: var(--fo-radius-pill); padding: .5rem .9rem; box-shadow: var(--fo-shadow-card); }
.hb-clock::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--fo-action); animation: hb-blink 2s var(--fo-ease-inout) infinite; }
@keyframes hb-blink { 50% { opacity: .25; } }
.hb-views { display: inline-flex; gap: .4rem; }
.hb-share { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.hb-share .hb-btn { min-height: 44px; font-size: var(--fo-small); text-decoration: none; display: inline-flex; align-items: center; color: var(--fo-ink); }
.hb-week { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .6rem; }
@media (min-width: 900px) { .hb-week { grid-template-columns: repeat(3, 1fr); } }
.hb-week li { background: var(--fo-card); border-radius: 18px; padding: .9rem 1rem; box-shadow: var(--fo-shadow-card); font-size: var(--fo-small); line-height: 1.45; }
.hb-week b { display: block; color: var(--fo-green); font-size: var(--fo-micro); }
.hb-week span { display: block; color: var(--fo-ink-3); font-size: var(--fo-micro); margin-top: .2rem; }
.hb-band { height: 42svh; min-height: 280px; }
.hb-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin-top: 1.75rem; }
[data-vote] ~ .hb-note, .hb-panel [data-follow] { width: 100%; }
@media (max-width: 719px) {
  .hb-card h3 a::after { display: none; }           /* on phone the vote is the tap; reading is an explicit link */
  .hb-card__foot { flex-direction: column; align-items: stretch; }
  .hb-card__foot .hb-vote { width: 100%; }
  .hb-more { display: inline-block; }
  .hb-path img { aspect-ratio: 16 / 6; }
}
