/* ---------------------------------------------------------------------------
   The guides as articles (docs/seo-content.md, "The page"): the pages the
   SEO system publishes at /mx/guias/*, /ph/guides/* and /co/guias/*, laid
   out like an editorial article (a header with the hero, a table of contents
   beside the text on wide screens, cards, steps, an FAQ that opens, an author
   box, related guides). Tovi's typefaces and palette (src/input.css),
   self-hosted fonts, no outside host. The file name carries a version
   because /assets/* is cached for a week: a change is a new file
   (guides-3.css) and a new renderer version, never an edit of this one, so a
   page already published keeps the look it was approved with. guides-1.css
   stays for good: a version of the first renderer can always come back (a
   rollback), and it must look as it was checked.
   --------------------------------------------------------------------------- */
@font-face { font-family: "Alfa Slab One"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/alfa-slab-one-400.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/archivo-400.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/archivo-600.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/archivo-700.woff2") format("woff2"); }

:root {
  --ink: #241c17; --red: #c0272d; --red-deep: #8e1b20; --red-soft: #f7e1dc; --cream: #fbf6ea; --sand: #f6efe0; --sand-2: #f0e5cf;
  --line: #d6ccb6; --hairline: #e3dac6; --body: #4a3e35; --muted: #6b5b4e; --mustard: #e8c25a; --mustard-soft: #fbefc8; --paper: #fffdf8;
  --measure: 640px; --toc: 232px; --gap: 64px; --nav: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--cream); color: var(--ink); font: 18px/1.7 "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif; overflow-wrap: break-word; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--red); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red-deep); }
a:focus-visible, summary:focus-visible, .g-btn:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; border-radius: 6px; }
p, li { color: var(--body); }
strong { color: var(--ink); }

.g-wrap { width: 100%; max-width: calc(var(--toc) + var(--gap) + var(--measure) + 40px); margin: 0 auto; padding: 0 20px; }
.g-skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--ink); color: var(--cream); padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.g-skip:focus { top: 12px; color: var(--cream); }

/* The bar at the top */
.g-nav { position: sticky; top: 0; z-index: 10; background: rgba(251, 246, 234, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--hairline); }
.g-nav .g-wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav); }
.g-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--red); text-decoration: none; font-family: "Alfa Slab One", Georgia, serif; text-transform: uppercase; letter-spacing: .12em; font-size: 19px; }
.g-brand img { width: 30px; height: 30px; }
.g-navlink { color: var(--body); font-weight: 600; font-size: 15px; text-decoration: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.g-navlink:hover { color: var(--red-deep); border-color: var(--red); }

/* The header: breadcrumbs, kicker, heading, dek, byline, hero */
.g-head { padding: 28px 0 0; background: linear-gradient(180deg, var(--sand) 0%, var(--sand) 62%, var(--cream) 62%); }
.g-head-text { max-width: calc(var(--toc) + var(--gap) + var(--measure) + 40px); }
.g-head-text > * { max-width: 820px; }
.g-crumbs ol { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.g-crumbs li { color: var(--muted); }
.g-crumbs li + li::before { content: "›"; margin-right: 6px; }
.g-crumbs a { color: var(--muted); }
.g-crumbs [aria-current] { color: var(--ink); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red-deep); }
.g-kicker > span { background: var(--red); color: #fff; padding: 3px 9px; border-radius: 999px; letter-spacing: .08em; }
h1 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: clamp(30px, 5.4vw, 52px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.01em; text-wrap: balance; color: var(--ink); }
.g-dek { font-size: clamp(18px, 2.3vw, 22px); line-height: 1.5; color: var(--body); margin: 0 0 22px; text-wrap: pretty; }
.g-meta { display: flex; align-items: center; gap: 12px; margin: 0 0 26px; }
.g-meta .g-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line); flex: none; }
.g-byline { font-size: 14.5px; line-height: 1.5; color: var(--body); margin: 0; font-weight: 600; }
.g-readtime { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin: 2px 0 0; }
.g-readtime .g-ico { width: 16px; height: 16px; }
.g-hero { margin: 0 auto; max-width: calc(var(--toc) + var(--gap) + var(--measure)); padding: 0 20px; }
.g-hero img { display: block; width: 100%; aspect-ratio: 1200 / 630; border-radius: 22px; border: 1px solid var(--line); background: var(--sand-2); box-shadow: 0 18px 40px -26px rgba(36, 28, 23, .45); }

