/* ============================================================
   Ciberparadoxo — Portal de Segurança da Informação
   Editorial moderno · neutro · minimalista
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* accent (overridable by tweaks) */
  --accent-h: 258;
  --accent: oklch(0.60 0.19 var(--accent-h));
  --accent-strong: oklch(0.52 0.20 var(--accent-h));
  --accent-soft: oklch(0.60 0.19 var(--accent-h) / 0.10);
  --on-accent: oklch(0.99 0 0);

  /* radius (overridable) */
  --r: 14px;
  --r-sm: 9px;
  --r-pill: 999px;

  /* density (overridable) — card gap & padding */
  --grid-gap: 30px;
  --card-pad: 22px;

  /* layout */
  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 56px);

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Light (default) ---- */
:root,
[data-theme="light"] {
  --bg: oklch(0.985 0.002 250);
  --bg-2: oklch(0.965 0.003 250);
  --surface: oklch(1 0 0);
  --ink: oklch(0.20 0.012 260);
  --ink-2: oklch(0.44 0.011 260);
  --ink-3: oklch(0.58 0.010 260);
  --border: oklch(0.905 0.005 260);
  --border-strong: oklch(0.84 0.007 260);
  --shadow: 0 1px 2px oklch(0.2 0.02 260 / 0.04), 0 8px 30px oklch(0.2 0.02 260 / 0.06);
  --shadow-lg: 0 4px 12px oklch(0.2 0.02 260 / 0.07), 0 24px 60px oklch(0.2 0.02 260 / 0.10);
  --skeleton: oklch(0.93 0.004 260);
  --skeleton-2: oklch(0.96 0.003 260);
}

/* ---- Dark ---- */
[data-theme="dark"] {
  --bg: oklch(0.165 0.008 260);
  --bg-2: oklch(0.195 0.009 260);
  --surface: oklch(0.215 0.010 260);
  --ink: oklch(0.955 0.004 260);
  --ink-2: oklch(0.74 0.010 260);
  --ink-3: oklch(0.60 0.012 260);
  --border: oklch(0.30 0.012 260);
  --border-strong: oklch(0.38 0.014 260);
  --accent: oklch(0.70 0.16 var(--accent-h));
  --accent-strong: oklch(0.76 0.15 var(--accent-h));
  --accent-soft: oklch(0.70 0.16 var(--accent-h) / 0.16);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.30), 0 10px 34px oklch(0 0 0 / 0.40);
  --shadow-lg: 0 6px 16px oklch(0 0 0 / 0.36), 0 30px 70px oklch(0 0 0 / 0.50);
  --skeleton: oklch(0.27 0.010 260);
  --skeleton-2: oklch(0.23 0.010 260);
}

/* ---- Density variants ---- */
[data-density="compact"] { --grid-gap: 20px; --card-pad: 16px; }
[data-density="comfy"]   { --grid-gap: 40px; --card-pad: 28px; }

/* ---- Font variants ---- */
[data-font="grotesque"] { --font-display: 'IBM Plex Sans', system-ui, sans-serif; }
[data-font="mono"]      { --font-display: 'IBM Plex Mono', monospace; }

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.012em; margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklch, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 72px;
}
.brand { display: flex; align-items: baseline; gap: 14px; flex-shrink: 0; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 600; font-size: 25px; letter-spacing: -0.02em;
  color: var(--ink); white-space: nowrap;
}
.brand-mark .dot { color: var(--accent); }
.brand-tag {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
  padding-left: 12px; border-left: 1px solid var(--border-strong);
}
@media (max-width: 760px) { .brand-tag { display: none; } }

.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 8px 12px; border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: var(--ink); background: var(--bg-2); }
.main-nav a.active { color: var(--accent-strong); }
@media (max-width: 1080px) { .main-nav { display: none; } }

