/* Legal pages and account consent UI. Never changes the existing app layout. */
.legal-page{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
.legal-page{margin:0;min-height:100dvh;background:radial-gradient(ellipse 70% 42% at 90% 0%,#e8dbf8,transparent),linear-gradient(155deg,#faf8ff,#f0eaf8);color:#322745}
.legal-page *, .legal-page *::before,.legal-page *::after{box-sizing:border-box}
.legal-page a{color:#6742a7;text-underline-offset:3px}
.legal-page a:focus-visible{outline:3px solid #8565bf;outline-offset:4px;border-radius:4px}
.legal-header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:18px;padding:17px max(18px,calc((100vw - 920px)/2));background:#fffffff2;border-bottom:1px solid #e2d8ee;backdrop-filter:blur(15px)}
.legal-brand{display:flex;align-items:center;gap:11px;font-weight:850;font-size:17px;text-decoration:none!important;color:#33234d!important}
.legal-brand-mark{display:grid;place-items:center;width:37px;height:37px;border-radius:13px;background:linear-gradient(145deg,#a082e1,#6650bf);color:#fff;font-size:20px}
.legal-nav{display:flex;align-items:center;gap:15px;flex-wrap:wrap;font-size:12px;font-weight:700}
.legal-layout{width:min(920px,calc(100% - 32px));margin:35px auto 65px}
.legal-hero,.legal-content{background:#fffffff5;border:1px solid #e2d8ed;border-radius:24px;box-shadow:0 12px 36px #4f3b8020}
.legal-hero{padding:33px clamp(22px,5vw,46px);margin-bottom:18px}
.legal-kicker{display:block;margin-bottom:9px;font-size:11px;letter-spacing:.15em;font-weight:830;color:#8966c3}
.legal-hero h1{margin:0 0 12px;font-size:clamp(25px,3.5vw,36px);line-height:1.15;letter-spacing:-.045em}
.legal-hero p{margin:0;color:#756882;font-size:13px;line-height:1.7}
.legal-content{padding:25px clamp(22px,5vw,46px) 39px}
.legal-content h2{margin:28px 0 9px;font-size:18px;line-height:1.3;letter-spacing:-.015em}
.legal-content h2:first-child{margin-top:0}
.legal-content p,.legal-content li{font-size:13px;line-height:1.75;color:#50465f}
.legal-content ul{margin:8px 0;padding-left:22px}
.legal-warning{padding:16px 19px;border:1px solid #d8c7ec;border-radius:15px;background:#f5f0fc;font-size:12px;line-height:1.7;color:#563d77}
.legal-warning strong{display:block;margin-bottom:3px;font-size:13px}
.legal-content .legal-muted{font-size:12px;color:#7d7289}
.legal-foot{margin-top:25px;text-align:center;font-size:12px;color:#80748d}
.account-legal-choice{display:flex;align-items:flex-start;gap:11px;margin:15px 0 9px;padding:13px;border:1px solid #dccded;border-radius:14px;background:#f6f1fc;font-size:12px;font-weight:550;line-height:1.6;color:#4b3b64}
.account-legal-choice[hidden]{display:none!important}
.account-legal-choice input{width:19px!important;height:19px!important;min-width:19px;min-height:19px!important;flex:none;accent-color:#7654bd;margin:1px 0 0!important;cursor:pointer}
.account-legal-choice a,.account-legal-links a{color:#6843a7;font-weight:720;text-decoration:underline;text-underline-offset:3px}
.account-legal-choice input:focus-visible{outline:3px solid #9b7bd4;outline-offset:3px}
.account-legal-links{margin:10px auto 0;text-align:center;color:#796b8c;font-size:11px;line-height:1.6}
.account-legal-links a{display:inline-block;margin:0 4px}
.account-legal-note{margin:0;color:#83758f;font-size:10px;line-height:1.5}
@media(max-width:560px){.legal-header{padding:13px 16px}.legal-nav{gap:10px;font-size:11px}.legal-layout{margin:18px auto 40px}.legal-hero{padding:25px 21px}.legal-content{padding:23px 20px 30px}}

.settings-legal-links{display:flex;flex-wrap:wrap;gap:8px 17px;margin:13px 8px 19px;font-size:12px;line-height:1.5}
.settings-legal-links a{color:#7653ad;text-underline-offset:3px}
.account-legal-choice small{display:block;margin-top:3px;color:#867892;font-size:11px;font-weight:500;line-height:1.35}
body[data-theme="night"] .account-legal-choice{background:#352d45;border-color:#5f5275;color:#f2eaf8}
body[data-theme="night"] .account-legal-choice small{color:#c9bbdb}

/* Fix invisible sign-in checkbox: #accountGate input applies text-field padding
   and width to native checkboxes without the more specific overrides below. */
#accountGate.account-card #accountTermsChoice{
 display:grid;grid-template-columns:26px minmax(0,1fr);gap:13px;align-items:start;
 margin:16px 0 8px;padding:15px 14px;border:1.5px solid #baa4dd;
 border-radius:17px;background:#f4effe;color:#423451;box-shadow:0 3px 14px #57467a16;
 box-sizing:border-box;
}
#accountGate.account-card #accountTermsAccepted{
 display:block;flex:none;-webkit-appearance:checkbox!important;appearance:checkbox!important;
 width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;
 max-width:24px!important;max-height:24px!important;padding:0!important;margin:1px 0 0!important;
 border:2px solid #7552ad!important;border-radius:5px!important;
 background:#fff!important;color:#fff!important;accent-color:#7654bd;
 box-shadow:none!important;opacity:1;cursor:pointer;touch-action:manipulation;
}
#accountGate.account-card #accountTermsAccepted:checked{background:#7554bd!important}
#accountGate.account-card #accountTermsAccepted:focus-visible{outline:3px solid #a48add!important;outline-offset:3px!important}
#accountGate .account-legal-copy{min-width:0}
#accountGate .account-legal-copy label{
 display:block;margin:0;padding:0;color:#443452;cursor:pointer;
 font-size:13.5px;line-height:1.48;font-weight:760;
}
#accountGate .account-legal-copy p{margin:7px 0 0;color:#685876;font-size:12px;line-height:1.55;overflow-wrap:anywhere}
#accountGate .account-legal-copy a{color:#64409e;font-weight:760;text-decoration:underline;text-underline-offset:3px}
#accountGate .account-legal-copy a:focus-visible{outline:3px solid #9471d6;outline-offset:2px;border-radius:3px}
#accountGate .account-legal-copy small{display:block;margin-top:6px;color:#776883;font-size:11px;line-height:1.45}
#accountGate.account-card #accountTermsChoice.is-invalid{background:#fff2f5;border-color:#bc5369}
#accountGate.account-card .account-legal-error{margin:2px 0 7px;padding:0 5px;color:#a12b47;font-size:12px;line-height:1.5;font-weight:730}
#accountGate.account-card .account-legal-error[hidden]{display:none!important}
body[data-theme="night"] #accountGate.account-card #accountTermsChoice{background:#342b45;border-color:#8873b6;color:#f7efff}
body[data-theme="night"] #accountGate .account-legal-copy label{color:#f7efff}
body[data-theme="night"] #accountGate .account-legal-copy p{color:#ddd0e9}
body[data-theme="night"] #accountGate .account-legal-copy a{color:#e2c9ff}
body[data-theme="night"] #accountGate .account-legal-copy small{color:#c9bad7}
body[data-theme="night"] #accountGate.account-card #accountTermsChoice.is-invalid{background:#4e303e;border-color:#e696aa}
body[data-theme="night"] #accountGate.account-card .account-legal-error{color:#ffb8c8}
@media(max-width:560px){
 #accountGate.account-card #accountTermsChoice{grid-template-columns:25px minmax(0,1fr);gap:11px;margin:14px 0 7px;padding:13px 11px}
 #accountGate .account-legal-copy label{font-size:13px}
 #accountGate .account-legal-copy p{font-size:11.5px}
}
