/* Tinta landing. One layer; tokens follow DESIGN.md.
   The page is reception stationery: a pencil notebook, a permission sheet, a cash-close
   ticket and a receipt. Pencil is graphite, ink is the only blue, the highlighter is green. */
@font-face {
  font-family: Bitter;
  src: url('/fonts/bitter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #183e55;
  --ink-hover: #245b71;
  --ink-deep: #0f2c3e;
  --muted: #4d5559;
  --pencil: #687074;
  --line: #dcd8ce;
  --paper: #fff;
  --wash: #f4f2ec;
  --sheet: #fffefa;
  --rule-blue: #c4d6e2;
  --rule-red: #e0a69e;
  --accent: #d9edaa;
  --accent-hover: #e7f4c6;
  --on-ink: #fff;
  --on-ink-muted: #d0e1e5;
  --focus: #276a83;
  --scroll: #9aa3a6;
  --display: Bitter, Georgia, 'Times New Roman', serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-button: 7px;
  --radius-surface: 14px;
  --radius-dialog: 12px;
  --radius-paper: 4px;
  --gutter: max(5vw, 24px);
  --content: 1180px;
  --section: clamp(72px, 9vw, 120px);
  --header: 72px;
  --shadow-capture: 0 0 0 1px #183e5514, 0 14px 36px #183e551c;
  --shadow-paper-on-ink: 0 1px 2px #0000004d, 0 22px 44px #00000059;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); scrollbar-color: var(--scroll) var(--wash); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.7 var(--body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, figure, blockquote, ol, ul { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(3rem, 6.5vw, 6rem); line-height: 1.08; font-weight: 800; }
h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.16; }
h3 { font-size: 1.1875rem; line-height: 1.35; letter-spacing: -.005em; }
p, li, dd, figcaption, summary { text-wrap: pretty; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
/* The highlighter: marks the one number the owner should look at. */
mark { padding: 0 .12em; margin: 0 -.06em; background: linear-gradient(176deg, transparent 12%, var(--accent) 14% 88%, transparent 90%); color: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pencil { color: var(--pencil); font-weight: 400; }

.flow-enabled .step-name {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 14px; background: var(--paper); border-radius: var(--radius-button); box-shadow: 0 4px 16px #183e5526; transform: translateY(-200%); }
.skip:focus { transform: none; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 26px;
  background: var(--ink); color: var(--on-ink); border: 0; border-radius: var(--radius-button);
  font-size: 1rem; font-weight: 600; line-height: 1.4; text-align: center;
  transition: background-color .18s ease-out, box-shadow .18s ease-out;
}
.button:hover { background: var(--ink-hover); box-shadow: 0 6px 18px #183e551f; }
.button-small { min-height: 44px; padding: 10px 18px; font-size: .9375rem; }
.text-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--scroll); }
.text-link:hover { text-decoration-color: currentColor; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { max-width: calc(var(--content) + 2 * var(--gutter)); min-height: var(--header); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 40px; }
.brand { flex-shrink: 0; padding: 6px 0; }
.brand-wordmark { width: 123px; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: .9375rem; font-weight: 500; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.site-nav a:hover { text-decoration-line: underline; text-decoration-color: var(--line); }
.site-nav a[aria-current] { text-decoration-line: underline; text-decoration-color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; flex-shrink: 0; }
.header-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; font-size: .9375rem; font-weight: 500; }
.header-link svg { flex-shrink: 0; }
.header-link:hover { text-decoration: underline; text-underline-offset: 6px; }

/* Opening */
.opening { padding: clamp(56px, 7vw, 96px) var(--gutter); background: var(--wash); }
.intro { max-width: var(--content); margin: 0 auto clamp(56px, 7vw, 88px); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(40px, 5vw, 72px); align-items: center; }
.intro h1 { max-width: 11em; font-size: clamp(2.75rem, 4.8vw, 4.25rem); line-height: 1.06; }
.intro-copy { max-width: 32em; margin-top: 24px; font-size: 1.1875rem; line-height: 1.65; }
.intro-action { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 36px; }
.reassurance { font-size: .9375rem; font-weight: 600; }
.intro-help { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; font-size: .9375rem; text-wrap: balance; }
.requirements { max-width: 34em; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9375rem; line-height: 1.6; color: var(--muted); }
.hero-art { display: grid; justify-self: end; width: 100%; max-width: 500px; }
.hero-art .libreta { grid-area: 1 / 1; width: min(88%, 420px); margin-bottom: 64px; }
.origin-card { position: relative; z-index: 1; grid-area: 1 / 1; align-self: end; justify-self: end; width: min(86%, 430px); border-radius: var(--radius-dialog); box-shadow: 0 0 0 1px #183e5514, 0 18px 40px #183e5526; }
.hero-art figcaption { grid-area: 2 / 1; margin-top: 24px; font: 700 1.375rem/1.35 var(--display); letter-spacing: -.01em; color: var(--ink); }

.payment-guide { max-width: var(--content); margin: 0 auto; padding: clamp(24px, 3.5vw, 44px); background: var(--paper); border-radius: var(--radius-surface); }
.guide-heading { margin-bottom: 32px; }
.guide-heading h2 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); }
.payment-walkthrough { display: grid; gap: 40px; align-items: start; }
.flow-enabled { grid-template-columns: minmax(240px, .6fr) minmax(0, 1.4fr); }
.flow-tabs { display: flex; flex-direction: column; }
.flow-tabs button { display: flex; gap: 16px; align-items: flex-start; width: 100%; padding: 22px 12px 22px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); text-align: left; transition: color .18s ease; }
.flow-tabs button:last-child { border-bottom: 1px solid var(--line); }
.flow-tabs button:hover, .flow-tabs button[aria-selected="true"] { color: var(--ink); }
.flow-tabs button > span:last-child { min-width: 0; padding-top: 3px; }
.flow-number { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); font: 700 .9375rem/1 var(--display); font-variant-numeric: tabular-nums; }
[aria-selected="true"] .flow-number { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.flow-tabs strong { display: block; font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.flow-description { display: block; margin-top: 6px; font-size: .9375rem; line-height: 1.6; }
.flow-screens { display: grid; gap: 40px; min-width: 0; container-type: inline-size; }
.flow-screens > figure { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.flow-enabled .flow-screens { gap: 0; }
.flow-enabled .flow-screens > figure { grid-area: 1 / 1; }
.flow-enabled .flow-screens > [hidden] { display: flex !important; visibility: hidden; }
.flow-screens .capture { --pad: 24px; --strip: 52px; height: min(104cqw, 780px); background: var(--wash); border-radius: var(--radius-surface); }
.flow-screens .capture img { border-radius: var(--radius-dialog); box-shadow: var(--shadow-capture); }
/* The search step is a short window: show it at full stage width so its text reads at the same size as the other steps. */
#flow-search .capture img { width: calc(100% - 2 * var(--pad)); }
.flow-screens figcaption { display: flex; flex-direction: column; gap: 2px; }
.step-name { font-weight: 600; }
.capture-note { font-size: .8125rem; color: var(--muted); }
.guide-note { margin-top: 28px; font-size: .9375rem; color: var(--muted); }

/* Captures. Images sit centred in a fixed stage, so switching tabs never moves the page.
   The stage keeps a strip under the image for «Ver completa», so the label never covers the capture. */
.capture { position: relative; display: block; cursor: zoom-in; }
.flow-screens .capture img, .screen img {
  position: absolute; top: var(--pad); right: var(--pad); bottom: calc(var(--pad) + var(--strip)); left: var(--pad); margin: auto;
  width: auto; height: auto; max-width: calc(100% - 2 * var(--pad)); max-height: calc(100% - 2 * var(--pad) - var(--strip));
}
.enlarge { position: absolute; right: var(--pill, 16px); bottom: var(--pill, 16px); padding: 6px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-button); box-shadow: 0 2px 8px #183e5514; font-size: .8125rem; font-weight: 600; line-height: 1.4; transition: background-color .18s ease, color .18s ease; }
.capture:hover .enlarge { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

/* Origin */
.origin { padding: var(--section) var(--gutter); }
.origin-inner { max-width: var(--content); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.origin h2 { max-width: 12em; }
.libreta { height: auto; transform: rotate(-2.5deg); filter: drop-shadow(0 14px 28px #183e5517); }
.libreta .hoja { fill: var(--sheet); stroke: #e2ded3; }
.libreta .renglones line { stroke: var(--rule-blue); stroke-width: 1; }
.libreta .margen { stroke: var(--rule-red); stroke-width: 1.2; }
.libreta .espiral path { fill: none; stroke: #9a9f9f; stroke-width: 2.4; stroke-linecap: round; }
.libreta .lapiz path { fill: none; stroke: var(--pencil); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.libreta .lapiz .cifras path { stroke-width: 1.6; }
.libreta .smudge { fill: #c2c4c0; opacity: .45; filter: url(#lapiz-borron); }
.founder { max-width: 34em; }
.founder blockquote p { font-size: 1.3125rem; font-weight: 500; line-height: 1.55; quotes: '«' '»'; }
.founder blockquote p::before { content: open-quote; }
.founder blockquote p::after { content: close-quote; }
.founder figcaption { margin-top: 16px; font-size: .9375rem; font-weight: 600; }
/* The founder's own count: pencil for where it started, ink for where it is. */
.founder-record { max-width: 34em; margin: 36px 0 0; border-top: 1px solid var(--line); }
.founder-record div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.founder-record dt { font-size: .9375rem; color: var(--muted); }
.founder-record dd { margin: 0; font: 700 1.625rem/1.2 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.record-pencil dd { color: var(--pencil); font-weight: 400; }
.record-ink dd { color: var(--ink); font-weight: 800; }
.origin-libreta { max-width: 34em; margin-top: 28px; font-size: 1rem; color: var(--muted); }

/* Gallery */
.gallery { padding: var(--section) var(--gutter); border-top: 1px solid var(--line); }
.gallery-inner { max-width: var(--content); margin: 0 auto; }
.section-heading p { max-width: 36em; margin-top: 16px; font-size: 1.0625rem; color: var(--muted); }
.tabs { display: flex; gap: 32px; margin-top: 40px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px var(--line); }
.tabs button { position: relative; min-width: 44px; min-height: 48px; padding: 12px 0; border: 0; background: none; color: var(--muted); font-size: 1rem; font-weight: 600; white-space: nowrap; }
.tabs button:hover, .tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ink); }
.tabs button:focus-visible { outline-offset: -3px; }
.product-panels { display: grid; gap: 56px; margin-top: 32px; container-type: inline-size; }
.tabs-enabled .product-panels { gap: 0; }
.tabs-enabled .product-panel { grid-area: 1 / 1; }
.tabs-enabled .product-panel[hidden] { display: flex !important; visibility: hidden; }
.product-panel { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.screen { --pad: 0px; --strip: 52px; --pill: 0px; height: calc(100cqw * .625 + 52px); }
.screen img { border-radius: var(--radius-surface); box-shadow: var(--shadow-capture); }
.product-panel figcaption { max-width: 62ch; font-size: 1.0625rem; color: var(--ink); }
.product-panel .capture-note { display: block; margin-top: 4px; }

/* Control of the front desk: paper objects on the ink desk. Example data, drawn, not captured. */
.control { padding: var(--section) var(--gutter); background: var(--ink); color: var(--on-ink); }
.control-inner { max-width: var(--content); margin: 0 auto; }
.control .section-heading h2 { max-width: 17em; font-size: clamp(2.125rem, 3.8vw, 3.375rem); }
.control .section-heading p { max-width: 34em; color: var(--on-ink-muted); }
.control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 6vw, 88px); margin-top: 64px; }
/* Object, heading and text share rows across both columns, so the headings line up. */
.control-item { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
.control-item h3 { margin-top: 32px; font-size: 1.375rem; color: var(--on-ink); }
.control-item > p { max-width: 32em; margin-top: 10px; font-size: 1.0625rem; color: var(--on-ink-muted); }
.control-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.control-stage > .sheet, .control-stage > .ticket-wrap { margin-block: auto; }
.control-stage figcaption { font-size: .8125rem; color: var(--on-ink-muted); }
.sheet { width: 100%; padding: 22px 24px 24px; background: var(--sheet); color: var(--ink); }
.permit-sheet { max-width: 400px; border-radius: var(--radius-paper); box-shadow: var(--shadow-paper-on-ink); transform: rotate(-1.2deg); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--scroll); }
.sheet-head p { font: 700 1.125rem/1.3 var(--display); }
.sheet-head span { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.permit-list { margin-top: 4px; padding: 0; list-style: none; }
.permit-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .9375rem; line-height: 1.4; }
.permit-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.state { flex-shrink: 0; min-width: 44px; padding: 2px 10px; border: 1px solid var(--line); border-radius: var(--radius-button); font-size: .8125rem; font-weight: 600; text-align: center; color: var(--muted); }
.state.is-on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ticket-wrap { width: 100%; max-width: 360px; transform: rotate(1.4deg); filter: drop-shadow(0 1px 2px #0000004d) drop-shadow(0 22px 40px #00000052); }
.cut-ticket {
  --tooth: 8px;
  padding-bottom: calc(22px + var(--tooth)); border-radius: var(--radius-paper) var(--radius-paper) 0 0;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x;
}
.cut-rows { margin: 6px 0 0; }
.cut-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .9375rem; }
.cut-rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.cut-rows .cut-diff { margin-top: 8px; padding-top: 12px; border-top: 3px double var(--ink); border-bottom: 0; }
.cut-diff dt { font-weight: 600; }
.cut-diff dd { font: 800 1.75rem/1 var(--display); font-variant-numeric: tabular-nums; }
.cut-note { margin-top: 14px; padding: 10px 12px; background: var(--wash); border-radius: var(--radius-button); font-size: .9375rem; line-height: 1.5; }
.cut-note span { display: block; font-size: .8125rem; font-weight: 600; color: var(--muted); }

/* Owner on the phone */
.remote { padding: var(--section) var(--gutter); }
.remote-inner { max-width: var(--content); margin: 0 auto; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(48px, 8vw, 112px); align-items: center; }
.remote-copy { order: 2; }
.remote-copy p { max-width: 34em; margin-top: 24px; font-size: 1.0625rem; }
.remote .secondary { font-size: 1rem; color: var(--muted); }
.mobile-screen { order: 1; width: 100%; max-width: 300px; }
.mobile-screen img { width: 100%; border-radius: 28px; box-shadow: 0 0 0 1px #183e551f, 0 20px 44px #183e5524; }
.mobile-screen figcaption { margin-top: 16px; text-align: center; font-size: .8125rem; color: var(--muted); }
.control :focus-visible { outline-color: var(--accent); }

/* Price, as a receipt */
.pricing { padding: var(--section) var(--gutter); background: var(--wash); }
.pricing-inner { max-width: var(--content); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(40px, 6vw, 96px); align-items: start; }
.price-figure { font-weight: 800; font-variant-numeric: tabular-nums; }
.heading-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-size: .9375rem; }
@media (min-width: 961px) {
  .pricing-inner > .section-heading { position: sticky; top: calc(var(--header) + 40px); }
}
.receipt-wrap { filter: drop-shadow(0 1px 1px #183e5514) drop-shadow(0 16px 32px #183e551a); }
.receipt {
  --tooth: 9px;
  padding: 32px 36px calc(36px + var(--tooth)); background: var(--sheet); border-radius: var(--radius-paper) var(--radius-paper) 0 0;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x;
}
.receipt-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px dashed var(--scroll); }
.receipt-head img { width: 86px; }
.receipt-head span { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.receipt-group { margin-top: 20px; }
.receipt-label { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.receipt-items { margin-top: 2px; padding: 0; list-style: none; }
.receipt-items li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .9375rem; line-height: 1.5; }
.receipt-items .value { flex-shrink: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.receipt-items .is-included { font-weight: 400; color: var(--muted); }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 3px double var(--ink); }
.receipt-total span { font-weight: 600; }
.receipt-total p { color: var(--muted); }
.receipt-total strong { font: 800 3.25rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.annual { margin-top: 12px; text-align: right; font-size: .9375rem; color: var(--muted); }
.annual strong { font-weight: 600; color: var(--ink); }
.receipt .button { width: 100%; margin-top: 28px; }
.receipt-terms { display: grid; gap: 6px; margin-top: 20px; padding: 0; list-style: none; font-size: .9375rem; line-height: 1.5; color: var(--muted); }

/* Getting started: the owner's to-do sheet, ruled like the notebook. */
.setup { padding: var(--section) var(--gutter); }
.setup-inner { max-width: var(--content); margin: 0 auto; }
.setup .section-heading h2 { max-width: 14em; }
.todo { --margin: 64px; position: relative; max-width: 780px; margin: 48px 0 32px; padding: 10px 32px 10px var(--margin); list-style: none; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-paper); box-shadow: 0 10px 28px #183e5512; }
.todo::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--margin) - 22px); width: 1.5px; background: var(--rule-red); }
.todo li { position: relative; padding: 20px 0 18px; border-bottom: 1px solid var(--rule-blue); }
.todo li:last-child { border-bottom: 0; }
.todo li::before { content: ""; position: absolute; top: 25px; left: calc(-1 * var(--margin) + 12px); width: 18px; height: 18px; border: 1.75px solid var(--pencil); border-radius: var(--radius-paper); transform: rotate(-3deg); }
.todo h3 { font-size: 1.1875rem; }
.todo p { margin-top: 4px; font-size: 1rem; color: var(--muted); }
.setup-inner > .text-link { display: inline-flex; align-items: center; min-height: 44px; }

/* Questions */
.faq { padding: var(--section) var(--gutter); background: var(--wash); }
.faq-inner { max-width: 860px; margin: 0 auto; }
.faq-list { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 64px; padding: 18px 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.5; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 14px; height: 14px; background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat; }
.faq details[open] summary::after { background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat; }
.faq summary:hover { color: var(--focus); }
.faq details p { max-width: 65ch; padding: 0 40px 24px 0; font-size: 1rem; color: var(--muted); }

/* Closing: the anchor phrase written on the notebook page, first in pencil, then in ink. */
.closing { --margin-x: calc(max(var(--gutter), (100% - var(--content)) / 2) - 28px); padding: var(--section) var(--gutter); background: var(--sheet) linear-gradient(90deg, transparent calc(var(--margin-x) - 1px), var(--rule-red) calc(var(--margin-x) - 1px) calc(var(--margin-x) + 1px), transparent calc(var(--margin-x) + 1px)); border-top: 1px solid var(--line); }
.closing-inner { max-width: var(--content); margin: 0 auto; }
.closing h2 {
  --rule-at: .77lh; /* Bitter baseline sits at .754lh with line-height 1.3: the words rest on the rule. */
  max-width: 12em; font-size: clamp(2.5rem, 5.5vw, 4.75rem); line-height: 1.3;
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule-at) - 1px), var(--rule-blue) calc(var(--rule-at) - 1px) var(--rule-at), transparent var(--rule-at) 1lh);
}
.closing h2 .pencil, .closing h2 .ink { display: block; }
.closing h2 .ink { font-weight: 800; }
.closing p { max-width: 34em; margin-top: 28px; font-size: 1.1875rem; color: var(--muted); }
.closing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 36px; }
.closing .text-link { display: inline-flex; align-items: center; min-height: 44px; }

/* Footer */
.site-footer { padding: 28px var(--gutter); font-size: .875rem; border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--content); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
.site-footer p { line-height: 1.6; }
.site-footer p span { color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; margin-inline: -10px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
.site-footer nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

.mobile-cta { display: none; }

/* Screenshot preview: whole capture first, real size on demand. */
dialog { padding: 0; border: 0; border-radius: var(--radius-dialog); background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px #0f293b55; }
dialog::backdrop { background: #0d293bd9; }
dialog[open] { display: flex; flex-direction: column; }
#screen-preview { width: min(1440px, calc(100% - 24px)); height: calc(100dvh - 24px); max-width: none; max-height: none; overflow: hidden; }
.preview-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.preview-top p { min-width: 0; overflow: hidden; font-size: .9375rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.preview-controls { display: flex; gap: 8px; flex-shrink: 0; }
.preview-controls button { min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius-button); background: var(--paper); font-size: .9375rem; font-weight: 600; }
.preview-controls button:hover { background: var(--wash); }
.preview-instruction { padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.preview-viewport { flex: 1 1 auto; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 16px; overflow: auto; overscroll-behavior: contain; background: var(--wash); scrollbar-color: var(--scroll) var(--wash); }
.preview-viewport .preview-image { width: 100%; height: 100%; margin: 0; object-fit: scale-down; }
.preview-image.can-zoom { cursor: zoom-in; }
.is-zoomed .preview-viewport { display: block; }
.is-zoomed .preview-viewport .preview-image { height: auto; max-width: none; margin-inline: auto; object-fit: fill; }
.preview-viewport:focus-visible { outline-offset: -3px; }
.preview-original { padding: 0 18px; border-top: 1px solid var(--line); font-size: .875rem; }
.preview-original a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 1100px) {
  .header-inner { gap: 28px; }
  .site-nav { gap: 22px; }
  .header-whatsapp span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}

@media (max-width: 960px) {
  html { scroll-padding-top: 16px; }
  .site-header { position: relative; }
  .header-inner { flex-wrap: wrap; row-gap: 0; }
  .site-nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); gap: 24px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
  .site-nav a { flex-shrink: 0; font-size: .875rem; }
  .pricing-inner { grid-template-columns: minmax(0, 1fr); }
  .pricing-inner .receipt-wrap { max-width: 540px; }
  .remote-inner { grid-template-columns: 260px minmax(0, 1fr); }
}

@media (max-width: 800px) {
  :root { --header: 64px; }
  /* On a phone the notebook comes right after the promise, before the buttons. */
  .intro { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .intro-text { display: contents; }
  .intro h1 { order: 1; }
  .intro-copy { order: 2; }
  .hero-art { order: 3; justify-self: auto; align-self: center; max-width: 300px; margin-top: 32px; }
  .hero-art .libreta { margin-bottom: 48px; }
  .hero-art figcaption { font-size: 1.1875rem; margin-top: 18px; }
  .intro-action { order: 4; }
  .intro-help { order: 5; align-self: flex-start; }
  .requirements { order: 6; }
  .payment-walkthrough.flow-enabled { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .flow-tabs button { padding: 14px 0; }
  .flow-description { display: none; }
  .flow-tabs [aria-selected="true"] .flow-description { display: block; }
  .origin-inner { grid-template-columns: minmax(0, 1fr); }
  .remote-inner { grid-template-columns: minmax(0, 1fr); }
  .remote-copy { order: 1; }
  .mobile-screen { order: 2; justify-self: center; max-width: 280px; }
  .control-grid { grid-template-columns: minmax(0, 1fr); margin-top: 48px; }
  .control-item + .control-item { margin-top: 64px; }
  .permit-sheet, .ticket-wrap { transform: none; }

  .mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--paper);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px #183e5514;
    transform: translateY(110%); visibility: hidden;
    transition: transform .25s ease-out, visibility 0s linear .25s;
  }
  .mobile-cta.is-visible { transform: none; visibility: visible; transition: transform .25s ease-out, visibility 0s; }
  .mobile-cta .button { flex: 1; min-height: 50px; }
  .mobile-cta-whatsapp { display: grid; place-items: center; flex: 0 0 50px; height: 50px; border: 1px solid var(--line); border-radius: var(--radius-button); }
}

@media (max-width: 640px) {
  /* Phone crops differ in height; under the tabs a height change only moves what follows. */
  .tabs-enabled .product-panel[hidden] { display: none !important; }
  .screen { height: auto; padding-bottom: var(--strip); }
  .screen img { position: static; width: 100%; max-width: 100%; max-height: none; margin: 0; border-radius: var(--radius-dialog); }
}

@media (max-width: 540px) {
  :root { --gutter: 20px; }
  h1 { font-size: 3rem; }
  .intro h1 { font-size: 2.5rem; }
  .intro-copy { margin-top: 20px; font-size: 1.0625rem; }
  h2 { font-size: 2rem; }
  .control .section-heading h2 { font-size: 2.125rem; }
  .sheet { padding: 18px 18px 20px; }
  .cut-ticket { padding-bottom: calc(20px + var(--tooth)); }
  .brand-wordmark { width: 106px; }
  .header-inner { gap: 12px; }
  .header-actions { gap: 4px; }
  .header-actions .button { display: none; }
  .header-login { padding: 0 8px; }
  .intro-action .button { width: 100%; }
  .payment-guide { margin-inline: calc(-1 * var(--gutter)); padding: 28px var(--gutter); border-radius: 0; }
  .guide-heading h2 { font-size: 1.75rem; }
  .flow-screens .capture { --pad: 10px; --strip: 46px; --pill: 10px; }
  .site-nav { gap: 18px; }
  .tabs { gap: 24px; }
  .receipt { padding: 24px 20px calc(28px + var(--tooth)); }
  .receipt-total strong { font-size: 2.75rem; }
  .todo { --margin: 48px; padding-right: 18px; margin-inline: calc(-1 * var(--gutter) + 8px); }
  .todo li::before { left: calc(-1 * var(--margin) + 8px); }
  .faq details p { padding-right: 0; }
  .closing { --margin-x: 12px; }
  .closing h2 { font-size: 2.5rem; }
  .closing-actions .button { width: 100%; }
  #screen-preview { width: calc(100% - 16px); height: calc(100dvh - 16px); }
  .preview-top { padding-inline: 12px 8px; }
  .preview-top p { font-size: .8125rem; white-space: normal; }
  .preview-controls button { padding: 8px 12px; }
  .preview-viewport { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
