:root {
  --bg: #0a0e14;
  --bg-elevated: #0f151d;
  --card: #131a24;
  --card-border: #212b38;
  --text: #e6edf3;
  --text-dim: #8b98a9;
  --text-faint: #5c6b7d;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  /* Referencia as duas variáveis acima (em vez de cores fixas) pra que uma
     personalização de cor no painel admin (Configurações → Cores do site)
     atualize o gradiente dos botões/destaques automaticamente. */
  --accent-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.08), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(167, 139, 250, 0.08), transparent 40%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 20, 0.75);
  border-bottom: 1px solid var(--card-border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  flex-wrap: wrap;
  gap: 8px 0;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.7);
}

.brand-accent { color: var(--accent); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.nav a:hover { color: var(--text); }

/* Em telas estreitas, a marca fica sozinha na primeira linha e o menu
   quebra pra uma segunda linha, cada link inteiro (nunca partindo uma
   palavra no meio), pra não sobrepor o conteúdo logo abaixo. */
@media (max-width: 640px) {
  .topbar-inner {
    justify-content: center;
    padding: 12px 0;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .nav {
    width: 100%;
    justify-content: center;
    gap: 6px 14px;
  }

  .nav a {
    font-size: 0.82rem;
  }
}

/* Hero */
.hero {
  padding: 56px 20px 32px;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin: 0 0 14px;
}

.ip-display {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  padding: 18px 28px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}

.ip-value {
  /* Tamanho inicial (antes do JS calcular o valor exato que cabe numa
     linha só, em js/app.js:shrinkIpValueToFit) — serve de fallback caso o
     JS não rode, e como estado do placeholder "carregando…". */
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .ip-display { padding: 14px 18px; gap: 10px; }
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.15s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
}

.badge.flag-on { border-color: var(--warn); color: var(--warn); }

.hint {
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.ip-visit-history {
  max-width: 640px;
  margin: 28px auto 0;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
}

.ip-visit-history-title {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--text);
}

.ip-visit-history-title .fineprint { margin: 0; display: inline; }

.ip-visit-history .history-list { gap: 8px; }
.ip-visit-history .history-item { padding: 10px 14px; }

@media (max-width: 480px) {
  .ip-visit-history { padding: 14px 16px; }
}

/* Grid & cards */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding-bottom: 12px;
}

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
}

.section-title {
  font-size: 1.05rem;
  margin: 44px 0 16px;
  color: var(--text);
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--text);
}

.kv { margin: 0; }

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--card-border);
  font-size: 0.9rem;
}

.kv-row:last-child { border-bottom: none; }

.kv-row dt { color: var(--text-faint); font-weight: 400; }
.kv-row dd { margin: 0; color: var(--text); text-align: right; font-weight: 500; }

.kv.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
}

@media (max-width: 560px) {
  .kv.two-col { grid-template-columns: 1fr; }
}

.text-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.text-link:hover { text-decoration: underline; }

.fineprint {
  color: var(--text-faint);
  font-size: 0.78rem;
  margin: 14px 0 0;
}

.ua-details {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.ua-details code {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: 8px;
  word-break: break-all;
  color: var(--text-dim);
  font-size: 0.76rem;
}

/* Speed test */
.speed-card { text-align: center; }

.speed-gauge-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 20px;
}

.speed-gauge { transform: rotate(-90deg); }

.speed-gauge-track {
  fill: none;
  stroke: var(--bg-elevated);
  stroke-width: 14;
}

.speed-gauge-fill {
  fill: none;
  stroke: var(--card-border);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 540.35;
  stroke-dashoffset: 540.35;
  transition: stroke-dashoffset 0.4s ease, stroke 0.4s ease;
}

.speed-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.speed-gauge-value {
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.speed-gauge-unit { font-size: 0.8rem; color: var(--text-faint); }
.speed-gauge-caption {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.speed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.speed-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 8px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
}

.speed-label {
  font-size: 0.78rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.speed-value {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--text);
}

.speed-unit { font-size: 0.75rem; color: var(--text-faint); }

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.25s ease;
}

