/* ═══════════════════════════════════════════════════════════════
   TROLLEY TALLY — welcome (landing) and install-guide pages
   Loaded after styles.css, so it reuses the app's fonts, colours
   and light/dark tokens. Mobile-first; nothing here affects the app.
   ═══════════════════════════════════════════════════════════════ */
.page { display: block; line-height: 1.55; }
.page a { color: var(--green); }
.wrap { width: min(680px, 100%); margin: 0 auto; padding: 0 18px; }

/* Top bar */
.pbar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; padding-top: calc(10px + env(safe-area-inset-top)); }
.pbar__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--ink) !important; font-weight: 700; font-size: 1.1rem; min-height: 44px; }
.pbar__brand img { width: 36px; height: 36px; border-radius: 9px; }
.pbar__open { font-weight: 700; text-decoration: none; padding: 10px 4px; min-height: 44px; display: inline-flex; align-items: center; }

/* Buttons (links that look like the app's buttons) */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 56px; padding: 12px 22px; border-radius: 14px; font-weight: 700; font-size: 1.12rem;
  text-decoration: none; border: 2px solid var(--green); }
.btn--primary { background: var(--green); color: var(--green-ink) !important; box-shadow: 0 6px 16px rgba(30, 107, 78, 0.25); }
.btn--ghost { background: var(--card); color: var(--green) !important; min-height: 48px; font-size: 1rem; }
.btn + .btn { margin-top: 10px; }
button.btn { width: 100%; font-family: inherit; cursor: pointer; }

/* Hero */
.hero { padding: 14px 0 8px; }
.hero h1 { font-size: clamp(1.75rem, 7.6vw, 2.5rem); line-height: 1.15; margin: 6px 0 12px; letter-spacing: -0.01em; }
.hero h1 .hl { background: linear-gradient(transparent 58%, var(--sticker) 58%); padding: 0 2px; color: var(--ink); }
[data-theme="dark"] .hero h1 .hl { background: none; color: var(--sticker); }
.hero__lead { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 18px; }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px;
  font-size: 0.92rem; color: var(--ink-soft); }
.ticks li::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* Example receipt (pure HTML/CSS, no image download) */
.demo { margin: 26px auto 8px; max-width: 360px; padding: 14px 16px 22px; position: relative; }
.demo__title { font-size: 0.8rem; letter-spacing: 0.14em; color: var(--ink-soft); text-transform: uppercase; margin: 0 0 6px; text-align: center; }
.demo__row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.demo__row small { display: block; color: var(--ink-soft); font-size: 0.8rem; }
.demo__price { font-weight: 700; white-space: nowrap; }
.demo__badge { display: inline-block; margin-top: 3px; font-size: 0.74rem; padding: 1px 7px; border-radius: 999px; background: var(--up-bg); color: var(--danger); }
.demo__budget { margin: 14px 0 12px; font-size: 0.9rem; color: var(--ink-soft); text-align: center; }
.demo__bar { display: block; height: 8px; border-radius: 99px; background: var(--line); margin-top: 6px; overflow: hidden; }
.demo__bar span { display: block; height: 100%; width: 43%; background: var(--green); border-radius: 99px; }
.demo .sticker { width: max-content; margin: 0 auto; }

