/* ==========================================================================
   actempus — legal pages (Privacy Policy · Terms of Service)
   Loaded AFTER css/styles.css on the two legal templates only.
   Uses nothing but the landing page's own tokens (:root in styles.css),
   type scale (Inter 400–700), radii, panels, eyebrows, step badges,
   check ticks and FAQ icons — no new colours, no new fonts.
   ========================================================================== */

/* ---------- page hero (same glow ellipses as the landing hero) ---------- */
.legal-hero{position:relative;overflow:hidden;padding:178px 0 76px}
.legal-hero-in{position:relative;z-index:2}
.legal-title{font-size:64px;font-weight:500;letter-spacing:-2px;line-height:.94;margin-top:14px;max-width:900px}

.legal-glow{position:absolute;border-radius:50%;pointer-events:none;z-index:0}
.legal-glow-deep{width:330px;height:650px;background:var(--glow-deep);opacity:.95;
  filter:blur(92px);top:-300px;right:8%;transform:rotate(37.35deg)}
.legal-glow-blue{width:240px;height:600px;background:var(--glow-blue);opacity:.55;
  filter:blur(92px);top:-360px;right:-4%;transform:rotate(-50.52deg)}

/* ---------- date band (landing "logo band" strip) ---------- */
.legal-band-in{justify-content:flex-start;gap:12px 40px;padding:24px 0}
.legal-meta{display:inline-flex;align-items:center;gap:10px;font-size:15px}
.legal-meta::before{content:'';flex:none;width:6px;height:6px;border-radius:50%;background:var(--blue);box-shadow:0 0 0 3px rgba(52,120,246,.18)}
.legal-meta b{font-weight:500;color:var(--text)}

/* ---------- two-column document layout ---------- */
.legal-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:0 88px;align-items:start;margin-top:72px}
.legal-aside{position:sticky;top:98px;align-self:start}
body.admin-bar .legal-aside{top:130px}

/* contents card — panel + line, like the step / testimonial cards */
.legal-toc{background:var(--panel);border:1px solid var(--line);border-radius:22px;padding:22px 8px 14px 22px}
.legal-toc-head{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;
  text-align:left;padding:0 14px 14px 0;cursor:default}
.legal-toc .faq-ico{display:none}
.legal-toc-list{position:relative;max-height:calc(100vh - 210px);overflow-y:auto;padding-right:14px;
  overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line2) transparent}
.legal-toc-list::-webkit-scrollbar{width:4px}
.legal-toc-list::-webkit-scrollbar-thumb{background:var(--line2);border-radius:4px}
.legal-toc-list li{break-inside:avoid}
.legal-toc-list a{position:relative;display:flex;align-items:baseline;gap:12px;padding:8px 0 8px 16px;
  border-left:1px solid var(--line);color:var(--muted);font-size:13.5px;line-height:1.35;transition:color .25s}
.legal-toc-list a::before{content:'';position:absolute;left:-1px;top:6px;bottom:6px;width:2px;border-radius:2px;
  background:var(--blue);transform:scaleY(0);transition:transform .35s var(--ease)}
.legal-toc-num{flex:none;min-width:17px;color:var(--faint);font-size:11px;font-weight:600;letter-spacing:1px;transition:color .25s}
.legal-toc-list a:hover{color:var(--text)}
.legal-toc-list a:hover .legal-toc-num{color:var(--blue-soft)}
.legal-toc-list a.active{color:var(--text)}
.legal-toc-list a.active::before{transform:scaleY(1)}
.legal-toc-list a.active .legal-toc-num{color:var(--blue)}

/* ---------- article typography ---------- */
.legal-doc{min-width:0;max-width:820px}
.legal-doc p,.legal-doc li{color:var(--muted);font-size:15.5px;line-height:1.7}
.legal-doc p{margin:0 0 14px}
.legal-doc p:last-child{margin-bottom:0}
.legal-doc strong{color:var(--text);font-weight:600}
.legal-doc em{font-style:italic}
.legal-doc a{color:var(--blue-soft);text-decoration:underline;text-decoration-color:rgba(157,192,255,.35);
  text-underline-offset:3px;transition:color .2s,text-decoration-color .2s}
