:root {
  --violet: #7c3aed;
  --violet-deep: #5b21b6;
  --coral: #ff6b6b;
  --cream: #fdfaf6;
  --cream-deep: #f5f0e8;
  --ink: #1a1025;
  --muted: #6b7280;
  --border: #e5e0d8;
  --radius: 14px;
  --grad: linear-gradient(135deg, #7c3aed 0%, #ff6b6b 100%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 250, 246, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.nav.scrolled {
  border-color: var(--border);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-back {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.nav-back:hover {
  color: var(--violet);
}

.doc-hero {
  background: var(--grad);
  padding: 56px 24px 48px;
  text-align: center;
  color: white;
}

.doc-hero .eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 12px;
}

.doc-hero h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 16px;
}

.doc-hero p {
  font-size: 15px;
  opacity: 0.85;
  max-width: 480px;
  margin: 0 auto;
}

.doc-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 13px;
  margin-top: 24px;
}

.doc-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 700px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-toc {
    display: none;
  }
}

.doc-toc {
  position: sticky;
  top: 80px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.doc-toc h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.doc-toc ol {
  list-style: none;
  counter-reset: toc;
}

.doc-toc li {
  counter-increment: toc;
  margin-bottom: 4px;
}

.doc-toc a {
  text-decoration: none;
  font-size: 13px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  transition:
    background 0.12s,
    color 0.12s;
}

.doc-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
}

.doc-toc a:hover {
  background: var(--cream-deep);
  color: var(--violet);
}

.doc-content {
  min-width: 0;
}

.doc-content section {
  margin-bottom: 48px;
  scroll-margin-top: 90px;
}

.section-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 8px;
}

.doc-content h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--ink);
}

.doc-content p {
  font-size: 15.5px;
  color: #2d2540;
  margin-bottom: 14px;
}

.doc-content ul,
.doc-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.doc-content li {
  font-size: 15.5px;
  color: #2d2540;
  margin-bottom: 8px;
}

.doc-content strong {
  font-weight: 600;
  color: var(--ink);
}

.doc-content a {
  color: var(--violet);
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  background: var(--cream-deep);
  padding: 10px 14px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--border);
}

.data-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
  color: #2d2540;
  line-height: 1.55;
}

.data-table tr:nth-child(even) td {
  background: rgba(245, 240, 232, 0.4);
}

/* Callout */
.callout {
  background: var(--cream-deep);
  border-left: 3px solid var(--violet);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14.5px;
  color: var(--ink);
}

.callout.green {
  border-left-color: #059669;
  background: #f0fdf4;
}

.callout.warn {
  border-left-color: var(--coral);
  background: #fff5f5;
}

hr.doc-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Rights grid */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.right-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.right-card .right-icon {
  font-size: 22px;
  margin-bottom: 8px;
}

.right-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.right-card p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.55);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover {
  color: white;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.footer-logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.footer-copy {
  margin-top: 16px;
}
