/* "How buying works" (src/pages/how.js). Shared parts come from parts.css; colours are tokens
   from site.css only. The page is long and read carefully, often on a phone by older eyes: text
   stays at 1.05rem or more, lines stay short, and "what you can check" carries the visual weight. */

/* ---------- head */
.how-head__title { max-width: 26ch; }
.how-head__asof { margin-top: 1.3rem; font-weight: 650; color: var(--ink); }
.how-head__fx { margin-top: 0.35rem; max-width: 44rem; font-size: 0.98rem; color: var(--ink-soft); }
.how-note {
  margin-top: 1.6rem; max-width: 44rem; padding: 1rem 1.3rem 1.15rem;
  background: var(--card); border: 2px dashed var(--coral-deep); border-radius: 6px 16px 8px 18px;
}
.how-note__label { font-family: var(--font-hand); font-weight: 700; font-size: 1.55rem; line-height: 1.1; color: var(--coral-deep); }
.how-note__text { margin-top: 0.3rem; font-size: 1.06rem; line-height: 1.6; }

/* ---------- the road at a glance: the seven step titles as jump links */
.how-overview { padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(2.5rem, 6vw, 4rem); }
.how-overview__title { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-bottom: 1.3rem; }
.how-road {
  list-style: none; margin: 0; padding: 0;
  columns: 2 22rem; column-gap: 2.5rem;
}
.how-road__stop { break-inside: avoid; padding-bottom: 0.45rem; }
.how-road__link {
  display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.55rem 0.75rem;
  color: var(--ink); text-decoration: none;
  border: 1.5px solid transparent; border-radius: var(--wobble);
}
.how-road__link:hover { color: var(--ink); background: var(--card); border-color: var(--ink); }
.how-road__n {
  display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  background: var(--gold); border: 2px solid var(--ink); border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%;
}
.how-road__text {
  padding-top: 0.3rem; font-size: 1.1rem; line-height: 1.4; font-weight: 550;
  text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}

/* The drawing of the seven steps goes right after .how-road, inside the same .wrap
   (<div class="drawing" data-scene="…">): the full width of the text column, a wide shape, taller on
   a phone. */
.how-overview .how-road + .drawing { margin: clamp(1.6rem, 4vw, 2.6rem) 0 0; width: 100%; }
/* the drawing's shape comes from drawing.css (.drawing--how: 7:2, 3:2 on a tablet, 1:2.7 on a phone),
   because the scene lays its seven stations out differently for each shape */

/* ---------- the steps (the shared .steps / .step block, made roomier) */
.how-steps-section { padding-top: 0; }
.how-steps { gap: clamp(3rem, 7vw, 4.5rem); }
.how-step__title { font-size: clamp(1.55rem, 2.6vw, 2.05rem); margin-bottom: 1.3rem; padding-top: 0.15rem; }
.how-step__label {
  display: block; margin-bottom: 0.4rem;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-deep);
}
/* one column (2026-11-17): what the buyer can check first, then "What happens", folded (the step's
   plain line already says it in short) */
.how-step__body {
  display: grid; grid-template-columns: minmax(0, 1fr); max-width: 52rem;
  gap: 1.2rem; align-items: start;
}
.how-step__body > .how-what { order: 2; }

/* what happens: plain reading text, under its own fold */
/* every fold title is a 44 px target (WCAG 2.5.5, as the rest of the site) */
.how-what__summary { cursor: pointer; list-style: none; min-height: 2.75rem; padding-block: 0.45rem; }
.how-what__summary::-webkit-details-marker { display: none; }
.how-what__summary::before { content: "+"; margin-right: 0.5rem; font-weight: 700; font-size: 1.2rem; color: var(--gold-deep); }
.how-what[open] > .how-what__summary::before { content: "−"; }
.how-what__title {
  display: inline;
  font-family: var(--font-body); font-size: 0.86rem; font-weight: 650; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-soft);
}
.how-what[open] > .how-what__summary { margin-bottom: 0.75rem; }
.how-what__list, .how-check__list, .how-sheet__list, .how-state__list { list-style: none; margin: 0; padding: 0; display: grid; }
.how-what__list { gap: 1rem; font-size: 1.07rem; line-height: 1.68; }
.how-what__item:not(.gap-note) { position: relative; padding-left: 1.2rem; }
.how-what__item:not(.gap-note)::before {
  content: ""; position: absolute; left: 0; top: 0.8em; width: 0.6rem; height: 2.5px;
  background: var(--gold); border-radius: 2px;
}

