/* =====================================================================
   PubMed Monitor - CSS principal
   Light/dark mode controlado via data-theme="light|dark" no <html>
   ===================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f5;
  --bg-tertiary: #ededea;
  --bg-info: #e6f1fb;
  --bg-success: #e1f5ee;
  --bg-warning: #faeeda;
  --bg-danger: #fcebeb;
  --text-primary: #1a1a1a;
  --text-secondary: #5f5e5a;
  --text-tertiary: #888780;
  --text-info: #185fa5;
  --text-success: #0f6e56;
  --text-warning: #854f0b;
  --text-danger: #a32d2d;
  --border-tertiary: rgba(0, 0, 0, 0.08);
  --border-secondary: rgba(0, 0, 0, 0.16);
  --border-primary: rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --bg-primary: #1c1c1a;
  --bg-secondary: #252523;
  --bg-tertiary: #2e2e2c;
  --bg-info: #0c2c4a;
  --bg-success: #0a3d2d;
  --bg-warning: #3d2a08;
  --bg-danger: #3d1414;
  --text-primary: #f5f4ef;
  --text-secondary: #b8b6ae;
  --text-tertiary: #8b8a82;
  --text-info: #85b7eb;
  --text-success: #5dcaa5;
  --text-warning: #f0b260;
  --text-danger: #f09595;
  --border-tertiary: rgba(255, 255, 255, 0.08);
  --border-secondary: rgba(255, 255, 255, 0.16);
  --border-primary: rgba(255, 255, 255, 0.24);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-secondary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--text-info); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === TOPBAR === */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-primary);
  border-bottom: 0.5px solid var(--border-tertiary);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-info);
  color: var(--text-info);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.brand-icon-large {
  width: 56px;
  height: 56px;
  font-size: 28px;
  margin-bottom: 16px;
}

.brand-title { font-size: 15px; font-weight: 600; }
.brand-subtitle { font-size: 12px; color: var(--text-secondary); }

.topbar-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.nav-link:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-link.active {
  background: var(--bg-info);
  color: var(--text-info);
}

.nav-link i { font-size: 18px; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 0.5px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background var(--transition), border-color var(--transition);
}

.icon-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-tertiary);
  color: var(--text-primary);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-info);
  color: var(--text-info);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* === MAIN CONTENT === */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

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

.page-title { font-size: 22px; font-weight: 600; }
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* === METRIC CARDS === */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-primary);
  border: 0.5px solid var(--border-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
}

.metric-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.metric-value { font-size: 26px; font-weight: 600; }
.metric-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

/* === MONITOR CARDS === */
.monitor-list { display: flex; flex-direction: column; gap: 12px; }

.monitor-card {
  background: var(--bg-primary);
  border: 0.5px solid var(--border-tertiary);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: border-color var(--transition);
}

.monitor-card:hover { border-color: var(--border-secondary); }
.monitor-card.paused { opacity: 0.65; }

.monitor-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.monitor-info { flex: 1; min-width: 0; }
.monitor-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.monitor-title { font-size: 15px; font-weight: 600; }
.monitor-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.monitor-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-tertiary); flex-wrap: wrap; }
.monitor-meta i { font-size: 13px; vertical-align: -1px; margin-right: 4px; }

.monitor-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* === BADGES === */
.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-success { background: var(--bg-success); color: var(--text-success); }
.badge-info { background: var(--bg-info); color: var(--text-info); }
.badge-warning { background: var(--bg-warning); color: var(--text-warning); }
.badge-danger { background: var(--bg-danger); color: var(--text-danger); }
.badge-neutral { background: var(--bg-tertiary); color: var(--text-secondary); }

/* === BUTTONS === */
button, .btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border-secondary);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

button:hover, .btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-primary);
}

button:active, .btn:active { transform: scale(0.98); }

button:disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--text-info);
  color: white;
  border-color: var(--text-info);
}

[data-theme="dark"] .btn-primary {
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--text-info);
  opacity: 0.9;
  border-color: var(--text-info);
}

.btn-sm { font-size: 12px; padding: 6px 10px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

button i, .btn i { font-size: 16px; }

/* === FORM ELEMENTS === */
input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select {
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 0.5px solid var(--border-secondary);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--text-info);
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.15);
}