/* Sections */
.sec { padding: 26px 0 6px; }
.sec h2 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 12px; }
.sec > p { margin: 0 0 12px; }
.more-link { display: inline-block; padding: 12px 0; font-weight: 700; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feature { display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; padding: 14px; }
.feature__icon { font-size: 1.6rem; line-height: 1.2; text-align: center; grid-row: span 2; }
.feature h3 { margin: 0; font-size: 1.04rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

.free { padding: 18px; text-align: center; background: var(--sticker); color: var(--sticker-ink);
  border: 2px dashed rgba(34, 32, 28, 0.55); border-radius: 16px; transform: rotate(-0.6deg); }
.free h2 { margin: 0 0 6px; }
.free p { margin: 0; }

/* Install steps */
.platforms { display: grid; gap: 12px; }
.platform { padding: 16px; position: relative; }
.platform h3 { margin: 0 0 8px; font-size: 1.12rem; padding-right: 92px; }
.platform h3 small { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); }
.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 8px 0 8px 42px; min-height: 40px; border-bottom: 1px dashed var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 6px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--green); color: var(--green-ink); font-weight: 700; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.9rem; }
.steps .note { display: block; color: var(--ink-soft); font-size: 0.9rem; margin-top: 2px; }
.key { display: inline-block; border: 1px solid var(--line); background: var(--paper); border-radius: 7px; padding: 0 6px; font-weight: 700; white-space: nowrap; }
.yours { display: none; position: absolute; top: 14px; right: 14px; background: var(--sticker); color: var(--sticker-ink);
  font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; transform: rotate(2deg); }
html.is-ios .platform--ios .yours, html.is-android .platform--android .yours { display: inline-block; }
html.is-ios .platform--ios, html.is-android .platform--android { border: 2px solid var(--green); }
.callout { padding: 14px 16px; border-left: 4px solid var(--green); }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }
.installed-msg { padding: 14px 16px; border: 2px solid var(--green); }
.installed-msg p { margin: 0; }
.qa h3 { font-size: 1.02rem; margin: 16px 0 4px; }
.qa p { margin: 0; color: var(--ink-soft); }

/* Bottom call to action + footer */
.cta { padding: 28px 0 8px; text-align: center; }
.cta h2 { margin: 0 0 12px; font-size: 1.3rem; }
.pfoot { margin-top: 26px; padding: 18px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px dashed var(--line);
  text-align: center; font-size: 0.92rem; color: var(--ink-soft); }
.pfoot p { margin: 6px 0; }
.pfoot nav a { display: inline-block; padding: 10px 6px; }
.pfoot a { color: var(--ink-soft); }
.pfoot a:hover { color: var(--green); }

@media (min-width: 700px) {
  .features { grid-template-columns: 1fr 1fr; }
  .platforms { grid-template-columns: 1fr 1fr; }
  .hero__buttons { max-width: 420px; margin: 0 auto; }
  .hero { text-align: center; }
}