/* what you can check: the reader's own protection, so it gets the card, the shadow and the boxes */
.how-check {
  padding: 1.3rem 1.4rem 1.45rem;
  background: color-mix(in srgb, var(--gold-light) 18%, var(--card));
  border: 2px solid var(--ink); border-radius: var(--wobble); box-shadow: 5px 6px 0 var(--gold);
}
.how-check__title { display: flex; align-items: center; gap: 0.55rem; font-size: 1.35rem; margin-bottom: 0.9rem; }
.how-check__icon {
  width: 1.75rem; height: 1.75rem; flex: none; overflow: visible;
  fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.how-check__icon path + path { stroke: var(--gold-deep); stroke-width: 3.2; }
.how-check__list { gap: 1rem; font-size: 1.08rem; line-height: 1.62; font-weight: 500; }
.how-check__item:not(.gap-note) { position: relative; padding-left: 2.1rem; }
.how-check__item:not(.gap-note)::before {
  content: ""; position: absolute; left: 0; top: 0.22em; width: 1.2rem; height: 1.2rem;
  background: var(--card); border: 2px solid var(--ink); border-radius: 3px 5px 2px 4px;
}

/* what the sources do not cover: the shared .gap-note; inside a list the list's gap spaces it */
.how-what__list > .gap-note, .how-check__list > .gap-note { margin-block: 0; }
.how-state__limit { margin-top: 1.6rem; max-width: 46rem; }

.how-step__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.5rem; margin-top: 1.4rem; }
.how-step__foot .btn--chat { padding: 0.55rem 1rem; font-size: 0.97rem; box-shadow: 2px 3px 0 var(--ink); }
.how-step__back { font-size: 0.97rem; color: var(--ink-soft); }

/* a short boxed note under a step: "Reading Dominican measurements" */
.how-measure {
  margin-top: 1.6rem; max-width: 48rem; padding: 1.1rem 1.35rem 1.2rem;
  background: var(--card); border: 2px dashed var(--ink-soft); border-radius: 8px 14px 6px 16px;
}
.how-measure__title { font-size: 1.25rem; display: inline; }
/* folded under its title (a <details>): the title is the control, a "+" says it opens */
.how-measure__summary { cursor: pointer; list-style: none; min-height: 2.75rem; padding-block: 0.5rem; }
.how-measure__summary::-webkit-details-marker { display: none; }
.how-measure__summary::before { content: "+"; float: right; margin-left: 0.6rem; font-weight: 700; font-size: 1.4rem; line-height: 1; color: var(--gold-deep); }
.how-measure[open] > .how-measure__summary { display: block; margin-bottom: 0.9rem; }
.how-measure[open] > .how-measure__summary::before { content: "−"; }
.how-measure__plain { margin: 0 0 1rem; font-size: 1.06rem; line-height: 1.62; font-weight: 600; max-width: 44rem; }
.how-measure__foot { margin-top: 1.1rem; }
/* verbatim wording keeps the sentence's own quotation marks */
.page--how q.verbatim { quotes: none; }
.how-measure__foot .btn--chat { padding: 0.55rem 1rem; font-size: 0.97rem; box-shadow: 2px 3px 0 var(--ink); }
.how-road__more { margin: 0.6rem 0 0; font-size: 1.04rem; }
.how-measure__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; font-size: 1.04rem; line-height: 1.62; }
.how-measure__item { position: relative; padding-left: 1.2rem; }
.how-measure__item::before {
  content: ""; position: absolute; left: 0; top: 0.8em; width: 0.6rem; height: 2.5px;
  background: var(--ink-soft); border-radius: 2px;
}

/* a Spanish term linked to its glossary entry */
.how-term { text-decoration-style: dotted; text-decoration-thickness: 2px; text-decoration-color: var(--gold-deep); }