input::placeholder, textarea::placeholder { color: var(--text-tertiary); }

.input-with-icon {
  position: relative;
}
.input-with-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}
.input-with-icon input { padding-left: 36px; }

label.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.form-group { margin-bottom: 16px; }

/* === STEPPER === */
.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-primary);
  border: 0.5px solid var(--border-tertiary);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}

.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.step-pending .step-circle { background: var(--bg-tertiary); color: var(--text-tertiary); }
.step-active .step-circle { background: var(--bg-info); color: var(--text-info); }
.step-done .step-circle { background: var(--bg-success); color: var(--text-success); }

.step-label { font-size: 13px; color: var(--text-secondary); }
.step-active .step-label { color: var(--text-primary); font-weight: 500; }
.step-pending .step-label { color: var(--text-tertiary); }

/* === MESH SEARCH === */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  min-height: 28px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-info);
  color: var(--text-info);
  border-radius: var(--radius-md);
  font-size: 12px;
}

.chip-qualifier {
  opacity: 0.7;
  font-size: 11px;
}

.chip-majr {
  font-size: 10px;
  padding: 1px 6px;
  background: var(--bg-warning);
  color: var(--text-warning);
  border-radius: var(--radius-sm);
}

.chip-remove { cursor: pointer; font-size: 14px; }

.mesh-dropdown {
  background: var(--bg-primary);
  border: 0.5px solid var(--border-secondary);
  border-radius: var(--radius-md);
  margin-top: 4px;
  max-height: 320px;
  overflow-y: auto;
}

.mesh-dropdown-header {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-secondary);
  border-bottom: 0.5px solid var(--border-tertiary);
}

.mesh-item {
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--border-tertiary);
  cursor: pointer;
  transition: background var(--transition);
}

.mesh-item:last-child { border-bottom: none; }
.mesh-item:hover { background: var(--bg-secondary); }

.mesh-item-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mesh-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.mesh-item-qualifiers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.qualifier-pill {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.qualifier-pill:hover { background: var(--bg-info); color: var(--text-info); }
.qualifier-pill.selected { background: var(--bg-info); color: var(--text-info); }

/* === QUERY PREVIEW === */
.query-preview {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.query-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.query-preview-label {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.query-preview-text {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
  color: var(--text-primary);
}

.query-preview-text .mesh { color: var(--text-info); }
.query-preview-text .pubtype { color: var(--text-warning); }

/* === SEARCH RESULTS === */
.search-result {
  background: var(--bg-primary);
  border: 0.5px solid var(--border-tertiary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.result-row { display: flex; align-items: start; gap: 16px; }

.relevance-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 56px;
  padding-top: 4px;
}

.relevance-value { font-size: 22px; font-weight: 600; color: var(--text-info); }
.relevance-label { font-size: 10px; color: var(--text-tertiary); text-align: center; }

.result-content { flex: 1; min-width: 0; }

.result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-tertiary);
}

.result-title { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.result-authors { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }

.result-reason {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--bg-info);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.result-reason-label { color: var(--text-info); font-weight: 500; margin-right: 6px; }

.result-actions { display: flex; gap: 8px; }

/* === DIGEST CARDS === */
.timeline-section-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 24px 0 8px;
}

.digest-card {
  background: var(--bg-primary);
  border: 0.5px solid var(--border-tertiary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.digest-preview {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 10px 0;
  max-height: 120px;
  overflow: hidden;
  position: relative;
}

.digest-preview-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg-secondary));
}

/* === LOGIN === */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--bg-primary);
  border: 0.5px solid var(--border-tertiary);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-card h1 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.login-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }

.login-card form { display: flex; flex-direction: column; gap: 12px; }

.login-card button[type="submit"] {
  background: var(--text-info);
  color: white;
  border-color: var(--text-info);
  justify-content: center;
  padding: 11px 16px;
  font-weight: 500;
}

[data-theme="dark"] .login-card button[type="submit"] { color: var(--bg-primary); }

.loading-icon { display: none; animation: spin 1s linear infinite; }
.loading button .loading-icon { display: inline-block; }
.loading button .btn-label { display: none; }

