@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/fraunces-500.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/fraunces-700.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/outfit-400.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/outfit-500.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/outfit-600.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/outfit-700.woff2") format("woff2");
}

:root {
  --ink: #1c2430;
  --ink-soft: #4e5968;
  --paper: #f3efe6;
  --paper-deep: #e7e0d2;
  --white: #fffcf8;
  --teal: #14645c;
  --teal-deep: #102f2c;
  --teal-mid: #1d4f49;
  --teal-soft: #e6f3ef;
  --gold: #8d6b2f;
  --gold-soft: #f6edd9;
  --clay: #a3472e;
  --clay-soft: #f8ebe4;
  --line: #e0d6c6;
  --shadow: 0 18px 40px rgba(28, 36, 48, 0.08);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --radius: 22px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(20, 100, 92, 0.08), transparent 55%),
    radial-gradient(900px 420px at -10% 20%, rgba(163, 71, 46, 0.06), transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay); }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
li + li { margin-top: 0.35rem; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--white);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  z-index: 50;
}
.skip:focus { top: 0.8rem; }

.wrap { width: min(var(--wrap), calc(100% - 2rem)); margin-inline: auto; }
.wrap-narrow { width: min(760px, calc(100% - 2rem)); margin-inline: auto; }

.topbar {
  background: var(--teal-deep);
  color: #f6f1e6;
  font-size: 0.86rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
}
.topbar a { color: #f0d48a; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 239, 230, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(224, 214, 198, 0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 42px; height: 42px; }
.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.15rem 0.35rem; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  background: var(--teal-soft);
  color: var(--teal-deep);
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.hero { padding: 2.6rem 0 1.2rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.8rem;
}
.kicker::before {
  content: "";
  width: 1.4rem;
  height: 2px;
  background: var(--gold);
}
h1 { font-size: clamp(2.3rem, 4.6vw, 4.3rem); }
.lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 42rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.3rem 0 0.4rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn-primary { background: var(--teal); color: #f7f3ea; }
.btn-primary:hover { background: var(--teal-mid); color: white; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.hero-figure {
  background: var(--white);
  border-radius: 28px;
  padding: 0.7rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero-figure img { border-radius: 20px; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.hero-figure figcaption { color: var(--ink-soft); font-size: 0.88rem; padding: 0.7rem 0.5rem 0.3rem; }

.fact-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin: 1.4rem 0 0.4rem;
}
.fact {
  background: rgba(255, 252, 248, 0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
}
.fact strong { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.fact span { color: var(--ink-soft); font-size: 0.92rem; }

.section { padding: 2.4rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.2rem;
}
.section-head p { margin: 0; color: var(--ink-soft); max-width: 38rem; }
.section h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.topic {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
}
.topic, a.card, a.guide-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.topic:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.topic.span { grid-row: span 2; grid-column: 1; min-height: 100%; background:
  linear-gradient(180deg, rgba(16, 47, 44, 0.08), rgba(16, 47, 44, 0.45)),
  url("/img/ahorro-frascos.jpg") center/cover;
  color: #f7f3ea;
  border: 0;
}
.topic.span p, .topic.span span { color: #f3ecdf; }
.topic .tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}
.topic h3 { font-size: 1.55rem; margin: 0.4rem 0; }
.topic p { color: var(--ink-soft); margin: 0; }

.card-grid, .guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.card, .guide-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.15rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
a.card:hover, a.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.chip {
  align-self: flex-start;
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.chip.clay { background: var(--clay-soft); color: var(--clay); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.guide-card h3, .card h3 { font-size: 1.28rem; }
.guide-card p, .card p { color: var(--ink-soft); margin: 0; flex: 1; }
.more { font-weight: 650; color: var(--teal); font-size: 0.95rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.step {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1.15rem;
}
.step em {
  font-family: var(--serif);
  font-style: normal;
  font-size: 1.8rem;
  color: var(--gold);
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
  align-items: center;
}
.photo-frame {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}
.photo-frame img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.panel {
  background: var(--teal-deep);
  color: #f6f1e6;
  border-radius: 28px;
  padding: 1.5rem;
}
.panel h2, .panel h3 { color: #f6f1e6; }
.panel a { color: #f0d48a; }
.panel ul { margin-bottom: 0; }
.soft {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.3rem;
}

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}
.flow article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
}
.flow strong { font-family: var(--serif); font-size: 1.2rem; display: block; margin-bottom: 0.3rem; }

.page-hero { padding: 2.2rem 0 0.4rem; }
.page-hero h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); max-width: 16ch; }
.crumbs { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 0.8rem; }
.crumbs a { color: var(--ink-soft); }

.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
  padding-bottom: 2.5rem;
}
.toc {
  position: sticky;
  top: 96px;
  background: rgba(255, 252, 248, 0.8);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem 1rem;
}
.toc p { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--gold); margin-bottom: 0.4rem; }
.toc ol { padding-left: 1.1rem; margin: 0; }
.toc a { color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.toc a:hover { color: var(--teal); }

.prose { font-size: 1.08rem; }
.prose h2 { font-size: 1.85rem; margin: 2rem 0 0.7rem; }
.prose h3 { font-size: 1.3rem; margin: 1.3rem 0 0.4rem; }
.prose .lead-in { font-size: 1.22rem; color: #2a3340; }
.article-meta { color: var(--ink-soft); font-size: 0.92rem; }

.note, .example {
  border-radius: 18px;
  padding: 0.95rem 1rem;
  margin: 1rem 0 1.2rem;
}
.note { background: var(--gold-soft); border: 1px solid #ead7aa; }
.example { background: var(--teal-soft); border: 1px solid #c9e4dc; }
.note p:last-child, .example p:last-child { margin-bottom: 0; }
.label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.note .label { color: var(--gold); }
.example .label { color: var(--teal); }

.table-wrap { overflow-x: auto; margin: 0.6rem 0 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); background: #faf7f1; }
tr:last-child td { border-bottom: 0; }

.chart {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  margin: 1rem 0;
}
.chart svg { width: 100%; height: auto; }
.chart figcaption { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.4rem; }

.related { margin-top: 1.4rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.mini {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  text-decoration: none;
  color: var(--ink);
}
.mini:hover { color: var(--teal-deep); }
.mini span { display: block; color: var(--ink-soft); font-size: 0.82rem; }

.glossary dt {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin-top: 1.25rem;
}
.glossary dd { margin: 0.25rem 0 0; color: #314050; }
.letter {
  margin-top: 1.8rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
  color: var(--gold);
  font-size: 1.1rem;
}

.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.05rem;
}
.faq details p { margin: 0.7rem 0 0.2rem; color: #314050; }

.path-list { display: grid; gap: 0.9rem; }
.path {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.1rem 1.2rem;
}
.path ol { margin-bottom: 0; }

.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.check {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem 1.1rem 0.4rem;
}

.contact-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: stretch;
}
.contact-link {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 0.7rem;
}
.contact-link strong { display: block; font-size: 1.2rem; color: var(--teal-deep); }
.contact-link span { color: var(--ink-soft); }

.site-footer {
  background: var(--teal-deep);
  color: #f4eee4;
  margin-top: 2rem;
  padding: 2.2rem 0 1.2rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr 0.9fr; gap: 1.4rem; }
.footer-brand {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin: 0 0 0.6rem;
}
.disclaimer {
  background: rgba(240, 212, 138, 0.12);
  border: 1px solid rgba(240, 212, 138, 0.45);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  color: #f6f1e6;
}
.site-footer h2 { font-size: 1rem; font-family: var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: #f0d48a; }
.site-footer a { color: #f6f1e6; text-decoration: none; }
.site-footer a:hover { color: #f0d48a; }
.site-footer ul { list-style: none; padding: 0; }
.footer-base {
  border-top: 1px solid rgba(246, 241, 230, 0.15);
  margin-top: 1.3rem;
  padding-top: 0.9rem;
  color: #d9d0c2;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .hero-grid, .split, .contact-card, .layout, .bento, .footer-grid { grid-template-columns: 1fr; }
  .topic.span { grid-row: auto; min-height: 260px; }
  .card-grid, .guide-grid, .steps, .fact-row, .flow, .related-grid, .check-grid { grid-template-columns: 1fr 1fr; }
  .toc { position: static; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    left: 0;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0.5rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .topbar-inner { flex-direction: column; gap: 0.1rem; }
}
@media (max-width: 680px) {
  .card-grid, .guide-grid, .steps, .fact-row, .flow, .related-grid, .check-grid { grid-template-columns: 1fr; }
  .page-hero h1 { max-width: none; }
  body { font-size: 1.02rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topic, .card, .guide-card, a.card, a.guide-card { transition: none; }
}
@media print {
  .topbar, .site-header, .site-footer, .toc, .nav-toggle { display: none !important; }
  body { background: white; }
  .layout { display: block; }
  a { color: black; }
}
