:root {
  --legal-max: 920px;
}

.legal-main { padding: clamp(64px,9vw,112px) 0 100px; }
.legal-shell { width: min(var(--legal-max),calc(100% - 40px)); margin-inline: auto; }
.legal-hero { margin-bottom: 34px; }
.legal-hero h1 { max-width: 820px; margin: 12px 0 0; font-size: clamp(2.65rem,7vw,5.7rem); line-height: .98; letter-spacing: -.065em; }
.legal-lead { max-width: 760px; margin: 24px 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.72; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.legal-meta span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); background: rgba(255,255,255,.025); font-size: .7rem; font-weight: 800; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 38px; align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-height) + 24px); padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(8,23,15,.82); }
.legal-toc b { display: block; margin-bottom: 12px; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.legal-toc a { display: block; padding: 7px 0; color: var(--muted); text-decoration: none; font-size: .78rem; line-height: 1.35; }
.legal-toc a:hover { color: var(--accent); }
.legal-card { overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(145deg,rgba(15,35,24,.86),rgba(5,15,9,.9)); box-shadow: var(--shadow-soft); }
.legal-section { padding: clamp(24px,4.5vw,44px); border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-height) + 20px); }
.legal-section:last-child { border-bottom: 0; }
.legal-section h2 { margin: 0 0 18px; font-size: clamp(1.45rem,3vw,2.15rem); letter-spacing: -.04em; }
.legal-section h3 { margin: 28px 0 10px; font-size: 1rem; }
.legal-section p, .legal-section li, .legal-section address { color: var(--muted); font-size: .91rem; line-height: 1.72; }
.legal-section p { margin: 0 0 14px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul, .legal-section ol { display: grid; gap: 8px; margin: 13px 0; padding-left: 22px; }
.legal-section a { color: var(--accent); text-underline-offset: 3px; }
.legal-section a.button-primary { color: #06220f; text-decoration: none; }
.legal-section address { font-style: normal; }
.legal-callout { margin: 20px 0 0; padding: 18px; border: 1px solid rgba(89,224,127,.2); border-radius: 16px; background: rgba(89,224,127,.055); }
.legal-callout strong { color: var(--text); }
.legal-warning { border-color: rgba(255,193,96,.25); background: rgba(255,193,96,.06); }
.legal-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 25px; }
.deletion-steps { counter-reset: deletion; display: grid; gap: 12px; padding: 0 !important; list-style: none; }
.deletion-steps li { position: relative; min-height: 58px; padding: 16px 16px 16px 64px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.02); }
.deletion-steps li::before { counter-increment: deletion; content: counter(deletion); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: rgba(89,224,127,.09); font-size: .72rem; font-weight: 900; }
.retention-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.retention-table th, .retention-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; line-height: 1.5; text-align: left; vertical-align: top; }
.retention-table th { color: var(--text); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.retention-table tr:last-child td { border-bottom: 0; }
.legal-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
.legal-footer-links a { color: var(--muted); text-decoration: none; font-size: .75rem; font-weight: 750; }
.legal-footer-links a:hover { color: var(--accent); }
.legal-hub-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.legal-hub-card { min-height: 180px; display: grid; align-content: start; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; color: inherit; background: linear-gradient(145deg,rgba(15,35,24,.8),rgba(5,15,9,.9)); text-decoration: none; }
.legal-hub-card:hover, .legal-hub-card:focus-visible { border-color: var(--line-strong); transform: translateY(-2px); }
.legal-hub-card > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: rgba(89,224,127,.09); font-weight: 900; }
.legal-hub-card strong { font-size: 1.05rem; }
.legal-hub-card small { color: var(--muted); font-size: .78rem; line-height: 1.55; }

@media (max-width: 820px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .legal-toc b { width: 100%; }
  .legal-toc a { padding: 4px 0; }
}

@media (max-width: 600px) {
  .legal-shell { width: min(var(--legal-max),calc(100% - 24px)); }
  .legal-main { padding-top: 48px; }
  .legal-hero h1 { font-size: clamp(2.45rem,14vw,4rem); }
  .legal-card { border-radius: 20px; }
  .legal-actions .button { width: 100%; }
  .retention-table { display: block; overflow-x: auto; }
  .legal-hub-grid { grid-template-columns: 1fr; }
}
