/* Cheapest vs. Most Expensive House in Every State — production styles.
   Rebuilt 2026-10-09 from the approved Claude Design canvas. One question bar,
   two house columns, each house's price field under its own listing. */

@keyframes hx-fade { from{opacity:0} to{opacity:1} }
@keyframes hx-pop  { 0%{transform:scale(.96);opacity:0} 100%{transform:scale(1);opacity:1} }
@keyframes hx-shake{ 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)} 30%,50%,70%{transform:translateX(-5px)} 40%,60%{transform:translateX(5px)} }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

.hx {
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  --accent:#ff8a34; --accent-ink:#161410; --good:#3ecf8e; --bad:#ff6b6b; --hl:#ffe36a; --hl-ink:#1a1a17;
  --bg:#0e0f11; --surface:#17191c; --surface2:#1f2226; --line:#2a2d33; --ink:#f3f2ed; --muted:#a3a5ab; --dim:#6b6e75;
  --bar:#0a0a0b; --grey:#24272c; --grey2:#1c1e22; --overlay:rgba(9,9,11,.88);
  min-height: 100dvh; background: var(--bg); color: var(--ink);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.hx.light {
  --bg:#f6f5f1; --surface:#ffffff; --surface2:#eeede7; --line:#e2e0d8; --ink:#16161a; --muted:#5d5f66; --dim:#8d8f96;
  --bar:#111113; --grey:#e6e4dd; --grey2:#dddbd3; --overlay:rgba(30,30,26,.45);
}
.hx button, .hx input { font-family: inherit; font-variant-numeric: tabular-nums; }
.hx button { cursor: pointer; }
.hx button:disabled { cursor: not-allowed; }
.hx a { color: var(--accent); }

.wrap { max-width: 1440px; margin: 0 auto; padding: 16px 32px 24px; display: flex; flex-direction: column; gap: 16px; min-height: 100dvh; }
.mono { letter-spacing: .14em; text-transform: uppercase; font-size: 11px; font-weight: 800; color: var(--dim); }

/* buttons + fields */
.btn { height: 56px; padding: 0 28px; border-radius: 14px; border: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em;
  transition: transform .12s, filter .12s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.quiet { background: var(--surface2); color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .4; filter: none; transform: none; }
.field { height: 56px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 18px; font-weight: 700; padding: 0 18px; outline: 0; width: 100%; }
.field::placeholder { color: var(--dim); font-weight: 600; }
.field:focus { border-color: var(--accent); }
.field:disabled { opacity: .45; }
.field.shake { border-color: var(--bad); animation: hx-shake .42s ease; }
.iconbtn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; text-decoration: none; }
.iconbtn:hover { border-color: var(--dim); }
.iconbtn svg { display: block; }

/* header */
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 44px; }
.head .left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.head .ttl { font-size: 18px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head .ttl span { color: var(--accent); }
.head .right { display: flex; gap: 8px; align-items: center; }
.pill { display: flex; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; height: 40px; padding: 0 16px; }
.pill b { font-size: 17px; white-space: nowrap; }
.pill b.score { color: var(--accent); }

/* start */
.start { margin: auto; width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 28px; padding: 24px 0; animation: hx-fade .2s ease; }
.start h1 { margin: 0; font-size: 44px; line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.steps { display: flex; flex-direction: column; gap: 12px; font-size: 19px; font-weight: 700; }
.steps div { display: flex; align-items: center; gap: 14px; }
.steps span { width: 32px; height: 32px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; flex: 0 0 auto; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.modes .btn { height: 72px; font-size: 20px; border-radius: 18px; }
.resume { height: 60px; border-radius: 18px; font-size: 17px; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--dim); font-weight: 600; margin-top: auto; padding-top: 16px; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--muted); }
.err { font-size: 14px; font-weight: 700; color: var(--bad); }

/* question bar */
.bar { position: relative; width: 100%; max-width: 760px; margin: 0 auto; z-index: 5; order: 0; }
.ask { position: relative; }
.ask .field { height: 60px; font-size: 19px; padding-left: 22px; padding-right: 110px; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,138,52,.14); }
.ask .hint { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.drop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow-y: auto; max-height: min(300px, 40vh); box-shadow: 0 16px 48px rgba(0,0,0,.4); padding: 6px 0; z-index: 10; animation: hx-fade .12s ease; scrollbar-width: thin; }
.opt { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 48px; padding: 0 18px; border: 0;
  background: transparent; color: var(--ink); font-size: 16px; font-weight: 700; text-align: left; }
