/* Sun Check, the shopper's page. One loud moment: their own roof inside a
   crate-label sunburst, the sun sweeping over it, panels dropping in. The rest
   is calm, large and quick to tap. */

body { min-height: 100dvh; }

.bar {
  max-width: var(--track); margin: 0 auto;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem var(--gutter-r) 0.25rem var(--gutter-l);
}
.mark { display: inline-flex; align-items: center; gap: 0.45rem; font: 400 1.25rem/1 var(--display); color: var(--ink); text-decoration: none; }
.mark svg { width: 30px; height: 30px; flex: none; }
.with { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); line-height: 1.2; min-width: 0; }
.lang { margin-left: auto; display: inline-flex; background: var(--well); border-radius: 999px; padding: 3px; gap: 2px; flex: none; }
.lang button { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 800 0.8125rem/1 var(--body); padding: 0.5rem 0.65rem; border-radius: 999px; cursor: pointer; min-width: 40px; min-height: 34px; }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }

main { max-width: var(--track); margin: 0 auto; padding: 0.4rem var(--gutter-r) calc(2.5rem + env(safe-area-inset-bottom, 0px)) var(--gutter-l); }
.screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.05rem; }
.screen h1 { font-size: clamp(2.1rem, 9.5vw, 2.9rem); line-height: 1; }
.screen h2 { font: 400 clamp(1.7rem, 7.5vw, 2.2rem)/1.05 var(--display); }
.lede { font-size: 1.0625rem; color: var(--ink-2); max-width: 38ch; }
.context {
  justify-self: start; background: var(--lemon); color: var(--on-lemon);
  font-weight: 800; font-size: 0.9375rem; border-radius: 999px; padding: 0.45rem 0.9rem;
  transform: rotate(-2deg); box-shadow: var(--shadow);
}

/* The landing art: a small crate label */
.art { border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow); transform: rotate(-1.2deg); }
.art svg { display: block; width: 100%; height: auto; }

/* Address */
.addr { display: grid; grid-template-columns: minmax(0, 1fr) 6.6rem; gap: 0.6rem; position: relative; }
.addr .street { grid-column: 1; }
.addr .zip { grid-column: 2; }
.addr-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.6rem; }
.addr-actions .btn { padding-inline: 0.7rem; }
.err { grid-column: 1 / -1; color: var(--stamp); font-weight: 700; font-size: 0.9375rem; min-height: 0; }
.err:empty { display: none; }
.suggest {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% - 7.6rem);
  list-style: none; margin: 0; padding: 0.35rem; background: var(--surface); border-radius: var(--r-m);
  box-shadow: var(--shadow), 0 0 0 1.5px var(--line);
}
.suggest button { appearance: none; border: 0; background: none; width: 100%; text-align: left; color: var(--ink); font: 600 1rem/1.3 var(--body); padding: 0.7rem 0.6rem; border-radius: 10px; cursor: pointer; }
.suggest button:hover, .suggest button:focus-visible { background: var(--well); }

