/* Walletin landing, version 2. Direction: One motif (seed 1741671192).
   Motif: the serrated edge of the boleta that opens every billing in the app.
   Palette and type are the app's own (src/theme.ts): bone, ink, teal; Fraunces for titles and amounts, Instrument Sans for the rest. */

@font-face { font-family: "Fraunces"; src: url("../fonts/Fraunces_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans_500Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --sheet: #FBF9F4;
  --border: #E6E1D6;
  --recessed: #EAE5DA;
  --ink: #16161A;
  --muted: #6E6A63;
  --on-ink: #FBF9F4;
  --on-ink-muted: #A8A29A;
  --ink-divider: #2E2E33;
  --accent: #146B5C;
  --accent-dark: #0E4F43;
  --accent-soft: #E4EEEA;
  --accent-ink: #FFFFFF;
  --accent-bar: #C3DED4;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --step-head: clamp(1.75rem, 0.9rem + 2.6vw, 3.25rem);
  --step-display: clamp(2.75rem, 1rem + 5.2vw, 5rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(0.75rem, 1.4vw, 1.5rem);
  --gap-section: clamp(4rem, 9vw, 8rem);
  --tooth-w: 1.25rem;
  --tooth-h: 0.625rem;
  --tooth-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' preserveAspectRatio='none'%3E%3Cpath d='M0 10 10 0 20 10Z'/%3E%3C/svg%3E");
  --tooth-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10' preserveAspectRatio='none'%3E%3Cpath d='M0 0H20L10 10Z'/%3E%3C/svg%3E");

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: max(100%, min(1.1111vw, 24px)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); font-weight: 400; line-height: 1.5; font-kerning: normal; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--ring, var(--accent)); outline-offset: 3px; }
:target { scroll-margin-top: 2rem; }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; text-wrap: balance; hyphens: none; letter-spacing: -0.02em; }
p { max-width: 62ch; text-wrap: pretty; }
.small { font-size: var(--step-small); line-height: 1.45; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- the motif: the boleta's serrated edge ---------- */
.zt, .zb { position: relative; }
.zt::before, .zb::after { content: ""; position: absolute; left: 0; right: 0; height: var(--tooth-h); background: var(--zig, currentColor); pointer-events: none; }
.zt::before { bottom: calc(100% - 1px); -webkit-mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; }
.zb::after { top: calc(100% - 1px); -webkit-mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; }

/* ---------- controls ---------- */
.button { --zig: var(--accent); --tooth-w: 0.75rem; --tooth-h: 0.375rem; position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.6rem; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 0; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.button::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: var(--tooth-h); background: var(--zig); -webkit-mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; transition: background-color var(--t-hover) ease; }
.button:active { transform: translateY(2px); }
.button--small { min-height: 2.75rem; padding: 0 1.2rem; }
@media (hover: hover) and (pointer: fine) { .button:hover { background: var(--accent-dark); --zig: var(--accent-dark); } }
.link, .link-plain { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease; font-size: var(--step-small); font-weight: 500; }
.link-plain { font-size: inherit; text-decoration-color: currentColor; }
@media (hover: hover) and (pointer: fine) { .link:hover, .link-plain:hover { text-decoration-color: currentColor; } }

/* ---------- hero: headline upper left, one teal stage with the working fragment ---------- */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto minmax(26svh, auto) auto; column-gap: var(--gutter); padding-inline: var(--margin); background: var(--bg); position: relative; overflow-x: clip; }
.bar { grid-column: 1 / -1; grid-row: 1; display: flex; justify-content: space-between; align-items: baseline; padding-top: 1.75rem; }
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: var(--step-lead); letter-spacing: -0.02em; text-decoration: none; }
.hero__copy { grid-column: 1 / -1; grid-row: 2 / 4; padding-top: clamp(1rem, 4svh, 3rem); position: relative; z-index: 2; align-self: start; pointer-events: none; }
.hero__copy > * { pointer-events: auto; }
.hero__copy h1 { font-size: var(--step-display); line-height: 1; letter-spacing: -0.035em; max-width: 14em; }
.lines .line { display: block; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.hero { --copy-w: calc((100vw - 2 * var(--margin) - 11 * var(--gutter)) / 3 + 3 * var(--gutter)); }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: min(30ch, var(--copy-w)); margin-top: 1.75rem; }
.hero__action { margin-top: 1.75rem; }
.status { margin-top: 2rem; font-size: var(--step-body); line-height: 1.45; max-width: min(36ch, var(--copy-w)); }

