﻿:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #0ea5e9;
  --accent-2: #6366f1;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

.site-header {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  padding: 48px 16px;
  text-align: center;
}
.site-header h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.02em;
}
.site-header p {
  margin: 0;
  opacity: 0.85;
  font-size: clamp(14px, 2.2vw, 18px);
}

.main-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: -40px auto 32px;
  padding: 48px 32px;
}

h1 {
  font-size: clamp(24px, 4vw, 32px);
  margin: 32px 0 16px;
  color: var(--text);
}
h2 {
  font-size: clamp(18px, 3vw, 22px);
  margin: 28px 0 12px;
  color: #1e293b;
}
h3 {
  font-size: 16px;
  margin: 20px 0 8px;
  color: #374151;
}

p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-right: 20px; }
li { margin-bottom: 4px; }

.section-title {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.table-of-contents {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}
.table-of-contents h2 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 12px;
  color: #374151;
}
.table-of-contents ol {
  margin: 0;
  padding-right: 20px;
}
.table-of-contents li {
  margin-bottom: 6px;
}
.table-of-contents a {
  color: var(--accent);
  text-decoration: none;
}
.table-of-contents a:hover { text-decoration: underline; }

.clause {
  margin-bottom: 24px;
}
.clause-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1e293b;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-top: 32px;
}
.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 32px 0;
}
.site-footer .footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.site-footer .footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.site-footer .footer-links a:hover { color: var(--text); }

code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #dc2626;
}

@media (max-width: 600px) {
  .main-content { padding: 32px 16px; }
  .site-header { padding: 32px 12px; }
}

[dir="rtl"] .main-content { direction: rtl; text-align: right; }
[dir="rtl"] .table-of-contents ol { padding-right: 0; padding-left: 20px; text-align: right; }
[dir="rtl"] .table-of-contents li { text-align: right; }
[dir="rtl"] h2, [dir="rtl"] h3 { text-align: right; }
[dir="rtl"] .back-link { justify-content: flex-end; }
[dir="rtl"] ul { padding-right: 0; padding-left: 20px; }
