@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader-Italic-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Inter, "IBM Plex Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page-bg);
  overflow: hidden;
}

/* ===== Theme A: azul (Guilherme) ===== */
body.theme-azul {
  --page-bg: linear-gradient(145deg, #1a4fd8 0%, #3d7dff 45%, #6aa8ff 100%);
  --sidebar: #0d2f8f;
  --sidebar-text: #dbe7ff;
  --sidebar-muted: #9bb6ef;
  --sidebar-active: rgba(255,255,255,.16);
  --shell: #f4f7fb;
  --card: #ffffff;
  --ink: #12203a;
  --muted: #66748f;
  --accent: #2f6bff;
  --accent-soft: #e8efff;
  --accent-deep: #1a4fd8;
  --line: #e3e9f3;
  --ok: #1f9d63;
  --danger: #d64545;
  --holiday: #f3c1d0;
  --badge: #2f6bff;
  --hero-card: #2f6bff;
  --hero-text: #ffffff;
  --chip: #eef3ff;
  --shadow: 0 10px 30px rgba(18,40,90,.08);
  --serif: Newsreader, Georgia, serif;
  --sans: Inter, "IBM Plex Sans", system-ui, sans-serif;
}

/* ===== Theme B: biblioteca (Fernando) ===== */
body.theme-biblioteca {
  --page-bg: linear-gradient(145deg, #1E3A2F 0%, #2a4d3f 40%, #cfc4a6 100%);
  --sidebar: #1E3A2F;
  --sidebar-text: #F1EBDD;
  --sidebar-muted: #C9B895;
  --sidebar-active: rgba(241,235,221,.12);
  --shell: #F3EFE6;
  --card: #FBF8F0;
  --ink: #23231F;
  --muted: #6b6558;
  --accent: #7A5A1E;
  --accent-soft: #efe4cb;
  --accent-deep: #1E3A2F;
  --line: #e2d8c2;
  --ok: #2f6b4f;
  --danger: #9A3F24;
  --holiday: #f0d5c8;
  --badge: #7A5A1E;
  --hero-card: #1E3A2F;
  --hero-text: #F1EBDD;
  --chip: #EFE8D8;
  --shadow: 0 10px 28px rgba(30,58,47,.10);
  --serif: Newsreader, Georgia, serif;
  --sans: Inter, "IBM Plex Sans", system-ui, sans-serif;
}

.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100vh;
  padding: 18px;
  gap: 14px;
}
.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  border-radius: 22px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 14px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 600; color: #fff; font-size: 16px;
}
body.theme-biblioteca .brand-mark { background: #C9B895; color: #1E3A2F; }
.profiles { display: flex; gap: 6px; margin-left: auto; }
.profiles span {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.35);
  font-size: 10px; display:grid; place-items:center; font-weight: 600;
}
.handle {
  font-size: 12px; color: var(--sidebar-muted);
  padding: 0 8px 12px; letter-spacing: .01em;
}
.nav-label {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sidebar-muted); padding: 14px 10px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--sidebar-text); text-decoration: none;
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: none; background: transparent; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--sidebar-active); }
.nav-item.active { background: var(--sidebar-active); font-weight: 600; }
.nav-item .ico { width: 18px; opacity: .9; }
.nav-item .count {
  margin-left: auto; background: rgba(255,255,255,.18);
  border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600;
}
.main {
  background: var(--shell);
  border-radius: 22px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 0;
  box-shadow: var(--shadow);
}
.topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 16px 24px 4px;
}
.crumb {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 6px;
}
h1 {
  font-family: var(--serif);
  font-weight: 520; font-size: 36px; letter-spacing: -.02em;
  color: var(--ink); line-height: 1.05;
}
.sub { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 520px; }
.content { padding: 4px 24px 16px; overflow: auto; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; }
.period {
  display: flex; gap: 6px; align-items: center;
}
.period button, .btn {
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink); border-radius: 999px; padding: 8px 14px;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.period button.active, .btn.primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
body.theme-biblioteca .btn.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--hero-text); }
.btn.ghost { background: var(--card); }

