:root{
  --bg:#081120;
  --bg-2:#0d1730;
  --bg-3:#101d3d;
  --surface:#ffffff;
  --surface-soft:#f6f9ff;
  --ink:#0b1530;
  --muted:rgba(11,21,48,.68);
  --line:rgba(11,21,48,.08);
  --line-strong:rgba(255,255,255,.12);
  --blue:#4f80ff;
  --blue-2:#7ca6ff;
  --glass:rgba(255,255,255,.08);
  --glass-2:rgba(255,255,255,.12);
  --shadow:0 22px 60px rgba(8,17,32,.18);
  --shadow-soft:0 14px 32px rgba(8,17,32,.10);
  --radius:28px;
  --radius-sm:18px;
  --container:min(1380px, calc(100vw - 24px));
  --header-height:88px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:'Manrope',sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(79,128,255,.16), transparent 18%),
    linear-gradient(180deg, #081120 0%, #0c1630 18%, #eef4ff 18.1%, #f8fbff 100%);
  overflow-x:hidden;
}

img{max-width:100%;display:block}
a{text-decoration:none;color:inherit}
button,input{font:inherit}

.container{
  width:var(--container);
  margin:0 auto;
}

.legal-header{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  z-index:1000;
  transition:transform .32s ease, opacity .32s ease;
}

.legal-header.header-hidden{
  transform:translateY(-120%);
}

.header-shell{
  margin:10px auto 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 14px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  background:rgba(255,255,255,.12);
  backdrop-filter:blur(24px) saturate(180%);
  -webkit-backdrop-filter:blur(24px) saturate(180%);
  box-shadow:0 16px 38px rgba(0,0,0,.18);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brand-logo{
  width:44px;
  height:44px;
  border-radius:14px;
  overflow:hidden;
  background:rgba(255,255,255,.95);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:6px;
  flex:0 0 auto;
  box-shadow:var(--shadow-soft);
}

.brand-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.brand-copy strong{
  display:block;
  color:#eef3ff;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.16em;
}

.brand-copy span{
  display:block;
  color:rgba(238,243,255,.72);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.18em;
  margin-top:2px;
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.primary-btn,
.ghost-btn,
.mobile-toggle{
  min-height:46px;
  padding:0 18px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-size:14px;
  font-weight:800;
  transition:transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
  border:1px solid transparent;
  cursor:pointer;
}

.primary-btn{
  background:linear-gradient(135deg, var(--blue), var(--blue-2));
  color:#fff;
  box-shadow:0 14px 28px rgba(79,128,255,.28);
}

.primary-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 34px rgba(79,128,255,.34);
}

.ghost-btn{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:#fff;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

.ghost-btn:hover{
  transform:translateY(-2px);
  background:rgba(255,255,255,.14);
}

.ghost-btn.dark{
  color:var(--ink);
  background:#fff;
  border:1px solid rgba(11,21,48,.10);
}

.ghost-btn.dark:hover{
  background:#f2f6ff;
  color:var(--blue);
}

main{
  padding-top:calc(var(--header-height) + 8px);
}

.legal-topbar{
  padding:8px 0 14px;
}

.legal-topbar-shell{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:16px;
  align-items:stretch;
}

.topbar-copy,
.topbar-status{
  border-radius:28px;
  box-shadow:var(--shadow);
}

.topbar-copy{
  padding:22px 24px;
  background:linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.06));
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.topbar-copy h1{
  margin:14px 0 10px;
  font-family:'Playfair Display',serif;
  font-size:clamp(30px, 4vw, 48px);
  line-height:.98;
  letter-spacing:-.03em;
  color:#fff;
}

.topbar-copy p{
  margin:0;
  color:rgba(239,244,255,.78);
  line-height:1.75;
  font-size:15px;
  max-width:760px;
}

.topbar-status{
  padding:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.07));
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.status-label{
  display:block;
  color:#fff;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.16em;
  font-weight:800;
}

.topbar-status strong{
  margin-top:10px;
  display:block;
  color:#dbe6ff;
  font-size:26px;
  line-height:1.15;
  font-family:'Playfair Display',serif;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:#b7cbff;
}

