:root {
  color-scheme: dark;
  font-family: "Outfit", "Segoe UI", sans-serif;
  background: #05050a;
  color: #f3f3fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 84% 4%, rgba(0, 229, 255, .13), transparent 38rem),
    radial-gradient(ellipse at 0 44%, rgba(42, 42, 255, .12), transparent 38rem),
    #05050a;
  background-attachment: fixed;
}

a { color: #00e5ff; text-decoration: none; }
a:hover { color: #fff; }
button { font: inherit; }

.legal-shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.legal-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.legal-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; font: 800 .92rem/1 "Segoe UI", sans-serif; letter-spacing: .15em; }
.legal-brand > span:last-child > span { color: #00e5ff; }
.brand-mark { width: 9px; height: 9px; background: #00e5ff; box-shadow: 0 0 16px rgba(0,229,255,.8); transform: rotate(45deg); }
.back-link { color: rgba(255,255,255,.65); font: 600 .72rem/1.4 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.back-link span { color: #00e5ff; }

.legal-hero {
  margin-top: 28px;
  padding: clamp(34px, 6vw, 64px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(5,5,10,.2), rgba(5,5,10,.72));
  box-shadow: 0 18px 50px rgba(0,0,0,.16);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: legal-rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.eyebrow { color: #00e5ff; font: 700 .68rem/1.6 ui-monospace, monospace; letter-spacing: .28em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 14px 0 18px; font: 900 clamp(2.7rem, 8vw, 5.8rem)/.98 "Segoe UI", sans-serif; letter-spacing: -.07em; }
h1 > span { color: #00e5ff; text-shadow: 0 0 32px rgba(0,229,255,.5); }
.legal-hero > p:not(.eyebrow) { max-width: 660px; color: rgba(243,243,251,.68); font-size: 1.05rem; line-height: 1.8; }
.draft-alert { display: flex; align-items: flex-start; gap: 16px; max-width: 850px; margin-top: 32px; padding: 18px 20px; border: 1px solid rgba(255,45,74,.42); border-left: 3px solid #ff2d4a; background: linear-gradient(110deg, rgba(255,45,74,.1), rgba(10,10,18,.84)); box-shadow: 0 12px 40px rgba(0,0,0,.24); }
.draft-alert p { margin: 0; color: rgba(255,255,255,.78); font-size: .9rem; line-height: 1.7; }
.draft-alert strong { color: #fff; }
.alert-label { flex: 0 0 auto; padding: 5px 7px; border: 1px solid rgba(255,82,105,.55); color: #ff7184; font: 700 .58rem/1.2 ui-monospace, monospace; letter-spacing: .08em; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.legal-nav a { padding: 10px 12px; border: 1px solid rgba(0,229,255,.2); background: rgba(0,229,255,.035); color: rgba(243,243,251,.7); font: 600 .65rem/1.3 ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; transition: color .2s ease, border-color .2s ease, transform .2s ease, background .2s ease; }
.legal-nav a:hover { transform: translateY(-2px); border-color: rgba(0,229,255,.7); background: rgba(0,229,255,.1); color: #fff; }

.legal-section {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr);
  gap: 18px;
  margin: 18px 0;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(5,5,10,.18), rgba(5,5,10,.72));
  box-shadow: 0 18px 50px rgba(0,0,0,.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  scroll-margin-top: 28px;
  animation: legal-rise .65s ease both;
}
.section-index { color: rgba(0,229,255,.66); font: 700 .8rem ui-monospace, monospace; letter-spacing: .18em; }
.section-content { max-width: 800px; }
.section-content > .eyebrow { margin-bottom: 12px; }
h2 { margin-bottom: 14px; font: 800 clamp(1.9rem, 5vw, 3rem)/1.12 "Segoe UI", sans-serif; letter-spacing: -.045em; }
h3 { margin: 32px 0 10px; color: #fff; font: 700 1.05rem/1.4 "Segoe UI", sans-serif; }
.section-content p { color: rgba(243,243,251,.69); font-size: .95rem; line-height: 1.8; }
.section-content .legal-lead { color: rgba(255,255,255,.9); font-size: 1.05rem; }
.placeholder-card { margin: 20px 0 26px; padding: 22px 24px; border: 1px solid rgba(0,229,255,.18); border-radius: 10px; background: rgba(5,15,26,.68); box-shadow: inset 0 0 28px rgba(0,229,255,.025); backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%); }
.placeholder-card p { margin-bottom: 7px; color: #eafaff; }
.placeholder-card p:first-child { color: #00e5ff; }
.placeholder-card .placeholder-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(243,243,251,.58); font-size: .83rem; }
.legal-placeholder { color: #ff5269; font-weight: 700; text-shadow: 0 0 14px rgba(255,45,74,.18); overflow-wrap: anywhere; }
.legal-caution { margin-top: 26px; padding: 14px 17px; border-left: 2px solid #ff2d4a; background: rgba(255,45,74,.055); font-size: .85rem !important; }
.choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 26px 0; }
.choice-card { min-height: 190px; padding: 20px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(5,15,26,.66); box-shadow: inset 0 0 24px rgba(255,255,255,.015); backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%); transition: transform .25s ease, border-color .25s ease, background .25s ease; }
.choice-card:hover { transform: translateY(-4px); border-color: rgba(0,229,255,.35); background: rgba(5,22,34,.82); }
.choice-state { font: 700 .58rem/1.4 ui-monospace, monospace; letter-spacing: .1em; }
.choice-state.required { color: #63f0be; }
.choice-state.optional { color: #00e5ff; }
.choice-card h3 { margin-top: 16px; }
.choice-card p { margin-bottom: 0; font-size: .83rem; }
.settings-link { display: inline-flex; align-items: center; gap: 12px; padding: 12px 15px; border: 1px solid rgba(0,229,255,.45); background: rgba(0,229,255,.08); color: #eafaff; cursor: pointer; font: 700 .68rem ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; transition: background .2s ease, box-shadow .2s ease; }
.settings-link:hover { background: rgba(0,229,255,.16); box-shadow: 0 0 24px rgba(0,229,255,.12); }

.legal-footer { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid rgba(255,255,255,.09); color: rgba(255,255,255,.4); font: 600 .62rem ui-monospace, monospace; letter-spacing: .13em; }
.legal-footer a { color: #00e5ff; }
.legal-footer .settings-link { color: #eafaff; font: inherit; letter-spacing: .08em; }

@keyframes legal-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 680px) {
  .legal-shell { width: min(100% - 28px, 1080px); }
  .legal-header { min-height: 72px; }
  .legal-brand { font-size: .76rem; }
  .back-link { max-width: 122px; text-align: right; font-size: .58rem; }
  .legal-hero { margin-top: 18px; padding: 28px 20px; }
  .legal-section { grid-template-columns: 35px minmax(0,1fr); gap: 8px; padding: 24px 16px; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice-card { min-height: 0; }
  .legal-footer { align-items: flex-start; justify-content: center; flex-direction: column; padding: 20px 0; }
  .legal-footer .settings-link { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
