:root {
  --navy-950: #061a2a;
  --navy-900: #072237;
  --navy-800: #0d3653;
  --navy-700: #174d70;
  --blue-100: #eaf3f8;
  --blue-50: #f5f9fc;
  --gold-500: #d8aa3f;
  --gold-400: #e6c063;
  --gold-100: #fbf2d6;
  --ink: #10243a;
  --muted: #617187;
  --line: #d9e3ec;
  --surface: #ffffff;
  --success: #166534;
  --success-bg: #ecfdf3;
  --warning: #9a5b09;
  --warning-bg: #fff7e6;
  --shadow: 0 18px 50px rgba(7, 34, 55, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(216, 170, 63, 0.10), transparent 28rem),
    linear-gradient(180deg, #f7fafc 0%, #ffffff 44%, #f7fafc 100%);
  line-height: 1.6;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 9999;
  background: #fff;
  color: var(--navy-900);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

.section-shell {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 34, 55, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
}
.header-shell {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
  min-height: 92px;
  display: flex;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  min-width: 0;
  width: 100%;
}
.brand-logo {
  width: 208px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}
.brand-copy {
  display: flex;
  align-items: center;
  line-height: .98;
  color: #fff;
  min-width: 0;
  flex: 1 1 auto;
}
.brand-title {
  font-weight: 800;
  letter-spacing: -0.035em;
}
.brand-title-desktop {
  display: block;
  font-size: clamp(2.15rem, 2.8vw, 2.8rem);
  line-height: 1;
  white-space: nowrap;
}
.brand-title-mobile { display: none; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn, .install-btn, .footer-share {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  cursor: pointer;
  transition: .2s ease;
}
.icon-btn { width: 42px; padding: 0; font-size: 1.2rem; }
.icon-btn:hover, .install-btn:hover, .footer-share:hover { background: rgba(255,255,255,.16); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr);
  gap: 28px;
  padding-top: 64px;
  padding-bottom: 58px;
  align-items: stretch;
}
.hero-copy {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 62px);
  box-shadow: var(--shadow);
}
.hero-copy::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  right: -100px;
  top: -100px;
  background: radial-gradient(circle, rgba(230,192,99,.32), transparent 68%);
}
.eyebrow {
  display: inline-block;
  color: var(--gold-500);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 14px 0 16px;
  max-width: 720px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(2.15rem, 6vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -.035em;
}
.hero-lead { max-width: 720px; margin: 0; color: rgba(255,255,255,.78); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold-500); color: var(--navy-950); box-shadow: 0 10px 24px rgba(216,170,63,.22); }
.btn-primary:hover { background: var(--gold-400); }
.btn-secondary { background: #fff; color: var(--navy-800); border-color: var(--line); }
.btn.small { min-height: 42px; padding-inline: 16px; }

.next-ebd-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: 0 12px 34px rgba(7,34,55,.08);
}
.next-ebd-label { color: var(--gold-500); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.next-ebd-card strong { margin-top: 12px; font-size: 2rem; color: var(--navy-900); }
.next-ebd-card > span:not(.next-ebd-label) { color: var(--muted); font-size: 1.05rem; }
.next-ebd-card small { margin-top: 6px; color: var(--muted); }
.countdown-pill {
  margin-top: 24px;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--success);
  background: var(--success-bg);
  font-weight: 700;
  font-size: .84rem;
  text-align: center;
}