.stage { grid-column: 5 / -1; grid-row: 3; margin-right: calc(var(--margin) * -1); background: var(--accent); padding: 3.5rem 0 0 3.5rem; min-height: 38rem; position: relative; }
.stage::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: var(--tooth-h); background: var(--accent); -webkit-mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; }

/* ---------- the working fragment: the app's own style (cards on bone, teal bars, Fraunces amounts) ---------- */
[data-ui] { --ui-radius: 1.125rem; }
.sim { width: min(40rem, 100%); background: var(--surface); color: var(--ink); border-radius: var(--ui-radius) 0 0 0; padding: 1.75rem 1.75rem 2rem; min-height: 34rem; }
.sim__label { font-size: var(--step-small); color: var(--muted); font-weight: 500; }
.sim__total { font-family: var(--font-display); font-weight: 600; font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.02em; margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.sim__delta { font-size: var(--step-small); margin-top: 0.2rem; min-height: 1.5em; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.sim__chart { --h: 9.5rem; margin-top: 1.25rem; margin-bottom: 1.6rem; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 0.3rem; align-items: end; }
.bar-col { position: relative; display: block; height: var(--h); padding: 0; min-width: 0; cursor: pointer; }
.bar-col__stack { position: absolute; inset: 0; }
.bar-col__base, .bar-col__add { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; border-radius: 4px 4px 0 0; transform-origin: bottom; transition: transform 460ms var(--ease-out), background-color var(--t-hover) ease; }
.bar-col__base { background: var(--accent); transform: scaleY(var(--b, 0)); }
.bar-col__add { background: var(--ink); transform: translateY(calc(var(--b, 0) * -100%)) scaleY(var(--a, 0)); }
.bar-col[aria-pressed="true"] .bar-col__base { background: var(--accent-dark); }
.bar-col__tick { position: absolute; top: 100%; left: 0; margin-top: 0.4rem; font-size: var(--step-small); line-height: 1; color: var(--muted); }
.bar-col[aria-pressed="true"] .bar-col__tick { color: var(--ink); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .bar-col:hover .bar-col__base { background: var(--accent-dark); } }
.sim__read { font-size: var(--step-small); line-height: 1.5; max-width: none; min-height: 4.6em; font-variant-numeric: tabular-nums; }
.sim__read b { font-weight: 600; }
.sim__ctl { margin-top: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.75rem; }
.ctl { min-width: 0; }
.ctl__row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; font-size: var(--step-small); }
.ctl__row label { color: var(--muted); font-weight: 500; }
.ctl output { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 2.75rem; background: transparent; margin: 0; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; background: var(--recessed); border-radius: 3px; }
.range::-moz-range-track { height: 6px; background: var(--recessed); border-radius: 3px; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; background: var(--accent); border: 3px solid var(--surface); border-radius: 50%; transition: transform var(--t-press) var(--ease-out); }
.range::-moz-range-thumb { width: 18px; height: 18px; background: var(--accent); border: 3px solid var(--surface); border-radius: 50%; transition: transform var(--t-press) var(--ease-out); }
.range:active::-webkit-slider-thumb { transform: scale(1.14); }
.range:focus-visible { outline-offset: 0; }
.stepper { display: grid; grid-template-columns: 2.75rem 1fr 2.75rem; align-items: center; column-gap: 0.25rem; }
.stepper__btn { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--recessed); font-size: 1.3rem; line-height: 1; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.stepper__btn:active { transform: scale(0.92); }
@media (hover: hover) and (pointer: fine) { .stepper__btn:hover { background: var(--accent-bar); } }

/* ---------- the band: the debt staircase as a ticker ---------- */
.ticker { --zig: var(--ink); position: relative; display: flex; overflow: hidden; background: var(--ink); color: var(--on-ink); padding-block: 2.25rem; margin-top: var(--gap-section); }
.ticker::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--tooth-h); background: var(--bg); -webkit-mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; z-index: 1; }
.ticker__track { display: flex; flex: none; align-items: baseline; gap: 0; min-width: 100%; justify-content: space-around; }
.ticker__track li { display: flex; align-items: baseline; gap: 0.6rem; padding-inline: clamp(1.25rem, 3vw, 3rem); position: relative; }
.ticker__track li::before { content: ""; width: 0.55rem; height: 0.32rem; background: var(--accent-bar); -webkit-mask: var(--tooth-up) center / 100% 100% no-repeat; mask: var(--tooth-up) center / 100% 100% no-repeat; align-self: center; margin-right: 0.4rem; }
.ticker__m { font-size: var(--step-body); color: var(--on-ink-muted); font-weight: 500; }
.ticker__n { font-family: var(--font-display); font-weight: 600; font-size: var(--step-head); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .ticker__track { animation: tick 46s linear infinite; }
  .ticker:hover .ticker__track { animation-play-state: paused; }
}
@keyframes tick { to { transform: translateX(-100%); } }

