/* Screen-level styles: scan card, step lines, overview tiles, fix kit, offer. Loaded after app.css. */
.btn{white-space:nowrap}
.btn-ghost{border-color:#C3CAD9;color:#F2F4F8}
.link{white-space:nowrap}

/* scan card: three columns, label | value | Change */
.s-card{background:#151923;border:1px solid #2A3040;border-radius:14px;padding:8px 20px}
.s-row{border-bottom:1px solid #2A3040}
.s-row:last-child{border-bottom:0}
.s-head{display:grid;grid-template-columns:136px 1fr auto;gap:16px;align-items:center;min-height:56px}
.s-lab{font-size:15px;line-height:20px}
.s-val{font-size:17px;line-height:24px;font-weight:600;overflow-wrap:anywhere;min-width:0}
.s-change{justify-self:end}
.s-more{padding:0 0 12px}
.s-more .s-chips{display:flex;flex-wrap:wrap;gap:8px}
.s-more .s-unsure{font-size:15px;line-height:20px;margin-bottom:8px}
.s-more .field{width:100%}
.s-err{padding:12px 16px;border:1px solid #FFC53D;border-radius:12px}
.s-prog{width:100%}
.s-bar{height:6px;border-radius:3px;background:#2A3040;overflow:hidden;margin-bottom:12px}
.s-fill{display:block;height:100%;width:0;background:#FFC53D;transition:width .25s}

/* step screens */
.s-steps{display:flex;flex-direction:column;gap:12px;margin:0}
.s-step{display:flex;align-items:center;gap:12px;font-size:17px;line-height:26px;color:#F2F4F8}
.s-num{flex:none;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;border:1px solid #FFC53D;color:#FFC53D;font:650 14px/1 Inter,system-ui,sans-serif}
.s-pre{margin-top:4px;max-height:34dvh}
.actions .link{margin-left:0;padding-left:0}

/* overview: 27 tiles, one screen */
.tiles{display:grid;grid-template-columns:repeat(9,48px);gap:8px;margin-top:12px}
.ov-rules{margin-top:0}
.ov-rules.is-done{border-color:#FFC53D;color:#FFC53D}
.ov-cap{margin-top:12px;min-height:24px;font-size:16px;line-height:24px;color:#F2F4F8;font-weight:600}
.tile{position:relative;height:48px;padding:0;text-align:center;border-radius:12px;font:600 16px/1 Inter,system-ui,sans-serif;cursor:pointer;background:#151923;color:#C3CAD9;border:1px solid #2A3040}
.tile:hover{border-color:#C3CAD9}
.tile:focus{outline:none}
.tile:focus-visible{outline:2px solid #FFC53D;outline-offset:3px}
.tile.is-done{background:transparent;border-color:#FFC53D;color:#FFC53D}
.tile.is-done::before{content:"";position:absolute;left:7px;top:50%;width:8px;height:4px;margin-top:-4px;border-left:2px solid #FFC53D;border-bottom:2px solid #FFC53D;transform:rotate(-45deg)}
.tile.is-cur{background:#FFC53D;border-color:#FFC53D;color:#0B0D12}
.ov-legend{font-size:15px;line-height:20px}
.ov-count{font-size:15px;line-height:22px}

/* fix kit */
.pq-scroll{max-height:58dvh;overflow-y:auto;padding:4px}
.fixlist{display:flex;flex-direction:column;gap:8px}
.fixbtn{width:100%;justify-content:flex-start;text-align:left}
.fixbtn[aria-pressed=true]{border-color:#FFC53D}
.fixopts{padding:8px 0 16px;display:flex;flex-direction:column;gap:12px}
.fixopts .chips{display:flex;flex-wrap:wrap;gap:8px;padding:0}
.fixopts .muted{margin:0;font-size:15px;line-height:20px}

/* offer */
.offer{background:#151923;border:1px solid #2A3040;border-radius:14px;padding:16px 20px}
.offer h2{font-size:20px;line-height:26px}
.offer p{margin-top:6px}
.offer-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}
.offer-line{background:none;border:0;padding:0}
.offer-line a{color:#FFC53D;text-underline-offset:4px}
.offer .btn{text-decoration:none}

@media (min-width:641px){
  .s-card{max-height:calc(100dvh - 330px);overflow-y:auto}
}

@media (max-width:640px){
  .s-head{grid-template-columns:104px 1fr auto;gap:12px}
  .s-card{padding:4px 16px}
  .tiles{grid-template-columns:repeat(7,1fr);gap:8px}
  .tile{height:44px;min-height:44px}
  .tile.is-done::before{left:5px}
  .pq-scroll{max-height:none;overflow:visible}
  .s-pre{max-height:none}
  body[data-route=home] #screen>.frame{padding-top:96px}
  .actions{flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important}
  .actions .btn{flex:1 1 40%!important;width:auto!important}
  .actions .link{flex:1 1 100%;justify-content:center;margin:0}
  body.pq-guiding .pp-bubble{opacity:0!important}
}

/* goal screen: four cards, one tap each */
#screen>.frame.wide{max-width:920px}
.goals{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.goal-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:18px 14px 20px;border-radius:16px;background:#151923;border:1px solid #2A3040;color:#F2F4F8;cursor:pointer;min-height:236px;transition:transform .2s,border-color .2s}
.goal-card:hover{border-color:#FFC53D;transform:translateY(-4px)}
.goal-card[aria-pressed=true]{border-color:#FFC53D}
.goal-art{width:88px;height:88px;object-fit:contain;margin-bottom:4px;filter:drop-shadow(0 8px 14px rgba(0,0,0,.5))}
.goal-t{font-size:18px;line-height:24px;font-weight:650}
.goal-s{font-size:15px;line-height:22px;color:#C3CAD9}

/* rating screen */
.rate-main{display:grid;grid-template-columns:300px 1fr;gap:32px;align-items:center}
.rate-top{display:flex;flex-direction:column;align-items:flex-start;gap:14px}
.ring{position:relative;width:132px;height:132px;flex:none}
.ring-svg{width:132px;height:132px;transform:rotate(-90deg);display:block}
.ring-track,.ring-fill{fill:none;stroke-width:10}
.ring-track{stroke:#2A3040}
.ring-fill{stroke:#FFC53D;stroke-linecap:round;transition:stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1)}
.ring-c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.ring-c b{font-size:38px;line-height:40px;font-weight:750;letter-spacing:-.02em}
.ring-c span{font-size:15px;line-height:18px;color:#C3CAD9}
.goal-chip{display:flex;align-items:center;gap:10px;font-weight:600}
.goal-chip img{width:40px;height:40px;object-fit:contain}
.rate-note{max-width:280px}
.bars{display:flex;flex-direction:column;gap:2px}
.bar-row{display:grid;grid-template-columns:150px 1fr 40px;gap:14px;align-items:center;min-height:36px}
.bar-l{font-size:15px;line-height:20px;color:#C3CAD9}
.bar-row.is-key .bar-l{color:#F2F4F8;font-weight:600}
.bar-t{height:8px;border-radius:4px;background:#2A3040;overflow:hidden}
.bar-t i{display:block;height:100%;width:0;border-radius:4px;background:#C3CAD9;transition:width .9s cubic-bezier(.2,.8,.2,1)}
.bar-row.is-key .bar-t i{background:#FFC53D}
.bar-n{font-size:15px;line-height:20px;font-weight:650;text-align:right}
.focus{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:14px}
.bars+.small{margin-top:6px}
.ai-card{margin-top:14px}
.ai-card{background:#151923;border:1px solid #2A3040;border-radius:14px;padding:14px 18px;font-size:16px;line-height:24px}
.ai-card p+p{margin-top:6px}

@media (max-width:900px){
  .goals{grid-template-columns:repeat(2,1fr);gap:10px}
  .goal-card{min-height:0;padding:14px 10px 16px}
  .goal-art{width:64px;height:64px}
  .goal-t{font-size:16px;line-height:21px}
  .goal-s{font-size:15px;line-height:20px}
  .rate-main{grid-template-columns:1fr;gap:12px;align-items:start}
  .rate-top{flex-direction:row;align-items:center;gap:16px}
  .rate-side{display:flex;flex-direction:column;gap:6px;min-width:0}
  .ring,.ring-svg{width:96px;height:96px}
  .ring-c b{font-size:28px;line-height:30px}
  .bar-row{grid-template-columns:120px 1fr 36px;gap:10px;min-height:30px}
  .bar-l{font-size:15px}
  .focus .small{flex:1 1 100%}
  .focus{margin-top:10px;gap:6px}
  .rate-note{max-width:none}
}

/* short phones (360x640 and similar): keep goal and rating on one screen */
@media (max-width:640px) and (max-height:720px){
  .goal-card{padding:10px 8px 12px;gap:2px}
  .goal-art{width:48px;height:48px;margin-bottom:0}
  .goal-t{font-size:15px;line-height:19px}
  .goal-s{font-size:15px;line-height:18px}
  .goals{gap:8px}
  .rate-main .ring,.rate-main .ring-svg{width:80px;height:80px}
  .ring-c b{font-size:24px;line-height:26px}
  .ring-c span{font-size:15px;line-height:14px}
  .goal-chip img{width:28px;height:28px}
  .bar-row{min-height:26px}
  #screen>.frame h1{font-size:26px;line-height:30px}
}

/* rating rows with evidence */
.rate-cap{margin-bottom:6px}
.bar-ev{font-size:15px;line-height:20px;margin:0 0 10px;padding-left:0}
.bars .bar-row.is-key .bar-t i{background:#FFC53D}
.rate-main .link{margin-top:2px}
.btn:disabled{opacity:.4;cursor:not-allowed}
@media (max-width:900px){.bar-ev{font-size:15px;line-height:18px;margin-bottom:8px}}



/* rating rows v2: one line per area, detail on tap */
.rate-why{font-size:17px;line-height:26px;color:#F2F4F8;margin-bottom:10px;max-width:560px}
.rate-cap{font-size:15px;line-height:22px;color:#FFC53D;font-weight:600;margin-bottom:4px}
.bar-item{border-bottom:1px solid #1d2230}
button.bar-row{width:100%;background:none;border:0;padding:0;color:inherit;text-align:left;cursor:pointer;border-radius:8px}
button.bar-row:hover .bar-l{color:#FFC53D}
.bar-row{grid-template-columns:140px 1fr 36px 48px}
.bar-w{font-size:15px;line-height:20px;color:#C3CAD9;text-align:right}
.bar-row.is-key .bar-w{color:#FFC53D;font-weight:600}
.bar-ev{font-size:15px;line-height:20px;margin:0 0 10px}
@media (max-width:900px){.bar-row{grid-template-columns:104px 1fr 32px 42px;gap:8px}.rate-why{font-size:16px;line-height:23px}}
/* goal cards: filled gold tint and a check when chosen */
.goal-card{position:relative}
.goal-card[aria-pressed=true]{background:rgba(255,197,61,.12);border-color:#FFC53D;box-shadow:0 0 0 1px #FFC53D inset}
.goal-card[aria-pressed=true]::after{content:"";position:absolute;top:12px;right:14px;width:12px;height:7px;border-left:3px solid #FFC53D;border-bottom:3px solid #FFC53D;transform:rotate(-45deg)}

/* ads + enough screens */
.ads-card{background:#151923;border:1px solid #2A3040;border-left:4px solid #C3CAD9;border-radius:14px;padding:14px 18px;margin-bottom:14px}
.ads-card p+p{margin-top:6px}
.ads-card.ads-good{border-left-color:#FFC53D}
.ads-card.ads-warn{border-left-color:#F2F4F8}
.rule-list{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:10px}
.rule-list li{display:flex;align-items:flex-start;gap:12px;font-size:16px;line-height:24px}
.rule-list .num{flex:none;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;border:1px solid #FFC53D;color:#FFC53D;font:650 14px Inter,sans-serif}
@media (max-width:600px){.rule-list{gap:8px}.rule-list li{font-size:15px;line-height:22px}}
.fold{margin-top:6px}
.fold .rule-list{margin-top:8px}

/* evidence list */
.ev-list{list-style:none;margin:6px 0 4px;padding:0;display:grid;gap:2px}
.ev-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:15px;line-height:20px;padding:2px 0;border-top:1px solid #1d2230}
.ev-t{overflow-wrap:anywhere}
.ev-t b{color:#F2F4F8;font-weight:600}
.ev-row.is-ok .ev-t b{color:#FFC53D}
.ev-btn{font-size:15px;flex:none;min-height:44px}

/* overview chapters */
.chapters{display:grid;gap:6px;margin-top:10px}
.chapter{display:grid;grid-template-columns:190px 1fr;align-items:center;gap:12px}
.chapter .tiles{margin-top:0;grid-template-columns:repeat(6,48px)}
.ch-name{display:flex;justify-content:space-between;gap:8px;font-size:15px;line-height:20px;font-weight:600;color:#F2F4F8;margin:0}
.ch-n{color:#C3CAD9;font-weight:500}
.chapter.is-done .ch-n{color:#FFC53D}
@media (max-width:640px){
  .chapter{grid-template-columns:1fr;gap:2px}
  .chapters{gap:4px}
  .chapter .tiles{grid-template-columns:repeat(6,1fr);gap:6px}
  .chapter .tile{height:40px;min-height:40px}
}
/* sample review */
.sr-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.sr-list li{background:#151923;border:1px solid #2A3040;border-radius:12px;padding:10px 14px}
.sr-list b{display:block;color:#FFC53D;font-size:16px;line-height:22px}
.sr-list span{font-size:15px;line-height:22px;color:#F2F4F8}
.sr-tag{display:inline-block;font-size:15px;line-height:20px;color:#0B0D12;background:#C3CAD9;border-radius:6px;padding:0 8px;font-weight:600}

.chapter .tile{height:44px}
.chapter .tiles{gap:6px;grid-template-columns:repeat(6,44px)}
.chapters{gap:4px;margin-top:8px}
.ov-cap{margin-top:8px}
.sr-list li{padding:8px 14px}
@media (max-width:640px){.chapter .tiles{grid-template-columns:repeat(6,1fr)}}
.sr-list{gap:8px}
.sr-list li{padding:6px 14px}
.sr-list span{font-size:15px;line-height:20px}

/* short screens: overview, fix, done stay on one screen */
@media (max-height:700px){
  body[data-route=overview] #screen>.frame .lead,body[data-route=overview] #screen>.frame .kicker{display:none}
  body[data-route=overview] #screen>.frame h1{font-size:24px;line-height:28px;margin-bottom:4px}
  .chapter .tile{height:38px;min-height:38px}
  .chapter .tiles{grid-template-columns:repeat(6,38px)}
  .chapters{gap:2px;margin-top:4px}
  .ov-cap{margin-top:4px;min-height:20px;font-size:15px;line-height:20px}
  .ov-rules{min-height:40px}
}
@media (max-height:700px) and (max-width:640px){
  .chapter .tiles{grid-template-columns:repeat(6,1fr)}
  body[data-route=done] #screen>.frame .lead,body[data-route=fix] #screen>.frame .lead{display:none}
  body[data-route=done] .offer-card p.muted:not(.small){display:none}
}
@media (max-height:660px) and (max-width:640px){
  .chapter .tile{height:34px;min-height:34px}
  .ov-rules{min-height:36px}
}

.rate-cmp{margin:0 0 8px;max-width:560px;color:#C3CAD9}

/* review fixes: distinct states, quiet links, Pip never covers the offer, calm disabled button */
.bar-row .bar-w.w-weak{color:#F2F4F8;font-weight:700}
.bar-row .bar-w.w-weak::before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;background:#F2F4F8;transform:rotate(45deg)}
.bar-row .bar-w.w-ok{color:#C3CAD9}
.bar-row .bar-w.w-good{color:#FFC53D}
.bar-row.is-key .bar-w.w-weak,.bar-row.is-key .bar-w.w-ok{color:#F2F4F8}
.btn:disabled{background:transparent;border:1px solid #2A3040;color:#C3CAD9;opacity:1}
body[data-route=rating] #screen>.frame{padding-bottom:84px}
.goals{outline:none;border:0;box-shadow:none}
.tile:hover:not(.is-done):not(.is-cur){border-style:dashed}

/* overview v2 (chat 8): chapter picker with art + named steps */
.ov-wrap{display:grid;grid-template-columns:260px 1fr;gap:16px;margin-top:10px;align-items:start}
.ch-pick{display:grid;gap:6px}
.ch-btn{display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:10px;min-height:48px;padding:3px 12px 3px 6px;text-align:left;background:#151923;color:#F2F4F8;border:1px solid #2A3040;border-radius:12px;font:600 15px/20px Inter,system-ui,sans-serif;cursor:pointer}
.ch-btn:hover{border-color:#C3CAD9}
.ch-btn.is-sel{border-color:#FFC53D;background:#1b2030}
.ch-btn:focus{outline:none}.ch-btn:focus-visible{outline:2px solid #F2F4F8;outline-offset:3px}
.ch-ico{width:40px;height:40px;object-fit:contain;display:block}
.ch-btn .ch-n{color:#C3CAD9;font-weight:500}
.ch-btn.is-done .ch-n{color:#FFC53D}
.ch-steps{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.ch-step{display:grid;grid-template-columns:32px 1fr auto;align-items:center;gap:10px;width:100%;min-height:48px;padding:4px 14px 4px 10px;text-align:left;background:#151923;color:#F2F4F8;border:1px solid #2A3040;border-radius:12px;font:500 16px/22px Inter,system-ui,sans-serif;cursor:pointer}
.ch-step:hover{border-color:#C3CAD9}
.ch-step:focus{outline:none}.ch-step:focus-visible{outline:2px solid #F2F4F8;outline-offset:3px}
.cs-n{color:#C3CAD9;font-weight:600;text-align:center}
.cs-s{font-size:15px;color:#C3CAD9;min-width:36px;text-align:right}
.ch-step.is-done{background:transparent;color:#C3CAD9}
.ch-step.is-done .cs-s{color:#FFC53D}
.ch-step.is-cur{background:#1b2030;border-color:#FFC53D;color:#F2F4F8}
.ch-step.is-cur .cs-n,.ch-step.is-cur .cs-s{color:#FFC53D;font-weight:700}
@media (max-width:640px){
  .ov-wrap{grid-template-columns:1fr;gap:8px}
  .ch-pick{grid-template-columns:repeat(6,1fr);gap:4px}
  .ch-btn{grid-template-columns:1fr;justify-items:center;gap:0;min-height:56px;padding:4px 2px;text-align:center}
  .ch-btn .ch-nm{display:none}
  .ch-btn .ch-n{font-size:14px;line-height:16px}
  .ch-step{min-height:40px;padding:2px 12px 2px 8px;font-size:15px;line-height:20px}
  .ch-steps{gap:4px}
}
@media (max-height:700px){
  .ov-wrap{margin-top:4px}
  .ch-btn{min-height:42px}.ch-ico{width:32px;height:32px}.ch-btn{grid-template-columns:32px 1fr auto}
  .ch-pick{gap:4px}.ch-steps{gap:4px}.ch-step{min-height:38px}
}
@media (max-height:700px) and (max-width:640px){
  .ch-btn{min-height:48px;grid-template-columns:1fr}.ch-ico{width:28px;height:28px}
  .ch-step{min-height:36px}
}

/* chat 8 review fixes: chapter name shown on phones, no gem behind the phone header */
.ch-cur{display:none;font-weight:600;color:#F2F4F8;font-size:15px;line-height:20px}
@media (max-width:640px){
  .ch-cur{display:block}

}
@media (max-width:640px) and (max-height:700px){.ch-cur{font-size:15px;line-height:18px}}

/* chat 8 review fixes: three plain labels, one row, quiet extra actions */
.bar-row{grid-template-columns:150px 1fr 40px 92px}
.bar-w{white-space:nowrap}
.bar-row .bar-w.w-needswork{color:#C3CAD9}
.bar-row.is-key .bar-w.w-needswork{color:#F2F4F8}
.more-box{display:inline-flex;flex-wrap:wrap;gap:8px 16px;align-items:center}
@media (max-width:900px){.bar-row{grid-template-columns:110px 1fr 34px 84px;gap:8px}.bar-w{font-size:14px}}

/* plan offer card: one card, picture left, price under the picture */
.plan-card{display:grid;grid-template-columns:132px 1fr;gap:20px;align-items:start}
.plan-side{display:flex;flex-direction:column;align-items:center;text-align:center}
.plan-pic{width:112px;height:112px;object-fit:contain}
.plan-price{margin:4px 0 0;font:700 28px/32px Inter,sans-serif;color:#FFC53D}
.plan-once{margin:0;font-size:15px;line-height:20px;color:#C3CAD9}
.plan-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px}
.plan-list li{font-size:16px;line-height:22px;padding-left:18px;position:relative}
.plan-list li::before{content:"";position:absolute;left:0;top:8px;width:8px;height:8px;background:#FFC53D;transform:rotate(45deg)}
.plan-main>.muted{margin-top:10px}
.sr-list .sr-k{display:block;margin-top:4px;font-size:15px;line-height:20px;color:#C3CAD9}
@media (max-width:640px){
  .plan-card{grid-template-columns:1fr;gap:8px;padding:14px 16px}
  .plan-side{flex-direction:row;gap:14px;justify-content:flex-start;text-align:left}
  .plan-pic{width:64px;height:64px}
  .plan-price{font-size:26px}
  .plan-list li{font-size:15px;line-height:20px}
  .plan-card .offer-actions{gap:8px}
  .plan-card .offer-actions .btn{flex:1 1 auto;justify-content:center}
}
@media (max-width:640px){
  .plan-card .offer-actions .btn-primary{flex:1 1 100%}
  .plan-card .offer-actions .btn-ghost{flex:1 1 40%;min-height:44px;padding:0 10px;font-size:15px}
}
@media (max-width:640px) and (max-height:700px){
  .plan-card .plan-main>.muted:not(.small){font-size:15px;line-height:20px;margin-top:6px}
  .plan-list{gap:2px;margin-top:6px}
  .plan-card .small{font-size:14px;line-height:18px}
}
.plan-how{list-style:none;counter-reset:h;margin:12px 0 0;padding:0;display:flex;gap:10px;flex-wrap:wrap}
.plan-how li{counter-increment:h;display:flex;align-items:center;gap:8px;font-size:15px;line-height:20px;color:#F2F4F8}
.plan-how li::before{content:counter(h);display:inline-grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;border:1px solid #FFC53D;color:#FFC53D;font:650 13px Inter,sans-serif}
.plan-q{margin-top:4px;color:#C3CAD9}
.plan-note{grid-column:1/-1;margin:0}
.sr-one{display:grid;gap:8px;background:#151923;border:1px solid #2A3040;border-radius:12px;padding:14px 16px}
.sr-one b{color:#FFC53D;font-size:17px;line-height:24px}
.sr-one span{font-size:15px;line-height:22px}
.sr-prompt{margin:0;white-space:pre-wrap;font:500 15px/22px Inter,sans-serif;background:#0B0D12;border:1px solid #FFC53D;border-radius:10px;padding:10px 12px;color:#F2F4F8}
.sr-one .sr-k{color:#C3CAD9;font-size:15px;line-height:20px}
@media (max-width:640px){.plan-how{flex-direction:column;gap:4px}.plan-how li{font-size:15px}}
@media (max-width:640px) and (max-height:700px){.sr-one{padding:10px 12px;gap:6px}.sr-prompt{font-size:15px;line-height:20px}}
@media (max-width:640px){
  body[data-route=plan] #screen>.frame h1{font-size:26px;line-height:32px}
  body[data-route=plan] .plan-card{padding:12px 14px;gap:6px}
  .plan-how{flex-direction:row;flex-wrap:nowrap;gap:6px;justify-content:space-between}
  .plan-how li{flex-direction:column;align-items:flex-start;gap:4px;font-size:14px;line-height:17px;flex:1 1 0}
  .plan-card .plan-main>.muted:not(.small){font-size:15px;line-height:20px;margin-top:4px}
  .plan-list{margin-top:4px}
  .plan-list li{font-size:15px;line-height:19px}
  .plan-card .offer-actions{margin-top:10px}
  .plan-q{min-height:32px;margin-top:0}
  .plan-card .plan-note{font-size:14px;line-height:17px}
  .bar .brand{font-size:15px}
  .bar nav{gap:8px}
  .bar nav a{font-size:14px}
}
.plan-how{flex-wrap:nowrap;justify-content:space-between;gap:14px}
.plan-how li{flex:1 1 0;align-items:flex-start;flex-direction:column;gap:4px;font-size:15px;line-height:20px}
.plan-note,.sr-one .sr-k{font-size:15px;line-height:21px;color:#C3CADA}
@media (min-width:641px){body[data-route=plan] .plan-card{padding:12px 18px}body[data-route=plan] #screen>.frame h1{font-size:34px;line-height:40px}}
.src-list{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.src-list li{display:grid;grid-template-columns:170px 1fr;gap:2px 14px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.src-list a{color:var(--accent);font-weight:600;font-size:16px}
.src-lic{color:var(--text);font-size:15px}
.src-list .muted{grid-column:2}
.src-search{display:flex;gap:10px;flex-wrap:wrap}.src-search .field{flex:1 1 220px}
@media (max-width:640px){.src-list li{grid-template-columns:1fr}.src-list .muted{grid-column:1}}
.src-list{max-height:calc(100dvh - 420px);min-height:120px;overflow-y:auto}
@media (max-width:640px){.src-list{max-height:calc(100dvh - 400px)}.src-list li{padding:8px 12px}}
.src-list{max-height:calc(100dvh - 400px);min-height:96px}
@media (max-width:640px){.src-list{max-height:calc(100dvh - 520px);min-height:84px}}
.src-list{max-height:calc(100dvh - 440px);min-height:72px}
@media (max-width:640px){.src-list{max-height:calc(100dvh - 600px);min-height:64px}.src-list li{gap:0}.src-list{max-height:calc(100dvh - 620px)}}
.plan-peek{display:none}
body[data-route=plan] #screen>.frame{position:relative}
@media (min-width:1100px) and (min-height:600px){.plan-peek{display:flex;flex-direction:column;gap:10px;position:absolute;left:calc(100% + 36px);top:90px;width:380px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);z-index:1}
.plan-peek .sr-prompt{max-height:170px;overflow:hidden;margin:0}}
@media (max-width:640px) and (max-height:600px){.src-list{min-height:40px;max-height:calc(100dvh - 640px)}}
@media (max-width:640px){.bar nav a[href="#privacy"],.bar nav a[href="#plan"]{display:none}.bar nav{padding-right:44px}}

.kind-card{min-height:120px;align-content:start}
.src-lic{justify-self:start;padding:1px 10px;border-radius:999px;font-size:15px;font-weight:600;border:1px solid var(--line)}
.lic-ok{color:#0B0D12;background:var(--accent);border-color:var(--accent)}
.lic-warn{color:var(--text);border-color:var(--accent)}
.plan-peek .sr-tag{background:transparent;color:var(--accent);border:1px solid var(--accent);justify-self:start;align-self:flex-start}
@media (max-width:400px) and (max-height:660px){.src-list{max-height:calc(100dvh - 660px);min-height:30px}.src-search .field{min-height:40px}}

/* chat 11: kind cards equal height with a gold line picture; selected = gold border + tick, no shift */
.kind-card{min-height:176px;justify-content:flex-start;border-width:2px;padding:16px 14px 18px}
.kind-card:hover{transform:none}
.kind-ico{width:56px;height:56px;object-fit:contain;margin-bottom:2px}
.goal-card.kind-card[aria-pressed=true]{border-color:#FFC53D;box-shadow:none}
.kind-card .goal-s{min-height:44px}
@media (max-width:640px){.kind-card{min-height:150px}.kind-card .goal-s{min-height:0}}
@media (max-width:640px) and (max-height:700px){.kind-card{min-height:0;padding:10px 8px 12px}.kind-ico{width:40px;height:40px}}

/* chat 11: rating labels. Weak = accent colour with a diamond, Needs work = muted, Good = light */
.bar-row .bar-w.w-weak,.bar-row.is-key .bar-w.w-weak{color:#FFC53D;font-weight:700}
.bar-row .bar-w.w-weak::before{display:none}
.bar-w .w-dia{display:inline-block;width:8px;height:8px;margin-right:6px;background:#FFC53D;transform:rotate(45deg)}
.bar-row .bar-w.w-needswork,.bar-row.is-key .bar-w.w-needswork{color:#A9B1C3;font-weight:500}
.bar-row .bar-w.w-good{color:#F2F4F8}
/* goal as one chip on one line */
.goal-chip{display:inline-flex;flex-wrap:nowrap;white-space:nowrap;align-items:center;gap:8px;padding:4px 6px 4px 8px;border:1px solid #2A3040;border-radius:999px;font-size:15px;font-weight:600;max-width:100%}
.goal-chip img{width:24px;height:24px}
.goal-chip span{overflow:hidden;text-overflow:ellipsis}
.goal-chip .link{min-height:32px;padding:0 6px;font-size:15px;color:#C3CAD9;flex:none}
/* "See the plan" and "Report and AI opinion": the same quiet white link, side by side on one row */
body[data-route=rating] .actions{align-items:center;gap:8px 20px}
body[data-route=rating] .actions .link{color:#F2F4F8;font-size:16px;text-decoration:underline;flex:0 0 auto;padding:0 4px}
@media (max-width:900px){body[data-route=rating] .actions .btn{flex:1 1 100%!important}body[data-route=rating] .actions .link{flex:0 1 auto!important;justify-content:center;margin:0 auto}}
.more-box{display:inline-flex}
/* chat 11: goal chip must never overflow the phone width */
.rate-side{min-width:0;max-width:100%}
.goal-chip{max-width:100%;min-width:0}
.goal-chip>span{flex:0 1 auto;min-width:0}
@media (max-width:640px){.goal-chip{font-size:14px}.rate-top{flex-wrap:wrap}.rate-side{flex:1 1 150px}}
/* chat 11: cards pop when chosen */
@keyframes pop{0%{transform:scale(1)}45%{transform:scale(1.035)}100%{transform:scale(1)}}
.goal-card:active{transform:scale(.97)}
.goal-card[aria-pressed=true]{animation:pop .32s ease-out}
.goal-card{transition:transform .22s cubic-bezier(.34,1.56,.64,1),border-color .2s,background .2s}
.kind-card:hover{transform:translateY(-3px)}
/* chat 11: search source dropdown */
.src-select{flex:1 1 100%;appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:40px;background:#151923 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23FFC53D' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center}
.src-select:focus-visible{outline:2px solid #FFC53D}
.src-select option{background:#151923;color:#F2F4F8}
.src-res a{margin-right:6px}
@media (max-width:640px){.src-select{min-height:44px;height:44px;font-size:16px}}
/* chat 11: assets list gives back the space the shape band takes on phones */
@media (max-width:640px){body[data-route=assets] .src-list{max-height:calc(100dvh - 640px - var(--shape-h,0px) + 120px);min-height:56px}}
@media (max-width:400px) and (max-height:660px){body[data-route=assets] .src-list{max-height:40px;min-height:0}body[data-route=assets] .chips{padding:4px 0}}
.example-game{margin:10px 0 0}.example-game a{color:var(--accent);font-weight:600}

/* chat 13: clipping pass */
.home-game{margin:0 0 6px;font-size:15px;line-height:20px;color:#C3CAD9;overflow-wrap:anywhere}
.bar-w .w-dia{margin:0 0 0 8px}
.badge-ex{display:inline-block;align-self:flex-start;padding:2px 10px;border:1px solid #FFC53D;border-radius:999px;font-size:14px;font-weight:600;color:#FFC53D}
.goal-chip>span{overflow:visible;text-overflow:clip}
@media (max-width:640px){
  body[data-route=home] #screen>.frame{padding-top:8px}
  body[data-route=scan] #screen>.frame,body[data-route=rating] #screen>.frame{padding-top:0}
}

/* chat 13: assets screen. Three rows, Show more, search tab, Coin Hop card. Replaces the older height hacks. */
body[data-route=assets] .src-list{max-height:none;min-height:0;overflow:visible}
body[data-route=assets] .src-list[hidden],body[data-route=assets] .src-searchbox[hidden],.src-more[hidden]{display:none}
.assets-grid{display:grid;grid-template-columns:1fr 280px;gap:20px;align-items:start}
.assets-left{min-width:0}
.src-more{min-height:44px;color:#FFC53D;font-weight:600;padding:0 4px}
.src-searchbox{display:grid;gap:10px;padding:8px 0}
.src-res a{color:var(--accent);margin-right:10px}
.play-card{display:flex;flex-direction:column;border:1px solid #FFC53D;border-radius:16px;background:#151923;overflow:hidden;color:#F2F4F8;text-decoration:none}
.play-thumb{width:100%;height:auto;aspect-ratio:8/5;object-fit:cover;display:block}
.play-body{display:grid;gap:6px;padding:12px 14px 14px}
.play-t{font-size:20px;line-height:26px;font-weight:700}
.play-s{font-size:15px;line-height:21px;color:#C3CAD9}
.play-btn{justify-self:start;pointer-events:none}
@media (max-width:760px){
  .assets-grid{grid-template-columns:1fr;gap:12px}
  .play-card{flex-direction:row;align-items:stretch}
  .play-thumb{width:112px;height:auto;aspect-ratio:auto;flex:none}
  .play-body{padding:8px 12px;gap:2px}
  .play-t{font-size:18px;line-height:22px}
  .play-s{font-size:14px;line-height:18px}
  .play-btn{min-height:36px;padding:0 18px}
  .src-list li{padding:8px 12px}
}
body[data-route=assets] #screen>.frame{padding-bottom:96px}

/* chat 13: disabled Next is plainly off: grey, dashed, no hover lift */
.btn:disabled,.btn[disabled]{background:#151923;border:1px dashed #3A4256;color:#8A93A8;opacity:1;cursor:not-allowed;box-shadow:none;transform:none}
/* chat 13: room under the kind cards for the hand pointer, so it never covers Next or Skip */
body[data-route=kind] .goals{margin-bottom:112px}
@media (max-width:640px) and (max-height:700px){body[data-route=kind] .goals{margin-bottom:72px}}

/* chat 13: checkout terms, three short lines under the Order button, in the owner's words */
.plan-terms{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:2px}
.plan-terms li{font-size:15px;line-height:21px;color:#F2F4F8;padding-left:14px;position:relative}
.plan-terms li::before{content:"";position:absolute;left:0;top:8px;width:5px;height:5px;background:#FFC53D;transform:rotate(45deg)}
@media (max-width:640px){.plan-terms li{font-size:14px;line-height:18px}}
body[data-route=plan] #screen>.frame{padding-bottom:100px}
body[data-route=assets] .actions .btn{white-space:normal;line-height:20px;padding-top:6px;padding-bottom:6px}

/* chat 13 (review 9): solid bottom bar, caption above the Continue button on its own line */
.actions{background:#0B0D12}
.actions .home-game{flex:1 1 100%;margin:0 0 2px;text-align:center}
@media (min-width:641px){.actions .home-game{flex:0 0 100%;text-align:left}}

/* chat 14: sample card fills the same height as the order card; the mail link in step 2 */
.plan-peek .sr-prompt{max-height:none;flex:0 0 auto}
.plan-how li a.link{color:#F2F4F8;text-decoration:underline}
.plan-how li a.link{white-space:normal;min-height:0;padding:0;display:inline}
.plan-how li{min-width:0}
@media (min-width:641px){.plan-how li:nth-child(2){flex:1.7 1 0}}
/* chat 14: one short line under the score */
.rate-line{gap:8px;padding:0;border:0;border-radius:0;font-size:16px;color:#F2F4F8;flex-wrap:wrap;white-space:normal}
.rate-line .rl-dot{width:4px;height:4px;border-radius:50%;background:#8A93A8;flex:none}
.rate-line .rl-ex{color:#FFC53D;font-weight:650}
.rate-line .link{padding:0 2px;text-decoration:underline;color:#F2F4F8;min-height:32px}
.more-box .rate-note{flex:1 1 100%;align-self:center}
/* chat 14: phone header = brand + Menu button. The menu lists every link, including Plan. */
.menu-btn,.menu-panel{display:none}
@media (max-width:640px){
  .bar nav{display:none}
  .bar{padding:0 60px 0 16px}
  .menu-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:72px;padding:0 14px;border:1px solid #3A4256;border-radius:10px;background:#151923;color:#F2F4F8;font:600 15px Inter,system-ui,sans-serif;cursor:pointer}
  .menu-btn[aria-expanded=true]{border-color:#FFC53D}
  .menu-panel:not([hidden]){display:flex;flex-direction:column;position:fixed;top:56px;left:0;right:0;z-index:40;background:#0B0D12;border-bottom:1px solid #2A3040;padding:6px 16px 12px}
  .menu-panel a{display:flex;align-items:center;min-height:48px;color:#F2F4F8;font-size:17px;text-decoration:none;border-bottom:1px solid #1B2030}
  .menu-panel a:last-child{border-bottom:0}
}
/* chat 14 (review 10): home buttons stack full width on phones so no label can clip */
@media (max-width:640px){
  body[data-route=home] .actions{flex-wrap:wrap}
  body[data-route=home] .actions .btn{flex:1 1 100%;white-space:normal;min-width:0;padding:0 12px}
}
/* chat 14 (review 10) */
.plan-peek .sr-sep{width:100%;border:0;border-top:1px solid #2A3040;margin:4px 0}
@media (min-width:641px){body[data-route=plan] .plan-note{margin-top:0}body[data-route=plan] .plan-card{row-gap:0}}
@media (max-width:640px){
  body[data-route=home] #screen>.frame{margin:0 0 auto}
  body[data-route=home] .actions .btn{flex:1 1 100%!important}
}
/* chat 14: plan fits 1280x720 with Back visible and nothing under Pip's bubble */
@media (min-width:641px) and (min-height:600px){
  body[data-route=plan] .plan-card .plan-main>.muted:not(.small){display:none}
  body[data-route=plan] .plan-card .plan-q{margin:2px 0 0}
  body[data-route=plan] #screen>.frame{padding-bottom:24px}
  body[data-route=plan] .actions{margin-top:16px}
  .pp-root:not(.pp-open) .pp-bubble{max-width:200px}
}
/* chat 14: dim backdrop behind the open phone menu; licence pills neutral so gold is for actions */
.menu-back{display:none}
@media (max-width:640px){.menu-back:not([hidden]){display:block;position:fixed;inset:56px 0 0 0;background:rgba(5,6,9,.72);z-index:39}}
.lic-ok{color:#F2F4F8;background:transparent;border-color:#5A6377}

/* chat 16: assets screen has one gold button; plan fine print spacing; disabled Next is solid; workflow screens */
.play-card{border-color:#2A3040}
.play-card .play-btn{align-self:flex-start}
.play-credits{display:inline-block;margin-top:6px;color:#C3CAD9;font-size:15px;text-decoration:underline}
.src-more{color:#F2F4F8;text-decoration:underline}
.assets-help{margin-top:10px}
.btn:disabled,.btn[disabled]{background:#1B2130;border:1px solid #2A3040;color:#9AA3B8}
.plan-card .plan-note{margin-top:16px;padding-top:12px;border-top:1px solid #2A3040}
.plan-terms{margin-bottom:6px}
@media (max-width:640px){
  body[data-route=plan] .plan-card{display:flex;flex-direction:column}
  body[data-route=plan] .plan-main{display:flex;flex-direction:column}
  body[data-route=plan] .plan-main .offer-actions{order:99;margin-top:14px}
  body[data-route=plan] .plan-card .plan-note{order:100}
  body[data-route=plan] .plan-q{order:98}
}
.c-tools{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.c-tool{padding:12px 14px;border:1px solid #2A3040;border-radius:12px;background:#151923}
.c-tool-head{display:flex;gap:10px;align-items:center;justify-content:space-between}
.c-tool p{margin:4px 0 0}
.c-idea,.c-term-in{width:100%;box-sizing:border-box;font:16px/24px Inter,sans-serif;color:#F2F4F8;background:#151923;border:1px solid #2A3040;border-radius:12px;padding:12px 14px}
.c-term{max-height:260px;overflow:auto;white-space:pre-wrap;background:#0F121A;border:1px solid #2A3040;border-radius:12px;padding:12px;font:14px/20px ui-monospace,Menlo,monospace;color:#F2F4F8}
.c-cmd,.c-code{display:block;white-space:pre-wrap;background:#0F121A;border:1px solid #2A3040;border-radius:10px;padding:10px 12px;font:14px/20px ui-monospace,Menlo,monospace;color:#F2F4F8}
.c-code{max-height:240px;overflow:auto}
.c-offline{padding:10px 12px;border:1px solid #2A3040;border-radius:10px;color:#F2F4F8;font-size:15px;line-height:21px}
/* chat 16: room above the action bar on workflow and create so the hand pointer never sits on text */
body[data-route=workflow] #screen>.frame>.stack,body[data-route=create] #screen>.frame>.stack{margin-bottom:104px}
@media (max-width:640px){body[data-route=workflow] #screen>.frame>.stack,body[data-route=create] #screen>.frame>.stack{margin-bottom:120px}}
