/* Sondeia v1.1 (12 Nov 2026; tasks/todo-2026-11-12-sondeia-fase-seguinte.md, B): the recorder is the first screen,
   the slip feeds it, and the diagnosis prints out below. One family (Archivo: wide for headings, narrow for labels),
   ink on paper, one signal colour, the recorder pen's red, kept for "named". */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-wdth.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #EEE9DD;
  --sheet: #F7F4EC;
  --ink: #1D1B16;
  --ink-2: #4A453B;
  --muted: #625C50;          /* 5.6:1 on paper */
  --grid: #DED6C5;
  --grid-major: #CBBFA6;
  --pen: #C2361C;            /* 4.6:1 on paper: text-safe */
  --focus: #1D1B16;
  --gutter: 16px;
  --measure: 34rem;
  --trace-from: 0;           /* where the pens' paper starts, as a share of the chart's width (read by sondeia.js) */
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-stretch: 100%;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; min-height: 100vh; line-height: 1.55; font-size: 17px; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--pen); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 10; }
.skip:focus { top: 10px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* Labels: the narrow cut in capitals, like the legends on an instrument's dial */
.label {
  font-stretch: 68%; font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.label-pen { color: var(--pen); }

/* ---------- header ---------- */
.top { border-bottom: 1px solid var(--grid-major); background: var(--paper); position: relative; z-index: 2; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 34px; height: 22px; }
.brand span { font-stretch: 125%; font-weight: 750; font-size: 21px; letter-spacing: -0.02em; }
.top nav { display: flex; align-items: center; gap: 22px; }
.top nav a.quiet { display: none; text-decoration: none; font-stretch: 75%; font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.top nav a.quiet:hover { text-decoration: underline; text-decoration-color: var(--pen); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1.5px solid var(--ink); border-radius: 2px;
  background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
  font: inherit; font-stretch: 85%; font-weight: 650; font-size: 16px; letter-spacing: 0.02em;
}
.btn:hover { background: #000; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- hero: the chart roll, the question, the slip ---------- */
.hero { position: relative; }
.chart { position: relative; height: 172px; border-bottom: 1px solid var(--grid-major); background: var(--sheet); overflow: hidden; }
.chart canvas { width: 100%; height: 100%; }
/* The channel names sit on the pens' lanes, at the edge where the chart paper starts. */
.chart-legend { position: absolute; inset: 0 auto 0 calc(var(--trace-from) * 100%); pointer-events: none; }
/* Each name just above its pen's resting line (sondeia.js lane(): (i + 0.62) / 3 of the height). */
.chart-legend span {
  position: absolute; left: 0; white-space: nowrap; padding: 2px 8px; background: var(--sheet); border: 1px solid var(--grid-major); border-left: 0;
  font-stretch: 68%; font-weight: 600; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
}
.chart-legend span:nth-child(1) { top: calc(20.7% - 25px); }
.chart-legend span:nth-child(2) { top: calc(54% - 25px); }
.chart-legend span:nth-child(3) { top: calc(87.3% - 25px); }
.chart-tag { position: absolute; right: 10px; top: 8px; margin: 0; display: flex; gap: 12px; padding: 2px 6px; background: var(--sheet); border: 1px solid var(--grid-major); pointer-events: none; }
.chart-tag .label { font-size: 11.5px; }

.hero-grid { display: grid; gap: 20px; padding-top: 20px; padding-bottom: 36px; position: relative; }
.hero h1 {
  font-stretch: 118%; font-weight: 780; letter-spacing: -0.035em; line-height: 0.98;
  font-size: clamp(34px, 8.4vw, 62px); margin: 10px 0 14px; text-wrap: balance;
}
.hero h1 em { font-style: normal; box-shadow: inset 0 -0.14em 0 var(--pen); }
.lede { font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: var(--measure); margin: 0; text-wrap: pretty; }

/* The request slip: a form torn off a pad, perforation on top */
.slip {
  position: relative; background: var(--sheet); border: 1px solid var(--grid-major); border-top: 0;
  padding: 22px 18px 20px; max-width: 560px;
}
.slip::before {
  content: ''; position: absolute; left: -1px; right: -1px; top: -8px; height: 8px;
  background: radial-gradient(circle at 6px 8px, var(--paper) 3.2px, var(--sheet) 3.6px) -2px 0 / 12px 8px repeat-x;
  border-left: 1px solid var(--grid-major); border-right: 1px solid var(--grid-major);
}
.slip-head { display: flex; flex-direction: column-reverse; gap: 4px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--grid-major); }
.slip-head h2 { margin: 0; font-stretch: 100%; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.slip > .btn, #step-two .btn { width: 100%; }
#step-two { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--grid-major); }
#step-two.arriving { animation: feed 0.32s ease-out; }
@keyframes feed { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field label { font-stretch: 68%; font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); padding: 0; }
.field input[type="text"], .field input[type="email"], .field select {
  width: 100%; min-height: 48px; padding: 10px 2px 8px; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink); font: inherit; font-size: 18px; font-weight: 500;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 14px) 22px, calc(100% - 8px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 28px; }
.field input::placeholder { color: #9A9283; font-weight: 400; }
.field input:focus, .field select:focus { outline: none; border-bottom-color: var(--pen); box-shadow: 0 1.5px 0 var(--pen); }
.field input[aria-invalid="true"] { border-bottom-color: var(--pen); }
.swap { font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; justify-self: start; }
.err { color: var(--pen); font-size: 14px; font-weight: 600; margin: 4px 0 0; }
.err:empty { display: none; }

.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 4px 0 16px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.fine { font-size: 13.5px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* The receipt that replaces the slip */
.receipt { border: 1.5px solid var(--ink); background: var(--sheet); padding: 22px 20px; max-width: 560px; }
.receipt h2 { margin: 6px 0 10px; font-stretch: 110%; font-weight: 750; font-size: 26px; letter-spacing: -0.02em; }
.receipt p { margin: 0 0 8px; color: var(--ink-2); }
.stamp { display: inline-block; border: 1.5px solid var(--pen); color: var(--pen); padding: 3px 8px; transform: rotate(-2deg); font-stretch: 68%; font-weight: 700; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- sections ---------- */
.band { border-top: 1px solid var(--grid-major); padding: 48px 0; position: relative; }
.band h2.title { font-stretch: 118%; font-weight: 760; letter-spacing: -0.03em; line-height: 1.02; font-size: clamp(30px, 5.6vw, 48px); margin: 10px 0 16px; max-width: 18ch; text-wrap: balance; }

/* The example diagnosis: the intro and the steps, then the printout */
.print-grid { display: grid; gap: 28px; }
.print-intro > p { margin: 0 0 18px; color: var(--ink-2); max-width: var(--measure); font-size: 18px; }
.timeline { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: t; border-left: 1.5px solid var(--ink); }
.timeline li { counter-increment: t; position: relative; padding: 0 0 12px 22px; color: var(--ink-2); }
.timeline li::before { content: counter(t); position: absolute; left: -9px; top: 1px; width: 17px; height: 17px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); font-stretch: 68%; font-weight: 700; font-size: 11px; line-height: 14px; text-align: center; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { background: var(--pen); border-color: var(--pen); color: var(--sheet); }
.timeline b { color: var(--ink); }

.printout {
  position: relative; background: var(--sheet); border: 1px solid var(--grid-major); padding: 22px 18px 18px;
  box-shadow: 0 1px 0 var(--grid-major), 0 18px 32px -24px rgba(29, 27, 22, 0.35);
}
/* Torn off the roll at the top */
.printout::before {
  content: ''; position: absolute; left: -1px; right: -1px; top: -7px; height: 8px;
  background: linear-gradient(135deg, transparent 5px, var(--sheet) 5px) 0 0 / 10px 8px repeat-x, linear-gradient(225deg, transparent 5px, var(--sheet) 5px) 0 0 / 10px 8px repeat-x;
}
/* Fed out of the recorder once, when it scrolls into view (sondeia.js); without script it simply shows. */
.js .printout.waiting { clip-path: inset(0 0 100% 0); }
.js .printout.fed { clip-path: inset(0 0 0 0); transition: clip-path 1.6s steps(24, end); }
@media (prefers-reduced-motion: reduce) { .js .printout.waiting { clip-path: none; } .js .printout.fed { transition: none; } }

.pr-head { border-bottom: 1.5px solid var(--ink); padding-bottom: 12px; }
.pr-head .label { margin: 0; }
.pr-head h3 { margin: 6px 0 4px; font-stretch: 110%; font-weight: 760; font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; }
.pr-meta { margin: 0; color: var(--muted); font-size: 14.5px; }
.pr-part { padding: 16px 0; border-bottom: 1px dashed var(--grid-major); }
.pr-part h4 { margin: 0 0 10px; font-stretch: 100%; font-weight: 700; font-size: 17px; }
.n { font-stretch: 68%; font-weight: 700; font-size: 13px; letter-spacing: 0.12em; color: var(--pen); margin-right: 4px; }
.pr-qs { margin: 0; padding-left: 26px; color: var(--ink-2); font-size: 15.5px; }
.pr-qs li { padding: 2px 0; }
.pr-qs li::marker { font-stretch: 68%; font-weight: 600; color: var(--muted); }
.pr-qs .more { display: none; }
.pr-qs::after { content: '+ 3 more questions'; display: block; margin: 4px 0 0 -26px; font-stretch: 68%; font-weight: 600; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.pr-grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.pr-grid th { font-stretch: 68%; font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 4px 6px; text-align: center; }
.pr-grid tbody th { text-align: left; color: var(--ink-2); width: 3.2em; }
.pr-grid td { text-align: center; padding: 5px 6px; border-top: 1px solid var(--grid); }
.pr-grid i { display: inline-block; vertical-align: middle; overflow: hidden; white-space: nowrap; text-indent: 120%; }
.pr-grid i.no { width: 14px; height: 1.5px; background: var(--grid-major); }
.pr-grid i.yes { width: 12px; height: 12px; border-radius: 50%; background: var(--pen); box-shadow: 0 0 0 3px var(--sheet), 0 0 0 4px var(--pen); }
.pr-count { margin: 12px 0 0; font-stretch: 100%; font-weight: 750; font-size: 22px; letter-spacing: -0.02em; }
.pr-count b { color: var(--pen); }

.pr-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pr-bars li { display: grid; grid-template-columns: 9.5em 1fr 1.6em; gap: 10px; align-items: center; font-size: 14.5px; color: var(--ink-2); }
.pr-bars .bar { height: 10px; background: linear-gradient(var(--ink), var(--ink)) 0 0 / calc(var(--v) / 9 * 100%) 100% no-repeat; border-bottom: 1px solid var(--grid); }
/* The counts as classes: the site's CSP allows no inline styles (_headers). */
.v9 { --v: 9; } .v6 { --v: 6; } .v5 { --v: 5; } .v1 { --v: 1; }
.pr-bars .bar-pen { background-image: linear-gradient(var(--pen), var(--pen)); }
.pr-bars b { text-align: right; font-weight: 650; color: var(--ink); }
.pr-note { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.pr-fix { position: relative; border-bottom: 0; }
.pr-fix p { margin: 0; color: var(--ink); font-size: 16px; max-width: 36rem; }
.pr-fix .stamp { position: absolute; right: 0; top: 12px; transform: rotate(4deg); }
.pr-foot { border-top: 1.5px solid var(--ink); padding-top: 10px; margin-top: 4px; }

/* Questions, with the note on what comes next */
.faq-grid { display: grid; gap: 18px; }
.next-note { margin: 0; color: var(--ink-2); max-width: 30rem; }
.faq { border-top: 1.5px solid var(--ink); max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--grid-major); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px 0; cursor: pointer; list-style: none; font-weight: 650; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 12px; height: 12px; flex: none; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { margin: 0 0 16px; color: var(--ink-2); max-width: 40rem; }

/* On a phone, the lines the printout and the slip already say are left out: the page stays short. */
@media (max-width: 719px) {
  .band { padding: 40px 0; }
  .print-intro > p, .print-intro .btn, .pr-note, .next-note { display: none; }
  .timeline { margin-bottom: 0; }
  .pr-grid td { padding: 3px 6px; }
  .pr-part { padding: 13px 0; }
  .faq summary { padding: 13px 0; }
}

/* The pen's trace down the margin, drawn as the page scrolls (sondeia.js; wide screens only) */
.trace { position: absolute; top: 0; left: 0; width: 24px; pointer-events: none; display: none; overflow: visible; }
.trace path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.trace circle { fill: var(--pen); }

/* ---------- footer ---------- */
.foot { border-top: 1.5px solid var(--ink); padding: 26px 0 36px; font-size: 15px; }
.foot .wrap { display: grid; gap: 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot p { margin: 0; color: var(--muted); }

/* ---------- the privacy notice and the 404 ---------- */
.doc { padding: 40px 0 64px; }
.doc h1 { font-stretch: 118%; font-weight: 780; letter-spacing: -0.03em; font-size: clamp(34px, 7vw, 56px); line-height: 1; margin: 12px 0 10px; }
.doc h2 { font-stretch: 100%; font-weight: 700; font-size: 21px; margin: 34px 0 8px; }
.doc p, .doc li { color: var(--ink-2); max-width: 42rem; }
.doc ul { padding-left: 20px; }

@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .top nav a.quiet { display: inline; }
  .chart { height: 240px; }
  .slip { padding: 26px 26px 24px; }
  .slip-head { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
  .slip > .btn, #step-two .btn { width: auto; }
  .lede { font-size: 19px; }
  .printout { padding: 28px 30px 22px; }
  .pr-qs .more { display: list-item; }
  .pr-qs::after { content: none; }
}

@media (min-width: 980px) {
  :root { --gutter: 40px; --trace-from: 0.53; }
  /* The roll fills the first screen; the pens draw on its right part, the copy and the slip sit on the left. */
  .hero { min-height: clamp(620px, calc(100vh - 61px), 800px); display: flex; }
  .chart { position: absolute; inset: 0; height: auto; border-bottom: 1px solid var(--grid-major); background: var(--paper); }
  .chart-tag { right: 40px; top: 18px; }
  .hero-grid { grid-template-columns: minmax(0, 0.47fr) minmax(0, 0.53fr); align-content: center; padding-top: 40px; padding-bottom: 48px; gap: 26px 0; }
  .hero-copy, #request { grid-column: 1; padding-right: 48px; }
  .hero h1 { font-size: clamp(46px, 4.4vw, 62px); }
  .print-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
  .print-intro { position: sticky; top: 32px; }
  .faq-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; }
  .trace { display: block; }
}