/* ---------- scene 1: one boleta per billing ---------- */
.showcase { background: var(--bg); }
.how .scene-stage { background: var(--bg); }
.showcase .scene-stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-inline: var(--margin); align-content: center; align-items: center; min-height: 100svh; }
.show__list { grid-column: 1 / 6; align-self: end; margin-bottom: calc(50svh - min(32svh, 18rem)); }
.show__title { font-size: var(--step-head); line-height: 1.1; color: var(--muted); }
.months { display: block; }
.months button { display: flex; align-items: center; gap: 0.55em; font-family: var(--font-display); font-weight: 600; font-size: var(--step-head); line-height: 1.15; letter-spacing: -0.02em; color: var(--muted); text-align: left; transition: color var(--t-ui) ease, transform var(--t-ui) var(--ease-out); }
.months button::before { content: ""; width: 0.4em; height: 0.24em; background: var(--accent); -webkit-mask: var(--tooth-up) center / 100% 100% no-repeat; mask: var(--tooth-up) center / 100% 100% no-repeat; transform: scale(0.6); opacity: 0; transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui) ease; }
.months button[aria-selected="true"] { color: var(--ink); }
.months button[aria-selected="true"]::before { transform: scale(1); opacity: 1; }
@media (hover: hover) and (pointer: fine) { .months button:hover { color: var(--ink); transform: translateX(6px); } }
.show__field { grid-column: 6 / 12; position: relative; height: min(70svh, 40rem); background: var(--accent); transition: background-color 500ms ease; }
.show__field::before, .show__field::after { content: ""; position: absolute; left: 0; right: 0; height: var(--tooth-h); background: var(--accent); transition: background-color 500ms ease; }
.show__field::before { bottom: calc(100% - 1px); -webkit-mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; }
.show__field::after { top: calc(100% - 1px); -webkit-mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; }
.show__field[data-tone="ink"], .show__field[data-tone="ink"]::before, .show__field[data-tone="ink"]::after { background: var(--ink); }
.show__field[data-tone="dark"], .show__field[data-tone="dark"]::before, .show__field[data-tone="dark"]::after { background: var(--accent-dark); }
.show__field[data-tone="soft"], .show__field[data-tone="soft"]::before, .show__field[data-tone="soft"]::after { background: var(--accent-bar); }
.show__fact { grid-column: 12 / 13; align-self: center; font-size: var(--step-body); max-width: 11ch; line-height: 1.3; font-weight: 500; }