.grid-metrics {
  display: grid; grid-template-columns: 1.1fr 1fr 1.15fr; gap: 14px; margin-top: 18px;
}
.card {
  background: var(--card); border-radius: 18px; padding: 18px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card.hero {
  background: var(--hero-card); color: var(--hero-text); border: none;
}
.card .label {
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; opacity: .75; margin-bottom: 8px;
}
.card .value {
  font-family: var(--serif); font-size: 40px; font-weight: 520;
  letter-spacing: -.02em; line-height: 1;
}
.card .delta { font-size: 12px; margin-top: 8px; opacity: .85; }
.card .delta.up { color: var(--ok); }
.card.hero .delta.up { color: #b7f0cf; }
.mini-bars {
  display: flex; align-items: flex-end; gap: 4px; height: 54px; margin-top: 16px;
}
.mini-bars span {
  flex: 1; border-radius: 4px 4px 2px 2px; background: rgba(255,255,255,.35);
  min-height: 6px;
}
body.theme-biblioteca .card.hero .mini-bars span { background: rgba(201,184,149,.45); }
.card:not(.hero) .mini-bars span { background: var(--accent-soft); }
.card:not(.hero) .mini-bars span.on { background: var(--accent); }

.eng-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px;
}
.eng-grid div {
  background: var(--chip); border-radius: 12px; padding: 10px 12px;
}
.eng-grid strong { display:block; font-size: 18px; font-family: var(--serif); }
.eng-grid span { font-size: 11px; color: var(--muted); }
.card.hero .eng-grid div { background: rgba(255,255,255,.12); }
.card.hero .eng-grid span { color: rgba(255,255,255,.75); }

.section-title {
  margin: 26px 0 12px; display: flex; justify-content: space-between; align-items: baseline;
}
.section-title h2 {
  font-family: var(--serif); font-size: 22px; font-weight: 520;
}
.posts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.post {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow);
}
.post .thumb {
  aspect-ratio: 4 / 5;
  height: auto;
  background-color: var(--accent-soft);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.post .thumb.thumb-reel {
  aspect-ratio: 9 / 16;
}
.post .body { padding: 12px; }
.post .meta { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.post .title { font-size: 13px; font-weight: 600; margin: 6px 0 10px; line-height: 1.3; min-height: 34px; }
.post .stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--muted); }
.post .stats b { color: var(--ink); }

.fila {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 8px;
}
.fila-col {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px;
  min-height: 180px;
}
.fila-col h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 8px; font-weight: 700;
}
.chip-card {
  background: var(--shell); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px; margin-bottom: 8px; font-size: 12px; line-height: 1.35;
}
.chip-card .fmt { color: var(--muted); font-size: 10px; margin-top: 4px; }
.chip-card .tag {
  display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft); padding: 2px 6px; border-radius: 999px;
}