.opt:hover, .opt.hot { background: var(--surface2); }
.opt:disabled { color: var(--dim); font-weight: 600; }
.verdict { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 60px; padding: 0 8px 0 20px; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--line); animation: hx-pop .2s ease; }
.verdict.win { border-color: var(--good); } .verdict.lose { border-color: var(--bad); }
.verdict .lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.verdict .mark { width: 28px; height: 28px; border-radius: 999px; color: #0b0b0c; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex: 0 0 auto; }
.verdict.win .mark { background: var(--good); } .verdict.lose .mark { background: var(--bad); }
.verdict .nm { font-size: 19px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verdict .sub { font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.verdict .btn { height: 44px; padding: 0 20px; font-size: 15px; flex: 0 0 auto; }

/* houses */
.houses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.house { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.house .lbl { display: flex; align-items: center; justify-content: flex-start; gap: 10px; height: 24px; }
.house .lbl b { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.house .lbl span { font-size: 13px; font-weight: 600; color: var(--dim); }
.photo { position: relative; aspect-ratio: 16/10; border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg, var(--grey) 0, var(--grey) 16px, var(--grey2) 16px, var(--grey2) 32px);
  display: flex; align-items: center; justify-content: center; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; animation: hx-fade .25s ease; }
.photo .none { text-align: center; color: var(--dim); font-weight: 800; letter-spacing: .14em; font-size: 20px; }
.arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(10,10,12,.62); color: #fff; font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.arrow:hover { background: rgba(10,10,12,.82); }
.arrow.prev { left: 12px; } .arrow.next { right: 12px; }
.pos { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(10,10,12,.62); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; pointer-events: none; }
.zoom { position: absolute; top: 12px; right: 12px; background: rgba(10,10,12,.62); color: #fff; border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; display: flex; align-items: center; gap: 5px; pointer-events: none; }
.zoom svg { display: block; }
.facts { font-size: 15px; font-weight: 700; color: var(--muted); line-height: 1.3; }
.facts i { font-style: normal; color: var(--dim); padding: 0 8px; }

/* description: plain text, black bars, lifts after the state guess */
.doc { height: 150px; overflow: auto; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  font-size: 15px; line-height: 1.6; color: var(--ink); font-weight: 500; scrollbar-width: thin; }
.doc p { margin: 0 0 .8em; } .doc p:last-child { margin: 0; }
.doc .empty { color: var(--dim); font-style: italic; }
.doc::-webkit-scrollbar { width: 8px; } .doc::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.rd { display: inline-block; height: 1em; vertical-align: -0.16em; background: var(--bar); border-radius: 4px; max-width: 100%; }
mark.rv { background: var(--hl); color: var(--hl-ink); padding: 0 3px; border-radius: 4px; }

/* price field (step 2) + result (reveal), always with its house */
.price { position: relative; }
.price .cur { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 800; color: var(--dim); pointer-events: none; }
.price .field { padding-left: 40px; font-size: 20px; }
.result { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); animation: hx-pop .22s ease; }
.result .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result .big { font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.result .pts { font-size: 15px; font-weight: 800; padding: 6px 12px; border-radius: 999px; color: #0b0b0c; background: var(--line); }
.result .yours { font-size: 15px; font-weight: 700; color: var(--muted); }
.result .addr { font-size: 14px; font-weight: 700; line-height: 1.4; margin-top: 2px; color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--dim); display: inline-block; }
.result .addr:hover { border-bottom-color: var(--accent); color: var(--accent); }
.result .addr span { color: var(--muted); font-weight: 600; }
.zlink { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--surface2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 800; }
.zlink:hover { border-color: var(--dim); }
.zlink svg { display: block; }
.note { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.5; padding: 12px 16px; border-radius: 14px; border: 1px dashed var(--line); }


/* reveal: the result card is taller than the price field, so trim the column to keep one view */
.hx.reveal .photo { aspect-ratio: 16/9; }
.hx.reveal .doc { height: 104px; }
.result { gap: 6px; padding: 12px 16px; }
.result .big { font-size: 32px; }
.result .foot2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.result .addr { margin-top: 0; }
.zlink { margin-top: 0; height: 36px; padding: 0 14px; font-size: 13px; }

/* end */
.end { margin: auto; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 16px; padding: 24px 0; animation: hx-fade .2s ease; }
.scorebox { display: flex; justify-content: space-between; align-items: flex-end; padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.scorebox .big { font-size: 44px; font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1.05; }
.scorebox .named { font-size: 28px; font-weight: 800; line-height: 1.2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 800; padding: 7px 12px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); color: var(--muted); }
.chip.good { border-color: var(--good); color: var(--good); }
.lbbox { padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.lbbox .t { font-size: 15px; font-weight: 800; }
.lbform { display: flex; gap: 10px; }
.lbform .field { height: 50px; font-size: 16px; }
.lbform .btn { height: 50px; flex: 0 0 auto; }
.lbnote { font-size: 14px; font-weight: 600; color: var(--muted); }
.lbnote b { color: var(--accent); }
.lbrow { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 12px; padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 700; align-items: center; }
.lbrow .rk { color: var(--dim); text-align: right; }
.lbrow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbrow .rd { display: inline; height: auto; background: none; color: var(--muted); font-size: 13px; }
.lbrow .sc { color: var(--accent); min-width: 64px; text-align: right; }
.lbrow.head { padding-bottom: 4px; }
.lbrow.head span { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.lbrow.me { background: rgba(255,138,52,.16); }
.lbempty { font-size: 14px; color: var(--muted); font-weight: 600; padding: 12px 0; text-align: center; }

/* leaderboard modal */
.modal { position: fixed; inset: 0; z-index: 900; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 20px; animation: hx-fade .14s ease; }
.modal-card { width: 100%; max-width: 460px; max-height: min(80vh, 640px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5); display: flex; flex-direction: column; overflow: hidden; animation: hx-pop .18s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 800; }
.modal-body { padding: 8px 12px 16px; overflow-y: auto; }

/* lightbox (shared with the Food game) */
.gc-lb { position:fixed; inset:0; z-index:1000; background:rgba(6,6,8,.94); display:none; align-items:center; justify-content:center; touch-action:none; overscroll-behavior:contain; }
.gc-lb.open { display:flex; animation:hx-fade .14s ease; }
.gc-lb-stage { position:relative; width:100%; height:100%; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.gc-lb-box { position:relative; display:inline-flex; align-items:center; justify-content:center; max-width:calc(100vw - 160px); max-height:84vh; }
.gc-lb-img { display:block; max-width:calc(100vw - 160px); max-height:84vh; user-select:none; -webkit-user-drag:none; transform-origin:0 0; will-change:transform; cursor:grab; touch-action:none; }
.gc-lb-img.grabbing { cursor:grabbing; }
.gc-lb-close { position:absolute; top:14px; right:16px; width:46px; height:46px; border-radius:999px; background:rgba(20,20,24,.8); border:1px solid rgba(255,255,255,.18); color:#fff; font-size:22px; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:2; }
.gc-lb-nav { position:absolute; top:50%; transform:translateY(-50%); width:52px; height:52px; border-radius:999px; background:rgba(20,20,24,.72); border:1px solid rgba(255,255,255,.18); color:#fff; font-size:26px; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:2; }
.gc-lb-nav.prev { left:-66px; } .gc-lb-nav.next { right:-66px; }
.gc-lb-hint { position:absolute; top:16px; left:50%; transform:translateX(-50%); background:rgba(20,20,24,.72); border:1px solid rgba(255,255,255,.16); color:#e8e8ea; border-radius:999px; padding:7px 14px; font-size:12px; font-weight:500; z-index:2; white-space:nowrap; }
.gc-lb-pos { position:absolute; top:100%; margin-top:14px; left:50%; transform:translateX(-50%); background:rgba(20,20,24,.85); border:1px solid rgba(255,255,255,.2); color:#fff; border-radius:999px; padding:8px 18px; font-size:16px; font-weight:800; letter-spacing:.02em; z-index:2; white-space:nowrap; }
@media (max-width: 760px) {
  .gc-lb-box, .gc-lb-img { max-width:100vw; max-height:78vh; }
  .gc-lb-nav.prev { left:8px; } .gc-lb-nav.next { right:8px; }
}

/* phone */
@media (max-width: 760px) {
  .wrap { padding: 12px 16px 0; gap: 12px; }
  .head .ttl { font-size: 16px; }
  .head .ttl { display: none; }
  .head .left { gap: 8px; }
  .pill { padding: 0 10px; height: 36px; gap: 5px; } .pill b { font-size: 15px; } .pill .mono { font-size: 10px; letter-spacing: .1em; }
  .head .right { gap: 6px; }
  .houses { grid-template-columns: 1fr; gap: 20px; padding-bottom: 8px; }
  .photo { aspect-ratio: 4/3; }
  .doc { height: 132px; }
  .start h1 { font-size: 34px; }
  .modes { grid-template-columns: 1fr; }
  .result .big { font-size: 30px; }
  .bar { order: 1; position: sticky; bottom: 0; margin: 0 -16px; width: calc(100% + 32px); max-width: none;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
  .drop { top: auto; bottom: calc(100% + 6px); }
  .verdict { height: auto; min-height: 60px; padding: 8px 8px 8px 16px; }
  .verdict .nm { font-size: 17px; }
}
