/* terms.css — based on your current inline CSS (extracted + fixed for mobile header + body padding) */

/* =========================
   Variables
========================= */
:root{
  --bg-page:#03033d;
  --bg-card:#ffffff;

  --text-main:#111111;
  --text-muted:#555c6b;

  --accent:#0050ff;
  --border-soft:rgba(0,0,0,.12);

  --max-width:980px;
  --header-bg:#afc3ff;

  /* Layout tuning */
  --page-pad:12px;          /* "bargain" around page */
  --header-h:78px;          /* desktop header offset */
  --header-h-mobile:130px;  /* mobile header offset (wrap) */
  --mobilebar-gap:7.5rem;   /* content bottom space when mobile bar is visible */
}

/* =========================
   Base / Reset
========================= */
*{ box-sizing:border-box; }

html,body{ height:100%; }

body{
  margin:0;
  padding:var(--page-pad);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg-page);
  color:var(--text-main);
  line-height:1.7;
  -webkit-font-smoothing:antialiased;

  /* prevents horizontal jiggle on some mobiles */
  overflow-x:hidden;
}

/* =========================
   Layout
========================= */
.page-wrap{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* Fixed header */
.site-header{
  background:var(--header-bg);
  border-bottom:1px solid var(--border-soft);
  position:fixed;
  top:0; left:0; right:0;
  z-index:10;
}

.header-inner{
  max-width:var(--max-width);
  margin:0 auto;
  padding:.75rem 1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}

/* Main content needs offset due to fixed header */
main{
  flex:1;
  padding-top:var(--header-h);
}

.content{
  max-width:var(--max-width);
  margin:1.5rem auto 2.5rem;
  padding:1.5rem 1rem;
}

/* Card container */
.card{
  background:var(--bg-card);
  border-radius:16px;
  padding:1.75rem 1.5rem;
  box-shadow:0 10px 30px rgba(0,0,0,.04);
  border:1px solid rgba(0,0,0,.04);
}

/* Desktop spacing */
@media (min-width:768px){
  .content{ padding:2rem 1.5rem; }
  .card{ padding:2rem; }
}

/* =========================
   Header content
========================= */
.brand{
  display:flex;
  flex-direction:column;
  gap:.15rem;
}

.brand-title{
  font-size:1.05rem;
  font-weight:650;
  letter-spacing:.02em;
}

.brand-sub{
  font-size:.8rem;
  color:var(--text-muted);
}

.tag{
  font-size:.75rem;
  padding:.15rem .5rem;
  border-radius:999px;
  border:1px solid var(--border-soft);
  color:var(--text-muted);
  white-space:nowrap;
}

.doc-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
}

/* Header mobile behavior */
@media (max-width:768px){
  .tag{ display:none; }
  .doc-actions{ width:100%; justify-content:flex-start; }
  main{ padding-top:var(--header-h-mobile); }
}

/* =========================
   Typography
========================= */
h1,h2,h3{
  line-height:1.3;
  margin-top:0;
  color:#111;
}

h1{
  font-size:1.6rem;
  margin-bottom:.25rem;
}

.updated{
  font-size:.85rem;
  color:#000;
  margin-bottom:1rem;
}

h2{
  font-size:1.15rem;
  margin-top:2rem;
  margin-bottom:.5rem;
  padding-top:1.5rem;
  border-top:1px solid var(--border-soft);
}

h3{
  font-size:1rem;
  margin-top:1.2rem;
  margin-bottom:.35rem;
}

p{
  margin:0 0 .8rem;
  font-size:.95rem;
}

ul,ol{
  padding-left:1.25rem;
  margin-top:.2rem;
  margin-bottom:.9rem;
}

li{
  margin-bottom:.35rem;
  font-size:.95rem;
}

@media (min-width:900px){
  h1{ font-size:1.9rem; }
  p,li{ font-size:1rem; }
}

/* Links */
a{
  color:#0a83ed;
  text-decoration:none;
}
a:hover{ text-decoration:underline; }

/* =========================
   TOC
========================= */
.toc{
  margin-bottom:1.25rem;
  padding:.9rem;
  border-radius:12px;
  background:#fafafa;
  border:1px solid var(--border-soft);
}

.toc-title{
  font-size:.9rem;
  font-weight:650;
  margin-bottom:.4rem;
}