.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ---- Categorias dropdown ---- */
.cat-menu { position: relative; }
.cat-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 9px 14px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.cat-trigger:hover { border-color: var(--border-strong); }
.cat-trigger .chev { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.cat-menu.open .cat-trigger .chev { transform: rotate(180deg); }
.cat-menu.open .cat-trigger { border-color: var(--accent); background: var(--surface); }

.cat-panel {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 70;
  width: 300px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98);
  transform-origin: top left; pointer-events: none;
}
.cat-menu.open .cat-panel { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) {
  .cat-panel { transition: transform 0.18s var(--ease); }
}
.cat-panel-head {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 8px 12px 10px;
}
.cat-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border-radius: var(--r-sm); border: none; background: none;
  text-align: left; transition: background 0.16s;
}
.cat-item:hover { background: var(--bg-2); }
.cat-swatch { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; transform: rotate(45deg); }
.cat-name { font-size: 14.5px; font-weight: 500; color: var(--ink); flex: 1; }
.cat-count { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.cat-item.all { border-top: 1px solid var(--border); border-radius: 0 0 var(--r-sm) var(--r-sm); margin-top: 4px; }
.cat-item.all .cat-name { color: var(--accent-strong); }

/* image uploaded via admin */
.cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media .cover-img { aspect-ratio: 16/10; }
.article-cover .cover-img { aspect-ratio: 21/9; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 8px 14px;
  width: 230px; transition: width 0.3s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); width: 280px; }
.search-box svg { width: 16px; height: 16px; color: var(--ink-3); flex-shrink: 0; }
.search-box input {
  border: none; background: none; outline: none; width: 100%;
  font-family: var(--font-ui); font-size: 14px; color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box kbd {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
  border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 5px;
}
@media (max-width: 600px) { .search-box { width: 44px; padding: 8px; } .search-box:focus-within { width: 200px; } .search-box input, .search-box kbd { display: none; } .search-box:focus-within input { display: block; } }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--ink-2); transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-toggle {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
}
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.hero { padding-top: 40px; }
.hero-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 20px;
}
.hero-head h2 { font-size: clamp(20px, 2.4vw, 26px); }
.carousel-nav { display: flex; gap: 8px; }
.carousel { position: relative; overflow: hidden; border-radius: var(--r); }
.carousel-track { display: flex; transition: transform 0.6s var(--ease); }
.slide { flex: 0 0 100%; }

.feature {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; min-height: 420px;
}
.feature-media { position: relative; }
.feature-media image-slot { width: 100%; height: 100%; min-height: 280px; }
.feature-cat {
  position: absolute; top: 18px; left: 18px; z-index: 2;
}
.feature-body {
  padding: clamp(28px, 3vw, 48px);
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
}
.feature-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.feature-body h3 {
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.04; letter-spacing: -0.02em;
  text-wrap: balance;
}
.feature-dek { font-size: 17px; color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.feature-foot { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
@media (max-width: 880px) {
  .feature { grid-template-columns: 1fr; }
  .feature-media { order: -1; min-height: 240px; }
  .feature-media image-slot { min-height: 240px; }
}

/* carousel dots */
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.carousel-dots button {
  width: 30px; height: 4px; border-radius: var(--r-pill); border: none;
  background: var(--border-strong); padding: 0; transition: background 0.3s, width 0.3s;
}
.carousel-dots button.active { background: var(--accent); width: 46px; }

/* ============================================================
   BADGES / META
   ============================================================ */
.badge {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-strong);
  border: 1px solid color-mix(in oklch, var(--accent) 26%, transparent);
  white-space: nowrap;
}
.badge.on-media { background: oklch(0.18 0.02 260 / 0.72); color: oklch(0.99 0 0); border-color: transparent; backdrop-filter: blur(6px); }
.meta-mono { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }

/* ============================================================
   LAYOUT: feed + sidebar
   ============================================================ */
.content { padding: 56px 0 80px; }
.content-grid { display: grid; grid-template-columns: minmax(0,1fr) 312px; gap: 56px; align-items: start; }
@media (max-width: 1000px) { .content-grid { grid-template-columns: 1fr; gap: 48px; } }

.section-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 22px;
}
.section-head h2 { font-size: 24px; }
.section-head .rule { flex: 1; height: 1px; background: var(--border); }
.result-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* filter chips */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chip {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  padding: 7px 15px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border);
  transition: all 0.18s var(--ease); display: inline-flex; align-items: center; gap: 7px;
}
.chip:hover { border-color: var(--border-strong); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .count { font-family: var(--font-mono); font-size: 10.5px; opacity: 0.6; }

/* card grid */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--grid-gap); }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card-media { position: relative; aspect-ratio: 16/10; }
.card-media image-slot { width: 100%; height: 100%; }
.card-media .badge { position: absolute; top: 14px; left: 14px; }
.badge-new {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-pill);
  background: oklch(0.60 0.19 258); color: #fff;
  animation: pulse-new 2.4s ease-in-out infinite;
}
@keyframes pulse-new {
  0%, 100% { opacity: 1; } 50% { opacity: 0.7; }
}
.card-body { padding: var(--card-pad); display: flex; flex-direction: column; gap: 11px; flex: 1; }
.card-body h3 { font-size: 21px; line-height: 1.14; text-wrap: pretty; transition: color 0.2s; }
.card:hover .card-body h3 { color: var(--accent-strong); }
.card-dek { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; text-wrap: pretty; }
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);
  padding: 2px 8px; border-radius: var(--r-sm); border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.tag:hover { color: var(--accent-strong); border-color: var(--accent); }