/* The roof stage */
.stage-wrap { position: relative; isolation: isolate; overflow: hidden; padding: 22px 14px; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); }
.stage-wrap::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; pointer-events: none;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 3deg, var(--lemon) 0deg 6deg, transparent 6deg 15deg);
  mask: radial-gradient(circle, transparent 0 22%, #000 23% 64%, transparent 66%);
  -webkit-mask: radial-gradient(circle, transparent 0 22%, #000 23% 64%, transparent 66%);
  opacity: 0.55;
}
.frame {
  position: relative; border-radius: var(--r-l); overflow: hidden; background: #1a2a5e;
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 8px var(--ink), var(--shadow);
  transform: rotate(-1deg);
  aspect-ratio: 5 / 4;
}
.frame canvas { display: block; width: 100%; height: 100%; touch-action: manipulation; cursor: crosshair; }
.north { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(13, 21, 51, 0.72); color: #fff; display: grid; place-items: center; font: 800 0.75rem/1 var(--body); }
.north svg { width: 12px; height: 12px; margin-bottom: -2px; }
.north span { display: grid; justify-items: center; }
.scale { position: absolute; left: 10px; bottom: 10px; color: #fff; font: 700 0.6875rem/1 var(--body); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.scale i { display: block; height: 5px; border: 2px solid #fff; border-top: 0; margin-bottom: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }

/* Bespoke loader: the sun climbing over a roofline */
.loader { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 0.9rem; background: #1a2a5e; color: #fff; z-index: 2; }
.loader svg { width: 150px; height: 90px; }
.loader .sunup { animation: sunup 1.6s ease-in-out infinite alternate; transform-origin: 75px 80px; }
@keyframes sunup { from { transform: translateY(26px); } to { transform: translateY(0); } }
.loader p { font-weight: 700; font-size: 1rem; }
.tip { font-size: 0.875rem; color: var(--ink-2); text-align: center; }

.neighbors {
  background: var(--surface); border-radius: var(--r-m); padding: 0.85rem 0.95rem;
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 1rem; line-height: 1.4;
  display: grid; gap: 0.25rem;
}
.neighbors b { font: 400 1.25rem/1 var(--display); }
.neighbors small { color: var(--ink-2); font-size: 0.75rem; }

.ask { display: grid; gap: 0.6rem; }
.ask p { font-weight: 700; font-size: 1.0625rem; }
.ask .help { font-weight: 500; font-size: 0.875rem; color: var(--ink-2); }
.choices { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.choices .chip { min-height: 46px; }
.choices.stack { display: grid; gap: 0.45rem; }
.choices.stack .chip { border-radius: var(--r-m); text-align: left; padding: 0.75rem 0.95rem; }
.tradeoff { font-size: 0.9375rem; font-weight: 600; background: var(--well); border-radius: var(--r-s); padding: 0.65rem 0.8rem; }
.tradeoff:empty { display: none; }
.attrib { font-size: 0.6875rem; color: var(--ink-2); text-align: center; }

/* Numbers */
.slider-row { display: grid; gap: 0.5rem; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.slider-top span { font-weight: 700; }
.slider-top b { font: 400 2rem/1 var(--display); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 44px; accent-color: var(--cobalt); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 700; background: var(--surface); border-radius: var(--r-m); padding: 0.7rem 0.95rem; box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.switch input { appearance: none; width: 54px; height: 32px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background 0.15s ease; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s ease; }
.switch input:checked { background: var(--grove); }
.switch input:checked::after { transform: translateX(22px); }
.snap { display: grid; gap: 0.3rem; }
.snap small { color: var(--ink-2); font-size: 0.8125rem; }
.snap-status { font-size: 0.9375rem; font-weight: 600; }
.snap-status:empty { display: none; }

.estimate {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--label-bg); color: var(--label-ink); border-radius: var(--r-l); padding: 1.15rem 1.15rem 1rem;
  box-shadow: var(--shadow); display: grid; gap: 0.75rem;
}
.estimate::before {
  content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; right: -150px; top: -150px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(244, 204, 42, 0.9) 0deg 7deg, transparent 7deg 17deg);
  mask: radial-gradient(circle, transparent 0 40px, #000 41px);
  -webkit-mask: radial-gradient(circle, transparent 0 40px, #000 41px);
}
.estimate::after { content: ""; position: absolute; z-index: -1; width: 80px; height: 80px; right: -40px; top: -40px; border-radius: 50%; background: #f4cc2a; }
.est-label { font-weight: 700; font-size: 0.875rem; opacity: 0.9; }
.est-big { font: 400 clamp(2.6rem, 13vw, 3.6rem)/0.95 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.est-big small { font: 700 1rem/1 var(--body); margin-left: 0.35rem; letter-spacing: 0; }
.est-small { font: 700 1.125rem/1.35 var(--body); }
.est-note { font-size: 0.8125rem; opacity: 0.9; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; border-top: 1px solid rgba(255, 255, 255, 0.25); padding-top: 0.75rem; }
.facts span { font-size: 0.8125rem; line-height: 1.3; }
.facts b { display: block; font: 400 1.35rem/1.05 var(--display); }
details.how summary { cursor: pointer; font-weight: 700; color: var(--cobalt); list-style: none; }
details.how summary::-webkit-details-marker { display: none; }
details.how p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; }
.owner-note { background: var(--well); border-radius: var(--r-m); padding: 0.9rem; display: grid; gap: 0.6rem; font-weight: 600; }

/* Times and contact */
.prefs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.prefs .chip { border-radius: var(--r-m); min-height: 60px; font-size: 1rem; }
.seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35rem; background: var(--well); border-radius: var(--r-m); padding: 4px; }
.seg3 button { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 700 0.875rem/1.15 var(--body); border-radius: 10px; min-height: 48px; padding: 0.4rem; cursor: pointer; }
.seg3 button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.contact { display: grid; gap: 0.75rem; }
.consent { background: var(--well); border-radius: var(--r-m); padding: 0.85rem; font-size: 0.8125rem; line-height: 1.45; display: grid; gap: 0.5rem; }
.consent .check { font-weight: 600; }
.consent .alt { color: var(--ink-2); }
.placeholder { background: var(--ink); color: var(--lemon); border-radius: 4px; padding: 0 0.25em; font-weight: 700; }
.sendbar { display: grid; gap: 0.5rem; }

/* Done */
.ticket {
  position: relative; background: var(--surface); border-radius: var(--r-l); padding: 1.2rem; box-shadow: var(--shadow);
  display: grid; gap: 0.5rem; overflow: hidden;
}
.ticket h2 { font-size: 2.4rem; }
.ticket .sentstamp {
  position: absolute; right: 12px; top: 14px; font: 400 1.4rem/1 var(--display); color: var(--grove);
  border: 3px solid var(--grove); border-radius: 10px; padding: 0.25rem 0.55rem; transform: rotate(8deg);
  animation: thunk 0.7s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes thunk { 0% { transform: rotate(8deg) scale(2); opacity: 0; } 60% { transform: rotate(8deg) scale(0.95); opacity: 1; } 100% { transform: rotate(8deg) scale(1); } }
.ready { display: grid; gap: 0.45rem; background: var(--surface); border-radius: var(--r-m); padding: 1rem; box-shadow: inset 0 0 0 1.5px var(--line); }
.ready h3 { font: 800 1.0625rem/1.2 var(--body); }
.ready ul { margin: 0; padding-left: 1.15rem; display: grid; gap: 0.3rem; }
.neighbor-card {
  background: var(--lemon); color: var(--on-lemon); border-radius: var(--r-l); padding: 1.1rem; box-shadow: var(--shadow);
  display: grid; gap: 0.6rem; transform: rotate(1deg);
}
.neighbor-card h3 { font: 400 1.5rem/1.1 var(--display); }
.neighbor-card .btn { background: var(--ink); color: var(--paper); }
.neighbor-card small { font-size: 0.8125rem; font-weight: 600; }
.repgets summary { cursor: pointer; font-weight: 700; color: var(--cobalt); }
.repgets pre { white-space: pre-wrap; background: var(--well); border-radius: var(--r-s); padding: 0.8rem; font: 500 0.8125rem/1.45 var(--body); margin: 0.6rem 0 0; }
.btnrow { display: flex; gap: 0.55rem; flex-wrap: wrap; }

@media (min-width: 44rem) {
  .prefs { grid-template-columns: repeat(4, 1fr); }
}

.linkbtn.back { justify-self: start; text-decoration: none; font-weight: 700; padding: 0.4rem 0; }
.linkbtn.back::before { content: "\2039  "; }

/* Sun sweep caption, then the takeaway */
.sweepbar { display: grid; gap: 0.55rem; justify-items: start; }
.sweepcap { font-size: 1rem; font-weight: 600; line-height: 1.4; min-height: 2.8em; }
.sweepcap.take { font: 400 1.35rem/1.2 var(--display); min-height: 0; }
.sweepbar .btn svg { width: 1em; height: 1em; }
