/* Guía Credito Automotor — editorial utility system.
   Use .site-header/.site-nav for the shared shell, .hero for lead pages,
   .guide-grid + .guide-card for indexes, .article-layout for long reads,
   .callout for notices, .guide-pager for related reading, and .legal-page
   for policy pages. All components are plain semantic HTML/CSS. */

:root {
  color-scheme: light;
  --paper: #f6f3eb;
  --paper-deep: #ece8dc;
  --surface: #fffdf8;
  --ink: #183b3c;
  --ink-soft: #466160;
  --muted: #71817b;
  --line: #d9ddd2;
  --accent: #e65e3c;
  --accent-dark: #bd452b;
  --signal: #d4df69;
  --teal-pale: #e2eeea;
  --shadow: 0 18px 48px rgba(24, 59, 60, .09);
  --font-body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --content: 1160px;
  --reading: 740px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 26px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
img { display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent-dark); }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--ink); background: var(--signal); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: absolute; z-index: 100; top: 10px; left: 10px;
  padding: 10px 14px; transform: translateY(-160%);
  border-radius: var(--radius-sm); background: var(--ink); color: var(--surface);
}
.skip-link:focus { transform: translateY(0); }
.container { width: min(var(--content), calc(100% - 48px)); margin-inline: auto; }
.reading-width { width: min(var(--reading), calc(100% - 48px)); margin-inline: auto; }

