/* ============================================================
   CauseLine Round — marketing site
   Shared shell: tokens, type, header, footer, legal prose.

   Design is lifted from the app, not invented alongside it:
   docs/cll-round-prototype.html — "honest ledger". Ink on warm
   paper, receipt typography, and color reserved for MONEY STATE
   (queued / window / delivered) rather than for decoration.

   Tokens match round/src/theme.ts in scoreside-mobile. Do not
   introduce a tint that is not in that file.
   ============================================================ */

:root{
  --brand:      #4652D7;   /* ScoreSide Secondary Blue */
  --brand-lift: #5F8FFF;   /* ScoreSide Primary Blue */
  --brand-wash: #E8EAFA;
  --yellow:     #FFD51C;   /* the coin and the ceiling — money */
  --butter:     #F2DC93;
  --butter-tile:#F7E7B4;

  --paper:      #FAF6EA;
  --surface:    #FFFCF4;
  --surface-2:  #F0E8D4;
  --rule:       #DFD5BC;
  --rule-soft:  #EBE3D0;

  --ink:        #191A33;
  --ink-2:      #565879;
  --ink-3:      #8D8DA6;

  --queued:     #4652D7;
  --window:     #C0400F;   /* the 3-day window / warnings */
  --delivered:  #0E7049;   /* money that has landed */

  --shadow:  0 1px 2px rgba(25,26,51,.07), 0 8px 24px -12px rgba(25,26,51,.30);
  --shadow-2:0 2px 4px rgba(25,26,51,.08), 0 34px 60px -34px rgba(25,26,51,.48);

  --f-sans: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 1080px;
  --gutter: clamp(20px, 5vw, 34px);
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --brand:      #5F8FFF;
    --brand-lift: #A9B2FF;
    --brand-wash: #23274D;

    --paper:      #0E1024;
    --surface:    #181B36;
    --surface-2:  #23274D;
    --rule:       #2E3358;
    --rule-soft:  #242848;

    --ink:        #EDE7D8;   /* butter-warm text on indigo — light mode inverted */
    --ink-2:      #A2A2BE;
    --ink-3:      #71738F;

    --queued:     #5F8FFF;
    --window:     #FF8A63;
    --delivered:  #46CC8E;

    --shadow:  0 1px 2px rgba(0,0,0,.55), 0 8px 28px -12px rgba(0,0,0,.85);
    --shadow-2:0 2px 4px rgba(0,0,0,.6), 0 34px 64px -34px rgba(0,0,0,.9);
  }
}
:root[data-theme="dark"]{
  --brand:      #5F8FFF;
  --brand-lift: #A9B2FF;
  --brand-wash: #23274D;

  --paper:      #0E1024;
  --surface:    #181B36;
  --surface-2:  #23274D;
  --rule:       #2E3358;
  --rule-soft:  #242848;

  --ink:        #EDE7D8;
  --ink-2:      #A2A2BE;
  --ink-3:      #71738F;

  --queued:     #5F8FFF;
  --window:     #FF8A63;
  --delivered:  #46CC8E;

  --shadow:  0 1px 2px rgba(0,0,0,.55), 0 8px 28px -12px rgba(0,0,0,.85);
  --shadow-2:0 2px 4px rgba(0,0,0,.6), 0 34px 64px -34px rgba(0,0,0,.9);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--f-sans);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
