/* HQ (#35): the Headquarters panel, its sheets (seat, ladder, scoreboard, board meeting) and the celebration card. */
.hq, .hq-sheet, .hq-board { --hq-line: rgba(243,235,216,.28); }
.hq .good, .hq-sheet .good, .hq-board .good { color: var(--good); }
.hq .bad, .hq-sheet .bad, .hq-board .bad { color: var(--stamp); }
.hq-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
.hq-slot { display: grid; min-width: 0; }
.hq-slot:empty { display: none; }
.hq-slot > * { min-width: 0; }
.hq-top { display: grid; gap: 12px; }
.hq-top:empty { display: none; }
.hq-card { text-align: left; color: var(--ink); }
.hq-card p { margin: 0; }
.hq-split { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hq .grow, .hq-sheet .grow, .hq-board .grow { flex: 1; }
.hq .big, .hq-sheet .big { font-size: 26px; line-height: 1.05; padding-top: 3px; }
.hq-small { font-size: 13px; }

/* header and tabs */
.hq-company { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 0 4px; text-align: left; color: var(--ink); }
.hq-company .txt { display: grid; gap: 2px; min-width: 0; }
.hq-company .eyebrow { font-size: 12px; }
.hq-company .name { font-size: 28px; padding-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-company .rn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--accent); flex: none; }
.hq-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.08); }
.hq-tabs button { position: relative; flex: 1; min-width: 0; display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border-radius: 999px; color: rgba(255,255,255,.6); font: 600 11px/1 system-ui, sans-serif; }
.hq-tabs button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hq-tabs button.on { color: #fff; background: rgba(255,255,255,.18); }
.hq-tabs .alertdot { position: absolute; top: 6px; right: calc(50% - 22px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* buttons used inside HQ */
.hq .primarybtn, .hq .secondarybtn, .hq-sheet .secondarybtn, .hq-sheet .primarybtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; font: 600 16px system-ui, sans-serif; }
.hq .secondarybtn, .hq-sheet .secondarybtn { background: rgba(243,235,216,.12); color: var(--accent); }
.hq .secondarybtn:disabled { opacity: .4; }
.hq .full, .hq-sheet .full { width: 100%; }
.hq-btns { display: flex; gap: 8px; }
.hq-btns .bigbtn { flex: 1; width: auto; padding: 11px; font-size: 16px; }
.destructivebtn { color: var(--stamp) !important; padding: 12px !important; }

/* ladder */
.hq-journey { width: 100%; cursor: pointer; }
.hq-deadline { font: 600 12px system-ui, sans-serif; color: rgba(235,235,245,.6); flex: none; }
.hq-deadline.late { color: var(--stamp); }
.hq-ask { font-size: 15px; }
.hq-reward { color: var(--accent); font: 600 12px system-ui, sans-serif; }
.hq-dots { display: flex; align-items: center; gap: 4px; color: rgba(235,235,245,.6); }
.hq-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hq-dots .dot.three { background: var(--good); } .hq-dots .dot.done { background: rgba(255,255,255,.3); }
.hq-dots .dot.some { background: var(--accent); } .hq-dots .dot.current { background: rgba(242,165,65,.35); }
.hq-stars-total { color: var(--accent); font-size: 15px; margin-right: 4px; }

/* contract and investor */
.hq-who { display: flex; gap: 10px; align-items: center; }
.hq-who b { font-size: 15px; font-weight: 600; } .hq-who p { font-size: 14px; }
.hq-emoji { font-size: 26px; width: 36px; text-align: center; flex: none; }
.hq-emoji.big { font-size: 40px; width: 50px; }
.hq-last { display: flex; gap: 6px; align-items: center; font-size: 13px; }

/* executives */
.hq-seats { display: grid; gap: 8px; }
.hq-seat { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); color: var(--ink); text-align: left; width: 100%; }
.hq-seat.filled { background: rgba(255,255,255,.08); }
.hq-seat .ic { width: 32px; display: grid; place-items: center; color: rgba(235,235,245,.6); }
.hq-seat.filled .ic { color: var(--accent); }
.hq-seat .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hq-seat .txt b { font-size: 17px; padding-top: 2px; }
.hq-seat .nm { font-weight: 600; font-size: 15px; }
.hq-seat .right { display: grid; justify-items: end; gap: 2px; }
.hq-seat .hire { color: var(--accent); font-size: 15px; font-weight: 600; }
.hq-seat > .sf:last-child { color: rgba(235,235,245,.6); }
.hq-stars { display: inline-flex; gap: 1px; color: var(--accent); }
.hq-stars .sf { opacity: .95; }
.hq-prof { display: grid; gap: 8px; }
.hq-quote { font-style: italic; font-size: 16px; color: rgba(235,235,245,.6); }
.hq-fx { display: flex; flex-wrap: wrap; gap: 6px; }
.hq-fx span { padding: 4px 8px; border-radius: 999px; font: 600 12px system-ui, sans-serif; background: rgba(63,167,160,.25); color: var(--teal); }
.hq-trait { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font: 600 12px system-ui, sans-serif; background: rgba(232,85,62,.2); color: var(--stamp); }
.hq-trait.steady { background: rgba(52,199,89,.2); color: var(--good); }
.hq-kv { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 16px; }
.hq-kv span { color: var(--ink); } .hq-kv b { font-weight: 600; font-variant-numeric: tabular-nums; }
.hq-kv b.big { font-size: 20px; }
.hq-card hr { border: 0; border-top: .5px solid rgba(255,255,255,.18); width: 100%; margin: 0; }
.hq-auto { padding: 0; align-items: flex-start; }
.hq-auto .lbl { display: grid; gap: 2px; font-size: 16px; }
.hq-auto small { font-size: 12px; line-height: 1.3; }
.hq-entry { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; }
.hq-entry .d { width: 58px; flex: none; color: rgba(235,235,245,.6); font-weight: 400; }
.hq-entry .t { flex: 1; }
.hq-entry b { font-size: 12px; }
.hq-cands { font-size: 21px; margin: 4px 0 0; }
.hq-duty { font-size: 15px; margin: 0; }

/* scoreboard */
.hq-score { display: flex; align-items: center; gap: 10px; padding: 2px 0; }
.hq-score .rank { width: 26px; text-align: center; font-size: 18px; color: rgba(235,235,245,.6); }
.hq-score .rank.first { color: var(--accent); }
.hq-score .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hq-score .txt b { font-size: 15px; font-weight: 600; }
.hq-score .txt .secondary { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-score .now { margin-left: 6px; padding: 1px 5px; border-radius: 999px; background: var(--accent); color: #000; font: 800 10px system-ui, sans-serif; }
.hq-score .pts { font-size: 18px; }
.hq-lines { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; font-size: 12px; }
.hq-lines .r { text-align: right; font-weight: 400; }
.note.small { font-size: 11px; }

/* businesses */
.hq-bhead { display: flex; align-items: flex-start; gap: 10px; }
.hq-bname { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }
.hq-bname b { font-size: 17px; font-weight: 600; }
.hq-badge { padding: 3px 8px; gap: 4px; }
.hq-badge .din { font-size: 11px; padding-top: 0; letter-spacing: .05em; font-family: system-ui, sans-serif; font-weight: 700; }
.hq-yest { display: grid; justify-items: end; gap: 2px; }
.hq-yest b { font-size: 17px; }
.hq-yest span { font-size: 11px; color: rgba(235,235,245,.6); }
.hq-bars { width: 100%; height: 40px; }
.hq-bars .up { fill: var(--accent); } .hq-bars .down { fill: var(--stamp); }
.hq-split.note span .sf { vertical-align: -2px; }
.hq-pay { display: flex; gap: 6px; align-items: center; font-size: 12px; color: rgba(235,235,245,.6); }
.hq-pay.good { color: var(--good); }

/* sheets */
.hq-sheet { gap: 14px; }
.hq-intro { margin: 0; padding: 0 2px; }
.hq-lrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; }
.hq-lrow.locked { opacity: .55; }
.hq-lrow .num-badge { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 18px; padding-top: 3px; margin-top: 2px; }
.hq-lrow.done .num-badge { background: rgba(52,199,89,.25); } .hq-lrow.current .num-badge { background: rgba(242,165,65,.3); }
.hq-lrow .txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.hq-lrow .txt > b { font-size: 17px; }
.hq-lrow .txt .secondary { font-size: 12px; }
.hq-lrow .meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 11px; }
.hq-lrow .res { color: var(--accent); font-size: 12px; }
.hq-lrow .res.none { color: rgba(235,235,245,.6); }

/* celebration */
.hq-burst { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.hq-celebrate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none; }
.hq-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hq-ccard { pointer-events: auto; cursor: pointer; width: min(320px, calc(100% - 48px)); padding: 18px 22px; text-align: center; display: grid; gap: 6px; justify-items: center;
  overflow: hidden; background: var(--ink); color: var(--paper); border: 3px solid var(--accent); border-radius: 26px; box-shadow: 0 8px 14px rgba(0,0,0,.35); animation: hqpop .42s cubic-bezier(.3,1.5,.5,1) both; }
.hq-ccard .badge { font-size: 44px; line-height: 1.2; animation: hqbadge .42s cubic-bezier(.3,1.5,.5,1) both; }
.hq-ccard h3 { margin: 4px 0 0; font-size: 28px; }
.hq-ccard p { margin: 0; font-size: 13px; opacity: .85; }
.hq-celebrate.still .hq-ccard, .hq-celebrate.still .hq-ccard .badge { animation: none; }
@keyframes hqpop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes hqbadge { from { transform: scale(.2) rotate(-30deg); } to { transform: none; } }

/* board meeting */
.hq-board { gap: 18px; padding-top: 12px; }
.hq-bh { display: grid; gap: 8px; }
.hq-eyebrow { display: inline-flex; align-items: center; gap: 6px; font: 700 12px system-ui, sans-serif; letter-spacing: .8px; text-transform: uppercase; color: var(--accent); }
.hq-stakes { margin: 0; font: 400 15px/1.35 var(--round); color: rgba(235,235,245,.6); }
.hq-count { font: 600 12px system-ui, sans-serif; color: rgba(235,235,245,.6); margin-bottom: -8px; }
.hq-letter { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 17px; padding-top: 3px; box-sizing: border-box; background: rgba(243,235,216,.1); color: rgba(243,235,216,.7); }
.hq-opt.right .hq-letter { background: rgba(52,199,89,.2); color: var(--good); } .hq-opt.wrong .hq-letter { background: rgba(242,165,65,.2); color: var(--accent); }
.hq-bh h2 { margin: 0; font-size: 30px; line-height: 1.05; font-family: var(--din); padding-top: 3px; }
.hq-progress { display: flex; gap: 6px; padding-top: 4px; }
.hq-progress i { flex: 1; height: 6px; border-radius: 3px; background: rgba(243,235,216,.15); }
.hq-progress i.now { background: rgba(243,235,216,.5); } .hq-progress i.right { background: var(--good); } .hq-progress i.wrong { background: var(--accent); }
.hq-q { display: grid; gap: 14px; animation: hqin .3s ease-out; }
.hq-qtext { margin: 0; font: 600 20px/1.25 var(--round); }
.hq-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; text-align: left; font: 400 17px/1.3 var(--round); color: var(--ink);
  background: rgba(243,235,216,.08); border: 2px solid transparent; }