/* Cronograma */
.cal-head {
  display: flex; justify-content: space-between; align-items: center; margin: 8px 0 14px;
}
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); }
.legend i {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px;
}
.cal {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.cal .dow {
  font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px;
  text-transform: uppercase; letter-spacing: .06em;
}
.day {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  min-height: 92px; padding: 8px; position: relative;
}
.day.out { opacity: .45; }
.day .n { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.day.today { outline: 2px solid var(--accent); }
.event {
  background: var(--accent-soft); border-radius: 8px; padding: 5px 6px; margin-bottom: 5px;
  font-size: 10px; line-height: 1.25; border-left: 3px solid var(--accent);
  display: flex; gap: 6px; align-items: flex-start;
}
.event img { width: 28px; height: 35px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.event .ph {
  width: 28px; height: 35px; border-radius: 4px; background: var(--accent); flex-shrink: 0; opacity: .35;
}
.event.pub { border-left-color: var(--accent-deep); background: #fff; border: 1px solid var(--line); border-left-width: 3px; }
.event.plan { border-left-color: #8aa4d8; }
body.theme-biblioteca .event.plan { border-left-color: #9C7434; }
.event.li { border-left-color: #0a66c2; }
body.theme-biblioteca .event.li { border-left-color: #1E3A2F; }
.event.hol {
  background: var(--holiday); border-left-color: var(--danger); font-weight: 700; text-align: center;
  display: block;
}
.event .t { font-weight: 700; color: var(--ink); }
.event .m { color: var(--muted); margin-top: 2px; }

/* Insights */
.insights-hero {
  background: var(--hero-card); color: var(--hero-text);
  border-radius: 20px; padding: 24px; margin-top: 10px;
  box-shadow: var(--shadow);
}
.insights-hero .badge {
  display: inline-flex; gap: 8px; align-items: center;
  background: rgba(255,255,255,.14); border-radius: 999px;
  padding: 4px 10px; font-size: 11px; font-weight: 600; margin-bottom: 14px;
}
.insights-hero h2 {
  font-family: var(--serif); font-size: 28px; font-weight: 520;
  letter-spacing: -.015em; max-width: 780px; line-height: 1.2;
}
.insights-hero p { margin-top: 10px; opacity: .9; max-width: 760px; font-size: 14px; line-height: 1.5; }
.insights-cols {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-top: 22px;
  padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18);
}
.insights-cols h3 {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  opacity: .7; margin-bottom: 10px; font-weight: 700;
}
.insights-cols ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.insights-cols li {
  background: rgba(255,255,255,.1); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.4;
}

/* Analytics */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px;
}
.kpi .value { font-size: 32px; }
.chart-card { margin-top: 14px; }
.chart-card h3 { font-family: var(--serif); font-size: 18px; margin-bottom: 6px; }
.chart-note { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.chart {
  height: 220px; display: flex; align-items: flex-end; gap: 10px; padding: 10px 4px 0;
  border-top: 1px solid var(--line);
}
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bar {
  width: 100%; border-radius: 8px 8px 4px 4px; background: var(--accent);
  min-height: 4px; position: relative;
}
.chart .bar.views { background: var(--accent-soft); position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px 8px 4px 4px; }
.chart .dual { width: 100%; position: relative; display: flex; align-items: flex-end; height: 160px; }
.chart .lab { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.2; }
.chart .val { font-size: 10px; font-weight: 700; color: var(--ink); }

.view { display: none; }
.view.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.gold-line {
  height: 2px; width: 48px; background: #C9B895; margin: 8px 0 0; border-radius: 2px;
  display: none;
}
body.theme-biblioteca .gold-line { display: block; }

.placeholder-page {
  padding: 40px 0; color: var(--muted); font-size: 14px;
}
.footnote {
  margin-top: 18px; font-size: 11px; color: var(--muted);
}


.menu-btn,
.sidebar-backdrop { display: none; }
.menu-btn {
  width: 42px; height: 42px; border: none; border-radius: 12px;
  background: var(--accent-deep); color: var(--hero-text);
  place-items: center; gap: 5px; padding: 0;
  box-shadow: var(--shadow); cursor: pointer;
}
.menu-btn span {
  display: block; width: 16px; height: 1.5px; border-radius: 2px;
  background: var(--hero-text);
}
body.theme-biblioteca .menu-btn { background: #1E3A2F; }

@media (max-width: 900px) {
  html, body { height: auto; min-height: 100%; }
  body { overflow: auto; }
  .app {
    grid-template-columns: 1fr;
    padding: 10px;
    min-height: 100dvh;
    height: auto;
  }
  .menu-btn {
    display: grid;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 60;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 10, 0.45);
    z-index: 40;
    border: 0;
  }
  body.nav-open .sidebar-backdrop { display: block; }
  .sidebar {
    position: fixed;
    top: 10px; left: 10px; bottom: 10px;
    width: min(280px, 86vw);
    z-index: 50;
    transform: translateX(calc(-100% - 24px));
    transition: transform 0.2s ease;
    overflow: auto;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .main {
    min-height: calc(100dvh - 20px);
    border-radius: 18px;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 16px 8px 62px;
  }
  h1 { font-size: 28px; }
  .view.active { overflow: visible; }
  .content { padding: 4px 16px 28px; overflow: visible; }
  .period { flex-wrap: wrap; }
  .grid-metrics,
  .insights-cols,
  .kpi-row { grid-template-columns: 1fr; }
  .posts { grid-template-columns: 1fr 1fr; }
  .fila { grid-template-columns: 1fr 1fr; }
  .card .value { font-size: 34px; }
  .cal { gap: 4px; }
  .day { min-height: 70px; padding: 6px; }
  .event img,
  .event .ph { display: none; }
  .insights-hero h2 { font-size: 22px; }
  .insights-hero { padding: 18px; }
}

@media (max-width: 560px) {
  .fila { grid-template-columns: 1fr; }
  .posts { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 26px; }
}

/* === triagem e pins === */
.fila-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.triagem-progress {
  font-size: 13px; font-weight: 700; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase; margin: 8px 0 14px;
}
.triagem-card {
  max-width: 640px;
  padding: 28px 26px 22px;
  border-top: 6px solid var(--accent);
}
.triagem-card.faixa-verde { border-top-color: #1E3A2F; }
.triagem-card.faixa-bege { border-top-color: #C9B895; }
.faixa-pill {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent-deep);
  padding: 4px 8px; border-radius: 999px; margin-bottom: 14px;
}
.triagem-card.faixa-verde .faixa-pill { background: #1E3A2F; color: #F1EBDD; }
.triagem-card.faixa-bege .faixa-pill { background: #EFE4CB; color: #7A5A1E; }
.triagem-card h2 {
  font-family: var(--serif); font-size: 28px; font-weight: 520; line-height: 1.25;
}
.triagem-meta { color: var(--muted); margin: 10px 0 22px; font-size: 14px; }
.triagem-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.danger { color: var(--danger); border-color: #e4c4bb; }
.btn-inline { padding: 4px 10px; font-size: 11px; margin-left: 8px; }
.triagem-summary { max-width: 640px; }
.triagem-summary h2 { font-family: var(--serif); font-size: 26px; margin-bottom: 8px; }
.triagem-summary h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; }
.triagem-summary ul { padding-left: 18px; font-size: 14px; }
.triagem-summary li { margin: 6px 0; }
.triagem-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0;
}
.triagem-stats div { background: var(--chip); border-radius: 12px; padding: 12px; }
.triagem-stats strong { display: block; font-family: var(--serif); font-size: 26px; }
.triagem-stats span { font-size: 12px; color: var(--muted); }
.triagem-summary .triagem-actions { margin-top: 18px; }

.pecas-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.peca-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow); padding: 0; font: inherit; color: inherit;
}
.peca-cover {
  aspect-ratio: 1; background: var(--accent-soft) center/contain no-repeat;
}
.peca-body { padding: 12px; }
.peca-body .meta { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.peca-body .title { font-size: 15px; font-weight: 600; margin: 6px 0 6px; }
.peca-body .fmt { font-size: 12px; color: var(--muted); }

.revisor-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.revisor-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 520; }
.revisor-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start;
}
.slide-frame {
  position: relative; background: #1E3A2F; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
}
.slide-frame img { display: block; width: 100%; height: auto; vertical-align: middle; cursor: crosshair; }
.pin-layer { position: absolute; inset: 0; pointer-events: none; }
.pin {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border: 0; border-radius: 50%; background: #7A5A1E; color: #F1EBDD;
  font-size: 12px; font-weight: 700; cursor: pointer; pointer-events: auto;
  box-shadow: 0 2px 8px rgba(30,58,47,.35);
}
.pin.draft { background: #1E3A2F; }
.slide-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px;
  font-size: 13px; color: var(--muted);
}
.pin-list { list-style: none; padding: 0; margin: 10px 0 14px; }
.pin-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 8px 0; }
.pin-list .pin-num {
  flex: 0 0 22px; height: 22px; border-radius: 50%; background: #7A5A1E; color: #F1EBDD;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.pin-list .muted { color: var(--muted); display: block; }
.pin-form label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.pin-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px;
  font: inherit; background: var(--shell); color: var(--ink); resize: vertical; margin-bottom: 8px;
}
.revisor-side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

@media (max-width: 900px) {
  .pecas-grid { grid-template-columns: 1fr; }
  .revisor-layout { grid-template-columns: 1fr; }
  .revisor-head { flex-direction: column; }
  .triagem-card h2 { font-size: 24px; }
  .triagem-stats { grid-template-columns: 1fr; }
}

/* === Roteiros === */
.rt-legend {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  font-size: 12px; color: var(--muted); margin: 8px 0 6px;
}
.rt-legend i {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 6px; vertical-align: -1px;
}
.rt-legend i.verde { background: #1E3A2F; }
.rt-legend i.bege { background: #E8DCC4; border: 1px solid #c9b895; }
.rt-group { margin: 22px 0 8px; }
.rt-group h2 {
  font-family: var(--serif); font-size: 22px; font-weight: 520;
  display: flex; align-items: baseline; gap: 10px;
}
.rt-group h2 .n {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.rt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.rt-card {
  display: flex; flex-direction: column; align-items: stretch;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  padding: 0; transition: transform .15s ease, box-shadow .15s ease;
}
.rt-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(30,58,47,.14); }
.rt-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rt-card .band {
  height: 8px; width: 100%;
}
.rt-card.faixa-verde .band { background: #1E3A2F; }
.rt-card.faixa-bege .band { background: #E8DCC4; }
.rt-card .rt-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rt-card .rt-kicker {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.rt-pill {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep);
}
.rt-card.faixa-verde .rt-pill.faixa { background: #1E3A2F; color: #E8DCC4; }
.rt-card.faixa-bege .rt-pill.faixa { background: #E8DCC4; color: #7A5A1E; }
.rt-card h3 {
  font-family: var(--serif); font-size: 20px; font-weight: 520;
  letter-spacing: -.015em; line-height: 1.25;
}
.rt-card .rt-meta { font-size: 12px; color: var(--muted); }
.rt-alert {
  font-size: 11.5px; line-height: 1.4; color: #7A5A1E;
  background: #efe4cb; border-radius: 10px; padding: 7px 9px;
}
.rt-alert + .rt-alert { margin-top: -2px; }
.rt-empty {
  color: var(--muted); font-size: 13px; padding: 8px 0 4px;
}

.rt-modal[hidden] { display: none !important; }
.rt-modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 18px;
}
.rt-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 16, 10, 0.52);
  border: 0; padding: 0; cursor: pointer;
}
.rt-modal-panel {
  position: relative; z-index: 1;
  width: min(760px, 100%);
  max-height: min(92dvh, 920px);
  background: var(--shell);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(18, 20, 16, .28);
  display: flex; flex-direction: column;
  overflow: hidden;
  color: var(--ink);
}
.rt-modal-panel.prompter-on {
  background: #15241e;
  color: #E8DCC4;
  width: min(640px, 100%);
}
.rt-modal-head {
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.rt-modal-panel.prompter-on .rt-modal-head {
  border-bottom-color: rgba(232,220,196,.16);
  background: #15241e;
}
.rt-modal-head .rt-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.rt-modal-head h2 {
  font-family: var(--serif); font-size: 26px; font-weight: 520;
  letter-spacing: -.02em; line-height: 1.2;
}
.rt-modal-panel.prompter-on .rt-modal-head h2 { color: #E8DCC4; }
.rt-close {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-size: 20px; cursor: pointer; line-height: 1;
}
.rt-modal-panel.prompter-on .rt-close {
  background: #1E3A2F; color: #E8DCC4; border-color: rgba(232,220,196,.25);
}
.rt-modal-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.rt-modal-panel.prompter-on .rt-modal-sub { color: rgba(232,220,196,.7); }
.rt-modal-panel.prompter-on #rt-modal-alerts,
.rt-modal-panel.prompter-on .rt-modal-sub { display: none; }
.rt-modal-panel.prompter-on .rt-modal-head { padding-bottom: 10px; }
.rt-modal-panel.prompter-on .rt-modal-head h2 { font-size: 18px; }

.rt-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center;
}
.rt-tabs .btn.active {
  background: var(--accent-deep); color: var(--hero-text); border-color: var(--accent-deep);
}
.rt-modal-panel.prompter-on .rt-tabs .btn {
  background: transparent; color: #E8DCC4; border-color: rgba(232,220,196,.3);
}
.rt-modal-panel.prompter-on .rt-tabs .btn.active {
  background: #E8DCC4; color: #1E3A2F; border-color: #E8DCC4;
}
.rt-modal-body {
  overflow: auto; padding: 18px 22px 28px;
  flex: 1; min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.rt-block {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
}
.rt-block .k {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.rt-block .fala {
  font-family: var(--serif); font-size: 18px; line-height: 1.4; font-weight: 500;
}
.rt-block .tela {
  margin-top: 10px; font-size: 13px; color: #1E3A2F;
  background: #E8DCC4; border-radius: 10px; padding: 8px 10px; line-height: 1.4;
  white-space: pre-line;
}
.rt-slide {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
  border-left: 4px solid var(--accent-deep);
}
.rt-slide.faixa-bege { border-left-color: #C9B895; }
.rt-slide .n {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.rt-slide h3 { font-family: var(--serif); font-size: 20px; font-weight: 520; margin: 2px 0 8px; }
.rt-slide p { font-size: 15px; line-height: 1.5; white-space: pre-line; }
.rt-legenda, .rt-ideia {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; margin-top: 8px;
}
.rt-legenda h3, .rt-ideia h3 {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.rt-legenda p, .rt-ideia p { font-size: 14px; line-height: 1.55; white-space: pre-line; }
.rt-prompter {
  font-family: var(--serif);
  font-size: clamp(22px, 5.6vw, 30px);
  font-weight: 500;
  line-height: 1.5;
  color: #E8DCC4;
  white-space: pre-wrap;
  max-width: 34em;
  margin: 0 auto;
  padding: 8px 4px 40px;
}
.rt-copy-ok { opacity: .85; }
.rt-modal-alerts { margin: 8px 0 4px; display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 900px) {
  .rt-modal { padding: 0; align-items: stretch; }
  .rt-modal-panel, .rt-modal-panel.prompter-on {
    width: 100%; max-height: 100dvh; height: 100dvh;
    border-radius: 0;
  }
  .rt-card h3 { font-size: 18px; }
  .rt-modal-head h2 { font-size: 22px; }
  .rt-prompter { font-size: 24px; padding-bottom: 64px; }
  .rt-modal-head { padding: 14px 16px 10px; }
  .rt-modal-body { padding: 14px 16px 32px; }
}

body.rt-modal-open { overflow: hidden; }

.backlog-box {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.backlog-box h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 520;
  margin-bottom: 6px;
}
.backlog-box p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.backlog-box ul { list-style: disc; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.backlog-box li { font-size: 13px; line-height: 1.4; color: var(--ink); }

.cal-month { margin-top: 8px; margin-bottom: 28px; }
.cal-month .cal-head h2 {
  font-family: var(--serif);
  font-weight: 520;
  font-size: 22px;
  margin: 0;
}
.cal-legend-head { margin-top: 0; }
.cal-undated {
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.cal-undated h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 520;
  margin-bottom: 4px;
}
.cal-undated p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.cal-undated-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-undated-list .event { margin: 0; min-width: 180px; max-width: 260px; }
.cal-arquivo-bar { margin: 8px 0 18px; }
.cal-arquivo-bar h2 {
  font-family: var(--serif);
  font-weight: 520;
  font-size: 22px;
}
.cal-arquivo-bar p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cal-arquivo-empty { font-size: 14px; color: var(--muted); max-width: 640px; }
#btn-cal-arquivados.active, .period button.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