::selection{ background:var(--yellow); color:#191A33; }

img{ max-width:100%; height:auto; }
a{ color:var(--brand); text-decoration-thickness:1px; text-underline-offset:2px; }
a:hover{ color:var(--brand-lift); }
:focus-visible{ outline:2px solid var(--brand); outline-offset:3px; border-radius:4px; }

.wrap{ max-width:var(--measure); margin:0 auto; padding:0 var(--gutter); }
.mono{ font-family:var(--f-mono); font-variant-numeric:tabular-nums; }
.num{ font-variant-numeric:tabular-nums; font-feature-settings:"tnum" 1; }
.skip{
  position:absolute; left:-9999px; top:0; z-index:99;
  background:var(--brand); color:#fff; padding:10px 16px; border-radius:0 0 8px 0;
  font-size:14px; font-weight:600; text-decoration:none;
}
.skip:focus{ left:0; color:#fff; }

/* ---------- the eyebrow: a receipt header, small caps in mono ---------- */
.eyebrow{
  font-family:var(--f-mono); font-size:11px; font-weight:500;
  letter-spacing:.16em; text-transform:uppercase; color:var(--ink-2);
  display:block;
}

/* ---------- tear rules: the site's one repeated ornament ---------- */
.tear{ height:0; border:0; border-top:1px dashed var(--rule); margin:0; }
.rule{ height:0; border:0; border-top:1px solid var(--rule-soft); margin:0; }

/* ---------- masthead ---------- */
.masthead{
  position:sticky; top:0; z-index:40;
  background:color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter:saturate(140%) blur(12px);
  border-bottom:1px dashed var(--rule);
}
.mh{
  max-width:var(--measure); margin:0 auto; padding:12px var(--gutter);
  display:flex; align-items:center; gap:18px;
}
.brand{
  display:flex; align-items:center; gap:11px;
  text-decoration:none; color:var(--ink); font-weight:800;
  font-size:17px; letter-spacing:-.022em; white-space:nowrap;
}
.brand img{ width:32px; height:32px; display:block; }
.brand b{ font-weight:800; }
.brand span{ font-weight:500; color:var(--ink-2); }
.mh-nav{ margin-left:auto; display:flex; align-items:center; gap:clamp(14px,2.4vw,26px); }
.mh-nav a{
  font-size:14px; font-weight:600; color:var(--ink-2); text-decoration:none;
  letter-spacing:-.006em;
}
.mh-nav a:hover{ color:var(--ink); }
@media (max-width:620px){
  .mh-nav a.hide-sm{ display:none; }
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-family:var(--f-sans); font-size:16px; font-weight:600; letter-spacing:-.012em;
  padding:15px 24px; border-radius:14px; border:0; cursor:pointer;
  text-decoration:none; transition:transform .14s, opacity .16s, background .16s, box-shadow .16s;
}
.btn:active{ transform:scale(.985); }
.btn-primary{ background:var(--brand); color:#FFFFFF; box-shadow:0 12px 26px -14px rgba(70,82,215,.85); }
.btn-primary:hover{ color:#fff; opacity:.9; transform:translateY(-1px); }
:root[data-theme="dark"] .btn-primary{ color:#0B0D1E; }
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .btn-primary{ color:#0B0D1E; }
}
.btn-quiet{
  background:transparent; color:var(--ink);
  box-shadow:inset 0 0 0 1.5px var(--rule);
}
.btn-quiet:hover{ background:var(--surface-2); color:var(--ink); }
.btn svg{ width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* ---------- footer ---------- */
.foot{
  margin-top:clamp(56px,8vw,96px);
  border-top:1px dashed var(--rule);
  background:var(--surface);
}
.foot-in{
  max-width:var(--measure); margin:0 auto; padding:38px var(--gutter) 46px;
  display:flex; flex-wrap:wrap; gap:28px 40px; align-items:flex-start;
}
.foot-brand{ display:flex; align-items:center; gap:11px; font-weight:800; letter-spacing:-.022em; }
.foot-brand img{ width:30px; height:30px; }
.foot-links{ display:flex; flex-wrap:wrap; gap:10px 26px; margin-left:auto; }
.foot-links a{
  font-size:14px; font-weight:600; color:var(--ink-2); text-decoration:none;
}
.foot-links a:hover{ color:var(--ink); }
.foot-fine{
  max-width:var(--measure); margin:0 auto; padding:0 var(--gutter) 42px;
  font-family:var(--f-mono); font-size:11.5px; line-height:1.8; color:var(--ink-2);
  letter-spacing:.01em;
}
.foot-fine a{ color:var(--ink-2); }
.foot-fine a:hover{ color:var(--ink); }

/* ============================================================
   Legal pages — privacy.html, terms.html
   Set as a document, not as marketing: one narrow column, real
   hierarchy, and the tables legible on a phone.
   ============================================================ */
.doc{ max-width:760px; margin:0 auto; padding:clamp(34px,6vw,62px) var(--gutter) 0; }
.doc-head{ border-bottom:1px dashed var(--rule); padding-bottom:26px; margin-bottom:34px; }
.doc-head h1{
  font-size:clamp(30px,5.4vw,42px); font-weight:800; letter-spacing:-.032em;
  line-height:1.08; margin:12px 0 0; text-wrap:balance;
}
.doc-head .stamp{
  margin-top:16px; font-family:var(--f-mono); font-size:11.5px; color:var(--ink-2);
  letter-spacing:.04em; display:flex; flex-wrap:wrap; gap:6px 18px;
}
.doc-lede{ font-size:18px; line-height:1.62; color:var(--ink-2); margin:20px 0 0; }
.doc-lede b{ color:var(--ink); font-weight:600; }

.doc h2{
  font-size:20px; font-weight:800; letter-spacing:-.02em; line-height:1.25;
  margin:44px 0 0; padding-top:22px; border-top:1px solid var(--rule-soft);
  display:flex; gap:12px; align-items:baseline;
}
.doc h2 .n{
  font-family:var(--f-mono); font-size:12px; font-weight:500; color:var(--brand);
  letter-spacing:.06em; flex:0 0 auto; padding-top:2px;
}
.doc h3{
  font-size:15.5px; font-weight:700; letter-spacing:-.012em;
  margin:26px 0 0; color:var(--ink);
}
.doc p{ margin:12px 0 0; font-size:15.5px; line-height:1.68; color:var(--ink-2); }
.doc p b, .doc li b{ color:var(--ink); font-weight:600; }
.doc ul{ margin:12px 0 0; padding-left:22px; }
.doc li{ font-size:15.5px; line-height:1.68; color:var(--ink-2); margin-top:8px; }
.doc a{ font-weight:500; }

/* the one thing on a legal page that must not be missable */
.doc-flag{
  margin:20px 0 0; padding:18px 20px; border-radius:14px;
  background:var(--surface); box-shadow:inset 0 0 0 1px var(--rule-soft);
  border-left:4px solid var(--brand);
}
.doc-flag p{ margin:0; color:var(--ink); font-size:15.5px; }
.doc-flag p + p{ margin-top:10px; color:var(--ink-2); }
.doc-flag.warn{ border-left-color:var(--window); }

.doc-table{ margin:20px 0 0; width:100%; border-collapse:collapse; font-size:14.5px; }
.doc-table caption{
  text-align:left; font-family:var(--f-mono); font-size:11px; letter-spacing:.16em;
  text-transform:uppercase; color:var(--ink-2); padding-bottom:10px;
}
.doc-table th, .doc-table td{
  text-align:left; vertical-align:top; padding:12px 14px 12px 0;
  border-top:1px solid var(--rule-soft); line-height:1.55;
}
.doc-table thead th{
  border-top:0; border-bottom:1px solid var(--rule);
  font-family:var(--f-mono); font-size:11px; font-weight:500; letter-spacing:.14em;
  text-transform:uppercase; color:var(--ink-2); padding-bottom:9px;
}
.doc-table td:first-child{ font-weight:600; color:var(--ink); width:42%; }
.doc-table td:last-child{ color:var(--ink-2); padding-right:0; }
@media (max-width:560px){
  .doc-table td:first-child{ width:46%; }
  .doc-table th, .doc-table td{ font-size:14px; padding:11px 10px 11px 0; }
}

/* "does not" list — stated as plainly as the collection is */
.nots{ margin:22px 0 0; padding:0; list-style:none; display:grid; gap:2px; }
.nots li{
  margin:0; padding:15px 18px; background:var(--surface);
  box-shadow:inset 0 0 0 1px var(--rule-soft);
  font-size:15px; color:var(--ink-2); display:flex; gap:14px; align-items:flex-start;
}
.nots li:first-child{ border-radius:14px 14px 0 0; }
.nots li:last-child{ border-radius:0 0 14px 14px; }
.nots li b{ color:var(--ink); font-weight:700; }
.nots li::before{
  content:"NO"; flex:0 0 auto; margin-top:1px;
  font-family:var(--f-mono); font-size:10px; font-weight:500; letter-spacing:.1em;
  color:var(--delivered); background:color-mix(in srgb, var(--delivered) 12%, transparent);
  padding:3px 7px; border-radius:5px;
}

.doc-toc{
  margin:26px 0 40px; padding:20px 22px; border-radius:16px;
  background:var(--surface); box-shadow:inset 0 0 0 1px var(--rule-soft);
}
.doc-toc .eyebrow{ margin-bottom:12px; }
.doc-toc ol{ margin:0; padding-left:20px; columns:2; column-gap:28px; }
.doc-toc li{ font-size:14px; margin-top:0; padding-bottom:6px; break-inside:avoid; }
.doc-toc a{ color:var(--ink-2); text-decoration:none; font-weight:600; }
.doc-toc a:hover{ color:var(--brand); text-decoration:underline; }
@media (max-width:560px){ .doc-toc ol{ columns:1; } }

.doc-end{
  margin:52px 0 0; padding-top:24px; border-top:1px dashed var(--rule);
  font-family:var(--f-mono); font-size:11.5px; line-height:1.9; color:var(--ink-2);
  letter-spacing:.02em;
}