/* Shared masthead: toggle button controls the adjacent .site-nav on small screens. */
.site-header {
  position: relative; z-index: 20;
  border-bottom: 1px solid rgba(24, 59, 60, .12);
  background: rgba(246, 243, 235, .96);
}
.header-inner {
  min-height: 86px; display: flex; align-items: center; justify-content: space-between;
  gap: 36px;
}
.site-brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none; flex: 0 0 auto;
}
.brand-mark {
  width: 39px; height: 39px; display: grid; place-items: center;
  border-radius: 12px 12px 12px 3px; background: var(--accent); color: var(--surface);
  font-family: var(--font-display); font-size: 23px; font-weight: 700; line-height: 1;
}
.brand-name { max-width: 180px; font-size: 13px; line-height: 1.2; font-weight: 750; letter-spacing: -.02em; }
.brand-name span { display: block; color: var(--muted); font-weight: 500; margin-top: 4px; }
.menu-toggle {
  display: none; width: 46px; height: 46px; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface);
  cursor: pointer;
}
.menu-toggle-lines, .menu-toggle-lines::before, .menu-toggle-lines::after {
  display: block; width: 17px; height: 2px; background: currentColor; border-radius: 4px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle-lines { position: relative; }
.menu-toggle-lines::before, .menu-toggle-lines::after { position: absolute; content: ""; left: 0; }
.menu-toggle-lines::before { transform: translateY(-5px); }
.menu-toggle-lines::after { transform: translateY(5px); }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after { transform: rotate(-45deg); }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 38px); }
.site-nav a {
  position: relative; color: var(--ink-soft); text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: .015em;
}
.site-nav a::after {
  position: absolute; right: 0; bottom: -8px; left: 0; height: 2px;
  content: ""; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-note {
  padding-left: 18px; border-left: 1px solid var(--line); color: var(--muted);
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
}

/* Compact location trail shared by guides and legal pages. */
.breadcrumbs { padding: 20px 0 0; color: var(--muted); font-size: 12px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: #a7b0a6; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs [aria-current="page"] { color: var(--ink-soft); }

/* Lead panel. Keep the visual emphasis in typography and geometry, not stock imagery. */
.hero {
  position: relative; overflow: hidden; padding: clamp(54px, 8vw, 104px) 0 clamp(58px, 8vw, 100px);
}
.hero::before {
  position: absolute; z-index: -1; top: 24px; right: max(4vw, calc((100vw - var(--content)) / 2 - 14px));
  width: clamp(190px, 27vw, 360px); aspect-ratio: 1; content: "";
  border: 1px solid rgba(24, 59, 60, .13); border-radius: 50%;
  box-shadow: 0 0 0 25px rgba(212, 223, 105, .12), 0 0 0 58px rgba(24, 59, 60, .035);
}
.hero-copy { max-width: 800px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px;
  color: var(--accent-dark); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
}
.eyebrow::before { width: 25px; height: 2px; content: ""; background: currentColor; }
.hero h1, .page-title {
  max-width: 900px; margin: 0; font-family: var(--font-display);
  font-size: clamp(44px, 7.6vw, 92px); font-weight: 500; letter-spacing: -.055em; line-height: .99;
}
.hero h1 em { color: var(--accent); font-weight: 500; }
.hero-intro {
  max-width: 610px; margin: 26px 0 0; color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 20px); line-height: 1.6;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 30px; color: var(--muted); font-size: 12px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { width: 6px; height: 6px; content: ""; border-radius: 50%; background: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button-link {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 12px;
  padding: 0 20px; border: 1px solid var(--ink); border-radius: 3px 14px 14px 14px;
  background: var(--ink); color: var(--surface); text-decoration: none; font-size: 13px; font-weight: 750;
  transition: transform .2s ease, background .2s ease;
}
.button-link:hover { transform: translateY(-2px); background: #245354; color: var(--surface); }
.button-link.secondary { background: transparent; color: var(--ink); }
.button-link.secondary:hover { background: var(--teal-pale); color: var(--ink); }
.button-arrow { color: var(--signal); font-size: 18px; line-height: 1; }
.button-link.secondary .button-arrow { color: var(--accent); }

.section { padding: clamp(50px, 7vw, 84px) 0; }
.section-heading {
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  margin-bottom: 30px; padding-bottom: 19px; border-bottom: 1px solid var(--line);
}
.section-kicker { margin: 0 0 7px; color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.section-heading h2 { margin: 0; font-family: var(--font-display); font-size: clamp(30px, 4vw, 48px); font-weight: 500; letter-spacing: -.04em; line-height: 1.08; }
.section-heading p { max-width: 370px; margin: 0; color: var(--muted); font-size: 14px; }

/* Index tiles intentionally use an offset feature article followed by compact guide rows. */
.guide-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.guide-card {
  position: relative; display: flex; min-height: 250px; flex-direction: column; align-items: flex-start;
  padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: 3px var(--radius-md) var(--radius-md) var(--radius-md);
  background: var(--surface); color: var(--ink); text-decoration: none; overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.guide-card:hover { transform: translateY(-4px); border-color: #a9bbb1; box-shadow: var(--shadow); color: var(--ink); }
.guide-card.featured { grid-column: span 7; min-height: 350px; background: var(--ink); color: var(--surface); }
.guide-card.featured:hover { color: var(--surface); }
.guide-card.featured::after {
  position: absolute; right: -46px; bottom: -105px; width: 270px; height: 270px; content: "";
  border: 1px solid rgba(212, 223, 105, .45); border-radius: 50%;
  box-shadow: 0 0 0 25px rgba(212, 223, 105, .06), 0 0 0 55px rgba(212, 223, 105, .04);
}
.guide-card:not(.featured) { grid-column: span 5; }
.card-category { color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.featured .card-category { color: var(--signal); }
.card-number { margin: auto 0 12px; color: #a2b8ad; font-family: var(--font-display); font-size: 13px; }
.card-title { max-width: 530px; margin: 0; font-family: var(--font-display); font-size: clamp(25px, 3vw, 38px); font-weight: 500; letter-spacing: -.035em; line-height: 1.12; }
.guide-card:not(.featured) .card-title { margin-top: 24px; font-size: clamp(23px, 2.5vw, 31px); }
.card-description { max-width: 480px; margin: 13px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.featured .card-description { max-width: 440px; color: #c3d0c7; }
.card-link { display: inline-flex; align-items: center; gap: 11px; margin-top: 24px; font-size: 12px; font-weight: 750; }
.card-link span { color: var(--accent); font-size: 19px; transition: transform .2s ease; }
.guide-card:hover .card-link span { transform: translateX(4px); }
.featured .card-link span { color: var(--signal); }
.topic-strip {
  display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px;
}
.topic-chip {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px;
  color: var(--ink-soft); font-size: 11px; font-weight: 650;
}

/* Article reading rhythm, metadata, in-page table of contents, and numbered sections. */
.article-header { padding: 40px 0 48px; border-bottom: 1px solid var(--line); }
.article-header .page-title { max-width: 850px; font-size: clamp(40px, 6.3vw, 72px); }
.article-deck { max-width: 700px; margin: 22px 0 0; color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); }
.article-byline { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; color: var(--muted); font-size: 12px; }
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: clamp(40px, 8vw, 110px);
  align-items: start; padding: 50px 0 80px;
}
.article-body { min-width: 0; color: #334f4e; font-size: 17px; line-height: 1.82; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2, .article-body h3 {
  color: var(--ink); font-family: var(--font-display); font-weight: 500; letter-spacing: -.035em; line-height: 1.15;
}
.article-body h2 { margin: 2.1em 0 .55em; font-size: clamp(29px, 3.5vw, 40px); }
.article-body h3 { margin: 1.8em 0 .5em; font-size: 25px; }
.article-body p { margin: 0 0 1.25em; }
.article-body ul, .article-body ol { padding-left: 1.35em; margin: .8em 0 1.5em; }
.article-body li { padding-left: .35em; margin: .4em 0; }
.article-body li::marker { color: var(--accent); font-weight: 800; }
.article-body strong { color: var(--ink); }
.article-body a { color: var(--accent-dark); font-weight: 650; }
.article-body blockquote {
  margin: 1.8em 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--accent);
  color: var(--ink); font-family: var(--font-display); font-size: 24px; line-height: 1.4;
}
.article-aside { position: sticky; top: 24px; }
.toc {
  padding: 22px 20px; border-top: 3px solid var(--signal); border-radius: 0 0 14px 14px;
  background: var(--teal-pale);
}
.toc-title { margin: 0 0 12px; color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.toc ol { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.toc a { color: var(--ink-soft); text-decoration: none; font-size: 12px; line-height: 1.4; }
.toc a:hover { color: var(--accent-dark); }
.article-figure { margin: 2em 0; }
.article-figure img { width: 100%; border-radius: var(--radius-md); background: var(--paper-deep); }
.article-figure figcaption { margin-top: 9px; color: var(--muted); font-size: 12px; }

/* Informational notices: choose .callout--important or --plain as needed. */
.callout {
  margin: 1.7em 0; padding: 21px 24px; border: 1px solid #c8d5a0;
  border-left: 4px solid #9cab43; border-radius: 2px 13px 13px 13px; background: #f0f2db;
  color: var(--ink-soft); font-size: 15px; line-height: 1.65;
}
.callout-title { display: block; margin-bottom: 5px; color: var(--ink); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.callout p:last-child { margin-bottom: 0; }
.callout--important { border-color: #eab7a8; border-left-color: var(--accent); background: #fae9e2; }
.callout--plain { border-color: var(--line); border-left-color: var(--ink-soft); background: var(--surface); }

/* Previous/next article navigation. */
.guide-pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 25px 0 60px;
  border-top: 1px solid var(--line);
}
.pager-link {
  min-height: 120px; display: flex; flex-direction: column; justify-content: center;
  padding: 20px 23px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); text-decoration: none; transition: border-color .2s ease, transform .2s ease;
}
.pager-link:hover { transform: translateY(-3px); border-color: #a9bbb1; }
.pager-link.next { text-align: right; }
.pager-direction { color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pager-title { margin-top: 5px; font-family: var(--font-display); font-size: 22px; line-height: 1.2; }

/* Legal pages use the same reading measure with a calm, clearly labeled intro. */
.legal-hero { padding: 56px 0 32px; }
.legal-hero .page-title { font-size: clamp(42px, 6vw, 68px); }
.legal-updated { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.legal-page { padding: 30px 0 90px; }
.legal-page .article-body { font-size: 16px; }
.legal-page .article-body h2 { font-size: 29px; }

/* Shared footer and visible editorial disclaimer. */
.site-footer { padding: 54px 0 22px; background: var(--ink); color: #d9e2d9; }
.footer-main {
  display: grid; grid-template-columns: minmax(220px, 1.1fr) 1fr 1fr;
  gap: clamp(30px, 6vw, 80px); padding-bottom: 42px;
}
.footer-brand { color: var(--surface); }
.footer-brand .brand-name span { color: #a9beb3; }
.footer-description { max-width: 310px; margin: 19px 0 0; color: #b9c9bf; font-size: 13px; }
.footer-heading { margin: 2px 0 14px; color: var(--signal); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.footer-links { display: grid; justify-items: start; gap: 9px; }
.footer-links a { color: #d9e2d9; font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: var(--signal); }
.footer-disclaimer {
  padding: 17px 19px; border: 1px solid rgba(212, 223, 105, .35); border-radius: 2px 12px 12px 12px;
  color: #d8dfc0; font-size: 12px; line-height: 1.6;
}
.footer-disclaimer strong { color: var(--signal); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 18px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .16); color: #a9beb3; font-size: 11px;
}
.footer-bottom p { margin: 0; }

.hero-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .82fr);
  align-items: center; gap: clamp(34px, 6vw, 84px);
}
.hero-visual { position: relative; margin: 0; }
.hero-visual img {
  width: 100%; aspect-ratio: 1.35; object-fit: cover; object-position: center 74%; border-radius: 2px var(--radius-lg) var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero-visual figcaption { max-width: 370px; margin: 12px 0 0 auto; color: var(--muted); font-size: 11px; text-align: right; }
.section-soft { background: var(--paper-deep); }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.category-card {
  display: flex; min-height: 240px; flex-direction: column; align-items: flex-start;
  padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: 2px var(--radius-md) var(--radius-md) var(--radius-md);
  background: var(--surface); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-index { color: var(--accent-dark); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.category-card h2, .category-card h3 { margin: 25px 0 0; font-family: var(--font-display); font-size: clamp(25px, 3vw, 36px); font-weight: 500; letter-spacing: -.035em; line-height: 1.15; }
.category-card p { max-width: 470px; margin: 11px 0 0; color: var(--muted); font-size: 14px; }
.category-card .card-link { margin-top: auto; padding-top: 20px; }
.glossary-entry { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.glossary-entry h2 { margin-bottom: 10px; }
.section-heading > a { flex: 0 0 auto; font-size: 13px; font-weight: 700; }
.legal-hero .article-deck { max-width: 710px; }
.article-header .breadcrumbs { margin-bottom: 26px; }
.site-nav a[aria-current="page"] { text-decoration: none; }

.empty-state {
  padding: 46px 30px; border: 1px dashed #b7c4b5; border-radius: var(--radius-md);
  background: rgba(255, 253, 248, .55); text-align: center;
}
.empty-state h2 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 500; }
.empty-state p { max-width: 430px; margin: 9px auto 0; color: var(--muted); font-size: 14px; }

@media (min-width: 1200px) {
  .hero { padding-top: 105px; }
}
@media (max-width: 760px) {
  .container, .reading-width { width: min(100% - 36px, var(--content)); }
  .header-inner { min-height: 72px; gap: 18px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { max-width: 150px; font-size: 12px; }
  .menu-toggle { display: inline-flex; flex: 0 0 auto; }
  .site-nav {
    position: absolute; top: calc(100% - 1px); right: 0; left: 0; display: none;
    align-items: stretch; flex-direction: column; gap: 0; padding: 8px 18px 17px;
    border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: 0 18px 24px rgba(24, 59, 60, .08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid rgba(24, 59, 60, .09); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a::after { display: none; }
  .header-note { display: none; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-visual { max-width: 600px; }
  .hero-visual img { aspect-ratio: 1; object-position: center top; }
  .hero-visual figcaption { margin-left: 0; text-align: left; }
  .hero { padding: 54px 0 62px; }
  .hero::before { top: 12px; right: -108px; width: 230px; opacity: .72; }
  .hero-copy { position: relative; }
  .hero h1 { max-width: 650px; font-size: clamp(43px, 11vw, 70px); }
  .hero-intro { max-width: 560px; margin-top: 20px; font-size: 17px; }
  .section { padding: 50px 0; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .guide-grid { grid-template-columns: 1fr; gap: 12px; }
  .category-grid { grid-template-columns: 1fr; }
  .guide-card.featured, .guide-card:not(.featured) { grid-column: auto; min-height: 250px; }
  .guide-card.featured { min-height: 300px; }
  .article-header { padding: 28px 0 35px; }
  .article-layout { grid-template-columns: 1fr; gap: 30px; padding: 34px 0 52px; }
  .article-aside { position: static; grid-row: 1; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-body { font-size: 16px; }
  .guide-pager { gap: 9px; padding-bottom: 44px; }
  .pager-link { min-height: 112px; padding: 15px; }
  .pager-title { font-size: 18px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px 22px; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .container, .reading-width { width: calc(100% - 30px); }
  .brand-name { max-width: 138px; }
  .hero h1 { font-size: 43px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button-link { width: 100%; }
  .toc ol { grid-template-columns: 1fr; }
  .guide-pager { grid-template-columns: 1fr; }
  .pager-link.next { text-align: left; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-about { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
