/* The shared parts every page is built from. Linked on every page right after site.css.
   Markup for each part: src/pages/kit.js (served at /en/kit/ and /es/kit/).
   Tokens only (defined in site.css): no colour is typed in here. Text stays large and dark:
   the audience includes retirees reading on a phone. */

/* ---------- layout */
.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

/* a jump link (#id) lands below the sticky header, not under it */
main [id], .section, .sources { scroll-margin-top: 5.5rem; }

.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section--tint {
  background: var(--paper-deep);
  border-block: 1.5px dashed var(--rule);
}
/* two plain sections in a row share one gap instead of two */
.section:not(.section--tint) + .section:not(.section--tint) { padding-top: 0; }

.page-head { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 3vw, 2rem); }
/* the smallest size also follows the window (11vw), so a page title's longest word fits a phone at
   a 24 px browser default: headings break at syllables, not mid-word (site.css) */
.page-head__title { font-size: clamp(min(2.3rem, 11vw), 4.4vw, 3.8rem); max-width: 22ch; }
.page-head__lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); margin-top: 1.2rem; max-width: 40rem; }
/* ctx.reviewLine(): "Reviewed by the law office on …", under a page's lead */
.review-line {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem;
  font-size: 0.95rem; font-weight: 600; color: var(--ink-soft);
}
.review-line::before {
  content: "\2713"; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; flex: none;
  font-size: 0.85rem; color: var(--ink); border: 1.5px solid var(--palm); border-radius: 50%;
}
.page-head + .section:not(.section--tint) { padding-top: clamp(1.5rem, 4vw, 2.5rem); }

.eyebrow {
  font-size: 0.82rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-deep); margin-bottom: 0.9rem;
}
.section__title { font-size: clamp(min(1.8rem, 9vw), 3.2vw, 2.6rem); margin-bottom: 1rem; }
.section__intro { font-size: 1.12rem; line-height: 1.6; color: var(--ink-soft); max-width: 42rem; margin-bottom: 2rem; }

.grid { display: grid; gap: 1.4rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- card: one idea, a short title and a few lines */
.card {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--wobble);
  padding: 1.5rem 1.4rem 1.6rem; box-shadow: 4px 5px 0 var(--rule);
}
.card__title { font-size: 1.4rem; margin-bottom: 0.55rem; }
.card__text { color: var(--ink-soft); }
.card__text + .card__text { margin-top: 0.7rem; }
.card--sea { box-shadow: 4px 5px 0 var(--sea); }
.card--gold { box-shadow: 4px 5px 0 var(--gold); }
.card--coral { box-shadow: 4px 5px 0 var(--coral); }

/* ---------- pair: the site's signature, the dream and the fine print side by side */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 1.8rem; align-items: stretch; }
.pair__dream,
.pair__print {
  position: relative; padding: 2.4rem 1.6rem 1.7rem;
  border: 2px solid var(--ink); border-radius: var(--wobble);
}
.pair__dream { background: var(--card); box-shadow: 4px 5px 0 var(--sea); }
.pair__print {
  /* a sheet of ruled notebook paper */
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(1.6em - 1px), color-mix(in srgb, var(--sea) 22%, transparent) calc(1.6em - 1px) 1.6em),
    var(--card);
  background-position: 0 2.35rem;
  box-shadow: 4px 5px 0 var(--gold);
  transform: rotate(0.6deg);
}
.pair__label {
  position: absolute; top: -1.05rem; left: 1.1rem; padding: 0 0.5rem;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.75rem; line-height: 1;
  color: var(--ink); background: var(--paper); transform: rotate(-3deg);
}
.pair__print .pair__label { color: var(--gold-deep); transform: rotate(2deg); }
.pair__title { font-size: 1.35rem; margin-bottom: 0.6rem; }
.pair__dream p + p, .pair__print p + p { margin-top: 0.7rem; }
@media (prefers-reduced-motion: reduce) { .pair__print { transform: none; } }
/* on a narrow phone, or with large text, the pair keeps its text column: no tilt (its edges ran off
   the screen), slimmer padding and a smaller label (at 24 px text on 390 px the column was 201 px).
   "body" outranks a page's own padding for the pair, which is written for wider screens. */