.login-message {
  margin-top: 16px;
  font-size: 13px;
  padding: 10px;
  border-radius: var(--radius-md);
  display: none;
}
.login-message.show { display: block; }
.login-message.success { background: var(--bg-success); color: var(--text-success); }
.login-message.error { background: var(--bg-danger); color: var(--text-danger); }

/* === MISC === */
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.initial-loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-tertiary);
}

.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-secondary);
}

.empty-state i { font-size: 48px; color: var(--text-tertiary); margin-bottom: 16px; display: inline-block; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.empty-state p { font-size: 13px; margin-bottom: 16px; }

/* === TOAST === */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-primary);
  border: 0.5px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  min-width: 240px;
  max-width: 380px;
  animation: slideIn 200ms ease-out;
}

.toast.success { border-left: 3px solid var(--text-success); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.toast.error { border-left: 3px solid var(--text-danger); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.toast.info { border-left: 3px solid var(--text-info); border-radius: 0 var(--radius-md) var(--radius-md) 0; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* === MODAL === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 150ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .topbar { padding: 10px 16px; flex-wrap: wrap; gap: 12px; }
  .topbar-nav .nav-link span { display: none; }
  .brand-subtitle { display: none; }
  .main-content { padding: 20px 16px 48px; }
  .stepper { padding: 10px 12px; }
  .step-label { display: none; }
  .monitor-meta { flex-direction: column; gap: 4px; }
  .result-row { flex-direction: column; }
  .relevance-score { flex-direction: row; min-width: auto; }
}
/* Espaço à direita para ícones de password managers */
.login-card input[type="password"],
.login-card input[type="email"] {
  padding-right: 40px;
}
/* Garantir altura igual nos inputs do login (override do estilo nativo do browser) */
.login-card input {
  height: 40px;
  padding: 9px 12px;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

/* =====================================================================
   CSS adicional para a página pública de digest
   Cola no final do styles.css existente
   ===================================================================== */

.digest-page {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-primary);
  border: 0.5px solid var(--border-tertiary);
  border-radius: var(--radius-xl);
  padding: 40px 48px;
}

.digest-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 0.5px solid var(--border-tertiary);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.digest-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
}
.digest-back-link:hover { color: var(--text-info); text-decoration: none; }
.digest-back-link i { font-size: 14px; }

.digest-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.digest-meta i { font-size: 13px; vertical-align: -1px; margin-right: 4px; }

.digest-content h1 { font-size: 28px; font-weight: 700; margin: 0 0 4px; line-height: 1.2; }
.digest-content h2 { font-size: 18px; font-weight: 500; color: var(--text-secondary); margin: 0 0 32px; line-height: 1.4; }
.digest-content h3 { font-size: 18px; font-weight: 600; margin: 32px 0 12px; color: var(--text-primary); }
.digest-content h4 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; color: var(--text-primary); }
.digest-content h5 { font-size: 14px; font-weight: 600; margin: 20px 0 6px; }

.digest-content p {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 14px;
  color: var(--text-primary);
}

.digest-content ul {
  margin: 0 0 14px;
  padding-left: 24px;
}
.digest-content li {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.digest-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.digest-content em {
  color: var(--text-secondary);
  font-style: italic;
}

.digest-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.digest-content pre {
  background: var(--bg-secondary);
  padding: 14px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 14px 0;
}

.digest-content a {
  color: var(--text-info);
  text-decoration: underline;
  text-decoration-color: rgba(24, 95, 165, 0.3);
}
.digest-content a:hover { text-decoration-color: var(--text-info); }

.digest-page-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 0.5px solid var(--border-tertiary);
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Modo público (sem login): esconder a top nav */
body.public-view .topbar-nav,
body.public-view .topbar-actions { display: none; }

/* Responsivo */
@media (max-width: 768px) {
  .digest-page { padding: 24px 20px; border-radius: 0; border-left: none; border-right: none; }
  .digest-content h1 { font-size: 22px; }
  .digest-content h2 { font-size: 15px; margin-bottom: 24px; }
  .digest-content h3 { font-size: 16px; }
  .digest-content p, .digest-content li { font-size: 14px; }
}
