/* ---------------------------------------------------------------------------
   The guides as a blog (docs/seo-content.md, "The page"): the pages the SEO
   system publishes at /mx/guias/*, /ph/guides/* and /co/guias/*, laid out
   the way the top blogs lay out a post (Medium, Substack, Stripe,
   NerdWallet, Investopedia, Ghost): one centred reading column of about 680
   px with large type, a category over the title, the dek and the byline, a
   feature image wider than the text, plain headings and lists, a key-points
   box, the table of contents in the left margin on wide screens, an author
   box and more articles at the end; and a blog home with the newest post
   featured over a grid of cards. 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-4.css) and a new renderer version, never an
   edit of a published one, so a page keeps the look it was checked with.
   This file belongs to the fourth renderer (seo-render.4). guides-1.css and
   guides-2.css stay for good, unchanged: a version of an earlier renderer
   is served with its own stylesheet until the daily live check rebuilds it,
   and a rollback can bring one back, so each 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; --cream: #fbf6ea; --sand: #f6efe0; --sand-2: #f0e5cf;
  --line: #e2d8c4; --hairline: #ece4d3; --body: #3f342c; --muted: #6b5b4e; --mustard: #e8c25a; --mustard-soft: #fbefc8; --paper: #fffdf9;
  --column: 680px; --wide: 1040px; --nav: 60px;
}
* { 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(--paper); 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(--wide) + 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: Tovi / Blog, and the way to every article */
.g-nav { position: sticky; top: 0; z-index: 10; background: rgba(255, 253, 249, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--hairline); }
.g-nav .g-wrap { display: flex; align-items: center; gap: 12px; 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-blogname { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; padding-left: 12px; border-left: 2px solid var(--line); line-height: 1.1; }
.g-navlink { margin-left: auto; color: var(--body); font-weight: 600; font-size: 15px; text-decoration: none; }
.g-navlink:hover, .g-blogname:hover { color: var(--red-deep); }
@media (max-width: 420px) { .g-navlink { display: none; } }

/* A post: the head in the reading column, the feature image wider */
.g-post-head { max-width: calc(var(--column) + 40px); margin: 0 auto; padding: 40px 20px 0; }
.g-crumbs ol { list-style: none; padding: 0; margin: 0 0 22px; 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: min(46ch, 100%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-kicker { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
h1 { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; font-size: clamp(32px, 5.2vw, 50px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.01em; text-wrap: balance; color: var(--ink); overflow-wrap: anywhere; }
.g-dek { font-size: clamp(19px, 2.4vw, 22px); line-height: 1.5; color: var(--muted); margin: 0 0 24px; text-wrap: pretty; }
.g-meta { display: flex; align-items: center; gap: 12px; padding: 16px 0 28px; border-top: 1px solid var(--hairline); }
.g-meta .g-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--sand); flex: none; }
.g-meta > div { min-width: 0; }
.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 8px; max-width: calc(var(--wide) + 40px); padding: 0 20px; }
.g-hero img { display: block; width: 100%; aspect-ratio: 1200 / 630; border-radius: 16px; background: var(--sand-2); }

/* The body: the reading column, the contents in the left margin on wide screens */
.g-post-body { padding: 40px 20px 24px; }
.g-content { max-width: var(--column); margin: 0 auto; min-width: 0; }
.g-toc-side { display: none; }
@media (min-width: 1200px) {
  .g-post-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--column)) minmax(0, 1fr); column-gap: 56px; }
  .g-content { grid-column: 2; margin: 0; }
  /* At most the margin's width: from 1200 px the margin is narrower than 230 px, and the list must never cross the screen's edge. */
  .g-toc-side { display: block; grid-column: 1; grid-row: 1; justify-self: end; width: min(230px, 100%); position: sticky; top: calc(var(--nav) + 28px); align-self: start; max-height: calc(100vh - var(--nav) - 56px); overflow: auto; }
  .g-toc-inline { display: none; }
}
.g-toc ol { list-style: none; margin: 0; padding: 0; }
.g-toc a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.g-toc a:hover { color: var(--red-deep); }
.g-toc-side li { border-left: 2px solid var(--hairline); padding-left: 14px; }
.g-toc-side li:hover { border-left-color: var(--red); }
.g-toc-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.g-toc-inline { margin: 0 0 32px; border: 1px solid var(--line); border-radius: 12px; 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: 4px 0 12px; border-top: 1px solid var(--hairline); counter-reset: toc; }
.g-toc-inline li { counter-increment: toc; }
.g-toc-inline a::before { content: counter(toc) ". "; color: var(--red); font-weight: 700; }

/* Text, as a blog sets it */
.g-content > p, .g-content > section > p { margin: 0 0 1.2em; }
.g-content h2 { font-size: clamp(23px, 3vw, 28px); line-height: 1.25; margin: 2em 0 .6em; font-weight: 700; color: var(--ink); letter-spacing: -.005em; scroll-margin-top: calc(var(--nav) + 18px); text-wrap: balance; overflow-wrap: anywhere; }
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 36px; padding: 20px 24px; background: var(--sand); border-radius: 12px; border-left: 4px solid var(--red); }
.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: 19px; line-height: 1.6; color: var(--ink); margin: 0; }