@media (max-width: 30rem) {
  body .pair :is(.pair__dream, .pair__print) { padding: 1.9rem 0.85rem 1rem; transform: none; }
  body .pair .pair__label { left: 0.55rem; max-width: calc(100% - 1.1rem); font-size: 1.35rem; }
  /* headings break at syllables only (site.css), so on a narrow screen with large text the card and
     pair titles shrink with the window: "construirse" at 37.8 px was wider than its card on 320 px */
  body .card { padding-inline: 0.95rem; }
  body .card__title { font-size: min(1.4rem, 7.2vw); }
  body .pair .pair__title { font-size: min(1.35rem, 6.8vw); }
}

/* ---------- steps: numbered, joined by a pencil line */
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.8rem; }
.steps::before {
  content: ""; position: absolute; left: 1.35rem; top: 1.4rem; bottom: 1.4rem;
  border-left: 2.5px dashed var(--ink-soft);
}
.step { position: relative; padding-left: 4.2rem; min-height: 2.8rem; }
.step__n {
  position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%;
}
.step__title { font-size: min(1.3rem, 6.8vw); margin-bottom: 0.35rem; padding-top: 0.35rem; }
.step__text { color: var(--ink-soft); max-width: 40rem; }

/* ---------- facts: a definition grid, label and value */
.facts {
  /* the label column takes what its longest label needs, at least 10rem and at most 60%: a long label
     once took 675 px and left its value 45 px (the Wander page's contact facts, 1,440 px, Spanish) */
  display: grid; grid-template-columns: fit-content(60%) minmax(0, 1fr);
  margin: 0; border-top: 1.5px dashed var(--rule);
}
.facts dt, .facts dd { margin: 0; padding: 0.75rem 0; border-bottom: 1.5px dashed var(--rule); }
.facts dt { font-weight: 650; color: var(--ink-soft); padding-right: 1.5rem; min-width: 10rem; }
.facts dd { font-size: 1.08rem; }

/* ---------- table: scrolls sideways inside its wrapper on a phone, header stays put */
.table-wrap { margin-block: 1rem; }
.table-wrap__hint { display: none; font-family: var(--font-hand); font-size: 1.35rem; color: var(--gold-deep); margin-bottom: 0.3rem; }
.table-wrap__hint::before { content: "\2194\FE0E  "; font-family: var(--font-body); }
.table-wrap__scroll {
  overflow: auto; max-height: min(75vh, 40rem);
  border: 2px solid var(--ink); border-radius: 10px 4px 12px 5px; box-shadow: 4px 5px 0 var(--rule);
  /* soft shadows at the edges when there is more to scroll to */
  background:
    linear-gradient(to right, var(--card) 30%, transparent) left / 2.5rem 100% no-repeat local,
    linear-gradient(to left, var(--card) 30%, transparent) right / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--ink) 22%, transparent), transparent) left / 0.9rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--ink) 22%, transparent), transparent) right / 0.9rem 100% no-repeat scroll,
    var(--card);
}
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; }
.table caption { text-align: left; padding: 0.8rem 1rem 0.4rem; font-weight: 650; }
.table th, .table td { padding: 0.75rem 1rem; text-align: left; vertical-align: top; border-bottom: 1.5px dashed var(--rule); }
.table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--paper-deep); border-bottom: 2px solid var(--ink); white-space: nowrap;
}
.table tbody th { font-weight: 650; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- badge: a small status stamp */
.badge {
  display: inline-block; padding: 0.12rem 0.65rem; font-size: 0.86rem; font-weight: 650; line-height: 1.5;
  color: var(--ink); border: 1.5px solid currentColor; border-radius: 999px 600px 999px 700px / 600px 999px 700px 999px;
  /* a short stamp stays whole (it is one inline block); a long one wraps inside itself rather than
     push a phone page sideways (a draft badge on the help page did, at a 24 px browser default) */
  max-width: 100%; overflow-wrap: anywhere;
}
.badge--ok { border-color: var(--palm); background: color-mix(in srgb, var(--palm) 16%, var(--paper)); }
.badge--wait { border-color: var(--gold-deep); background: color-mix(in srgb, var(--gold-light) 45%, var(--paper)); }
.badge--info { border-color: var(--sea-deep); background: color-mix(in srgb, var(--sea) 14%, var(--paper)); }

/* ---------- chips: filter buttons (.chip itself is in site.css) */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.4rem; }
.chips .chip { font-size: 0.95rem; padding: 0.4rem 1rem; }
.chips .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- callout: a handwritten note in the margin */
.callout {
  max-width: 30rem; margin-block: 1.5rem; padding: 0.9rem 1.2rem 1rem;
  font-family: var(--font-hand); font-size: 1.5rem; line-height: 1.25; color: var(--ink);
  background: color-mix(in srgb, var(--gold-light) 30%, var(--paper));
  border-left: 4px solid var(--gold); border-radius: 2px 14px 4px 18px;
  transform: rotate(-1deg);
}
@media (prefers-reduced-motion: reduce) { .callout { transform: none; } }

