/* Design tokens (color + fonts) live in theme.css — the single source of truth,
 * linked before this file on every page. Reference them via var(--…). */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--bg-tint) 0%, var(--bg-cream) 24%, #ffffff 48%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* LIVE TICKER */
.ticker {
  background: #0b0e13; color: #d7dbe2; overflow: hidden;
  border-bottom: 1px solid #1c212b; height: 38px; position: relative;
}
.ticker-track {
  display: flex; align-items: center; gap: 0; height: 100%;
  white-space: nowrap; width: max-content;
  animation: ticker-scroll 48s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }
.tick {
  display: inline-flex; align-items: center; gap: 9px; height: 100%;
  padding: 0 26px; font-family: var(--mono); font-size: 12.5px;
  border-right: 1px solid #181d26;
}
.tick-logo {
  display: inline-grid; place-items: center; width: 18px; height: 18px;
  border-radius: 4px; font-family: var(--sans); font-weight: 800; font-size: 11px;
  line-height: 1; flex: none;
}
.tick-brand { color: var(--green); font-weight: 700; letter-spacing: .03em; }
.tick-text { color: #aab1bd; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  max-width: 1180px; margin: 0 auto;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.navbtn-cta {
  color: var(--accent-d); border-color: #f0cbbb; background: #fbf2ee; font-weight: 700;
}
.navbtn-cta:hover { border-color: var(--accent); background: #f7e9e2; }
.brand { display: flex; align-items: center; gap: 9px; }
.logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(180deg, var(--green-grad-a), var(--green-grad-b));
  color: #fff; font-family: var(--mono); font-weight: 700; font-size: 14px;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(var(--accent-rgb),.35);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.nav-btns { display: flex; gap: 8px; }
.navbtn {
  font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; transition: border-color .15s, background .15s;
}
.navbtn:hover { border-color: #cfd4dc; background: #fafbfc; }
.nav-short { display: none; }

/* HERO */
.hero { max-width: 920px; margin: 0 auto; padding: 56px 32px 24px; text-align: center; }
.hero h1 {
  font-size: clamp(17px, 4.8vw, 50px); font-weight: 900; letter-spacing: -.045em;
  line-height: 1.05; margin: 8px 0 22px;
  white-space: nowrap; /* headline must stay on a single line */
}
.sub { font-size: 19px; color: var(--gray); margin: 0 auto 46px; line-height: 1.55; max-width: 560px; }
.sub strong { color: var(--ink); font-weight: 800; }
.sub .hl { color: var(--green); font-weight: 700; }

/* DEMO — before/after, with a little Claude Code guy perched on top */
.demo {
  text-align: left; margin: 0 auto 36px; position: relative;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px;
}
.demo-card {
  background: linear-gradient(180deg, var(--card-dark), var(--card-dark-2));
  border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 18px 44px -24px rgba(0,0,0,.55);
  position: relative; z-index: 1;
}
.demo-chevs { color: var(--accent); font-size: 30px; line-height: 1; font-weight: 700; z-index: 1; }
.ast { color: var(--accent); display: inline-block; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.claude-guy {
  position: absolute; top: -20px; right: 30px; z-index: 0;
  transition: right 1.2s cubic-bezier(.5, 1.5, .4, 1), top .6s ease;
}
.claude-guy.cg-duck { top: 16px; }
.cg-sprite {
  display: block;
  image-rendering: pixelated;
  /* steps() so the idle bob jumps a whole pixel at a time — keeps him 8-bit */
  animation: cg-bob 1.4s steps(1, end) infinite;
}
.claude-guy.cg-hop .cg-sprite { animation: cg-hop .55s steps(1, end); }
.cg-eye, .cg-spark { transform-box: fill-box; transform-origin: center; }
.cg-eye { animation: cg-blink 3.4s steps(1, end) infinite; }
.cg-spark { animation: cg-twinkle 2.2s steps(1, end) infinite; }
@keyframes cg-bob { 0%, 100% { transform: translateY(3px); } 50% { transform: translateY(0); } }
@keyframes cg-hop {
  0%, 100% { transform: translateY(3px); }
  25% { transform: translateY(-3px); }
  50% { transform: translateY(-9px); }
  75% { transform: translateY(-3px); }
}
@keyframes cg-blink { 0%, 90%, 100% { transform: scaleY(1); } 93%, 97% { transform: scaleY(.15); } }
@keyframes cg-twinkle {
  0%, 100% { transform: none; opacity: 1; }
  50% { transform: rotate(90deg); opacity: .75; }
}
.demo-label {
  display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: #6e7585; margin-bottom: 16px;
}
.demo-line { font-family: var(--mono); font-size: 17px; color: var(--ov-demo-line); display: flex; align-items: center; gap: 10px; }
.brandchip {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  background: var(--ov-chip-bg); color: var(--ov-chip-ink); font-weight: 800; font-size: 13px; border-radius: 5px;
  font-family: var(--sans); flex: none;
}
/* Named "brand-line" (not "ad-text") so ad blockers don't hide the sponsored
   line in our own before/after demo. white-space:nowrap keeps it to ONE line at
   every width (chip + line never wrap the card to two rows); ellipsis is only a
   safety net — the ad copy is kept short enough to fully fit (see script.js). */
.brand-line {
  color: var(--ov-demo-line);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* INSTALL CARD — dark surface to match the before/after demo cards, with a
   coral accent so it reads as the hero's primary action without shouting. */
.install-card {
  display: flex; align-items: center; gap: 16px; text-align: left;
  background: linear-gradient(180deg, var(--card-dark), var(--card-dark-2));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 18px 22px; color: var(--ov-text); margin: 4px 0 26px;
  box-shadow: 0 18px 44px -24px rgba(0,0,0,.55);
  transition: transform .15s, border-color .15s;
}
.install-card:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb),.5); }
.install-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 11px; color: var(--accent);
  background: rgba(var(--accent-rgb),.14); border: 1px solid rgba(var(--accent-rgb),.28);
}
.install-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.install-title { font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: #fff; }
.install-sub { font-size: 12.5px; color: var(--ov-dots); }
.install-pill {
  display: grid; gap: 1px; justify-items: end; white-space: nowrap; text-align: right;
}
.install-pill-label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ov-dots);
}
.install-pill-amt { font-weight: 800; font-size: 17px; color: var(--accent); }
.install-pill .per { opacity: .7; font-weight: 600; font-size: 11px; }
.install-arrow {
  font-size: 18px; font-weight: 700; color: var(--accent); flex: none;
  transition: transform .15s;
}
.install-card:hover .install-arrow { transform: translateX(3px); }