.hq-opt.right { background: rgba(52,199,89,.18); border-color: var(--good); }
.hq-opt.right .sf { color: var(--good); }
.hq-opt.wrong { background: rgba(242,165,65,.18); border-color: var(--accent); }
.hq-opt.dim { opacity: .5; }
.hq-opt.shake { animation: hqshake .5s; }
.hq-explain { display: grid; gap: 8px; padding: 14px; border-radius: 14px; justify-items: start; animation: hqin .3s ease-out; }
.hq-explain.good { background: rgba(52,199,89,.12); } .hq-explain.bad { background: rgba(242,165,65,.12); }
.hq-explain h4 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 22px; font-family: var(--din); padding-top: 3px; }
.hq-explain.good h4 { color: var(--good); } .hq-explain.bad h4 { color: var(--accent); }
.hq-explain p { margin: 0; font: 400 16px/1.35 var(--round); }
.hq-result { display: grid; gap: 16px; animation: hqpop .45s cubic-bezier(.3,1.3,.5,1) both; }
.hq-rstars { display: flex; align-items: center; gap: 4px; color: rgba(243,235,216,.3); }
.hq-rstars span.on { color: var(--accent); animation: hqpop .4s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--i) * .12s); }
.hq-rstars b { font-size: 18px; color: rgba(235,235,245,.6); }
.hq-outcome { display: flex; gap: 14px; align-items: flex-start; }
.hq-outcome .ico { width: 60px; height: 60px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.hq-outcome.good .ico { color: var(--good); background: rgba(52,199,89,.16); } .hq-outcome.bad .ico { color: var(--stamp); background: rgba(232,85,62,.16); }
.hq-outcome h3 { margin: 0; font-size: 28px; line-height: 1.05; font-family: var(--din); padding-top: 3px; }
.hq-outcome p { margin: 4px 0 0; font: 400 16px/1.35 var(--round); }
.hq-effects { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font: 400 15px var(--round); }
.hq-effects li { display: flex; gap: 8px; align-items: center; }
.hq-board.still .hq-q, .hq-board.still .hq-explain, .hq-board.still .hq-result, .hq-board.still .hq-opt.shake, .hq-board.still .hq-rstars span.on { animation: none; }
@keyframes hqin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hqshake { 0%, 100% { transform: none; } 20% { transform: translateX(7px); } 40% { transform: translateX(-7px); } 60% { transform: translateX(5px); } 80% { transform: translateX(-4px); } }
.hq-input { width: 100%; box-sizing: border-box; margin-top: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: 400 16px system-ui, sans-serif; }
@media (prefers-reduced-motion: reduce) { .hq-ccard, .hq-ccard .badge, .hq-q, .hq-explain, .hq-result, .hq-opt.shake, .hq-rstars span.on { animation: none; } }

/* company switcher slot (Together mounts it); empty until then */
.hq-switch { display: flex; padding: 0 4px; }
.hq-switch:empty { display: none; }
/* What should I do next? */
.hq-next { display: grid; gap: 12px; }
.hq-nextbtn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; border-radius: 999px; background: var(--paper, #F3EBD8); color: var(--accent); border: 1px solid rgba(242,165,65,.6); font: 600 17px/1.2 var(--round, system-ui); }
.hq-nexttext { margin: 0; font: 600 17px/1.35 var(--round, system-ui); }
.hq-nextcard .bigbtn { margin-top: 4px; }
.hq-ansgo { position: relative; margin-top: 4px; } .hq-ansgo .bigbtn { position: relative; z-index: 1; margin-top: 0; }
/* board meeting: Your answers */
.hq-review { display: grid; gap: 8px; }
.hq-review h4 { margin: 0; font-size: 18px; }
.hq-rrow { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.07); }
.hq-rq { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; color: var(--ink); font: 400 15px/1.35 var(--round, system-ui); }
.hq-rq .t { flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hq-rq .t.open { display: block; }
.hq-rq .chev { color: rgba(255,255,255,.55); flex: none; }
.hq-rq .chev.up { transform: rotate(180deg); }
.hq-rq .good { color: var(--good); }
.hq-rq .bad { color: var(--accent); }
.hq-review p { margin: 0; font-size: 14px; line-height: 1.4; }
.hq-ans { font-weight: 600; }

/* journey card and the journey page */
.hq-chap { font-size: 24px; line-height: 1.05; padding-top: 3px; }
.hq-jdiv { border: 0; border-top: 1px solid var(--hq-line); margin: 2px 0; width: 100%; }
.hq-stage { font-size: 18px; padding-top: 3px; }
.hq-jcount { display: flex; align-items: baseline; gap: 10px; }
.hq-jcount .note { font-weight: 600; }
.hq-brow { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.hq-jnext { flex: 1; min-width: 0; }
.hq-comeback { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--accent); font: 600 13px/1.3 system-ui, sans-serif; }
.hq-special { margin: 0; color: var(--accent); font: 600 13px/1.3 system-ui, sans-serif; }
/* a medallion: dim and grey when not earned, a green check dot when earned, a 2 px accent ring on the next one */
.hq-med { position: relative; display: inline-grid; flex: none; width: var(--med, 44px); height: var(--med, 44px); border-radius: 50%; }
.hq-med img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.hq-med.locked img { opacity: .55; filter: grayscale(1); }
.hq-med.next { box-shadow: 0 0 0 2px var(--accent); }
.hq-chk { position: absolute; right: -2px; bottom: -2px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; box-shadow: 0 0 0 1.5px var(--paper); }
.hq-chk .sf { stroke-width: 3.5; }
.hq-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hq-tiles .stattile { padding: 10px; }
.hq-tiles .stattile .lbl { font-size: 13px; }
.hq-tiles .stattile .val { font-size: 18px; }
.hq-badges section { display: grid; gap: 6px; }
.hq-bhead2 { margin: 6px 2px 0; font-size: 26px; padding-top: 3px; }
.hq-bsec { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.hq-bsec h3 { margin: 0; font-size: 20px; padding-top: 3px; }
.hq-bblurb { margin: 0; padding: 4px 2px 6px; }
.hq-all summary, .hq-stagesec summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; color: var(--ink); }
.hq-all summary::-webkit-details-marker, .hq-stagesec summary::-webkit-details-marker { display: none; }
.hq-all summary { color: var(--accent); font-weight: 600; }
.hq-all summary .less, .hq-all[open] summary .more { display: none; } .hq-all[open] summary .less { display: inline; }
.hq-all summary .sf, .hq-stagesec summary .sf { margin-left: auto; transition: transform .2s ease; }
.hq-stagesec summary .grow + .note + .sf { margin-left: 0; }
.hq-all[open] summary .sf, .hq-stagesec[open] summary .sf { transform: rotate(180deg); }
.hq-all summary:focus-visible, .hq-stagesec summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hq-stagesec { border-top: .5px solid var(--hq-line); }
.hq-stagesec summary h3 { margin: 0; font-size: 20px; padding-top: 3px; }
.hq-now { padding: 2px 8px; border-radius: 999px; background: rgba(242,165,65,.22); color: var(--accent); font: 700 11px/1.3 system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.hq-brw { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 16px; text-align: left; color: inherit; font: inherit; }
.hq-brw > svg { flex: none; align-self: center; opacity: .5; }
.hq-brw:active { background: rgba(243,235,216,.08); }
.hq-brw:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hq-brw .txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.hq-brw .txt > b { font-size: 17px; }
.hq-brw .txt .secondary { font-size: 12px; }
.hq-brw .mk-bar { margin-top: 2px; }
.hq-nexttag { justify-self: start; color: var(--accent); font: 700 11px/1 system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.hq-earned { color: var(--accent); font-size: 14px; flex: none; }
.hq-ccard .kicker { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.hq-ccard img.badge { width: 96px; height: 96px; object-fit: contain; animation: hqbadge .42s cubic-bezier(.3,1.5,.5,1) both; }
.hq-celebrate.still .hq-ccard img.badge { animation: none; }
@media (prefers-reduced-motion: reduce) { .hq-ccard img.badge, .hq-all summary .sf, .hq-stagesec summary .sf { animation: none; transition: none; } }

/* The badge detail sheet. */
.hq-bdetail { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hq-bdetail .hq-medbig { margin-top: 6px; }
.hq-bstage { color: var(--accent); font: 700 12px/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.hq-bask { margin: 0; font-size: 17px; line-height: 1.35; max-width: 34ch; }
.hq-bwhen { font-size: 17px; }
.hq-bprog { display: grid; gap: 6px; width: 100%; max-width: 320px; }
.hq-bpts, .hq-bseason { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; }
.hq-bdetail .hq-bgo { margin-top: 6px; max-width: 360px; }
