.result-community{margin:20px 0;text-align:center}
.result-community-credit{display:flex;align-items:center;gap:12px;background:#edf4e9;color:#154f35;padding:16px;border-radius:16px;text-align:left;line-height:1.35}
.result-community-credit[hidden]{display:none!important}
.result-community-credit>span{font-size:26px;flex:none}
.result-community-credit>strong{flex:1;min-width:0;font-size:16px}
.result-community-credit>b{flex:none;border-radius:999px;background:#fff;padding:6px 14px;font-size:26px;white-space:nowrap}
.result-community-how{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:8px;color:#155536!important;font-size:16px;font-weight:700;text-decoration:underline!important;text-underline-offset:4px}
@media(max-width:360px){.result-community-credit{gap:8px;padding:12px}.result-community-credit>strong{font-size:14px}.result-community-credit>b{font-size:23px;padding:5px 10px}}
/* Keep replay reachable on short laptop and phone viewports. */
@media(max-height:700px){
 #result>.score{font-size:48px;line-height:1.1;margin:6px 0}
 #result>#impactTotal{font-size:16px;margin:6px 0}
 #result>#resultText{margin:6px 0}
 #result .result-community{margin:10px 0}
 #result .result-community-credit{padding-block:10px}
 #result .result-community-how{margin-top:0}
}
@media(max-height:520px) and (max-width:700px){
 #result>.score{font-size:40px;line-height:1.05;margin:2px 0}
 #result>#impactTotal{font-size:14px;margin:4px 0}
 #result>#resultText{font-size:13px;line-height:1.35}
 #result .result-community{margin:6px 0}
 #result .result-community-credit{padding-block:8px}
 #result #replay{min-height:44px;padding-block:10px}
}
.result-progress{display:grid;gap:18px;margin:20px 0 6px;color:#183c2a;text-align:left}
.result-progress[hidden]{display:none!important}
.result-progress-label{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:7px;font-size:15px;line-height:1.35}
.result-progress-label>strong{min-width:0;flex:1}
.result-progress-label>span{white-space:nowrap;font-variant-numeric:tabular-nums}
.result-progress-line{display:flex;align-items:center;gap:10px}
.result-progress-line>span{width:46px;text-align:right;font-size:13px;color:#506455;white-space:nowrap}
.result-progress-track{height:12px;flex:1;min-width:0;overflow:hidden;border-radius:999px;background:#e2e9e1}
.result-progress-track>span{display:block;height:100%;border-radius:inherit;background:#90bc8b}
@media(max-height:700px){
 #result .result-progress{gap:12px;margin:12px 0 4px}
}
/* Desktop summary: result and community progress share the available width. */
@media(min-width:1001px){
 body.prototype-landing #challenge .quiz:has(>#result.show){width:100%;max-width:1000px!important;margin-inline:auto!important}
 body.prototype-landing #result.show{
  display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);column-gap:28px;row-gap:8px;
  width:min(940px,100%);margin-inline:auto;align-items:center;
 }
 body.prototype-landing #result>.tag{grid-column:1;grid-row:1;justify-self:center;margin:0}
 body.prototype-landing #result>.score{grid-column:1;grid-row:2;font-size:56px;line-height:1.05;margin:0}
 body.prototype-landing #result>#impactTotal{grid-column:1;grid-row:3;font-size:16px;line-height:1.4;margin:0}
 body.prototype-landing #result>#resultText{grid-column:1;grid-row:4;font-size:14px;line-height:1.45;margin:0}
 body.prototype-landing #result>p:last-of-type{grid-column:1;grid-row:5;font-size:13px;line-height:1.45;margin:0!important}
 body.prototype-landing #result>.result-community{
  grid-column:2;grid-row:1/span 5;margin:0;padding:16px;border:1px solid #e0e8dd;border-radius:18px;align-self:stretch;
  display:flex;flex-direction:column;justify-content:center;
 }
 body.prototype-landing #result .result-community-credit{padding:12px;gap:10px}
 body.prototype-landing #result .result-community-credit>strong{font-size:14px}
 body.prototype-landing #result .result-community-credit>b{font-size:24px;padding:4px 12px}
 body.prototype-landing #result .result-progress{gap:14px;margin:14px 0 0}
 body.prototype-landing #result .result-progress-label{font-size:14px;margin-bottom:6px}
 body.prototype-landing #result .result-progress-track{height:10px}
 body.prototype-landing #result .result-community-how{margin-top:6px;font-size:14px}
 body.prototype-landing #result.show>.actions{
  grid-column:1/-1;grid-row:6;position:static;transform:none;width:auto;margin:8px 0 0!important;padding:0;
  background:transparent;box-shadow:none;justify-content:center;
 }
 body.prototype-landing #result #replay{min-width:220px;min-height:44px;padding:10px 24px;font-size:16px}
 body.prototype-landing #result>.email{grid-column:1/-1;grid-row:7;margin:10px 0 0;padding:14px 18px;font-size:13px}
 body.prototype-landing #result>.email>b{font-size:15px}
 body.prototype-landing #result .emailrow{margin-top:8px}
 body.prototype-landing #result .emailrow input{padding:10px 12px}
 body.prototype-landing #result .consent{margin-top:8px}
 body.prototype-landing:has(#result.show){padding-bottom:0}
}
/* Result heading and replay share the first row, with no floating controls. */
body.prototype-landing #result.show{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:10px 16px;align-items:center}
body.prototype-landing #result>.tag{grid-column:1;grid-row:1;justify-self:start;margin:0;font-size:12px}
body.prototype-landing #result>.score{grid-column:1;grid-row:2;text-align:left;margin:0;font-size:52px;line-height:1.05}
body.prototype-landing #result.show>.actions{grid-column:2;grid-row:1/span 2;display:flex;flex-direction:column;align-items:stretch;gap:8px;position:static;transform:none;width:auto;min-width:0;margin:0!important;padding:0;background:transparent;box-shadow:none}
body.prototype-landing #result .result-replay-caption{font-size:12px;line-height:1.4;margin:0;color:#46604f;text-align:center}
body.prototype-landing #result>#impactTotal{grid-column:1/-1;grid-row:3;margin:8px 0 0}
body.prototype-landing #result>#resultText{grid-column:1/-1;grid-row:4;margin:0}
body.prototype-landing #result>.result-community{grid-column:1/-1;grid-row:5;margin:8px 0}
body.prototype-landing #result>.email{grid-column:1/-1;grid-row:6;margin-top:4px}
@media(max-width:1000px){
 body.prototype-landing #result #replay{width:100%;min-width:0;min-height:44px;padding:12px 10px;font-size:14px;line-height:1.3;white-space:normal}
 body.prototype-landing #result>.tag{font-size:11px;padding:7px 9px}
}
@media(min-width:1001px){
 body.prototype-landing #result.show{column-gap:28px;row-gap:10px}
 body.prototype-landing #result>.tag{justify-self:start}
 body.prototype-landing #result>#impactTotal{grid-column:1;grid-row:3;text-align:left;align-self:end}
 body.prototype-landing #result>#resultText{grid-column:1;grid-row:4;text-align:left;align-self:start}
 body.prototype-landing #result>.result-community{grid-column:2;grid-row:3/span 2;margin:0}
 body.prototype-landing #result>.email{grid-column:1/-1;grid-row:5;margin-top:8px}
}
body.prototype-landing #result .result-replay-caption{font-weight:600}
@media(max-width:360px){body.prototype-landing #result>.score{font-size:40px}}
@media(min-width:1001px){
 body.prototype-landing #result>.score{font-size:48px;line-height:1}
 body.prototype-landing #result.show>.actions{align-items:flex-end}
 body.prototype-landing #result #replay{width:260px;max-width:100%}
 body.prototype-landing #result .result-replay-caption{width:260px;max-width:100%}
 body.prototype-landing #result>.result-community{padding:12px}
 body.prototype-landing #result .result-community-credit{padding:8px}
 body.prototype-landing #result .result-community-credit>b{font-size:20px;padding:2px 10px}
 body.prototype-landing #result .result-progress{gap:8px;margin-top:8px}
 body.prototype-landing #result .result-progress-label{margin-bottom:4px}
 body.prototype-landing #result .result-community-how{min-height:32px;margin-top:2px}
}

/* Carry the warm game palette into the summary on every viewport. */
html body.prototype-landing #challenge .quiz:has(#result.show),
html body.group-quiz-page #results{
 background:#f5f0df!important;border-color:#e2dac4!important;
}
html body.prototype-landing #result>.result-community,
html body.prototype-landing #result>.email,
html body.group-quiz-page #results>.result-community{
 background:#fffcf4!important;border-color:#e4dcc8!important;
}

/* Keep consent in the same visible block as the reminder action. */
html body.prototype-landing #result .emailrow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 14px;align-items:center}
html body.prototype-landing #result .emailrow>#email{grid-column:1/-1;grid-row:1;min-width:0;width:100%}
html body.prototype-landing #result .emailrow>.consent{grid-column:1;grid-row:2;margin:0;min-height:32px;align-items:center;cursor:pointer}
html body.prototype-landing #result .emailrow>#emailBtn{grid-column:2;grid-row:2;min-height:44px;align-self:end}
html body.prototype-landing #result #consent{width:18px;height:18px;flex:none;margin:0;accent-color:#17603e}
html body.prototype-landing #result .consent:has([aria-invalid=true]){outline:2px solid #a54b37;outline-offset:4px;border-radius:4px}
@media(max-width:700px){
 html body.prototype-landing #result .emailrow{grid-template-columns:minmax(0,1fr);gap:10px}
 html body.prototype-landing #result .emailrow>#emailBtn{grid-column:1;grid-row:3;width:100%}
}

/* The warm inner progress panel needs its own corners and breathing room. */
html body.prototype-landing #result>.result-community,
html body.group-quiz-page #results>.result-community{
 border:1px solid #e4dcc8;border-radius:18px;padding:16px;min-width:0;box-sizing:border-box;
}
.result-community .result-progress-label{flex-wrap:wrap;gap:5px 12px}
.result-community .result-progress-label>strong{flex:1 1 120px}
.result-community .result-progress-label>span{margin-left:auto}
@media(max-width:360px){
 html body.prototype-landing #result>.result-community,
 html body.group-quiz-page #results>.result-community{padding:12px}
}

/* Editorial solo summary. Keep the existing score, progress and reminder controls. */
@media (min-width: 1001px) {
 html body.prototype-landing.desktop-landing-refined #challenge .quiz:has(>#result.show) {
  max-width: 780px!important;
  margin-inline: auto;
  padding: 16px!important;
  border-radius: 18px;
  background: linear-gradient(105deg, #f2eddf, #fbf8ed 58%, #eeebdc)!important;
 }
 html body.prototype-landing.desktop-landing-refined #result.show {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-rows: repeat(5, auto);
  column-gap: 18px;
  row-gap: 5px;
  width: 100%;
  text-align: start;
  align-items: start;
 }
 html body.prototype-landing.desktop-landing-refined #result.show #soloResultClose {
  display: grid;
 }
 html body.prototype-landing.desktop-landing-refined #result > .tag {
  grid-area: 1 / 1;
  background: #e2e4d3;
  color: #334835;
  border-color: transparent;
 }
 html body.prototype-landing.desktop-landing-refined #result > .score {
  grid-area: 2 / 1;
  color: #1e2420;
  font: 400 clamp(48px, 5vw, 64px)/1.02 Lora, Georgia, serif;
 }
 html body.prototype-landing.desktop-landing-refined #result > #impactTotal {
  grid-area: 3 / 1;
  max-width: 100%;
  font: 600 clamp(18px, 1.8vw, 22px)/1.18 Lora, Georgia, serif;
  margin: 0;
 }
 html body.prototype-landing.desktop-landing-refined #result > #resultText {
  grid-area: 4 / 1;
  color: #454941;
 }
 html body.prototype-landing.desktop-landing-refined #result.show > .actions {
  grid-area: 5 / 1;
  align-items: stretch;
  justify-self: start;
  width: min(100%, 285px);
  margin-block: 4px 0!important;
 }
 html body.prototype-landing.desktop-landing-refined #result #replay {
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(155deg, #24563d, #103425)!important;
  color: #fcfaf2!important;
  font-family: Lora, Georgia, serif;
 }
 html body.prototype-landing.desktop-landing-refined #result .result-replay-caption {
  width: 100%;
  font-style: italic;
 }
 html body.prototype-landing.desktop-landing-refined #result > :is(.email,.result-community) {
  grid-column: 2;
  align-self: start;
  min-width: 0;
  margin: 0!important;
  padding: 9px 12px;
  border: 0!important;
  border-radius: 12px;
  background: #e9e9d9!important;
  box-shadow: none;
 }
 html body.prototype-landing.desktop-landing-refined #result.show::before {
  content: "";
  grid-area: 2 / 2 / 6 / 3;
  justify-self: start;
  align-self: stretch;
  width: 1px;
  margin-inline-start: -9px;
  background: #d7cebb;
  pointer-events: none;
 }
 html body.prototype-landing.desktop-landing-refined #result > .email {
  grid-row: 4 / 6;
 }
 html body.prototype-landing.desktop-landing-refined #result > .result-community {
  grid-row: 2 / 4;
  justify-content: flex-start;
  padding-block: 0;
  background: transparent!important;
 }
 html body.prototype-landing.desktop-landing-refined #result :is(.email > b,.result-progress > .result-progress-label > strong) {
  color: #202a22;
  font: 600 clamp(17px, 1.65vw, 23px)/1.25 Lora, Georgia, serif;
 }
 html body.prototype-landing.desktop-landing-refined #result .emailrow > #email { grid-column: 1; }
 html body.prototype-landing.desktop-landing-refined #result .emailrow > .consent { grid-column: 1 / -1; }
 html body.prototype-landing.desktop-landing-refined #result .emailrow > #emailBtn {
  grid-area: 1 / 2;
  align-self: center;
  background: #174431!important;
  color: #fff!important;
  border-radius: 999px;
 }
 html body.prototype-landing.desktop-landing-refined #result .result-progress { gap: 5px; margin-top: 4px; }
 html body.prototype-landing.desktop-landing-refined #result .result-progress-label { margin-bottom: 3px; }
 html body.prototype-landing.desktop-landing-refined #result .result-community-how { margin-top: 0; }
 html body.prototype-landing.desktop-landing-refined #result .emailrow { gap: 4px 8px; }
 html body.prototype-landing.desktop-landing-refined #result .email > p { margin-block: 4px; }
 body.desktop-landing-refined #result .result-progress-track > span { background: #7d9c68; }
}