.speed-status {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin: 0 0 18px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #071019;
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.speed-usecases { margin-top: 24px; text-align: left; }

.speed-usecases-title {
  font-size: 0.82rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  text-align: center;
}

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.usecase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  text-align: center;
}

.usecase-icon { font-size: 1.4rem; }
.usecase-label { font-size: 0.76rem; color: var(--text-dim); }

.usecase-dots { display: flex; gap: 3px; }
.usecase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--card-border);
}
.usecase-dot.is-filled { background: var(--good); }
.usecase-dot.is-warn { background: var(--warn); }
.usecase-dot.is-bad { background: var(--bad); }

.speed-share {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.speed-share-label { font-size: 0.82rem; color: var(--text-faint); }
.speed-share-buttons { display: flex; gap: 10px; }

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.share-copied { font-size: 0.78rem; color: var(--good); margin: 0; }

/* Lookup */
.lookup-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#lookupInput {
  flex: 1;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
}

#lookupInput:focus {
  outline: none;
  border-color: var(--accent);
}

#cardLookup {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

/* Footer */
.site-footer {
  margin-top: 60px;
  padding: 30px 0 50px;
  border-top: 1px solid var(--card-border);
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.site-footer .fineprint { max-width: 640px; margin: 10px auto 0; }
.site-footer .fineprint a { color: var(--text-dim); }
.site-footer .fineprint a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- */
/* Blog                                                              */
/* ---------------------------------------------------------------- */

.blog-main { padding-top: 20px; padding-bottom: 40px; }

.blog-hero {
  padding: 36px 0 28px;
  text-align: center;
}

.blog-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin: 6px 0 10px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .post-grid { grid-template-columns: 1fr; }
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.post-card-cover {
  height: 150px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elevated);
}

.post-card-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  opacity: 0.5;
}

.post-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.post-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.post-card-body h3 { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.post-card-body p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-date { color: var(--text-faint); font-size: 0.78rem; margin-top: auto; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--text-dim);
  font-size: 0.88rem;
  margin: 20px 0 10px;
}
.pagination a { color: var(--accent); text-decoration: none; }
.pagination a:hover { text-decoration: underline; }

.article { max-width: 760px; margin: 0 auto; padding: 20px 0 40px; }
.article h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.25; margin: 4px 0 0; }
.post-cover { width: 100%; border-radius: var(--radius); margin: 18px 0 28px; border: 1px solid var(--card-border); }

.article-body { font-size: 1.02rem; line-height: 1.8; color: var(--text); }
.article-body p { margin: 0 0 20px; }
.article-body h2 { font-size: 1.3rem; margin: 34px 0 14px; }
.article-body h3 { font-size: 1.1rem; margin: 26px 0 12px; }
.article-body ul { margin: 0 0 20px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  margin: 0 0 20px;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: 0 8px 8px 0;
  color: var(--text-dim);
}
.article-body a { color: var(--accent); }
.article-body strong { color: var(--text); }

/* ---------------------------------------------------------------- */
/* Painel admin                                                      */
/* ---------------------------------------------------------------- */

.admin-shell { max-width: 960px; margin: 0 auto; padding: 32px 20px 60px; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-tabs { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.88rem;
  text-decoration: none;
}
.admin-tab.active { border-color: var(--accent); color: var(--text); background: var(--bg-elevated); }

.login-box {
  max-width: 380px;
  margin: 90px auto;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.login-box h1 { font-size: 1.3rem; margin-bottom: 4px; }
.login-box form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; text-align: left; }
.login-box label { font-size: 0.82rem; color: var(--text-dim); }
.login-box input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-top: 4px;
}
.login-box input:focus { outline: none; border-color: var(--accent); }
.login-error { color: var(--bad); font-size: 0.85rem; min-height: 1.2em; }

