/* PilotTrain legal pages (.ptlg): privacy policy, terms and conditions, exchange and returns.
   One layout for all of them: a short hero, tabs between the documents, a contents list that
   follows the reader on a wide screen and folds away on a phone, and the document itself in a
   comfortable column. The markup is written by legal-mockup/build.py (in the project folder);
   pt-legal.js adds the small behaviours. Nothing here moves or repaints while the page scrolls. */

html{scroll-behavior:smooth;}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto;}}

.ptlg, .ptlg *, .ptlg *::before, .ptlg *::after{box-sizing:border-box;}
.ptlg{
  --ink:#0a1a2b; --text:#3d4c60; --muted:#66768a; --line:#dde5ee; --bg:#f6f8fb; --card:#fff;
  --blue:#2f7bf0; --blue-dk:#1f5fcc; --a:#5d8ce6; --b:#a9c8f5; --navy:#071320;
  --dline:rgba(255,255,255,.12); --dtext:#cfdbe8; --ddim:#9fb3c8;
  width:100%; background:var(--bg); color:var(--text);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased;
}

/* ---------- hold our own against the theme's global rules ---------- */
.ptlg h1, .ptlg h2, .ptlg h3, .ptlg p, .ptlg ul, .ptlg ol, .ptlg li, .ptlg address{margin:0; padding:0;}
.ptlg h1, .ptlg h2, .ptlg h3{font-family:inherit; text-transform:none; border:0; background:none;}
.ptlg h1::before, .ptlg h1::after, .ptlg h2::before, .ptlg h2::after, .ptlg h3::before, .ptlg h3::after{content:none; display:none;}
.ptlg ul, .ptlg ol, .ptlg li{list-style:none;}
.ptlg address{font-style:normal;}
.ptlg svg{display:block;}
.ptlg a, .ptlg a:hover, .ptlg a:focus, .ptlg a:visited{text-decoration:none; color:inherit;}
.ptlg summary{list-style:none; cursor:pointer;}
.ptlg summary::-webkit-details-marker{display:none;}
/* the site header stays at the top of the screen (about 102px tall on a phone, 112px on a wide
   screen): a section that is jumped to stops with its heading clear of it */
.ptlg [id]{scroll-margin-top:100px;}
.ptlg a:focus-visible, .ptlg summary:focus-visible{outline:3px solid var(--a); outline-offset:3px; border-radius:6px;}

/* =============================================================
   1. HERO
   ============================================================= */