.toc ul{
  list-style:none;
  padding-left:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
}

.toc a{
  font-size:.82rem;
  padding:.25rem .6rem;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--border-soft);
  display:inline-block;
  text-decoration:none;
}

.toc a:hover{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
  text-decoration:none;
}

/* =========================
   Sections
========================= */
.section-label{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--text-muted);
  margin-bottom:.2rem;
}

section[id^="section-"]{
  scroll-margin-top:90px;
}

/* =========================
   Bank details
========================= */
.bank-details{ margin:.75rem 0 .25rem; }
.bank-details summary{ cursor:pointer; font-weight:650; }
.bank-details ul{ margin-top:.6rem; }

/* =========================
   Buttons
========================= */
.btn{
  appearance:none;
  border:1px solid var(--border-soft);
  background:#fff;
  color:var(--text-main);
  border-radius:999px;
  padding:.55rem .85rem;
  font-size:.9rem;
  line-height:1.1;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  min-height:44px;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}

.btn:hover{
  background:#f6f7ff;
  text-decoration:none;
}

.btn:focus-visible{
  outline:3px solid rgba(0,80,255,.35);
  outline-offset:2px;
}

.btn-primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.btn-primary:hover{
  background:#003fd6;
  border-color:#003fd6;
}

.btn-ghost{ background:#fff; }

/* =========================
   Footer
========================= */
footer{
  border-top:1px solid var(--border-soft);
  background:#fff;
  padding:1rem 1rem 1.5rem;
  font-size:.8rem;
  color:var(--text-muted);
}

.footer-inner{
  max-width:var(--max-width);
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:.4rem;
}

.footer-bottom{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.5rem;
  justify-content:space-between;
}

.made-by{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
}

.heart{ font-size:.8rem; }

/* =========================
   Back to top
========================= */
.back-to-top{
  position:fixed;
  bottom:1rem;
  right:1rem;
  border:none;
  border-radius:999px;
  padding:.4rem .8rem;
  font-size:.8rem;
  background:#fff;
  color:var(--text-main);
  box-shadow:0 4px 16px rgba(0,0,0,.1);
  cursor:pointer;
  display:none;
  align-items:center;
  gap:.25rem;
  z-index:20;
}

.back-to-top.show{ display:inline-flex; }

/* =========================
   Accessibility
========================= */
.skip-link{
  position:absolute;
  left:-999px;
  top:.5rem;
  background:#fff;
  color:#000;
  padding:.5rem .75rem;
  border-radius:10px;
  z-index:50;
  border:1px solid var(--border-soft);
}
.skip-link:focus{ left:.75rem; }

/* =========================
   Mobile bottom bar
========================= */
.mobile-bar{
  position:fixed;
  left:0; right:0; bottom:0;
  padding:.6rem .8rem calc(.6rem + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  border-top:1px solid var(--border-soft);
  display:flex;
  gap:.5rem;
  justify-content:center;
  z-index:25;
}

.mobile-bar .btn{
  flex:1;
  max-width:240px;
}

@media (min-width:900px){
  .mobile-bar{ display:none; }
}

/* Reserve space for the mobile bar so content isn't hidden */
@media (max-width:768px){
  .content{ margin-bottom:var(--mobilebar-gap); }
}

/* =========================
   Print
========================= */
@media print{
  body{ background:#fff; padding:0; }
  .site-header,.back-to-top,.mobile-bar,.toc{ display:none !important; }
  .content{ margin:0; padding:0; }
  .card{ box-shadow:none; border:none; }
  a{ color:#000; text-decoration:underline; }
}

/* Mobile: keep footer visible above the fixed bottom bar */
@media (max-width: 900px) {
  footer{
    padding-bottom: calc(1.5rem + 90px + env(safe-area-inset-bottom));
  }
}


@media print {
  .site-header,
  .doc-actions,
  .mobile-bar,
  .back-to-top,
  .skip-link {
    display: none !important;
  }

  .page-wrap {
    padding: 0 !important;
    margin: 0 !important;
  }
}

@media print {
  .site-header, .doc-actions, .mobile-bar, .back-to-top, footer, .skip-link { display:none !important; }
  body { background:#fff !important; }
  .page-wrap { margin:0 !important; padding:0 !important; }
}

.is-embed #printBtn { display:none !important; }