/* ---------- the free self-check list: a sheet to print or screenshot */
.how-sheet {
  max-width: 46rem; padding: clamp(1.3rem, 4vw, 2.2rem);
  background: var(--card); border: 3px solid var(--ink); border-radius: 6px 12px 5px 14px;
  box-shadow: 7px 8px 0 var(--gold);
}
.how-sheet__title { display: flex; align-items: flex-start; gap: 0.6rem; font-size: clamp(1.45rem, 2.8vw, 1.95rem); margin-bottom: 1.3rem; }
.how-sheet__title .how-check__icon { width: 2.1rem; height: 2.1rem; margin-top: -0.1rem; }
.how-sheet__list { gap: 0; font-size: 1.1rem; line-height: 1.55; }
.how-sheet__item { position: relative; padding: 0.85rem 0 0.9rem 2.5rem; border-top: 1.5px dashed var(--rule); }
.how-sheet__item::before {
  content: ""; position: absolute; left: 0; top: 0.95rem; width: 1.45rem; height: 1.45rem;
  border: 2.5px solid var(--ink); border-radius: 3px 6px 2px 5px;
}
.how-sheet__foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1.2rem;
  margin-top: 0.4rem; padding-top: 0.8rem; border-top: 2px solid var(--ink);
  font-size: 0.88rem; color: var(--ink-soft);
}
.how-sheet__hint { margin-top: 1.1rem; font-family: var(--font-hand); font-size: 1.5rem; line-height: 1.2; color: var(--gold-deep); }

/* ---------- what the US government advises */
.how-state__list { gap: 1.1rem; max-width: 46rem; font-size: 1.07rem; line-height: 1.65; }
.how-state__item { padding-left: 1.2rem; border-left: 3px solid var(--sea); }

/* ---------- what Prime Inversiones does, and the other pages */
.how-prime__text { max-width: 42rem; font-size: 1.15rem; line-height: 1.6; }
.how-more { margin-top: 2.2rem; }
.how-more__title { font-size: 1.2rem; margin-bottom: 0.7rem; }
.how-more__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.how-more__link {
  display: inline-block; padding: 0.55rem 1.1rem; font-weight: 600; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--wobble);
}
.how-more__link.is-soon { color: var(--ink-soft); border-style: dashed; background: none; }

/* ---------- glossary (the shared .facts grid) */
.how-glossary__list { max-width: 58rem; }
.how-glossary__list dt { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; color: var(--ink); }
.how-glossary__list dd { line-height: 1.6; }
.how-glossary__list dt:target, .how-glossary__list dt:target + dd { background: color-mix(in srgb, var(--gold-light) 40%, transparent); }

/* ---------- smaller screens */
@media (max-width: 62rem) {
  .how-step__body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 48rem) {
  /* full width for the text: the round number gives way to a "Step n" tag above the title */
  .how-steps::before { display: none; }
  .how-step { padding-left: 0; }
  .how-step .step__n { display: none; }
  .how-step__label {
    display: table; margin-bottom: 0.6rem; padding: 0.2rem 0.75rem;
    font-size: 0.9rem; color: var(--ink); background: var(--gold);
    border: 2px solid var(--ink); border-radius: var(--wobble);
  }
  .how-step + .how-step { border-top: 1.5px dashed var(--rule); padding-top: 2.4rem; }
  .how-steps { gap: 2.4rem; }
  .how-check { padding: 1.1rem 1.05rem 1.2rem; }
  .how-road__link { padding-inline: 0.2rem; }
}

/* ---------- print: the shared print rules (parts.css) do colours, header, chat and source
   addresses; this page only drops its own screen-only parts and tightens its spacing */
@media print {
  .how-step__foot, .how-sheet__hint, .how-more, .chat-fab, .chat,
  .how-overview .drawing, .foot__proto { display: none !important; }
  .how-overview { padding-block: 1rem; }
  .section--tint { border: 0; }
  .how-steps { gap: 1.5rem; }
  .how-step__body { grid-template-columns: minmax(0, 1fr); }
  .how-check, .how-sheet, .how-what__item, .how-check__item, .how-state__item { break-inside: avoid; }
  .how-road { columns: 2; }
  .how-road__text, .how-term { text-decoration-color: currentColor; }
  .foot { margin-top: 1rem; }
}