.post-table-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
}
.post-table-item:hover { border-color: var(--accent); }
.post-table-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post-table-main strong { font-size: 0.95rem; }
.post-table-meta { font-size: 0.78rem; color: var(--text-faint); }
.post-table-badge {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  white-space: nowrap;
}
.post-table-badge.source-api { border-color: var(--accent-2); color: var(--accent-2); }
.post-table-badge.source-cowork { border-color: var(--accent); color: var(--accent); }
.post-table-badge.regen { border-color: var(--warn); color: var(--warn); }

.form-field { margin-bottom: 16px; text-align: left; }
.form-field label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 6px; }
.form-field input[type="text"],
.form-field textarea,
.form-field select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
}
.form-field textarea { resize: vertical; min-height: 90px; }
.form-field textarea.code { font-family: Consolas, Menlo, monospace; font-size: 0.85rem; min-height: 320px; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-color: var(--accent); }
.form-hint { font-size: 0.78rem; color: var(--text-faint); margin-top: 6px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.08); }

.preview-pane {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--bg-elevated);
  margin-top: 8px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  z-index: 50;
}

.empty-state { text-align: center; color: var(--text-faint); padding: 40px 0; }

/* ---------------------------------------------------------------- */
/* Layout com barra lateral (site-wide)                              */
/* ---------------------------------------------------------------- */

.site-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .site-layout { grid-template-columns: 1fr; }
}

.site-main-col { min-width: 0; }

.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 76px;
}

@media (max-width: 900px) {
  .site-sidebar { position: static; }
}

.sidebar-block {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.sidebar-block h3 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.sidebar-block nav { display: flex; flex-direction: column; gap: 2px; }

.sidebar-block nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
}

.sidebar-block nav a:hover { background: var(--bg-elevated); color: var(--text); }

.cat-count {
  font-size: 0.72rem;
  color: var(--text-faint);
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 1px 7px;
}

/* Página de conteúdo simples (Sobre, Contato, Privacidade) */
.content-page { max-width: 720px; }
.content-page h1 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: 6px 0 22px; }
.content-page h2 { font-size: 1.15rem; margin: 30px 0 12px; }
.content-page p { line-height: 1.75; margin: 0 0 16px; color: var(--text-dim); }
.content-page ul { padding-left: 22px; margin: 0 0 16px; color: var(--text-dim); }
.content-page li { margin-bottom: 8px; }
.content-page a { color: var(--accent); }

/* Painel — badge de papel (admin/editor) */
.role-badge { font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--accent-2); color: var(--accent-2); }

/* Painel — checkbox simples (ex: "destacar na vitrine") */
.checkbox-label { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--text); cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }

