.legal-shell {
  --legal-bg: #f4f1ea;
  --legal-ink: #222;
  --legal-ink-strong: #111;
  --legal-text: #444;
  --legal-muted: #666;
  --legal-gold: #b89643;
  --legal-green: #022c22;
  --legal-border: rgba(184, 150, 67, 0.28);
  --legal-border-strong: rgba(184, 150, 67, 0.35);
  --legal-panel: rgba(255, 255, 255, 0.82);
  --legal-panel-soft: rgba(255, 255, 255, 0.58);
  --legal-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
  --legal-radius: 12px;
  --legal-shell-width: 1200px;
  --legal-reading-width: 860px;

  margin: 0;
  min-height: 100%;
  color: var(--legal-ink);
  background-color: var(--legal-bg);
  background-image:
    url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNCIgaGVpZ2h0PSI0IiB2aWV3Qm94PSIwIDAgNCA0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiM4YTZkMWYiIG9wYWNpdHk9IjAuMTUiLz48L3N2Zz4="),
    linear-gradient(
      rgba(184, 150, 67, 0.15) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(184, 150, 67, 0.15) 1px,
      transparent 1px
    );
  background-size:
    4px 4px,
    60px 60px,
    60px 60px;
  background-position:
    0 0,
    center center,
    center center;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

.legal-shell,
.legal-shell *,
.legal-shell *::before,
.legal-shell *::after {
  box-sizing: border-box;
}

.legal-shell .legal-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  min-height: 44px;
  padding: 0.65rem 1rem;
  color: #fff;
  background: var(--legal-green);
  border-radius: 8px;
  transform: translateY(-200%);
}

.legal-shell .legal-skip-link:focus {
  transform: translateY(0);
}

.legal-shell .legal-header {
  width: 100%;
  border-bottom: 1px solid var(--legal-border);
  background: rgba(244, 241, 234, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.legal-shell .legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100%, var(--legal-shell-width));
  min-height: 72px;
  margin: 0 auto;
  padding: 0.75rem clamp(2rem, 4vw, 3rem);
}

.legal-shell .legal-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--legal-green);
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.legal-shell .legal-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 0.75rem;
  flex-wrap: wrap;
}

.legal-shell .legal-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.65rem;
  color: var(--legal-green);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  text-decoration-color: transparent;
}

.legal-shell .legal-nav-link:hover,
.legal-shell .legal-nav-link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--legal-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.legal-shell .legal-main {
  width: 100%;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
}

.legal-shell .legal-document {
  width: min(100%, var(--legal-reading-width));
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem);
  overflow-wrap: anywhere;
  border: 1px solid var(--legal-border);
  border-radius: var(--legal-radius);
  background: var(--legal-panel);
  box-shadow: var(--legal-shadow);
}

.legal-shell .legal-document-header {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--legal-border-strong);
}

.legal-shell .legal-document-meta {
  display: grid;
  gap: 0.55rem;
}

.legal-shell .legal-document-header .legal-panel--contact {
  margin-top: 0;
}

.legal-shell .legal-document-header + p {
  margin-top: clamp(2rem, 5vw, 3.25rem);
}

.legal-shell .legal-document-meta p,
.legal-shell .legal-panel p:last-child,
.legal-shell .legal-footer-meta p {
  margin-bottom: 0;
}

.legal-shell .legal-meta-row {
  margin: 0;
}

.legal-shell .legal-meta-label {
  color: var(--legal-ink-strong);
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.legal-shell .legal-section {
  margin-top: clamp(2rem, 5vw, 3.25rem);
}

.legal-shell .legal-section + .legal-section {
  padding-top: clamp(2rem, 5vw, 3.25rem);
  border-top: 1px solid var(--legal-border);
}

.legal-shell .legal-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--legal-border);
  border-radius: var(--legal-radius);
  background: var(--legal-panel);
  box-shadow: var(--legal-shadow);
}

.legal-shell .legal-panel--meta {
  background: var(--legal-panel-soft);
}

.legal-shell .legal-panel--contact {
  margin-top: 1.5rem;
  background: var(--legal-panel-soft);
}

.legal-shell .legal-panel--action {
  margin-top: 1.75rem;
  border-color: var(--legal-border-strong);
  background: var(--legal-panel-soft);
}

.legal-shell .legal-panel--warning {
  border-color: rgba(239, 68, 68, 0.58);
  border-left-width: 4px;
  background: rgba(255, 255, 255, 0.72);
}

.legal-shell .legal-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.legal-shell .legal-fact {
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--legal-border);
  border-radius: 10px;
  background: var(--legal-panel-soft);
}

.legal-shell .legal-fact--wide {
  grid-column: 1 / -1;
}

.legal-shell .legal-list {
  margin: 1.25rem 0 0;
}

.legal-shell .legal-list--support {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 2rem;
}

.legal-shell .legal-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--legal-border-strong);
  border-radius: 9px;
  color: var(--legal-green);
  background: rgba(255, 255, 255, 0.88);
  font-family: "Manrope", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.legal-shell .legal-action-link:hover {
  border-color: var(--legal-gold);
  background: #fff;
  box-shadow: 0 6px 20px rgba(2, 44, 34, 0.08);
}

.legal-shell .legal-related-links {
  display: grid;
  gap: 0.5rem;
}