/* The body: table of contents beside the text */
.g-layout { display: block; padding-top: 34px; }
.g-main { min-width: 0; }
.g-article { max-width: var(--measure); margin: 0 auto; padding-bottom: 40px; }
.g-toc-side { display: none; }
.g-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.g-toc li { counter-increment: toc; }
.g-toc a { display: flex; gap: 10px; padding: 7px 0; color: var(--body); text-decoration: none; font-size: 15px; line-height: 1.4; }
.g-toc a::before { content: counter(toc, decimal-leading-zero); font-weight: 700; color: var(--red); font-size: 12.5px; padding-top: 2px; flex: none; }
.g-toc a:hover { color: var(--red-deep); }
.g-toc-title { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.g-toc-inline { margin: 0 0 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 0 18px; }
.g-toc-inline summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.g-toc-inline summary::-webkit-details-marker { display: none; }
.g-toc-inline summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--red); }
.g-toc-inline[open] summary::after { content: "–"; }
.g-toc-inline ol { padding: 0 0 12px; border-top: 1px solid var(--hairline); }
@media (min-width: 1024px) {
  body { font-size: 19px; }
  .g-layout { display: grid; grid-template-columns: var(--toc) minmax(0, var(--measure)); gap: var(--gap); justify-content: center; }
  .g-article { margin: 0; }
  .g-toc-side { display: block; position: sticky; top: calc(var(--nav) + 24px); align-self: start; max-height: calc(100vh - var(--nav) - 48px); overflow: auto; padding: 4px 0 0; border-top: 3px solid var(--red); padding-top: 14px; }
  .g-toc-inline { display: none; }
}

/* Text */
.g-article > p, .g-article > section > p { margin: 0 0 18px; }
h2 { display: flex; align-items: flex-start; gap: 12px; font-size: clamp(23px, 3vw, 28px); line-height: 1.25; margin: 48px 0 16px; font-weight: 700; color: var(--ink); scroll-margin-top: calc(var(--nav) + 18px); text-wrap: balance; }
/* A long unbroken word in a heading, a card or a mark wraps instead of widening the page. */
h2 > span:last-child, .g-cards p, .g-marks p, .g-callout p, .g-steps p, .g-card-title, .g-card-desc, .g-faq summary, .g-toc a { min-width: 0; overflow-wrap: anywhere; }
.g-h2-ico { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--red-soft); color: var(--red); margin-top: -3px; }
.g-h2-ico .g-ico { width: 22px; height: 22px; }
sup.cite { line-height: 0; }
sup.cite a { text-decoration: none; font-size: 12px; font-weight: 700; padding: 0 1px; }

.g-summary { margin: 0 0 30px; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--red); border-radius: 6px 18px 18px 6px; }
.g-summary-label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.g-summary-label .g-ico { width: 18px; height: 18px; }
.g-lead { font-size: 19.5px; line-height: 1.6; color: var(--ink); margin: 0; }

.g-list { margin: 0 0 22px; padding: 0; list-style: none; }
.g-list li { position: relative; padding-left: 26px; margin: 0 0 10px; }
.g-list li::before { content: ""; position: absolute; left: 6px; top: .68em; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

.g-cards { list-style: none; padding: 0; margin: 4px 0 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .g-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g-cards li { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.g-cards p { margin: 0; font-size: 16.5px; line-height: 1.6; }
.g-cards strong { display: block; font-size: 17.5px; margin-bottom: 2px; }
.g-card-ico { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--mustard-soft); color: var(--red-deep); }
.g-cards-plain li { background: var(--sand); }
@media (min-width: 640px) { .g-cards li:last-child:nth-child(odd) { grid-column: 1 / -1; } }

.g-marks { list-style: none; padding: 0; margin: 0 0 24px; }
.g-marks li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0 0 10px; border-radius: 14px; background: var(--paper); border: 1px solid var(--hairline); }
.g-marks p { margin: 0; }
.g-mark { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; }
.g-mark .g-ico { width: 20px; height: 20px; }
.g-marks-warn .g-mark { background: var(--mustard-soft); color: #8a5a00; }

.g-steps { list-style: none; counter-reset: step; padding: 0; margin: 4px 0 26px; }
.g-steps li { counter-increment: step; position: relative; padding: 0 0 18px 58px; margin: 0; }
.g-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; font-family: "Alfa Slab One", Georgia, serif; font-size: 18px; display: grid; place-items: center; }
.g-steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--line); }
.g-steps p { margin: 0; padding-top: 6px; }

