﻿/* AI Speech Classification & First Amendment Liability - Museum-Grade Legal Theme */
/* Version: 1.0 | Created: 2026-01-23 */

:root {
  --navy: #1a365d;
  --navy-light: #2c5282;
  --white: #ffffff;
  --off-white: #f7fafc;
  --gold: #b7791f;
  --gold-light: #d69e2e;
  --blue: #2b6cb0;
  --gray: #718096;
  --gray-light: #a0aec0;
  --gray-dark: #4a5568;
  --red: #c53030;
  --green: #276749;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
}

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

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

body {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.7;
  color: var(--navy);
  background: var(--off-white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2rem; color: var(--navy); }
h2 { font-size: 1.5rem; color: var(--navy); border-bottom: 2px solid var(--gold); padding-bottom: 0.5rem; margin-top: 2rem; }
h3 { font-size: 1.25rem; color: var(--navy-light); margin-top: 1.5rem; }
h4 { font-size: 1.1rem; color: var(--gray-dark); }

p { margin-bottom: 1rem; }

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

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-wrapper {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Navigation */
.nav-sidebar {
  background: var(--navy);
  color: var(--white);
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.nav-logo {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.nav-title {
  font-size: 0.75rem;
  color: var(--gray-light);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-light);
  margin-bottom: 0.5rem;
}

.nav-link {
  display: block;
  color: var(--white);
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 4px;
  margin-bottom: 2px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.nav-link:hover {
  background: var(--navy-light);
  text-decoration: none;
}

.nav-link.active {
  background: var(--gold);
  color: var(--navy);
}

/* Main Content */
.main-content {
  padding: 2rem 3rem;
  background: var(--white);
}

@media (max-width: 768px) {
  .main-content {
    padding: 1.5rem;
  }
}

/* Header */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-meta {
  font-size: 0.85rem;
  color: var(--gray);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Metrics Dashboard */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Confidence Tiers */
.tier-a, .confidence-high {
  color: var(--gold);
  font-weight: 600;
}

.tier-b, .confidence-medium {
  color: var(--blue);
}

.tier-c, .confidence-low {
  color: var(--gray);
}

.tier-d, .confidence-disputed {
  color: var(--red);
}

/* Confidence Bar */
.confidence-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.confidence-bar .bar {
  width: 60px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.confidence-bar .fill {
  height: 100%;
  border-radius: 4px;
}

.confidence-bar.high .fill { width: 100%; background: var(--gold); }
.confidence-bar.medium .fill { width: 60%; background: var(--blue); }
.confidence-bar.low .fill { width: 30%; background: var(--gray); }

/* Gates */
.gate-card {
  border-left: 4px solid var(--gray);
  margin-bottom: 1.5rem;
}

.gate-card.open { border-left-color: var(--red); }
.gate-card.partial { border-left-color: var(--gold); }
.gate-card.closed { border-left-color: var(--green); }

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

.gate-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
}

.gate-status.open { background: #fed7d7; color: var(--red); }
.gate-status.partial { background: #fefcbf; color: var(--gold); }
.gate-status.closed { background: #c6f6d5; color: var(--green); }

.gate-recipe {
  background: var(--off-white);
  padding: 1rem;
  border-radius: 4px;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.gate-recipe ol {
  margin-left: 1.25rem;
}

.gate-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.gate-link {
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Footnotes */
sup {
  font-size: 0.7em;
  color: var(--blue);
  cursor: pointer;
}

sup:hover {
  color: var(--gold);
}

.footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.footnotes h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footnote-item {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.footnote-item::before {
  content: attr(data-num);
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

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

th {
  background: var(--off-white);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--gray-dark);
  font-style: italic;
}

/* Lists */
ul, ol {
  margin: 1rem 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Priority Badges */
.priority-critical {
  background: #fed7d7;
  color: var(--red);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.priority-recommended {
  background: #fefcbf;
  color: var(--gold);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.priority-optional {
  background: #c6f6d5;
  color: var(--green);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Action Items */
.action-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--off-white);
  border-radius: 8px;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.action-number {
  background: var(--navy);
  color: var(--white);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.action-content {
  flex: 1;
}

.action-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.action-time {
  font-size: 0.8rem;
  color: var(--gray);
}

/* Section Navigation */
.section-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.section-nav a {
  padding: 0.5rem 1rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.section-nav a:hover {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

/* Progress Indicators */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Print Styles */
@media print {
  .nav-sidebar {
    display: none;
  }
  
  .page-wrapper {
    display: block;
  }
  
  .main-content {
    padding: 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  a {
    color: var(--navy);
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: var(--gray);
  }
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-sidebar {
    position: fixed;
    left: -100%;
    width: 80%;
    max-width: 280px;
    transition: left 0.3s ease;
    z-index: 1000;
  }
  
  .nav-sidebar.open {
    left: 0;
  }
  
  .mobile-nav-toggle {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
  }
}

@media (min-width: 769px) {
  .mobile-nav-toggle {
    display: none;
  }
}

/* Archive link styling */
.archive-link {
  font-size: 0.75em;
  color: var(--gray);
  text-decoration: none;
  opacity: 0.7;
  margin-left: 0.25em;
}
.archive-link:hover {
  opacity: 1;
  color: var(--blue);
}