/* ── Reset & Root ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #60a5fa;
  --primary-dark:  #3b82f6;
  --primary-light: #1e2235;
  --accent:        #8b5cf6;
  --accent2:       #f59e0b;
  --text-dark:     #f1f5f9;
  --text-mid:      #e2e8f0;
  --text-body:     #cbd5e1;
  --text-muted:    #94a3b8;
  --bg:            #09091a;
  --bg-card:       #111827;
  --border:        rgba(96, 165, 250, 0.08);
  --border-mid:    rgba(96, 165, 250, 0.18);
  --border-focus:  #60a5fa;
  --radius:        6px;
  --radius-lg:     12px;
  --shadow:        0 4px 24px rgba(96, 165, 250, 0.08), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-card:   0 2px 16px rgba(96, 165, 250, 0.10), 0 1px 4px rgba(0,0,0,0.3);
  --mono:          'JetBrains Mono', 'Fira Code', monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Background grid ───────────────────────────────────────── */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(96, 165, 250, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.02) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px;
}

/* ── Layout ────────────────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 90%;
  margin: 0 auto;
  padding: 0 0 80px;
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: relative;
  padding: 14px 0;
  min-height: calc(80px + 28px);
  border-bottom: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.header-image {
  height: 80px;
  width: auto;
  display: block;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.logo-text {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
}

.lang-toggle:hover { border-color: var(--primary); color: var(--primary); }

.flag-icon { border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.btn-auth {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn-auth:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(96,165,250,0.25); }

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--primary-light);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 5px 10px;
}

.btn-signout {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--mono);
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  transition: color 0.15s;
}

.btn-signout:hover { color: var(--primary); }

.pill-sep {
  color: var(--border-mid);
  font-size: 0.65rem;
}

.btn-delete-account {
  background: none;
  border: none;
  color: #f87171;
  font-size: 0.65rem;
  font-family: var(--mono);
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.btn-delete-account:hover { opacity: 1; }
.btn-delete-account:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Category tabs ─────────────────────────────────────────── */
.category-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 0 0;
}

.cat-tab {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-mid);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.cat-tab:hover { border-color: var(--primary); color: var(--primary); }

.cat-tab.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ── Filters bar (search + date range) ─────────────────────── */
.filters-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 0;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 160px;
  background: var(--primary-light);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 0.875rem;
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--border-focus); }

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.date-input {
  background: var(--primary-light);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 0.8125rem;
  color: var(--text-dark);
  font-family: var(--mono);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  width: 138px;
}

.date-input:focus { border-color: var(--border-focus); }
.date-input::-webkit-calendar-picker-indicator {
  filter: brightness(0) invert(0.55);
  cursor: pointer;
}

.date-sep {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: var(--mono);
  user-select: none;
}

/* ── Feed ──────────────────────────────────────────────────── */
.feed {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── News card ─────────────────────────────────────────────── */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 24px 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}

