/* budgie.quaal.co: one stylesheet, system fonts only. Colours follow the App Store screenshots:
   cream paper, deep green ink, sage accent. The beta widget (api.quaal.co/v1/beta/widget.js) reads
   --accent, --surface, --text, --muted and --border from here.

   Motion: the landing page's animations are CSS transitions and keyframes. landing.js adds "js" to
   <html>, "live" to the hero phone once it is on screen and "in" to each [data-reveal] block and to
   the week chart as they scroll into view. Without the script every block shows in its final state,
   and prefers-reduced-motion turns the motion off. */

:root {
  color-scheme: light dark;
  --bg: #f6f4ee;
  --bg-tint: #edf1e8;
  --surface: #ffffff;
  --text: #1c271d;
  --muted: #59655a;
  --line: #dde3d8;
  --border: #d3dbcf;
  --accent: #4a6b45;
  --accent-text: #3f5e3a;
  --accent-soft: #e4ecdf;
  --mint: #2f9c78;
  --sand: #e3d9bd;
  --shadow: 0 18px 50px rgb(28 39 29 / 0.10);
  --shadow-lg: 0 40px 90px rgb(28 39 29 / 0.26);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111611;
    --bg-tint: #172017;
    --surface: #1b231b;
    --text: #e9efe7;
    --muted: #a4b0a2;
    --line: #2a352a;
    --border: #344134;
    --accent: #8fb886;
    --accent-text: #a6cb9d;
    --accent-soft: #223022;
    --mint: #5fc39d;
    --sand: #5a5341;
    --shadow: 0 18px 50px rgb(0 0 0 / 0.35);
    --shadow-lg: 0 40px 90px rgb(0 0 0 / 0.55);
  }
  /* The widget's button text is white: keep it readable on the lighter dark-mode accent. */
  .qbeta { --accent: #4f7a49; }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
:lang(ja) body, body:lang(ja) { line-height: 1.8; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 44rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }

a { color: var(--accent-text); }
a:hover { text-decoration-thickness: 2px; }

/* Header: wordmark, page links, language switch. Sticks to the top with a soft blur. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.78);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
@media (prefers-color-scheme: dark) { .site-header { background: rgb(27 35 27 / 0.78); } }
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  padding-top: 0.7rem; padding-bottom: 0.7rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem; margin-right: auto;
  color: var(--text); font-weight: 750; letter-spacing: -0.01em; text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 22%; }
.site-nav { display: flex; gap: 1.1rem; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent-text); }
@media (max-width: 34rem) { .site-nav { display: none; } }
.lang {
  font-size: 0.9rem; padding: 0.28rem 0.75rem;
  border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; white-space: nowrap;
}

h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.25rem; }
p, ul, ol, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
.meta { color: var(--muted); font-size: 0.95rem; }

main.doc { padding-top: 2rem; padding-bottom: 3rem; }

/* ------------------------------------------------------------------ landing page */

.landing { overflow-x: clip; }

.button {
  display: inline-block; margin-top: 0.5rem; padding: 0.8rem 1.4rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgb(74 107 69 / 0.3); }
.button.big { padding: 0.95rem 1.7rem; font-size: 1.05rem; box-shadow: 0 10px 26px rgb(74 107 69 / 0.28); }
.button.ghost { background: transparent; color: var(--accent-text); border: 1px solid var(--border); box-shadow: none; }
.button.ghost:hover { background: var(--accent-soft); box-shadow: none; }
@media (prefers-color-scheme: dark) { .button { background: #4f7a49; } .button.ghost { background: transparent; } }

/* Hero: the promise on the left, a live allowance phone on the right. */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-tint) 100%);
  border-bottom: 1px solid var(--line);
  padding: 2.75rem 0 3.5rem;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.6;
  animation: drift 20s ease-in-out infinite alternate;
}
.b1 { width: 38rem; height: 38rem; right: -12rem; top: -14rem; background: radial-gradient(circle, #b4d8ab, transparent 65%); }
.b2 { width: 30rem; height: 30rem; left: -10rem; bottom: -12rem; background: radial-gradient(circle, #bfe3d4, transparent 65%); animation-delay: -7s; }
.b3 { width: 22rem; height: 22rem; right: 28%; bottom: -8rem; background: radial-gradient(circle, #ebe5c9, transparent 65%); animation-delay: -13s; }
@media (prefers-color-scheme: dark) {
  .blob { opacity: 0.28; }
  .b1 { background: radial-gradient(circle, #3e6b3a, transparent 65%); }
  .b2 { background: radial-gradient(circle, #2b6b58, transparent 65%); }
  .b3 { background: radial-gradient(circle, #5a5a3a, transparent 65%); }
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(3rem, 2rem) scale(1.08); }
}

.hero-grid { position: relative; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 56rem) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--surface); color: var(--accent-text); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.35rem 0.9rem 0.35rem 0.7rem;
  font-size: 0.8rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase;
}
:lang(ja) .eyebrow { text-transform: none; letter-spacing: 0.02em; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgb(47 156 120 / 0.5); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(47 156 120 / 0.5); }
  70% { box-shadow: 0 0 0 9px rgb(47 156 120 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(47 156 120 / 0); }
}

.hero h1 {
  font-size: clamp(2.6rem, 6.6vw, 4.6rem); line-height: 1.0; letter-spacing: -0.045em;
  font-weight: 800; margin: 1.1rem 0 1rem;
}
:lang(ja) .hero h1 { letter-spacing: -0.02em; line-height: 1.2; font-size: clamp(1.95rem, 4.7vw, 3.3rem); word-break: keep-all; }
.hero h1 em {
  font-style: normal; color: var(--accent-text);
  background: linear-gradient(92deg, var(--accent) 0%, var(--mint) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 32rem; margin-bottom: 1.4rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.25rem; }
.cta-row .button { margin-top: 0; }

/* Lead with free: the line under the hero text. */
.free-note {
  margin: 0 0 1.1rem; padding: 0.7rem 0.9rem; max-width: 32rem;
  background: var(--accent-soft); border-radius: 12px; color: var(--text); font-size: 0.98rem;
}
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; list-style: none; }
.facts li {
  margin: 0; padding: 0.25rem 0.7rem; font-size: 0.85rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}

/* The hero phone: a live mock of the Allowance screen, built in HTML so it can move. */
.hero-visual { position: relative; display: grid; place-items: center; padding: 1.5rem 0 1rem; }
.phone {
  position: relative; width: min(20.5rem, 84vw); aspect-ratio: 9 / 18.4;
  border-radius: 3rem; padding: 0.65rem; background: #151b15;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #434d43;
  animation: float 7s ease-in-out infinite;
}
.phone::before {
  content: ""; position: absolute; z-index: 2; top: 1.15rem; left: 50%; transform: translateX(-50%);
  width: 6.25rem; height: 1.55rem; border-radius: 999px; background: #070a07;
}
.screen {
  height: 100%; border-radius: 2.4rem; overflow: hidden; background: var(--surface); color: var(--text);
  padding: 3.4rem 1.15rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem;
}
@media (prefers-color-scheme: dark) { .screen { background: #0f140f; } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.scr-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
:lang(ja) .scr-top { letter-spacing: 0.04em; text-transform: none; }
.scr-top .pill { background: var(--accent-soft); color: var(--accent-text); border-radius: 999px; padding: 0.15rem 0.6rem; letter-spacing: 0; text-transform: none; font-size: 0.72rem; }
.scr-label { font-size: 0.82rem; color: var(--muted); margin-top: 0.5rem; }
.scr-amount {
  font-size: clamp(2rem, 9vw, 2.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  color: var(--accent-text); font-variant-numeric: tabular-nums;
}
.scr-sub { font-size: 0.78rem; color: var(--muted); display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.scr-sub b { color: var(--mint); font-weight: 750; }
.meter { height: 0.55rem; border-radius: 999px; background: var(--accent-soft); overflow: hidden; margin-top: 0.4rem; }
.meter-fill {
  display: block; height: 100%; width: var(--to); border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  transition: width 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s;
}
.meter-legend { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted); margin-top: -0.15rem; }
.spark { width: 100%; height: auto; margin-top: 0.25rem; overflow: visible; }
.spark .area { fill: url(#sparkFill); opacity: 0.9; }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.spark .end { fill: var(--mint); stroke: var(--surface); stroke-width: 2.5; }
.feed { list-style: none; padding: 0; margin: 0.25rem 0 0; display: flex; flex-direction: column; gap: 0.35rem; }
.feed li {
  margin: 0; display: flex; align-items: center; gap: 0.55rem; font-size: 0.82rem;
  background: var(--bg); border-radius: 0.7rem; padding: 0.45rem 0.65rem;
}
@media (prefers-color-scheme: dark) { .feed li { background: #1b231b; } }
.feed li span:nth-child(2) { flex: 1; }
.feed li b { font-variant-numeric: tabular-nums; font-weight: 700; }
.feed li b.plus { color: var(--mint); }
.cat { width: 0.7rem; height: 0.7rem; border-radius: 50%; display: inline-block; }
.c1 { background: #c65a4d; } .c2 { background: #4a6b45; } .c3 { background: #2f9c78; } .c4 { background: #7a5ea8; }
.tabbar {
  margin-top: auto; display: flex; justify-content: space-around; align-items: end;
  background: var(--bg); border-radius: 1.3rem; padding: 0.6rem 0.4rem 0.5rem;
  font-size: 0.62rem; font-weight: 700; color: var(--muted);
}
@media (prefers-color-scheme: dark) { .tabbar { background: #1b231b; } }
.tabbar span { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.tabbar span::before { content: ""; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: currentColor; opacity: 0.3; }
.tabbar .on { color: var(--accent-text); }
.tabbar .on::before { opacity: 1; background: var(--accent-soft); box-shadow: inset 0 0 0 3px var(--accent); }

/* Floating chips beside the phone. */
.chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.9rem; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 0.85rem; font-weight: 650; color: var(--text);
  animation: bob 6s ease-in-out infinite;
}
.chip .cat { flex: none; }
.chip-a { top: 17%; right: max(-0.75rem, calc(50% - 17rem)); }
.chip-b { bottom: 20%; left: max(-0.75rem, calc(50% - 17rem)); animation-delay: -3s; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (max-width: 24rem) { .chip { font-size: 0.78rem; } }

/* Sections */
.section-head { max-width: 42rem; }
.section-head.center { margin: 0 auto; text-align: center; }
.kicker {
  color: var(--accent-text); font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
}
:lang(ja) .kicker { letter-spacing: 0.06em; }
.section-head h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); line-height: 1.08; letter-spacing: -0.035em; margin: 0.4rem 0 0.6rem; font-weight: 800; }
:lang(ja) .section-head h2 { letter-spacing: -0.01em; line-height: 1.25; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.band { padding: 3.5rem 0; }
@media (min-width: 56rem) { .band { padding: 5rem 0; } }
.band.tint { background: var(--bg-tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band h2:first-child { margin-top: 0; }

/* How the allowance works: three steps beside an animated week. */
.how-grid { display: grid; gap: 2.5rem; align-items: center; margin-top: 2rem; }
@media (min-width: 56rem) { .how-grid { grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; } }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.1rem; counter-reset: step; }
.steps li { margin: 0; display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.9rem; align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 0.9rem;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 800; font-size: 1.05rem;
}
.steps h3 { margin: 0.2rem 0 0.2rem; font-size: 1.12rem; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.week-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 1.25rem 1.25rem 1rem; box-shadow: var(--shadow);
}
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.week-head strong { font-size: 0.95rem; }
.week-head span { font-size: 0.82rem; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; height: 15rem; align-items: end; }
@media (min-width: 40rem) { .week { gap: 0.75rem; height: 17rem; } }
.day { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.3rem; min-width: 0; }
.day .plus {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; font-weight: 800; color: var(--mint); white-space: nowrap;
}
.day .bal { font-size: 0.78rem; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.bar { width: 100%; max-width: 3.4rem; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; height: calc(var(--total) * 0.68); }
:lang(ja) .day .bal { font-size: 0.72rem; }
.seg { width: 100%; border-radius: 0.45rem; transform-origin: bottom center; }
.seg.spent { height: var(--spent); background: var(--sand); }
.seg.kept { height: var(--kept); background: linear-gradient(180deg, #7aa472 0%, var(--accent) 100%); }
@media (prefers-color-scheme: dark) { .seg.kept { background: linear-gradient(180deg, #a6cb9d 0%, #6f9a68 100%); } }
.day .lbl { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.day .what { font-size: 0.7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; min-height: 1em; }
@media (max-width: 39.99rem) { .day .what { display: none; } }
.week-legend { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin-top: 0.9rem; }
.week-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.week-legend i { width: 0.8rem; height: 0.8rem; border-radius: 0.25rem; display: inline-block; }
.week-legend .k { background: var(--accent); }
.week-legend .s { background: var(--sand); }

/* Why it's different: three short cards with icons. */
.cards { display: grid; gap: 1rem; margin: 2rem 0 0; }
@media (min-width: 40rem) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 46rem) { .cards.four { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .cards.four { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 1.35rem 1.35rem 1.3rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 0.9rem;
  background: var(--accent-soft); color: var(--accent-text); margin-bottom: 0.9rem;
}
.icon svg { width: 1.4rem; height: 1.4rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Screens: three phones cut from the App Store panels, captions in the page. */
.screens { display: grid; gap: 1.5rem; margin-top: 2.25rem; grid-auto-flow: column; grid-auto-columns: min(78%, 19rem); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.5rem 0 1rem; scrollbar-width: none; }
.screens::-webkit-scrollbar { display: none; }
@media (min-width: 48rem) { .screens { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; gap: 2rem; } }
.shot { scroll-snap-align: start; }
.shot-frame {
  position: relative; aspect-ratio: 450 / 760; overflow: hidden;
  border-radius: 2.6rem 2.6rem 0 0; background: #151b15;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.shot:hover .shot-frame { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.shot-frame img { position: absolute; left: 50%; bottom: 0; width: 136%; height: auto; transform: translateX(-50%); display: block; }
.shot h3 { margin: 1rem 0 0.2rem; font-size: 1.08rem; letter-spacing: -0.01em; }
.shot p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (min-width: 48rem) {
  .shot:nth-child(2) { transform: translateY(1.5rem); }
}

/* Also free: one line each. */
.pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.pills li {
  margin: 0; display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.95rem 0.55rem 0.7rem; border-radius: 999px; font-size: 0.95rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line);
}
.pills li::before {
  content: ""; width: 1.1rem; height: 1.1rem; border-radius: 50%; flex: none;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f5e3a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
}

/* Premium: four short cards and the real report. */
.report {
  margin: 2rem 0 1.25rem; padding: 1.25rem; border-radius: 22px;
  background: var(--bg-tint); border: 1px solid var(--line);
}
.band.tint .report { background: var(--surface); }
.report h3 { margin: 0 0 1rem; }
.report-pages {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(75%, 18rem); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; padding: 0 0 0.75rem; margin: 0;
}
@media (min-width: 52rem) { .report-pages { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; } }
.report-pages li { margin: 0; scroll-snap-align: start; }
.report-pages img {
  display: block; width: 100%; height: auto; background: #fff;
  border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 28px rgb(28 39 29 / 0.14);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.report-pages a:hover img { transform: translateY(-4px) scale(1.01); box-shadow: 0 18px 40px rgb(28 39 29 / 0.2); }
.report-link { margin: 1rem 0 0.25rem; }
.report-pages a { cursor: zoom-in; }

/* Report pages open in a lightbox with no script: each thumbnail links to #report-<lang>-<page>,
   and that overlay shows while it is the URL's target. The backdrop and the x go back to the
   report; the arrows step between pages; Back closes it too. */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 100;
  align-items: center; justify-content: center; padding: 3.5rem 3.5rem 2.5rem;
  background: rgb(12 17 12 / 0.93); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox:target { display: flex; }
.lb-backdrop { position: absolute; inset: 0; cursor: zoom-out; }
.lightbox figure { position: relative; margin: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.lightbox img {
  display: block; width: auto; height: auto; max-width: min(calc(100vw - 7rem), 60rem); max-height: calc(100vh - 7rem);
  background: #fff; border-radius: 4px; box-shadow: 0 20px 60px rgb(0 0 0 / 0.5);
}
.lightbox figcaption { margin-top: 0.6rem; color: #dfe7dc; font-size: 0.9rem; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border-radius: 999px; background: rgb(255 255 255 / 0.14); color: #fff;
  font-size: 1.9rem; line-height: 1; text-decoration: none;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgb(255 255 255 / 0.28); }
.lb-close { top: 0.75rem; right: 0.75rem; }
.lb-prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.6rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 39.99rem) {
  .lightbox { padding: 3.5rem 0.5rem 3.5rem; }
  .lightbox img { max-width: calc(100vw - 1rem); max-height: calc(100vh - 8.5rem); }
  .lb-prev, .lb-next { top: auto; bottom: 0.6rem; transform: none; }
  .lb-prev { left: calc(50% - 3.25rem); }
  .lb-next { right: calc(50% - 3.25rem); }
}

/* Privacy, in one breath. */
.privacy-row { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 56rem) { .privacy-row { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.privacy-row .section-head p { margin-bottom: 0; }
.quiet-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.quiet-list li { margin: 0; display: flex; gap: 0.7rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem 1rem; font-weight: 600; }
.quiet-list .icon { margin: 0; width: 2.25rem; height: 2.25rem; border-radius: 0.7rem; }
.quiet-list .icon svg { width: 1.15rem; height: 1.15rem; }

/* Join the beta: the form at the end, with the closing line above it. */
.beta-section { position: relative; overflow: hidden; text-align: center; padding: 4rem 0 4.5rem; }
.beta-section .section-head { margin: 0 auto; }
.signup {
  margin: 2rem auto 0; max-width: 32rem; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
  padding: 1.5rem 1.25rem 1.25rem; box-shadow: var(--shadow);
}
.signup h3 { margin: 0 0 0.25rem; text-align: center; font-size: 1.3rem; }
.signup > p { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem; }
/* The widget draws its own card; inside ours it sits flat. */
.signup .qbeta-card { border: 0; padding: 0.25rem 0 0; background: transparent; }
.signup .fallback { text-align: center; font-size: 0.95rem; color: var(--muted); }
.beta-section .meta { margin: 1.25rem auto 0; max-width: 32rem; }

/* ------------------------------------------------------------------ motion */

/* Reveal on scroll: hidden until landing.js marks it "in"; the delay steps through siblings. */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal="1"] { transition-delay: 0.1s; }
.js [data-reveal="2"] { transition-delay: 0.2s; }
.js [data-reveal="3"] { transition-delay: 0.3s; }
.js [data-reveal="4"] { transition-delay: 0.4s; }
@media (min-width: 48rem) { .js .shot[data-reveal].in:nth-child(2) { transform: translateY(1.5rem); } }

/* The hero copy rises in on load, one line after another. */
.js .hero-copy > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.js .hero-copy > :nth-child(5) { animation-delay: 0.32s; }
.js .hero-copy > :nth-child(6) { animation-delay: 0.4s; }
.js .phone { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both, float 7s ease-in-out 1.1s infinite; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* The hero phone wakes up once landing.js marks it "live". */
.js .hero-visual:not(.live) .meter-fill { width: 0; transition: none; }
.js .hero-visual:not(.live) .feed li { opacity: 0; transform: translateX(14px); }
.js .feed li { transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .live .feed li:nth-child(1) { transition-delay: 1.2s; }
.js .live .feed li:nth-child(2) { transition-delay: 1.5s; }
.js .live .feed li:nth-child(3) { transition-delay: 1.8s; }
.js .spark .line { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); transition: stroke-dashoffset 2s ease 0.5s; }
.js .live .spark .line { stroke-dashoffset: 0; }
.js .spark .area, .js .spark .end { opacity: 0; transition: opacity 0.8s ease 1.6s; }
.js .live .spark .area { opacity: 0.9; }
.js .live .spark .end { opacity: 1; }
.js .hero-visual:not(.live) .chip { opacity: 0; transform: translateY(10px) scale(0.96); animation: none; }
.js .chip { transition: opacity 0.6s ease, transform 0.6s ease; }
.js .live .chip-a { transition-delay: 2s; }
.js .live .chip-b { transition-delay: 2.5s; }
.js .live .chip { animation-delay: 2.6s; }
.js .live .chip-b { animation-delay: 0.6s; }

/* The week grows one day at a time once it scrolls in. */
.js .week .seg { transform: scaleY(0); transition: transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .week .plus, .js .week .bal { opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .week.in .seg { transform: scaleY(1); }
.js .week.in .plus, .js .week.in .bal { opacity: 1; transform: translateY(0); }
.js .week.in .plus { transform: translate(-50%, 0); }
.js .week .plus { transform: translate(-50%, 6px); }
.js .week .day:nth-child(1) .seg, .js .week .day:nth-child(1) .plus, .js .week .day:nth-child(1) .bal { transition-delay: 0.1s; }
.js .week .day:nth-child(2) .seg, .js .week .day:nth-child(2) .plus, .js .week .day:nth-child(2) .bal { transition-delay: 0.3s; }
.js .week .day:nth-child(3) .seg, .js .week .day:nth-child(3) .plus, .js .week .day:nth-child(3) .bal { transition-delay: 0.5s; }
.js .week .day:nth-child(4) .seg, .js .week .day:nth-child(4) .plus, .js .week .day:nth-child(4) .bal { transition-delay: 0.7s; }
.js .week .day:nth-child(5) .seg, .js .week .day:nth-child(5) .plus, .js .week .day:nth-child(5) .bal { transition-delay: 0.9s; }
.js .week .day:nth-child(6) .seg, .js .week .day:nth-child(6) .plus, .js .week .day:nth-child(6) .bal { transition-delay: 1.1s; }
.js .week .day:nth-child(7) .seg, .js .week .day:nth-child(7) .plus, .js .week .day:nth-child(7) .bal { transition-delay: 1.3s; }
.js .week .day .seg.spent { transition-duration: 0.5s; }
.js .week .day:nth-child(1) .seg.spent { transition-delay: 0.5s; }
.js .week .day:nth-child(2) .seg.spent { transition-delay: 0.7s; }
.js .week .day:nth-child(3) .seg.spent { transition-delay: 0.9s; }
.js .week .day:nth-child(4) .seg.spent { transition-delay: 1.1s; }
.js .week .day:nth-child(5) .seg.spent { transition-delay: 1.3s; }
.js .week .day:nth-child(6) .seg.spent { transition-delay: 1.5s; }
.js .week .day:nth-child(7) .seg.spent { transition-delay: 1.7s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .phone, .chip, .eyebrow .dot, .js .hero-copy > * { animation: none !important; }
  .js [data-reveal], .js .feed li, .js .chip, .js .week .seg, .js .week .plus, .js .week .bal, .js .meter-fill, .js .spark .line, .js .spark .area, .js .spark .end {
    opacity: 1 !important; transform: none !important; transition: none !important; stroke-dashoffset: 0 !important; width: var(--to);
  }
  .js .week .plus { transform: translateX(-50%) !important; }
  .button, .card, .shot-frame, .report-pages img { transition: none; }
}

/* ------------------------------------------------------------------ policy and support pages */

.table-scroll { overflow-x: auto; margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 32rem; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }

.summary {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 0.9rem 1.1rem 0.1rem;
}

.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 0.9rem; padding: 1.5rem 0 2.5rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-bottom: 0.5rem; }
.site-footer p { margin: 0; }

/* Text sections line up with the rest of the page but keep a readable measure. */
.band > .wrap > p { max-width: 44rem; }
