/* EngagedProof — Reading Room viewer styles */

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

:root {
  --bg: #faf8f3;
  --card: #ffffff;
  --text: #1d1a16;
  --muted: #746b63;
  --accent: #336699;
  --accent-light: #e8f0f7;
  --border: #e8e6e3;
  --success: #2d7a4f;
  --success-light: #eaf5ee;
  --warning: #8a6d1a;
  --warning-light: #f5f0e1;
  --error: #c53030;
  --error-light: #fce8e8;
  --radius: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 32px 16px;
}
.header-content { max-width: 800px; margin: 0 auto; }
.header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.header .subtitle { font-size: 1rem; color: var(--muted); margin-top: 4px; }
.header .period { font-size: 0.875rem; color: var(--muted); margin-top: 2px; }

.container { max-width: 800px; margin: 0 auto; padding: 24px 16px 48px; }

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.8125rem;
}
.meta-item { color: var(--muted); }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-firm { background: var(--accent-light); color: var(--accent); }
.badge-client { background: var(--success-light); color: var(--success); }
.badge-supported { background: var(--success-light); color: var(--success); }
.badge-qualified { background: var(--warning-light); color: var(--warning); }
.badge-rejected { background: var(--error-light); color: var(--error); }
.badge-category { background: #f0ede8; color: var(--muted); }

.notice {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.8125rem;
  color: var(--accent);
  line-height: 1.5;
}

.evidence-gap {
  background: var(--warning-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.8125rem;
  color: var(--warning);
}
.evidence-gap-title { font-weight: 600; margin-bottom: 4px; }

.section { margin-bottom: 28px; }
.section h2 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 4px; }
.section-description { font-size: 0.8125rem; color: var(--muted); margin-bottom: 10px; }
.section-content { font-size: 0.9375rem; white-space: pre-wrap; word-wrap: break-word; }

.claim {
  border-left: 3px solid var(--border);
  padding: 10px 0 10px 14px;
  margin-top: 12px;
}
.claim-text { font-size: 0.875rem; }
.claim-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.claim-uncertainty { font-size: 0.75rem; color: var(--muted); margin-top: 6px; font-style: italic; }

.ack-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 32px;
}
.ack-section h2 { font-size: 1rem; margin-bottom: 8px; }
.ack-disclaimer {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.ack-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ack-btn:hover { opacity: 0.9; }
.ack-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ack-success {
  background: var(--success-light);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.ack-success .ack-title { font-weight: 600; color: var(--success); font-size: 0.875rem; }
.ack-success .ack-time { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.ack-success .ack-note { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

.ack-error { color: var(--error); font-size: 0.8125rem; margin-top: 8px; }

.footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); }
.footer-text { font-size: 0.75rem; color: var(--muted); margin-bottom: 4px; }
.footer-hash { font-size: 0.6875rem; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 12px;
  color: var(--muted);
  font-size: 0.875rem;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  max-width: 480px;
  margin: 48px auto;
}
.error-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--error-light);
  color: var(--error);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 12px;
}
.error-card h2 { font-size: 1.125rem; margin-bottom: 6px; }
.error-card p { font-size: 0.875rem; color: var(--muted); }

@media (max-width: 600px) {
  .header { padding: 24px 16px; }
  .header h1 { font-size: 1.25rem; }
  .container { padding: 16px 12px 40px; }
  .meta-bar { font-size: 0.75rem; gap: 6px 12px; }
  .section h2 { font-size: 1rem; }
}