/* ---------- the three checks that protect a buyer most, under the "please read first" note */
.how-top {
  margin-top: 1.4rem; max-width: 46rem; padding: 1.1rem 1.35rem 1.25rem;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--wobble); box-shadow: 5px 6px 0 var(--gold);
}
.how-top__title { display: flex; align-items: center; gap: 0.55rem; font-size: min(1.35rem, 6.4vw); margin-bottom: 0.7rem; }
.how-top__list { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.75rem; font-size: 1.08rem; line-height: 1.6; }
.how-top__list li::marker { font-weight: 700; color: var(--gold-deep); }
.how-top__go { white-space: nowrap; font-size: 0.97rem; }

/* ---------- one line in plain words at the top of each step */
.how-plain {
  max-width: 48rem; margin: 0 0 1.3rem; padding: 0.8rem 1.1rem;
  background: color-mix(in srgb, var(--gold-light) 30%, var(--card));
  border-left: 4px solid var(--gold-deep); border-radius: 4px 10px 10px 4px;
  font-size: 1.12rem; line-height: 1.6;
}
.how-plain__label { font-weight: 700; }

/* ---------- the worked total cost: two examples side by side, stacked on a phone */
.how-cost__ex { padding: 1.1rem 1.3rem 1.3rem; background: var(--card); border: 2px solid var(--ink); border-radius: var(--wobble); }
.how-cost__title { font-size: 1.25rem; margin-bottom: 0.7rem; }
.how-cost__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; font-size: 1.04rem; line-height: 1.6; }
.how-cost__item { position: relative; padding-left: 1.2rem; overflow-wrap: anywhere; }
.how-cost__item::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.6rem; height: 2.5px; background: var(--gold); border-radius: 2px; }

/* ---------- glossary: the way back appears in the entry a term link has just opened */
.how-glossary__back { display: none; margin-left: 0.4rem; font-weight: 650; white-space: nowrap; }
.how-glossary__list dt:target + dd .how-glossary__back { display: inline-block; }
.how-glossary__list dd { overflow-wrap: anywhere; }

/* ---------- large text (a 24px browser default): nothing may push the page sideways */
.how-steps > li, .how-step__body > *, .how-what__list > li, .how-check__list > li, .how-sheet__list > li, .how-top__list > li { min-width: 0; overflow-wrap: anywhere; }
/* headings wrap between whole words (site.css); a word wider than the line breaks only as a last resort,
   rather than push the page sideways */
.page--how h1, .page--how h2, .page--how h3 { hyphens: manual; overflow-wrap: break-word; }
.how-top__title { display: block; }
.how-top__title .how-check__icon { display: inline-block; vertical-align: -0.3em; margin-right: 0.45rem; }

/* the Help page's plain-words entry for a glossary term */
.how-glossary__plainer { margin-left: 0.4rem; font-size: 0.95rem; overflow-wrap: anywhere; }

/* headings with large text on a narrow phone: they shrink with the window, so a long word such as
   "regularización" or "measurements" keeps to its line (the step number is already above the title) */
.how-step__title { font-size: clamp(min(1.55rem, 7.2vw), 2.6vw, 2.05rem); }
.how-measure__title, .how-cost__title { font-size: min(1.25rem, 5.6vw); }

/* the way to Avoid scams, which left the menu on 2026-11-17 */
.how-top__scams { margin-top: 1.1rem; }
.how-top__scams .btn { white-space: normal; text-align: left; }

/* Buying from the US: you against a Dominican buyer (2026-11-17) */
.how-us__table th[scope="row"] { font-weight: 700; }
.how-us__table td, .how-us__table th { vertical-align: top; }
/* on a phone, one card per row: the topic, then each side under its own label */
@media (max-width: 48rem) {
  .how-us__table, .how-us__table tbody { display: block; }
  .how-us__table thead, .how-us__table thead tr, .how-us__table thead th {
    display: block; position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .how-us__table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.3rem; padding: 0.8rem 0.9rem; border-bottom: 1.5px dashed var(--rule); }
  .how-us__table tbody tr:last-child { border-bottom: 0; }
  .how-us__table tbody th, .how-us__table tbody td { display: block; padding: 0; border: 0; }
  .how-us__table td[data-label]::before { content: attr(data-label); display: block; font-size: 0.8rem; font-weight: 650; color: var(--ink-soft); }
}