.news-card:hover {
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 6px 32px rgba(96, 165, 250, 0.12), 0 2px 8px rgba(0,0,0,0.3);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-top-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category badge */
.cat-badge {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.cat-badge.governanca { background: rgba(96,165,250,0.12); color: #93c5fd; border: 1px solid rgba(96,165,250,0.2); }
.cat-badge.automacao  { background: rgba(139,92,246,0.12); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.2); }
.cat-badge.agentes    { background: rgba(245,158,11,0.12); color: #fcd34d; border: 1px solid rgba(245,158,11,0.2); }
.cat-badge.extracao   { background: rgba(34,197,94,0.12);  color: #86efac; border: 1px solid rgba(34,197,94,0.2); }

.card-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* UK flag hover */
.en-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
  background: none;
}

.en-toggle:hover {
  border-color: var(--border-mid);
  background: var(--primary-light);
}

.en-toggle.active {
  border-color: rgba(96,165,250,0.3);
  background: var(--primary-light);
}

.source-icon { font-size: 1.125rem; line-height: 1; }

/* Source link */
.source-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-family: var(--mono);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.source-link:hover {
  color: var(--primary);
  border-color: var(--border-mid);
}

.source-link img { border-radius: 2px; }

.card-text {
  font-size: 0.9375rem;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 14px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.card-reactions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--mono);
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.reaction-btn:hover {
  border-color: rgba(96,165,250,0.4);
  color: var(--primary);
  background: var(--primary-light);
}

.reaction-btn.liked    { border-color: rgba(96,165,250,0.6); color: var(--primary); background: var(--primary-light); }
.reaction-btn.disliked { border-color: rgba(245,158,11,0.6); color: var(--accent2); background: rgba(245,158,11,0.08); }

.reaction-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.comment-count {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-family: var(--mono);
  color: var(--text-muted);
}

.card-date {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Load more ─────────────────────────────────────────────── */
.hidden { display: none !important; }

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.btn-load-more {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 9px 24px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.btn-load-more:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(96,165,250,0.12); }
.btn-load-more:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Empty / loading states ────────────────────────────────── */
.feed-message {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.feed-spinner {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

/* ── Auth modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 26, 0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.is-open { display: flex; }

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.125rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
  line-height: 1;
}

.modal-close:hover { color: var(--text-dark); }

.modal-body { padding: 16px 24px 24px; }

/* Auth tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-mid);
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.auth-tab:hover { color: var(--primary); }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Form fields */
.field-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 5px;
}

.required-mark { color: var(--accent2); }

.form-input, .form-select {
  width: 100%;
  background: var(--primary-light);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.form-input::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus { border-color: var(--border-focus); }
.form-input.invalid, .form-select.invalid { border-color: #f87171; }

.form-select option { background: #1e2235; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Honeypot */
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Consent row */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--primary-light);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.consent-row.invalid { border-color: #f87171; }

.consent-checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.consent-label {
  font-size: 0.8125rem;
  color: var(--text-body);
  line-height: 1.5;
  cursor: pointer;
}

.consent-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.consent-link:hover { color: var(--primary-dark); }

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  margin-top: 4px;
}

.btn-submit:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(96,165,250,0.25); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* Auth intro message */
.auth-message {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 8px;
}

/* Auth SPAM warning */
.auth-warning {
  font-size: 0.75rem;
  color: #d97706;
  line-height: 1.6;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 4px;
  margin-bottom: 16px;
}

/* Auth messages */
.auth-success {
  text-align: center;
  padding: 16px 0 8px;
}

.auth-success-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.auth-success-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.auth-success-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.field-error {
  font-size: 0.75rem;
  color: #f87171;
  margin-top: 4px;
  display: none;
}

.field-error.visible { display: block; }

.auth-error {
  font-size: 0.8125rem;
  color: #f87171;
  text-align: center;
  padding: 8px 0 0;
  display: none;
}

.auth-error.visible { display: block; }

/* ── Privacy modal (iframe) ────────────────────────────────── */
.pp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 26, 0.9);
  backdrop-filter: blur(6px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pp-modal-overlay.is-open { display: flex; }

.pp-modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  width: 75vw;
  max-width: 780px;
  height: 75vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pp-modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-mid);
  flex-shrink: 0;
}

.pp-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.125rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, background 0.15s;
}

.pp-modal-close:hover { color: var(--text-dark); background: var(--primary-light); }

.pp-modal-header.with-title { justify-content: space-between; }

.pp-modal-header-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: var(--mono);
}

.pp-modal-iframe {
  flex: 1;
  border: none;
  width: 100%;
  background: var(--bg);
}

/* Article modal — 75 % of screen */
.pp-modal-container.article-size {
  width: 75vw;
  max-width: 1100px;
  height: 75vh;
}

/* Auth modal */
.pp-modal-container.auth-size {
  width: 75vw;
  max-width: 560px;
  height: 75vh;
}

/* Post page when loaded inside the article modal iframe */
body.modal-mode .page-wrapper {
  padding-top: 20px;
  padding-bottom: 40px;
  width: 94%;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border-mid);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-link {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.contact-link:hover { opacity: 1; }
.contact-icon { width: 26px; height: 26px; object-fit: contain; }

.footer-copy {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: var(--mono);
  letter-spacing: 0.02em;
  text-align: center;
}

/* ── Post page ─────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  background: var(--primary-light);
  margin: 24px 0 20px;
  transition: border-color 0.15s, color 0.15s;
}
.back-link:hover { border-color: var(--primary); color: var(--primary); }

.article-container {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.article-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  flex: 1;
  margin-right: 12px;
}

.article-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.article-text {
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.85;
  margin-bottom: 20px;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Comments section */
.comments-section {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}

.comments-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.comment-card:last-child { border-bottom: none; }

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-author {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
}

.comment-country {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  background: var(--primary-light);
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 1px 6px;
}

.comment-date {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-left: auto;
}

.comment-text {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.7;
}

/* Comment form */
.comment-form-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-mid);
}

.comment-form-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 10px;
}

.form-textarea {
  width: 100%;
  background: var(--primary-light);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  resize: vertical;
  min-height: 90px;
  outline: none;
  transition: border-color 0.15s;
}
.form-textarea::placeholder { color: var(--text-muted); }
.form-textarea:focus { border-color: var(--border-focus); }
.form-textarea.invalid { border-color: #f87171; }

.char-count {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}
.char-count.warn { color: var(--accent2); }

.btn-comment {
  margin-top: 10px;
  padding: 9px 20px;
  background: var(--primary);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-comment:hover { background: var(--primary-dark); }
.btn-comment:disabled { opacity: 0.55; cursor: not-allowed; }

.comment-feedback {
  margin-top: 10px;
  font-size: 0.8125rem;
  display: none;
}
.comment-feedback.success { display: block; color: #86efac; }
.comment-feedback.error   { display: block; color: #f87171; }

.login-prompt {
  padding: 14px 16px;
  background: var(--primary-light);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 20px;
}

.login-prompt-link {
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}

.no-comments {
  padding: 16px 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .page-wrapper { width: 94%; padding: 0 0 64px; }
  .news-card { padding: 16px; }
  .card-top { flex-direction: column; gap: 8px; }
  .field-row { grid-template-columns: 1fr; }
  .modal-container { max-height: 95vh; }
  .header-center { display: none; }
  .pp-modal-container { width: 94vw; height: 90vh; }
  .pp-modal-container.article-size { width: 94vw; height: 90vh; }
  .pp-modal-container.auth-size { width: 94vw; max-width: none; height: 90vh; }
  .category-nav { gap: 6px; }
  .cat-tab { font-size: 0.6875rem; padding: 5px 10px; }
  .date-range { width: 100%; }
  .date-input  { flex: 1; width: auto; font-size: 0.75rem; }
}