#result #soloResultClose {
  display: none;
  grid-area: 1 / 2;
  place-items: center;
  justify-self: end;
  width: 44px;
  height: 44px;
  border: 1px solid #cfdfc4;
  border-radius: 50%;
  background: #e5efdc;
  color: #14472d;
  font: 500 29px/1 system-ui, sans-serif;
  cursor: pointer;
 }
#result #soloResultClose:focus-visible { outline: 2px solid #17603e; outline-offset: 2px; }

@media (max-width: 1000px) {
 html body.prototype-landing #challenge .quiz:has(>#result.show) {
  background: #faf7ee!important;
  border: 2px solid #fff!important;
  border-radius: 24px;
  padding: clamp(12px, 4vw, 20px)!important;
 }
 html body.prototype-landing #challenge #result.show {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 7px 12px;
  background: none!important;
 }
 body.prototype-landing #result > .tag {
  font-weight: 700;
  background: #e6efd9;
  color: #164d30;
 }
 #result #soloResultClose { display: grid; }
 body.prototype-landing #result > .score {
  font-size: clamp(44px, 14vw, 72px);
  color: #0c3725;
  font-variant-numeric: tabular-nums;
 }
 body.prototype-landing #result.show > .actions {
  grid-area: 2 / 2;
  gap: 4px;
 }
 body.prototype-landing #result #replay {
  border-radius: 999px;
  background: linear-gradient(155deg, #1c6340, #0a3e29)!important;
  color: #fff!important;
  font-weight: 700;
  padding-block: 7px;
 }
 body.prototype-landing #result .result-replay-caption { font-weight: 400; color: #184c33; }
 body.prototype-landing #result > #impactTotal {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
 }
 body.prototype-landing #result > #resultText {
  grid-row: 3;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
 }
 html body.prototype-landing #result > :is(.result-community, .email) {
  padding: 9px 0 0;
  margin: 4px 0 0;
  border: 0;
  border-top: 1px solid #d9dacd!important;
  border-radius: 0;
  background: transparent!important;
  box-shadow: none;
 }
 body.prototype-landing #result > .result-community { grid-row: 4; }
 body.prototype-landing #result > .email { grid-row: 5; text-align: start; }
 #result .result-community-credit {
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(105deg, #eff3e4, #e2ecd6);
 }
 #result .result-community-credit > strong { font-size: 13px; }
 #result .result-community-credit > b { font-size: 22px; padding: 3px 11px; }
 #result .result-progress { gap: 7px; margin: 7px 0 0; }
 #result .result-progress-label { gap: 4px 8px; font-size: 13px; margin-bottom: 4px; }
 #result .result-progress-track { height: 10px; }
 #result .result-progress-track > span { background: #508642; }
 #result .result-community-how { font-size: 13px; margin-top: 0; }
 #result .email > b { font-size: 15px; }
 #result :is(#emailInfo, .consent) { font-size: 13px; line-height: 1.4; }
 html body.prototype-landing #result .emailrow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
 #result .emailrow > #email { min-height: 44px; padding-block: 8px; font-size: 16px; }
 #result .emailrow > .consent { min-height: 44px; }
 html body.prototype-landing #result .emailrow > #emailBtn {
  grid-area: 3 / 1;
  width: 100%;
  border-radius: 999px;
 }
 #result #emailStatus:empty { display: none; }
}