/* ── v2.4.0: feedback form + usage counts page ───────────────── */
.fb { padding: 10px 0 6px; }
.fb h1 { font-size: 1.6rem; margin: 6px 0 8px; }
.fb__lead { color: var(--ink-soft); margin: 0 0 16px; }
.fb label, .fb legend { display: block; font-weight: 700; margin: 14px 0 6px; }
.fb label small, .fb legend small { font-weight: 400; color: var(--ink-soft); }
.fb textarea, .fb input[type="email"] { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.fb textarea { min-height: 130px; resize: vertical; }
.fb fieldset { border: 0; padding: 0; margin: 0; }
.stars { display: flex; gap: 6px; }
.stars label { margin: 0; flex: 1; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); font-weight: 700; cursor: pointer; }
.stars input:checked + span { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.stars input:focus-visible + span { outline: 3px solid var(--sticker); }
.fb__note { font-size: 0.88rem; color: var(--ink-soft); margin: 14px 0; }
.fb__msg { margin: 14px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.fb__msg--ok { border-color: var(--green); }
.fb__msg--warn { border-color: var(--danger); }
.fb .btn { margin-top: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.stat { padding: 14px; }
.stat b { display: block; font-family: "Space Mono", monospace; font-size: 1.6rem; }
.stat span { color: var(--ink-soft); font-size: 0.88rem; }
.days { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.days th, .days td { text-align: right; padding: 7px 4px; border-bottom: 1px dashed var(--line); }
.days th:first-child, .days td:first-child { text-align: left; }
/* v2.5.0: feedback replies admin (/replies/) */
.fbl { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.fbl__item { padding: 14px; }
.fbl__meta { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 6px; overflow-wrap: anywhere; }
.fbl__msg { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; }
.fbl__ta { width: 100%; min-height: 96px; font: inherit; font-size: 16px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); box-sizing: border-box; margin: 4px 0 8px; }
/* v2.15.0-preview: /start/ landing page for flyer and QR arrivals */
.st-kicker { margin: 4px 0 0; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); font-weight: 700; }
.st-hero h1 { font-size: clamp(2.1rem, 10vw, 3rem); }
.st-gift { text-align: left; border-radius: 16px; }
.st-gift h2 { font-size: 1.3rem; }
.st-list { list-style: none; padding: 0; margin: 0; }
.st-list li { padding: 11px 0 11px 26px; position: relative; border-bottom: 1px dashed var(--line); }
.st-list li:last-child { border-bottom: 0; }
.st-list li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.st-list--pro li::before { background: var(--sticker); box-shadow: 0 0 0 1px var(--ink); }
.st-sub { font-size: 1.08rem; margin: 22px 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-pill { font-size: 0.78rem; font-weight: 700; background: var(--sticker); color: var(--sticker-ink); border-radius: 999px; padding: 2px 10px; }
.st-points { margin-top: 4px; }
#install-btn { margin-bottom: 12px; }
.st-share { text-align: center; }
.st-share .btn { max-width: 420px; margin: 4px auto 0; }
.st-shared { font-size: 0.92rem; color: var(--ink-soft); margin: 10px 0 0; overflow-wrap: anywhere; }

/* ── /mission/ our-mission page (preview) ────────────────────── */
.ms-hero { padding-bottom: 4px; }
.ms-wordmark { display: block; font-size: 0.5em; letter-spacing: 0.06em; color: var(--green); font-weight: 700; margin-bottom: 10px; text-transform: none; }
.ms-tagline { display: block; }
.ms-keep { white-space: nowrap; }
.ms-hero h1 { font-size: clamp(2.1rem, 10vw, 3rem); }
.ms-pillars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ms-pillar { padding: 16px; }
.ms-pillar h3 { margin: 0 0 6px; font-size: 1.04rem; }
.ms-pillar p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.ms-pull { margin: 0; font-size: 1.12rem; line-height: 1.45; text-align: center; padding: 8px 4px 4px; }
.ms-cta .ticks { justify-content: center; margin: 0 0 16px; }
.ms-cta .btn { max-width: 420px; margin: 0 auto; }
.ms-cta .more-link { margin-top: 8px; }
@media (min-width: 700px) {
  .ms-pillars { grid-template-columns: 1fr; }
}

.ms-also { margin: 22px 0 0; padding-top: 16px; border-top: 1px dashed var(--line);
  color: var(--ink-soft); font-size: 0.95rem; text-align: center; }
.ms-also__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 2px 0; }
.ms-also__list li { display: inline; }
.ms-also__list li:not(:last-child)::after { content: " · "; }
.ms-also.is-rotating .ms-also__list { display: grid; justify-content: stretch; min-height: 1.5em; }
.ms-also.is-rotating .ms-also__list li { display: block; grid-area: 1 / 1; margin: 0;
  opacity: 0; transition: opacity 0.45s ease; }
.ms-also.is-rotating .ms-also__list li::after { content: none; }
.ms-also.is-rotating .ms-also__list li.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .ms-also.is-rotating .ms-also__list { display: flex; }
  .ms-also.is-rotating .ms-also__list li { display: inline; grid-area: auto; opacity: 1; transition: none; }
  .ms-also.is-rotating .ms-also__list li:not(:last-child)::after { content: " · "; }
}

/* Mission invitation card on /start/ and /welcome/ (preview) */
.ms-welcome-card { display: block; padding: 16px 18px; text-decoration: none; color: inherit; min-height: 44px; }
.ms-welcome-card h2 { margin: 0 0 6px; font-size: 1.2rem; color: var(--ink); }
.ms-welcome-card p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.ms-welcome-card__go { display: inline-block; font-weight: 700; color: var(--green); }
.ms-welcome-card:hover { border-color: var(--green); }
.page a.ms-welcome-card { color: inherit; }