.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px;
  border: 1px dashed var(--border-strong); border-radius: var(--r);
}
.empty-state h3 { font-size: 22px; margin-bottom: 8px; }
.empty-state p { color: var(--ink-2); }
.empty-state code { font-family: var(--font-mono); background: var(--bg-2); padding: 2px 7px; border-radius: 6px; }

.load-more { display: flex; justify-content: center; margin-top: 44px; }
.btn-ghost {
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 13px 26px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border-strong);
  transition: all 0.2s var(--ease); display: inline-flex; align-items: center; gap: 9px;
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 34px; }
@media (max-width: 1000px) { .sidebar { position: static; } }
.side-block h3 { font-size: 18px; margin-bottom: 4px; }
.side-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.side-head .eyebrow { color: var(--accent-strong); }

.popular-list { display: flex; flex-direction: column; }
.popular-item {
  display: grid; grid-template-columns: 30px 1fr; gap: 14px;
  padding: 16px 0; border-top: 1px solid var(--border);
  transition: opacity 0.2s;
}
.popular-item:first-child { border-top: none; padding-top: 0; }
.popular-item:hover { opacity: 0.62; }
.popular-rank { font-family: var(--font-display); font-size: 22px; color: var(--accent); font-weight: 600; line-height: 1; }
.popular-body h4 { font-family: var(--font-display); font-size: 15.5px; font-weight: 500; line-height: 1.22; margin-bottom: 6px; letter-spacing: -0.005em; }
.popular-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }

.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud button {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-2);
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--bg-2); border: 1px solid var(--border);
  transition: all 0.18s;
}
.tagcloud button:hover { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

.side-note {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r);
  padding: 22px;
}
.side-note h3 { margin-bottom: 8px; }
.side-note p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 16px; }
.side-note .btn-ghost { width: 100%; justify-content: center; padding: 11px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-2);
  padding: 50px 0 40px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.footer-brand .brand-mark { font-size: 22px; }
.footer-brand p { font-size: 13px; color: var(--ink-3); max-width: 32ch; margin: 12px 0 0; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: var(--ink-2); padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent-strong); }
.footer-base { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ============================================================
   LINK WRAPPERS (card / feature / popular agora navegam)
   ============================================================ */
.card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.feature { color: inherit; }
a.feature:hover h3 { color: var(--accent-strong); }
.feature-readmore {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent-strong);
  margin-left: auto; opacity: 0; transform: translateX(-6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
a.feature:hover .feature-readmore { opacity: 1; transform: none; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-shell { padding: 44px 0 90px; }
.breadcrumb {
  display: flex; align-items: center; gap: 9px; margin-bottom: 30px;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
}
.breadcrumb a { color: var(--ink-3); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent-strong); }
.breadcrumb .sep { opacity: 0.5; }

.article-head { max-width: 760px; margin: 0 auto 36px; }
.article-head .badge { margin-bottom: 22px; }
.article-title {
  font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.022em;
  margin-bottom: 22px; text-wrap: balance;
}
.article-lead {
  font-family: var(--font-display); font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.5; color: var(--ink-2); font-weight: 400; text-wrap: pretty;
}
.article-byline {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border);
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong);
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  border: 1px solid color-mix(in oklch, var(--accent) 26%, transparent);
}
.byline-meta { display: flex; flex-direction: column; gap: 2px; }
.byline-name { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.byline-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }
.byline-actions { display: flex; gap: 8px; margin-left: auto; }

.article-cover {
  max-width: 1060px; margin: 0 auto 50px; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--border);
}
.article-cover image-slot { width: 100%; aspect-ratio: 21/9; }

