/* ================================================================
   SOS COOL HOME — DESIGN SYSTEM "THERMAL"
   Premium members area. Tema escuro editorial.
   Assinatura: "leitura térmica" — gradiente ember→glacier que
   esfria conforme o progresso de leitura (38°C → 21°C).
   ================================================================ */

/* ── Tokens ── */
:root {
  --bg:        #07090D;
  --bg-1:      #0D1017;
  --bg-2:      #141926;
  --bg-3:      #1C2334;
  --line:      rgba(148,163,190,.13);
  --line-2:    rgba(148,163,190,.30);

  --txt-1:     #F3F5F9;
  --txt-2:     #A8B0C2;
  --txt-3:     #6D7689;

  --ember:     #FF7A3D;
  --ember-2:   #E8542F;
  --glacier:   #5ED1F2;
  --glacier-2: #3AA9CE;

  --grad-thermal: linear-gradient(90deg, #E8542F 0%, #FF9E5E 42%, #5ED1F2 100%);
  --grad-thermal-soft: linear-gradient(90deg, rgba(232,84,47,.22), rgba(94,209,242,.22));

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --r-sm: 8px;  --r-md: 14px;  --r-lg: 22px;  --r-xl: 30px;

  --shadow-1: 0 4px 20px rgba(0,0,0,.35);
  --shadow-2: 0 16px 50px rgba(0,0,0,.55);
  --glow-glacier: 0 0 24px rgba(94,209,242,.18);
  --glow-ember:   0 0 24px rgba(255,122,61,.22);

  --pad-x: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.22,.9,.28,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--txt-1);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
a { color: inherit; text-decoration: none; cursor: pointer; }
.mono { font-family: var(--font-mono); }

::selection { background: rgba(94,209,242,.28); }
:focus-visible { outline: 2px solid var(--glacier); outline-offset: 2px; border-radius: 4px; }

/* Scrollbar discreta */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .35s var(--ease), border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7,9,13,.82);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px var(--pad-x);
}
.header-left { display: flex; align-items: center; gap: 34px; min-width: 0; }
.header-right { display: flex; align-items: center; gap: 12px; }

.brand { display: flex; align-items: baseline; gap: 9px; flex-shrink: 0; }
.brand-mark {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: 1.35rem; line-height: 1;
  background: var(--grad-thermal);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.brand-mark.small { font-size: 1.1rem; }
.brand-name {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .22em; color: var(--txt-2);
}

.main-nav { display: flex; gap: 4px; }
.nav-item {
  font-size: .86rem; font-weight: 500; color: var(--txt-2);
  padding: 8px 13px; border-radius: var(--r-sm);
  transition: color .2s, background .2s;
}
.nav-item:hover { color: var(--txt-1); background: rgba(255,255,255,.05); }
.nav-item.active { color: var(--txt-1); }

.hdr-icon-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--txt-2); font-size: .84rem; font-weight: 500;
  border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.hdr-icon-btn:hover { color: var(--txt-1); border-color: var(--line-2); background: rgba(255,255,255,.04); }

/* Busca */
.search-wrap { position: relative; display: flex; align-items: center; }
#searchInput {
  width: 0; opacity: 0; padding: 9px 0;
  background: var(--bg-2); border: 1px solid transparent; border-radius: var(--r-sm);
  color: var(--txt-1); font-family: inherit; font-size: .86rem;
  transition: width .3s var(--ease), opacity .25s, padding .3s var(--ease);
}
#searchInput:focus { outline: none; border-color: var(--line-2); }
.search-wrap.open #searchInput { width: min(240px, 42vw); opacity: 1; padding: 9px 13px; border-color: var(--line); }
.search-results {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: min(360px, 86vw); max-height: 380px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  display: none; z-index: 120;
}
.search-results.open { display: block; }
.sr-head { padding: 11px 15px 7px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-3); }
.sr-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 11px 15px; border-top: 1px solid var(--line); transition: background .15s; }
.sr-item:hover { background: rgba(255,255,255,.045); }
.sr-num { font-family: var(--font-mono); font-size: .7rem; color: var(--glacier); padding-top: 3px; flex-shrink: 0; }
.sr-title { font-size: .86rem; font-weight: 600; color: var(--txt-1); }
.sr-excerpt { font-size: .78rem; color: var(--txt-3); margin-top: 2px; }
.sr-excerpt mark { background: none; color: var(--ember); font-weight: 600; }
.sr-empty { padding: 18px 15px; font-size: .84rem; color: var(--txt-3); }

/* Idioma */
.lang-wrap { position: relative; }
.lang-trigger {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--txt-2); transition: color .2s, background .2s;
}
.lang-trigger:hover { color: var(--txt-1); background: rgba(255,255,255,.05); }
.lang-code { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; }
.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 190px; background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); padding: 6px;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity .2s, transform .2s var(--ease); z-index: 120;
}
.lang-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.lang-menu-title { padding: 8px 10px 6px; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-3); }
.lang-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); font-size: .86rem; color: var(--txt-2); transition: background .15s, color .15s; }
.lang-opt:hover { background: rgba(255,255,255,.05); color: var(--txt-1); }
.lang-opt .tick { margin-left: auto; color: var(--glacier); opacity: 0; }
.lang-opt.active { color: var(--txt-1); }
.lang-opt.active .tick { opacity: 1; }