/* ---------- gallery: pictures in pencil frames, no script */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1.6rem; }
.gallery__item {
  margin: 0; padding: 0.55rem 0.55rem 0.8rem; background: var(--card);
  border: 2px solid var(--ink); border-radius: 6px 3px 7px 4px; box-shadow: 4px 5px 0 var(--rule);
}
.gallery__item:nth-child(odd) { transform: rotate(-0.6deg); }
.gallery__item:nth-child(even) { transform: rotate(0.5deg); }
/* 4:3 frames; the crop leans to the top so a portrait keeps its face */
.gallery__item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 20%; border-radius: 2px; }
.gallery__caption { margin-top: 0.6rem; font-size: 0.95rem; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .gallery__item { transform: none; } }

/* ---------- cta band: the closing band with the chat button */
.cta-band { background: var(--navy-deep); color: var(--paper); padding-block: clamp(2.8rem, 7vw, 4.5rem); margin-top: clamp(2rem, 6vw, 4rem); }
main > .cta-band:last-child { margin-bottom: 0; }
.section + .cta-band { margin-top: 0; } /* the section's own padding is gap enough */
.cta-band__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1.5rem 3rem; }
.cta-band__title { font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--paper); }
.cta-band__title em { font-style: italic; text-decoration: underline wavy var(--gold); text-underline-offset: 0.14em; text-decoration-thickness: 0.08em; }
.cta-band__text { margin-top: 0.7rem; font-size: 1.1rem; color: var(--paper-deep); max-width: 38rem; }
/* a button inside the band's text column keeps a gap below the words (it touched them on a phone) */
.cta-band__contact { margin-top: 1.2rem; }
.cta-band a:not(.btn) { color: var(--gold-light); }
.cta-band .btn--chat { box-shadow: 3px 4px 0 var(--paper); }
.cta-band .btn--chat:hover { box-shadow: 5px 7px 0 var(--paper); }
/* a page that ends on the band: the footer follows it without a gap; its gold rule keeps the two
   navy blocks apart, so the band still reads as the page and the footer as its end */
.page:has(main > .cta-band:last-child) .foot { margin-top: 0; }
/* the same when only the no-JavaScript note follows the band (How this site was made: hidden while scripts run,
   it left a strip of paper between the two navy blocks) */
.page:has(main > .cta-band + .nojs-only:last-child) .foot { margin-top: 0; }

/* ---------- prose: long text at a comfortable measure */
.prose { max-width: 40rem; font-size: 1.08rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 1.75rem; margin-top: 2.2em; }
/* a section's title right under its eyebrow keeps the eyebrow's own gap (a 62 px hole sat between "Security"
   and its title on a phone) */
