:root {
  --ao-orange: #F97316;
  --ao-orange-soft: #FFEDD5;
  --ao-navy: #1E3A5F;
  --ao-cream: #FFFBF5;
  --ao-ink: #1A2332;
  --ao-muted: #5B6B7C;
  --ao-card: #ffffff;
  --ao-line: rgba(30, 58, 95, 0.12);
  --ao-radius: 1.25rem;
  --ao-shadow: 0 10px 30px rgba(30, 58, 95, 0.08);
  --ao-measure: 70ch;
  --ao-font-display: "Fredoka", system-ui, sans-serif;
  --ao-font-body: "Poppins", system-ui, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --ao-cream: #0F1724;
  --ao-ink: #E8EEF6;
  --ao-muted: #9AA8B8;
  --ao-card: #162033;
  --ao-line: rgba(255, 255, 255, 0.1);
  --ao-orange-soft: #3A2412;
  --ao-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

body {
  font-family: var(--ao-font-body);
  background: var(--ao-cream);
  color: var(--ao-ink);
  margin: 0;
}

h1, h2, h3, h4, .ao-display {
  font-family: var(--ao-font-display);
  color: var(--ao-navy);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .ao-display {
  color: #F3F7FC;
}

/* Reading progress */
.ao-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 1000;
  background: transparent;
  pointer-events: none;
}
.ao-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ao-orange), #fb923c);
  transition: width 80ms linear;
}

/* Chips */
.ao-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ao-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--ao-line);
  background: var(--ao-card);
  color: var(--ao-navy);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.ao-chip:hover,
.ao-chip.is-active {
  border-color: var(--ao-orange);
  background: var(--ao-orange-soft);
  color: var(--ao-navy);
}
html[data-theme="dark"] .ao-chip { color: var(--ao-ink); }
html[data-theme="dark"] .ao-chip:hover,
html[data-theme="dark"] .ao-chip.is-active { color: #fff; }

/* Cards */
.ao-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.ao-card {
  background: var(--ao-card);
  border: 1px solid var(--ao-line);
  border-radius: var(--ao-radius);
  overflow: hidden;
  box-shadow: var(--ao-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.ao-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(30, 58, 95, 0.12);
}
.ao-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--ao-orange-soft);
}
.ao-card__body { padding: 1rem 1.1rem 1.25rem; display: grid; gap: 0.45rem; }
.ao-card__cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ao-orange);
}
.ao-card__title {
  font-family: var(--ao-font-display);
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0;
  color: var(--ao-navy);
}
html[data-theme="dark"] .ao-card__title { color: #F3F7FC; }
.ao-card__excerpt {
  font-size: 0.92rem;
  color: var(--ao-muted);
  margin: 0;
}

/* Featured */
.ao-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  background: var(--ao-card);
  border: 1px solid var(--ao-line);
  border-radius: calc(var(--ao-radius) + 4px);
  overflow: hidden;
  box-shadow: var(--ao-shadow);
}
.ao-featured img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}
.ao-featured__body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}
.ao-featured__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0;
}

@media (max-width: 800px) {
  .ao-featured { grid-template-columns: 1fr; }
  .ao-featured img { min-height: 200px; max-height: 240px; }
}

/* Single */
.ao-article {
  max-width: var(--ao-measure);
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
}
.ao-article .entry-content,
.ao-article .ao-content {
  font-size: 1.125rem;
  line-height: 1.75;
}
.ao-article .ao-content > * + * { margin-top: 1.1em; }
.ao-article .ao-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