/* Avatar */
.avatar-btn { cursor: pointer; }
.avatar-ring {
  width: 36px; height: 36px; border-radius: 50%; padding: 2px;
  background: var(--grad-thermal);
}
.avatar-initials {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bg-2); color: var(--txt-1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
}

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero {
  position: relative; min-height: min(92vh, 1040px);
  display: flex; align-items: flex-end;
  padding: 130px var(--pad-x) 64px;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-bg-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 42%;
  transform: scaleX(-1) scale(1.12);
  transform-origin: 68% 40%;
  animation: heroDrift 22s var(--ease) forwards;
}
@keyframes heroDrift {
  from { transform: scaleX(-1) scale(1.2); }
  to   { transform: scaleX(-1) scale(1.12); }
}
.hero-scrim-left {
  position: absolute; inset: 0;
  background: linear-gradient(78deg, var(--bg) 12%, rgba(7,9,13,.82) 40%, rgba(7,9,13,.25) 72%, rgba(7,9,13,.45) 100%);
}
.hero-scrim-bottom {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(7,9,13,.55) 32%, transparent 65%);
}
.hero-body { position: relative; max-width: 760px; }

.hero-eyebrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.eyebrow-mono {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--txt-2);
}
.badge-vip {
  font-family: var(--font-mono); font-size: .64rem; font-weight: 700; letter-spacing: .14em;
  color: #0B0E13; background: var(--grad-thermal);
  padding: 5px 10px; border-radius: 5px;
}

.hero-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3rem, 8.5vw, 6.8rem);
  line-height: .95; letter-spacing: -.02em;
  margin-bottom: 22px;
}
.hero-title em {
  font-style: italic; font-weight: 600;
  background: var(--grad-thermal);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--txt-2);
  max-width: 58ch; line-height: 1.65; margin-bottom: 22px;
}
.hero-meta-row {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em;
  color: var(--txt-3); margin-bottom: 30px;
}
.hero-meta-row .dot-sep { color: var(--ember); }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--txt-1); color: var(--bg);
  font-size: .95rem; font-weight: 600;
  padding: 15px 30px; border-radius: var(--r-sm);
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(0,0,0,.22); filter: brightness(1.06); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.07); color: var(--txt-1);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: .95rem; font-weight: 500;
  padding: 15px 26px; border-radius: var(--r-sm);
  transition: background .2s, transform .2s var(--ease);
}
.btn-ghost:hover { background: rgba(255,255,255,.13); transform: translateY(-2px); }

/* Leitura térmica — assinatura */
.thermal-readout { max-width: 460px; }
.thermal-track {
  position: relative; height: 5px; border-radius: 3px;
  background: rgba(148,163,190,.16);
}
.thermal-fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: var(--grad-thermal); border-radius: 3px;
  transition: width 1s var(--ease);
}
.thermal-marker {
  position: absolute; top: 50%; left: 0%;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--glacier);
  transform: translate(-50%, -50%);
  transition: left 1s var(--ease), border-color 1s;
  box-shadow: var(--glow-glacier);
}
.thermal-labels {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 11px;
}
.thermal-temp {
  font-family: var(--font-mono); font-size: 1.06rem; font-weight: 700;
  color: var(--ember); transition: color 1s;
}
.thermal-caption { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; color: var(--txt-3); }

/* ═══════════════════════════════════════════════
   TRUST STRIP
═══════════════════════════════════════════════ */
.trust-strip {
  display: flex; justify-content: center; gap: clamp(22px, 6vw, 84px); flex-wrap: wrap;
  padding: 22px var(--pad-x);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.trust-item {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--txt-2);
}
.trust-item svg { color: var(--glacier); flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   SEÇÕES
═══════════════════════════════════════════════ */
.section { padding: 84px var(--pad-x) 20px; max-width: 1460px; margin: 0 auto; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 34px;
}
.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.01em;
}
.section-sub { color: var(--txt-3); font-size: .92rem; margin-top: 6px; }
.section-sub.wide { max-width: 62ch; }

/* ── Card do produto ── */
.product-card {
  display: grid; grid-template-columns: minmax(260px, 380px) 1fr;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-2);
}
.product-cover { position: relative; min-height: 320px; }
.product-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 55%, var(--bg-1) 100%);
}
.product-body { padding: clamp(26px, 4vw, 48px); }
.product-kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--txt-3); margin-bottom: 14px;
}
.product-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 12px;
}
.product-tagline { color: var(--txt-2); font-size: .98rem; line-height: 1.65; max-width: 60ch; margin-bottom: 26px; }

.product-includes { margin-bottom: 30px; }
.product-includes-title {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--glacier); margin-bottom: 14px;
}
.product-includes ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 9px 26px; }
.product-includes li {
  position: relative; padding-left: 24px;
  font-size: .88rem; color: var(--txt-2);
}
.product-includes li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 12px; height: 6px;
  border-left: 2px solid var(--glacier); border-bottom: 2px solid var(--glacier);
  transform: rotate(-45deg);
}
.product-foot { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.product-price { font-family: var(--font-mono); font-size: .8rem; color: var(--txt-3); }
.product-price strong { color: var(--txt-1); font-size: 1.05rem; font-weight: 700; }

/* ── Grid "Em breve" (produtos futuros, desabilitados) ── */
.soon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.soon-card {
  position: relative;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; cursor: default;
}
.soon-card-img { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-2); }
.soon-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.75) brightness(.6);
}
.soon-card-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-1) 2%, transparent 55%);
}
.soon-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .62rem; font-weight: 700; letter-spacing: .16em;
  background: rgba(7,9,13,.82); backdrop-filter: blur(6px);
  color: var(--txt-2); padding: 6px 11px; border-radius: 5px;
  border: 1px solid var(--line-2);
}
.soon-badge svg { color: var(--txt-3); }
.soon-card-body { padding: 16px 18px 20px; }
.soon-card-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--txt-2); margin-bottom: 6px;
}
.soon-card-tagline { font-size: .82rem; color: var(--txt-3); line-height: 1.55; }

/* ── Footer ── */
.site-footer {
  display: flex; align-items: center; gap: 14px;
  margin-top: 90px; padding: 34px var(--pad-x) 110px;
  border-top: 1px solid var(--line);
  color: var(--txt-3); font-size: .84rem;
}