.prose > .eyebrow + h2 { margin-top: 0; }
.prose h3 { font-size: 1.35rem; margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose strong { font-weight: 700; }

/* ---------- citations and the source list */
/* "12, 20" may break after its comma: kept on one line it pushed a phone page sideways at a 24 px default */
.cite { font-size: 0.72em; line-height: 0; margin-left: 0.1em; }
/* a pair of citations stays on one line ("9," above "10" read as two notes on a 360 px phone); a longer group may
   still wrap, or at 320 px with large text it would push the page sideways ("18, 19, 20, 21" did) */
.cite:not(:has(a:nth-of-type(3))) { white-space: nowrap; }
.cite a { font-weight: 700; text-decoration: none; color: var(--gold-deep); padding: 0 0.12em; }
/* on a phone each number is a 44 px target (it was 13 x 25 px): an inline link's vertical padding
   does not move the line, and the side padding is given back by an equal negative margin */
@media (max-width: 54rem) {
  .cite a { padding: 1.25em 1.6em; margin-inline: -1.48em; position: relative; z-index: 1; }
  .cite a:focus-visible { outline-offset: -1.2em; }
}
/* "A Dominican lawyer has not yet reviewed this page." under the title of a page awaiting review.
   A note for the people reviewing the site, not for visitors: shown only in review mode (?review=1),
   like the other draft marks. The go-live gate still refuses a page that carries it (data-draft). */
.legal-pending { display: none; }
.is-review .legal-pending {
  display: block;
  max-width: 42rem; margin-block: 0.4rem 1rem; padding: 0.45rem 0.8rem;
  font-size: 0.95rem; font-weight: 600; color: var(--ink);
  border-left: 4px solid var(--coral); background: color-mix(in srgb, var(--coral) 10%, transparent);
}
/* a preview build's stand-in for a picture still awaiting publication permission */
.photo-pending {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 10rem; aspect-ratio: 4 / 3;
  padding: 1rem; text-align: center; font-weight: 600; color: var(--ink-soft);
  border: 2px dashed var(--rule); border-radius: var(--wobble); background: color-mix(in srgb, var(--paper) 70%, var(--card));
}
.cite a:hover { text-decoration: underline; }
.sources { padding-block: 1.5rem 0.5rem; }
.sources__title { font-size: min(1.3rem, 7vw); margin-bottom: 0.8rem; }
/* "What does this mean?" links to the Help page (ctx.helpLink, the source list's "How to read sources") */
.help-link { font-size: 0.9rem; font-weight: 600; text-decoration-style: dotted; text-underline-offset: 0.2em; }
/* on a phone a 44 px target (they were 21 px high): the padding grows the tap area and the equal
   negative margin gives the space back, so the line of text around it does not move */
@media (max-width: 54rem) {
  .help-link { display: inline-block; padding-block: 0.75rem; margin-block: -0.75rem; }
}
.sources__help { margin: -0.5rem 0 0.9rem; }
/* the folded source list (build.js sourceList): one quiet line, "Sources (12)" and a round "+",
   that opens on a tap; the list is supplementary, so it takes no room until it is wanted */
.sources-fold { border-top: 1.5px dashed var(--rule); border-bottom: 1.5px dashed var(--rule); }
.sources-fold__summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0.2rem; min-height: 2.75rem; cursor: pointer; list-style: none;
}
.sources-fold__summary::-webkit-details-marker { display: none; }
.sources-fold__summary::marker { content: ""; }
.sources-fold__summary:hover { background: color-mix(in srgb, var(--gold-light) 18%, transparent); }
.sources-fold__summary:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.sources-fold__summary .sources__title { margin: 0; font-size: min(1.1rem, 6vw); }
.sources-fold__sign {
  position: relative; flex: none; width: 1.7rem; height: 1.7rem; border: 2px solid var(--ink); border-radius: 50%;
}
.sources-fold__sign::before, .sources-fold__sign::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 0.75rem; height: 2px; background: var(--ink);
  transform: translate(-50%, -50%);
}
.sources-fold__sign::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.15s ease; }
.sources-fold[open] .sources-fold__sign::after { transform: translate(-50%, -50%) rotate(0deg); }
.sources-fold[open] > .sources-fold__summary { margin-bottom: 0.8rem; }
.sources-fold[open] { padding-bottom: 1rem; }
.sources-fold > .sources__help { margin-top: 0; }
.sources__list { margin: 0; padding-left: 1.6em; display: grid; gap: 0.55rem; font-size: 0.95rem; color: var(--ink-soft); max-width: 50rem; }
.sources__list li:target { background: color-mix(in srgb, var(--gold-light) 40%, transparent); }
.sources__publisher { font-weight: 650; color: var(--ink); }
/* "Checked …" wraps like the rest of the line, and a long address breaks anywhere: at a 24 px browser
   default nothing in the list may push the page sideways */