.legal-doc a:hover{color:var(--text);text-decoration-color:var(--blue)}
.legal-doc code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;color:var(--blue-soft);
  background:rgba(52,120,246,.12);border:1px solid rgba(52,120,246,.25);border-radius:6px;padding:1px 6px;word-break:break-word}

.legal-lead p{font-size:17px;line-height:1.6}

/* "The short version" — CTA-panel gradient + orb + landing check ticks */
.legal-summary{position:relative;overflow:hidden;margin:40px 0 0;padding:34px 36px 36px;border-radius:28px;
  border:1px solid var(--line2);background:linear-gradient(160deg,#12162A,#0C0E17)}
.legal-summary-orb{position:absolute;width:420px;height:320px;border-radius:50%;background:var(--glow-blue);
  filter:blur(105px);top:-210px;right:-110px;opacity:.4;pointer-events:none}
.legal-summary .eyebrow{position:relative}
.legal-doc .legal-checks{position:relative;margin-top:20px;gap:14px}
.legal-doc .legal-checks li{display:flex;align-items:baseline;gap:14px;color:var(--text);font-size:15.5px;line-height:1.55}
.legal-doc .legal-checks li strong{color:var(--blue-soft)}

/* numbered sections — divider rhythm of the FAQ list, badge of the step cards */
.legal-sec{margin-top:52px;padding-top:48px;border-top:1px solid var(--line)}
.legal-sec h2{display:flex;align-items:center;gap:16px;font-size:28px;font-weight:600;letter-spacing:-.6px;
  line-height:1.12;margin-bottom:20px;scroll-margin-top:100px}
.legal-num{flex:none;width:40px;height:40px;display:grid;place-items:center;
  background:rgba(52,120,246,.12);border:1px solid rgba(52,120,246,.35);border-radius:12px;
  color:var(--blue-soft);font-size:15px;font-weight:600;letter-spacing:0}
.legal-sec h3{font-size:20px;font-weight:500;letter-spacing:-.3px;line-height:1.25;margin:32px 0 12px}
.legal-h3-num{color:var(--blue);font-weight:600;margin-right:4px}

/* bullet lists — small blue dot with soft halo */
.legal-list{display:flex;flex-direction:column;gap:10px;margin:14px 0 18px}
.legal-list:last-child{margin-bottom:0}
.legal-list li{position:relative;padding-left:24px}
.legal-list li::before{content:'';position:absolute;left:3px;top:calc(.85em - 3px);width:6px;height:6px;border-radius:50%;
  background:var(--blue);box-shadow:0 0 0 3px rgba(52,120,246,.16)}

/* tables — panel card, uppercase form-label headings */
.legal-table{margin:18px 0 22px;border:1px solid var(--line);border-radius:18px;background:var(--panel);overflow-x:auto}
.legal-table:last-child{margin-bottom:0}
.legal-table table{width:100%;min-width:600px;border-collapse:collapse}
.legal-table th{text-align:left;padding:15px 18px;background:rgba(52,120,246,.08);border-bottom:1px solid var(--line);
  color:var(--muted);font-size:11px;font-weight:500;letter-spacing:.8px;text-transform:uppercase}
.legal-table td{vertical-align:top;padding:16px 18px;border-bottom:1px solid var(--line);color:var(--muted);font-size:14px;line-height:1.55}
.legal-table th+th,.legal-table td+td{border-left:1px solid var(--line)}
.legal-table tbody tr:last-child td{border-bottom:0}
.legal-table td:first-child{color:var(--text);font-weight:500}
.legal-table tbody tr{transition:background .25s}
.legal-table tbody tr:hover{background:rgba(52,120,246,.04)}

/* closing note */
.legal-end{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 24px;
  margin-top:60px;padding:24px 28px;background:var(--panel);border:1px solid var(--line);border-radius:20px}
.legal-end p{margin:0;font-size:15px}
.legal-end p:last-child{color:var(--faint);font-size:12px}

/* ==========================================================================
   RESPONSIVE — same breakpoints as styles.css
   ========================================================================== */
@media(max-width:1239px){
  .legal-hero{padding:150px 0 64px}
  .legal-title{font-size:clamp(42px,6vw,64px)}
  .legal-layout{grid-template-columns:250px minmax(0,1fr);gap:0 56px}
}

@media(max-width:1080px){
  .legal-layout{grid-template-columns:1fr;gap:36px;margin-top:48px}
  .legal-aside{position:static}
  .legal-doc{max-width:none}
  .legal-toc{padding:20px 22px}
  .legal-toc-head{padding:0}
  .legal-toc-panel{overflow:hidden;transition:max-height .45s var(--ease)}
  .legal-toc-list{max-height:none;overflow:visible;padding:16px 0 4px;columns:2;column-gap:32px}
  /* collapsible on tablet / mobile when JS is available (html.legal-js is
     set in <head>, so the list never flashes open before js/legal.js runs) */
  .legal-js .legal-toc-panel{max-height:0}
  .legal-js .legal-toc-head{cursor:pointer}
  .legal-js .legal-toc .faq-ico{display:grid}
  .legal-toc.open .faq-ico{background:var(--blue);border-color:var(--blue)}
  .legal-toc.open .faq-ico .ico-plus{opacity:0;transform:rotate(90deg) scale(.5)}
  .legal-toc.open .faq-ico .ico-cross{opacity:1;transform:rotate(0) scale(1)}
}

@media(max-width:720px){
  .legal-hero{padding:128px 0 46px}
  .legal-title{font-size:clamp(38px,10.8vw,46px);letter-spacing:-1.4px;line-height:1.02}
  .legal-glow-deep{width:280px;height:520px;top:-250px;right:-24%}
  .legal-glow-blue{width:210px;height:480px;top:-290px;right:-48%;opacity:.65}

  .legal-band-in{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:10px;padding:20px 0}
  .legal-meta{font-size:14px}

  .legal-layout{margin-top:36px;gap:28px}
  .legal-toc-list{columns:1}

  .legal-lead p{font-size:16px}
  .legal-doc p,.legal-doc li{font-size:15px}
  .legal-summary{margin-top:32px;padding:28px 22px;border-radius:24px}
  .legal-doc .legal-checks li{font-size:15px}

  .legal-sec{margin-top:40px;padding-top:36px}
  .legal-sec h2{gap:14px;font-size:22px;letter-spacing:-.4px;margin-bottom:16px;scroll-margin-top:90px}
  .legal-num{width:36px;height:36px;border-radius:11px;font-size:14px}
  .legal-sec h3{font-size:18px;margin-top:26px}

  /* tables become stacked cards — no sideways scrolling on phones */
  .legal-table{border:0;border-radius:0;background:none;overflow:visible}
  .legal-table table{min-width:0}
  .legal-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .legal-table table,.legal-table tbody,.legal-table tr,.legal-table td{display:block;width:100%}
  .legal-table tbody tr{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:4px 18px;margin-bottom:12px}
  .legal-table tbody tr:last-child{margin-bottom:0}
  .legal-table tbody tr:hover{background:var(--panel)}
  .legal-table td,.legal-table td+td,.legal-table tbody tr:last-child td{padding:12px 0;border-left:0;border-bottom:1px solid var(--line)}
  .legal-table tbody tr td:last-child{border-bottom:0}
  .legal-table td::before{content:attr(data-label);display:block;margin-bottom:4px;color:var(--faint);
    font-size:11px;font-weight:500;letter-spacing:.8px;text-transform:uppercase}
  .legal-table td:first-child{font-size:15px}

  .legal-end{flex-direction:column;align-items:flex-start;margin-top:44px;padding:22px}
}

/* ---------- print: clean black-on-white document ---------- */
@media print{
  .nav,.mmenu,.mmenu-backdrop,#progress,.legal-glow,.legal-aside,.footer,.legal-summary-orb{display:none!important}
  body{background:#fff;color:#000}
  body::after{display:none}
  .legal-hero{padding:0 0 12px}
  .legal-band{background:none;border:0}
  .legal-layout{display:block;margin-top:12px}
  .legal-doc p,.legal-doc li,.legal-table td,.legal-doc .legal-checks li{color:#000}
  .legal-doc strong,.legal-doc .legal-checks li strong,.legal-doc a{color:#000}
  .legal-summary,.legal-table,.legal-end{background:none;border-color:#bbb}
  .legal-sec{break-inside:auto;border-color:#ccc}
}
