:root {
  --navy: #0f2744;
  --navy-light: #1a3a5c;
  --gold: #c9a227;
  --gold-light: #e8c547;
  --cream: #faf8f5;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5a6270;
  --border: #e2e0db;
  --shadow: 0 4px 24px rgba(15, 39, 68, 0.08);
  --shadow-lg: 0 12px 48px rgba(15, 39, 68, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--navy);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
}

.logo-accent {
  color: var(--gold-light);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gold-light);
}

/* Hero / Search */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 60%, #2a5080 100%);
  padding: 80px 0 64px;
  text-align: center;
  color: var(--white);
}

.hero-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 17px;
  opacity: 0.85;
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.search-form {
  max-width: 680px;
  margin: 0 auto 20px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-lg);
  gap: 8px;
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  padding: 12px 8px;
}

.search-box input::placeholder {
  color: #aaa;
}

.search-btn {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.search-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  opacity: 0.75;
}

.search-hints a {
  color: var(--gold-light);
  text-decoration: none;
  background: rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 20px;
  transition: background 0.2s;
}

.search-hints a:hover {
  background: rgba(255,255,255,0.2);
}

/* Results */
.results-section {
  padding: 40px 0 60px;
}

.results-count {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 15px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.result-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.result-title a {
  color: var(--navy);
  text-decoration: none;
}

.result-title a:hover {
  color: var(--gold);
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.meta-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: #eef2f7;
  color: var(--text-muted);
}

.meta-tag.court {
  background: #e8f0fe;
  color: #1a56db;
}

.meta-tag.date {
  background: #f0fdf4;
  color: #15803d;
}

.meta-tag.citation {
  background: #fef9ec;
  color: #92600a;
  font-family: monospace;
}

.result-parties {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.read-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}

.read-more:hover {
  color: var(--navy);
}

.no-results {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* Features */
.features {
  padding: 60px 0 80px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--navy);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Document page */
.doc-section {
  padding: 32px 0 60px;
}

.doc-container {
  max-width: 800px;
}

.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

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

.doc-article {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.doc-id {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doc-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(22px, 4vw, 30px);
  color: var(--navy);
  margin: 8px 0 16px;
  line-height: 1.35;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.doc-parties, .doc-judges, .doc-summary, .doc-full-text, .doc-keywords, .doc-placeholder {
  margin-bottom: 28px;
}

.doc-parties h3, .doc-judges h3, .doc-summary h3, .doc-full-text h3, .doc-keywords h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.doc-parties p, .doc-judges p, .doc-summary p {
  font-size: 15px;
  line-height: 1.7;
}

.judgment-text {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text);
}

.doc-placeholder {
  background: #f8f6f2;
  border-radius: var(--radius-sm);
  padding: 20px;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-tag {
  font-size: 13px;
  padding: 5px 14px;
  background: #eef2f7;
  color: var(--navy);
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s;
}

.keyword-tag:hover {
  background: var(--gold-light);
}

/* Error */
.error-section {
  padding: 80px 0;
  text-align: center;
}

.error-box h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 72px;
  color: var(--navy);
  margin-bottom: 8px;
}

.error-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 17px;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  margin-top: auto;
}

/* Responsive */
@media (max-width: 600px) {
  .search-box {
    flex-wrap: wrap;
    padding: 12px;
  }

  .search-box input {
    width: 100%;
    padding: 8px 4px;
  }

  .search-btn {
    width: 100%;
  }

  .doc-article {
    padding: 24px 20px;
  }

  .nav-links {
    gap: 16px;
  }
}
