:root{color-scheme:light;--page:#f7f7f9;--paper:#fff;--ink:#191b24;--muted:#707482;--line:#e7e8ee;--red:#ed3448;--red-deep:#c71f36;--red-soft:#fff0f2}
*{box-sizing:border-box}
html{background:var(--page);scroll-behavior:smooth}
body{margin:0;background:var(--page);color:var(--ink);font:15px/1.75 Inter,"Segoe UI",Arial,sans-serif}
a{color:var(--red-deep);text-decoration:none}a:hover{text-decoration:underline}
.legal-top{display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:1120px;margin:auto;padding:24px 28px}
.legal-brand{display:flex;align-items:center;gap:11px;color:var(--ink);font-size:15px;font-weight:800;letter-spacing:-.4px}.legal-brand:hover{text-decoration:none}
.legal-mark{display:grid;place-items:center;width:39px;height:39px;border-radius:12px;background:var(--red);color:white;font-size:20px;font-weight:900;box-shadow:0 7px 18px #ed34482e}.legal-mark span{color:#ffc5cc}
.legal-actions{display:flex;align-items:center;gap:10px}.legal-actions button,.legal-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 11px;border:1px solid var(--line);border-radius:9px;background:white;color:var(--ink);font:700 11px/1.2 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer}
.legal-wrap{max-width:900px;margin:40px auto 90px;padding:0 24px}
.legal-hero{position:relative;overflow:hidden;padding:42px 44px;border:1px solid #f3d8dc;border-radius:20px;background:linear-gradient(125deg,#fff 10%,#fff5f6 100%)}
.legal-hero:after{content:"";position:absolute;right:-70px;top:-120px;width:280px;height:280px;border:1px solid #f3c9cf;border-radius:50%;box-shadow:0 0 0 35px #ed344807,0 0 0 70px #ed344805}
.eyebrow{position:relative;z-index:1;color:var(--red-deep);font-size:10px;font-weight:850;letter-spacing:1.5px;text-transform:uppercase}
h1{position:relative;z-index:1;margin:12px 0 10px;font-size:clamp(35px,6vw,52px);line-height:1.08;letter-spacing:-2px}
.legal-hero p{position:relative;z-index:1;max-width:620px;margin:0;color:var(--muted);font-size:14px}
.legal-meta{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px}.legal-meta span{padding:6px 9px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#6e7280;font-size:10px;font-weight:700}
.legal-body{display:grid;grid-template-columns:200px minmax(0,1fr);gap:25px;margin-top:25px;align-items:start}
.legal-toc,.legal-content{border:1px solid var(--line);border-radius:14px;background:var(--paper);box-shadow:0 7px 28px #191b2406}
.legal-toc{position:sticky;top:18px;padding:16px}.legal-toc strong{display:block;margin:0 0 10px;font-size:10px;letter-spacing:1px;text-transform:uppercase;color:#8b8d98}.legal-toc a{display:block;padding:7px 8px;border-radius:7px;color:#656a78;font-size:11px}.legal-toc a:hover{background:var(--red-soft);color:var(--red-deep);text-decoration:none}
.legal-content{padding:30px 34px}.legal-content section+section{margin-top:30px;padding-top:24px;border-top:1px solid var(--line)}.legal-content h2{margin:0 0 9px;font-size:19px;line-height:1.35;letter-spacing:-.5px}.legal-content p,.legal-content li{color:#656a78;font-size:13px}.legal-content p{margin:8px 0}.legal-content ul{padding-left:20px}.legal-content li{padding:3px 0}.legal-callout{margin:16px 0;padding:14px 16px;border:1px solid #f4cdd2;border-radius:10px;background:var(--red-soft);color:#8e2635;font-size:12px}
.legal-footer{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:22px;padding:18px 2px;color:#8a8d98;font-size:11px}.legal-footer nav{display:flex;gap:14px}
@media(max-width:700px){.legal-top{padding:16px 17px}.legal-wrap{margin:20px auto 45px;padding:0 14px}.legal-hero{padding:28px 23px}.legal-body{grid-template-columns:1fr}.legal-toc{position:static}.legal-content{padding:23px 20px}.legal-toc nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.legal-actions a{display:none}}

/* Shared BotCreator brand mark for all legal pages. */
.legal-logo{display:block;width:42px;height:42px;flex:0 0 42px;object-fit:contain;border-radius:12px;box-shadow:0 7px 18px #ed34482e}
.legal-brand>span:last-child{display:flex;flex-direction:column;line-height:1.2}
.legal-brand small{display:block;margin-top:4px;color:var(--muted);font-size:9px;font-weight:750;letter-spacing:1px;text-transform:uppercase}
@media(max-width:700px){.legal-logo{width:36px;height:36px;flex-basis:36px}}


/* Legal pages share the app's persisted light/dark theme. */
:root{color-scheme:light;--page:#f7f8fb;--paper:#fff;--ink:#1b1d27;--muted:#747b8b;--line:#e5e7ee;--red:#ed3448;--red-deep:#c71f36;--red-soft:#fff0f2}
html{background:var(--page)}
body{background:var(--page);color:var(--ink)}
.legal-top{color:var(--ink)}
.legal-actions button,.legal-actions a{background:var(--paper);color:var(--ink);border-color:var(--line)}
.legal-hero{background:linear-gradient(125deg,#fff 10%,#fff5f6 100%);border-color:#f3d8dc}
.legal-toc,.legal-content{background:var(--paper);border-color:var(--line)}
.legal-toc a{color:var(--muted)}
.legal-content p,.legal-content li{color:#656a78}
.legal-meta span{background:var(--paper);border-color:var(--line);color:var(--muted)}
.legal-callout{background:var(--red-soft);border-color:#f4cdd2;color:#8e2635}
.legal-theme-toggle{min-width:38px;min-height:36px;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:var(--paper);color:var(--ink);font:700 11px/1.2 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer}
.legal-theme-toggle:hover{border-color:var(--red);color:var(--red-deep)}.legal-theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:36px;padding:7px;flex:none}.legal-theme-toggle svg{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body[data-theme="dark"]{color-scheme:dark;--page:#101116;--paper:#191a22;--ink:#f4f4f7;--muted:#a0a2af;--line:#30313d;--red:#ff5266;--red-deep:#ff8794;--red-soft:#311b22;background:var(--page);color:var(--ink)}
html[data-theme="dark"]{color-scheme:dark;background:#101116}
body[data-theme="dark"] .legal-top,
body[data-theme="dark"] .legal-brand,
body[data-theme="dark"] .legal-actions button,
body[data-theme="dark"] .legal-actions a{color:var(--ink)}
body[data-theme="dark"] .legal-actions button,
body[data-theme="dark"] .legal-actions a,
body[data-theme="dark"] .legal-theme-toggle{background:var(--paper);border-color:var(--line);color:var(--ink)}
body[data-theme="dark"] .legal-hero{border-color:#4b2b33;background:linear-gradient(125deg,#1b1a22 10%,#281a20 100%)}
body[data-theme="dark"] .legal-hero p,
body[data-theme="dark"] .legal-content p,
body[data-theme="dark"] .legal-content li{color:#c0c1cb}
body[data-theme="dark"] .legal-toc,
body[data-theme="dark"] .legal-content{background:var(--paper);border-color:var(--line)}
body[data-theme="dark"] .legal-toc strong,
body[data-theme="dark"] .legal-toc a{color:#b4b6c2}
body[data-theme="dark"] .legal-toc a:hover{background:var(--red-soft);color:var(--red-deep)}
body[data-theme="dark"] .legal-meta span{background:#20212b;border-color:var(--line);color:#c0c1cb}
body[data-theme="dark"] .legal-content section+section{border-color:var(--line)}
body[data-theme="dark"] .legal-callout{background:var(--red-soft);border-color:#65303a;color:#ffb2bc}
body[data-theme="dark"] .legal-footer{color:#a0a2af}
body[data-theme="dark"] .legal-logo{box-shadow:0 7px 18px #0005}

/* Shared accessible SVG icon treatment */
.ui-icon{display:inline-block;width:1em;height:1em;flex:0 0 auto;vertical-align:-.16em;object-fit:contain;color:currentColor}
button .ui-icon,a .ui-icon{pointer-events:none}
.icon-close .ui-icon,.modal-x .ui-icon{width:17px;height:17px;vertical-align:middle}
.quick-icon .ui-icon{width:22px;height:22px;vertical-align:middle}
.support .ui-icon{width:15px;height:15px}


/* Explicit light palette reset to prevent dark-mode leftovers after switching. */
html[data-theme="light"]{color-scheme:light;background:#f7f8fb}
body[data-theme="light"]{color-scheme:light;--page:#f7f8fb;--paper:#fff;--ink:#1b1d27;--muted:#747b8b;--line:#e5e7ee;--red:#ed3448;--red-deep:#c71f36;--red-soft:#fff0f2;background:var(--page);color:var(--ink)}
body[data-theme="light"] .legal-top,body[data-theme="light"] .legal-brand,body[data-theme="light"] .legal-actions button,body[data-theme="light"] .legal-actions a{color:var(--ink)}
body[data-theme="light"] .legal-actions button,body[data-theme="light"] .legal-actions a,body[data-theme="light"] .legal-theme-toggle,body[data-theme="light"] .legal-toc,body[data-theme="light"] .legal-content{background:var(--paper);border-color:var(--line);color:var(--ink)}
body[data-theme="light"] .legal-hero{background:linear-gradient(125deg,#fff 10%,#fff5f6 100%);border-color:#f3d8dc}
body[data-theme="light"] .legal-hero p,body[data-theme="light"] .legal-content p,body[data-theme="light"] .legal-content li{color:#656a78}
body[data-theme="light"] .legal-toc strong,body[data-theme="light"] .legal-toc a{color:var(--muted)}
body[data-theme="light"] .legal-meta span{background:#fff;border-color:var(--line);color:var(--muted)}