/* ═══════════════════════════════════════════════
   LEITOR — overlay página a página
═══════════════════════════════════════════════ */
.reader-overlay {
  --r-bg: #0A0D13;
  --r-bg-2: #12151F;
  --r-txt: #E9ECF3;
  --r-txt-2: #A8B0C2;
  --r-line: rgba(148,163,190,.14);
  position: fixed; inset: 0; z-index: 200;
  background: var(--r-bg); color: var(--r-txt);
  transform: translateY(3%); opacity: 0; pointer-events: none;
  transition: transform .4s var(--ease), opacity .3s;
  display: flex; flex-direction: column;
}
.reader-overlay.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.reader-overlay.theme-sepia {
  --r-bg: #F0E7D5; --r-bg-2: #E7DCC4;
  --r-txt: #3A2E20; --r-txt-2: #6E5C46;
  --r-line: rgba(90,70,45,.22);
}
.reader-overlay.theme-light {
  --r-bg: #F7F8FA; --r-bg-2: #EDEFF4;
  --r-txt: #181C26; --r-txt-2: #525B6E;
  --r-line: rgba(20,26,40,.14);
}

.thermal-progress { height: 4px; background: rgba(148,163,190,.12); flex-shrink: 0; }
.thermal-progress-fill { height: 100%; width: 0%; background: var(--grad-thermal); transition: width .5s var(--ease); }

.reader-header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--r-line); flex-shrink: 0;
}
.reader-hdr-left, .reader-hdr-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rdr-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--r-txt-2); font-size: .82rem; font-weight: 500;
  transition: color .2s, background .2s;
}
.rdr-btn:hover { color: var(--r-txt); background: rgba(128,140,160,.1); }
.reader-module-label { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.reader-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.reader-page-num { font-size: .72rem; color: var(--r-txt-2); letter-spacing: .1em; }
.reader-temp { font-size: .86rem; font-weight: 700; color: var(--ember); transition: color .8s; }

.theme-toggle, .font-size-ctrl {
  display: flex; border: 1px solid var(--r-line); border-radius: var(--r-sm); overflow: hidden;
}
.tgl-btn, .font-size-ctrl button {
  padding: 8px 10px; font-size: .78rem; color: var(--r-txt-2);
  transition: background .2s, color .2s;
}
.tgl-btn.active { background: rgba(128,140,160,.16); color: var(--r-txt); }
.font-size-ctrl button:hover, .tgl-btn:hover { color: var(--r-txt); }

.reader-layout { flex: 1; display: flex; min-height: 0; }

/* TOC */
.reader-toc {
  width: 300px; flex-shrink: 0;
  border-right: 1px solid var(--r-line);
  overflow-y: auto; padding: 18px 14px;
  transition: margin-left .35s var(--ease);
}
.reader-toc.hidden { margin-left: -300px; }
.toc-part {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--r-txt-2);
  padding: 16px 10px 8px;
}
.toc-item {
  display: flex; align-items: baseline; gap: 10px; width: 100%;
  text-align: left; padding: 8px 10px; border-radius: var(--r-sm);
  font-size: .82rem; color: var(--r-txt-2);
  transition: background .15s, color .15s;
}
.toc-item:hover { background: rgba(128,140,160,.09); color: var(--r-txt); }
.toc-item.active { background: rgba(94,209,242,.1); color: var(--r-txt); }
.toc-item .toc-num { font-family: var(--font-mono); font-size: .66rem; color: var(--glacier); flex-shrink: 0; }
.toc-item .toc-done { margin-left: auto; color: var(--glacier); font-size: .7rem; }

/* Artigo */
.reader-article {
  flex: 1; overflow-y: auto;
  padding: clamp(26px, 4vw, 52px) clamp(18px, 4vw, 48px) 60px;
  scroll-behavior: smooth;
}
.page-head { max-width: 780px; margin: 0 auto 22px; }
.page-num {
  font-size: .68rem; letter-spacing: .2em; color: var(--glacier);
  display: block; margin-bottom: 10px;
}
.page-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.12; letter-spacing: -.01em;
}
.page-figure { max-width: 780px; margin: 0 auto 30px; }
.page-figure img {
  width: 100%; border-radius: var(--r-md);
  border: 1px solid var(--r-line);
  box-shadow: var(--shadow-2);
  background: var(--r-bg-2);
}

.page-note {
  max-width: 780px; margin: 0 auto 40px;
  background: var(--r-bg-2);
  border: 1px solid var(--r-line);
  border-left: 3px solid var(--glacier);
  border-radius: var(--r-md);
  padding: clamp(20px, 3vw, 30px);
}
.page-note-label {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--glacier);
  margin-bottom: 14px;
}
.note-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad-thermal); }
.page-note-text { font-size: 1rem; line-height: 1.75; color: var(--r-txt-2); }
.page-source {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px dashed var(--r-line);
  font-size: .68rem; letter-spacing: .05em; color: var(--r-txt-2);
  opacity: .75;
}

/* Gráfico didático da página */
.page-chart {
  max-width: 780px; margin: 0 auto 30px;
  background: var(--r-bg-2);
  border: 1px solid var(--r-line);
  border-radius: var(--r-md);
  padding: clamp(16px, 2.5vw, 24px);
}
.page-chart-title {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--r-txt-2);
  margin-bottom: 12px;
}
.page-chart svg { width: 100%; height: auto; display: block; }
.page-chart-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; }
.pc-legend-item {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .66rem; color: var(--r-txt-2);
}
.pc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Marcar como lida */
.footer-mid { display: flex; align-items: center; gap: 12px; }
.mark-read-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 99px;
  border: 1px dashed var(--r-line); color: var(--r-txt-2);
  transition: all .25s var(--ease);
}
.mark-read-btn:hover { color: var(--r-txt); border-color: var(--r-txt-2); }
.mark-read-btn.done {
  border-style: solid; border-color: rgba(94,209,242,.45);
  background: rgba(94,209,242,.1); color: var(--glacier);
}