.sources__item { overflow-wrap: anywhere; min-width: 0; }
/* "↩": back to the citation the reader came from */
.sources__back { display: inline-block; min-width: 1.6em; text-align: center; text-decoration: none; font-weight: 700; color: var(--gold-deep); }
/* on a phone the "↩" is a 44 px target on every page: the padding grows the tap area, the equal
   negative margin gives the space back, so the source's line does not move */
@media (max-width: 54rem) {
  .sources__back { min-width: 2.75rem; padding-block: 0.6rem; margin-block: -0.6rem; }
}

/* ---------- gap note: "our sources do not cover this". Calm and dashed, plainly not a fact */
.gap-note {
  max-width: 42rem; margin-block: 1.4rem; padding: 0.9rem 1.2rem 1rem 3.2rem; position: relative;
  color: var(--ink-soft); background: transparent;
  border: 2px dashed var(--ink-soft); border-radius: 12px 6px 14px 8px;
}
.gap-note::before {
  content: "?"; position: absolute; left: 0.9rem; top: 0.85rem;
  display: grid; place-items: center; width: 1.6rem; height: 1.6rem;
  font: 700 1rem/1 var(--font-display); color: var(--ink-soft);
  border: 1.5px solid var(--ink-soft); border-radius: 50%;
}
.gap-note__label { font-weight: 650; color: var(--ink); margin-bottom: 0.2rem; }

/* ---------- say: a quotation card with a handwritten label */
.say {
  position: relative; max-width: 42rem; margin: 2rem 0 1.5rem; padding: 2rem 1.6rem 1.4rem 1.6rem;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--wobble); box-shadow: 4px 5px 0 var(--gold);
}
/* the label sits on the card's top edge, in the flow (pulled up by the card's padding and 1.05rem more), so a label
   that takes two lines on a phone ("In the office's own words (translated from Spanish)") pushes the quotation down
   instead of covering its opening mark (it did at 360 and 390 px while it was placed absolutely) */
.say__label {
  position: relative; width: fit-content; max-width: calc(100% + 0.5rem);
  margin: -3.05rem 0 1.45rem -0.5rem; padding: 0 0.5rem;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.6rem; line-height: 1;
  color: var(--gold-deep); background: var(--paper); transform: rotate(-2deg);
}
.say__quote { margin: 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.45; font-style: italic; }
.say__quote p + p { margin-top: 0.7rem; }
.say__quote::before {
  content: "\201C"; float: left; margin: -0.35rem 0.4rem 0 -0.2rem;
  font-family: var(--font-display); font-size: 3.4rem; line-height: 1; font-style: normal; color: var(--gold);
}
.say__who { margin-top: 0.9rem; font-size: 0.95rem; color: var(--ink-soft); }
.say__who::before { content: "\2014\00A0"; }
@media (prefers-reduced-motion: reduce) { .say__label { transform: none; } }