.boleta { --tooth-w: 1.125rem; --tooth-h: 0.5625rem; position: absolute; z-index: 1; left: 50%; top: 50%; translate: -50% -50%; width: min(25rem, 86%); background: var(--surface); color: var(--ink); padding: 2.4rem 1.6rem 2rem; }
.boleta::before, .boleta::after { content: ""; position: absolute; left: 0; right: 0; height: var(--tooth-h); background: var(--surface); }
.boleta::before { bottom: calc(100% - 1px); -webkit-mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; }
.boleta::after { top: calc(100% - 1px); -webkit-mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; }
.bl__title { font-size: var(--step-lead); line-height: 1.15; }
.bl__sub { font-size: var(--step-small); color: var(--muted); margin-top: 0.2rem; }
.bl__lines { margin-top: 1.1rem; }
.bl__line { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: baseline; padding-block: 0.38rem; }
.bl__d { font-weight: 500; font-size: var(--step-small); line-height: 1.3; }
.bl__note { grid-column: 1; font-size: var(--step-small); color: var(--muted); line-height: 1.3; }
.bl__a { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; font-size: var(--step-small); font-variant-numeric: tabular-nums; align-self: start; }
.bl__line--muted .bl__d, .bl__line--muted .bl__a { color: var(--muted); }
.bl__rule { height: 0; border-top: 2px dashed var(--border); margin-block: 0.8rem 0.9rem; }
.bl__total { display: flex; justify-content: space-between; align-items: baseline; }
.bl__total span { font-weight: 600; }
.bl__total strong { font-family: var(--font-display); font-weight: 600; font-size: var(--step-head); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- features: sentences that open ---------- */
.features { background: var(--bg); padding-block: var(--gap-section) 0; }
.band { --fb: var(--bg); --fi: var(--ink); --ring: var(--ink); position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; padding: 0.5rem var(--margin); color: var(--ink); overflow: clip; background-color: var(--bg); transition: background-color 0s 650ms; }
.band[data-tone="accent"] { --fb: var(--accent); --fi: var(--accent-ink); }
.band[data-tone="ink"] { --fb: var(--ink); --fi: var(--on-ink); }
.band[data-tone="dark"] { --fb: var(--accent-dark); --fi: var(--accent-ink); }
.band[data-tone="soft"] { --fb: var(--accent-soft); --fi: var(--ink); }
.band.is-on { --ring: var(--fi); background-color: var(--fb); transition-delay: 0s; }
.band__fill { position: absolute; inset: 0; background: var(--bg); clip-path: inset(0); transition: clip-path 650ms var(--ease-in-out); }
.band.is-on .band__fill { clip-path: inset(0 100% 0 0); }
/* A hairline marks where each band starts, and one more closes the last, so the rows read as separate things you can open.
   Asked for by Matías: these rows are controls, not decoration. */
.band::before, .band:last-child::after { content: ""; position: absolute; left: var(--margin); right: var(--margin); height: 2px; background: var(--ring); opacity: 0.4; z-index: 1; pointer-events: none; transition: background-color 400ms ease; } /* taste-skill-ignore */
.band::before { top: 0; }
.band:last-child::after { bottom: 0; }
/* With a mouse, a closed band takes a wash of its own colour under the pointer, a hint of what it turns into when opened. */
.band__fill { transition: clip-path 650ms var(--ease-in-out), background-color 250ms ease; }
@media (hover: hover) {
  .band:not(.is-on):has(.band__btn:hover) .band__fill { background: color-mix(in srgb, var(--fb) 24%, var(--bg)); }
}
html:not(.js) .band__more { grid-template-rows: 1fr; }
.band__head { position: relative; grid-column: 1 / -1; grid-row: 1; font-size: var(--step-head); line-height: 1.08; }
.band__btn { display: flex; align-items: center; justify-content: space-between; gap: var(--gutter); width: 100%; padding: 2rem 0; text-align: left; cursor: pointer; }
.band__btn:focus-visible { outline-offset: 4px; }
.band__sentence { max-width: 20ch; color: var(--ink); transition: color 400ms ease; }
.band.is-on .band__sentence { color: var(--fi); }
.band__pill { position: relative; flex: none; width: 2.2em; height: 1.2em; border-radius: 999px; background: var(--recessed); color: var(--ink); transition: background-color 300ms ease, transform var(--t-press) var(--ease-out); }
.band.is-on .band__pill { background: var(--bg); }
.band__btn:active .band__pill { transform: scale(0.96); }
.band__minus, .band__plus { position: absolute; top: 50%; width: 0.38em; height: 0.38em; margin: -0.19em 0 0 -0.19em; }
.band__minus { left: 0.6em; }
.band__plus { left: 1.6em; }
.band__minus::before, .band__plus::before, .band__plus::after { content: ""; position: absolute; background: currentColor; }
.band__minus::before, .band__plus::before { left: 0; right: 0; top: 50%; height: 0.085em; margin-top: -0.0425em; }
.band__plus::after { top: 0; bottom: 0; left: 50%; width: 0.085em; margin-left: -0.0425em; }
.band__knob { position: absolute; top: 0.12em; left: 0.12em; width: 0.96em; height: 0.96em; border-radius: 50%; background: var(--surface); transition: transform 380ms var(--ease-out), background-color 300ms ease; }
.band.is-on .band__knob { transform: translateX(1em); background: var(--accent); }
.band__more { position: relative; grid-column: 1 / 11; grid-row: 2; display: grid; grid-template-rows: 0fr; transition: grid-template-rows 450ms var(--ease-out); color: var(--fi); font-size: var(--step-lead); line-height: 1.35; }
.band__clip { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s 450ms; }
.band__body { max-width: 36ch; padding-bottom: 2rem; }
.band__body p { max-width: none; }
.band__body p + p { margin-top: 0.75rem; }
.band.is-on .band__more { grid-template-rows: 1fr; margin-top: -1rem; }
.band.is-on .band__clip { visibility: visible; transition-delay: 0s; }
html:not(.js) .band__clip { visibility: visible; }
/* On a wide screen the sentence keeps the left and its figures take a second column, so the band is not a left-hand strip.
   The text lets clicks through to the button underneath: the whole band opens and closes. */
@media (min-width: 56.3125em) {
  .band__head { grid-row: 1; display: flex; align-self: stretch; }
  .band__btn { flex: 1; align-items: flex-start; }
  .band__pill { margin-top: 0.02em; }
  .band__more { grid-column: 7 / 11; grid-row: 1; pointer-events: none; }
  .band.is-on .band__more { margin-top: 0; }
  .band__body { padding-top: 2.25rem; }
}

/* ---------- scene 2: the life of a purchase, four fields ---------- */
.how .scene-stage { display: flex; min-height: 0; }
.field { --fb: var(--ink); --fi: var(--on-ink); flex: 1 1 25%; min-width: 0; min-height: min(84svh, 46rem); background: var(--fb); color: var(--fi); position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 2rem 1.5rem 2rem; }
.field[data-tone="accent"] { --fb: var(--accent); --fi: var(--accent-ink); }
.field[data-tone="recessed"] { --fb: var(--recessed); --fi: var(--ink); }
.field[data-tone="dark"] { --fb: var(--accent-dark); --fi: var(--accent-ink); }
.field__title { font-size: var(--step-head); line-height: 1.05; max-width: 12ch; position: absolute; top: 2rem; left: 1.5rem; right: 1rem; }
.field .card { margin-block: auto; align-self: flex-start; }
.field__clause { font-family: var(--font-display); font-weight: 600; font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.01em; max-width: 14ch; }
.card { width: 16.25rem; max-width: 100%; background: var(--surface); color: var(--ink); border-radius: var(--ui-radius, 1.125rem); padding: 1.1rem 1.1rem 1.2rem; transition: transform var(--t-ui) var(--ease-out); }
.card__name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-lead); line-height: 1.15; letter-spacing: -0.01em; }
.card__meta { font-size: var(--step-small); color: var(--muted); margin-top: 0.2rem; }
.card__row { display: flex; align-items: baseline; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.card__of { font-size: var(--step-small); color: var(--muted); }
.card__amount { margin-top: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.02em; margin-top: 0.7rem; font-variant-numeric: tabular-nums; }
.card__chip { display: inline-block; margin-top: 0.8rem; padding: 0.3rem 0.65rem; border-radius: 8px; background: var(--recessed); font-size: var(--step-small); font-weight: 600; }
.card__chip--soft { background: var(--accent-soft); color: var(--accent-dark); }
.card__foot { margin-top: 0.8rem; font-size: var(--step-small); color: var(--muted); line-height: 1.35; }
@media (hover: hover) and (pointer: fine) { .field:hover .card { transform: translateY(-6px); } }

/* ---------- today: the real app, five real screens ---------- */
.today { background: var(--ink); color: var(--on-ink); padding: var(--gap-section) 0 calc(var(--gap-section) * 0.6) var(--margin); margin-top: var(--gap-section); }
.today__title { font-size: var(--step-head); line-height: 1.05; }
.today__row { display: flex; align-items: flex-end; gap: clamp(0.75rem, 1.6vw, 1.5rem); margin-top: 3rem; overflow-x: auto; padding: 0 var(--margin) 1rem 0; scrollbar-width: thin; scrollbar-color: var(--on-ink-muted) transparent; }
.shotbox { flex: 0 0 clamp(11rem, 17.4vw, 24rem); }
.shotbox__pic { --zig: var(--bg); position: relative; background: var(--bg); transition: transform var(--t-ui) var(--ease-out); }
.shotbox__pic::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: var(--tooth-h); background: var(--bg); -webkit-mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; }
.shotbox:nth-child(even) .shotbox__pic { margin-bottom: 0; }
.shotbox__pic img { width: 100%; }
.shotbox__cap { margin-top: 1.5rem; font-size: var(--step-body); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .shotbox:hover .shotbox__pic { transform: translateY(-8px); } }