.reader-article-footer {
  max-width: 780px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-top: 26px; border-top: 1px solid var(--r-line);
}
.footer-nav-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: var(--r-sm);
  border: 1px solid var(--r-line, var(--line)); color: var(--r-txt, var(--txt-1));
  background: transparent;
  font-size: .86rem; font-weight: 500;
  transition: background .2s, transform .2s var(--ease), opacity .2s;
}
.footer-nav-btn:hover:not(:disabled) { background: rgba(128,140,160,.1); transform: translateY(-1px); }
.footer-nav-btn.primary { background: var(--r-txt, var(--txt-1)); color: var(--r-bg, var(--bg)); border-color: transparent; font-weight: 600; }
.footer-nav-btn.primary:hover:not(:disabled) { background: var(--r-txt, var(--txt-1)); filter: brightness(1.08); }
.footer-nav-btn:disabled { opacity: .32; cursor: default; }
.footer-counter { font-size: .74rem; color: var(--r-txt-2); letter-spacing: .1em; }
.reader-back-link {
  max-width: 780px; margin: 26px auto 0;
  font-size: .84rem; color: var(--r-txt-2); cursor: pointer;
  transition: color .2s;
}
.reader-back-link:hover { color: var(--r-txt); }

/* ═══════════════════════════════════════════════
   ADMIN — painel do produtor
═══════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(4,5,8,.66); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.admin-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 310;
  width: min(1020px, 100vw);
  background: var(--bg-1); border-left: 1px solid var(--line-2);
  transform: translateX(102%);
  transition: transform .45s var(--ease);
  display: flex; flex-direction: column;
}
.admin-panel.open { transform: translateX(0); box-shadow: var(--shadow-2); }

.admin-panel-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 28px; border-bottom: 1px solid var(--line);
}
.admin-title-row { display: flex; align-items: center; gap: 14px; }
.admin-title-row h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; }
.admin-tag {
  font-family: var(--font-mono); font-size: .62rem; font-weight: 700; letter-spacing: .16em;
  background: var(--grad-thermal); color: #0B0E13;
  padding: 5px 9px; border-radius: 5px;
}
.admin-demo-note { font-size: .74rem; color: var(--txt-3); }
.close-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--txt-2); font-size: .9rem;
  transition: color .2s, border-color .2s, transform .2s;
}
.close-btn:hover { color: var(--txt-1); border-color: var(--txt-2); transform: rotate(90deg); }

.admin-body { flex: 1; overflow-y: auto; padding: 0 28px 40px; }
.admin-tabs { display: flex; gap: 4px; padding: 18px 0 22px; position: sticky; top: 0; background: var(--bg-1); z-index: 2; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.adm-tab {
  padding: 9px 16px; border-radius: 99px;
  font-size: .84rem; font-weight: 500; color: var(--txt-2);
  border: 1px solid transparent;
  transition: all .2s;
}
.adm-tab:hover { color: var(--txt-1); }
.adm-tab.active { color: var(--txt-1); background: var(--bg-3); border-color: var(--line-2); }

.admin-content { padding-top: 26px; }
.adm-section-title {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--txt-3);
  margin: 30px 0 16px;
}
.adm-section-title:first-child { margin-top: 0; }

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kpi-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 20px;
}
.kpi-label { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-3); margin-bottom: 10px; }
.kpi-value { font-family: var(--font-mono); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; }
.kpi-delta { font-family: var(--font-mono); font-size: .7rem; margin-top: 7px; }
.kpi-delta.up { color: var(--glacier); }
.kpi-delta.down { color: var(--ember); }
.kpi-delta.neutral { color: var(--txt-3); }

/* Gráfico */
.chart-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 20px;
}
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .66rem; color: var(--txt-3); margin-top: 10px; }

/* Funil */
.funnel-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.funnel-label { width: 220px; flex-shrink: 0; font-size: .8rem; color: var(--txt-2); }
.funnel-bar-track { flex: 1; height: 30px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.funnel-bar { height: 100%; background: var(--grad-thermal); border-radius: 6px; min-width: 3px; }
.funnel-value { width: 110px; flex-shrink: 0; text-align: right; font-family: var(--font-mono); font-size: .78rem; color: var(--txt-1); }
.funnel-value small { color: var(--txt-3); }

/* Barras horizontais genéricas */
.hbar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hbar-label { width: 150px; flex-shrink: 0; font-size: .82rem; color: var(--txt-2); display: flex; gap: 8px; align-items: center; }
.hbar-track { flex: 1; height: 8px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--grad-thermal); border-radius: 4px; }
.hbar-fill.cool { background: linear-gradient(90deg, var(--glacier-2), var(--glacier)); }
.hbar-pct { width: 46px; flex-shrink: 0; text-align: right; font-family: var(--font-mono); font-size: .74rem; color: var(--txt-2); }

/* Dois blocos lado a lado */
.adm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

/* Tabela de vendas */
.sales-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.sales-table th {
  text-align: left; font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--txt-3);
  padding: 10px 12px; border-bottom: 1px solid var(--line-2);
}
.sales-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--txt-2); }
.sales-table td:first-child { color: var(--txt-1); font-weight: 500; }
.sales-table tr:hover td { background: rgba(255,255,255,.02); }
.status-pill {
  font-family: var(--font-mono); font-size: .62rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 99px;
}
.status-pill.pago { background: rgba(94,209,242,.12); color: var(--glacier); border: 1px solid rgba(94,209,242,.3); }
.status-pill.reembolsado { background: rgba(255,122,61,.12); color: var(--ember); border: 1px solid rgba(255,122,61,.3); }
.status-pill.ativo { background: rgba(94,209,242,.12); color: var(--glacier); border: 1px solid rgba(94,209,242,.3); }
.status-pill.suspenso { background: rgba(255,122,61,.12); color: var(--ember); border: 1px solid rgba(255,122,61,.3); }

