/* ============================================================
   LEGAL PAGES - terms/ and refund-policy/
   Loaded after style.css and built on its tokens, nav and footer.
   A document layout: title block, a summary table that links to
   every section, then the full text at a reading measure.
   ============================================================ */
body.legal{padding-top:clamp(92px,13vh,132px);}

.doc{max-width:var(--max);margin:0 auto;padding:0 var(--gutter) var(--gap);}

/* ---- title block ---- */
.doc-head{padding-bottom:clamp(28px,4vh,44px);border-bottom:1px solid var(--line);}
.doc-head h1{font-family:var(--display);font-weight:300;color:var(--t-0);
  font-size:clamp(40px,7vw,88px);line-height:1;letter-spacing:-.036em;margin:14px 0 20px;text-wrap:balance;}
.doc-lead{color:var(--t-2);font-size:clamp(15px,1.5vw,18px);line-height:1.6;max-width:var(--measure);}
.doc-meta{display:flex;flex-wrap:wrap;gap:1px;background:var(--line);border:1px solid var(--line);margin-top:24px;}
.doc-meta>div{flex:1 1 200px;background:var(--s-1);padding:13px 16px;display:flex;flex-direction:column;gap:5px;}
.doc-meta dt{font-family:var(--mono);font-size:9.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--t-3);}
.doc-meta dd{margin:0;font-size:14px;line-height:1.35;color:var(--t-1);}

/* ---- summary table ---- */
.summary{padding:clamp(36px,6vh,64px) 0 0;}
.summary h2,.doc-body h2{font-family:var(--display);font-weight:300;color:var(--t-0);letter-spacing:-.02em;}
.summary h2{font-size:clamp(26px,3.4vw,40px);line-height:1.05;margin-bottom:10px;}
.summary-note{color:var(--t-2);font-size:15px;line-height:1.55;max-width:var(--measure);margin-bottom:22px;}
.summary-table{border:1px solid var(--line);border-radius:var(--r2);overflow:hidden;background:var(--s-2);}
.summary table{width:100%;border-collapse:collapse;}
.summary th,.summary td{text-align:left;vertical-align:top;padding:15px 20px;border-top:1px solid var(--line);
  font-size:15px;line-height:1.55;}
.summary thead th{border-top:0;background:var(--s-1);font-family:var(--mono);font-size:10px;letter-spacing:.2em;
  text-transform:uppercase;color:var(--t-3);font-weight:400;}
.summary tbody th{width:30%;font-weight:400;color:var(--t-1);border-right:1px solid var(--line);}
.summary tbody td{color:var(--t-2);}
.summary tbody th .no{font-family:var(--mono);font-size:11px;letter-spacing:.14em;color:var(--t-3);margin-right:10px;}
.doc a{color:var(--accent);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;}
.doc a:hover{color:var(--accent-hi);}
/* one column on a phone: the section name sits above its description */
@media (max-width:640px){
  .summary thead{display:none;}
  .summary tr,.summary tbody th,.summary td{display:block;width:auto;}
  .summary tbody th{border-right:0;padding-bottom:4px;}
  .summary td{border-top:0;padding-top:0;}
}

/* ---- the document ---- */
.doc-body{max-width:760px;margin-top:clamp(36px,6vh,64px);}
.doc-body section{padding:clamp(28px,4vh,44px) 0;border-top:1px solid var(--line);
  scroll-margin-top:clamp(84px,12vh,120px);}   /* anchors land clear of the fixed nav */
.doc-body h2{font-size:clamp(22px,2.8vw,32px);line-height:1.12;margin-bottom:16px;}
.doc-body h2 .no{font-family:var(--mono);font-size:11px;letter-spacing:.2em;color:var(--accent);margin-right:14px;vertical-align:middle;}
.doc-body p,.doc-body li,.doc-body dd{color:var(--t-2);font-size:16px;line-height:1.65;}
.doc-body p{margin-bottom:14px;}
.doc-body p:last-child{margin-bottom:0;}
.doc-body .cl{font-family:var(--mono);font-size:12px;letter-spacing:.04em;color:var(--t-3);font-weight:400;margin-right:8px;}
.doc-body ul{margin:0 0 14px 22px;}
.doc-body li{margin-bottom:8px;}
.doc-body li b,.doc-body dt{color:var(--t-1);font-weight:500;}
.doc-body dl{display:grid;grid-template-columns:max-content 1fr;gap:10px 18px;margin-bottom:14px;}
.doc-body dd{margin:0;}
@media (max-width:640px){
  .doc-body dl{grid-template-columns:1fr;gap:4px 0;}
  .doc-body dd{margin-bottom:10px;}
}

/* ---- footer: the base line only ---- */
body.legal footer{padding-top:var(--gutter);}
body.legal .f-base{border-top:0;padding-top:0;}

@media print{
  body.legal{padding-top:0;}
  .nav{display:none;}
  .doc a{color:inherit;text-decoration:none;}
}