/* ---------- ask: a sentence with a blank ---------- */
.ask { --zig: var(--accent); --ring: var(--on-ink); background: var(--accent); color: var(--accent-ink); padding: calc(var(--gap-section) * 0.8) var(--margin) calc(var(--gap-section) * 0.5); position: relative; }
.ask::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: var(--tooth-h); background: var(--accent); -webkit-mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; }
.ask__form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; row-gap: 1.5rem; }
.ask__sentence { grid-column: 1 / 9; }
.ask__side { grid-column: 9 / 13; padding-bottom: 0.5rem; }
.ask__sentence { --fs: var(--step-display); font-family: var(--font-display); font-weight: 600; font-size: var(--fs); line-height: 1.12; letter-spacing: -0.03em; max-width: none; text-wrap: nowrap; }
.ask__line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.3em; row-gap: 0.06em; }
.ask__input { font: inherit; font-size: var(--input-fs, 1em); letter-spacing: -0.03em; flex: 1 1 0; min-width: calc(var(--fs) * 4.2); max-width: 100%; height: calc(var(--fs) * 1.12); min-height: 2.75rem; padding: 0 calc(var(--fs) * 0.22); background: var(--accent-dark); color: var(--accent-ink); border: 0; border-bottom: 0.09em solid transparent; border-radius: 0; transition: background-color var(--t-ui) ease, border-color var(--t-ui) ease; }
.ask__input[style*="--input-fs"] { letter-spacing: 0; }
.ask__input[aria-invalid="true"] { border-bottom-color: var(--on-ink); }
.ask__input::placeholder { color: color-mix(in srgb, var(--accent-ink) 62%, var(--accent-dark)); opacity: 1; }
.ask__input:focus-visible { outline: 3px solid var(--on-ink); outline-offset: 2px; background: var(--ink); }
.ask__button { --zig: var(--bg); --tooth-w: 0.28em; --tooth-h: 0.14em; position: relative; font: inherit; letter-spacing: inherit; height: 1.12em; min-height: 2.75rem; padding: 0 0.3em; flex: none; background: var(--bg); color: var(--ink); border: 0; border-radius: 0; cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.ask__button::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: var(--tooth-h); background: var(--zig); -webkit-mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-down) left top / var(--tooth-w) var(--tooth-h) repeat-x; transition: background-color var(--t-hover) ease; }
.ask__button:active { transform: translateY(0.05em); }
.ask__button:focus-visible { --zig: var(--ink); background: var(--ink); color: var(--on-ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .ask__button:hover { background: var(--accent-soft); --zig: var(--accent-soft); } }
.ask__note { font-size: var(--step-body); max-width: 34ch; }
.ask__check:not(:empty) { margin-top: 1rem; }
.ask__trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; pointer-events: none; } /* taste-skill-ignore: invisible bot trap, not a rule */
.ask__msg { margin-top: 1rem; min-height: 1.5em; font-size: var(--step-body); max-width: 34ch; font-weight: 600; }