.legal-shell .legal-footer {
  width: 100%;
  border-top: 1px solid var(--legal-border);
  background: rgba(255, 255, 255, 0.44);
}

.legal-shell .legal-footer-inner {
  width: min(100%, var(--legal-shell-width));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(2rem, 4vw, 3rem) 2rem;
}

.legal-shell .legal-footer-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 6vw, 5rem);
}

.legal-shell .legal-footer-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.legal-shell .legal-footer-title {
  margin: 0 0 0.75rem;
  color: var(--legal-muted);
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.legal-shell .legal-footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--legal-green);
  font-size: 0.9rem;
  text-decoration: none;
}

.legal-shell .legal-footer-link:hover,
.legal-shell .legal-footer-link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--legal-gold);
  text-underline-offset: 0.25em;
}

.legal-shell .legal-footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--legal-border);
  text-align: center;
}

.legal-shell .legal-footer-meta p,
.legal-shell .legal-footer-meta a {
  color: var(--legal-muted);
  font-size: 0.8rem;
}

.legal-shell h1,
.legal-shell h2,
.legal-shell h3 {
  font-family: "Cinzel", serif;
  color: var(--legal-ink-strong);
}

.legal-shell h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.12;
  text-wrap: balance;
}

.legal-shell h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.3;
}

.legal-shell h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

.legal-shell p,
.legal-shell li {
  color: var(--legal-text);
  font-size: 1rem;
  line-height: 1.75;
}

.legal-shell p {
  max-width: 72ch;
}

.legal-shell p,
.legal-shell ul {
  margin-top: 0;
}

.legal-shell p:not(:last-child),
.legal-shell ul:not(:last-child) {
  margin-bottom: 1.15rem;
}

.legal-shell ul {
  padding-left: 1.35rem;
}

.legal-shell li + li {
  margin-top: 0.65rem;
}

.legal-shell strong,
.legal-shell .highlight {
  color: var(--legal-ink-strong);
}

.legal-shell a {
  color: var(--legal-green);
  text-decoration: underline;
  text-decoration-color: rgba(2, 44, 34, 0.42);
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

.legal-shell a:hover {
  text-decoration-color: currentColor;
}

.legal-shell a:focus-visible,
.legal-shell button:focus-visible {
  outline: 3px solid var(--legal-green);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .legal-shell .legal-header-inner,
  .legal-shell .legal-main,
  .legal-shell .legal-footer-inner {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .legal-shell .legal-footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .legal-shell .legal-header-inner,
  .legal-shell .legal-main,
  .legal-shell .legal-footer-inner {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
}

@media (max-width: 600px) {
  .legal-shell .legal-header-inner {
    align-items: flex-start;
    gap: 0.35rem;
    min-height: 0;
    padding: 0.75rem 1rem;
    flex-direction: column;
  }

  .legal-shell .legal-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .legal-shell .legal-nav-link {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .legal-shell .legal-main {
    padding: 2rem 1rem;
  }

  .legal-shell .legal-document {
    padding: 1.25rem;
  }

  .legal-shell .legal-fact-grid,
  .legal-shell .legal-list--support,
  .legal-shell .legal-footer-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-shell .legal-fact--wide {
    grid-column: auto;
  }

  .legal-shell .legal-action-link {
    width: 100%;
  }

  .legal-shell .legal-footer-inner {
    padding: 2.5rem 1rem 1.5rem;
  }

  .legal-shell .legal-footer-link {
    min-height: 44px;
  }

  .legal-shell .legal-footer-meta {
    align-items: center;
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .legal-shell .legal-header-inner,
  .legal-shell .legal-main,
  .legal-shell .legal-footer-inner {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .legal-shell .legal-document,
  .legal-shell .legal-panel {
    padding: 1rem;
  }

  .legal-shell .legal-brand {
    font-size: 0.86rem;
    letter-spacing: 0.12em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-shell *,
  .legal-shell *::before,
  .legal-shell *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@page {
  margin: 16mm;
}

@media print {
  .legal-shell {
    color: #000;
    background: #fff !important;
    font-size: 11pt;
  }

  .legal-shell .legal-skip-link,
  .legal-shell .legal-header,
  .legal-shell .legal-footer-groups {
    display: none !important;
  }

  .legal-shell .legal-main,
  .legal-shell .legal-footer-inner {
    padding: 0;
  }

  .legal-shell .legal-document,
  .legal-shell .legal-panel {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .legal-shell .legal-document-header {
    padding-bottom: 1.5rem;
  }

  .legal-shell .legal-section,
  .legal-shell .legal-section + .legal-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .legal-shell h1,
  .legal-shell h2,
  .legal-shell h3 {
    break-after: avoid;
  }

  .legal-shell .legal-panel--meta,
  .legal-shell .legal-panel--contact,
  .legal-shell .legal-panel--action,
  .legal-shell .legal-panel--warning,
  .legal-shell .legal-fact {
    break-inside: avoid;
  }

  .legal-shell a {
    color: #000;
    text-decoration: underline;
  }

  .legal-shell .legal-footer {
    margin-top: 2rem;
    border-top: 1px solid #000;
    background: transparent;
  }

  .legal-shell .legal-footer-meta {
    margin-top: 0;
    padding-top: 0.75rem;
    border-top: 0;
  }
}
