/* ===========================================================================
   RELENTIX — legal pages (privacy.html, terms.html)

   Loaded after the pages' own styles. It fixes how the two documents behave
   rather than how they look:

   - The content column was a `1fr` grid track, which is `minmax(auto,1fr)`: a
     table with a no-wrap first column set the track's minimum, so the whole
     page measured 430-460px on a 375px phone and scrolled sideways. The track
     is now allowed to shrink.
   - Tables read as stacked cards on a phone, each cell carrying its column
     name (`data-label`), instead of three or four cramped columns.
   - The 13-link contents list was a full screen of links above the first line
     of the policy on a phone. It is a single scrolling row there.
   - Email addresses and phone numbers are links.
   =========================================================================== */

.page-layout{grid-template-columns:260px minmax(0,1fr)}
.content{min-width:0}

/* email and phone links inside the body copy */
.legal-link,.sidebar-contact{
  color:var(--ap-acc,#7CCBFF);
  text-decoration:underline;
  text-decoration-color:rgba(124,203,255,.35);
  text-decoration-thickness:1px;
  text-underline-offset:3px;
  transition:text-decoration-color .3s,color .3s;
  overflow-wrap:anywhere;
}
.legal-link:hover,.sidebar-contact:hover{color:#fff;text-decoration-color:currentColor}
.sidebar-contact{display:inline-block}

@media(max-width:900px){
  .page-layout{grid-template-columns:minmax(0,1fr)}

  /* contents: one scrolling row */
  .sidebar{overflow:visible;padding:20px 0 16px}
  .sidebar-title{padding:0 20px;margin-bottom:12px}
  .sidebar-links{
    flex-direction:row;gap:8px;
    overflow-x:auto;padding:0 20px 6px;
    scrollbar-width:none;-webkit-overflow-scrolling:touch;
  }
  .sidebar-links::-webkit-scrollbar{display:none}
  .sidebar-link{
    flex:0 0 auto;display:inline-flex;align-items:center;
    min-height:44px;margin:0;padding:0 14px;
    white-space:nowrap;
    border:1px solid var(--ap-line,rgba(255,255,255,.11));
    border-radius:10px;
  }
  .sidebar-link:hover{padding-left:14px}
  .sidebar-footer{display:none}
}

@media(max-width:700px){
  /* tables: one card per row */
  .data-table,.amt-table{
    display:block;width:100%;
    border:0;border-radius:0;background:none;overflow:visible;
  }
  .data-table thead,.amt-table thead{
    position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);
  }
  .data-table tbody,.amt-table tbody{display:block}
  .data-table tr,.amt-table tr{
    display:block;margin-bottom:10px;overflow:hidden;
    border:1px solid var(--ap-line,rgba(255,255,255,.11));
    border-radius:18px;background:var(--ap-surf,#071230);
  }
  .data-table td,.amt-table td{
    display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;align-items:start;
    width:auto;padding:12px 18px;
    white-space:normal;
    border-bottom:1px solid var(--ap-line2,rgba(255,255,255,.07));
  }
  .data-table tr:last-child td,.amt-table tr:last-child td{border-bottom:1px solid var(--ap-line2,rgba(255,255,255,.07))}
  .data-table td:last-child,.amt-table td:last-child{border-bottom:0}
  .data-table td:first-child{width:auto;white-space:normal}
  .data-table td::before,.amt-table td::before{
    content:attr(data-label);
    padding-top:5px;
    font-family:var(--font-mono,monospace);font-size:9.5px;font-weight:500;
    letter-spacing:.16em;text-transform:uppercase;
    color:var(--ap-mut,#7C8AA0);
  }
}

@media(max-width:560px){
  /* label above the text rather than squeezing it into half the card */
  .clause{grid-template-columns:minmax(0,1fr);gap:8px;padding:20px 20px}
  .clause-n{white-space:normal}
  .compliance-badge{display:flex;align-items:flex-start;padding:12px 16px}
  .badge-dot{margin-top:5px}
  .badge-text{line-height:1.5;letter-spacing:.1em}
  .page-meta{gap:22px 28px}
}

/* ------------------------------------------------------------------- hero
   cinematic.css centres the inner-page hero and sets its side padding to 0,
   because services and team put a `.wrap` inside it. These two have no wrap,
   so the title, dates and badge ran to the edge of the phone. Give the hero
   its own gutter and centre the whole stack, not just the text. */
.page-hero{padding-inline:clamp(22px,5vw,72px)}
.page-hero-inner{margin-inline:auto;width:100%}
.page-hero .eyebrow{justify-content:center}
.page-hero .page-subtitle{margin-inline:auto}
.page-hero .page-meta{justify-content:center}

/* ===========================================================================
   Document layout (body.legal)
   A quiet, editorial reading page: one plain header with only the
   "last updated" date, a slim contents rail, a ~68ch reading column,
   sections divided by hairlines, clauses as ruled rows instead of cards.
   =========================================================================== */
body.legal{
  --lg-bg:#050914;
  --lg-ink:#F2F4F8;
  --lg-body:#C3CAD6;
  --lg-soft:#8B95A7;
  --lg-mut:#5F6A7D;
  --lg-line:rgba(255,255,255,.08);
  --lg-acc:#7CCBFF;
  --lg-serif:'EB Garamond',Georgia,serif;
  --lg-mono:'JetBrains Mono',ui-monospace,monospace;
  --lg-max:1120px;
  background:var(--lg-bg);
}

/* header */
.legal .lg-head{
  padding:calc(var(--nav-h) + clamp(56px,9vw,120px)) clamp(20px,5vw,48px) clamp(48px,6vw,72px);
  border-bottom:1px solid var(--lg-line);
}
.legal .lg-head-in{max-width:var(--lg-max);margin:0 auto;padding-left:calc(220px + clamp(40px,6vw,96px))}
.legal .lg-kicker{
  font-family:var(--lg-mono);font-size:12px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--lg-soft);margin:0 0 20px;
}
.legal .lg-title{
  font-family:var(--lg-serif);font-weight:500;
  font-size:clamp(44px,6vw,76px);line-height:1.05;letter-spacing:-.02em;
  color:var(--lg-ink);margin:0 0 24px;text-transform:none;
}
.legal .lg-lede{font-size:18px;line-height:1.65;color:var(--lg-body);max-width:60ch;margin:0 0 32px}
.legal .lg-updated{font-family:var(--lg-mono);font-size:13px;color:var(--lg-soft);margin:0}
.legal .lg-updated time{color:var(--lg-ink)}

/* two-column body */
.legal .page-layout{
  display:grid;grid-template-columns:220px minmax(0,1fr);gap:clamp(40px,6vw,96px);
  max-width:var(--lg-max);margin:0 auto;padding:0 clamp(20px,5vw,48px);
  background:none;border-radius:0;
}

/* contents rail */
.legal .sidebar{
  position:sticky;top:calc(var(--nav-h) + 24px);align-self:start;
  height:auto;max-height:calc(100vh - var(--nav-h) - 48px);overflow-y:auto;
  padding:56px 0 40px;border:0;background:none;scrollbar-width:none;
}
.legal .sidebar-title{
  font-family:var(--lg-mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--lg-mut);padding:0;margin:0 0 16px;
}
.legal .sidebar-links{gap:0}
.legal .sidebar-link{
  display:block;font-size:14px;font-weight:400;line-height:1.4;color:var(--lg-soft);
  padding:7px 0 7px 14px;margin:0;border:0;border-left:1px solid var(--lg-line);
  border-radius:0;background:none;box-shadow:none;transition:color .2s,border-color .2s;
}
.legal .sidebar-link:hover{color:var(--lg-ink);padding-left:14px;background:none}
.legal .sidebar-link.active{color:var(--lg-ink);border-left-color:var(--lg-acc);background:none;box-shadow:none}
.legal .sidebar-footer{border-top:1px solid var(--lg-line);margin-top:28px;padding-top:20px}
.legal .sidebar-footer p{font-size:13px;line-height:1.55;color:var(--lg-mut)}

/* reading column */
.legal .content{max-width:68ch;padding:56px 0 120px}
.legal .section-block{padding:0 0 48px;margin:0 0 48px;border-bottom:1px solid var(--lg-line);scroll-margin-top:calc(var(--nav-h) + 24px)}
.legal .section-block:last-child{border-bottom:0;margin-bottom:0}
.legal .section-num{
  font-family:var(--lg-mono);font-size:12px;font-weight:400;letter-spacing:.08em;line-height:1;
  color:var(--lg-mut);-webkit-text-stroke:0;opacity:1;margin:0 0 12px;
}
.legal .section-heading{
  font-family:var(--lg-serif);font-weight:500;font-size:clamp(26px,2.6vw,32px);
  line-height:1.2;letter-spacing:-.01em;color:var(--lg-ink);text-transform:none;
  border:0;padding:0;margin:0 0 20px;
}
.legal .section-heading span{font:inherit;font-style:normal;color:inherit;letter-spacing:inherit}
.legal .body-para{font-size:16.5px;line-height:1.75;color:var(--lg-body);margin:0 0 18px}
.legal .body-para strong,.legal .clause-t strong{color:var(--lg-ink);font-weight:600}

/* clauses: ruled rows */
.legal .clause-grid{display:block;gap:0;margin:24px 0;background:none;border-top:1px solid var(--lg-line)}
.legal .clause{
  display:grid;grid-template-columns:160px minmax(0,1fr);gap:24px;
  padding:16px 0;background:none;border:0;border-bottom:1px solid var(--lg-line);
  border-radius:0;box-shadow:none;transform:none;transition:none;
}
.legal .clause:hover{background:none;transform:none;box-shadow:none;border-color:var(--lg-line)}
.legal .clause-n{
  font-family:var(--lg-mono);font-size:12px;letter-spacing:.04em;text-transform:none;
  color:var(--lg-soft);padding-top:4px;white-space:normal;
}
.legal .clause-t{font-size:15.5px;line-height:1.7;color:var(--lg-body)}

/* tables */
.legal .amt-table,.legal .data-table{
  width:100%;margin:24px 0;border-collapse:collapse;border:0;border-radius:0;background:none;
}
.legal .amt-table th,.legal .data-table th{
  background:none;text-align:left;font-family:var(--lg-mono);font-size:11px;font-weight:400;
  letter-spacing:.1em;text-transform:uppercase;color:var(--lg-mut);
  padding:0 16px 12px 0;border-bottom:1px solid var(--lg-line);
}
.legal .amt-table td,.legal .data-table td{
  padding:14px 16px 14px 0;font-size:15px;line-height:1.6;color:var(--lg-body);
  border-bottom:1px solid var(--lg-line);background:none;
}
.legal .amt-table tr:hover td,.legal .data-table tr:hover td{background:none}
.legal .amt-table td.highlight{color:var(--lg-ink);font-family:var(--lg-mono);font-size:14px}

/* notes */
.legal .note-box,.legal .info-box,.legal .warn-box{
  margin:24px 0;padding:4px 0 4px 20px;background:none;
  border:0;border-left:2px solid var(--lg-line);border-radius:0;
}
.legal .warn-box{border-left-color:var(--lg-acc)}
.legal .note-box p,.legal .info-box p,.legal .warn-box p{font-size:15px;line-height:1.7;color:var(--lg-soft);margin:0}
.legal .note-box p strong,.legal .info-box p strong,.legal .warn-box p strong{color:var(--lg-ink)}

/* rights: simple two-column list */
.legal .rights-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 32px;margin:24px 0;background:none;border-top:1px solid var(--lg-line)}
.legal .right-cell{padding:18px 0;background:none;border:0;border-bottom:1px solid var(--lg-line);border-radius:0;transform:none}
.legal .right-cell:hover{background:none;transform:none;border-color:var(--lg-line)}
.legal .right-title{font-size:15.5px;color:var(--lg-ink);font-weight:600;margin-bottom:6px}
.legal .right-body{font-size:14.5px;line-height:1.6;color:var(--lg-soft)}

.legal .legal-link{color:var(--lg-ink);text-decoration-color:rgba(255,255,255,.3)}
.legal .legal-link:hover{color:var(--lg-acc)}

/* footer sits flush instead of overlapping a rounded sheet */
.legal footer{margin-top:0}

@media(max-width:900px){
  .legal .lg-head-in{padding-left:0}
  .legal .page-layout{grid-template-columns:minmax(0,1fr);gap:0}
  .legal .sidebar{position:relative;top:0;max-height:none;padding:28px 0 8px;border-bottom:1px solid var(--lg-line)}
  .legal .sidebar-links{flex-direction:row;gap:6px;overflow-x:auto;padding:0 0 12px}
  .legal .sidebar-link{flex:0 0 auto;border:1px solid var(--lg-line);border-radius:6px;padding:8px 12px;min-height:0;white-space:nowrap}
  .legal .sidebar-link:hover{padding-left:12px}
  .legal .sidebar-link.active{border-color:var(--lg-acc)}
  .legal .content{max-width:none;padding:40px 0 88px}
}
@media(max-width:560px){
  .legal .lg-lede{font-size:16.5px}
  .legal .clause{grid-template-columns:minmax(0,1fr);gap:4px}
  .legal .rights-grid{grid-template-columns:1fr}
  .legal .data-table tr,.legal .amt-table tr{border-radius:8px;background:none}
}
.legal .sidebar::-webkit-scrollbar{display:none}

/* ------------------------------------------------- desktop split hero
   On wide screens the centred stack read as a poster, not a document.
   Title and patch hold the left column; the summary, dates and badge sit
   in a ruled right column, bottom-aligned with the title. Phones keep the
   centred stack above. */
@media (min-width:1024px){
  .page-hero{text-align:left;min-height:0;padding:calc(var(--nav-h) + clamp(80px,9vw,128px)) clamp(40px,5vw,80px) clamp(110px,10vw,150px)}
  .page-hero-inner{
    max-width:1400px;margin-inline:auto;
    display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
    column-gap:clamp(48px,6vw,112px);align-items:end;
  }
  .page-hero .eyebrow{grid-column:1/-1;justify-content:flex-start;margin-bottom:clamp(28px,3vw,44px)}
  .page-hero h1.page-title{grid-column:1;grid-row:2 / span 3;margin:0;max-width:none;font-size:clamp(64px,7.4vw,128px);text-wrap:wrap}
  .page-hero h1.page-title::after{margin:clamp(30px,3vw,44px) 0 0;background:linear-gradient(90deg,var(--brass,#00A3FF),transparent)}
  .page-hero .page-subtitle,.page-hero .page-meta{grid-column:2;margin-inline:0;padding-left:clamp(24px,2.4vw,40px);border-left:1px solid rgba(124,203,255,.18)}
  .page-hero .page-subtitle{grid-row:2;max-width:46ch;margin:0;padding-bottom:28px}
  .page-hero .page-meta{grid-row:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 28px;justify-content:start;margin:0;padding-top:24px;padding-bottom:4px;border-top:0;text-align:left}
  .page-hero .compliance-badge{grid-row:4;justify-self:start;grid-column:2;margin:22px 0 0 clamp(24px,2.4vw,40px)}
}

/* ------------------------------------------------- footer joins the page
   The inline sheet gave the footer its own rounded top and a -44px pull,
   so it read as a second card stacked on the document. It now continues
   the reading surface, divided only by the brand hairline. */
footer#footer{margin-top:0;border-radius:0;z-index:auto;background:radial-gradient(70% 160% at 85% 0%,rgba(0,163,255,.08),transparent 65%),var(--ap-bg,#020617)}
.page-layout{padding-bottom:clamp(24px,3vw,48px)}
.page-layout .sidebar{align-self:start}

/* ------------------------------------------------- hero fills the first screen
   Opening the page now shows the whole hero and nothing else: the title on
   the left, summary and date on the right, both centred on the screen's
   height. The contents and sections begin on the next scroll. */
@media (min-width:1024px){
  .page-hero{min-height:100svh;display:flex;align-items:center;padding-block:calc(var(--nav-h) + 32px) 80px}
  .page-hero-inner{flex:1;align-items:center}
  .page-hero h1.page-title{grid-row:1 / span 2}
  .page-hero .page-subtitle{grid-row:1;align-self:end}
  .page-hero .page-meta{grid-row:2;align-self:start;grid-template-columns:1fr}
  .page-layout{margin-top:0}
}

/* heavier contact email and underlined phrases in the hero summary */
.sidebar-contact{font-weight:700;color:#A8DCFF;font-size:13px;letter-spacing:0;white-space:nowrap;word-break:normal;overflow-wrap:normal}
.page-hero .page-subtitle .ul{font-weight:600;color:#F8FAFC}

/* ------------------------------------------------- phone: one screen, then the document
   The hero owns the whole first screen (nothing of the document peeks up
   under it); the contents and sections begin on the first scroll. The
   contents row then stays pinned under the bar for the whole read, so any
   of the sections is one tap away, and the active one slides into view. */
@media(max-width:900px){
  .page-hero{
    min-height:100svh;display:flex;align-items:center;justify-content:center;
    padding:calc(var(--nav-h,72px) + 24px) 22px 72px;
  }
  .page-hero-inner{width:100%}
  .page-layout{margin-top:0;border-radius:0}

  .sidebar,.legal .sidebar{
    position:sticky;top:62px;z-index:30;
    padding:10px 0;margin:0;
    border-bottom:1px solid rgba(255,255,255,.08);
    background:rgba(2,6,23,.94);
    -webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%);
  }
  .sidebar-title{display:none}
  .sidebar-links{padding:0 20px;gap:8px;scroll-padding-inline:20px}
  .sidebar-link{min-height:40px;padding:0 14px;font-size:14px}
  .sidebar-link.active{
    color:#020617;background:var(--ink-pink,#FFABEE);border-color:var(--ink-pink,#FFABEE);box-shadow:none;
  }
  /* jumping to a section clears the bar and the pinned contents */
  .section-block{scroll-margin-top:136px}
}

/* Clause cards: every label sits in the same fixed column, so the text of
   each card starts at the same left edge, and the label's first line shares
   a baseline with the first line of text. Phones keep the stacked layout. */
@media(min-width:561px){
  .clause{grid-template-columns:168px minmax(0,1fr);column-gap:28px;align-items:baseline}
  .clause-n{white-space:normal;padding-top:0;line-height:1.6}
}
