/* Onyx Tattoo — Legal document surface (ink-black atelier, gold accent) */
:root {
  --bg: #0b0b0c;
  --bg-deep: #121214;
  --bg-elevated: rgba(22, 22, 24, 0.96);
  --bg-muted: rgba(32, 30, 28, 0.88);
  --text: #f3efe6;
  --text-muted: #b8b0a4;
  --text-soft: #7a746a;
  --border: rgba(201, 162, 39, 0.22);
  --border-strong: rgba(201, 162, 39, 0.45);
  --accent: #c9a227;
  --accent-soft: rgba(201, 162, 39, 0.12);
  --accent-hot: #e0c36a;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --font-serif: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --max-content: 46rem;
  --max-wide: 74rem;
  --line: 1.75;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.04rem;
  line-height: var(--line);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 162, 39, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 60%, #060607 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.rtl {
  direction: rtl;
  text-align: right;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover { color: var(--accent-hot); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 12, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-hot);
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  flex: 1;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-hot);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.lang-switcher select {
  background: var(--bg-muted);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  font: inherit;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.btn-ghost:hover {
  color: var(--accent-hot);
  border-color: var(--border-strong);
}

.page-main {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
}

.layout-wide {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 900px) {
  .layout-wide { grid-template-columns: 1fr; }
  .toc-sidebar { order: -1; }
}

.toc-card {
  position: sticky;
  top: 5.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.toc-label {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 700;
}

.toc-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  list-style: decimal;
}

body.rtl .toc-list { padding: 0 1.1rem 0 0; }

.toc-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  padding: 0.15rem 0;
}

.toc-list a:hover { color: var(--accent-hot); }

.document {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 2.2rem;
  box-shadow: var(--shadow);
  max-width: var(--max-content);
}

.doc-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 700;
}

.doc-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  color: var(--text);
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.meta-badge {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.counsel-note { display: none; }

.summary-card {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1rem 0 1.5rem;
}

.summary-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.summary-list {
  margin: 0;
  padding: 0 0 0 1.15rem;
}

body.rtl .summary-list { padding: 0 1.15rem 0 0; }

.summary-list li { margin: 0.25rem 0; color: var(--text-muted); }

.legal-section {
  margin: 1.6rem 0 0;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(201, 162, 39, 0.14);
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.section-anchor {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.55;
}

.section-anchor:hover { opacity: 1; color: var(--accent); }

.section-body p {
  margin: 0 0 0.75rem;
}

.section-body .ident,
.ident {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  display: inline-block;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  margin: 0.15rem 0 0.65rem;
  color: var(--accent-hot);
}

.site-footer {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--accent-hot); }

.hub-main {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.hub-intro { margin-bottom: 1.75rem; }

.hub-lead {
  color: var(--text-muted);
  max-width: 36rem;
}

.hub-operator, .hub-contact { margin: 0.2rem 0; }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.hub-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.hub-card:hover { border-color: var(--border-strong); color: inherit; }

.hub-card h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0 0 0.45rem;
  color: var(--accent-hot);
}

.hub-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.noscript-banner {
  background: #3a2a10;
  color: #f3efe6;
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

@media print {
  .site-header, .toc-sidebar, .header-actions, .btn-ghost, .noscript-banner { display: none !important; }
  body { background: #fff; color: #111; }
  .document { box-shadow: none; border: none; }
  a { color: #111; }
}