/* ---------- review-only: shown only while review mode is on (review.js sets html.is-review) */
.review-only { display: none; }
.is-review .review-only { display: revert; }

/* ---------- handwriting */
.hand { font-family: var(--font-hand); font-size: 1.3em; line-height: 1.1; padding-inline: 0.05em 0.15em; }

/* ---------- smaller screens */
@media (max-width: 62rem) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-wrap__hint { display: block; }
}
@media (max-width: 48rem) {
  .grid--2, .grid--3, .pair { grid-template-columns: minmax(0, 1fr); }
  .pair { gap: 2.6rem; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  /* one column: the label's 10rem minimum (for two columns) would be wider than a 320 px phone at large text */
  .facts dt { border-bottom: 0; padding-bottom: 0; min-width: 0; }
  .facts dd { padding-top: 0.2rem; }
  .cta-band__in { grid-template-columns: minmax(0, 1fr); }
  .cta-band__in .btn { justify-self: start; }
  /* steps on a phone: a narrow number column, so the text keeps the width */
  .steps::before { left: 1.05rem; }
  .step { padding-left: 3rem; min-height: 2.2rem; }
  .step__n { width: 2.15rem; height: 2.15rem; font-size: 1.05rem; }
  .step__title { padding-top: 0.15rem; }
  .gap-note { padding-left: 2.8rem; }
  .gap-note::before { left: 0.7rem; }
}

/* ---------- print: black on white, no header, chat or closing band; source addresses written out */
@media print {
  *, *::before, *::after {
    color: CanvasText !important; background: transparent !important;
    border-color: CanvasText !important; box-shadow: none !important; text-shadow: none !important;
  }
  html, body { background: Canvas !important; font-size: 11pt; }
  /* these sit on a border or a pencil line: they keep a white ground so the line does not cross them */
  .pair__label, .say__label, .step__n { background: Canvas !important; }
  .top, .skip, .btn--chat, [data-chat], .cta-band, .drawing__moods, .review-panel, .draft-tag,
  .table-wrap__hint, .chips, .foot__contact, .contact-button, .contact-fallback, .sources__back { display: none !important; }
  .pair__print, .callout, .gallery__item, .say__label, .pair__label { transform: none !important; }
  .section, .page-head { padding-block: 1.2rem; }
  .table-wrap__scroll { max-height: none; overflow: visible; }
  .table thead th { position: static; }
  .card, .pair__dream, .pair__print, .step, .say, .gap-note, .callout, .gallery__item, .facts dd, .sources__item, .table tr {
    break-inside: avoid;
  }
  h1, h2, h3 { break-after: avoid; }
  a { text-decoration: underline; }
  .sources__item a[href^="http"]::after { content: " (" attr(href) ")"; word-break: break-all; font-size: 0.9em; }
  .draft-mark { outline: 0; }
}

/* ---------- glance: the highlight tiles of "Life on the Samaná peninsula" (src/area-facts.js), on that
   page and on the home page: a pencil mark, a label, a figure in large type, where it comes from, a link */
.glance { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); gap: 1.2rem; }
.glance__tile {
  position: relative; display: flex; flex-direction: column; gap: 0.35rem; min-width: 0;
  padding: 1.1rem 1.15rem 1.15rem; background: var(--card); border: 2px solid var(--ink);
  border-radius: var(--wobble); box-shadow: 4px 5px 0 var(--gold);
}
.glance__tile:nth-child(4n + 2) { box-shadow: 4px 5px 0 var(--sea); }
.glance__tile:nth-child(4n + 3) { box-shadow: 4px 5px 0 var(--palm); }
.glance__tile:nth-child(4n + 4) { box-shadow: 4px 5px 0 var(--coral); }
.glance__label { font-size: 0.78rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); }
.glance__big { font-family: var(--font-display); font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.1; }
.glance__text { font-size: 0.95rem; color: var(--ink-soft); }
.glance__more { margin-top: auto; padding-top: 0.4rem; font-weight: 650; }
.area-icon { width: 3rem; height: 3rem; color: var(--ink); }
.area-icon .ai-sun, .area-icon .ai-seal { fill: var(--sun); }
.area-icon .ai-sea, .area-icon .ai-ray { stroke: var(--sea); }
.area-icon .ai-leaf { fill: var(--palm); stroke: var(--palm); }
.area-icon .ai-sand { stroke: var(--gold); }
.area-icon .ai-bar { fill: var(--gold-light); }
.area-icon .ai-paper { fill: var(--paper); }
.area-icon .ai-check { stroke: var(--palm); stroke-width: 3; }
@media print { .glance__tile { box-shadow: none; } }