.weekly-section, .quiz-section, .history-section { padding: 34px 0 52px; }
.section-heading { max-width: 760px; margin-bottom: 24px; }
.section-heading h2, .institution-card h2 {
  color: var(--navy-900);
  margin: 8px 0 8px;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -.03em;
}
.section-heading p { margin: 0; color: var(--muted); }
.compact-heading { margin-bottom: 18px; }

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 22px;
}
.lesson-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 14px 34px rgba(7,34,55,.07);
  min-width: 0;
}
.lesson-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.class-badge {
  background: var(--blue-100);
  color: var(--navy-700);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: .73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.lesson-date { color: var(--muted); font-size: .78rem; font-weight: 600; }
.lesson-number { margin-top: 22px; color: var(--gold-500); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.lesson-title { margin: 7px 0 18px; color: var(--navy-900); font-size: 1.45rem; line-height: 1.28; letter-spacing: -.02em; }
.lesson-summary-wrap h4, .lesson-points-wrap h4 { margin: 18px 0 6px; color: var(--navy-800); font-size: .9rem; }
.lesson-summary { margin: 0; color: #405469; }
.lesson-points { margin: 8px 0 0; padding-left: 20px; color: #405469; }
.lesson-points li + li { margin-top: 6px; }
.verse-box, .truth-box, .application-box {
  margin-top: 18px;
  border-radius: var(--radius-sm);
  padding: 16px;
}
.verse-box { background: var(--gold-100); border: 1px solid #efdaa1; }
.verse-box span { display: block; color: #8a670d; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.verse-box p { margin: 6px 0 0; color: #5d4a17; }
.truth-box { background: #f6f9fb; border: 1px solid #dce5ec; }
.truth-box span { display: block; color: var(--navy-700); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.truth-box p { margin: 6px 0 0; color: #405469; }
.application-box { background: var(--blue-50); border: 1px solid #dceaf2; }
.application-box strong { color: var(--navy-700); font-size: .82rem; }
.application-box p { margin: 5px 0 0; color: #405469; }
.lesson-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 24px; }
.lesson-actions .btn { flex: 1 1 190px; }
.lesson-card.unavailable { background: #fbfcfd; }
.lesson-card.unavailable .lesson-title { color: #506275; }
.lesson-card.error { border-color: #f1c7c7; }

.skeleton { height: 15px; margin-top: 14px; border-radius: 99px; background: linear-gradient(90deg,#edf2f6,#f8fafb,#edf2f6); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton-title { height: 30px; width: 82%; margin-top: 28px; }
.skeleton.short { width: 58%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.status-note {
  margin-top: 16px;
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
  color: var(--warning);
  padding: 12px 14px;
  font-size: .88rem;
}
.quiz-grid, .history-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.quiz-card, .history-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.quiz-card strong, .history-card strong { color: var(--navy-800); }
.quiz-card span, .history-card span { color: var(--muted); font-size: .82rem; }
.quiz-card a, .history-card a { white-space: nowrap; }

.institutional-section { display: grid; grid-template-columns: 1.35fr .85fr; gap: 22px; padding: 34px 0 76px; }
.institution-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  border-radius: var(--radius-lg);
  padding: 28px;
}
.scripture-card { background: linear-gradient(135deg, var(--navy-950), var(--navy-800)); color: #fff; }
.scripture-card h2 { color: #fff; }
.scripture-card p { color: rgba(255,255,255,.76); margin-bottom: 0; }
.install-card { background: #fff; border: 1px solid var(--line); }
.install-card p { color: var(--muted); }
.institution-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; background: rgba(216,170,63,.14); font-size: 1.35rem; }
.install-help { font-size: .78rem; margin: 10px 0 0; }

.site-footer { background: var(--navy-950); color: #fff; padding: 30px 0 calc(30px + env(safe-area-inset-bottom)); }
.footer-shell { display: grid; grid-template-columns: 150px 1fr auto; gap: 22px; align-items: center; }
.footer-logo { width: 150px; }
.footer-copy { display: grid; gap: 4px; }
.footer-copy strong { font-size: .9rem; }
.footer-copy span { color: rgba(255,255,255,.6); font-size: .78rem; }
.footer-share { white-space: nowrap; }

@media (max-width: 900px) {
  .hero, .institutional-section { grid-template-columns: 1fr; }
  .lesson-grid, .quiz-grid { grid-template-columns: 1fr; }
  .next-ebd-card { min-height: 250px; }
  .footer-shell { grid-template-columns: 120px 1fr; }
  .footer-share { grid-column: 1 / -1; justify-self: start; }
  .footer-logo { width: 120px; }
}

@media (max-width: 650px) {
  .section-shell { width: min(calc(100% - 22px), var(--max)); }
  .header-shell {
    width: calc(100% - 16px);
    min-height: 118px;
    justify-content: center;
  }
  .brand {
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px 0 10px;
  }
  .brand-logo {
    width: clamp(142px, 43vw, 174px);
  }
  .brand-copy {
    width: 100%;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    min-width: 0;
  }
  .brand-title-desktop { display: none; }
  .brand-title-mobile {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center;
    font-size: clamp(1.22rem, 6.15vw, 1.58rem);
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.045em;
  }
  .install-btn { display: none !important; }
  .hero { padding-top: 22px; padding-bottom: 30px; gap: 14px; }
  .hero-copy { padding: 30px 22px; border-radius: 24px; }
  .hero h1 { font-size: clamp(2rem, 11vw, 3.2rem); }
  .hero-lead { font-size: .95rem; }
  .next-ebd-card { padding: 24px; min-height: 210px; border-radius: 24px; }
  .next-ebd-card strong { font-size: 1.65rem; }
  .weekly-section, .quiz-section, .history-section { padding: 28px 0 34px; }
  .lesson-card { padding: 22px 18px; border-radius: 23px; }
  .lesson-title { font-size: 1.25rem; }
  .lesson-actions { flex-direction: column; }
  .lesson-actions .btn { flex-basis: auto; width: 100%; }
  .quiz-card, .history-card { align-items: flex-start; flex-direction: column; }
  .institutional-section { padding-bottom: 44px; }
  .institution-card { padding: 22px 18px; grid-template-columns: 1fr; border-radius: 23px; }
  .institution-icon { width: 44px; height: 44px; }
  .footer-shell { grid-template-columns: 1fr; }
  .footer-logo { width: 145px; }
  .footer-share { justify-self: stretch; }
}

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

/* Atividade pública — mini quiz interativo */
body.activity-open { overflow: hidden; }
.history-public-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--navy-700);
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}
.activity-btn:disabled { opacity: .62; cursor: not-allowed; filter: grayscale(.1); }
.activity-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}
.activity-modal[hidden] { display: none !important; }
.activity-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(3, 18, 30, .74);
  cursor: default;
}
.activity-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: #fff;
  border: 1px solid #d8e2ea;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(2, 18, 32, .32);
  padding: 24px;
}
.activity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e7edf2;
}
.activity-header h2 { margin: 4px 0 5px; color: var(--navy-900); font-size: 1.55rem; }
.activity-header p { margin: 0; color: var(--muted); font-size: .88rem; }
.activity-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid #d8e2ea;
  border-radius: 50%;
  background: #fff;
  color: var(--navy-900);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}
.activity-progress { margin: 20px 0; }
.activity-progress-copy { display: flex; justify-content: space-between; gap: 12px; color: var(--navy-800); font-size: .82rem; }
.activity-progress-copy span { color: var(--muted); font-weight: 700; }
.activity-progress-track { height: 8px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #edf2f6; }
.activity-progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--gold-500); transition: width .25s ease; }
.activity-question-wrap h3 { margin: 0 0 16px; color: var(--navy-900); font-size: 1.18rem; line-height: 1.45; }
.activity-options { display: grid; gap: 10px; }
.activity-option {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid #d8e2ea;
  border-radius: 14px;
  background: #fff;
  color: #31475b;
  font: inherit;
  line-height: 1.42;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.activity-option:not(:disabled):hover { border-color: #9db7c8; background: #f8fbfd; transform: translateY(-1px); }
.activity-option:focus-visible, .activity-close:focus-visible { outline: 3px solid rgba(222, 168, 34, .35); outline-offset: 2px; }
.activity-option-letter {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--navy-800);
  font-weight: 800;
  font-size: .8rem;
}
.activity-option.correct { border-color: #71b88a; background: #effaf3; color: #205c35; }
.activity-option.correct .activity-option-letter { background: #d9f2e1; color: #205c35; }
.activity-option.wrong { border-color: #d89a9a; background: #fff3f3; color: #8a3030; }
.activity-option.wrong .activity-option-letter { background: #f8dddd; color: #8a3030; }
.activity-option:disabled { cursor: default; }
.activity-feedback { margin-top: 14px; padding: 13px 14px; border-radius: 12px; font-size: .88rem; line-height: 1.5; }
.activity-feedback.success { background: #effaf3; border: 1px solid #b9dfc5; color: #245d37; }
.activity-feedback.error { background: #fff5ed; border: 1px solid #f0cfad; color: #75471e; }
.activity-next { width: 100%; margin-top: 14px; }
.activity-result { text-align: center; padding: 14px 2px 2px; }
.activity-result-icon { width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: #e8f7ed; color: #257343; font-size: 1.8rem; font-weight: 900; }
.activity-result h3 { margin: 6px 0 8px; color: var(--navy-900); font-size: 1.55rem; }
.activity-result > p { max-width: 540px; margin: 0 auto; color: #405469; }
.activity-practice { margin: 20px 0 0; padding: 16px; border-radius: 14px; background: var(--gold-100); border: 1px solid #efdaa1; text-align: left; }
.activity-practice strong { color: #7d5c0c; font-size: .8rem; }
.activity-practice p { margin: 6px 0 0; color: #5d4a17; }
.activity-result-actions { display: flex; gap: 10px; margin-top: 20px; }
.activity-result-actions .btn { flex: 1; }

@media (max-width: 640px) {
  .activity-modal { padding: 10px; align-items: end; }
  .activity-panel { max-height: 90vh; border-radius: 22px 22px 12px 12px; padding: 18px 16px; }
  .activity-header h2 { font-size: 1.28rem; }
  .activity-result-actions { flex-direction: column; }
  .activity-result-actions .btn { width: 100%; }
  .history-public-badge { white-space: normal; }
}



/* Abertura animada do PWA — exibida somente quando o app está instalado. */
.app-splash {
  display: none;
}

@media (display-mode: standalone) {
  .app-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
    background: #07182d;
    color: #fff;
    text-align: center;
    animation: ebdSplashTela 1.85s ease-in-out forwards;
    pointer-events: none;
  }

  .app-splash-inner {
    width: min(82vw, 360px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .app-splash-logo-wrap {
    width: min(48vw, 190px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 28%;
    transform: scale(.78);
    opacity: 0;
    animation: ebdSplashLogo 1.25s cubic-bezier(.22,.78,.2,1) .08s forwards;
  }

  .app-splash-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 24%;
    filter: drop-shadow(0 14px 28px rgba(0,0,0,.28));
  }

  .app-splash-title,
  .app-splash-subtitle {
    opacity: 0;
    transform: translateY(8px);
    animation: ebdSplashTexto .7s ease .55s forwards;
  }

  .app-splash-title {
    margin-top: 4px;
    font-size: clamp(1.15rem, 5vw, 1.55rem);
    line-height: 1.08;
    letter-spacing: -.02em;
  }

  .app-splash-subtitle {
    font-size: clamp(.82rem, 3.6vw, 1rem);
    color: rgba(255,255,255,.78);
    font-weight: 600;
    letter-spacing: .04em;
  }
}

@keyframes ebdSplashLogo {
  0% { opacity: 0; transform: scale(.78); }
  58% { opacity: 1; transform: scale(1.035); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes ebdSplashTexto {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ebdSplashTela {
  0%, 68% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@media (display-mode: standalone) and (prefers-reduced-motion: reduce) {
  .app-splash { animation-duration: .65s; }
  .app-splash-logo-wrap,
  .app-splash-title,
  .app-splash-subtitle { animation: none; opacity: 1; transform: none; }
}
