/* GeoGrid page. Loads after styles.css and pages.css. */

/* ---------- one number vs the grid ---------- */
.versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: stretch; }
.vcard { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.vcard h3 { font-size: 1.35rem; }
.vcard > p { color: var(--muted); }
.vcard-win { border-color: var(--teal); box-shadow: var(--shadow-lg); }
.vkicker { font-family: var(--display); font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.vcard-win .vkicker { color: var(--teal-ink); }
.vs { align-self: center; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--navy); color: var(--aqua); font: 800 .9rem var(--display); letter-spacing: .06em; box-shadow: 0 0 0 8px var(--mist); }
.vfig { margin-top: auto; border-radius: 18px; background: #e9f0f5 url("/assets/img/map-lines.svg") 50% 50% / 300px; background-blend-mode: multiply; aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative; overflow: hidden; font-family: var(--ui); }
.vone { display: grid; justify-items: center; gap: 6px; }
.vone b { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--green); color: #fff; font-size: 1.9rem; font-weight: 700; box-shadow: 0 0 0 5px #fff, 0 14px 26px -10px rgb(16 47 75 / 60%); }
.vone span { font-size: .78rem; font-weight: 600; color: var(--ink); background: #fff; padding: 4px 10px; border-radius: 50px; }
.vgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; width: min(86%, 300px); }
.vgrid i { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: .62rem; font-weight: 700; color: #fff; box-shadow: 0 0 0 1.5px #fff; }
.vgrid .g { background: var(--green); } .vgrid .a { background: var(--amber); } .vgrid .r { background: var(--coral); }

/* ---------- playground ---------- */
.play { background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-lg); font-family: var(--ui); overflow: hidden; }
.play .demo-chrome { margin: 0; }
.play-body { display: grid; grid-template-columns: 250px minmax(0, 1fr) 250px; gap: 20px; padding: 20px; }
.play-controls { display: grid; gap: 18px; align-content: start; }
.ctl > p { margin: 0 0 7px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ctl .seg { display: flex; }
.ctl .seg button { flex: 1; padding-inline: 8px; }
.ctl-stack .seg { flex-direction: column; border-radius: 16px; }
.ctl-stack .seg button { text-align: left; border-radius: 12px; padding: 8px 12px; }
.ctl small { display: block; margin-top: 6px; font-size: .74rem; line-height: 1.4; color: var(--muted); }
.play-map { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #e9f0f5; align-self: start; }
.play-map svg { width: 100%; height: 100%; stroke: none; display: block; }
.play-map .pt { cursor: pointer; outline: none; }
.play-map .pt circle { transition: fill .3s ease; }
.play-map .pt:hover circle, .play-map .pt:focus-visible circle, .play-map .pt.sel circle { stroke: var(--navy); stroke-width: 3; }
.play-map .pt text { font-family: var(--ui); font-weight: 700; fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.play-map .pt.off circle { fill: #fff; stroke: #b9c9d6; stroke-dasharray: 3 3; }
.play-map .pt.off text { fill: transparent; }
.play-side { display: grid; gap: 12px; align-content: start; }
.play-side .demo-stats div { position: relative; }
.play-side .demo-stats small { position: absolute; left: 13px; bottom: -1px; font-size: .62rem; color: var(--muted); display: none; }
.credit { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 13px; border-radius: 12px; background: var(--navy); color: #c9dbe8; font-size: .78rem; }
.credit b { font-size: 1.25rem; color: #fff; font-variant-numeric: tabular-nums; }
.play-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 22px 16px; font-size: .76rem; color: var(--muted); }

/* ---------- metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.metric { background: rgb(255 255 255 / 5%); border: 1px solid rgb(135 209 214 / 20%); border-radius: 24px; padding: 26px; backdrop-filter: blur(6px); }
.metric-abbr { display: inline-block; font: 800 2.4rem/1 var(--display); letter-spacing: -.01em; color: var(--aqua); }
.metric h3 { color: #fff; font-size: 1.2rem; margin: 8px 0 8px; }
.metric > p { color: #c9dbe8; font-size: 1rem; line-height: 1.5; }
.formula { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: #081a2c; box-shadow: inset 0 0 0 1px rgb(135 209 214 / 14%); font: 500 .78rem/1.6 var(--ui); color: #a9c2d6; }
.formula b { color: #fff; font-weight: 600; }
.formula em { font-style: normal; color: var(--amber); }
.metric-use { margin: 12px 0 0 !important; font-family: var(--ui); font-size: .82rem !important; color: #92abc0 !important; }

/* ---------- competitor table ---------- */
.ctable { margin-top: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; font-family: var(--ui); font-size: .86rem; overflow: hidden; }
.ctable table th, .ctable table td { text-align: left; padding: 11px 14px; border-top: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.ctable thead th { border-top: 0; background: var(--mist); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ctable tbody th { font-weight: 600; }
.ctable tbody th .dot { margin-right: 9px; }
.ctable .you { background: #eefaf5; }
.ctable caption { caption-side: bottom; padding: 8px 14px; font-size: .72rem; color: var(--muted); text-align: left; }
.ctable progress { width: 70px; height: 7px; background: #dfe8ef; margin-right: 8px; }
.ctable progress::-webkit-progress-bar { background: #dfe8ef; }
.dot-teal { background: var(--teal); }

/* ---------- history strip ---------- */
.history { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: clamp(32px, 5vw, 56px); position: relative; }
.history::before { content: ""; position: absolute; left: 6%; right: 6%; top: -18px; border-top: 3px dashed var(--teal); opacity: .5; }
.hcard { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; font-family: var(--ui); box-shadow: var(--shadow); }
.hcard::before { content: ""; position: absolute; left: 50%; top: -26px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px var(--mist); }
.hcard p { margin: 0; }
.hdate { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hmini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 10px 0; }
.hmini i { aspect-ratio: 1; border-radius: 50%; }
.hmini .g { background: var(--green); } .hmini .a { background: var(--amber); } .hmini .r { background: var(--coral); }
.hstat { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); }
.hstat b { color: var(--navy); }
.hcard.now { border-color: var(--teal); }

/* ---------- lead widget ---------- */
.leadflow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 18px; align-items: center; margin-top: 24px; font-family: var(--ui); }
.lead-form, .lead-result { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.lead-form p, .lead-result p { margin: 0; }
.lead-title { font-family: var(--display); font-weight: 800; color: var(--navy); font-size: 1.05rem; margin-bottom: 12px !important; }
.field { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .82rem; color: var(--muted); margin-bottom: 8px; background: var(--mist); }
.field svg { width: 14px; height: 14px; color: var(--blue); flex: none; }
.field b { color: var(--ink); font-weight: 500; }
.lead-btn { display: block; text-align: center; padding: 11px; border-radius: 50px; background: var(--teal); color: var(--navy-deep); font: 800 .76rem var(--display); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.lead-arrow { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--aqua); }
.lead-arrow svg { width: 20px; height: 20px; }
.lead-result .hmini { grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 0 12px; }
.lead-note { font-size: .76rem; color: var(--muted); line-height: 1.45; }

@media (max-width: 1100px) {
  .play-body { grid-template-columns: 220px minmax(0, 1fr); }
  .play-side { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .history { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .history::before, .hcard::before { display: none; }
}
@media (max-width: 940px) {
  .versus, .leadflow { grid-template-columns: minmax(0, 1fr); }
  .vs, .lead-arrow { justify-self: center; }
  .lead-arrow svg { transform: rotate(90deg); }
  .play-body { grid-template-columns: minmax(0, 1fr); }
  .play-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .play-side { grid-template-columns: minmax(0, 1fr); }
  .ctable { overflow-x: auto; }
}
@media (max-width: 620px) {
  .play-body { padding: 14px; gap: 14px; }
  .play-controls { grid-template-columns: minmax(0, 1fr); }
  .history { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctable th:nth-child(4), .ctable td:nth-child(4) { display: none; }
}
.vfig { aspect-ratio: 4 / 3; }
.vgrid { width: min(70%, 250px); }
@media (max-width: 940px) { .play-map { order: -1; } }