/* Gestão de alunos */
.stu-toolbar { margin-bottom: 12px; }
.stu-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--txt-1); font-family: inherit; font-size: .86rem;
}
.stu-input:focus { outline: none; border-color: var(--glacier-2); }
.stu-input::placeholder { color: var(--txt-3); }
.stu-add {
  display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px;
  margin-bottom: 18px; padding: 14px;
  background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--r-md);
}
.row-action {
  font-family: var(--font-mono); font-size: .64rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 6px;
  border: 1px solid var(--line-2); color: var(--txt-2);
  white-space: nowrap;
  transition: all .2s;
}
.row-action:hover:not(:disabled) { color: var(--txt-1); border-color: var(--txt-2); }
.row-action:disabled { opacity: .6; cursor: default; color: var(--glacier); border-color: rgba(94,209,242,.4); }
.row-action.primary { background: rgba(94,209,242,.1); border-color: rgba(94,209,242,.4); color: var(--glacier); }
.row-action.danger { background: rgba(255,122,61,.08); border-color: rgba(255,122,61,.35); color: var(--ember); }
.row-action.mini { padding: 3px 7px; font-size: .7rem; margin-left: 6px; }
.stu-table td { vertical-align: middle; }
.stu-email { font-size: .8rem; }
.stu-progress { display: flex; align-items: center; gap: 9px; min-width: 130px; }
.stu-actions { display: flex; gap: 7px; flex-wrap: wrap; }

/* Aba produto */
.adm-product-row {
  display: flex; align-items: center; gap: 18px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 12px;
}
.adm-product-row img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); }
.adm-product-info { flex: 1; min-width: 0; }
.adm-product-info h4 { font-size: .98rem; font-weight: 600; }
.adm-product-info p { font-size: .78rem; color: var(--txt-3); margin-top: 3px; }
.toggle {
  position: relative; width: 46px; height: 26px; border-radius: 99px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  transition: background .25s, border-color .25s; flex-shrink: 0;
}
.toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--txt-2); transition: transform .25s var(--ease), background .25s;
}
.toggle.on { background: rgba(94,209,242,.2); border-color: var(--glacier-2); }
.toggle.on::after { transform: translateX(20px); background: var(--glacier); }

/* ═══════════════════════════════════════════════
   MOBILE NAV + RESPONSIVO
═══════════════════════════════════════════════ */
.mobile-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  display: none;
  background: rgba(10,12,17,.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.mob-nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: .62rem; font-weight: 500; color: var(--txt-3);
  padding: 6px 2px; transition: color .2s;
}
.mob-nav-btn.active, .mob-nav-btn:hover { color: var(--txt-1); }

@media (max-width: 960px) {
  .adm-cols { grid-template-columns: 1fr; }
  .funnel-label { width: 150px; }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .admin-btn span { display: none; }
  .mobile-nav { display: flex; }
  .hero { min-height: 84vh; padding-bottom: 46px; }
  .hero-title { font-size: clamp(2.5rem, 12vw, 3.2rem); }
  .hero-actions .btn-primary, .hero-actions .btn-ghost { justify-content: center; }
  .product-card { grid-template-columns: 1fr; }
  .product-cover { min-height: 240px; }
  .product-cover::after { background: linear-gradient(to bottom, transparent 55%, var(--bg-1) 100%); }
  .reader-toc {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 220;
    background: var(--r-bg); width: min(300px, 84vw);
    transform: translateX(-102%); transition: transform .35s var(--ease);
    margin-left: 0; box-shadow: var(--shadow-2);
  }
  .reader-toc.hidden { transform: translateX(-102%); }
  .reader-toc.open { transform: translateX(0); }
  .reader-name { display: none; }
  .rdr-toc-btn span { display: none; }
  .theme-toggle { display: none; }
  .footer-counter { display: none; }
  .site-footer { padding-bottom: 130px; }
}

@media (max-width: 560px) {
  .trust-strip { flex-direction: column; align-items: center; gap: 12px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .eyebrow-mono { font-size: .62rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════
   LOGIN + AUTH MODAL + USER MENU
═══════════════════════════════════════════════ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(94,209,242,.07), transparent 60%),
    radial-gradient(50% 40% at 15% 85%, rgba(232,84,47,.08), transparent 60%),
    var(--bg);
}
.login-wrap { width: min(400px, 100%); }
.login-brand { display: flex; align-items: baseline; justify-content: center; gap: 9px; margin-bottom: 26px; }
.login-card {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 30px 28px;
  box-shadow: var(--shadow-2);
}
.login-title { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; margin-bottom: 8px; }
.login-sub { font-size: .86rem; color: var(--txt-3); margin-bottom: 22px; }
#loginForm { display: flex; flex-direction: column; gap: 11px; }
.login-submit { justify-content: center; margin-top: 6px; }
.login-submit:disabled { opacity: .55; cursor: default; }
.login-forgot {
  margin-top: 16px; font-size: .8rem; color: var(--txt-3);
  transition: color .2s;
}
.login-forgot:hover { color: var(--glacier); }
.login-forgot-ok { margin-top: 16px; font-size: .8rem; color: var(--glacier); }
.login-thermal { margin: 26px auto 0; max-width: 220px; }

/* Modal de criar senha */
.auth-modal {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(4,5,8,.8); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.auth-modal.open { display: flex; }
.auth-card {
  width: min(420px, 100%);
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); padding: 34px 30px;
  box-shadow: var(--shadow-2), var(--glow-glacier);
}
.auth-card .brand-mark { font-size: 1.6rem; display: inline-block; margin-bottom: 18px; }
.auth-title { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; margin-bottom: 8px; }
.auth-sub { font-size: .86rem; color: var(--txt-3); margin-bottom: 22px; }
#authForm { display: flex; flex-direction: column; gap: 11px; }
#authEmail:disabled { opacity: .55; }
.auth-error { min-height: 1.1em; font-size: .78rem; color: var(--ember); }
.auth-submit { justify-content: center; margin-top: 4px; }
.auth-submit:disabled { opacity: .55; }

/* Menu do usuário */
.user-wrap { position: relative; }
.user-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 230px; background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity .2s, transform .2s var(--ease); z-index: 120;
}
.user-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.user-menu-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.user-menu-name { font-weight: 600; font-size: .9rem; }
.user-menu-email { font-size: .74rem; color: var(--txt-3); margin-top: 2px; word-break: break-all; }
.user-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 12px 16px; font-size: .84rem; color: var(--txt-2);
  transition: background .15s, color .15s;
}
.user-menu-item:hover { background: rgba(255,255,255,.05); color: var(--txt-1); }

