/* Reusable components. */

/* Hero */
.hero { position: relative; background: var(--grad-brand); color: #fff; overflow: hidden; padding: calc(var(--nav-h) + 48px) 0 96px; border-bottom-right-radius: clamp(60px, 12vw, 160px); }
.hero .blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; pointer-events: none; }
.hero .blob.a { width: 420px; height: 420px; right: -120px; top: -100px; background: linear-gradient(135deg, #25C4E4, var(--mint)); }
.hero .blob.b { width: 320px; height: 320px; left: -120px; bottom: -120px; background: #7fb7ff; opacity: .4; }
.hero-grid { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.hero .lead { color: rgba(255, 255, 255, .92); margin: 18px 0 26px; }
.hero .eyebrow { color: #fff; opacity: .9; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--radius-pill); background: var(--glass-bg); border: 1px solid var(--glass-border); font-size: 13px; font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(59, 213, 142, .3); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: var(--radius-pill); font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-light { background: #fff; color: var(--blue900); box-shadow: 0 12px 28px rgba(14, 42, 71, .25); }
.btn-primary { background: var(--blue900); color: #fff; box-shadow: var(--shadow-cta); }
.btn-ghost { background: transparent; color: #fff; border-color: var(--glass-border); }
.btn-ghost.dark { color: var(--link); border-color: var(--blue900); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 22px 8px 16px; border-radius: 16px; background: #0E2A47; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .25); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.store:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0, 0, 0, .3); }
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font-size: 10.5px; letter-spacing: .04em; opacity: .85; line-height: 1.1; }
.store strong { display: block; font-size: 17px; font-weight: 600; line-height: 1.2; }
.store.soon { opacity: .75; cursor: default; }
.store.soon:hover { transform: none; box-shadow: none; }
.hero .store { background: rgba(14, 42, 71, .92); }

/* Phone mock */
/* Phone mock: real 390x844 proportions. Everything inside scales with the phone's width
   (--u = 1px of a 390px-wide screen), so it looks like the app at any size. */
.phone-wrap { display: grid; place-items: center; }
/* On wide screens, push the phone to the right edge so it keeps clear of the headline */
@media (min-width: 900px) { .phone-wrap { justify-items: end; } }
.phone-stage { position: relative; display: grid; justify-items: center; gap: 14px; }
.phone {
  container-type: inline-size; position: relative;
  width: clamp(250px, 25vw, 310px); aspect-ratio: 390 / 700;
  background: #0A1F36; border-radius: 15% / 8.4%; padding: 2.6%;
  box-shadow: 0 40px 80px rgba(10, 31, 54, .5), inset 0 0 0 2px #1d3a5c;
}
.phone::before { /* side button */ content: ""; position: absolute; right: -4px; top: 22%; width: 4px; height: 9%; border-radius: 0 4px 4px 0; background: #1d3a5c; }
.phone-screen {
  --u: calc(100cqw / 390);
  position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--background); color: var(--ink); border-radius: 12.5% / 7%;
  font-size: calc(13 * var(--u));
}
.phone-notch { position: absolute; top: calc(9 * var(--u)); left: 50%; width: calc(96 * var(--u)); height: calc(26 * var(--u)); margin-left: calc(-48 * var(--u)); border-radius: 99px; background: #0A1F36; z-index: 3; }
.p-head { background: var(--grad-brand); color: #fff; padding: calc(14 * var(--u)) calc(22 * var(--u)) calc(52 * var(--u)); border-bottom-right-radius: calc(90 * var(--u)); position: relative; overflow: hidden; flex: none; }
.p-head::after { content: ""; position: absolute; right: calc(-40 * var(--u)); top: calc(-40 * var(--u)); width: calc(150 * var(--u)); height: calc(150 * var(--u)); border-radius: 50%; background: linear-gradient(135deg, #25C4E4, var(--mint)); opacity: .35; }
.p-status { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: calc(12 * var(--u)); position: relative; z-index: 2; }
.p-status span:last-child { letter-spacing: .08em; }
.p-greet { margin-top: calc(22 * var(--u)); position: relative; z-index: 2; }
.p-greet b { display: block; font-size: calc(21 * var(--u)); font-weight: 600; line-height: 1.2; }
.p-greet span { font-size: calc(12.5 * var(--u)); opacity: .92; }
.p-body { padding: 0 calc(18 * var(--u)); margin-top: calc(-34 * var(--u)); position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.p-win { background: var(--grad-saving); color: #fff; border-radius: calc(22 * var(--u)); padding: calc(16 * var(--u)) calc(18 * var(--u)); box-shadow: 0 calc(12 * var(--u)) calc(24 * var(--u)) rgba(11, 132, 87, .35); }
.p-win .l { font-size: calc(11 * var(--u)); text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.p-win .n { font-size: calc(38 * var(--u)); font-weight: 700; line-height: 1.12; margin: calc(2 * var(--u)) 0; }
.p-win .s { font-size: calc(12.5 * var(--u)); opacity: .94; }
.p-btns { display: flex; gap: calc(8 * var(--u)); margin-top: calc(12 * var(--u)); }
.p-btns span { flex: 1; text-align: center; padding: calc(8 * var(--u)) 0; border-radius: 99px; font-size: calc(12 * var(--u)); font-weight: 600; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .5); }
.p-btns span:first-child { background: #fff; color: var(--saving700); border-color: #fff; }
.p-title { font-size: calc(15 * var(--u)); font-weight: 700; margin: calc(16 * var(--u)) 0 calc(6 * var(--u)); }
.p-row { background: var(--surface); border-radius: calc(16 * var(--u)); padding: calc(10 * var(--u)) calc(12 * var(--u)); margin-bottom: calc(8 * var(--u)); box-shadow: 0 calc(4 * var(--u)) calc(12 * var(--u)) rgba(14, 42, 71, .07); }
.p-row .h { display: flex; justify-content: space-between; align-items: baseline; font-size: calc(13.5 * var(--u)); font-weight: 600; }
.p-row .h small { display: block; font-size: calc(10.5 * var(--u)); font-weight: 400; color: var(--muted); }
.p-row .t { height: calc(7 * var(--u)); border-radius: 99px; background: var(--track); overflow: hidden; margin-top: calc(7 * var(--u)); }
.p-row .t b { display: block; height: 100%; border-radius: 99px; background: var(--bar-other); width: 0; transition: width 1.4s var(--ease); }
.p-row .t b.best { background: var(--grad-saving); }
.p-tabs { margin-top: auto; flex: none; display: flex; justify-content: space-around; align-items: center; background: var(--surface); padding: calc(10 * var(--u)) 0 calc(14 * var(--u)); border-top-left-radius: calc(26 * var(--u)); border-top-right-radius: calc(26 * var(--u)); box-shadow: 0 calc(-4 * var(--u)) calc(14 * var(--u)) rgba(14, 42, 71, .08); }
.p-tabs span { display: grid; justify-items: center; gap: calc(3 * var(--u)); font-size: calc(10.5 * var(--u)); color: #7FA6D6; }
.p-tabs span.on { color: var(--link); font-weight: 600; }
.p-tabs svg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); }
.p-tabs span.on::after { content: ""; width: calc(16 * var(--u)); height: calc(3 * var(--u)); border-radius: 3px; background: var(--blue900); }

/* Floating tags on the phone's edges. They overlap only the bezel and the screen's side padding, never the figures. */
.chip-float { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 10px 14px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lift); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.chip-float .dot { width: 28px; height: 28px; border-radius: 9px; background: var(--tile); display: grid; place-items: center; color: var(--link); }
.chip-row { display: contents; }
.chip-float { position: absolute; z-index: 5; }
.chip-float.one { left: -140px; top: 30%; }
.chip-float.two { right: -130px; bottom: 22%; }
/* Narrow screens have no room beside the phone, so the tags sit on its top-left and bottom-right corners */
@media (max-width: 999px) {
  .chip-float.one { left: -14px; top: 4%; }
  .chip-float.two { right: -14px; bottom: 3%; }
}

/* Cards and grids */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface); border-radius: var(--radius-card); padding: 26px; box-shadow: var(--shadow-card); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.tile { width: 54px; height: 54px; border-radius: 16px; background: var(--tile); color: var(--link); display: grid; place-items: center; margin-bottom: 16px; }
.step-no { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-brand); color: #fff; font-weight: 700; display: grid; place-items: center; margin-bottom: 14px; box-shadow: var(--shadow-cta); }

/* Stats strip */
.stats { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-top: -56px; position: relative; z-index: 2; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border-radius: 22px; padding: 20px; text-align: center; box-shadow: var(--shadow-card); }
.stat b { display: block; font-size: clamp(22px, 4vw, 30px); color: var(--saving); font-weight: 700; }
.stat span { font-size: 13px; color: var(--muted); }

/* Interactive demo */
.demo { display: grid; gap: 22px; }
@media (min-width: 900px) { .demo { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }
.panel { background: var(--surface); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-card); }
.label { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { min-height: 46px; padding: 0 20px; border-radius: var(--radius-pill); border: 1px solid var(--track); background: var(--surface); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--blue900); }
.chip[aria-pressed="true"] { background: var(--blue900); color: #fff; border-color: var(--blue900); box-shadow: var(--shadow-cta); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--track); border-radius: var(--radius-pill); padding: 4px; margin: 10px 0 6px; }
.segmented button { min-height: 46px; border: 0; border-radius: var(--radius-pill); background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; padding: 6px 10px; transition: all .25s var(--ease); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--link); font-weight: 600; box-shadow: var(--shadow-card); }
.field { display: grid; gap: 6px; margin: 14px 0 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input { font: inherit; min-height: 50px; padding: 0 18px; border: 1px solid var(--track); border-radius: 16px; background: var(--surface); color: var(--ink); }
.note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.winner { background: var(--grad-saving); color: #fff; border-radius: var(--radius-card); padding: 24px; box-shadow: 0 16px 36px rgba(11, 132, 87, .35); }
.winner .big { font-size: clamp(34px, 7vw, 48px); font-weight: 700; line-height: 1.1; margin: 4px 0; }
.winner p { margin: 0; opacity: .94; }
.winner .label { color: #fff; opacity: .9; }
.ranked { display: grid; gap: 12px; margin-top: 14px; }
.rank-row { background: var(--surface); border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow-card); }
.rank-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.saving { color: var(--saving); font-weight: 700; }
.bar { height: 10px; border-radius: 10px; background: var(--track); overflow: hidden; margin: 10px 0 6px; }
.bar b { display: block; height: 100%; border-radius: 10px; background: var(--bar-other); transition: width .6s var(--ease); }
.bar b.best { background: var(--grad-saving); }

/* Tables and wiki */
.table-wrap { overflow-x: auto; border-radius: 20px; }
table { width: 100%; border-collapse: collapse; min-width: 440px; background: var(--surface); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--track); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 0; padding: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill); background: var(--surface); text-decoration: none; font-weight: 500; font-size: 14px; box-shadow: var(--shadow-card); }
.wiki-block { background: var(--surface); border-radius: var(--radius-card); padding: 26px; box-shadow: var(--shadow-card); margin-bottom: 20px; }
.wiki-block ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.wiki-block li { margin-bottom: 4px; }

/* FAQ */
details { background: var(--surface); border-radius: 20px; padding: 4px 22px; margin-bottom: 12px; box-shadow: var(--shadow-card); }
summary { cursor: pointer; font-weight: 600; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 24px; color: var(--link); transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: 0 0 16px; }

/* Download band */
.cta-band { background: var(--grad-brand); color: #fff; border-radius: 36px; padding: clamp(32px, 6vw, 60px); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: linear-gradient(135deg, #25C4E4, var(--mint)); opacity: .4; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band .lead { color: rgba(255, 255, 255, .92); }
.cta-band .store { background: rgba(14, 42, 71, .92); }

/* Legal pages */
.legal-hero { background: var(--grad-brand); color: #fff; padding: calc(var(--nav-h) + 40px) 0 72px; border-bottom-right-radius: clamp(48px, 10vw, 120px); }
.legal-hero p { color: rgba(255, 255, 255, .9); margin: 10px 0 0; }
.legal { max-width: 780px; margin: -32px auto 0; background: var(--surface); border-radius: var(--radius-card); padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow-card); position: relative; }
.legal h2 { font-size: 22px; margin: 32px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.callout { background: var(--tile); border-radius: 16px; padding: 14px 18px; font-size: 14px; color: var(--muted); margin: 18px 0; }
.gap { background: #FFF6DB; color: #0E2A47; border-radius: 6px; padding: 0 6px; font-weight: 500; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.legal-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill); background: var(--tile); text-decoration: none; font-weight: 500; font-size: 14px; }
.legal-nav a[aria-current="page"] { background: var(--blue900); color: #fff; }
