/* Roundtable Site Styles */

:root {
  --color-primary: #111827;
  --color-primary-hover: #0f172a;
  --color-accent: #8a723d;  /* Darker gold for WCAG AA */
  --color-accent-hover: #6e5c32;  /* Updated */
  --text-primary: #1c1c1c;
  --text-secondary: #3f3f3f;
  --text-muted: #6f6f6f;
  --bg-primary: #f7f7f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --border-color: #e6e6e3;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  /* Swiss-spa landing page tokens */
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1c1c1c;
  --muted: #6f6f6f;
  --border: #e6e6e3;
  --accent: #8a723d;  /* Darker gold for WCAG AA */
  --max: 760px;
  --pad: 24px;
  --radius: 14px;

  /* ============================================
     MISSING DESIGN TOKENS - Surgical Fix
     ============================================ */

  /* Border Radius - Complete System */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Hover States */
  --bg-hover: #f5f5f5;
  --border-color: var(--border-color);
}

* {
  box-sizing: border-box;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.site-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.site-title a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color 0.2s ease;
}

.site-title a:hover {
  color: var(--color-primary-hover);
}

.site-description {
  margin: 0.5rem 0 0 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Main content */
.site-main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Footer */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-section a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

/* Features Overview */
.features-overview {
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-item {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.feature-item h3 {
  margin: 0 0 0.5rem 0;
  color: var(--color-primary);
  font-size: 1.125rem;
}

/* Visually Hidden Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to Content Link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* Focus Visible - keyboard-only focus */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  margin: 0 0 1rem 0;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Lists */
ul, ol {
  margin: 0 0 1rem 0;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Code */
code {
  background-color: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

pre {
  background-color: var(--bg-secondary);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 0 0 1rem 0;
}

pre code {
  background: none;
  padding: 0;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem 0;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
  background-color: var(--bg-secondary);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: #1f2937;
    --border-color: #374151;
  }
}

/* Hero Section */
.hero {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

/* Room Grid */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.room-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.room-card h3 {
  margin-bottom: 0.5rem;
}

.room-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.room-card h3 a:hover {
  color: var(--color-primary);
}

.room-circle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.room-circle a {
  color: var(--color-primary);
  text-decoration: none;
}

.room-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.room-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.room-status {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.status-draft {
  background-color: #f3f4f6;
  color: var(--text-muted);
}

.status-active {
  background-color: #dbeafe;
  color: var(--color-primary);
}

.status-closed {
  background-color: #f3f4f6;
  color: var(--text-muted);
}

.room-deadline {
  color: var(--text-muted);
}

/* Call to Action */
.cta {
  text-align: center;
  padding: 3rem 0;
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  margin-bottom: 3rem;
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Button */
.button {
  display: inline-block;
  background-color: var(--color-primary);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.button:hover {
  background-color: var(--color-primary-hover);
  color: white;
  text-decoration: none;
}

.button.button-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(181, 154, 91, 0.45);
}

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

.muted {
  color: var(--text-muted);
}

.prose {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
}

/* Landing page - Swiss-spa design */
.lp {
  max-width: var(--max);
  margin: 0 auto;
}

.lp-hero {
  padding: 56px var(--pad) 72px;
  text-align: center;
}

.kicker {
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.lp-hero h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.lp .lead {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.lp .sublead {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.lp-section {
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
}

.lp-section:first-of-type {
  border-top: none;
}

.lp-cta {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.ctaRow {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.ctaAlt {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--text-muted);
}

.lp-footer {
  padding: 2rem 0 0;
  text-align: center;
}

.lp-demo {
  text-align: center;
}

/* How It Works */
.how-it-works {
  margin-bottom: 3rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
}

.step h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.step p {
  color: var(--text-secondary);
}

/* Swiss-spa landing page variant */
body.page-home {
  background: linear-gradient(to bottom, #fafaf8, #f7f7f5);
}

.lp-swiss-spa {
  background: transparent;
  color: var(--text);
}

/* Header transparency for swiss-spa landing page */
body.page-home .site-header {
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.lp-swiss-spa .lp-hero {
  padding: 80px var(--pad) 96px;
}

.lp-swiss-spa .lp-hero h1 {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.lp-swiss-spa .lead {
  font-size: 1.375rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
  max-width: 42ch;
  margin: 0 auto 2rem;
}

.lp-swiss-spa .ctaRow {
  gap: 1.25rem;
}

.lp-swiss-spa .button {
  background-color: var(--accent);
  color: #ffffff;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.lp-swiss-spa .button:hover {
  background-color: #756035;
  transform: translateY(-1px);
}

.lp-swiss-spa .button-secondary {
  background-color: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.lp-swiss-spa .button-secondary:hover {
  background-color: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}

.lp-swiss-spa .lp-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.lp-swiss-spa .lp-section h2 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  color: var(--text);
}

.lp-swiss-spa .steps {
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.lp-swiss-spa .step {
  background-color: transparent;
  padding: 0;
  text-align: left;
}

.lp-swiss-spa .step h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.lp-swiss-spa .step p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.0625rem;
}

.lp-swiss-spa .prose {
  max-width: 52ch;
}

.lp-swiss-spa .prose p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.0625rem;
  margin-bottom: 1rem;
}

.lp-swiss-spa .lp-cta {
  background-color: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border-radius: var(--radius);
}

.lp-swiss-spa .lp-footer {
  padding: 3rem 0 2rem;
}

.lp-swiss-spa .lp-footer .muted {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Mobile responsive adjustments for Swiss-spa */
@media (max-width: 640px) {
  .lp-swiss-spa .lp-hero {
    padding: 48px var(--pad) 64px;
  }

  .lp-swiss-spa .lp-hero h1 {
    font-size: 2.25rem;
  }

  .lp-swiss-spa .lead {
    font-size: 1.125rem;
  }

  .lp-swiss-spa .lp-section {
    padding: 3rem 0;
  }

  .lp-swiss-spa .lp-section h2 {
    font-size: 1.625rem;
  }

  .lp-swiss-spa .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .lp-swiss-spa .ctaRow {
    flex-direction: column;
    align-items: stretch;
  }

  .lp-swiss-spa .button,
  .lp-swiss-spa .button-secondary {
    text-align: center;
    padding: 0.875rem 1.5rem;
  }
}

/* Swiss-spa dark mode support */
@media (prefers-color-scheme: dark) {
  body.page-home {
    background: linear-gradient(to bottom, #0a0a0a, #111827);
  }

  /* Override swiss-spa CSS variables for dark mode */
  body.page-home {
    --bg: #111827;
    --card: rgba(31, 41, 55, 0.6);
    --text: #f9fafb;
    --muted: #d1d5db;
    --border: rgba(255, 255, 255, 0.1);
  }

  /* Header border adjustment for dark mode */
  body.page-home .site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Header logo and description */
  body.page-home .site-title a {
    color: #f9fafb;
  }

  body.page-home .site-description {
    color: #d1d5db;
  }

  .lp-swiss-spa .lp-hero h1,
  .lp-swiss-spa .lp-section h2 {
    color: #f9fafb;
  }

  /* Step headings */
  .lp-swiss-spa .step h3 {
    color: #f9fafb;
  }

  .lp-swiss-spa .lead,
  .lp-swiss-spa .step p,
  .lp-swiss-spa .prose p,
  .lp-swiss-spa .lp-footer .muted {
    color: #d1d5db;
  }

  /* CTA section */
  .lp-swiss-spa .lp-cta {
    background: rgba(31, 41, 55, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .lp-swiss-spa .lp-cta .lead {
    color: #f9fafb;
  }

  .lp-swiss-spa .lp-section {
    border-top-color: #374151;
  }
}

/* Public Preview Section */
.lp-public-preview {
  text-align: center;
}

.public-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
  text-align: left;
}

.public-preview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.public-preview-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.public-preview-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.public-preview-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.public-preview-title a:hover {
  color: var(--accent);
}

.public-preview-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.public-preview-circle {
  color: var(--accent);
  font-weight: 500;
}

.public-preview-date {
  color: var(--muted);
}

.public-preview-excerpt {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.public-preview-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.public-preview-link:hover {
  color: var(--text);
}

.public-preview-cta {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.public-preview-cta .muted {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Mobile responsive for public preview */
@media (max-width: 640px) {
  .public-preview-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .public-preview-card {
    padding: 1.25rem;
  }

  .public-preview-title {
    font-size: 1.125rem;
  }
}

/* Dark mode for public preview (Swiss-spa consistent) */
@media (prefers-color-scheme: dark) {
  .public-preview-card {
    background-color: rgba(31, 41, 55, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .public-preview-card:hover {
    border-color: rgba(138, 114, 61, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .public-preview-title a {
    color: #f9fafb;
  }

  .public-preview-title a:hover {
    color: var(--accent);
  }

  .public-preview-excerpt {
    color: #d1d5db;
  }

  .public-preview-cta {
    border-top-color: rgba(255, 255, 255, 0.1);
  }
}

/* Room Detail Page */
.room-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.room-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.room-metadata {
  display: flex;
  gap: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.room-content {
  margin-bottom: 3rem;
}

.room-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.voting-section {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.voting-options {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.vote-button {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--border-color);
  background-color: var(--bg-card);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
}

.vote-button:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
}

.vote-button.for:hover {
  background-color: var(--success-color, #16a34a);
  border-color: var(--success-color, #16a34a);
}

.vote-button.against:hover {
  background-color: var(--danger-color, #dc2626);
  border-color: var(--danger-color, #dc2626);
}

.vote-button.abstain:hover {
  background-color: var(--text-muted);
  border-color: var(--text-muted);
}

/* Circle Page */
.circle-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.circle-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.circle-description {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Navigation */
.site-nav {
  margin-top: 1rem;
}

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2rem;
}

.site-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.site-nav a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

/* Voting Results */
.voting-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.result-box {
  text-align: center;
  padding: 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
}

.result-box.for {
  background-color: #dcfce7;
  color: var(--success-color, #16a34a);
}

.result-box.against {
  background-color: #fee2e2;
  color: var(--danger-color, #dc2626);
}

.result-box.abstain {
  background-color: #f3f4f6;
  color: var(--text-muted);
}

.result-count {
  font-size: 2rem;
  display: block;
}

/* Comments Section */
.comments-section {
  margin-top: 3rem;
}

.comment {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.comment:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.comment-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.comment-content {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Room/Circle Navigation */
.room-navigation,
.circle-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.room-navigation a,
.circle-navigation a {
  color: var(--text-secondary);
  text-decoration: none;
}

.room-navigation a:hover,
.circle-navigation a:hover {
  color: var(--color-primary);
}

/* Members Grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
}

.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.25rem;
}

.member-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.member-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* No Content State */
.no-rooms {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.no-rooms h2 {
  color: var(--text-muted);
}

/* Footer Links */
.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Page Headers */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2.75rem 2rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.page-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  font-size: 0.875rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

/* Room/Circle Header Sections */
.room-header,
.circle-header {
  padding: 3rem 0;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

.room-title h1,
.circle-title h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.room-description,
.circle-description {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 800px;
  margin-bottom: 2rem;
}

.room-meta,
.circle-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-item strong {
  font-weight: 600;
}

.circle-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.circle-link:hover {
  text-decoration: underline;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-active {
  background-color: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.status-inactive {
  background-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.status-pending {
  background-color: rgba(251, 191, 36, 0.2);
  color: #fde047;
}

/* Content Layout */
.room-layout,
.circle-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.room-sidebar,
.circle-sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.sidebar-section {
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.info-list {
  display: grid;
  gap: 0.75rem;
}

.info-list dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.info-list dd {
  margin: 0;
  padding: 0;
}

.member-list,
.subcircles-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.member-list li,
.subcircles-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.member-list li:last-child,
.subcircles-list li:last-child {
  border-bottom: none;
}

.role {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Tags */
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.tag {
  padding: 0.25rem 0.5rem;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.room-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Room Stats */
.room-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Main Content Sections */
.section {
  margin-bottom: 3rem;
}

.section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Post Lists */
.post-list {
  display: grid;
  gap: 2rem;
}

.post-excerpt {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.post-excerpt h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.post-excerpt h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-excerpt h3 a:hover {
  color: var(--color-primary);
}

.post-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.author {
  font-weight: 500;
  color: var(--text-secondary);
}

.post-excerpt-content {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

/* Contribute Section */
.contribute-info {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 0.5rem;
  text-align: center;
}

.email-box {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1rem 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.note {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Activity List */
.activity-list {
  display: grid;
  gap: 1rem;
}

.activity-item {
  padding: 1rem;
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
}

.activity-item h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.activity-item h4 a {
  color: var(--text-primary);
  text-decoration: none;
}

.activity-item h4 a:hover {
  color: var(--color-primary);
}

.activity-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.room {
  font-weight: 500;
}

.view-all {
  text-align: center;
  margin-top: 1.5rem;
}

.view-all a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.view-all a:hover {
  text-decoration: underline;
}

/* Principles List */
.principles-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.principles-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.principles-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.empty-state h3 {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .room-layout,
  .circle-layout {
    grid-template-columns: 250px 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .room-layout,
  .circle-layout {
    grid-template-columns: 1fr;
  }

  .room-sidebar,
  .circle-sidebar {
    position: static;
  }

  .room-header,
  .circle-header {
    padding: 2rem 0;
  }

  .room-title h1,
  .circle-title h1 {
    font-size: 2rem;
  }

  .room-meta,
  .circle-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .activity-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.feature-card {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 0.5rem;
  text-align: center;
}

.feature-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.contact-methods {
  margin-top: 2rem;
}

.contact-method {
  margin-bottom: 2rem;
}

.contact-method h3 {
  margin-bottom: 0.5rem;
}

/* Forms */
.form {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Submit Page Styles */
.submit-instructions {
  margin-bottom: 3rem;
}

.step-list {
  margin-top: 2rem;
}

.step-item {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--color-primary);
}

.step-item h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.step-item .note {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 1rem;
}

.email-example {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  margin-top: 1rem;
}

.email-header {
  background-color: var(--bg-card);
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.email-header p {
  margin: 0.25rem 0;
  font-size: 0.875rem;
}

.email-body {
  padding: 1.5rem;
  white-space: pre-line;
  line-height: 1.8;
}

.example-section {
  margin: 3rem 0;
}

.guidelines-section {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 0.5rem;
}

.guidelines-section ul {
  margin-bottom: 0;
}

.guidelines-section li {
  position: relative;
  padding-left: 1.5rem;
}

.guidelines-section li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* Active navigation state */
.site-nav .active {
  color: var(--text-primary);
  border-bottom-color: var(--color-accent);
}

/* Status badges and result boxes in dark mode */
@media (prefers-color-scheme: dark) {
  .status-draft {
    background-color: #374151;
    color: var(--text-muted);
  }

  .status-active {
    background-color: #1e3a8a;
    color: #93c5fd;
  }

  .status-closed {
    background-color: #374151;
    color: var(--text-muted);
  }

  .result-box.for {
    background-color: #14532d;
    color: #86efac;
  }

  .result-box.against {
    background-color: #7f1d1d;
    color: #fca5a5;
  }

  .result-box.abstain {
    background-color: #374151;
    color: var(--text-muted);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  .site-header {
    padding: 0.75rem 0;
  }

  .site-main {
    padding: 1rem 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .room-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .voting-options {
    flex-direction: column;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .room-metadata {
    flex-direction: column;
    gap: 0.5rem;
  }

  .room-navigation,
  .circle-navigation {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 2rem 1rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }
}

/* ========================================
   Swiss-spa Reading Experience (avp.3)
   Calm, text-first design for published notes
   ======================================== */

/* Reading container - focused typography */
.reading-container {
  max-width: 68ch;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Published page header */
.reading-page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.reading-page-header h1 {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

.reading-page-description {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 auto;
}

/* Post list for reading */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 3rem;
}

.post-list li {
  padding: 0;
  margin: 0;
}

/* Post title - typography focused */
.post-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
}

.post-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Post meta - minimal, calm */
.post-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.post-meta time {
  font-variant-numeric: tabular-nums;
}

/* Post summary - readable line length */
.post-summary {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  max-width: 60ch;
}

/* Empty state - purely informational */
.reading-empty {
  padding: 4rem 1rem;
  text-align: center;
}

.reading-empty h2 {
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.reading-empty p {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
}

/* Prose class for long-form content */
.prose {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
}

.prose p {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.prose h2 {
  font-size: 1.625rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--muted);
  font-style: italic;
  line-height: 1.7;
}

.prose code {
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  background: var(--bg-secondary);
  border-radius: 3px;
}

.prose pre {
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.prose pre code {
  padding: 0;
  background: none;
}

/* Mobile responsive for reading */
@media (max-width: 640px) {
  .reading-page-header h1 {
    font-size: 1.75rem;
  }

  .reading-page-description {
    font-size: 1rem;
  }

  .post-title {
    font-size: 1.25rem;
  }

  .post-summary {
    font-size: 1rem;
  }

  .prose p {
    font-size: 1rem;
  }

  .post-list {
    gap: 2rem;
  }

  .reading-empty {
    padding: 3rem 1rem;
  }
}

/* Print-friendly styles */
@media print {
  .site-header,
  .site-footer,
  .site-nav {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .reading-container {
    max-width: 100%;
  }

  .reading-page-header {
    border-bottom: 1px solid #ccc;
  }

  .post-title a {
    color: black;
    text-decoration: none;
  }

  .post-title a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  .prose {
    max-width: 100%;
  }

  .prose p,
  .prose li {
    color: black;
  }

  /* Avoid page breaks inside content */
  article,
  .prose p,
  .prose li {
    page-break-inside: avoid;
  }

  /* Page breaks before headings */
  .prose h2,
  .prose h3 {
    page-break-after: avoid;
  }

  /* Links in print */
  a {
    color: black;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

/* ========================================
   Reading Interface (reading-ui-001)
   Swiss-spa design for individual post view
   ======================================== */

/* Reading page container */
.reading-page {
  max-width: 68ch;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Breadcrumb for reading pages */
.reading-page .breadcrumb {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  font-size: 0.875rem;
}

.reading-page .breadcrumb li {
  display: flex;
  align-items: center;
}

.reading-page .breadcrumb li:not(:last-child)::after {
  content: '/';
  margin: 0 0.5rem;
  color: var(--text-muted);
}

.reading-page .breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.reading-page .breadcrumb a:hover {
  color: var(--accent);
}

/* Reading header */
.reading-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.reading-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.reading-meta time {
  font-variant-numeric: tabular-nums;
}

.reading-circle {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--accent-bg, rgba(138, 114, 61, 0.1));
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.reading-header h1 {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary);
}

/* Reading content */
.reading-content {
  font-size: 1.125rem;
  line-height: 1.75;
  max-width: 68ch;
}

.reading-summary {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.reading-body {
  color: var(--text-primary);
}

/* Typography in reading body */
.reading-body h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.reading-body h3 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.reading-body p {
  margin-bottom: 1.5rem;
}

.reading-body ul,
.reading-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.reading-body li {
  margin-bottom: 0.5rem;
}

.reading-body blockquote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--text-muted);
}

.reading-body code {
  font-family: var(--font-family-mono, 'SF Mono', Monaco, 'Cascadia Code', monospace);
  font-size: 0.875em;
  padding: 0.125rem 0.375rem;
  background: var(--bg-secondary);
  border-radius: 3px;
}

.reading-body pre {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow-x: auto;
}

.reading-body pre code {
  padding: 0;
  background: none;
}

.reading-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.reading-body a:hover {
  color: var(--accent-hover, #6b5730);
}

/* Mobile responsive for reading */
@media (max-width: 640px) {
  .reading-header h1 {
    font-size: 1.75rem;
  }

  .reading-content {
    font-size: 1rem;
  }

  .reading-summary {
    font-size: 1.0625rem;
    padding: 1rem;
  }

  .reading-body h2 {
    font-size: 1.5rem;
  }

  .reading-body h3 {
    font-size: 1.1875rem;
  }

  .reading-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Print-friendly for reading pages */
@media print {
  .reading-page .breadcrumb {
    display: none;
  }

  .reading-header {
    border-bottom-color: #ccc;
  }

  .reading-content {
    color: black;
  }

  .reading-summary {
    background: white;
    border-color: #ccc;
  }

  .reading-body a {
    color: black;
  }

  .reading-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }

  /* Avoid page breaks */
  .reading-content p,
  .reading-content li {
    page-break-inside: avoid;
  }

  .reading-content h2,
  .reading-content h3 {
    page-break-after: avoid;
  }

  /* Hide resonance CTA in print */
  .resonance-cta,
  .resonate-modal {
    display: none !important;
  }
}

/* ========================================
   Resonance CTA (roundtable-kx1l)
   Prominent "This Resonates" feature for published posts
   ======================================== */

/* Resonance CTA section */
.resonance-cta {
  margin-top: 4rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(138, 114, 61, 0.08) 0%, rgba(138, 114, 61, 0.03) 100%);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  text-align: center;
}

.resonance-container {
  max-width: 52ch;
  margin: 0 auto;
}

.resonate-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem 0;
  color: var(--text);
}

.resonate-subtitle {
  font-size: 1.0625rem;
  color: var(--muted);
  margin: 0 0 2rem 0;
  line-height: 1.6;
}

/* Resonate button - prominent, amber/gold theme */
.resonate-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, #9a8049 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(138, 114, 61, 0.3);
}

.resonate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(138, 114, 61, 0.4);
  background: linear-gradient(135deg, #9a8049 0%, var(--accent) 100%);
}

.resonate-button:active {
  transform: translateY(0);
}

.resonate-icon {
  font-size: 1.5rem;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    opacity: 0.9;
  }
}

.resonate-text {
  line-height: 1.2;
}

/* Resonance count display */
.resonance-count {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
  font-weight: 500;
}

.resonance-count-number {
  color: var(--accent);
  font-weight: 600;
}

/* ========================================
   Resonance Modal
   Accessible modal for resonance submission
   ======================================== */

.resonate-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.resonate-modal[hidden] {
  display: none;
}

/* Modal backdrop */
.resonate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Modal content */
.resonate-modal-content {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal header */
.resonate-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.resonate-modal-title {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.resonate-modal-close {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.resonate-modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

/* Resonance form */
.resonate-form {
  padding: 2rem;
}

.resonate-form-group {
  margin-bottom: 1.5rem;
}

.resonate-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text);
}

.resonate-label .required {
  color: var(--accent);
}

.resonate-input,
.resonate-select,
.resonate-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  transition: all 0.2s ease;
}

.resonate-input:focus,
.resonate-select:focus,
.resonate-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 114, 61, 0.15);
}

.resonate-textarea {
  resize: vertical;
  min-height: 100px;
}

.resonate-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Form actions */
.resonate-form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.resonate-submit {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resonate-submit:hover:not(:disabled) {
  background: #756035;
  transform: translateY(-1px);
}

.resonate-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.resonate-cancel {
  padding: 0.875rem 1.5rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resonate-cancel:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.submit-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.submit-loading::after {
  content: "";
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Form message */
.resonate-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.resonate-message[hidden] {
  display: none;
}

.resonate-message.success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.resonate-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Mobile responsive for resonance */
@media (max-width: 640px) {
  .resonance-cta {
    padding: 2rem 1.5rem;
    margin-top: 3rem;
  }

  .resonate-title {
    font-size: 1.625rem;
  }

  .resonate-subtitle {
    font-size: 1rem;
  }

  .resonate-button {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .resonate-modal-content {
    max-height: 95vh;
  }

  .resonate-modal-header {
    padding: 1.25rem 1.5rem;
  }

  .resonate-modal-title {
    font-size: 1.1875rem;
  }

  .resonate-form {
    padding: 1.5rem;
  }

  .resonate-form-actions {
    flex-direction: column;
  }

  .resonate-submit,
  .resonate-cancel {
    width: 100%;
  }
}

/* Dark mode for resonance */
@media (prefers-color-scheme: dark) {
  .resonance-cta {
    background: linear-gradient(135deg, rgba(138, 114, 61, 0.15) 0%, rgba(138, 114, 61, 0.06) 100%);
    border-color: rgba(138, 114, 61, 0.4);
  }

  .resonate-button {
    box-shadow: 0 4px 12px rgba(138, 114, 61, 0.4);
  }

  .resonate-button:hover {
    box-shadow: 0 6px 16px rgba(138, 114, 61, 0.5);
  }

  .resonate-modal-content {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .resonate-input,
  .resonate-select,
  .resonate-textarea {
    background: rgba(17, 24, 39, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .resonate-input:focus,
  .resonate-select:focus,
  .resonate-textarea:focus {
    border-color: rgba(138, 114, 61, 0.6);
    box-shadow: 0 0 0 3px rgba(138, 114, 61, 0.2);
  }

  .resonate-cancel {
    border-color: rgba(255, 255, 255, 0.1);
  }

  .resonate-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
  }
}
