/* ==========================================================================
   Nail Challenge — the home page (index.html). Builds on style.css: same colours,
   fonts and cards; only the new parts and the new look are here.
   ========================================================================== */

/* ---------- menu: stays at the top while scrolling, "Join in Telegram" on the right ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .88); border-bottom: 1px solid rgba(201, 220, 203, .7);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
html { scroll-padding-top: 84px; }   /* links like #join stop below the bar, not under it */
.nav { gap: 18px; }
.nav-links { margin-left: auto; }
.nav-tg { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; background: var(--tg); color: #fff;
  font-weight: 800; font-size: .92rem; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 16px rgba(42, 171, 238, .35); }
.nav-tg:hover { background: #1e9fe3; }

/* ---------- hero: "Nail [face], AI that" + a rotating line ---------- */
.mhero { text-align: center; padding-top: 64px; padding-bottom: 18px; }
/* the black headline first, then "Nail" + the waving mascot, then the turquoise rotating line — all centred */
.mhero-head { max-width: 17em; margin: 0 auto 18px; color: var(--ink); text-align: center;
  font: 600 clamp(1.9rem, 4.6vw, 3.6rem)/1.1 "Inter Tight", var(--sans); letter-spacing: -0.03em; }
.mhero-title { margin: 0; text-align: center; font: 600 clamp(2.3rem, 6.2vw, 4.7rem)/1.08 "Inter Tight", var(--sans); letter-spacing: -0.035em; }
.mhero-line { display: flex; align-items: center; justify-content: center; gap: .15em; }
/* Nail stands still and only the raised hand waves: the arm is its own picture behind the body, turning at the shoulder */
.mhero-mascot { position: relative; display: inline-block; height: 2.4em; aspect-ratio: 600 / 640; margin: -.25em 0 -.15em;
  filter: drop-shadow(0 6px 10px rgba(17, 40, 30, .12)); }
.mhero-mascot img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mascot-arm { transform-origin: 16.2% 52.3%; animation: mascot-wave 2.6s ease-in-out infinite; }
@keyframes mascot-wave { 0%, 45%, 100% { transform: rotate(0); } 55% { transform: rotate(16deg); } 65% { transform: rotate(-6deg); }
  75% { transform: rotate(14deg); } 85% { transform: rotate(-3deg); } }
/* (the old head-only picture in the headline; no longer on the page) */
.mhero-avatar { display: inline-block; width: 1.75em; height: 1.75em; vertical-align: -0.2em; margin: -.3em -.16em -.3em -.14em;   /* raised: centred on the letters */
  filter: drop-shadow(0 6px 10px rgba(17, 40, 30, .14)); animation: avatar-wave 4s ease-in-out infinite; }
@keyframes avatar-wave { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-10deg); } 86% { transform: rotate(8deg); } 94% { transform: rotate(-4deg); } }
.mhero-rotator { display: block; height: 1.2em; overflow: hidden; color: var(--accent); }
.mhero-words { display: inline-block; transition: transform .32s ease, opacity .32s ease; }
.mhero-words.out { transform: translateY(-70%); opacity: 0; }
.mhero-words.in { transform: translateY(70%); opacity: 0; transition: none; }
.mhero-sub { max-width: 34em; margin: 22px auto 0; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
@media (prefers-reduced-motion: reduce) { .mhero-avatar, .mascot-arm, .mhero-words { animation: none; transition: none; } }

/* ---------- Nail's buttons under the chat (like Telegram's menu): Diary | My Profile / Reflection | Rewards | Withdraw ---------- */
.nail-keys { max-width: 100%; margin: 12px 0 0; }
.nail-keys-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nail-key { padding: 14px 10px; border: 0; border-radius: 14px; background: #eef2ef; color: var(--ink); font: 700 1.02rem var(--sans);
  cursor: pointer; box-shadow: 0 1px 0 rgba(17, 40, 30, .08); transition: background .15s, transform .1s; }
.nail-key.wide { grid-column: span 2; }        /* My Profile = Rewards + Withdraw together */
.nail-key:hover { background: #e2eae4; }
.nail-key:active { transform: translateY(1px); }
.nail-key[aria-selected="true"] { background: var(--tg); color: #fff; box-shadow: 0 8px 18px rgba(42, 171, 238, .3); }
.nail-keys-hint { margin: 10px 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.nail-key-info { margin-top: 12px; padding: 20px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); animation: pop .18s ease-out; }
.nail-key-info h3 { margin: 0 0 8px; font: 700 1.2rem var(--serif); }
.nail-key-info p { margin: 0 0 10px; }
.nail-key-info ul { margin: 0 0 10px; padding-left: 1.2em; }
.nail-key-info li { margin-bottom: 6px; }
.nail-key-how { font-size: .9rem; color: var(--muted); }
.nail-key-info code { background: #f1f6f1; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.nail-keys-privacy { margin: 14px 0 0; text-align: center; font-size: .9rem; color: var(--muted); }

/* ---------- plans: length + price, and the example table ---------- */
.plans { text-align: center; }
.plans-lead { margin: 0 auto; max-width: 30em; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.5; }
.plans-lead strong { color: var(--accent); }
.plans-withdraw { margin: 12px auto 0; max-width: 32em; color: var(--muted); }
.plans-withdraw strong { color: var(--ink); text-transform: uppercase; letter-spacing: .03em; }
.plans-pick { margin: 26px 0 -10px; font: 700 clamp(1.3rem, 2.4vw, 1.6rem) var(--serif); color: var(--ink); }
.plan-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; max-width: 780px; margin: 26px auto 22px; }
.plan-chip { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 6px 18px; border-radius: 22px; cursor: pointer;
  border: 2px solid var(--line); background: var(--card); font: inherit; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s, background .15s; }
.plan-chip:hover { transform: translateY(-2px); border-color: var(--tg); }
.plan-chip[aria-checked="true"] { border-color: var(--tg); background: #e8f6fd; transform: translateY(-4px); box-shadow: 0 14px 30px rgba(42, 171, 238, .22); }
.plan-days { font-weight: 800; color: #1b86c7; font-size: 1.02rem; white-space: nowrap; }
.plan-fee { width: 68px; height: 68px; border-radius: 50%; display: grid; place-content: center; line-height: 1; background: #fde68a;
  border: 3px solid #f2c21b; font: 800 1.35rem "Inter Tight", var(--sans); color: #5b4300; }
.plan-fee small { display: block; font: 800 .55rem var(--sans); letter-spacing: .06em; margin-top: 2px; }
.plan-chip[aria-checked="true"] .plan-fee { background: #fcd34d; }
.plan-card { max-width: 780px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; text-align: left; }
.plan-table-wrap.expanded { max-height: 520px; overflow-y: auto; }   /* the short table shows whole, the full list scrolls */
.plan-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
/* The days flow through colour, top to bottom: day 1 starts almost in the page's own green, then mint and
   aqua, soft blue and lavender, and the last day ends in warm gold. A slow sheen keeps it alive. Light tones
   only, so every number stays easy to read. */
.plan-table tbody {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .38) 50%, rgba(255, 255, 255, 0) 70%) 0 0 / 240% 100% no-repeat,
    linear-gradient(180deg, #e3f3e0 0%, #d7f1e4 16%, #cbeeee 32%, #d2e2fa 50%, #e1d7f6 66%, #f2d9e3 80%, #fbe2b6 92%, #fdd98a 100%);
  animation: plan-sheen 9s ease-in-out infinite alternate;
}
@keyframes plan-sheen { from { background-position: 120% 0, 0 0; } to { background-position: -20% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .plan-table tbody { animation: none; } }
.plan-table th { position: sticky; top: 0; z-index: 1; background: #edf6ea; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  padding: 12px 20px; text-align: left; }
.plan-table th:last-child, .plan-table td.t { text-align: right; }
.plan-table td { padding: 11px 20px; border-top: 1px solid rgba(255, 255, 255, .65); background: transparent; }
.plan-table .x { font-weight: 800; color: var(--ink); }
.plan-table .y, .plan-table .est { color: #1b86c7; font-weight: 700; }
.plan-table .plus { color: var(--muted); margin: 0 2px; }
.plan-table td.t { font-weight: 800; color: var(--ok); }
.plan-table tr.gap td { text-align: center; color: #5b6a63; font-style: italic; padding: 7px; }
.plan-table tr.last td { font-size: 1.08rem; font-weight: 800; }
.plan-more { display: block; margin: 10px auto 0; border: 0; background: none; color: var(--accent); font: 700 .95rem var(--sans); cursor: pointer; }
.plan-draft { margin: 8px 20px 0; text-align: center; font-size: .82rem; color: var(--muted); }
.plans-text { max-width: 620px; margin: 26px auto 0; color: var(--muted); font-size: 1.05rem; }
.plans-text p { margin: 0 0 10px; }

/* ---------- live payouts: the links and the two lists, right on the page ---------- */
.liveboard { margin-top: 18px; margin-bottom: 18px; max-width: calc(1120px - 32px); }
.live-now { margin: 0 0 14px; }
.live-now-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.liveboard .link { color: var(--accent); font-weight: 700; }
.live-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 0; }
.live-lists > div { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px;
  box-shadow: var(--shadow); }
.live-lists .rw-eyebrow { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .9rem; }
.live-lists .rw-head { display: flex; align-items: center; justify-content: space-between; }
.live-lists h3 { margin: 0 0 6px; }
/* medals for the top 3 */
#rw-top li:nth-child(-n+3) .rank { font-size: 0; }
#rw-top li:nth-child(-n+3) .rank::before { font-size: 1.2rem; }
#rw-top li:nth-child(1) .rank::before { content: "🥇"; }
#rw-top li:nth-child(2) .rank::before { content: "🥈"; }
#rw-top li:nth-child(3) .rank::before { content: "🥉"; }

/* ---------- the sections below: same content, a little more air and centred titles ---------- */
.meet, .why, .how, .live, .home-faq { padding-top: 64px; padding-bottom: 64px; }
.how h2, .home-faq h2, .join-title { text-align: center; }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  /* phones: a compact bar — name and Telegram button on one row, the links in a thin scrollable row */
  .nav { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 6px; row-gap: 4px; gap: 10px; }
  .nav-tg { margin-left: auto; padding: 7px 12px; font-size: .82rem; }
  /* the links fit the width in full (nothing scrolls or gets cut); on a very narrow phone they wrap to a second line */
  .nav-links { order: 3; width: 100%; margin-left: 0; flex-wrap: wrap; justify-content: space-between; gap: 6px 5px;
    font-size: .84rem; padding: 2px 0 4px; }
  .nav-links a { white-space: nowrap; }
  .nav-links a.nav-join { padding: 5px 12px; }
  html { scroll-padding-top: 96px; }
  .mhero { padding-top: 34px; }
  .nail-key { padding: 13px 4px; font-size: .88rem; white-space: nowrap; }   /* emoji + name on one line */
  .nail-key-info { padding: 16px 16px; }
  /* the longest phrase needs two lines on a phone: room for two, the phrase centred in it */
  .mhero-rotator { height: 2.3em; display: flex; align-items: center; justify-content: center; line-height: 1.12; }
  .mhero-words { display: block; }
  .plan-picker { gap: 6px; }
  .plan-chip { padding: 12px 2px 14px; border-radius: 16px; gap: 9px; }
  .plan-days { font-size: .8rem; }
  .plan-fee { width: 50px; height: 50px; font-size: 1.05rem; border-width: 2px; }
  .plan-table th, .plan-table td { padding: 9px 12px; font-size: .9rem; }
  .live-lists { grid-template-columns: 1fr; }
}

/* ---------- desktop: hand-drawn red "Click!" arrow pointing at My Profile ---------- */
.nail-keys { position: relative; }
.click-arrow { display: none; position: absolute; z-index: 5; width: 170px; height: 52px; pointer-events: none;
  left: calc(66.7% + 62px); top: 1px;           /* small, inside My Profile right of its label: the chat stays clear */
  filter: drop-shadow(0 0 7px rgba(255, 70, 70, .45)) drop-shadow(0 2px 2px rgba(120, 0, 0, .18));   /* a bright, glowing red */
  animation: arrow-nudge 2.4s ease-in-out 1.6s infinite; transition: opacity .35s; }
.click-arrow-text { font: 700 30px "Caveat", "Comic Sans MS", cursive; fill: #ff2e2e; transform: rotate(-4deg); transform-origin: 100px 30px; }
.click-arrow-line, .click-arrow-head { fill: none; stroke: #ff2e2e; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.click-arrow-line { stroke-dasharray: 70; stroke-dashoffset: 70; animation: arrow-draw .9s ease-out .3s forwards; }
.click-arrow-head { stroke-dasharray: 34; stroke-dashoffset: 34; animation: arrow-draw .35s ease-out 1.15s forwards; }
@keyframes arrow-draw { to { stroke-dashoffset: 0; } }
@keyframes arrow-nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-5px, 0); } }
.nail-keys.used .click-arrow { opacity: 0; animation: none; }
@media (min-width: 1000px) { .click-arrow { display: block; } }
@media (prefers-reduced-motion: reduce) {
  .click-arrow { animation: none; }
  .click-arrow-line, .click-arrow-head { animation: none; stroke-dashoffset: 0; }
}

/* ---------- amount buttons (no fixed price) and the five plans ---------- */
.amount-picker { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 16px auto 8px; }
.amount-chip { width: 76px; height: 76px; border-radius: 50%; display: grid; place-content: center; line-height: 1; cursor: pointer;
  background: #fde68a; border: 3px solid #f2c21b; color: #5b4300; font: 800 1.45rem "Inter Tight", var(--sans);
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, background .15s; }
.amount-chip small { display: block; font: 800 .55rem var(--sans); letter-spacing: .06em; margin-top: 3px; }
.amount-chip:hover { transform: translateY(-2px); }
.amount-chip[aria-checked="true"] { background: #fcd34d; transform: translateY(-4px) scale(1.06); box-shadow: 0 12px 26px rgba(242, 194, 27, .45);
  outline: 3px solid #fff; outline-offset: -7px; }
.plan-picker .plan-chip { justify-content: flex-start; gap: 8px; padding: 18px 10px 16px; }
.plan-goal { font-weight: 700; font-size: .95rem; line-height: 1.3; color: var(--ink); }
.plan-goal small { display: block; margin-top: 4px; font-weight: 600; font-size: .76rem; color: var(--muted); }
.plan-life { margin-top: auto; padding: 3px 10px; border-radius: 999px; background: #ffe1e1; color: #c0392b; font-weight: 800; font-size: .8rem; }
.plans-lives { margin: 4px auto 20px; color: var(--muted); }
.amount-chip:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.plans-nail { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px auto 0; min-height: 0; }
.plans-ten { margin: 6px auto 0; }
.btn-small { padding: 6px 14px; font-size: .9rem; }
.when-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- when does Nail check? ---------- */
.when { text-align: center; }
.when-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; text-align: left; }
.when-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; box-shadow: var(--shadow); }
.when-icon { margin: 0 0 6px; font-size: 1.9rem; line-height: 1; }
.when-card h3 { margin: 0 0 8px; font: 700 1.15rem var(--serif); }
.when-card p { margin: 0; color: var(--muted); }

/* ✂️ Cut: its own row under the other buttons, like in Telegram */
.nail-key.full { grid-column: 1 / -1; }
.nail-key-info ol { margin: 0 0 10px; padding-left: 1.3em; }

@media (max-width: 720px) {
  .amount-chip { width: 56px; height: 56px; font-size: 1.1rem; border-width: 2px; }
  .amount-picker { gap: 8px; }
  /* plans as rows on a phone: length, goal, lives */
  .plan-picker { grid-template-columns: 1fr; gap: 8px; }
  .plan-picker .plan-chip { flex-direction: row; align-items: center; text-align: left; padding: 12px 14px; gap: 12px; }
  .plan-picker .plan-days { min-width: 5.6em; font-size: .95rem; }
  .plan-goal { flex: 1; }
  .plan-life { margin-top: 0; }
  .when-grid { grid-template-columns: 1fr; }
}

/* the live reward of the chosen plan + amount (index.html #est-live, home.js) */
.est-live { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 18px auto 14px; padding: 14px 22px;
  max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.est-live .reward-value { justify-content: center; font-size: clamp(2rem, 7vw, 2.8rem); }
.est-plan { margin: 0; }

/* ---------- how it works: the drawing (live values, scales down to a phone) ---------- */
.flow-fig { margin: 8px auto 26px; max-width: 760px; }   /* viewBox 640 wide: same text size as before */
.flow-svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow-svg text { font-family: var(--sans); fill: var(--ink); text-anchor: middle; }
.flow-svg .fl-t { font-size: 21px; font-weight: 700; }
.flow-svg .fl-s { font-size: 14px; fill: var(--muted); }
.flow-svg .fl-pot { font: 700 34px var(--serif); }
.flow-svg .fl-n { font-size: 16px; text-anchor: start; }
.flow-svg .fl-v { font-size: 16px; font-weight: 700; text-anchor: start; font-variant-numeric: tabular-nums; }
.flow-svg .fl-mid { text-anchor: middle; }     /* centered over the arrow */
.flow-svg .fl-end { text-anchor: end; }        /* left of the red curve */
.flow-svg .fl-tg { fill: var(--flow-teal); }
.flow-svg .fl-tr { fill: var(--flow-red); }
.flow-svg .fl-tk { fill: var(--ink); }
.flow-svg .fl-g, .flow-svg .fl-r, .flow-svg .fl-k, .flow-svg .fl-x { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* arrows like the ones in the first-check picture: an even line with an open, rounded arrowhead */
.flow-fig { --flow-teal: #0f727e; --flow-red: #b10505; }   /* the picture's arrow teal and the red of "Not eligible" */
.flow-svg .fl-g { stroke: var(--flow-teal); stroke-width: 5; }
.flow-svg .fl-r, .flow-svg .fl-x { stroke: var(--flow-red); stroke-width: 5; }
.flow-svg .fl-k { stroke: var(--ink); stroke-width: 4; }
.flow-svg .fl-head { fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.flow-svg .fl-head-g { stroke: var(--flow-teal); }
.flow-svg .fl-head-r { stroke: var(--flow-red); }
.flow-svg .fl-head-k { stroke: var(--ink); }
.flow-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 10px; font-weight: 700; }
.flow-note { text-align: center; margin: 10px auto 0; max-width: 600px; }

/* ---------- join: the NAIL token section beside the payment form (under it on a phone) ---------- */
.join .token { grid-template-columns: 1fr; gap: 14px; align-items: start; padding: 0; }
.join .token-art { order: -1; }
.join .token-art img { width: min(200px, 50vw); }
.join .token-text h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.pay-nail-tip { margin: -2px 0 10px; }
.pay-nail-tip a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: .8rem; letter-spacing: .03em; text-decoration: none; }
.pay-nail-tip a:hover { background: var(--accent-hover); }
.pay-method { position: relative; }
.pay-method .deal { position: absolute; top: -9px; right: -6px; padding: 1px 7px; border-radius: 999px; background: var(--accent);
  color: var(--accent-ink); font: 800 .62rem var(--sans); letter-spacing: .04em; text-transform: uppercase; font-style: normal; }
.pay-method.nail { border-color: var(--accent); }
.pay-method.nail.soon { opacity: .8; }

/* FIRST CHECK picture (transparent PNG, right after the Nail chat): texts in % of the picture (2000 x 1731 px), font in cqw = % of its width */
.first-steps { padding-top: 26px; padding-bottom: 10px; }
.steps-fig { position: relative; container-type: inline-size; }
.steps-fig img { display: block; width: 100%; height: auto; }
.steps-txt { position: absolute; margin: 0; white-space: nowrap; color: var(--accent); text-align: center;
  font: 600 3.4cqw/1.08 "Inter Tight", var(--sans); letter-spacing: -0.035em; }
.steps-num { display: block; text-align: center; }          /* "1." centered over its text */
.steps-big { display: block; font-size: 2em; }              /* "Join": twice the size, its "3." like the others */
.steps-1 { left: 12.1%; top: 1.16%; transform: translateX(-50%); }   /* centered over the first phone */
.steps-2 { left: 45.85%; top: 4.62%; transform: translateX(-50%); }  /* centered over the second phone */
.steps-3 { left: 50%; top: 86.71%; transform: translateX(-50%); }

/* The numbered steps 4.–7. under the picture (Pick your amount / plan, Join the plan, Get paid): the same look and
   size as the picture's texts (3.4 % of the picture's width), but never smaller than 1.5rem on a phone */
.step-head { margin-left: auto; margin-right: auto; text-align: center; color: var(--accent);
  font: 600 max(1.5rem, calc(min(1120px, 100vw) * 0.034 - 1.1px))/1.08 "Inter Tight", var(--sans); letter-spacing: -0.035em; }
.plans-pick.step-head { margin-top: 36px; margin-bottom: 0; }
/* "7. Complete your plan": its own heading above the payouts of completed plans */
.get-paid { margin-top: 56px; margin-bottom: 6px; }
.join-title.step-head { margin: 0; }
/* phones: "5. Pick your amount" on one line (the number in front) right under the plans, so the plans, the amounts
   and the live reward fit on the screen together */
@media (max-width: 720px) {
  .plans-lives { margin: 2px auto 4px; font-size: .9rem; }
  .plans-pick.step-head { margin-top: 6px; }
  .plans-pick .steps-num { display: inline; margin-right: .22em; }
  .plan-picker { margin-bottom: 8px; }
  /* the seven amounts on one row (they shrink a little on a narrow phone) */
  .amount-picker { flex-wrap: nowrap; gap: 5px; margin: 10px auto 4px; }
  .amount-chip { width: min(48px, calc((100% - 30px) / 7)); height: auto; aspect-ratio: 1; font-size: .95rem; }
  .amount-chip[aria-checked="true"] { outline-width: 2px; outline-offset: -4px; }   /* the ring stays off the text */
  .plans-ten { margin-top: 2px; }
  .est-live { margin-top: 10px; }
}

/* the plans aren't open yet: a "Coming soon" label on top of the joining card */
.pay-soon { display: inline-block; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; background: #fff1c2; color: #8a5a00;
  font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }

/* "When and what does Nail check?": the required-check targets (same table as the rules page) and the rules link */
.when .rules-simply { margin: 40px auto 6px; max-width: 900px; }
.when-table { margin: 0 auto; max-width: 900px; text-align: left; }
.when-table table { width: 100%; border-collapse: collapse; background: var(--card); margin: 16px 0 0; }
.when-table caption { text-align: left; font-weight: 700; padding-bottom: 10px; }
.when-table th, .when-table td { text-align: left; border: 1px solid var(--line); padding: 12px 16px; }
.when-table thead { background: var(--bg-soft); }
.when-more { margin: 22px 0 0; font: 700 clamp(1.15rem, 2vw, 1.35rem) var(--sans); }
/* under Nail's buttons: straight to Nail Coach on Telegram */
.nail-keys-cta { margin: 22px 0 0; text-align: center; }
.nail-keys-cta .steps-num { margin-bottom: 8px; }   /* "1." above the Telegram button, like the picture's numbers */

/* the three "When and what" cards: bigger headings, and each text sized by home.js to fill its card */
.when-card h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.when-card p.when-fit { color: var(--ink); line-height: 1.38; font-size: 1.2rem; }
.when-red { color: #e10600; font-weight: 800; }
/* "You can withdraw your earnings after you FULLY COMPLETE THE PLAN." in bright red */
.plans-withdraw, .plans-withdraw strong { color: #e10600; font-weight: 700; }
/* the reward card: "reward / accepted video report" bigger */
.est-live .reward-value .per { font-size: .56em; }

/* the turquoise arrow from the Telegram button (1.) to "2.": inside the picture, in its units (cqw = % of its width),
   so it keeps its place and size on every screen like the picture's own arrows */
.steps-arrow { position: absolute; width: 8.5cqw; height: 2.8cqw; left: calc(25.1% - 4.25cqw); top: calc(-0.78cqw - 1.4cqw);
  transform: rotate(150deg); overflow: visible; pointer-events: none; }
.steps-arrow path { fill: none; stroke: #0e727d; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }

/* the fee back: what a finisher really gets — in the reward card and as the table's last row */
.est-back { margin: 8px auto 2px; max-width: 30em; font: 800 clamp(1.05rem, 1.8vw, 1.25rem)/1.35 var(--sans); color: #178a4c; }
.plan-table tr.fee-back td { background: transparent; font-weight: 700; border-top: 2px solid rgba(255, 255, 255, .8); }   /* the finish: the days' colours run on into its gold */
.plan-table tr.fee-back td.t { color: #178a4c; font-size: 1.1em; }

/* "Your data and privacy": one big box above the questions */
.privacy-box { margin-top: 40px; margin-bottom: 8px; }
.privacy-box { max-width: 900px; padding: clamp(24px, 4vw, 40px); border-radius: 24px; background: var(--card);
  border: 2px solid var(--accent); box-shadow: var(--shadow); text-align: center; }
.privacy-box h2 { margin: 0 0 14px; color: var(--accent); }
.privacy-box p { max-width: 40em; margin: 0 auto 10px; font-size: clamp(1.05rem, 1.7vw, 1.2rem); line-height: 1.55; }
.privacy-box .privacy-box-link { margin: 16px auto 0; font-weight: 700; }

/* under the hero: Nail is free, a plan is an optional commitment */
.mhero-free { max-width: 34em; margin: 10px auto 0; color: var(--ink); font-size: clamp(1rem, 1.6vw, 1.15rem); }

/* the headline: the same colour run as the reward table, much stronger, slowly flowing — it stands out from the page */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .mhero-head {
    background: linear-gradient(100deg, #178a5a 0%, #0d8a94 20%, #2d63c8 40%, #6f45c4 58%, #c23a6b 76%, #c46a00 90%, #178a5a 100%)
      0 50% / 135% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
    animation: head-flow 5.45s ease-in-out infinite alternate;
  }
}
@keyframes head-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
/* the headline's second line ("with a free AI coach") on its own line */
.mhero-line2 { display: block; }
@media (prefers-reduced-motion: reduce) { .mhero-head { animation: none; } }

/* under the hero: straight to Nail on Telegram, and a small link to the plans */
.mhero-cta { margin: 18px 0 0; }
.mhero-plan { margin: 10px 0 0; font-size: .95rem; font-weight: 800; }
.mhero-plan a { color: var(--accent); text-decoration: none; }
.mhero-plan a:hover { text-decoration: underline; }
/* the plans come straight under the picture's "4. Pick your plan"; the plan's promise is under the reward table */
.plans { padding-top: 8px; }
.plans-text .plans-lead { color: var(--ink); }
/* under the reward table: what the plan asks of you, with a link to the required check days */
.plan-note { margin: 10px 20px 4px; text-align: center; font-size: .98rem; color: var(--ink); line-height: 1.5; }
.plan-note p { margin: 0 0 8px; }
.plan-note strong { color: #e10600; }
.plan-note a { font-weight: 700; white-space: nowrap; }
#required-checks { scroll-margin-top: 110px; }

/* "Not yet clinically studied": a red stamp beside Nail, slightly tilted. Desktop: to the right of the mascot (placed in
   the headline's own em, so it moves with it); narrower screens: under the "Nail" line, centred. */
.mhero-title { position: relative; }
.mhero-badge { display: block; margin: 18px auto 2px; width: min(280px, calc(100vw - 48px)); line-height: 0; text-align: center; }
/* above the stamp: straight to "Does this really help?" in the questions (home.js opens it) */
.mhero-readmore { display: inline-block; margin: 0 0 4px; color: #e3262b; font: 700 .95rem/1.2 var(--sans); letter-spacing: 0;
  text-decoration: underline; text-underline-offset: 3px; }
.mhero-readmore:hover { text-decoration-thickness: 2px; }
/* above "Read more": NOT MEME, in the same red */
.mhero-badge-top { display: flex; flex-direction: column; align-items: center; }
.mhero-notmeme { display: block; margin: 0 0 2px; color: #e3262b; font: 900 1.2rem/1.15 var(--sans); letter-spacing: .08em; white-space: nowrap; }
.mhero-badge img { display: block; width: 100%; height: auto; }   /* one PNG: the tilt and the text are in the picture */
@media (min-width: 1040px) {
  /* font-size: inherit = the headline's size, so left/top follow the mascot */
  .mhero-badge { position: absolute; z-index: 2; margin: 0; left: calc(50% + 2.75em); top: .15em; width: 310px; font-size: inherit; }
  .mhero-badge-top { position: absolute; bottom: calc(100% - 2px); left: 50%; transform: translateX(-50%); white-space: nowrap; }
}


/* under the reward table, outside its card: how the deposit and the required checks work */
.plans-text .plans-deposit { max-width: 36em; margin: 0 auto; text-align: center; color: var(--ink); font-size: 1.02rem; line-height: 1.55; }
.plans-deposit strong { color: #e10600; }
.plans-deposit a { font-weight: 700; white-space: nowrap; }

/* the very bottom of the home page: the same honest note as the stamp in the hero, as plain small red text */
.clinical-note { margin: 0 auto; padding-top: 22px; padding-bottom: 16px; text-align: center; color: #e3262b; font-size: 1.02rem; line-height: 1.5; }

/* under the chat's message field: what chatting means (the rules, the privacy policy) */
.chat-legal { margin: 0; padding: 7px 14px 9px; border-top: 1px solid #eef1ee; background: #fff; color: var(--muted); font-size: .74rem;
  line-height: 1.4; text-align: center; }
.chat-legal a { color: inherit; text-decoration: underline; }

/* the joining card: "Change plan and amount" looks like the wallet button; Join and Pay flow in the headline's colours */
.pay-change { flex: 1 1 220px; font-size: 1.05rem; padding: 14px 22px; }
.btn-flow { color: #f8e2d0; border: 0; background: #252225; }              /* nailbet's colours */
.btn-flow:hover { background: #252225; filter: brightness(1.25); }
@media (prefers-reduced-motion: reduce) { .btn-flow { animation: none; } }

/* the chosen plan's flowing dots (home.js): a canvas behind the card's text */
.plan-chip { position: relative; overflow: hidden; isolation: isolate; }
.plan-flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* right under the picture's "4. Pick your plan" */
.plans-reco { margin: 4px auto 0; color: var(--accent); font-size: clamp(1.05rem, 1.8vw, 1.25rem); font-weight: 700; }
.plans-reco strong { color: var(--ink); }

/* the NAIL token box: for now just "Coming soon" (plain, small and bold) and the community link */
.token-soon { text-align: center; }
.token-soon-stamp { margin: 0 0 8px !important; font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.token-soon-news { margin: 0 0 14px !important; color: var(--ink); font-size: 1.05rem; }

/* the deposit note: Nail on the left points at it ("Read that!"), the weekly-check part marked like a highlighter */
.plans-text:has(.plans-deposit-row) { max-width: 820px; }
.plans-deposit-row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.5vw, 26px); }
.read-that { flex: none; width: clamp(92px, 17vw, 160px); height: auto; }
.plans-deposit-row .plans-deposit { margin: 0; max-width: 34em; text-align: left; }
.plans-deposit strong { padding: 0 .15em; border-radius: .2em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(transparent 12%, #fff1a6 12%, #ffe76b 88%, transparent 88%); }

/* "How do I pay with crypto?" beside the payment form: big, a little smaller than "Pick your plan"; the NAIL notice below it */
.join .pay-howto { order: -2; display: block; margin: 8px 0 0; text-align: center; color: var(--accent); text-decoration: none;
  font: 600 clamp(2rem, 4.8vw, 3.8rem)/1.08 "Inter Tight", var(--sans); letter-spacing: -0.035em; }
.join .pay-howto:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.join .pay-howto + .token-art { margin-top: clamp(28px, 6vw, 70px); }

/* "Live amounts" beside the How it works picture: its top right corner on wide screens, centred above it on phones */
.flow-fig { position: relative; }
.flow-live { position: absolute; top: 0; right: 0; }
@media (max-width: 640px) { .flow-live { position: static; display: flex; justify-content: center; margin: 0 0 10px; } }

/* a tapped button's text on its way up into the chat (main.js sendButton), then arriving as your message */
.key-fly { position: fixed; z-index: 60; margin: 0; max-width: none; white-space: nowrap; pointer-events: none;
  box-shadow: 0 6px 18px rgba(20, 50, 35, .18); }
.bubble.me.pop { animation: bubble-pop .26s ease-out; transform-origin: 100% 100%; }
@keyframes bubble-pop { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bubble.me.pop { animation: none; } }

/* beside the payment form: "How do I pay with crypto?" and the NAIL notice sit lower, level with the middle of the form */
@media (min-width: 901px) { .join .token { align-self: center; } }

/* Nail with glasses standing on top of the "On the last day" card (its feet just on the card's edge) */
.when-grid { position: relative; }
.when-nail { position: absolute; z-index: 1; bottom: calc(100% - 6px); right: 7%; width: auto; height: clamp(96px, 12vw, 150px);
  pointer-events: none; }
@media (max-width: 720px) { .when-grid { margin-top: 84px; } .when-nail { height: 92px; right: 10%; } }
/* since 25 Nov 2026 the word mark "nail agent" stands there instead of the mascot picture */
.nail-agent.when-nail { height: auto; bottom: calc(100% + 10px); font-size: clamp(34px, 4vw, 50px); }
@media (max-width: 720px) { .nail-agent.when-nail { height: auto; font-size: 34px; } }

/* "Pay with wallet": choosing between several browser wallets, and the wallet apps on a phone */
.wallet-choice { display: grid; gap: 8px; margin: 10px 0 0; }
.wallet-option { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--card); font: 700 1rem var(--sans); color: var(--ink); cursor: pointer; text-align: left; }
.wallet-option:hover { border-color: var(--tg); }
.wallet-option img { border-radius: 6px; }
.wallet-apps { margin: 10px 0 0; }
.wallet-apps p { margin: 0 0 8px; }
.wallet-apps .btn { margin: 0 6px 6px 0; padding: 10px 18px; }
#wallet-link.busy { opacity: .7; pointer-events: none; }

/* "Create personal paying address" in the payment step */
.deposit-box { margin: 14px 0 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 14px; }
.deposit-box .btn { width: 100%; }
.deposit-box p { margin: 8px 0 0; }
#deposit-addr { word-break: break-all; }

/* ↻ Renew payment under "Pay with wallet": a new payment for the plan and amount chosen now */
.pay-renew { width: 100%; margin: 10px 0 0; padding: 10px 18px; }
.pay-renew.attention { border-color: #e3262b; color: #e3262b; }
.renew-note { margin: 10px 0 0; color: #e3262b; font-weight: 700; font-size: .9rem; }

/* "≈ 4 months" with its exact length under it */
.plan-days-exact { display: block; font-size: .72em; font-weight: 700; color: var(--muted); }
