:root {
  --portal-max-width: 1180px;
  --portal-content-width: 760px;
  --portal-font: "Aptos", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --portal-text: #14251d;
  --portal-muted: #5b6b63;
  --portal-background: #f3f6f2;
  --portal-surface: #ffffff;
  --portal-border: #d5e0d8;
  --portal-primary: #0f7048;
  --portal-primary-dark: #08452e;
  --portal-accent: #e4f1e8;
  --portal-blue: #155d78;
  --portal-radius: 8px;
  --portal-shadow: 0 14px 34px rgba(19, 52, 35, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--portal-text);
  background: var(--portal-background);
  font-family: var(--portal-font);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--portal-primary-dark); text-underline-offset: .18em; }
a:hover { color: var(--portal-blue); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #f0a500; outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: .7rem 1rem;
  color: #fff;
  background: #111;
  border-radius: 8px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.portal-shell { width: min(calc(100% - 2rem), var(--portal-max-width)); margin-inline: auto; }

.portal-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid var(--portal-border);
  backdrop-filter: blur(16px);
}
.portal-header__inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.portal-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--portal-text); font-weight: 800; text-decoration: none; line-height: 1.1; }
.portal-brand__mark { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--portal-primary); border-radius: 8px; font-size: .86rem; }
.portal-brand small { display: block; margin-top: .15rem; color: var(--portal-muted); font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.portal-menu-toggle { display: inline-grid; place-items: center; width: 42px; height: 42px; color: var(--portal-text); background: #fff; border: 1px solid var(--portal-border); border-radius: 8px; cursor: pointer; }
.portal-nav { display: none; position: absolute; top: 68px; right: 1rem; left: 1rem; padding: .65rem; background: #fff; border: 1px solid var(--portal-border); border-radius: 8px; box-shadow: var(--portal-shadow); }
.portal-nav[data-open="true"] { display: block; }
.portal-nav ul { display: grid; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.portal-nav a { display: block; padding: .6rem .75rem; color: var(--portal-text); border-radius: 6px; font-size: .9rem; font-weight: 650; text-decoration: none; }
.portal-nav a:hover, .portal-nav a[aria-current="page"] { color: var(--portal-primary-dark); background: var(--portal-accent); }
.portal-nav .nav-cta { color: #fff; background: var(--portal-primary); }
.portal-nav .nav-cta:hover { color: #fff; background: var(--portal-primary-dark); }

.breadcrumb { padding-block: .85rem; color: var(--portal-muted); font-size: .84rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: .4rem; color: #9aa79f; }
.breadcrumb a { color: inherit; }

.portal-hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem); background: linear-gradient(135deg, #ffffff 0%, #f3f7f3 68%, #e5f1e9 100%); border-bottom: 1px solid var(--portal-border); }
.portal-hero__inner { display: grid; gap: 2rem; align-items: center; }
.eyebrow { margin: 0 0 .7rem; color: var(--portal-primary); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.portal-hero h1, .article-header h1 { max-width: 900px; margin: 0; font-size: clamp(2.15rem, 7vw, 4.5rem); line-height: 1.06; letter-spacing: -.025em; }
.portal-hero__lead, .article-header__lead { max-width: 750px; margin: 1.2rem 0 0; color: var(--portal-muted); font-size: clamp(1.08rem, 2.5vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .72rem 1.1rem; border: 1px solid var(--portal-primary); border-radius: 8px; font-weight: 750; text-decoration: none; transition: transform .18s ease, background-color .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button--primary { color: #fff; background: var(--portal-primary); }
.button--primary:hover { color: #fff; background: var(--portal-primary-dark); }
.button--secondary { color: var(--portal-primary-dark); background: #fff; }
.hero-panel { padding: 1.35rem; background: #123d2d; border-radius: var(--portal-radius); box-shadow: var(--portal-shadow); color: #fff; }
.hero-panel strong { display: block; margin-bottom: .4rem; font-size: 1.08rem; }
.hero-panel p { margin: 0; color: #d8eee3; }

.section { padding-block: clamp(2.8rem, 7vw, 5rem); }
.section--white { background: #fff; }
.section-heading { max-width: 720px; margin-bottom: 1.6rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -.025em; }
.section-heading p { margin: .7rem 0 0; color: var(--portal-muted); }
.card-grid { display: grid; gap: 1rem; }
.topic-card { padding: 1.35rem; color: var(--portal-text); background: var(--portal-surface); border: 1px solid var(--portal-border); border-radius: var(--portal-radius); box-shadow: 0 5px 18px rgba(19,52,35,.045); text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.topic-card:hover { border-color: #8fbea2; box-shadow: 0 10px 24px rgba(19,52,35,.08); transform: translateY(-2px); }
.topic-card__label { display: inline-block; margin-bottom: .8rem; color: var(--portal-primary); font-size: .73rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.topic-card h2, .topic-card h3 { margin: 0; font-size: 1.2rem; line-height: 1.25; }
.topic-card p { margin: .6rem 0 0; color: var(--portal-muted); font-size: .95rem; }

.article-header { padding: clamp(2rem, 5vw, 4rem) 0 2rem; }
.article-header h1 { max-width: 920px; font-size: clamp(2.1rem, 6vw, 3.8rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; margin-top: 1.2rem; color: var(--portal-muted); font-size: .88rem; }
.article-layout { display: grid; gap: 2rem; align-items: start; padding-bottom: 4rem; }
.toc { padding: 1.15rem; background: #eaf2ec; border: 1px solid var(--portal-border); border-radius: var(--portal-radius); }
.toc strong { display: block; margin-bottom: .5rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li + li { margin-top: .35rem; }
.toc a { font-size: .92rem; }
.article { max-width: var(--portal-content-width); min-width: 0; }
.article > :first-child { margin-top: 0; }
.article h2 { margin: 2.6rem 0 .8rem; font-size: clamp(1.55rem, 3.5vw, 2rem); line-height: 1.2; letter-spacing: -.025em; scroll-margin-top: 100px; }
.article h3 { margin: 1.7rem 0 .55rem; font-size: 1.24rem; line-height: 1.3; scroll-margin-top: 100px; }
.article p, .article li { color: #27372e; }
.article p { margin: .85rem 0; }
.article ul, .article ol { padding-left: 1.35rem; }
.article li + li { margin-top: .45rem; }
.article a { font-weight: 650; }
.callout { margin: 1.6rem 0; padding: 1.2rem 1.25rem; background: #e8f3ec; border-left: 4px solid var(--portal-primary); border-radius: 0 var(--portal-radius) var(--portal-radius) 0; }
.callout p { margin: 0; }
.practice-list { padding: 1.1rem 1.2rem 1.1rem 2.5rem; background: #fff; border: 1px solid var(--portal-border); border-radius: var(--portal-radius); }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--portal-border); border-radius: var(--portal-radius); }
table { width: 100%; border-collapse: collapse; min-width: 570px; background: #fff; }
th, td { padding: .8rem; border-bottom: 1px solid var(--portal-border); text-align: left; vertical-align: top; }
th { color: var(--portal-primary-dark); background: #edf5f0; }

.cta-course { margin: 2.4rem 0; padding: clamp(1.4rem, 4vw, 2.2rem); color: #fff; background: linear-gradient(135deg, #0b432d, #11724b); border-radius: var(--portal-radius); }
.cta-course h2 { margin: 0 0 .6rem; font-size: 1.55rem; }
.cta-course p { margin: 0 0 1rem; color: #e1f3e8; }
.cta-course .button { color: var(--portal-primary-dark); background: #fff; border-color: #fff; }
.author-box { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: center; margin-top: 2.6rem; padding: 1.3rem; background: #fff; border: 1px solid var(--portal-border); border-radius: var(--portal-radius); }
.author-box img { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; }
.author-box h2 { margin: 0 0 .25rem; font-size: 1.08rem; }
.author-box p { margin: 0; color: var(--portal-muted); font-size: .9rem; }
.related-posts { margin-top: 2.8rem; }
.related-posts h2 { font-size: 1.45rem; }
.related-links { display: grid; gap: .7rem; padding: 0; list-style: none; }
.related-links a { display: block; padding: .9rem 1rem; background: #fff; border: 1px solid var(--portal-border); border-radius: var(--portal-radius); text-decoration: none; transition: border-color .18s ease, background-color .18s ease; }
.related-links a:hover { border-color: #8fbea2; background: #f7fbf8; }

.portal-footer { padding: 3rem 0 1.5rem; color: #dbe9e1; background: #0b281c; }
.portal-footer__grid { display: grid; gap: 2rem; }
.portal-footer h2, .portal-footer h3 { margin: 0 0 .7rem; color: #fff; }
.portal-footer p { color: #b9ccc1; }
.portal-footer ul { margin: 0; padding: 0; list-style: none; }
.portal-footer li + li { margin-top: .4rem; }
.portal-footer a { color: #e8f5ed; }
.portal-footer__bottom { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.14); color: #a9bdb2; font-size: .82rem; }

.whatsapp-contact { position: fixed; right: clamp(12px, 2vw, 24px); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 90; display: inline-flex; align-items: center; gap: .55rem; min-height: 52px; padding: .65rem .9rem; color: #fff; background: #128c4b; border: 2px solid rgba(255,255,255,.9); border-radius: 999px; box-shadow: 0 10px 28px rgba(0,0,0,.3); font-size: .88rem; font-weight: 800; line-height: 1; text-decoration: none; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.whatsapp-contact:hover { color: #fff; background: #0d743d; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.36); }
.whatsapp-contact:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.whatsapp-contact img { width: 26px; height: 26px; flex: 0 0 auto; }

@media (min-width: 720px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .portal-hero__inner { grid-template-columns: minmax(0, 1.55fr) minmax(260px, .7fr); }
}
@media (min-width: 1120px) {
  .portal-menu-toggle { display: none; }
  .portal-nav { display: block; position: static; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .portal-nav ul { display: flex; align-items: center; gap: .35rem; }
  .portal-nav a { padding: .55rem .7rem; }
  .portal-nav .nav-cta { margin-left: .35rem; padding-inline: .9rem; }
  .portal-header__inner { min-height: 72px; }
  .portal-brand__mark { width: 40px; height: 40px; }
  .portal-hero__inner { min-height: 360px; }
  .hero-panel { max-width: 320px; padding: 1.6rem; border-top: 3px solid #a8d9b9; }
  .article-layout { grid-template-columns: 230px minmax(0, var(--portal-content-width)); justify-content: center; gap: 4.5rem; }
  .toc { position: sticky; top: 96px; box-shadow: 0 8px 22px rgba(19,52,35,.045); }
  .article-header { padding-top: clamp(3rem, 6vw, 5rem); }
  .article-header__lead { max-width: 680px; }
  .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topic-card { min-height: 100%; }
  .topic-card__label { letter-spacing: .1em; }
}
@media (max-width: 420px) {
  .portal-brand__text { max-width: 180px; font-size: .86rem; }
  .author-box { grid-template-columns: 1fr; }
  .whatsapp-contact { width: 54px; height: 54px; min-height: 0; padding: 0; justify-content: center; }
  .whatsapp-contact__label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .portal-header, .portal-footer, .cta-course, .toc, .whatsapp-contact { display: none; }
  body { background: #fff; }
  .article-layout { display: block; }
  .article { max-width: none; }
}