/* ---------- footer: the mark, built large ---------- */
.foot { --ring: var(--on-ink); background: var(--ink); color: var(--on-ink); padding: 3rem var(--margin) 2rem; position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: var(--tooth-h); background: var(--ink); -webkit-mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; mask: var(--tooth-up) left bottom / var(--tooth-w) var(--tooth-h) repeat-x; }
.foot__mark { --mark-h: clamp(9rem, 26svh, 18rem); display: flex; align-items: flex-end; gap: 4px; height: var(--mark-h); }
.foot__mark span { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: min(clamp(4.5rem, 12.5vw, 15rem), calc(var(--mark-h) * 0.76)); line-height: 0.74; letter-spacing: -0.04em; color: var(--ink); padding-bottom: 0.02em; transform-origin: bottom; transition: transform 400ms var(--ease-out); }
.foot__mark span:nth-child(1) { height: 78%; background: var(--bg); }
.foot__mark span:nth-child(2) { height: 100%; background: var(--accent); color: var(--accent-ink); }
.foot__mark span:nth-child(3) { height: 64%; background: var(--accent-soft); }
.foot__mark span:nth-child(4) { height: 88%; background: var(--bg); }
.foot__mark span:nth-child(5) { height: 72%; background: var(--accent-bar); }
.foot__mark span:nth-child(6) { height: 96%; background: var(--accent); color: var(--accent-ink); }
.foot__mark span:nth-child(7) { height: 60%; background: var(--bg); }
.foot__mark span:nth-child(8) { height: 84%; background: var(--accent-soft); }
@media (hover: hover) and (pointer: fine) { .foot__mark span:hover { transform: translateY(-0.6rem); } }
.foot__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 2.5rem; font-size: var(--step-small); }
.foot__row p { max-width: none; }
.foot__what { color: var(--on-ink-muted); }
.foot__act { justify-self: end; }
.foot .button { --zig: var(--bg); background: var(--bg); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .foot .button:hover { background: var(--accent-soft); --zig: var(--accent-soft); } }

