:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.hero {
  padding: 3rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-top: 1rem;
}

section {
  padding: 2rem 1.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card ul, .card ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
  color: var(--muted);
}

.card li {
  margin-bottom: 0.4rem;
}

.card.highlight {
  border-color: var(--success);
  border-width: 2px;
  background: var(--success-light);
}

.card.alert {
  border-color: var(--danger);
  border-width: 2px;
  background: var(--danger-light);
}

blockquote {
  background: var(--bg);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-style: italic;
  color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.quote-box {
  background: white;
  border: 2px solid var(--success);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.quote-box strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--success);
}

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

.doc-link {
  display: inline-block;
  background: var(--bg);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
  border: 1px solid var(--border);
}

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

.month-label {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.timeline-item {
  position: relative;
  padding: 1rem 1.5rem;
  margin-left: 1rem;
  border-left: 2px solid var(--border);
  margin-bottom: 0.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 1.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--surface);
}

.timeline-item.key-moment {
  background: var(--success-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left-color: var(--success);
}

.timeline-item.key-moment::before {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.date {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.tag.critical { background: var(--danger-light); color: var(--danger); }
.tag.warn { background: var(--warning-light); color: var(--warning); }
.tag.ok { background: var(--success-light); color: var(--success); }
.tag.key { background: var(--success); color: white; }

.timeline-item p {
  color: var(--muted);
  margin: 0.5rem 0;
}

.timeline-item ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.timeline-item li {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.meta {
  font-size: 0.85rem;
  color: var(--muted);
}

code {
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

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

.docs-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.docs-table tr:last-child td {
  border-bottom: none;
}

.docs-table tr:hover {
  background: var(--bg);
}

.docs-table tr.highlight-row {
  background: var(--success-light);
}

.docs-table tr.highlight-row:hover {
  background: #dcfce7;
}

.contacts .grid-2 {
  margin-bottom: 1rem;
}

footer {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .site-header .inner {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .lead {
    font-size: 1rem;
  }
  
  .timeline-item {
    padding: 0.75rem 1rem;
    margin-left: 0.5rem;
  }
  
  .docs-table {
    font-size: 0.8rem;
  }
  
  .docs-table th,
  .docs-table td {
    padding: 0.5rem;
  }
}