.ptlg .ptlg-hero{
  position:relative; text-align:center; color:#e9f1f8; padding:44px 16px 0;
  background:
    radial-gradient(80% 110% at 50% -30%, rgba(47,123,240,.34), rgba(47,123,240,0) 64%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0/28px 28px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0/28px 28px,
    var(--navy);
}
.ptlg .ptlg-hero-in{max-width:760px; margin:0 auto;}
.ptlg .ptlg-pill{
  display:inline-flex; align-items:center; gap:7px; padding:6px 13px; border-radius:999px;
  font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; line-height:1.2; color:var(--b);
  border:1px solid var(--dline); background:rgba(255,255,255,.05);
}
.ptlg .ptlg-pill svg{width:14px; height:14px;}
.ptlg .ptlg-hero h1{
  margin:18px 0 0; font-size:clamp(30px,6.6vw,52px); font-weight:800; letter-spacing:-.028em; line-height:1.08; color:#fff;
  text-wrap:balance;
}
.ptlg .ptlg-grad{background:linear-gradient(90deg,var(--a),var(--b)); -webkit-background-clip:text; background-clip:text; color:transparent;}
.ptlg .ptlg-sub{max-width:540px; margin:14px auto 0; font-size:clamp(15px,2vw,17.5px); line-height:1.55; color:var(--ddim); text-wrap:balance;}
.ptlg ul.ptlg-meta{display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:20px 0 0;}
.ptlg ul.ptlg-meta li{
  display:inline-flex; align-items:center; gap:7px; padding:6px 12px; border-radius:999px;
  font-size:13px; font-weight:600; line-height:1.2; color:var(--dtext);
  border:1px solid var(--dline); background:rgba(255,255,255,.04);
}
.ptlg ul.ptlg-meta svg{width:14px; height:14px; color:var(--a);}

/* ---------- the documents, as tabs along the hero's lower edge ---------- */
.ptlg .ptlg-tabs{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px;
  max-width:720px; margin:30px auto 0; padding:0 4px;
}
.ptlg a.ptlg-tab{
  display:flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:0 10px;
  border-radius:12px 12px 0 0; border:1px solid var(--dline); border-bottom:0;
  font-size:14.5px; font-weight:700; line-height:1.2; color:var(--dtext); background:rgba(255,255,255,.05);
  transition:background .16s ease, color .16s ease;
}
.ptlg a.ptlg-tab:hover{background:rgba(255,255,255,.12); color:#fff;}
.ptlg a.ptlg-tab svg{flex:none; width:16px; height:16px; opacity:.85;}
.ptlg a.ptlg-tab[aria-current="page"], .ptlg a.ptlg-tab[aria-current="page"]:hover{background:var(--bg); border-color:var(--bg); color:var(--ink);}
.ptlg a.ptlg-tab[aria-current="page"] svg{color:var(--blue); opacity:1;}
.ptlg .ptlg-tab-l{display:none;}

/* =============================================================
   2. THE CONTENTS AND THE DOCUMENT
   ============================================================= */
.ptlg .ptlg-body{
  max-width:1200px; margin:0 auto; display:grid; grid-template-columns:minmax(0,1fr);
  border-left:1px solid var(--line); border-right:1px solid var(--line);
}

/* ---------- contents: a fold-away box on a phone ---------- */
.ptlg .ptlg-side-in{padding:20px 16px 0;}
.ptlg .ptlg-toc{border:1px solid var(--line); border-radius:14px; background:var(--card); overflow:hidden;}
.ptlg .ptlg-toc summary{
  display:flex; align-items:center; gap:10px; padding:14px 16px;
  font-size:12px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--blue-dk);
}
.ptlg .ptlg-toc summary em{
  margin-left:auto; font-style:normal; font-size:12.5px; font-weight:600; letter-spacing:0; text-transform:none; color:var(--muted);
}
.ptlg .ptlg-toc summary svg{flex:none; width:18px; height:18px; color:var(--muted); transition:transform .2s ease;}
.ptlg .ptlg-toc[open] summary svg{transform:rotate(180deg);}
.ptlg .ptlg-toc ol{counter-reset:ptlg-toc; padding:4px 8px 10px; border-top:1px solid var(--line);}
.ptlg .ptlg-toc li{counter-increment:ptlg-toc;}
.ptlg .ptlg-toc li a{
  display:flex; gap:10px; align-items:baseline; padding:9px 10px; border-radius:9px;
  font-size:15px; font-weight:500; line-height:1.35; color:var(--text);
  transition:background .14s ease, color .14s ease;
}
.ptlg .ptlg-toc li a::before{
  content:counter(ptlg-toc); flex:none; width:20px; text-align:right;
  font-size:12.5px; font-weight:700; font-variant-numeric:tabular-nums; color:#8a99ad;
}
.ptlg .ptlg-toc li a:hover{background:#eef3fa; color:var(--ink);}
.ptlg .ptlg-toc li a.is-now{background:rgba(47,123,240,.1); color:var(--blue-dk); font-weight:650;}
.ptlg .ptlg-toc li a.is-now::before{color:var(--blue-dk);}

/* ---------- the document ---------- */
.ptlg .ptlg-doc{min-width:0; padding:26px 20px 52px;}
.ptlg .ptlg-doc > *{max-width:760px;}

.ptlg .ptlg-doc p, .ptlg .ptlg-doc li{font-size:16.5px; line-height:1.7; color:var(--text); overflow-wrap:anywhere;}
.ptlg .ptlg-doc p{margin:14px 0 0;}
.ptlg .ptlg-doc strong{font-weight:700; color:var(--ink);}
.ptlg .ptlg-doc a:not(.ptlg-btn), .ptlg .ptlg-doc a:not(.ptlg-btn):visited{
  color:var(--blue-dk); font-weight:600; text-decoration:underline; text-decoration-color:rgba(47,123,240,.4);
  text-decoration-thickness:1.5px; text-underline-offset:3px;
}
.ptlg .ptlg-doc a:not(.ptlg-btn):hover{color:var(--blue); text-decoration-color:currentColor;}

.ptlg .ptlg-doc ul, .ptlg .ptlg-doc ol{display:grid; gap:8px; margin:14px 0 0;}
.ptlg .ptlg-doc ol{counter-reset:ptlg-li;}
.ptlg .ptlg-doc li{position:relative; padding-left:34px;}
.ptlg .ptlg-doc ol > li{counter-increment:ptlg-li;}
.ptlg .ptlg-doc ol > li::before{
  content:counter(ptlg-li) "."; position:absolute; left:0; top:0; width:24px; text-align:right;
  font-weight:700; font-variant-numeric:tabular-nums; color:#8a99ad;
}
.ptlg .ptlg-doc ul > li::before{
  content:""; position:absolute; left:13px; top:.72em; width:6px; height:6px; border-radius:50%; background:var(--a);
}

/* a summary of the document, three cells and a line of small print */
.ptlg .ptlg-glance{padding:20px 20px 18px; border:1px solid var(--line); border-radius:16px; background:var(--card); box-shadow:0 1px 2px rgba(10,26,43,.04);}
.ptlg .ptlg-glance h2{
  display:flex; align-items:center; gap:9px; margin:0;
  font-size:12px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; line-height:1.3; color:var(--blue-dk);
}
.ptlg .ptlg-glance h2::before{content:""; display:block; flex:none; width:18px; height:2px; border-radius:2px; background:linear-gradient(90deg,var(--blue),var(--b));}
.ptlg .ptlg-doc .ptlg-glance ul{gap:0; margin:6px 0 0;}
.ptlg .ptlg-doc .ptlg-glance li{display:flex; gap:14px; align-items:flex-start; padding:14px 0; border-top:1px solid var(--line);}
.ptlg .ptlg-doc .ptlg-glance li:first-child{border-top:0;}
.ptlg .ptlg-doc .ptlg-glance li::before{content:none;}
.ptlg .ptlg-ic{
  flex:none; width:38px; height:38px; border-radius:11px; display:grid; place-items:center; color:#fff;
  background:linear-gradient(135deg,#2a6fe0,#5d8ce6); box-shadow:0 8px 18px rgba(47,123,240,.26);
}
.ptlg .ptlg-ic svg{width:18px; height:18px;}
.ptlg .ptlg-doc .ptlg-glance li p{margin:0; font-size:15.5px; line-height:1.55;}
.ptlg .ptlg-doc p.ptlg-fine{margin:4px 0 0; padding-top:14px; border-top:1px solid var(--line); font-size:13.5px; line-height:1.55; color:var(--muted);}

.ptlg .ptlg-intro{margin-top:26px;}
.ptlg .ptlg-intro--first{margin-top:0;}
.ptlg .ptlg-intro > p:first-child{margin-top:0;}

/* an address, as a card */
.ptlg address.ptlg-card{
  display:flex; gap:14px; align-items:flex-start; margin:18px 0 0; padding:16px 18px;
  border:1px solid var(--line); border-radius:14px; background:var(--card);
}
.ptlg address.ptlg-card > span{
  flex:none; width:38px; height:38px; border-radius:11px; display:grid; place-items:center;
  color:var(--blue); background:#eef3fa; border:1px solid var(--line);
}
.ptlg address.ptlg-card > span svg{width:18px; height:18px;}
.ptlg .ptlg-doc address.ptlg-card p{margin:0; font-size:15.5px; line-height:1.6;}

/* the sections, numbered */
.ptlg .ptlg-sec{margin-top:36px; padding-top:34px; border-top:1px solid var(--line);}
.ptlg .ptlg-sec h2{
  display:flex; gap:12px; align-items:flex-start; margin:0;
  font-size:clamp(21px,2.5vw,25px); font-weight:800; letter-spacing:-.02em; line-height:1.25; color:var(--ink); text-wrap:balance;
}
.ptlg .ptlg-n{
  flex:none; min-width:30px; height:30px; padding:0 7px; margin-top:.02em; border-radius:9px; display:inline-grid; place-items:center;
  font-size:13.5px; font-weight:800; letter-spacing:0; font-variant-numeric:tabular-nums; color:var(--blue-dk); background:rgba(47,123,240,.11);
}
.ptlg .ptlg-sec h3{margin:26px 0 0; font-size:17.5px; font-weight:700; letter-spacing:-.01em; line-height:1.35; color:var(--ink);}
.ptlg .ptlg-sec h2 + h3{margin-top:18px;}
.ptlg .ptlg-sec h3 + p{margin-top:8px;}

.ptlg a.ptlg-btn, .ptlg a.ptlg-btn:visited{
  display:inline-flex; align-items:center; justify-content:center; gap:8px; height:48px; padding:0 22px; margin-top:6px;
  border-radius:12px; font-size:15.5px; font-weight:700; color:#fff;
  background:linear-gradient(180deg,#3b86f5,#2a6fe0); box-shadow:0 10px 24px rgba(47,123,240,.34);
  transition:transform .16s ease, box-shadow .16s ease;
}
.ptlg a.ptlg-btn:hover{color:#fff; transform:translateY(-2px); box-shadow:0 14px 30px rgba(47,123,240,.46);}
.ptlg a.ptlg-btn svg{width:15px; height:15px;}

.ptlg .ptlg-doc p.ptlg-eff{
  display:flex; align-items:center; gap:9px; margin-top:40px; padding-top:22px; border-top:1px solid var(--line);
  font-size:14px; font-weight:600; color:var(--muted);
}
.ptlg p.ptlg-eff svg{flex:none; width:16px; height:16px; color:var(--a);}

/* =============================================================
   3. THE OTHER DOCUMENTS, AND WHERE TO ASK
   ============================================================= */
.ptlg .ptlg-more{border-top:1px solid var(--line);}
.ptlg .ptlg-more-in{
  max-width:1200px; margin:0 auto; display:grid; grid-template-columns:minmax(0,1fr); gap:1px; background:var(--line);
  border-left:1px solid var(--line); border-right:1px solid var(--line);
}
.ptlg a.ptlg-next{
  position:relative; display:block; padding:24px 70px 24px 22px; background:var(--bg); transition:background .18s ease;
}
.ptlg a.ptlg-next:hover{background:#fff;}
.ptlg .ptlg-next-k{display:block; font-size:12px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; line-height:1.3; color:var(--blue-dk);}
.ptlg a.ptlg-next b{display:block; margin-top:8px; font-size:20px; font-weight:800; letter-spacing:-.02em; line-height:1.25; color:var(--ink);}
.ptlg .ptlg-next-s{display:block; margin-top:4px; font-size:14.5px; line-height:1.45; color:var(--muted);}
.ptlg .ptlg-go{
  position:absolute; right:22px; top:50%; width:34px; height:34px; margin-top:-17px; border-radius:50%; display:grid; place-items:center;
  background:#fff; border:1px solid var(--line); color:var(--muted);
  transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.ptlg .ptlg-go svg{width:15px; height:15px;}
.ptlg a.ptlg-next:hover .ptlg-go{background:var(--blue); border-color:var(--blue); color:#fff; transform:translateX(3px);}

/* back to the top, on a phone, once the reader is well into the document */
.ptlg a.ptlg-up{
  position:fixed; right:14px; bottom:18px; z-index:30; width:46px; height:46px; border-radius:50%; display:grid; place-items:center;
  color:#fff; background:var(--ink); box-shadow:0 10px 24px rgba(10,26,43,.32);
  opacity:0; visibility:hidden; transform:translateY(8px); transition:opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.ptlg a.ptlg-up.is-on{opacity:1; visibility:visible; transform:none; transition:opacity .2s ease, transform .2s ease;}
.ptlg a.ptlg-up svg{width:18px; height:18px;}

/* =============================================================
   WIDER SCREENS
   ============================================================= */
@media (min-width:560px){
  .ptlg .ptlg-tab-s{display:none;}
  .ptlg .ptlg-tab-l{display:inline;}
}
@media (min-width:700px){
  .ptlg .ptlg-hero{padding-top:56px;}
  .ptlg .ptlg-tabs{margin-top:36px;}
  .ptlg a.ptlg-tab{min-height:52px; font-size:15px;}
  .ptlg .ptlg-side-in{padding:28px 32px 0;}
  .ptlg .ptlg-doc{padding:32px 32px 64px;}
  .ptlg .ptlg-more-in{grid-template-columns:repeat(3,minmax(0,1fr));}
  .ptlg a.ptlg-next{padding:30px 66px 30px 28px; min-height:150px;}
  .ptlg .ptlg-go{right:24px;}
}
@media (min-width:860px){
  .ptlg .ptlg-doc .ptlg-glance ul{grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin-top:14px;}
  .ptlg .ptlg-doc .ptlg-glance li{flex-direction:column; gap:12px; padding:2px 20px 4px; border-top:0; border-left:1px solid var(--line);}
  .ptlg .ptlg-doc .ptlg-glance li:first-child{padding-left:0; border-left:0;}
  .ptlg .ptlg-doc .ptlg-glance li:last-child{padding-right:0;}
  .ptlg .ptlg-glance{padding:24px 26px 20px;}
  .ptlg .ptlg-doc p.ptlg-fine{margin-top:18px;}
}
/* two columns: the contents stay put while the document scrolls */
@media (min-width:1000px){
  .ptlg .ptlg-body{grid-template-columns:300px minmax(0,1fr);}
  .ptlg .ptlg-side{border-right:1px solid var(--line);}
  .ptlg .ptlg-side-in{position:sticky; top:112px; max-height:calc(100vh - 124px); overflow:auto; padding:36px 22px 28px 24px; overscroll-behavior:contain;}
  .ptlg .ptlg-toc{border:0; border-radius:0; background:none; overflow:visible;}
  .ptlg .ptlg-toc summary{padding:0 10px 12px; pointer-events:none;}
  .ptlg .ptlg-toc summary svg{display:none;}
  .ptlg .ptlg-toc ol{padding:0; border-top:0;}
  .ptlg .ptlg-toc li a{padding:7px 10px; font-size:14.5px;}
  .ptlg .ptlg-doc{padding:44px 56px 80px;}
  .ptlg a.ptlg-up{display:none;}
}

/* =============================================================
   ON PAPER: the document and nothing else
   ============================================================= */
@media print{
  .pthd, .ptfoot, .site-header, .site-footer, .ptlg .ptlg-tabs, .ptlg .ptlg-side, .ptlg .ptlg-more, .ptlg a.ptlg-up, .ptlg ul.ptlg-meta svg{display:none !important;}
  .ptlg, .ptlg .ptlg-hero{background:#fff !important; color:#000;}
  .ptlg .ptlg-hero{padding:0 0 12pt; text-align:left;}
  .ptlg .ptlg-hero-in{max-width:none; margin:0;}
  .ptlg .ptlg-pill{display:none;}
  .ptlg .ptlg-hero h1{font-size:22pt; color:#000; margin:0;}
  .ptlg .ptlg-grad{background:none; color:#000;}
  .ptlg .ptlg-sub{margin:6pt 0 0; max-width:none; color:#333;}
  .ptlg ul.ptlg-meta{justify-content:flex-start; margin-top:8pt;}
  .ptlg ul.ptlg-meta li{padding:0 12pt 0 0; border:0; background:none; color:#333;}
  .ptlg .ptlg-body{display:block; max-width:none; border:0;}
  .ptlg .ptlg-doc{padding:0;}
  .ptlg .ptlg-doc > *{max-width:none;}
  .ptlg .ptlg-doc p, .ptlg .ptlg-doc li{font-size:10.5pt; line-height:1.5; color:#000;}
  .ptlg .ptlg-glance, .ptlg address.ptlg-card{box-shadow:none; break-inside:avoid;}
  .ptlg .ptlg-ic, .ptlg address.ptlg-card > span{display:none;}
  .ptlg .ptlg-sec{margin-top:14pt; padding-top:12pt;}
  .ptlg .ptlg-sec h2{font-size:14pt; break-after:avoid;}
  .ptlg .ptlg-sec h3{break-after:avoid;}
  .ptlg .ptlg-n{background:none; color:#000; min-width:0; height:auto; padding:0;}
  .ptlg .ptlg-n::after{content:".";}
  .ptlg .ptlg-doc a:not(.ptlg-btn){color:#000; text-decoration:underline;}
  .ptlg a.ptlg-btn{display:none;}
}