.g-list { margin: 0 0 1.4em; padding: 0; list-style: none; }
.g-list li { position: relative; padding-left: 28px; margin: 0 0 .7em; overflow-wrap: anywhere; }
.g-list li::before { content: ""; position: absolute; left: 8px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.g-list-warn li::before { background: var(--mustard); width: 9px; height: 9px; left: 7px; top: .66em; border-radius: 2px; transform: rotate(45deg); }

.g-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.4em; }
.g-steps li { counter-increment: step; position: relative; padding: 4px 0 14px 48px; margin: 0; overflow-wrap: anywhere; }
.g-steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 15px; display: grid; place-items: center; }

.g-callout { display: flex; gap: 12px; align-items: flex-start; margin: 1.6em 0; padding: 16px 20px; border-radius: 12px; background: var(--sand); }
.g-callout p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.g-callout-ico { flex: none; color: var(--red); padding-top: 2px; }
.g-callout-ico .g-ico { width: 22px; height: 22px; }
.g-callout.g-warn { background: var(--mustard-soft); }
.g-callout.g-warn .g-callout-ico { color: #8a5a00; }

.g-table { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.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); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }

.g-figure { margin: 1.6em 0; }
.g-figure svg, .g-svg { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--hairline); }
.g-figure figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.g-disclosure { font-size: 14px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; }

/* The call to action, as a banner inside the post */
.g-cta-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 2em 0; padding: 18px 22px; border-radius: 14px; background: var(--ink); }
.g-cta-mascot { width: 56px; height: 56px; border-radius: 50%; background: var(--cream); padding: 4px; flex: none; }
.g-cta { margin: 0; min-width: 0; }
.g-btn { display: inline-block; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; padding: 13px 22px; border-radius: 999px; font-size: 16.5px; line-height: 1.3; }
.g-btn:hover { background: var(--red-deep); color: #fff; }

/* Questions, sources, the author */
.g-faq details { border-bottom: 1px solid var(--line); }
.g-faq details:first-of-type { border-top: 1px solid var(--line); }
.g-faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 700; color: var(--ink); position: relative; line-height: 1.45; overflow-wrap: anywhere; }
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after { content: "+"; position: absolute; right: 2px; top: 13px; 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-links h2 { font-size: 22px; }
.g-author { display: flex; gap: 16px; align-items: flex-start; margin: 3em 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); }
.g-author .g-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--sand); flex: none; }
.g-author > div { min-width: 0; }
.g-content .g-author h2 { margin: 0 0 2px; font-size: 12.5px; letter-spacing: .12em; 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: 15px; line-height: 1.6; color: var(--muted); }

/* More articles: after the post, and on the blog home */
.g-related { max-width: calc(var(--wide) + 40px); margin: 24px auto 0; padding: 36px 20px 8px; border-top: 1px solid var(--hairline); }
.g-related h2, .g-section-title { font-size: 24px; margin: 0 0 20px; font-weight: 700; color: var(--ink); scroll-margin-top: calc(var(--nav) + 18px); }
.g-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.g-card { margin: 0; min-width: 0; }
.g-card a, .g-featured { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.g-card img, .g-featured img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 12px; background: var(--sand-2); transition: opacity .15s ease; }
.g-card a:hover img, .g-featured:hover img { opacity: .9; }
.g-card-body, .g-featured-body { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; min-width: 0; }
.g-card .g-kicker, .g-featured .g-kicker { margin: 0; font-size: 12px; }
.g-card-title { font-weight: 700; color: var(--ink); font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.g-card a:hover .g-card-title, .g-featured:hover .g-featured-title { color: var(--red-deep); }
.g-card-desc { color: var(--muted); font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; }
.g-card-date { color: var(--muted); font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { .g-card img, .g-featured img { transition: none; } }

/* The blog home */
.g-blog-head { padding-top: 44px; padding-bottom: 30px; }
.g-blog-head h1 { max-width: 820px; }
.g-blog-head .g-dek { max-width: 720px; margin-bottom: 0; }
.g-blog { padding-bottom: 48px; }
.g-section-label { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.g-latest { padding: 28px 0 40px; border-top: 1px solid var(--hairline); }
.g-featured-title { font-family: "Alfa Slab One", Georgia, serif; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.g-featured .g-card-desc { font-size: 17px; }
@media (min-width: 860px) {
  .g-featured { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 36px; align-items: center; }
  .g-featured-body { padding-top: 0; }
}
.g-more { padding: 32px 0 8px; border-top: 1px solid var(--hairline); }
.g-blog .g-cta-card { max-width: var(--column); margin-top: 40px; }

/* 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); margin-top: 40px; }
.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 (min-width: 768px) { body { font-size: 20px; } .g-content li, .g-content p { line-height: 1.72; } }
@media (max-width: 560px) {
  .g-post-head { padding-top: 26px; }
  .g-hero { padding: 0; }
  .g-hero img { border-radius: 0; }
  .g-post-body { padding-top: 28px; }
  .g-summary { padding: 16px 18px; }
  .g-cta-card { padding: 16px; gap: 12px; }
  .g-cta-mascot { width: 44px; height: 44px; }
  .g-btn { font-size: 16px; padding: 12px 18px; }
  .g-table th, .g-table td { padding: 9px 11px; }
}