.prose { max-width: 720px; margin: 0 auto; }
.prose > * + * { margin-top: 1.4em; }
.prose p { font-size: 18px; line-height: 1.72; color: var(--ink); }
.prose h2 {
  font-size: clamp(24px, 3vw, 31px); line-height: 1.15; margin-top: 1.8em;
  letter-spacing: -0.015em;
}
.prose blockquote {
  margin: 1.8em 0; padding: 6px 0 6px 28px; border-left: 3px solid var(--accent);
  font-family: var(--font-display); font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.32; color: var(--ink); font-style: italic; letter-spacing: -0.01em;
}
.prose ul { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.prose li {
  position: relative; padding-left: 30px; font-size: 17px; line-height: 1.6; color: var(--ink);
}
.prose li::before {
  content: ''; position: absolute; left: 4px; top: 11px;
  width: 8px; height: 8px; border-radius: 2px; background: var(--accent);
  transform: rotate(45deg);
}

.art-diagram {
  margin: 0; padding: 20px 18px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--r);
}
.art-diagram svg { width: 100%; height: auto; display: block; }
.art-diagram-caption {
  display: block; margin-top: -0.6em; font-family: var(--font-mono);
  font-size: 12.5px; color: var(--ink-3); text-align: center;
}

.article-tags { max-width: 720px; margin: 50px auto 0; padding-top: 28px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.article-tags .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.article-tags a {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2);
  padding: 6px 13px; border-radius: var(--r-pill); background: var(--bg-2); border: 1px solid var(--border);
  transition: all 0.18s;
}
.article-tags a:hover { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

.author-card {
  max-width: 720px; margin: 50px auto 0; display: flex; gap: 18px; align-items: flex-start;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 26px;
}
.author-card .avatar { width: 56px; height: 56px; font-size: 17px; }
.author-card h4 { font-family: var(--font-ui); font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.author-card p { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.55; }

/* related */
.related { border-top: 1px solid var(--border); background: var(--bg-2); padding: 64px 0 80px; }
.related .section-head { max-width: var(--maxw); margin: 0 auto 28px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }
@media (max-width: 820px) { .related-grid { grid-template-columns: 1fr; } }

/* progress bar */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--accent); z-index: 80; transition: width 0.1s linear;
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-shell { padding: 44px 0 90px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-head .eyebrow { color: var(--accent-strong); }
.admin-head h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; margin-top: 8px; }
.admin-head p { color: var(--ink-2); font-size: 15px; margin: 10px 0 0; max-width: 52ch; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 48px; align-items: start; margin-top: 38px; }
@media (max-width: 980px) { .admin-grid { grid-template-columns: 1fr; gap: 40px; } }

.admin-form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.field label .req { color: var(--accent-strong); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.input, .textarea, .select {
  font-family: var(--font-ui); font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px 14px; width: 100%; transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { min-height: 200px; resize: vertical; line-height: 1.6; font-family: var(--font-display); font-size: 16px; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r);
  aspect-ratio: 16/9; display: grid; place-items: center; text-align: center;
  cursor: pointer; position: relative; overflow: hidden; background: var(--bg-2);
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-3); padding: 24px; }
.dropzone .dz-inner svg { width: 30px; height: 30px; }
.dropzone .dz-inner strong { color: var(--ink); font-family: var(--font-ui); font-weight: 600; font-size: 14px; }
.dropzone .dz-inner span { font-size: 12.5px; }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone .dz-clear {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; display: none; place-items: center;
  background: oklch(0.18 0.02 260 / 0.7); color: #fff; border: none; backdrop-filter: blur(6px);
}
.dropzone.has-img .dz-clear { display: grid; }
.dropzone.has-img .dz-inner { display: none; }

.tag-input-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); }
.tag-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-strong); background: var(--accent-soft); border: 1px solid color-mix(in oklch, var(--accent) 26%, transparent); padding: 4px 6px 4px 10px; border-radius: var(--r-pill); }
.tag-chip button { border: none; background: none; color: inherit; font-size: 15px; line-height: 1; padding: 0 2px; opacity: 0.7; }
.tag-chip button:hover { opacity: 1; }
.tag-input-wrap input { border: none; outline: none; background: none; font-family: var(--font-ui); font-size: 14px; color: var(--ink); flex: 1; min-width: 120px; padding: 5px; }

