/* AlphaNova Estimate. Same look as the door game: dark, teal, Jost. Phone first, wider for tablet and laptop at the table. */
:root { --bg:#0c1a20; --bg2:#12262e; --card:#173039; --card2:#1d3a45; --line:#27505d; --teal:#37C0D1; --teal-d:#0b7482; --glow:rgba(55,192,209,.35);
        --ink:#f2fbfc; --mute:#8fb0b8; --gold:#fbbf24; --hot:#ff5a4f; --ok:#34d399; --warm:#ffa03a; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); }
body { margin:0; font-family: Jost, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); font-size: 16px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); }
[hidden] { display:none !important; }
.muted { color: var(--mute); } .center { text-align:center; } .pad { padding: 24px 16px; }
.small { font-size: 13px; }

.top { position: sticky; top:0; z-index: 20; background: linear-gradient(180deg, rgba(12,26,32,.98) 75%, rgba(12,26,32,.0)); padding: 10px 16px 8px; padding-top: calc(10px + env(safe-area-inset-top)); }
.top-in { max-width: 1100px; margin: 0 auto; display:flex; justify-content: space-between; align-items:center; gap: 10px; }
.word { font-weight:800; letter-spacing:.22em; font-size: 15px; color: var(--ink); text-decoration:none; }
.word b { color: var(--teal); font-weight: 800; }
.word small { display:block; letter-spacing:.34em; font-size: 8.5px; font-weight:500; color: var(--mute); margin-top:1px; }
.top-r { display:flex; gap: 6px; align-items:center; flex-wrap: wrap; justify-content: flex-end; }
.tb { background: var(--card); border:1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration:none; white-space: nowrap; }
.tb.on { border-color: var(--teal); color: var(--teal); }
.tb.plain { background:none; border-color: transparent; color: var(--mute); text-decoration: underline; padding: 6px 4px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 4px 16px calc(110px + env(safe-area-inset-bottom)); }
.narrow { max-width: 720px; margin: 0 auto; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: 26px; font-weight: 700; margin: 10px 0 4px; }
h2 { font-size: 19px; font-weight: 700; margin: 18px 0 8px; }
h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.lead { color: var(--mute); margin: 0 0 12px; }

.box { background: var(--card); border:1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.box.soft { background: var(--bg2); }
.box label, .lbl { display:block; font-size: 11.5px; color: var(--mute); margin: 10px 0 4px; text-transform: uppercase; letter-spacing:.08em; }
.box label:first-child { margin-top: 0; }
input, select, textarea { width:100%; padding: 11px 12px; border:1px solid var(--line); border-radius: 11px; background: var(--bg2); color: var(--ink); outline:none; min-width: 0; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); }
textarea { min-height: 84px; resize: vertical; }