.g-callout { display: flex; gap: 14px; align-items: flex-start; margin: 24px 0; padding: 16px 18px; border-radius: 16px; background: var(--sand); border: 1px solid var(--hairline); }
.g-callout p { margin: 0; }
.g-callout-ico { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); color: var(--red); }
.g-callout.g-warn { background: var(--mustard-soft); border-color: #efd68a; }
.g-callout.g-warn .g-callout-ico { color: #8a5a00; }

.g-table { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.g-table table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.g-table caption { text-align: left; padding: 14px 16px 6px; font-weight: 700; color: var(--ink); }
.g-table th, .g-table td { text-align: left; padding: 11px 16px; border-top: 1px solid var(--hairline); }
.g-table th { background: var(--sand-2); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.g-table tbody tr:nth-child(even) td { background: var(--sand); }

.g-figure { margin: 8px 0 26px; }
.g-figure svg, .g-svg { width: 100%; height: auto; display: block; border-radius: 18px; }
.g-figure > svg:not(.g-slip) { border: 1px solid var(--hairline); }
.g-figure figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.g-drawn { max-width: 560px; }

.g-disclosure { font-size: 14px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; }

/* The call to action */
.g-cta-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 34px 0; padding: 18px 20px; border-radius: 22px; background: var(--ink); }
.g-cta-mascot { width: 64px; height: 64px; border-radius: 50%; background: var(--cream); padding: 4px; flex: none; }
.g-cta { margin: 0; }
.g-btn { display: inline-block; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; padding: 14px 24px; border-radius: 999px; font-size: 17px; line-height: 1.3; box-shadow: 0 6px 0 -2px var(--red-deep); }
.g-btn:hover { background: var(--red-deep); color: #fff; }

/* Questions, sources, the author */
.g-faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); margin: 0 0 10px; padding: 0 18px; }
.g-faq summary { cursor: pointer; list-style: none; padding: 16px 30px 16px 0; font-weight: 700; color: var(--ink); position: relative; line-height: 1.45; }
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 24px; line-height: 1; color: var(--red); }
.g-faq details[open] summary::after { content: "–"; }
.g-faq details p { margin: 0 0 16px; }

.g-sources h2 { font-size: 20px; }
.g-sources ol { font-size: 14.5px; padding-left: 22px; margin: 0; }
.g-sources li { color: var(--muted); margin: 0 0 8px; word-break: break-word; scroll-margin-top: calc(var(--nav) + 18px); }
.g-sources li:target { background: var(--mustard-soft); border-radius: 6px; }

.g-author { display: flex; gap: 16px; align-items: flex-start; margin: 40px 0 0; padding: 20px 22px; background: var(--sand); border-radius: 20px; }
.g-author .g-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--paper); flex: none; }
.g-author h2 { display: block; margin: 0 0 2px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.g-author-name { margin: 0 0 8px; font-weight: 700; color: var(--ink); font-size: 17px; }
.g-author p:not(.g-author-name) { margin: 0 0 8px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }

.g-links ul { padding-left: 20px; }

/* Cards of guides: the related guides and the index */
.g-related { margin: 48px 0 0; padding-top: 8px; border-top: 1px solid var(--hairline); }
.g-related h2 { font-size: 22px; }
.g-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
@media (min-width: 640px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g-related .g-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .g-related .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .g-index-page .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.g-card { margin: 0; }
.g-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.g-card a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(36, 28, 23, .5); }
.g-card img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--sand-2); border-bottom: 1px solid var(--hairline); }
.g-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.g-card .g-kicker { margin: 0; font-size: 11.5px; }
.g-card .g-kicker > span { padding: 2px 7px; }
.g-card-title { font-weight: 700; color: var(--ink); font-size: 17px; line-height: 1.35; }
.g-card-desc { color: var(--body); font-size: 15px; line-height: 1.5; }
.g-card-date { color: var(--muted); font-size: 13px; margin-top: auto; padding-top: 4px; }
@media (prefers-reduced-motion: reduce) { .g-card a { transition: none; } .g-card a:hover { transform: none; } }

/* The guides index */
.g-index-page .g-head { padding-bottom: 30px; background: var(--sand); }
.g-index-page .g-main { padding-top: 30px; padding-bottom: 50px; }
.g-index-page .g-cta-card { max-width: var(--measure); }

/* The foot of the page */
.g-footer { border-top: 1px solid var(--hairline); padding: 26px 0 44px; font-size: 13.5px; color: var(--muted); background: var(--sand); }
.g-footer .g-brand { font-size: 16px; margin-bottom: 8px; }
.g-footer .g-brand img { width: 26px; height: 26px; }
.g-footer p { color: var(--muted); max-width: 820px; }
.g-legal { line-height: 1.55; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .g-head { padding-top: 18px; background: var(--sand); }
  .g-crumbs [aria-current] { display: none; }
  .g-hero { padding: 0; }
  .g-hero img { border-radius: 0; border-left: 0; border-right: 0; }
  .g-lead { font-size: 18px; }
  .g-summary { padding: 16px 16px; }
  h2 { gap: 10px; }
  .g-h2-ico { width: 34px; height: 34px; border-radius: 10px; }
  .g-cta-card { padding: 16px; gap: 12px; }
  .g-cta-mascot { width: 48px; height: 48px; }
  .g-btn { font-size: 16px; padding: 13px 20px; }
  .g-table th, .g-table td { padding: 9px 11px; }
  .g-author { padding: 16px; gap: 12px; }
  .g-author .g-avatar { width: 44px; height: 44px; }
}