/* ---------- narrower laptops: the sentence gets nine columns so its two lines hold, the note keeps the other three ---------- */
@media (max-width: 82.5em) {
  .ask__sentence { grid-column: 1 / 10; }
  .ask__side { grid-column: 10 / 13; }
}
@media (max-width: 62em) {
  .ask__sentence, .ask__side { grid-column: 1 / -1; }
}

/* ---------- tablet and phone ---------- */
@media (max-width: 56.25em) {
  .hero { grid-template-rows: auto auto auto; }
  .hero__copy { grid-column: 1 / -1; grid-row: 2; padding-top: 2.5rem; max-width: none; }
  .hero__copy h1 { font-size: clamp(2.1rem, 8.4vw, 4.25rem); }
  .lead { max-width: 34ch; }
  .stage { grid-column: 1 / -1; grid-row: 3; margin: 3rem calc(var(--margin) * -1) 0; padding: 2rem 0 0 var(--margin); min-height: 0; }
  .sim { width: 100%; padding: 1.4rem var(--margin) 1.6rem 1.4rem; min-height: 0; }
  .sim__ctl { grid-template-columns: 1fr; gap: 0.25rem; }
  .band__head { font-size: clamp(1.75rem, 7.2vw, 2.6rem); }
  .band__btn { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .band__pill { font-size: clamp(1.6rem, 6.4vw, 2.2rem); margin-top: 0.05em; }
  .band__sentence { max-width: 20ch; }
  .band__more { grid-column: 1 / -1; }
  .band__body { padding-bottom: 1.25rem; }
  .ask__sentence, .ask__side { grid-column: 1 / -1; }
  .ask__sentence { --fs: clamp(1.9rem, 8.4vw, 4.25rem); }
  .ask__input { min-width: calc(var(--fs) * 6.5); }
  .today { padding-left: var(--margin); }
  .shotbox { flex-basis: min(62vw, 17rem); }
  .foot__row { grid-template-columns: 1fr; justify-items: start; gap: 0.75rem; }
  .foot__act { justify-self: start; }
  .foot__mark { --mark-h: 24svh; }
  .foot__mark span { font-size: min(11.5vw, calc(var(--mark-h) * 0.76)); }
}

@media (max-width: 68.75em) {
  .shotbox { flex-basis: min(62vw, 17rem); }
  .hero { grid-template-rows: auto auto auto; }
  .hero__copy { grid-column: 1 / -1; grid-row: 2; padding-top: 2.5rem; max-width: none; }
  .lead, .status { max-width: 34ch; }
  .stage { grid-column: 1 / -1; grid-row: 3; margin: 3rem calc(var(--margin) * -1) 0; padding: 2rem 0 0 var(--margin); min-height: 0; }
  .sim { width: 100%; padding: 1.4rem var(--margin) 1.6rem 1.4rem; min-height: 0; }
}
@media (max-width: 68.75em) {
  .how .scene-stage { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(min(50svh, 24rem), auto); }
  .field { min-height: 0; padding-block: 1.5rem; gap: 1rem; }
  .field__title { max-width: 14ch; }
}
@media (max-width: 47.9375em) {
  .showcase .scene-stage { grid-template-columns: 1fr; padding-block: var(--gap-section); min-height: 0; row-gap: 3rem; }
  .show__list { grid-column: 1; margin: 0; }
  .months { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
  .show__field { grid-column: 1; height: auto; padding-block: 3.5rem; min-height: 0; display: grid; place-items: center; }
  .boleta { position: relative; left: auto; top: auto; translate: none; }
  .show__fact { grid-column: 1; max-width: none; }
  .how .scene-stage { display: flex; flex-direction: column; }
  .field { flex: none; padding-block: 2rem; gap: 1.5rem; }
  .field__title { position: static; max-width: 12ch; margin-bottom: 0.5rem; }
  .field .card { margin-block: 0; }
}

/* ---------- motion: everything is visible without it ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero [data-line], .js .ask [data-line] { transform: translateY(105%); }
  .js .hero .lines .line { overflow: hidden; }
  .js .hero [data-line] { animation: line-up 1000ms var(--ease-expo) forwards; animation-delay: calc(150ms + var(--i, 0) * 110ms); }
  .js .hero [data-load] { opacity: 0; transform: translateY(16px); animation: rise 650ms var(--ease-out) forwards; animation-delay: var(--d, 0ms); }
  .js .bar { opacity: 0; animation: rise 600ms var(--ease-out) 60ms forwards; }
  .js .stage[data-open] { clip-path: inset(100% 0 0 0); animation: open 1100ms var(--ease-in-out) 200ms forwards; }
  .js .stage[data-open] .sim { transform: translateY(40px); animation: rise-card 1000ms var(--ease-expo) 650ms forwards; }
  .js .stage[data-open] .bar-col__base { transform: scaleY(0); }
  .js .stage[data-open].is-bars .bar-col__base { transform: scaleY(var(--b, 0)); transition-duration: 800ms; transition-delay: calc(var(--k, 0) * 40ms); transition-timing-function: var(--ease-expo); }

  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .band .band__sentence { transform: translateY(24px); opacity: 0; transition: opacity 600ms var(--ease-out), transform 900ms var(--ease-expo), color 400ms ease; }
  .js .band.is-seen .band__sentence { transform: none; opacity: 1; }
  .js .band .band__pill { opacity: 0; transition: opacity 500ms ease 200ms, background-color 300ms ease, transform var(--t-press) var(--ease-out); }
  .js .band.is-seen .band__pill { opacity: 1; }
  .js .ask .ask__line { overflow: clip; padding-bottom: 0.12em; margin-bottom: -0.04em; }
  .js .ask.is-settled .ask__line { overflow: visible; }
  .js .ask .ask__line > [data-line] { transition: transform 1000ms var(--ease-expo); }
  .js .ask .ask__line:nth-child(2) > [data-line] { transition-delay: 120ms; }
  .js .ask.is-in .ask__line > [data-line] { transform: none; }
  .js .ask .ask__input, .js .ask .ask__button { opacity: 0; transform: translateY(0.2em); transition: opacity 600ms ease 400ms, transform 900ms var(--ease-expo) 400ms, background-color var(--t-ui) ease; }
  .js .ask.is-in .ask__input, .js .ask.is-in .ask__button { opacity: 1; transform: none; }
  .js .foot__mark span { transform: scaleY(0); }
  .js .foot.is-in .foot__mark span { transform: none; transition: transform 900ms var(--ease-expo); transition-delay: calc(var(--k, 0) * 70ms); }

  .bl__line, .bl__head, .bl__totalwrap { animation: print 560ms var(--ease-out) backwards; animation-delay: calc(var(--k, 0) * 55ms); }
  /* A message from the form is printed like a line of the boleta, and fades when it is no longer true. */
  .ask__msg { transition: opacity 200ms ease; }
  .ask__msg.is-on { animation: print 560ms var(--ease-out) backwards; }
  .ask__msg.is-leaving { opacity: 0; }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes rise-card { to { transform: none; } }
@keyframes open { to { clip-path: inset(-14px 0 0 0); } }
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-8px); } to { clip-path: inset(0); transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .bar-col__base, .bar-col__add, .band__fill, .show__field, .band__knob { transition: none; }
}
