/* Reset e base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; font-family: system-ui, -apple-system, sans-serif; }

/* Shell (template inicial) */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #333;
}
.shell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.shell-logo { font-weight: 700; font-size: 1.25rem; letter-spacing: 0.05em; color: #222; }
.shell-nav { display: flex; gap: 1.5rem; }
.shell-nav a { color: #555; text-decoration: none; }
.shell-nav a:hover { color: #111; }
.shell-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
}
.shell-main h1 { font-size: 1.5rem; font-weight: 500; margin-bottom: 0.5rem; color: #222; }
.shell-main p { color: #555; font-size: 0.95rem; }
.shell-lead { margin-bottom: 1.5rem; color: #666; }
.shell-disclaimer {
  max-width: 420px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  text-align: center;
}
.shell-disclaimer strong { color: #333; }

/* Rodapé */
.shell-footer {
  margin-top: auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: #f8f8f8;
}
.shell-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.shell-footer-nav {
  margin-bottom: 0.75rem;
}
.shell-footer-nav a {
  color: #555;
  text-decoration: none;
}
.shell-footer-nav a:hover { color: #111; }
.shell-footer-nav span { color: #999; margin: 0 0.35rem; }
.shell-footer-note {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 0.5rem;
}
.shell-footer-copy {
  font-size: 0.8rem;
  color: #888;
  margin: 0;
}

/* Páginas internas (Privacidade, Segurança) */
.shell-page .shell-main { justify-content: flex-start; padding-top: 2rem; }
.shell-main--text { text-align: left; max-width: 640px; margin: 0 auto; }
.shell-main--text h1 { margin-bottom: 1rem; }
.shell-main--text p { margin-bottom: 1rem; color: #555; }
.shell-disclaimer-inline { margin-top: 1.5rem; font-size: 0.9rem; color: #666; }

/* Index: artigo IPVA / multas / calendário */
.shell-main--article { max-width: 720px; }
.shell-main--article .shell-lead { color: #666; margin-bottom: 1.5rem; }
.shell-article h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 1.75rem 0 0.5rem;
  padding-bottom: 0.25rem;
}
.shell-article h2:first-child { margin-top: 0; }
.shell-article p { color: #555; line-height: 1.6; }
.shell-list {
  margin: 0.5rem 0 1rem 1.25rem;
  padding: 0;
  color: #555;
  line-height: 1.6;
}
.shell-list li { margin-bottom: 0.35rem; }
.shell-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}
.shell-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.shell-table th,
.shell-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.shell-table th {
  background: #f5f5f5;
  color: #333;
  font-weight: 600;
}
.shell-table tbody tr:last-child td { border-bottom: none; }
.shell-table tbody tr:hover { background: #fafafa; }
.shell-article .shell-disclaimer { margin-top: 2rem; text-align: center; }

/* Overlay (conteúdo real sobreposto) */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #0f0f14;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.overlay--captcha { background: #fff; }
.overlay--captcha .overlay-close {
  display: none;
}
.overlay-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.overlay-close:hover { background: rgba(255,255,255,0.2); }
.overlay-content {
  padding: 3rem 2rem 4rem;
  max-width: 720px;
  margin: 0 auto;
  color: #e8e8e8;
}
.overlay-content h1 { font-size: 2rem; margin-bottom: 1rem; }
.overlay-content h2 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; color: #b8b8b8; }
.overlay-content p { line-height: 1.6; color: #c0c0c0; }
.overlay-content a { color: #6c9ef8; }
.overlay-content code { background: rgba(255,255,255,0.08); padding: 0.2em 0.4em; border-radius: 4px; font-size: 0.9em; }

/* Overlay com iframe (pasta local ou link externo) */
.overlay-content--iframe {
  padding: 0;
  max-width: none;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.overlay-iframe {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: none;
}
/* Barra quando link externo (sites com X-Frame-Options podem bloquear o iframe) */
.overlay-external-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: #1a3a5c;
  color: #e8e8e8;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.overlay-external-bar-text { flex: 1; min-width: 200px; }
.overlay-external-bar-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #0d6b3a;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}
.overlay-external-bar-btn:hover { color: #fff; background: #0a552e; }

/* Página branca com captcha (link externo: resolver e clicar para ir ao link) */
.overlay-content--captcha {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  height: 100vh;
  box-sizing: border-box;
  background: #fff;
  padding: 2rem;
  position: absolute;
  inset: 0;
}
.captcha-gate-superior {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 5;
}
.captcha-gate-superior-img {
  height: 52px;
  width: auto;
  display: block;
}
.captcha-gate {
  text-align: center;
  max-width: 320px;
  width: 100%;
}
.captcha-gate-recaptcha {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.captcha-gate-recaptcha-img {
  max-width: 120px;
  height: auto;
  display: block;
}
.captcha-gate-checkbox-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 1rem;
  cursor: pointer;
  max-width: 220px;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  user-select: none;
}
.captcha-gate-checkbox-wrap:hover { background: transparent; }
.captcha-gate-checkbox-wrap--disabled { pointer-events: none; opacity: 0.9; }
.captcha-gate-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.captcha-gate-checkbox-box {
  width: 22px;
  height: 22px;
  border: 2px solid #5f6368;
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.captcha-gate-checkbox-box--checked {
  background: #1a73e8;
  border-color: #1a73e8;
}
.captcha-gate-checkbox-box--checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.captcha-gate-checkbox-label {
  font-size: 0.95rem;
  color: #333;
}
.captcha-gate-loading {
  margin: 0 auto 1rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.captcha-gate-loading--on { opacity: 1; }
.captcha-gate-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid #e8eaed;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: captcha-spin 0.8s linear infinite;
}
@keyframes captcha-spin {
  to { transform: rotate(360deg); }
}
.captcha-gate-btn {
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.captcha-gate-btn--blue {
  background: #1a73e8;
  color: #fff;
}
.captcha-gate-btn--blue:hover { background: #1557b0; }

.overlay-fallback { padding: 2rem; text-align: center; }
.overlay-fallback p { margin-bottom: 1rem; }
.overlay-fallback a { color: #6c9ef8; }

/* Página de destino (quando carregada dentro do overlay) */
.destiny-header { margin-bottom: 2rem; }
.destiny-header h1 { font-size: 2rem; }
.destiny-body { line-height: 1.7; }