/* Admin só aparece para role=admin */
.admin-btn, .mob-admin { display: none; }
body.is-admin .admin-btn { display: flex; }
body.is-admin .mob-admin { display: flex; }
@media (max-width: 860px) {
  body.is-admin .admin-btn { display: none; }
}

/* ═══════════════════════════════════════════════
   CONTEÚDO RICO (GitBook-style) · área de leitura +25%
═══════════════════════════════════════════════ */
.page-head, .page-figure, .page-note, .page-chart,
.reader-article-footer, .reader-back-link { max-width: 980px; }

.page-note { padding: clamp(26px, 4vw, 44px); }

/* Tipografia rica */
.page-rich { font-size: 1.2rem; line-height: 1.72; color: var(--r-txt-2); }
.page-rich > *:first-child { margin-top: 0; }
.page-rich h3 {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.32em; line-height: 1.25; color: var(--r-txt);
  margin: 1.7em 0 .6em; letter-spacing: -.01em;
}
.page-rich h4 {
  font-weight: 700; font-size: 1.06em; color: var(--r-txt);
  margin: 1.4em 0 .5em;
}
.page-rich p { margin: .85em 0; }
.page-rich ul, .page-rich ol { margin: .85em 0; padding-left: 1.4em; }
.page-rich li { margin: .45em 0; }
.page-rich li::marker { color: var(--glacier); }
.page-rich strong { color: var(--r-txt); font-weight: 600; }
.page-rich hr { border: none; border-top: 1px solid var(--r-line); margin: 1.8em 0; }
.page-rich blockquote {
  margin: 1.2em 0; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--ember);
  font-style: italic; color: var(--r-txt);
}
.page-rich a {
  color: var(--glacier); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: rgba(94,209,242,.4);
  transition: text-decoration-color .2s;
}
.page-rich a:hover { text-decoration-color: var(--glacier); }