/* ---------- a chart's tooltip (site/assets/js/chart-tips.js): the offer pages' charts and those of
   "Life on the Samaná peninsula"; placed by the script with element.style */
.chart-tip {
  position: absolute; z-index: 5; max-width: min(18rem, calc(100% - 1rem)); padding: 0.4rem 0.6rem;
  font-size: 0.9rem; line-height: 1.35; color: var(--paper); background: var(--navy-deep);
  border-radius: 6px 3px 7px 4px; box-shadow: 2px 3px 0 var(--rule); pointer-events: none;
}
.chart-tip[hidden] { display: none; }
@media print { .chart-tip { display: none !important; } }

/* ---------- the type bar (src/pages/opportunities.js typeBar): the Investment Opportunities list's street sign,
   also on Home. A string of pencil bunting (src/store-art.js), then a tab per kind with its round picture, how
   many opportunities and what they hold; the chosen tab in ink. On a phone, one row that scrolls sideways */
.typebar { position: relative; margin: 1.1rem 0 0.2rem; min-width: 0; }
.typebar__bunting { height: 1.7rem; margin: 0 0.4rem -0.35rem; }
.typebar__bunting .bunting { display: block; width: 100%; height: 100%; overflow: visible; }
.typebar path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.typebar .fl-string-line { stroke: var(--ink-soft); stroke-width: 1.2; }
.typebar .fl-a-line, .typebar .fl-b-line, .typebar .fl-c-line { stroke: var(--ink); stroke-width: 1; }
.typebar .fl-a-fill { stroke: var(--gold); stroke-width: 1.5; }
.typebar .fl-b-fill { stroke: var(--sea); stroke-width: 1.5; }
.typebar .fl-c-fill { stroke: var(--coral); stroke-width: 1.5; }
.typebar .af-ring-solid { fill: var(--paper); stroke: none; }
.typebar .af-string-line { stroke: var(--ink-soft); stroke-width: 1; }
.typebar__list { list-style: none; margin: 0; padding: 0.4rem 0.4rem 0.7rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 0.8rem; }
.typebar__item { flex: none; min-width: 0; }
.typebar__tab {
  --tab: var(--ink-soft);
  display: flex; align-items: center; gap: 0.65rem; min-height: 4rem; padding: 0.4rem 1.1rem 0.4rem 0.45rem;
  color: var(--ink); text-decoration: none; background: var(--card);
  border: 2px solid var(--ink); border-radius: var(--wobble); box-shadow: 3px 4px 0 var(--tab);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.typebar__tab--gold { --tab: var(--gold); }
.typebar__tab--sea { --tab: var(--sea); }
.typebar__tab--coral { --tab: var(--coral); }
.typebar__tab:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 6px 0 var(--tab); }
.typebar__tab[aria-current="true"] { color: var(--paper); background: var(--ink); }
.typebar__tab[aria-current="true"] .typebar__sub { color: var(--paper); }
.typebar__tab[aria-current="true"] .typebar__n { color: var(--ink); background: var(--paper); }
.typebar__tab[aria-disabled="true"] { opacity: 0.5; box-shadow: none; cursor: default; transform: none; }
.typebar__pic { flex: none; display: block; width: 3.1rem; height: 3.1rem; overflow: hidden; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper-deep); }
.typebar__img, .typebar__flags { display: block; width: 100%; height: 100%; object-fit: cover; }
.typebar__words { display: flex; flex-direction: column; line-height: 1.15; }
.typebar__name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.typebar__n { display: inline-block; min-width: 1.6em; margin-left: 0.2rem; padding: 0.05rem 0.4rem; font-family: var(--font-body); font-size: 0.82rem; font-weight: 700; text-align: center; color: var(--ink); background: color-mix(in srgb, var(--tab) 28%, var(--card)); border-radius: 999px; vertical-align: 0.12em; }
.typebar__sub { font-size: 0.84rem; color: var(--ink-soft); white-space: nowrap; }
.typebar__item--ask { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; padding-left: 0.3rem; }
.typebar__q { font-family: var(--font-hand); font-weight: 700; font-size: 1.45rem; line-height: 1; color: var(--gold-deep); }
.typebar__item--ask .btn { min-height: 2.75rem; padding: 0.55rem 1rem; font-size: 0.95rem; }
/* a phone: every tab in view (no sideways scroll), wrapping onto a second row if needed: a smaller picture, the
   name and its count, no second line; "Something else? Ask Wander" on a row of its own */