.ao-takeaways {
  background: var(--ao-orange-soft);
  border-left: 4px solid var(--ao-orange);
  border-radius: 0 1rem 1rem 0;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.ao-takeaways h2,
.ao-takeaways strong {
  font-family: var(--ao-font-display);
  color: var(--ao-navy);
  margin: 0 0 0.5rem;
}
html[data-theme="dark"] .ao-takeaways h2,
html[data-theme="dark"] .ao-takeaways strong { color: #fff; }
.ao-takeaways ul { margin: 0; padding-left: 1.2rem; }

.ao-toc {
  border: 1px solid var(--ao-line);
  background: var(--ao-card);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0 1.75rem;
}
.ao-toc summary {
  font-family: var(--ao-font-display);
  cursor: pointer;
  color: var(--ao-navy);
}
html[data-theme="dark"] .ao-toc summary { color: #fff; }
.ao-toc ol {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}
.ao-toc a { color: var(--ao-muted); text-decoration: none; }
.ao-toc a:hover { color: var(--ao-orange); }

.ao-author {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid var(--ao-line);
  border-radius: 1.25rem;
  padding: 1.15rem;
  background: var(--ao-card);
  margin: 2.5rem 0 1.5rem;
}
.ao-author img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
.ao-author h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.ao-author p { margin: 0; color: var(--ao-muted); font-size: 0.92rem; }

.ao-cta {
  background: linear-gradient(135deg, var(--ao-navy), #274b73);
  color: #fff;
  border-radius: 1.25rem;
  padding: 1.25rem 1.35rem;
  margin: 2rem 0;
}
.ao-cta h3 { color: #fff; margin: 0 0 0.4rem; }
.ao-cta p { margin: 0 0 0.9rem; opacity: 0.92; }
.ao-cta .ao-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ao-orange);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
}
.ao-cta .ao-disclosure {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  opacity: 0.8;
}

.ao-sticky-cta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 900;
  background: var(--ao-orange);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.4);
  font-size: 0.9rem;
}
.ao-sticky-cta:hover { filter: brightness(1.05); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}


.ao-fun { font-size: 1.05rem; line-height: 1.65; margin: 1rem 0 1.25rem; padding: 0.85rem 1rem; background: var(--ao-orange-soft, #FFEDD5); border-radius: 1rem; border: 1px dashed rgba(249,115,22,.35); }
.ao-caption { color: var(--ao-muted, #5B6B7C); font-size: 0.95rem; margin: 0.5rem 0 1.25rem; }


/* Prototype premium polish */
a { color: var(--ao-orange); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ao-site-header a,
.ao-site-header a:hover,
.ao-site-header a:visited,
.ao-brand,
.ao-brand:hover,
.ao-brand:visited {
  color: var(--ao-navy) !important;
  text-decoration: none !important;
}
html[data-theme="dark"] .ao-site-header a,
html[data-theme="dark"] .ao-brand { color: #F3F7FC !important; }
.ao-site-header .ao-btn,
.ao-site-header .ao-btn:hover {
  color: var(--ao-navy) !important;
  text-decoration: none !important;
  background: var(--ao-orange);
}
.ao-card, .ao-card:hover, .ao-card:visited,
.ao-featured, .ao-featured:hover, .ao-featured:visited {
  color: inherit;
  text-decoration: none !important;
}
.ao-card__title, .ao-featured__title {
  color: var(--ao-navy);
  text-decoration: none !important;
}
html[data-theme="dark"] .ao-card__title,
html[data-theme="dark"] .ao-featured__title { color: #F3F7FC; }
.ao-featured__title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 0; line-height: 1.15; }
.ao-single-h1 {
  font-family: var(--ao-font-display);
  font-size: clamp(2rem, 4.8vw, 3.1rem);
  line-height: 1.12;
  margin: 0.35rem 0 0;
  color: var(--ao-navy);
  text-wrap: balance;
}
html[data-theme="dark"] .ao-single-h1 { color: #F3F7FC; }
.ao-hero-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 1.25rem; margin: 1rem 0 1.5rem; background: var(--ao-orange-soft); }
.ao-wrap { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.ao-hero { display: grid; gap: 1rem; margin: 1.25rem 0 2rem; }
.ao-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin: 0; color: var(--ao-navy); }
html[data-theme="dark"] .ao-hero h1 { color: #F3F7FC; }
.ao-hero p { font-size: 1.15rem; color: var(--ao-muted); max-width: 42rem; margin: 0; }
.section-title { font-size: 1.5rem; margin: 2rem 0 1rem; }
.ao-byline { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; color: var(--ao-muted); font-size: .9rem; margin: 1rem 0; }
.related-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem 3rem; }
.ao-content img { max-width: 100%; height: auto; border-radius: 1rem; }
.ao-content .featured { display: none; } /* hero already shown */
.ao-content h1 { display: none; } /* page H1 already shown */
.ao-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.ao-brand img { border-radius: 50%; }
.ao-nav { display: flex; gap: .9rem; align-items: center; font-weight: 600; font-size: .9rem; }
.ao-nav a { color: var(--ao-navy); }

@media (max-width: 640px) {
  .ao-site-header .ao-nav a:not(.ao-btn) { display: none; }
  .ao-site-header .ao-brand span { font-size: 0.95rem; }
  .ao-site-header .ao-btn { padding: .4rem .75rem !important; font-size: .85rem; }
  .ao-featured { grid-template-columns: 1fr !important; }
  .ao-card-grid { grid-template-columns: 1fr !important; }
}

/* ===== WordPress / Blocksy integration ===== */
.ao-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--ao-orange);
  color: var(--ao-navy) !important;
  font-weight: 700;
  text-decoration: none !important;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-family: var(--ao-font-display);
  box-shadow: 0 8px 20px rgba(249,115,22,.28);
}
.ao-btn:hover { filter: brightness(1.05); text-decoration: none !important; color: var(--ao-navy) !important; }

/* Hide default Blocksy chrome when custom AO chrome is active */
body.ao-custom-chrome .ct-header,
body.ao-custom-chrome footer.ct-footer,
body.ao-custom-chrome .ct-drawer-canvas { display: none !important; }

body.ao-custom-chrome #main-container,
body.ao-custom-chrome .ct-container,
body.ao-custom-chrome .hero-section {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Home: hide default loop when we render custom home */
body.ao-home-custom .entries,
body.ao-home-custom [data-archive],
body.ao-home-custom .hero-section,
body.ao-home-custom .ct-container > article {
  display: none !important;
}

/* Single: content measure + takeaways/TOC/CTA already classed in content */
body.single .entry-content,
body.single .ct-container > article {
  max-width: var(--ao-measure);
  margin-left: auto;
  margin-right: auto;
}
body.single .entry-content {
  font-size: 1.125rem;
  line-height: 1.75;
  padding-bottom: 3rem;
}
body.single .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}
body.single .entry-content .featured img,
body.single .entry-content figure.featured img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}
aside.ao-cta,
.ao-cta.cta-box,
.cta-box.ao-cta {
  background: linear-gradient(135deg, var(--ao-navy), #274b73);
  color: #fff;
  border-radius: 1.25rem;
  padding: 1.25rem 1.35rem;
  margin: 2rem 0;
  display: block;
}
aside.ao-cta a,
.cta-box a {
  color: #fff;
  font-weight: 700;
}
aside.ao-cta a[href*="metodo"],
.cta-box a[href*="metodo"] {
  display: inline-flex;
  background: var(--ao-orange);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  text-decoration: none !important;
  margin-right: 0.5rem;
}
aside.ao-cta a[href*="hotmart"],
.cta-box a[href*="hotmart"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.disclosure, p.disclosure {
  font-size: 0.95rem;
  color: var(--ao-muted);
  margin: 0 0 1rem;
}
p.author { color: var(--ao-muted); font-size: 0.92rem; }

/* Footer custom */
.ao-site-footer {
  border-top: 1px solid var(--ao-line);
  margin-top: 3rem;
  padding: 2rem 1.25rem;
  color: var(--ao-muted);
  font-size: 0.88rem;
  background: var(--ao-cream);
}
.ao-site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.ao-site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
}
.ao-site-footer a {
  color: var(--ao-navy);
  font-weight: 600;
  text-decoration: none !important;
}
.ao-site-footer a:hover { color: var(--ao-orange); }

.ao-soon {
  opacity: 0.92;
  position: relative;
}
.ao-soon::after {
  content: "Em breve";
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--ao-navy);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}


/* Post body links */
body.single .entry-content a:not(.ao-btn):not([class*="button"]) {
  color: var(--ao-orange);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
body.single .entry-content a:not(.ao-btn):not([class*="button"]):hover {
  color: var(--ao-navy);
}
aside.ao-cta a[href*="metodo"],
.cta-box a[href*="metodo"] {
  color: var(--ao-navy) !important;
}


/* ===== Mobile-first hardening (v1.2.0) ===== */
html, body { max-width: 100%; overflow-x: hidden; }
.entry-content, .ao-content, .ao-article { overflow-wrap: anywhere; word-break: normal; }
.entry-content img, .entry-content video, .entry-content iframe, .entry-content embed,
.entry-content object, .entry-content figure, .entry-content svg { max-width: 100% !important; height: auto; }
.entry-content iframe { aspect-ratio: 16/9; width: 100%; }
.entry-content pre, .entry-content code { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.entry-content pre { overflow-x: auto; }
.ao-takeaways, .ao-toc, .ao-cta, .cta-box, .ao-checklist, .entry-content > * { max-width: 100%; box-sizing: border-box; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { padding: .6rem .7rem; border-bottom: 1px solid var(--ao-line); text-align: left; vertical-align: top; }
.entry-content thead th { background: var(--ao-orange-soft, #FFF1E6); color: var(--ao-navy); font-family: var(--ao-font-display); }
.ao-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.ao-table-scroll + .ao-scroll-hint { font-size: .8rem; color: var(--ao-muted); margin-top: .3rem; }

/* Sticky CTA: compact, appears after 30% scroll, hides over tables/CTA boxes */
.ao-sticky-cta {
  right: .75rem !important; bottom: .75rem !important;
  padding: .55rem 1rem !important; font-size: .9rem !important;
  color: var(--ao-navy) !important; font-weight: 700;
  border-radius: 999px; box-shadow: 0 8px 22px rgba(249,115,22,.35);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.ao-sticky-cta.is-visible { opacity: 1; transform: none; pointer-events: auto; }
body.single .entry-content { padding-bottom: 5rem; }

@media (max-width: 640px) {
  body.single .entry-content { font-size: 1.0625rem; line-height: 1.7; padding-left: 1rem; padding-right: 1rem; }
  body.single .entry-content h2 { font-size: 1.45rem; line-height: 1.25; }
  body.single .entry-content h3 { font-size: 1.2rem; line-height: 1.3; }
  /* Compact one-line header */
  .ao-site-header > div { padding: .5rem .85rem !important; gap: .5rem !important; flex-wrap: nowrap !important; }
  .ao-site-header .ao-brand { min-width: 0; gap: .45rem; }
  .ao-site-header .ao-brand img { width: 32px !important; height: 32px !important; }
  .ao-site-header .ao-brand span { font-size: 1rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ao-site-header .ao-nav { gap: .4rem; flex-shrink: 0; }
  .ao-site-header [data-ao-theme-toggle] { padding: .3rem .5rem !important; }
  .ao-site-header .ao-btn { padding: .35rem .7rem !important; font-size: .82rem !important; }

  /* Tables -> stacked cards */
  .entry-content table.ao-stack, .entry-content table.ao-stack tbody, .entry-content table.ao-stack tr,
  .entry-content table.ao-stack td, .entry-content table.ao-stack th { display: block; width: 100%; }
  .entry-content table.ao-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .entry-content table.ao-stack tr {
    background: var(--ao-card, #fff); border: 1px solid var(--ao-line); border-radius: 16px;
    padding: .55rem .9rem; margin: 0 0 .85rem; box-shadow: 0 6px 18px rgba(30,58,95,.06);
  }
  .entry-content table.ao-stack td { border: 0; border-bottom: 1px dashed var(--ao-line); padding: .45rem 0; }
  .entry-content table.ao-stack td:last-child { border-bottom: 0; }
  .entry-content table.ao-stack td::before {
    content: attr(data-label); display: block; font-size: .72rem; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase; color: var(--ao-orange); margin-bottom: .1rem;
  }
  .entry-content table.ao-stack td:first-child { font-family: var(--ao-font-display); font-weight: 700; color: var(--ao-navy); font-size: 1.05rem; }
  .ao-cta, .cta-box { padding: 1rem !important; }
  .ao-cta a[href*="metodo"], .cta-box a[href*="metodo"] { display: flex !important; justify-content: center; margin: .5rem 0 !important; }
  .ao-sticky-cta { font-size: .85rem !important; padding: .5rem .9rem !important; }
}
@media (max-width: 640px) {
  body.single .hero-section, body.single .entry-header, body.single [class*="hero"] .entry-header { padding-left: 1rem !important; padding-right: 1rem !important; box-sizing: border-box; }
  body.single .entry-header .page-title, body.single h1 { font-size: 1.75rem !important; line-height: 1.2 !important; }
}

/* ===== Unified thin CTA buttons (v1.2.2) ===== */
.ao-btn,
.ao-cta .ao-btn,
aside.ao-cta a[href*="metodo"],
.cta-box a[href*="metodo"],
.entry-content a.btn,
.ao-sticky-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  min-height: 40px;
  padding: .55rem 1.1rem !important;
  font-size: clamp(.85rem, 3.6vw, 1rem) !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  background: var(--ao-orange) !important;
  color: var(--ao-navy) !important;
  text-decoration: none !important;
  box-sizing: border-box;
  max-width: 100%;
}
@media (max-width: 760px) {
  aside.ao-cta a[href*="metodo"], .cta-box a[href*="metodo"], .entry-content a.btn {
    display: flex !important; width: 100%; margin: .6rem 0 !important;
  }
  .ao-sticky-cta { min-height: 36px; padding: .45rem .9rem !important; font-size: .85rem !important; }
}