/* Callouts */
.page-rich .callout {
  margin: 1.2em 0; padding: 15px 18px 15px 16px;
  border-radius: var(--r-sm); border: 1px solid var(--r-line);
  border-left-width: 3px; background: rgba(128,140,160,.06);
  font-size: .92em;
}
.page-rich .callout strong { display: block; margin-bottom: 5px; font-size: .9em; letter-spacing: .02em; }
.page-rich .callout p { margin: 0; }
.page-rich .callout.info    { border-left-color: var(--glacier); background: rgba(94,209,242,.07); }
.page-rich .callout.info strong { color: var(--glacier); }
.page-rich .callout.tip     { border-left-color: #4ADE80; background: rgba(74,222,128,.06); }
.page-rich .callout.tip strong { color: #4ADE80; }
.page-rich .callout.warning { border-left-color: #F5C85A; background: rgba(245,200,90,.07); }
.page-rich .callout.warning strong { color: #F5C85A; }
.page-rich .callout.danger  { border-left-color: var(--ember); background: rgba(255,122,61,.07); }
.page-rich .callout.danger strong { color: var(--ember); }
.reader-overlay.theme-sepia .page-rich .callout.tip strong,
.reader-overlay.theme-light .page-rich .callout.tip strong { color: #1E9E4F; }
.reader-overlay.theme-sepia .page-rich .callout.warning strong,
.reader-overlay.theme-light .page-rich .callout.warning strong { color: #A67C10; }

/* Tabelas */
.page-rich table {
  width: 100%; border-collapse: collapse; margin: 1.2em 0;
  font-size: .88em;
}
.page-rich th {
  text-align: left; font-family: var(--font-mono); font-size: .78em;
  letter-spacing: .1em; text-transform: uppercase; color: var(--r-txt-2);
  padding: 9px 12px; border-bottom: 2px solid var(--r-line);
}
.page-rich td { padding: 9px 12px; border-bottom: 1px solid var(--r-line); }
.page-rich tr:hover td { background: rgba(128,140,160,.05); }

/* Figuras */
.page-rich figure { margin: 1.4em 0; }
.page-rich figure img {
  width: 100%; border-radius: var(--r-md);
  border: 1px solid var(--r-line);
}
.page-rich figcaption {
  margin-top: 9px; text-align: center;
  font-family: var(--font-mono); font-size: .72em; color: var(--r-txt-2);
  opacity: .8;
}

/* Notícias por país (capa) */
.page-rich .news-list {
  display: flex; flex-direction: column; gap: 10px; margin: 1em 0 1.4em;
}
.page-rich .news-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--r-line); background: rgba(128,140,160,.05);
  text-decoration: none !important;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.page-rich .news-item:hover {
  border-color: rgba(255,122,61,.5); background: rgba(255,122,61,.06);
  transform: translateX(3px);
}
.page-rich .news-flag {
  font-family: var(--font-mono); font-size: .68em; font-weight: 700;
  letter-spacing: .08em; color: var(--ember);
  border: 1px solid rgba(255,122,61,.35); border-radius: 5px;
  padding: 3px 6px; margin-top: 2px; flex-shrink: 0;
}
.page-rich .news-body strong { display: block; font-size: .92em; color: var(--r-txt); }
.page-rich .news-body span { display: block; margin-top: 3px; font-size: .82em; color: var(--r-txt-2); }

/* ═══════════════════════════════════════════════
   TEMA CLARO (padrão) · toggle no header
═══════════════════════════════════════════════ */
[data-site-theme="light"] {
  --bg:        #F5F7FA;
  --bg-1:      #FFFFFF;
  --bg-2:      #EEF1F6;
  --bg-3:      #E0E6EF;
  --line:      rgba(18,28,48,.10);
  --line-2:    rgba(18,28,48,.22);

  --txt-1:     #141A28;
  --txt-2:     #47536B;
  --txt-3:     #8590A5;

  --ember:     #E05A10;
  --ember-2:   #C74E0B;
  --glacier:   #0E8FA8;
  --glacier-2: #0B7A90;

  --shadow-1: 0 4px 16px rgba(18,28,48,.08);
  --shadow-2: 0 16px 44px rgba(18,28,48,.14);
  --glow-glacier: 0 0 24px rgba(14,143,168,.18);
  --glow-ember:   0 0 24px rgba(224,90,16,.20);
}

/* Ajustes específicos do tema claro */
[data-site-theme="light"] .site-header.scrolled {
  background: rgba(255,255,255,.85);
}
[data-site-theme="light"] .nav-item:hover,
[data-site-theme="light"] .hdr-icon-btn:hover,
[data-site-theme="light"] .lang-trigger:hover,
[data-site-theme="light"] .lang-opt:hover,
[data-site-theme="light"] .user-menu-item:hover,
[data-site-theme="light"] .sr-item:hover {
  background: rgba(18,28,48,.05);
}
[data-site-theme="light"] .btn-ghost {
  background: rgba(18,28,48,.05);
  border-color: rgba(18,28,48,.2);
}
[data-site-theme="light"] .btn-ghost:hover { background: rgba(18,28,48,.1); }
[data-site-theme="light"] .sales-table tr:hover td { background: rgba(18,28,48,.03); }
[data-site-theme="light"] .mobile-nav { background: rgba(255,255,255,.94); }
[data-site-theme="light"] .thermal-marker { background: var(--bg-1); }
[data-site-theme="light"] .login-page {
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(14,143,168,.08), transparent 60%),
    radial-gradient(50% 40% at 15% 85%, rgba(224,90,16,.07), transparent 60%),
    var(--bg);
}
[data-site-theme="light"] .auth-modal,
[data-site-theme="light"] .modal-backdrop { background: rgba(18,28,48,.45); }

/* Badge de idioma (substitui emoji de bandeira) */
.lang-flag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; padding: 2px 5px;
  font-family: var(--font-mono); font-size: .62rem; font-weight: 700;
  letter-spacing: .08em; border-radius: 5px;
  background: var(--bg-3); color: var(--txt-2);
}
.lang-trigger .lang-flag { background: var(--grad-thermal); color: #0B0E13; }

/* Hero no tema claro: véu sólido à esquerda, imagem livre à direita */
[data-site-theme="light"] .hero-scrim-left {
  background: linear-gradient(90deg,
    var(--bg) 26%, rgba(245,247,250,.9) 40%,
    rgba(245,247,250,.32) 58%, rgba(245,247,250,0) 76%);
}
[data-site-theme="light"] .hero-scrim-bottom {
  background: linear-gradient(to top,
    var(--bg) 6%, rgba(245,247,250,.55) 34%, rgba(245,247,250,0) 62%);
}

/* ═══════════════════════════════════════════════
   DIÁRIO TÉRMICO (protocolo 72h)
═══════════════════════════════════════════════ */
.diary-chips {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.diary-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .76rem; color: var(--txt-2);
}
.diary-chip-arrow { color: var(--txt-3); font-size: .8rem; }
.diary-step-num {
  font-size: .66rem; font-weight: 700; color: var(--glacier);
  border: 1px solid rgba(94,209,242,.35); border-radius: 5px;
  padding: 2px 6px; flex-shrink: 0;
}
.diary-panel {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: clamp(16px, 2.5vw, 22px);
}
.diary-form-title {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--txt-3);
  white-space: nowrap; padding-bottom: 8px;
}
.diary-form {
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 12px;
}
.diary-form label { flex: 1; min-width: 130px; }
.diary-form label span {
  display: block; font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--txt-3);
  margin-bottom: 6px;
}
.diary-submit { justify-content: center; padding: 11px 18px; }
.diary-saved { font-size: .8rem; color: var(--glacier); margin-bottom: 8px; }
.diary-empty { font-size: .86rem; color: var(--txt-3); }
.diary-chart { margin-top: 4px; }


/* ═══════════════════════════════════════════════
   IMPRESSÃO A4 (páginas do guia)
═══════════════════════════════════════════════ */
@media print {
  body { background: #fff !important; }
  body > *:not(.reader-overlay) { display: none !important; }
  .reader-overlay {
    position: static !important; opacity: 1 !important;
    transform: none !important; pointer-events: auto !important;
    display: block !important;
    --r-bg: #fff; --r-bg-2: #fff; --r-txt: #111; --r-txt-2: #333; --r-line: #ccc;
  }
  .thermal-progress, .reader-header, .reader-toc,
  .reader-article-footer, .reader-back-link { display: none !important; }
  .reader-layout { display: block !important; }
  .reader-article { overflow: visible !important; padding: 0 !important; }
  .page-head, .page-figure, .page-note, .page-chart { max-width: 100%; }
  .page-figure img { box-shadow: none; max-height: 15cm; object-fit: contain; }
  .page-rich { font-size: 10.5pt !important; }
  .page-note { border-left-width: 2px; }
}

/* ── Diário em destaque + tooltip do gráfico ── */
.hero-diary-link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 18px;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--glacier);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.hero-diary-link:hover { border-bottom-color: var(--glacier); }
.hero-diary-link::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad-thermal);
}

#diarySection .section-title::before {
  content: ''; display: inline-block; width: 26px; height: 4px;
  border-radius: 2px; background: var(--grad-thermal);
  margin-right: 10px; vertical-align: middle;
}