.btn { font-weight: 700; border:0; border-radius: 12px; padding: 12px 16px; background: linear-gradient(145deg, var(--teal), #2aa7b8); color:#062a31; box-shadow: 0 6px 16px var(--glow); text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap: 6px; min-height: 46px; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--card2); color: var(--ink); box-shadow:none; border:1px solid var(--line); font-weight: 600; }
.btn.gold { background: linear-gradient(145deg, #fcd34d, var(--gold)); color: #1a1203; box-shadow: 0 6px 16px rgba(251,191,36,.3); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 36px; padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .5; }
.row { display:flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > .btn { flex: 1 1 auto; }
.row > .btn.sm { flex: 0 0 auto; }
.err { color: var(--gold); font-size: 13.5px; min-height: 18px; margin-top: 8px; }

/* sign in */
.gate { max-width: 420px; margin: 0 auto; text-align:center; padding: 18px 0; }
.gate .logo { background:#fff; border-radius: 18px; padding: 14px 18px; display:inline-block; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.gate .logo img { display:block; width: 210px; height:auto; }
.gate .box { text-align:left; margin-top: 18px; }

/* list */
.day { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); margin: 18px 2px 8px; font-weight: 600; }
.cards { display:grid; grid-template-columns: 1fr; gap: 10px; }
.ap { display:flex; gap: 12px; align-items:center; text-align:left; width:100%; background: var(--card); border:1px solid var(--line); border-radius: 16px; padding: 12px 14px; color: var(--ink); }
.ap:active { transform: scale(.99); }
.ap .tm { flex: none; width: 66px; text-align:center; background: rgba(0,0,0,.22); border-radius: 12px; padding: 8px 4px; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.ap .tm small { display:block; font-size: 10px; color: var(--mute); text-transform: uppercase; letter-spacing:.08em; font-weight: 600; }
.ap .who { flex: 1; min-width: 0; }
.ap .nm { font-weight: 700; font-size: 16.5px; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap .ad { color: var(--mute); font-size: 13.5px; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap .go { color: var(--teal); font-size: 22px; flex:none; }
.tag { display:inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--card2); border:1px solid var(--line); color: var(--mute); margin: 4px 4px 0 0; letter-spacing:.03em; white-space: nowrap; }
.tag.demo { color: #1a1203; background: var(--gold); border-color: var(--gold); }
.tag.ok { color: var(--ok); border-color: rgba(52,211,153,.5); }
.tag.warn { color: var(--gold); border-color: rgba(251,191,36,.5); }
.tag.lost { color: var(--hot); border-color: rgba(255,90,79,.5); }
.tag.teal { color: var(--teal); border-color: rgba(55,192,209,.5); }
.tag.confirm { color: var(--gold); border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.08); font-weight: 600; white-space: normal; }
.note { font-size: 13px; color: var(--mute); margin: 10px 2px; }
.banner { border-radius: 14px; padding: 10px 12px; background: rgba(251,191,36,.1); border:1px solid rgba(251,191,36,.35); color: #fde68a; font-size: 13.5px; margin: 8px 0 12px; }
.banner.teal { background: rgba(55,192,209,.08); border-color: rgba(55,192,209,.35); color: #bdf2f8; }

/* visit */
.vhead { display:flex; align-items:center; gap: 10px; margin: 4px 0 8px; }
.back { background:none; border:0; color: var(--teal); font-weight: 600; padding: 6px 0; font-size: 14.5px; white-space: nowrap; }
.vname { font-weight: 700; font-size: 18px; flex:1; min-width:0; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { display:flex; gap: 6px; overflow-x:auto; padding: 2px 0 10px; scrollbar-width: none; position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 10; background: var(--bg); }
.steps::-webkit-scrollbar { display:none; }
.st { flex:none; border:1px solid var(--line); background: var(--card); color: var(--mute); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.st.on { background: var(--teal); color: #062a31; border-color: var(--teal); }
.st.done { color: var(--ink); }
.st .lk { font-size: 11px; margin-left: 4px; }
.foot { position: fixed; left:0; right:0; bottom:0; z-index: 15; background: rgba(12,26,32,.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.foot .in { max-width: 1100px; margin: 0 auto; display:flex; gap: 10px; }
.foot .btn { flex: 1; }
.foot .btn.ghost { flex: 0 0 auto; min-width: 96px; }

.grid2 { display:grid; grid-template-columns: 1fr; gap: 12px; }
.kv { display:grid; grid-template-columns: 92px 1fr; gap: 6px 10px; font-size: 15px; }
.kv b { color: var(--mute); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.notes { list-style:none; padding:0; margin:0; }
.notes li { border-top:1px solid var(--line); padding: 10px 0; white-space: pre-wrap; font-size: 14.5px; }
.notes li:first-child { border-top: 0; padding-top: 0; }
.notes small { display:block; color: var(--mute); font-size: 12px; margin-bottom: 2px; }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin: 4px 0; }

/* questions with tap answers */
.q { padding: 12px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; padding-top: 2px; }
.qt { font-weight: 600; margin-bottom: 8px; }
.chips { display:flex; flex-wrap: wrap; gap: 8px; }
.chip { border:1px solid var(--line); background: var(--bg2); color: var(--ink); border-radius: 12px; padding: 9px 13px; font-size: 14.5px; font-weight: 500; min-height: 42px; }
.chip.on { background: rgba(55,192,209,.16); border-color: var(--teal); color: #e7fbfd; font-weight: 600; box-shadow: inset 0 0 0 1px var(--teal); }
.chip.on.f { background: rgba(251,191,36,.14); border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cnt { display:flex; align-items:center; gap: 8px; margin-top: 10px; }
.cnt span { color: var(--mute); font-size: 13.5px; }
.cnt input { width: 82px; text-align:center; font-weight: 700; font-size: 17px; padding: 8px; }
.cnt button { width: 42px; height: 42px; border-radius: 12px; border:1px solid var(--line); background: var(--card2); font-size: 20px; font-weight: 700; }
.fx { margin-top: 10px; display:grid; gap: 6px; }
.fi { display:flex; gap: 10px; align-items:flex-start; background: var(--bg2); border-radius: 12px; padding: 9px 10px; font-size: 13.5px; }
.fi > div { min-width: 0; flex: 1; }
.fi .rf { font-weight: 700; color: var(--teal); }
.fi .cv { color: var(--ok); font-weight: 700; }
.fi .sh { color: var(--gold); font-weight: 600; }
.star { margin-left:auto; flex:none; border:1px solid var(--line); background: var(--card); color: var(--mute); border-radius: 10px; padding: 4px 9px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.star.on { color: #1a1203; background: var(--gold); border-color: var(--gold); }
.sum { display:grid; gap: 8px; }

/* say boxes: what the rep says, kept small and away from the visuals */
.say { border-left: 3px solid var(--teal); background: rgba(55,192,209,.06); border-radius: 0 12px 12px 0; padding: 10px 12px; margin: 8px 0; }
.say p { margin: 0 0 6px; } .say p:last-child { margin: 0; }
.say .who { font-size: 11px; color: var(--teal); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-bottom: 4px; }
details.say summary { cursor:pointer; font-weight: 600; color: var(--teal); list-style: none; }
details.say summary::-webkit-details-marker { display:none; }
details.say[open] summary { margin-bottom: 6px; }
.recap { font-size: 20px; font-weight: 600; line-height: 1.35; }
.recap em { font-style: normal; color: var(--teal); }

.find { display:flex; gap: 12px; align-items:flex-start; background: var(--card); border:1px solid var(--line); border-radius: 16px; padding: 14px; }
.find .n { flex:none; width: 36px; height: 36px; border-radius: 12px; display:grid; place-items:center; background: linear-gradient(145deg, var(--gold), #f59e0b); color:#1a1203; font-weight: 800; }
.find .t { font-weight: 600; font-size: 17px; }
.find .d { color: var(--mute); font-size: 14px; margin-top: 2px; }

/* pillars */
.pillars { display:grid; grid-template-columns: 1fr; gap: 12px; }
.pillar { background: radial-gradient(120% 140% at 0% 0%, #1f4a57 0%, var(--card) 60%); border:1px solid var(--line); border-radius: 20px; padding: 16px; }
.pillar .no { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(145deg, var(--teal), var(--teal-d)); color:#062a31; font-weight: 800; font-size: 20px; display:grid; place-items:center; margin-bottom: 10px; box-shadow: 0 6px 18px var(--glow); }
.pillar .tg { font-size: 11px; color: var(--teal); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.pillar h3 { font-size: 21px; margin: 4px 0 10px; }
.pillar ul { margin: 0; padding: 0; list-style: none; }
.pillar li { padding: 7px 0 7px 26px; position: relative; font-size: 15.5px; }
.pillar li::before { content: ''; position:absolute; left: 2px; top: 13px; width: 12px; height: 7px; border-left: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: rotate(-45deg); }
.wt { width:100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.wt td, .wt th { text-align:left; padding: 7px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.wt th { color: var(--mute); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; border-top: 0; }
.wt td.y { font-weight: 800; color: var(--teal); white-space: nowrap; }
.roofsvg { width: 100%; height: auto; display:block; margin: 6px 0 2px; }
.roofbox { max-width: 820px; margin-left: auto; margin-right: auto; }

/* price */
.opts { display:grid; grid-template-columns: 1fr; gap: 12px; }
.opt { position:relative; text-align:left; background: var(--card); border:1px solid var(--line); border-radius: 20px; padding: 18px 16px 16px; color: var(--ink); width: 100%; }
.opt.rec { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), 0 10px 30px rgba(55,192,209,.18); }
.opt.on { background: linear-gradient(160deg, #1f4a57, var(--card)); box-shadow: 0 0 0 2px var(--gold); border-color: var(--gold); }
.opt .rb { position:absolute; top: -11px; left: 16px; background: var(--teal); color:#062a31; font-size: 11px; font-weight: 800; letter-spacing:.1em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.opt .on-b { position:absolute; top: 12px; right: 14px; color: var(--gold); font-weight: 800; font-size: 13px; }
.opt .k { color: var(--mute); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.opt .nm { font-size: 22px; font-weight: 700; margin: 2px 0 10px; }
.opt .pr { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0 10px; }
.opt .pr.none { font-size: 17px; color: var(--mute); font-weight: 600; }
.opt ul { margin: 0; padding-left: 18px; color: #d6eef2; font-size: 14.5px; }
.locked { text-align:center; padding: 34px 16px; }
.locked .ic { font-size: 40px; }

/* terms */
.inc { display:grid; grid-template-columns: 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.inc li { background: var(--card); border:1px solid var(--line); border-radius: 14px; padding: 11px 12px 11px 40px; position: relative; font-size: 15px; }
.inc li::before { content:''; position:absolute; left: 15px; top: 16px; width: 12px; height: 7px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }
.term { background: var(--card); border:1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.term .big { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.bigq { text-align:center; font-size: 26px; font-weight: 800; padding: 26px 12px; border-radius: 20px; background: radial-gradient(120% 140% at 50% 0%, #1f4a57 0%, var(--card) 70%); border: 1px solid var(--teal); margin: 16px 0 6px; }

/* close */
.case { background: var(--card); border:1px solid var(--line); border-radius: 16px; margin-bottom: 10px; overflow:hidden; }
.case summary { list-style:none; cursor:pointer; padding: 14px; font-weight: 700; font-size: 16px; display:flex; justify-content: space-between; gap: 8px; }
.case summary::-webkit-details-marker { display:none; }
.case summary::after { content: '+'; color: var(--teal); font-size: 20px; line-height: 1; }
.case[open] summary::after { content: '\2212'; }
.case .in { padding: 0 14px 14px; }
.room { font-weight: 700; color: #1a1203; background: var(--gold); border-radius: 14px; padding: 12px 14px; margin: 4px 0 12px; }

/* result */
.res { display:grid; grid-template-columns: 1fr; gap: 10px; }
.rbtn { border-radius: 18px; border:1px solid var(--line); background: var(--card); padding: 18px; font-size: 20px; font-weight: 800; color: var(--ink); text-align:left; }
.rbtn small { display:block; font-size: 13px; font-weight: 500; color: var(--mute); margin-top: 2px; }
.rbtn.on.signed { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok); }
.rbtn.on.notyet { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.rbtn.on.lost { border-color: var(--hot); box-shadow: 0 0 0 2px var(--hot); }

/* questions at the table */
.search { position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 9; background: var(--bg); padding: 4px 0 10px; }
.search input { font-size: 17px; padding: 13px 14px; }
.qa { background: var(--card); border:1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.qa summary { list-style:none; cursor:pointer; padding: 13px 14px; font-weight: 600; display:flex; gap: 8px; justify-content: space-between; }
.qa summary::-webkit-details-marker { display:none; }
.qa summary::after { content:'+'; color: var(--teal); font-weight: 700; }
.qa[open] summary::after { content: '\2212'; }
.qa .a { padding: 0 14px 14px; color: #d6eef2; }
.qa.edge { border-color: rgba(251,191,36,.45); }

/* office */
.sw { display:flex; align-items:center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.sw:first-of-type { border-top: 0; }
.sw .tx { flex:1; min-width:0; }
.tog { position: relative; width: 52px; height: 30px; flex:none; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); }
.tog::after { content:''; position:absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--mute); transition: left .15s; }
.tog.on { background: var(--teal); border-color: var(--teal); }
.tog.on::after { left: 25px; background: #062a31; }
.tog[disabled] { opacity: .5; }
.pr3 { display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.found { display:grid; gap: 6px; margin-top: 8px; }
.found button { text-align:left; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 40; background: var(--ink); color: var(--bg); font-weight: 700; padding: 10px 16px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: 90vw; text-align:center; }

@media (min-width: 760px) {
  body { font-size: 17px; }
  .wrap { padding-left: 28px; padding-right: 28px; }
  h1 { font-size: 32px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .opts { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .inc { grid-template-columns: 1fr 1fr; }
  .res { grid-template-columns: repeat(3, 1fr); }
  .recap { font-size: 24px; }
  .bigq { font-size: 34px; }
  .find .t { font-size: 19px; }
}
@media (min-width: 1200px) {
  .pillar h3 { font-size: 24px; }
  .opt .nm { font-size: 25px; }
}