@media (max-width: 48rem) {
  .typebar { margin-top: 0.6rem; }
  .typebar__bunting { display: none; }
  .typebar__list { gap: 0.45rem; padding: 0.35rem 0.1rem 0.5rem; }
  .typebar__item { max-width: 100%; }
  .typebar__tab { min-height: 2.75rem; max-width: 100%; gap: 0.35rem; padding: 0.15rem 0.6rem 0.15rem 0.2rem; box-shadow: 2px 3px 0 var(--tab); }
  .typebar__words { min-width: 0; }
  .typebar__name { white-space: normal; overflow-wrap: anywhere; }
  .typebar__pic { width: 1.8rem; height: 1.8rem; }
  .typebar__name { font-size: 0.92rem; }
  .typebar__n { font-size: 0.75rem; }
  .typebar__sub { display: none; }
  .typebar--budget .typebar__sub { display: block; font-size: 0.72rem; white-space: normal; overflow-wrap: anywhere; }
  .typebar--budget.typebar--typed .typebar__tab:not([aria-current]) .typebar__sub { display: none; }
  .typebar--budget .typebar__pic { width: 1.5rem; height: 1.5rem; }
  .typebar__item--ask { flex-basis: 100%; padding-left: 0.1rem; }
  .typebar__q { font-size: 1.1rem; }
  .typebar__item--ask .btn { white-space: nowrap; min-height: 2.75rem; padding: 0.35rem 0.8rem; font-size: 0.88rem; }
}
/* a tablet or a small laptop (768 to 1,120 px): every tab and "Something else?" on one row, in either language (two
   rows pushed the first stall's name below the first screen at 1,024 x 768) */
@media (min-width: 48.01rem) and (max-width: 70rem) {
  .typebar__list { gap: 0.5rem 0.55rem; padding-inline: 0.2rem; }
  .typebar__tab { gap: 0.45rem; min-height: 3.3rem; padding: 0.3rem 0.8rem 0.3rem 0.35rem; }
  .typebar__pic { width: 2.5rem; height: 2.5rem; }
  .typebar__name { font-size: 1.05rem; }
  .typebar__sub { font-size: 0.8rem; }
  /* under a budget the second line is longer ("128 solares hasta US$150,000"): it may take two lines, so the
     Spanish row still fits */
  .typebar--budget .typebar__sub { white-space: normal; max-width: 9.5rem; }
  .typebar__item--ask { flex-direction: column; align-items: flex-start; gap: 0.15rem; padding-left: 0.2rem; }
  .typebar__q { font-size: 1.15rem; }
  .typebar__item--ask .btn { min-height: 2.75rem; padding: 0.4rem 0.8rem; font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) {
  .typebar__tab, .typebar__tab:hover { transition: none; transform: none; }
}
@media print {
  .typebar { display: none !important; }
}
