:root {
  --bg: #0a0d0a;
  --bg-raised: #0d100d;
  --panel: rgba(255,255,255,.03);
  --panel-border: rgba(255,255,255,.08);
  --text: #F5F7F2;
  --text-dim: rgba(242,245,240,.78);
  --text-dimmer: rgba(242,245,240,.55);
  --accent: #6EFF3C;
  --accent-soft: rgba(110,255,60,.06);
  --accent-border: rgba(110,255,60,.25);
  --font-display: 'Archivo', sans-serif;
  --font-body: 'Manrope', sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-dim);
  font-family: var(--font-body);
  overflow: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #9dff77; text-decoration: underline; }
::selection { background: var(--accent); color: var(--bg); }

img { max-width: 100%; }

/* ---------- Custom scrollbars ---------- */
.sidebar, .main-panel__scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.16) transparent;
}
.sidebar::-webkit-scrollbar, .main-panel__scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar::-webkit-scrollbar-track, .main-panel__scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb, .main-panel__scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.14);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.sidebar::-webkit-scrollbar-thumb:hover, .main-panel__scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(110,255,60,.4);
  background-clip: padding-box;
}

/* ---------- App shell ---------- */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.sidebar {
  flex: none;
  width: 292px;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border-right: 1px solid var(--panel-border);
}

.sidebar__brand {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px;
  border-bottom: 1px solid var(--panel-border);
}
.sidebar__brand-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
}
.sidebar__brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
  color: var(--text);
}
.sidebar__brand-text:hover { color: var(--text); text-decoration: none; }

.sidebar__progress { flex: none; padding: 18px 22px; border-bottom: 1px solid var(--panel-border); }

.progress-pill { display: flex; align-items: center; gap: 10px; }
.progress-pill__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-dimmer);
  white-space: nowrap;
}
.progress-pill__track {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.progress-pill__fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .3s ease;
}

.sidebar__nav { flex: 1; padding: 18px 12px 28px; }

.sidebar__module + .sidebar__module { margin-top: 22px; }

.sidebar__label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin: 0 0 10px;
  padding: 0 12px;
}

.sidebar__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.sidebar__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  margin: 0 4px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--text-dimmer);
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.sidebar__link:hover { background: rgba(255,255,255,.05); color: var(--text); text-decoration: none; }
.sidebar__link.is-active {
  background: linear-gradient(90deg, rgba(110,255,60,.16), rgba(110,255,60,.03));
  color: var(--text);
}
.sidebar__link.is-active::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.sidebar__num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.05);
  color: rgba(242,245,240,.45);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  transition: background .18s ease, color .18s ease;
}
.sidebar__link.is-active .sidebar__num { background: var(--accent); color: var(--bg); }
.sidebar__link.is-done .sidebar__num { background: rgba(110,255,60,.16); color: var(--accent); }
.sidebar__title { flex: 1; min-width: 0; }
.sidebar__check { flex: none; width: 14px; color: var(--accent); font-size: 12px; opacity: 0; }
.sidebar__link.is-done .sidebar__check { opacity: 1; }

/* ---------- Main panel ---------- */
.main-panel { flex: 1; min-width: 0; height: 100vh; display: flex; flex-direction: column; }

.main-panel__header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  height: 60px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(10,13,10,.6);
}

.main-panel__breadcrumb {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dimmer);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main-panel__breadcrumb strong { color: var(--text); font-weight: 800; }

.menu-btn {
  display: none;
  flex: none;
  background: none;
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 15px;
  cursor: pointer;
}

.main-panel__scroll { flex: 1; overflow-y: auto; }

.content { max-width: 780px; margin: 0 auto; padding: 56px 40px 40px; }

/* ---------- Typography helpers (shared with extracted content) ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

/* ---------- Home / index hero ---------- */
.hero {
  max-width: 880px;
  margin: 40px auto 0;
  padding: 0 40px;
}
.hero__media {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
}
.hero__media img { width: 100%; display: block; }

.quickstart {
  max-width: 880px;
  margin: 28px auto 0;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: stretch;
}
.quickstart-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 18px 22px;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.quickstart-card:hover { border-color: var(--accent-border); background: rgba(110,255,60,.05); text-decoration: none; transform: translateY(-2px); }
.quickstart-card__icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
}
.quickstart-card__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}
.quickstart-card__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.progress-card {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 14px 20px;
}
.progress-ring-wrap { position: relative; width: 56px; height: 56px; flex: none; }
.progress-ring { transform: rotate(-90deg); }
.progress-ring__track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 6; }
.progress-ring__fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .5s ease;
}
.progress-card__pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  color: var(--text);
}
.progress-card__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  white-space: nowrap;
}