.diary-chart { position: relative; }
.diary-chart .dp { pointer-events: none; transition: r .15s; }
.diary-chart .dp-hit { cursor: pointer; }
.diary-tip {
  position: absolute;
  min-width: 150px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 10px 12px;
  box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none;
  transition: opacity .15s;
  z-index: 5;
}
.diary-tip.show { opacity: 1; }
.diary-tip-date { font-size: .64rem; letter-spacing: .1em; color: var(--txt-3); margin-bottom: 7px; }
.diary-tip-row {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .76rem; font-weight: 700;
  color: var(--txt-1); margin: 4px 0;
}
.diary-tip-row small { font-weight: 400; color: var(--txt-3); }
.diary-tip-sleep { color: var(--txt-2); font-weight: 500; }


/* ── Alerta de calor: cards de notícia com thumbnail ── */
#newsSection { padding-top: 56px; }
.news-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.news-card {
  display: block; background: var(--bg-1);
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232,84,47,.45);
  box-shadow: var(--shadow-2), var(--glow-ember);
}
.news-card-img { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-2); }
.news-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-img.no-img img { display: none; }
.news-card-img.no-img { background: var(--grad-thermal-soft); }
.news-card-source {
  position: absolute; left: 10px; bottom: 10px;
  font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(7,9,13,.82); color: #F3F5F9;
  padding: 5px 9px; border-radius: 5px;
  backdrop-filter: blur(6px);
}
.news-card-body { padding: 14px 16px 15px; }
.news-card-title { font-size: .92rem; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.news-card-desc { font-size: .78rem; color: var(--txt-2); line-height: 1.5; margin-bottom: 10px; }
.news-card-date { font-size: .64rem; letter-spacing: .1em; color: var(--ember); font-weight: 700; }

/* ── Diário Térmico: FAB flutuante ── */
.diary-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 250;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); color: var(--txt-1);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-2), var(--glow-glacier);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.diary-fab::before {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  padding: 2px; background: var(--grad-thermal);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.diary-fab:hover { transform: translateY(-3px) scale(1.05); }
.diary-fab-badge {
  position: absolute; bottom: -4px; right: -4px;
  font-size: .62rem; font-weight: 700;
  background: var(--grad-thermal); color: #fff;
  border-radius: 99px; padding: 3px 7px;
  box-shadow: var(--shadow-1);
}
.diary-fab-pulse {
  position: absolute; top: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ember);
  animation: fabPulse 1.6s ease-in-out infinite;
}
@keyframes fabPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: .45; }
}
@media (max-width: 860px) {
  .diary-fab { bottom: calc(84px + env(safe-area-inset-bottom)); right: 16px; }
}

/* ── Diário Térmico: drawer lateral ── */
.diary-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(4,5,8,.6); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.diary-backdrop.open { opacity: 1; pointer-events: auto; }

.diary-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 310;
  width: min(430px, 100vw);
  background: var(--bg-1); border-left: 1px solid var(--line-2);
  transform: translateX(102%);
  transition: transform .45s var(--ease);
  display: flex; flex-direction: column;
}
.diary-drawer.open { transform: translateX(0); box-shadow: var(--shadow-2); }
.diary-drawer-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
  position: relative; flex-shrink: 0;
}
.diary-drawer-hdr::before {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px;
  height: 3px; border-radius: 0 0 3px 3px;
  background: var(--grad-thermal);
}
.diary-drawer-body { flex: 1; overflow-y: auto; padding: 22px; }

.diary-drawer .diary-chips {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 22px; padding-bottom: 0; border: none;
}
.diary-drawer .diary-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 15px;
  font-size: .8rem; color: var(--txt-2); line-height: 1.45;
}
.diary-drawer .diary-form {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 20px;
}
.diary-drawer .diary-form label { min-width: 0; }
.diary-drawer .diary-submit { align-self: stretch; }
.diary-drawer .diary-chart { padding: 12px 12px 4px; }
.diary-drawer .diary-empty { margin-top: 4px; }

/* ── Diário drawer: correções de formulário e identidade ── */
.diary-head-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.diary-pulse {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad-thermal); box-shadow: var(--glow-ember);
}
.diary-head-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.diary-step-num {
  font-size: .66rem; font-weight: 700; color: var(--glacier);
  border: 1px solid rgba(94,209,242,.35); border-radius: 99px;
  background: rgba(94,209,242,.12);
  padding: 2px 8px; flex-shrink: 0;
}
.diary-drawer .diary-form label { display: block; }
.diary-drawer .diary-form label span {
  display: block; font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--txt-3);
  margin-bottom: 7px;
}
.diary-submit {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 99px; padding: 13px 26px;
  background: var(--grad-thermal); color: #fff;
  font-weight: 700; font-size: .9rem; border: none;
  transition: transform .2s var(--ease), filter .2s;
}
.diary-submit:hover { transform: translateY(-1px); filter: brightness(1.08); }
.diary-submit:active { transform: translateY(0); }
.diary-saved { font-size: .8rem; color: var(--glacier); margin-bottom: 10px; }
.diary-tip {
  position: absolute; min-width: 150px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px;
  box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none;
  transition: opacity .15s; z-index: 5;
}
.diary-tip.show { opacity: 1; }
.diary-tip-date { font-size: .64rem; letter-spacing: .1em; color: var(--txt-3); margin-bottom: 7px; }
.diary-tip-row {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .76rem; font-weight: 700;
  color: var(--txt-1); margin: 4px 0;
}
.diary-tip-row small { font-weight: 400; color: var(--txt-3); }
.diary-tip-sleep { color: var(--txt-2); font-weight: 500; }
.diary-chart { position: relative; }
.diary-chart .dp { pointer-events: none; transition: r .15s; }
.diary-chart .dp-hit { cursor: pointer; }
.diary-drawer .diary-form { align-items: stretch; }