.hero-note { font-size: 14.5px; color: var(--gray-2); margin: 0 auto 56px; line-height: 1.55; max-width: 620px; }
.hero-note strong { color: var(--gray); }

.jump {
  display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--blue);
  font-weight: 600;
}
.jump-dot { display: none; }
.jump { position: relative; }
.jump > .jump-dot { position: absolute; left: -16px; top: 4px; display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.jump-chev { font-size: 20px; color: var(--blue); animation: bob 1.8s ease infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ADVERTISERS */
.advertisers { max-width: 1100px; margin: 40px auto 0; padding: 0 32px; }
.adv-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 48px 56px; box-shadow: 0 30px 70px -45px rgba(20,30,40,.4);
}
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 12px;
}
.adv-card h2 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 16px; }
.adv-intro { font-size: 16px; color: var(--gray); margin: 0 0 32px; line-height: 1.6; max-width: 820px; }
.adv-intro strong { color: var(--ink); }

/* FORM */
.adform { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.flabel {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 600;
}
.flabel em { color: var(--gray-2); font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; }
.flabel .count { float: right; }
.adform input {
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fcfcfd;
  width: 100%;
}
.adform input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.12); }
.adform input::placeholder { color: #b6bcc6; }
/* Ad color: native swatch picker sitting beside the #hex text field. */
.colorfield { display: flex; align-items: stretch; gap: 10px; }
.colorfield #adcolor { flex: 1; min-width: 0; }
/* height matches the text input beside it (13px padding + 1px border + line-box) */
.colorfield input[type="color"] { flex: none; width: 52px; height: 46px; padding: 4px; cursor: pointer; }
.colorfield input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.colorfield input[type="color"]::-webkit-color-swatch { border: none; border-radius: 7px; }
.colorfield input[type="color"]::-moz-color-swatch { border: none; border-radius: 7px; }
.dropzone {
  border: 1.5px dashed #d2d7df; border-radius: 11px; padding: 22px; text-align: center;
  color: var(--gray-2); font-size: 14px; background: #fcfcfd; cursor: pointer;
}
.dropzone:hover { border-color: var(--green); color: var(--gray); }
.checkrow { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.checkrow input { width: 18px; height: 18px; accent-color: var(--blue); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ESTIMATE */
.estimate {
  background: #f7f3ec; border: 1px solid #e8e2d4; border-radius: 14px; padding: 20px;
  border-left: 4px solid var(--accent); display: grid; gap: 4px;
}
.est-head { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); }
.est-sub { font-size: 13px; color: var(--gray-2); }
.est-total { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 14px; }
.est-rows { display: grid; gap: 8px; margin-bottom: 14px; }
.est-row {
  display: flex; align-items: baseline; gap: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: 9px; padding: 11px 14px;
}
.est-row strong { font-size: 17px; font-weight: 700; min-width: 70px; }
.est-row span { font-size: 13px; color: var(--gray); }
.est-note {
  font-size: 13px; color: #7a4a36; background: #f6eae3; border-radius: 9px; padding: 11px 13px;
  margin: 0; line-height: 1.5;
}
.est-note strong { color: #4a2c1f; }

.stripe-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--stripe); color: #fff; border: none; border-radius: 12px;
  padding: 16px; font-family: var(--sans); font-size: 16px; font-weight: 600; cursor: pointer;
  box-shadow: 0 12px 30px -12px rgba(99,91,255,.55); transition: filter .15s, transform .12s;
}
.stripe-btn:hover { filter: brightness(1.06); }
.stripe-btn:active { transform: translateY(1px); }
.stripe-btn-label { line-height: 1; }
/* Official Stripe wordmark — white on Stripe purple via currentColor. */
.stripe-logo { height: 21px; width: auto; display: block; }

/* LEADERBOARD */
.leaderboard { max-width: 760px; margin: 56px auto 0; padding: 0 32px; }
.bidmarket {
  display: block; text-align: center; font-family: var(--mono); font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gray-2); margin-bottom: 16px;
}
.board { list-style: none; margin: 0; padding: 0; }
.board li {
  display: flex; align-items: center; gap: 16px; padding: 14px 6px;
  border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2);
}
.board li:hover { background: #fafbfc; }
.rk { font-family: var(--mono); font-size: 13px; color: var(--gray-2); min-width: 22px; }

/* INSTALL SECTION */
/* TRUST / TRANSPARENCY */
.trust { max-width: 760px; margin: 64px auto 0; padding: 0 32px; }
.trust h2 { font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 14px; }
.trust .eyebrow { color: var(--green-d); }
.trust-intro { font-size: 15px; color: var(--gray); margin: 0 0 22px; line-height: 1.6; }
.trust-intro strong { color: var(--ink); }
.trust-list { list-style: none; margin: 0 0 22px; padding: 0; }
.trust-list li {
  font-size: 14px; color: var(--gray); line-height: 1.55;
  padding: 12px 0 12px 26px; border-bottom: 1px solid var(--line); position: relative;
}
.trust-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
.trust-list li strong { color: var(--ink); }
.trust-link {
  display: inline-block; font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--green-d); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; background: #fff; transition: border-color .15s, background .15s;
}
.trust-link:hover { border-color: var(--accent); background: #faf2ee; }

.install-section { max-width: 760px; margin: 64px auto 0; padding: 0 32px; text-align: center; }
.install-section h2 { font-size: clamp(24px, 6vw, 32px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin: 0 0 18px; }
.install-lead { font-size: 15px; color: var(--gray); line-height: 1.6; max-width: 520px; margin: 0 auto 22px; }
.install-lead strong { color: var(--ink); }
.install-cmd {
  display: inline-flex; align-items: center; gap: 12px; background: #f3f5f8;
  border: 1px solid var(--line); border-radius: 12px; padding: 7px 7px 7px 16px; margin-bottom: 22px;
}
.install-cmd code { font-family: var(--mono); font-size: 14px; color: var(--green-d); }
.copy-btn { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.copy-btn:hover { border-color: #cfd4dc; }
.install-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-green {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(180deg, var(--green-grad-a), var(--green-grad-b)); color: #fff;
  font-weight: 700; font-size: 15px; padding: 13px 24px; border-radius: 12px;
  box-shadow: 0 12px 28px -14px rgba(var(--accent-rgb),.7);
  transition: transform .15s, filter .15s;
}
.btn-green:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn-chrome { flex: none; }
.btn-outline { border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 15px; padding: 13px 24px; border-radius: 12px; }
.btn-outline:hover { border-color: #cfd4dc; }
.install-fine { font-size: 13.5px; color: var(--gray-2); margin-top: 22px; }
.install-fine strong { color: var(--green-d); }

/* DASHBOARD (signed-in portal) — utility nav, section tabs, delivery, states */
/* Align the header with the dashboard content column instead of the wide site nav. */
.dash-nav { max-width: 780px; }

/* Account cluster — Home + Sign out kept separate from the section nav, styled as
   quiet text links so the segmented tabs below read as the primary navigation. */
.dash-account { display: flex; align-items: center; gap: 2px; }
.dash-account-link {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--gray);
  padding: 7px 12px; border: none; border-radius: 999px; background: transparent;
  cursor: pointer; text-decoration: none; transition: color .15s, background .15s;
}
.dash-account-link:hover { color: var(--ink); background: var(--bg-tint); }
.dash-signout:hover { color: var(--err-fg); }

/* Section tabs — one segmented control, one active view at a time. */
.dash-tabs {
  display: flex; gap: 4px;
  width: min(716px, 100% - 28px); margin: 24px auto 0; padding: 5px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  box-shadow: 0 14px 36px -30px rgba(20,30,40,.45);
}
.dash-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 10px; border: none; border-radius: 11px; background: transparent;
  font-family: var(--sans); font-size: 14px; font-weight: 700; color: var(--gray);
  cursor: pointer; transition: color .15s, background .15s;
}
.dash-tab:hover { color: var(--ink); background: #fcfbf9; }
.dash-tab.active { color: var(--accent-d); background: #fbf0ea; }
.dash-tab-ico { width: 16px; height: 16px; flex-shrink: 0; display: inline-flex; }
.dash-tab-ico svg { width: 100%; height: 100%; display: block; }
.dash-tabs + .redeem { padding-top: 26px; }

/* Gift-card delivery — read-only "delivered to" card replacing the bare input. */
.redeem-delivery {
  display: flex; align-items: center; gap: 13px; max-width: 420px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fcfbf9;
}
.rd-ico {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  color: var(--accent-d); background: #fbf0ea; border: 1px solid rgba(var(--accent-rgb), .25);
}
.rd-ico svg { width: 19px; height: 19px; }
.rd-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rd-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-2); }
.rd-email { font-size: 15px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Activity loading state (auto-retrieve). Reuses .portal-spinner from portal.css. */
.act-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 44px 20px; }
.act-loading p { font-size: 14px; color: var(--gray); margin: 0; }
.act-loading .portal-spinner { width: 30px; height: 30px; }

@media (max-width: 560px) {
  .dash-tab { font-size: 12.5px; padding: 10px 5px; gap: 0; }
  .dash-tab-ico { display: none; }
}

/* REDEEM PAGE */
.redeem { max-width: 780px; margin: 0 auto; padding: 40px 32px 0; }
.redeem-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 40px 44px; box-shadow: 0 30px 70px -45px rgba(20,30,40,.4);
}
.redeem-card h1 { font-size: clamp(28px, 6vw, 40px); font-weight: 900; letter-spacing: -.04em; line-height: 1.05; margin: 8px 0 14px; }
.redeem-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 28px 0 10px; }
.redeem-lead { font-size: 15.5px; color: var(--gray); line-height: 1.6; margin: 0 0 24px; max-width: 600px; }
.redeem-lead strong { color: var(--ink); }
.login-form { display: grid; gap: 16px; max-width: 420px; }
.login-msg { font-size: 14.5px; color: var(--accent-d); margin: 18px 0 0; line-height: 1.5; }

.balance-row { display: flex; align-items: center; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.balance { font-size: 44px; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin-top: 4px; }
.balance-sub { font-size: 13.5px; color: var(--gray-2); margin-top: 6px; }

.gift-menu { display: grid; gap: 14px; margin-bottom: 26px; }
.gift-row {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fcfbf9;
}
.gift-plan { display: flex; flex-direction: column; gap: 3px; }
.gp-name { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.gp-tag { font-family: var(--mono); font-size: 11.5px; color: var(--gray-2); text-transform: uppercase; letter-spacing: .06em; }
.gift-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gift-cell {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 6px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; cursor: pointer; font-family: var(--sans); transition: border-color .12s, background .12s, transform .1s;
}
.gift-cell:hover:not([disabled]) { border-color: var(--accent); transform: translateY(-1px); }
.gift-cell.sel { border-color: var(--accent); background: #fbf0ea; box-shadow: 0 0 0 2px rgba(217,119,87,.18); }
.gift-cell[disabled] { opacity: .4; cursor: not-allowed; }
.gc-term { font-family: var(--mono); font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: .06em; }
.gc-price { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }

.redeem-foot { display: grid; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.recipient { max-width: 420px; }
.redeem-summary { font-size: 15px; color: var(--ink-2); }
.redeem-summary .sum-after { color: var(--gray-2); }
.redeem-foot .btn-green { justify-self: start; border: none; cursor: pointer; font-family: var(--sans); }
.redeem-foot .btn-green:disabled { opacity: .45; cursor: not-allowed; }
.redeem-result { font-size: 15px; line-height: 1.55; margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; }
.redeem-result.ok { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-line); }
.redeem-result.err { background: var(--err-bg); color: var(--err-fg); border: 1px solid var(--err-line); }

@media (min-width: 640px) {
  .gift-row { grid-template-columns: 200px 1fr; align-items: center; }
}

/* EARNINGS DASHBOARD */
.redeem #earnings-view, .redeem #activity-view { margin-bottom: 22px; }
.earn-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 10px; }

.earn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 26px; }
.earn-stat {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fcfbf9;
}
.es-label { font-family: var(--mono); font-size: 11px; color: var(--gray-2); text-transform: uppercase; letter-spacing: .08em; }
.es-num { font-size: 30px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.es-sub { font-size: 12.5px; color: var(--gray-2); }

.earn-chart-card { border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; background: #fff; }
.ecc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.ecc-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.ecc-sub { font-size: 13px; color: var(--gray-2); margin: 4px 0 0; }

.earn-window { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: #fcfbf9; }
.ew-btn {
  border: none; background: transparent; cursor: pointer; font-family: var(--sans);
  font-size: 13px; font-weight: 700; color: var(--gray); padding: 6px 12px; border-radius: 8px;
  transition: background .12s, color .12s;
}
.ew-btn:hover { color: var(--ink); }
.ew-btn.active { background: #fff; color: var(--accent-d); box-shadow: 0 1px 3px rgba(20,30,40,.12); }

.earn-chart { width: 100%; height: 220px; }
.ec-svg { width: 100%; height: 100%; display: block; }
.ec-grid { stroke: var(--line); stroke-width: 1; }
.ec-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ec-area { fill: rgba(217,119,87,.10); stroke: none; }
.ec-dot { fill: var(--accent); }
.ec-xlabel { fill: var(--gray-2); font-family: var(--mono); font-size: 11px; text-anchor: middle; }
.earn-chart-foot { font-size: 13px; color: var(--gray); margin: 10px 0 0; }

/* ACTIVITY LEDGER */
.act-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.act-status {
  flex-shrink: 0; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: #fcfbf9;
}
.act-status.ok { color: var(--ok-fg); border-color: var(--ok-line); background: var(--ok-bg); }

.act-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; }
.act-search {
  flex: 1 1 240px; min-width: 0; font-family: var(--sans); font-size: 14px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink);
}
.act-search:focus { outline: none; border-color: var(--accent); }
.act-search:disabled { background: #fcfbf9; color: var(--gray-2); }
.act-filter {
  font-family: var(--sans); font-size: 14px; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 11px; background: #fff; color: var(--ink); cursor: pointer;
}
.act-filter:disabled { background: #fcfbf9; color: var(--gray-2); cursor: not-allowed; }
.act-count { font-family: var(--mono); font-size: 11.5px; color: var(--gray-2); white-space: nowrap; }

.act-body { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.act-empty { padding: 30px 20px; text-align: center; }
.act-empty p { font-size: 14px; color: var(--gray); margin: 0 0 16px; }
.act-empty .btn-green { border: none; cursor: pointer; font-family: var(--sans); }

.act-row {
  display: grid; grid-template-columns: 130px 1fr 1fr auto; gap: 12px; align-items: center;
  padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.act-row:last-child { border-bottom: none; }
.act-row-head {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-2); background: #fcfbf9;
}
.act-type { font-weight: 700; }
.act-type.click_credit { color: var(--accent-d); }
.act-type.referral_credit { color: var(--ok-fg); }
.act-adv { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-when { color: var(--gray-2); }
.act-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .earn-stats { grid-template-columns: 1fr; }
  .act-row { grid-template-columns: 1fr auto; }
  .act-adv, .act-when,
  .act-row-head span:nth-child(2), .act-row-head span:nth-child(3) { display: none; }
}

/* FOOTER */
.footer { max-width: 760px; margin: 80px auto 0; padding: 34px 32px 50px; text-align: center; border-top: 1px solid var(--line); }
.footer p { margin: 0 0 8px; font-size: 13.5px; color: var(--gray); }
.footer a { color: var(--gray); }
.footer a:hover { color: var(--ink); }
.fdim { color: var(--gray-2); font-size: 12.5px; }
.tiny { font-size: 11.5px; opacity: .8; }

@media (max-width: 760px) {
  .adv-card { padding: 30px 22px; }
  .adv-card h2 { font-size: 26px; }
  .nav { padding: 14px 18px; }
}
/* MOBILE */
@media (max-width: 600px) {
  /* ticker */
  .ticker { height: 34px; }
  .tick { padding: 0 18px; font-size: 11.5px; }

  /* nav — swap to short labels so everything fits a 360px viewport */
  .nav { padding: 12px 14px; }
  .nav-btns { gap: 6px; }
  .navbtn { padding: 10px 12px; font-size: 13px; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .brand-name { font-size: 15px; }

  /* hero — let the headline wrap at a real headline size */
  .hero { padding: 36px 20px 20px; }
  .hero h1 { white-space: normal; font-size: clamp(30px, 9.6vw, 38px); line-height: 1.08; }
  .sub { font-size: 16.5px; margin-bottom: 32px; }
  .hero-note { margin-bottom: 40px; }

  /* demo */
  .demo { grid-template-columns: 1fr; gap: 8px; }
  .demo-chevs { transform: rotate(90deg); justify-self: center; }
  .demo-card { padding: 18px 16px; }
  /* Keep the sponsored line on ONE line whatever ad rotates in, so the
     black card never changes height. Long ads shrink-to-fit, then ellipsis. */
  .demo-line { font-size: 13px; flex-wrap: nowrap; white-space: nowrap; }
  .demo-line .brand-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .claude-guy { right: 16px; }

  /* install card — stays one row; icon + price keep the layout legible */
  .install-card { padding: 14px 16px; gap: 12px; }
  .install-title { font-size: 15px; }
  .install-sub { display: none; }
  .install-icon { width: 36px; height: 36px; }
  .install-pill-amt { font-size: 15px; }

  /* sections */
  .advertisers, .leaderboard, .trust, .install-section, .footer { padding-left: 20px; padding-right: 20px; }
  .adv-card { padding: 26px 18px; }

  /* form — 16px inputs so iOS Safari doesn't zoom on focus */
  .grid2 { grid-template-columns: 1fr; }
  .adform input { font-size: 16px; }
  .est-total { font-size: 28px; }
  .stripe-btn { min-height: 48px; }

  /* leaderboard */
  .board li { gap: 10px; font-size: 14px; align-items: flex-start; }
  .rk { line-height: 1.55; }

  /* install CTAs stack as full-width buttons */
  .install-actions { flex-direction: column; align-items: stretch; }
  .btn-green, .btn-outline { min-height: 48px; display: inline-grid; place-items: center; }

  /* redeem page */
  .redeem { padding: 24px 14px 0; }
  .redeem-card { padding: 24px 18px; }
  .balance { font-size: 36px; }
  .gift-cells { grid-template-columns: repeat(2, 1fr); }
  .gift-cell { padding: 14px 6px; }
  .recipient input { font-size: 16px; }
  .redeem-foot .btn-green { justify-self: stretch; }
}
@media (max-width: 380px) {
  .brand-name { display: none; }
}

/* REFERRALS VIEW */
.ref-link-row { display: flex; gap: 10px; margin: 4px 0 26px; }
.ref-link-row input {
  flex: 1; min-width: 0; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 12px; font-family: var(--mono); font-size: 14px; color: var(--ink);
  background: #fcfbf9;
}
.ref-link-row .btn-green { border: none; cursor: pointer; font-family: var(--sans); white-space: nowrap; }
.ref-invite-h { font-size: 15px; font-weight: 700; margin: 0 0 10px; color: var(--ink); }
.ref-invite-row { display: flex; gap: 10px; margin: 0 0 8px; }
.ref-invite-row .auth-input { flex: 1; min-width: 0; margin: 0; }
.ref-invite-row .btn-green { border: none; cursor: pointer; font-family: var(--sans); white-space: nowrap; }
.ref-invite-msg { font-size: 13.5px; margin: 0 0 22px; }
.ref-invite-msg.ok { color: var(--ok-fg); }
.ref-invite-msg.err { color: var(--err-fg); }
.ref-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; }
.ref-stat {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fcfbf9;
}
.rs-num { font-size: 26px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.rs-label { font-family: var(--mono); font-size: 11px; color: var(--gray-2); text-transform: uppercase; letter-spacing: .06em; }
.ref-list { display: grid; gap: 8px; }
.ref-empty { font-size: 14.5px; color: var(--gray-2); margin: 0; }
.ref-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.ref-desc { font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ref-desc strong { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-sub { font-size: 12.5px; color: var(--gray-2); }
.ref-when { font-family: var(--mono); font-size: 12px; color: var(--gray-2); }
.ref-badge {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 4px 9px; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap; align-self: start;
}
.ref-badge.invited { background: rgba(var(--accent-rgb), .1); color: var(--accent-d); border-color: rgba(var(--accent-rgb), .3); }
.ref-badge.pending { background: #fdf6e9; color: #946a14; border-color: #f0e0bd; }
.ref-badge.rewarded { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
.ref-badge.capped { background: #f3f3f1; color: var(--gray); border-color: var(--line); }
.ref-badge.cancelled { background: var(--err-bg); color: var(--err-fg); border-color: var(--err-line); }
@media (max-width: 640px) {
  .ref-stats { grid-template-columns: repeat(2, 1fr); }
  .ref-link-row, .ref-invite-row { flex-direction: column; }
  .ref-link-row .btn-green, .ref-invite-row .btn-green { justify-self: stretch; }
  .ref-item { grid-template-columns: auto 1fr; }
  .ref-when { grid-column: 2; justify-self: start; }
}

/* Affiliate codes — a separate, application-gated program below referrals. */
.aff-sep { border: none; border-top: 1px solid var(--line); margin: 34px 0 22px; }
.aff-row { display: flex; gap: 10px; margin: 0 0 10px; }
.aff-row .auth-input { margin: 0; flex: 1; min-width: 0; }
.aff-row .aff-followers { flex: 0 0 140px; }
.aff-hint { font-size: 13px; color: var(--gray-2); margin: 2px 0 14px; }
.aff-apply .btn-green { border: none; cursor: pointer; font-family: var(--sans); }
.aff-status .redeem-lead { margin: 4px 0 0; }
.aff-have-code { margin: 0 0 22px; }
@media (max-width: 640px) {
  .aff-row { flex-direction: column; }
  .aff-row .aff-followers { flex: 1; }
}