/* Painel — imagem de capa do post */
.cover-field { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cover-preview {
  width: 180px;
  height: 110px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview .hint { font-size: 0.78rem; }
.cover-controls { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 220px; }
.cover-controls input[type="text"] {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
}
.cover-controls .btn-secondary { align-self: flex-start; padding: 8px 18px; font-size: 0.82rem; }

/* Painel — editor de conteúdo: abas Visual / HTML */
.editor-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.editor-tab {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.editor-tab.active { border-color: var(--accent); color: var(--accent); background: rgba(34, 211, 238, 0.08); }
.editor-tab:not(.active):hover { border-color: var(--text-dim); }

/* Painel — tema escuro para o editor visual (Quill) */
#quillEditor { background: var(--bg-elevated); border-radius: 0 0 10px 10px; min-height: 320px; }
.ql-toolbar.ql-snow {
  background: var(--bg-elevated);
  border-color: var(--card-border) !important;
  border-radius: 10px 10px 0 0;
}
.ql-container.ql-snow { border-color: var(--card-border) !important; font-size: 0.95rem; }
.ql-editor { color: var(--text); min-height: 300px; line-height: 1.75; }
.ql-editor.ql-blank::before { color: var(--text-faint); font-style: normal; }
.ql-snow .ql-stroke { stroke: var(--text-dim); }
.ql-snow .ql-fill { fill: var(--text-dim); }
.ql-snow .ql-picker { color: var(--text-dim); }
.ql-snow .ql-picker-options { background: var(--bg-elevated); border-color: var(--card-border) !important; }
.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke { stroke: var(--accent); }
.ql-toolbar.ql-snow button:hover .ql-fill { fill: var(--accent); }
.ql-toolbar.ql-snow button.ql-active .ql-stroke,
.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-stroke { stroke: var(--accent); }
.ql-toolbar.ql-snow button.ql-active .ql-fill { fill: var(--accent); }
.ql-editor h2, .ql-editor h3 { color: var(--text); }
.ql-editor a { color: var(--accent); }
.ql-editor blockquote { border-left: 3px solid var(--accent); color: var(--text-dim); }
.ql-editor img { max-width: 100%; border-radius: 8px; }

/* Home — vitrine de posts em destaque ("outdor" com auto-rotação) */
.featured-posts { margin: 44px 0; }
.featured-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.featured-header .section-title { margin: 0; }
.featured-dots { display: flex; gap: 6px; }
.featured-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--card-border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.featured-dot:hover { transform: scale(1.2); }
.featured-dot.active { background: var(--accent); }

.featured-track {
  position: relative;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--bg-elevated);
}
.featured-slide {
  position: absolute;
  inset: 0;
  display: block;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease;
}
.featured-slide.active { opacity: 1; visibility: visible; }
.featured-slide[data-no-cover] { background-image: var(--accent-gradient); background-size: 200% 200%; background-position: 30% 70%; opacity: 0.9; }
.featured-slide[data-no-cover].active { opacity: 1; }
.featured-slide-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 20, 0.94) 88%);
}
.featured-slide-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 6px;
}
.featured-slide-overlay h3 { margin: 0 0 6px; color: var(--text); font-size: 1.2rem; line-height: 1.3; }
.featured-slide-overlay p { margin: 0 0 6px; color: var(--text-dim); font-size: 0.88rem; max-width: 620px; }
.featured-slide-date { font-size: 0.74rem; color: var(--text-faint); }
@media (max-width: 640px) {
  .featured-track { height: 320px; }
  .featured-slide-overlay p { display: none; }
}

/* Home — FAQ (acordeão) */
.faq-section { margin: 44px 0; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover { background: var(--bg-elevated); }

.faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.faq-icon { font-size: 1.15rem; flex: 0 0 auto; }

.faq-q { flex: 1 1 auto; }

.faq-chevron {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-item[open] summary {
  border-bottom: 1px solid var(--card-border);
}

.faq-a {
  padding: 4px 20px 18px 52px;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}

.faq-a p { margin: 0; }

@media (max-width: 560px) {
  .faq-a { padding-left: 20px; }
}

/* Local do teste de velocidade */
.speed-location { color: var(--text-dim); }

/* Área de login/conta na navbar */
.auth-area a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.auth-area a:hover { color: var(--text); }

/* Campos de e-mail/senha reaproveitam o visual de .form-field */
.form-field input[type="email"],
.form-field input[type="password"] {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
}
.form-field input[type="email"]:focus,
.form-field input[type="password"]:focus { outline: none; border-color: var(--accent); }

/* Página /entrar */
.account-tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 20px;
  border-bottom: 1px solid var(--card-border);
}
.account-tab {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 4px;
  margin-right: 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.account-tab:hover { color: var(--text); }
.account-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.account-form { max-width: 360px; }
.account-error {
  color: var(--warn);
  font-size: 0.85rem;
  margin: 4px 0 16px;
  min-height: 1.2em;
}

/* Página /historico */
.history-toolbar { display: flex; justify-content: flex-end; margin: 18px 0; }
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: 10px;
}
.history-item-main { display: flex; flex-direction: column; gap: 4px; }
.history-item-main strong { font-size: 0.9rem; }
.history-item-details { color: var(--text-dim); font-size: 0.84rem; }
.history-item-date { color: var(--text-faint); font-size: 0.78rem; white-space: nowrap; }