.admin-actions { display: flex; gap: 12px; align-items: center; padding-top: 6px; }
.btn-primary {
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--on-accent);
  background: var(--accent); border: 1px solid var(--accent); border-radius: var(--r-pill);
  padding: 13px 26px; display: inline-flex; align-items: center; gap: 9px;
  transition: filter 0.2s, transform 0.1s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.admin-msg { font-size: 13.5px; color: var(--accent-strong); font-weight: 500; opacity: 0; transition: opacity 0.3s; }
.admin-msg.show { opacity: 1; }

.admin-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 96px; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; }
.admin-card h3 { font-size: 17px; margin-bottom: 4px; }
.admin-card .sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 16px; }
.draft-list { display: flex; flex-direction: column; }
.draft-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.draft-item:first-child { border-top: none; padding-top: 0; }
.draft-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--skeleton); }
.draft-body { flex: 1; min-width: 0; }
.draft-body h4 { font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; line-height: 1.25; margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.draft-body .meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }
.draft-item .del { border: none; background: none; color: var(--ink-3); width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; transition: color 0.2s, background 0.2s; }
.draft-item .del:hover { color: oklch(0.6 0.2 25); background: var(--bg-2); }
.draft-empty { font-size: 13px; color: var(--ink-3); padding: 8px 0; }

.admin-note { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.admin-note strong { color: var(--ink); }

/* ============================================================
   MODAL (compartilhado entre admin e portal público)
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}
.modal.open { display: flex; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: oklch(0.15 0.02 260 / 0.55);
  backdrop-filter: blur(2px);
}
.modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h2 { font-size: 19px; margin: 0; }

/* ---- Janela de doação ---- */
.donate-modal-content { max-width: 420px; }
.donate-modal-body { padding: 28px; text-align: center; overflow-y: auto; }
.donate-desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; margin: 0 0 22px; }
.donate-qr-wrap { display: flex; justify-content: center; }
.donate-qr { width: 100%; max-width: 260px; border-radius: var(--r); border: 1px solid var(--border); }

/* ============================================================
   IMAGE-SLOT placeholder styling (editorial, subtle)
   ============================================================ */
image-slot {
  --slot-bg: var(--skeleton);
  background:
    repeating-linear-gradient(135deg, var(--skeleton) 0 11px, var(--skeleton-2) 11px 22px);
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter-desc { font-size: 13.5px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.55; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-input { margin: 0; }
.newsletter-btn { width: 100%; justify-content: center; }
.newsletter-msg {
  display: block; font-size: 12.5px; font-weight: 500;
  color: var(--accent-strong); margin-top: 8px; min-height: 1em;
}

/* ============================================================
   ARTICLE TOC
   ============================================================ */
.article-toc {
  max-width: 720px; margin: 0 auto 44px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 18px 22px;
}
.toc-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
}
.toc-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 7px;
  counter-reset: toc;
}
.toc-list li { counter-increment: toc; display: flex; align-items: baseline; gap: 10px; }
.toc-list li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 10px; color: var(--accent);
  flex-shrink: 0; margin-top: 1px;
}
.toc-list a {
  font-size: 14px; color: var(--ink-2); line-height: 1.4;
  transition: color 0.18s;
}
.toc-list a:hover { color: var(--accent-strong); }

/* ============================================================
   CATEGORY-TINTED PROGRESS BAR
   ============================================================ */
[data-article-cat="Ransomware"] .read-progress { background: oklch(0.62 0.20 25); }
[data-article-cat="Pentest"]    .read-progress { background: oklch(0.60 0.19 258); }
[data-article-cat="Phishing"]   .read-progress { background: oklch(0.62 0.16 300); }
[data-article-cat="LGPD"]       .read-progress { background: oklch(0.60 0.15 152); }
[data-article-cat="Cloud"]      .read-progress { background: oklch(0.62 0.14 220); }

/* ============================================================
   MINUTES REMAINING BADGE (artigo)
   ============================================================ */
.reading-eta {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 3px 10px;
  position: fixed; bottom: 20px; right: 20px; z-index: 70;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.reading-eta.visible { opacity: 1; }
.reading-eta svg { width: 12px; height: 12px; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .carousel-track { transition: none; }
}