.eyebrow::before{
  content:"";
  width:26px;
  height:1px;
  background:currentColor;
  opacity:.65;
}

.eyebrow-dark{
  color:var(--blue);
}

.legal-layout{
  padding:0 0 20px;
}

.legal-grid{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:16px;
  align-items:start;
  min-height:calc(100svh - 150px);
}

.glass-card{
  background:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.58);
  border-radius:28px;
  backdrop-filter:blur(18px) saturate(165%);
  -webkit-backdrop-filter:blur(18px) saturate(165%);
  box-shadow:var(--shadow);
}

.sidebar-card{
  padding:18px;
  position:sticky;
  top:84px;
}

.sidebar-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.sidebar-head h2{
  margin:12px 0 0;
  font-family:'Playfair Display',serif;
  font-size:30px;
  line-height:1.04;
}

.mobile-toggle{
  display:none;
  background:#fff;
  color:var(--ink);
  border:1px solid rgba(11,21,48,.10);
  min-height:40px;
  padding:0 14px;
  font-size:12px;
}

.sidebar-copy{
  margin:10px 0 0;
  color:var(--muted);
  line-height:1.7;
  font-size:14px;
}

.search-wrap{
  margin:16px 0 14px;
}

.search-wrap input{
  width:100%;
  min-height:50px;
  padding:0 16px;
  border-radius:16px;
  border:1px solid rgba(11,21,48,.10);
  background:#fff;
  color:var(--ink);
  outline:none;
  transition:border-color .22s ease, box-shadow .22s ease;
}

.search-wrap input:focus{
  border-color:var(--blue);
  box-shadow:0 0 0 4px rgba(79,128,255,.10);
}

.doc-list{
  display:grid;
  gap:10px;
}

.doc-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border-radius:18px;
  background:#fff;
  border:1px solid rgba(11,21,48,.08);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.doc-link:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(8,17,32,.08);
  border-color:rgba(79,128,255,.18);
}

.doc-link.active{
  background:linear-gradient(135deg, rgba(79,128,255,.12), rgba(124,166,255,.08));
  border-color:rgba(79,128,255,.28);
  box-shadow:0 12px 24px rgba(79,128,255,.10);
}

.doc-link-text strong{
  display:block;
  color:var(--ink);
  font-size:14px;
  line-height:1.4;
}

.doc-link-text small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
}

.doc-arrow{
  color:var(--blue);
  font-weight:800;
  font-size:15px;
}

.quick-card{
  margin-top:14px;
  padding-top:2px;
}

.quick-actions{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.quick-btn{
  min-height:38px;
  padding:0 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(11,21,48,.08);
  color:var(--ink);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
  transition:transform .22s ease, box-shadow .22s ease, color .22s ease;
}

.quick-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(8,17,32,.08);
  color:var(--blue);
}

.legal-note{
  margin-top:14px;
  text-align:center;
  color:rgba(11,21,48,.56);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.legal-viewer-wrap{
  min-width:0;
}

.viewer-top{
  padding:18px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.viewer-title-block h2{
  margin:10px 0 0;
  font-family:'Playfair Display',serif;
  font-size:30px;
  line-height:1.04;
  color:var(--ink);
}

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

.viewer-frame-shell{
  position:relative;
  margin-top:12px;
  background:#fff;
  border:1px solid rgba(11,21,48,.08);
  border-radius:28px;
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  height:calc(100svh - 210px);
  min-height:620px;
}

.legal-frame{
  width:100%;
  height:100%;
  border:0;
  display:block;
  background:#fff;
}

.viewer-loading{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  background:linear-gradient(180deg, rgba(248,251,255,.94), rgba(238,244,255,.94));
  z-index:2;
  transition:opacity .28s ease, visibility .28s ease;
}

.viewer-loading.hide{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

.loader-ring{
  width:56px;
  height:56px;
  border-radius:50%;
  border:3px solid rgba(79,128,255,.18);
  border-top-color:var(--blue);
  animation:spin .95s linear infinite;
}

.viewer-loading p{
  margin:0;
  color:var(--muted);
  font-weight:700;
}

@keyframes spin{
  to{transform:rotate
