/* ==========================================================================
   SoundDeck — Legal pages (extends site.css)
   ========================================================================== */
.legal-hero { position: relative; padding: calc(var(--nav-h) + clamp(48px, 6vw, 80px)) 0 clamp(32px, 4vw, 48px); overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line-1); }
.legal-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 90% at 20% 0%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 20% 0%, #000 10%, transparent 70%);
}
.legal-hero::after { content: ''; position: absolute; z-index: -1; left: -10%; top: -40%; width: 900px; height: 600px; background: radial-gradient(closest-side, rgba(31, 111, 235, 0.10), transparent 70%); }
.legal-hero .container { display: flex; flex-direction: column; gap: 18px; }
.legal-title { font-size: clamp(36px, 5vw, 60px); line-height: 1.02; font-weight: 800; letter-spacing: -0.04em; color: var(--fg-0); }
.legal-hero .lead { max-width: 680px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.legal-tabs { display: flex; gap: 4px; margin-top: 16px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-1); align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.legal-tabs::-webkit-scrollbar { display: none; }
.legal-tabs a { flex-shrink: 0; height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--fg-2); transition: color 0.15s ease, background 0.15s ease; }
.legal-tabs a:hover { color: var(--fg-0); background: rgba(255, 255, 255, 0.04); }
.legal-tabs a[aria-current="page"] { color: var(--bg-1); background: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 4px 12px -4px rgba(255, 255, 255, 0.3); }

.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding: clamp(40px, 5vw, 64px) 0 clamp(80px, 9vw, 120px); align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 28px); display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - var(--nav-h) - 56px); overflow-y: auto; scrollbar-width: thin; }
.toc-label { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 10px; }
.toc > a { position: relative; display: flex; gap: 10px; padding: 7px 10px 7px 14px; border-radius: 8px; font-size: 13.5px; line-height: 1.4; color: var(--fg-3); transition: color 0.15s ease, background 0.15s ease; }
.toc > a::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--line-2); transition: background 0.2s ease; }
.toc > a span { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--fg-3); padding-top: 2px; flex-shrink: 0; }
.toc > a:hover { color: var(--fg-1); background: rgba(255, 255, 255, 0.03); }
.toc > a.active { color: var(--fg-0); }
.toc > a.active::before { background: #fff; }
.toc > a.active span { color: var(--fg-1); }
.toc-foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-1); display: flex; flex-direction: column; gap: 10px; }
.toc-foot p { font-size: 13px; color: var(--fg-3); line-height: 1.5; }

/* Prose */
.prose { max-width: 760px; color: var(--fg-2); font-size: 16px; line-height: 1.75; }
.prose > * + * { margin-top: 18px; }
.prose h2 { display: flex; align-items: baseline; gap: 14px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-1); font-size: clamp(21px, 2.2vw, 25px); line-height: 1.25; font-weight: 750; letter-spacing: -0.02em; color: var(--fg-0); scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h2:first-of-type { margin-top: 40px; }
.prose h2 .section-num { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--fg-3); flex-shrink: 0; min-width: 28px; }
.prose h2 + * { margin-top: 14px; }
.prose p { text-wrap: pretty; }
.prose strong, .prose b { color: var(--fg-1); font-weight: 600; }
.prose a { color: var(--fg-0); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; transition: text-decoration-color 0.15s ease; }
.prose a:hover { text-decoration-color: #fff; }
.prose code { font-family: var(--mono); font-size: 0.84em; color: var(--fg-0); background: var(--bg-3); border: 1px solid var(--line-2); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.prose ul { list-style: none; display: flex; flex-direction: column; gap: 12px; padding: 0; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before { content: ''; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 2px; background: var(--fg-3); }
.prose ul li strong:first-child { color: var(--fg-0); }

.highlight-card { position: relative; display: block; padding: 22px 24px 22px 26px; border-radius: 16px; background: linear-gradient(180deg, #10151C, var(--bg-2)); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); color: var(--fg-2); font-size: 15.5px; line-height: 1.7; overflow: hidden; }
.highlight-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue-hi); }
.highlight-card strong { display: block; margin-bottom: 6px; font-size: 16.5px; color: var(--fg-0); font-weight: 750; letter-spacing: -0.01em; }

.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line-1); background: var(--bg-2); }
.cookie-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.cookie-table th { text-align: left; padding: 13px 16px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); background: var(--bg-1); border-bottom: 1px solid var(--line-1); }
.cookie-table td { padding: 14px 16px; border-bottom: 1px solid var(--line-1); vertical-align: top; color: var(--fg-2); }
.cookie-table tr:last-child td { border-bottom: 0; }
.cookie-table td:first-child { white-space: nowrap; }

.legal-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.contact-card { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 28px; padding: 22px 24px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-1); font-size: 15px; line-height: 1.55; }
.contact-card dt { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); padding-top: 3px; }
.contact-card dd { margin: 0; color: var(--fg-1); overflow-wrap: anywhere; }

@media (max-width: 960px) {
  .legal-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 560px) {
  .prose { font-size: 15.5px; }
  .prose h2 { gap: 10px; margin-top: 44px; }
  .highlight-card { padding: 18px 18px 18px 20px; }
  .contact-card { grid-template-columns: 1fr; gap: 2px; padding: 18px 20px; }
  .contact-card dd + dt { margin-top: 12px; }
}
@media print {
  .nav, .mobile-panel, .toc, .legal-tabs, .footer, #sd-cookie-banner { display: none !important; }
  body { background: #fff; color: #000; }
  .legal-hero { padding-top: 0; border: 0; }
  .legal-title, .prose h2, .prose strong, .highlight-card strong { color: #000; }
  .prose, .highlight-card, .legal-hero .lead { color: #222; }
  .legal-layout { display: block; padding: 0; }
}