.toc {
  max-width: 880px;
  margin: 40px auto 0;
  padding: 0 40px 64px;
}
.toc__list { display: flex; flex-direction: column; gap: 2px; }
.toc-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 14px;
  border-radius: 12px;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
.toc-row:hover { background: rgba(255,255,255,.04); text-decoration: none; transform: translateX(2px); }
.toc-row__num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toc-row__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.toc-row__status {
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(242,245,240,.35);
}
.toc-row__status.is-done { color: var(--accent); }

/* ---------- Footer nav ---------- */
.chapter-footer {
  max-width: 780px;
  margin: 48px auto 0;
  padding: 28px 40px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--panel-border);
}

.chapter-footer__side { flex: 1; min-width: 0; }
.chapter-footer__side.is-right { text-align: right; }

.chapter-footer__nav-link {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}
.chapter-footer__nav-link .tag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}
.chapter-footer__nav-link .title { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); }
.chapter-footer__nav-link:hover .title { text-decoration: underline; }

.mark-done-btn {
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  white-space: nowrap;
}
.mark-done-btn.is-done { background: transparent; color: var(--accent); border: 1px solid var(--accent-border); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 50;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 8px 24px rgba(110,255,60,.35);
}
.back-to-top:hover { color: var(--bg); text-decoration: none; }

/* ---------- Interactive components ---------- */
.calc-box {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 20px 0;
}
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.calc-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.calc-field { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-body); font-size: 13px; color: rgba(242,245,240,.6); }
.calc-field.span-2 { grid-column: span 2; }
.calc-field input {
  background: #0a0d0a;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}
.calc-subbox { background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.calc-subbox__label { font-family: var(--font-body); font-size: 13px; color: rgba(242,245,240,.7); margin: 0; }
.calc-subbox__total { font-family: var(--font-body); font-size: 13px; color: var(--accent); margin: 0; text-align: right; }
.calc-section-label { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.calc-result { background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 12px; padding: 16px 18px; }
.calc-result__label { font-family: var(--font-display); font-weight: 800; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.calc-result__value { font-family: var(--font-display); font-weight: 900; font-size: 24px; color: var(--text); margin: 0; }
.calc-result__value.small { font-size: 17px; }

.whatsapp-sim { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; margin: 0 0 48px; }
.phone-frame {
  flex: none;
  width: 240px;
  height: 490px;
  border-radius: 30px;
  border: 8px solid rgba(255,255,255,.14);
  background: #1d1b20;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
}
.phone-frame__status { height: 26px; flex: none; }
.phone-frame__screen { flex: 1; background: #0b141a; padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.phone-frame__bubble { background: #005c4b; border-radius: 10px 10px 2px 10px; padding: 12px 14px; max-width: 92%; align-self: flex-end; }
.phone-frame__bubble p { font-family: var(--font-body); font-size: 13px; line-height: 1.55; color: #f0f0f0; margin: 0; }
.phone-frame__navbar { height: 20px; flex: none; display: flex; align-items: center; justify-content: center; }
.phone-frame__navbar span { width: 90px; height: 3px; border-radius: 2px; background: #fff; opacity: .4; }

.msg-picker { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.msg-picker__label { font-family: var(--font-display); font-weight: 800; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.msg-picker button {
  text-align: left;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: rgba(242,245,240,.85);
  cursor: pointer;
}
.msg-picker button.is-active { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text); }

.objection {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  padding: 16px 20px;
  cursor: pointer;
  margin-bottom: 12px;
}
.objection__q { font-family: var(--font-body); font-size: 15.5px; font-style: italic; color: var(--text); margin: 0; }
.objection__a { font-family: var(--font-body); font-size: 15px; line-height: 1.6; color: rgba(242,245,240,.8); margin: 12px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); display: none; }
.objection.is-open .objection__a { display: block; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  color: rgba(242,245,240,.88);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
}
.checklist .box { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--bg); margin-top: 1px; }
.checklist li.is-checked .box { background: var(--accent); border-color: var(--accent); }
.checklist li.is-checked span.text { text-decoration: line-through; opacity: .6; }

/* ---------- Responsive ---------- */
.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 55;
}

@media (max-width: 1020px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 60;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-scrim { display: block; }
  .menu-btn { display: block; }
}

/* ---------- Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 640px) {
  .main-panel__header { padding: 0 16px; }
  .content { padding: 40px 20px 24px; }
  .hero, .quickstart, .toc { padding-left: 20px; padding-right: 20px; }
  .quickstart { grid-template-columns: 1fr; }
  .chapter-footer { padding: 20px 20px 48px; flex-direction: column; align-items: stretch; }
  .chapter-footer__side.is-right { text-align: left; }
  .calc-grid, .calc-grid.cols-3, .calc-grid.cols-4 { grid-template-columns: 1fr 1fr; }
}
