/* ============================================================
   ShopSmart — shared styles for the legal pages
   (privacy.html, terms.html, cookies.html)

   These pages are served OUTSIDE the pre-launch preview gate, so
   they render for visitors with no cookies, no session, and — for
   App Store review — no account at all. Every custom property
   carries a literal fallback so the page still reads correctly if
   /shopsmart-tokens.css ever fails to load.
   ============================================================ */

*{box-sizing:border-box;margin:0;padding:0}
[hidden]{display:none!important}
html{scroll-behavior:smooth}
body{
  background:var(--bg,#f6f8fc);
  color:var(--ink,#16233c);
  font-family:var(--font-body,"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",sans-serif);
  -webkit-font-smoothing:antialiased;
  line-height:1.65;
}
img{display:block;max-width:100%}
a{color:var(--ss-navy,#0D2B55);text-decoration:none}
a:hover{text-decoration:underline}

/* ===== HEADER ===== */
.lg-top{
  background:var(--white,#fff);
  border-bottom:1px solid var(--line-soft,#e6ecf5);
  padding:0 32px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  position:sticky;top:0;z-index:50;
}
.lg-top .brand{display:flex;align-items:center;flex:0 0 auto;min-height:var(--ss-tap,44px)}
/* The logo's box is reserved from the SVG's viewBox, so the header does not
   change width when the image arrives. */
.lg-top .brand img{height:32px;width:auto;max-width:none;aspect-ratio:1042 / 258}
.lg-top nav{display:flex;align-items:center;gap:22px;font-size:14px;font-weight:600}
.lg-top nav a{color:var(--ink-soft,#5b6b87);display:inline-flex;align-items:center;justify-content:center;min-height:var(--ss-tap,44px);min-width:var(--ss-tap,44px)}
.lg-top nav a:hover,.lg-top nav a[aria-current="page"]{color:var(--ss-navy,#0D2B55);text-decoration:none}
.lg-top nav a[aria-current="page"]{font-weight:700}

/* ===== MASTHEAD ===== */
/* The "Legal" eyebrow above the title is gone (L11). */
.lg-head{
  background:linear-gradient(125deg,var(--blue-950,#0a1836) 0%,var(--blue-800,#15367f) 55%,var(--blue-600,#2b62d6) 100%);
  color:#fff;padding:56px 32px 60px;
}
.lg-head .inner{max-width:820px;margin:0 auto}
.lg-head h1{
  font-family:var(--font-display,"Bricolage Grotesque","Arial Black",Arial,sans-serif);
  font-size:clamp(30px,5vw,44px);line-height:1.12;font-weight:700;letter-spacing:-.02em;
}
.lg-head p{margin-top:14px;font-size:16px;opacity:.88;max-width:min(62ch,34em)}
.lg-head .dates{
  margin-top:22px;display:flex;flex-wrap:wrap;gap:10px 26px;
  font-size:13px;opacity:.8;
}
.lg-head .dates b{font-weight:700;opacity:1}

/* ===== LAYOUT ===== */
.lg-wrap{max-width:820px;margin:0 auto;padding:0 32px 80px}

/* ===== TABLE OF CONTENTS ===== */
.lg-toc{
  background:var(--white,#fff);
  border:1px solid var(--line-soft,#e6ecf5);
  border-radius:var(--radius-lg,16px);
  padding:24px 28px;margin:-30px 0 44px;
  box-shadow:0 12px 32px -18px rgba(16,36,80,.30);
}
/* A heading in sentence case, not tracked capitals (L11). */
.lg-toc h2{
  font-size:14px;font-weight:700;
  color:var(--ink-soft,#5b6b87);margin-bottom:6px;
}
.lg-toc ol{list-style:none;counter-reset:toc;display:grid;gap:0}
.lg-toc li{counter-increment:toc;display:flex;gap:11px;align-items:baseline;font-size:14.5px}
.lg-toc li::before{
  content:counter(toc);
  flex:0 0 22px;height:22px;border-radius:6px;
  background:var(--blue-25,#eef3fd);color:var(--blue-700,#1e4bb8);
  font-size: 12px;font-weight:800;
  display:grid;place-items:center;
}
/* Each entry is a 44px row instead of a 24px link with a 9px gap. */
.lg-toc a{color:var(--ink,#16233c);font-weight:600;display:inline-flex;align-items:center;min-height:var(--ss-tap,44px)}
.lg-toc a:hover{color:var(--ss-navy,#0D2B55);text-decoration:underline}

/* ===== SECTIONS ===== */
.lg-sec{margin-bottom:40px;scroll-margin-top:84px}
.lg-sec h2{
  font-family:var(--font-display,"Bricolage Grotesque","Arial Black",Arial,sans-serif);
  font-size:23px;font-weight:700;letter-spacing:-.01em;
  color:var(--blue-900,#122c6f);
  margin-bottom:14px;padding-bottom:11px;
  border-bottom:2px solid var(--line-soft,#e6ecf5);
}
.lg-sec h3{
  font-size:16px;font-weight:700;margin:24px 0 8px;
  color:var(--ink,#16233c);
}
.lg-sec p{margin-bottom:13px;font-size:15.2px}
.lg-sec ul,.lg-sec ol{margin:0 0 15px 22px;font-size:15.2px}
/* Running text keeps a reading measure (brief 2.3); tables, notes and the
   contact card keep the full column. 68ch alone is about 110 characters here,
   because a zero in Plus Jakarta Sans is 0.73em wide, so the measure is capped
   in em: 34em holds about 75 characters. */
.lg-sec > p,.lg-sec > ul,.lg-sec > ol{max-width:min(68ch,34em)}
.lg-sec li{margin-bottom:8px}
.lg-sec strong{font-weight:700}
/* Links inside running text are underlined, not told apart by colour alone. */
.lg-sec p a,.lg-sec li a,.lg-note a,.lg-card a{text-decoration:underline}

/* ===== DATA TABLE ===== */
.lg-tablewrap{overflow-x:auto;margin:0 0 18px}
/* The wrapper scrolls on phones, so it takes keyboard focus (axe
   scrollable-region-focusable); the ring shows where the focus went. */
.lg-tablewrap:focus-visible{outline:2px solid var(--ss-cyan,#1B9BDB);outline-offset:2px}
table.lg-table{border-collapse:collapse;width:100%;min-width:520px;font-size:14.2px}
table.lg-table th,table.lg-table td{
  text-align:left;padding:11px 14px;
  border-bottom:1px solid var(--line-soft,#e6ecf5);
  vertical-align:top;
}
table.lg-table th{
  background:var(--blue-25,#eef3fd);
  font-weight:700;font-size:13px;
  color:var(--blue-800,#15367f);
  border-bottom:2px solid var(--line,#d5deed);
}
table.lg-table tr:last-child td{border-bottom:none}
/* Cookie and storage names read as identifiers, not prose — tint them so the
   eye can pick one out of the table without reading every row. */
table.lg-table code,.lg-sec code{
  font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
  font-size:.88em;
  background:var(--blue-25,#eef3fd);
  color:var(--blue-800,#15367f);
  padding:2px 6px;border-radius:5px;
  white-space:nowrap;
}

/* ===== CALLOUT ===== */
.lg-note{
  background:var(--blue-25,#eef3fd);
  border-left:4px solid var(--accent,#3b78ff);
  border-radius:0 12px 12px 0;
  padding:16px 20px;margin:0 0 18px;font-size:14.6px;
}
.lg-note b{color:var(--blue-900,#122c6f)}

/* ===== CONTACT CARD ===== */
.lg-card{
  background:var(--white,#fff);
  border:1px solid var(--line-soft,#e6ecf5);
  border-radius:var(--radius-lg,16px);
  padding:24px 28px;
}
.lg-card dl{display:grid;grid-template-columns:132px 1fr;gap:11px 18px;font-size:14.8px}
.lg-card dt{font-weight:700;color:var(--ink-soft,#5b6b87)}
.lg-card dd{color:var(--ink,#16233c)}
.lg-card dd a{display:inline-flex;align-items:center;min-height:var(--ss-tap,44px);margin-block:-13px}
/* Two numbers side by side, wrapping to two lines, not "A · B" (L12). */
.lg-card dd.lg-phones{display:flex;flex-wrap:wrap;gap:20px}
/* A flex row has no line-height strut, so each link's margin box is set to one
   line (44 - 20 = 24px) and wrapped rows sit 44px apart: the 44px targets
   overlap neither each other nor the rows above and below. */
.lg-card dd.lg-phones a{margin-block:-10px}

/* ===== FOOTER ===== */
.lg-foot{
  background:var(--blue-950,#0a1836);color:rgba(255,255,255,.72);
  padding:32px;text-align:center;font-size:13.5px;
}
.lg-foot a{color:#fff;font-weight:600;display:inline-flex;align-items:center;min-height:var(--ss-tap,44px)}
.lg-foot .links{
  display:flex;flex-wrap:wrap;gap:8px 22px;justify-content:center;margin-bottom:14px;
}
/* Separate facts that wrap cleanly, not "A · B · C" (L12). */
.lg-foot .meta{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 18px}

@media (max-width:640px){
  /* The logo no longer squashes to fit (SYS-10), so the links take their own
     row. Always, not only when they run out of room: waiting for the logo to
     load before wrapping moved the page 44px (CLS 0.09 at 320). */
  .lg-top{padding:0 18px;flex-wrap:wrap;row-gap:0}
  .lg-top nav{gap:6px 14px;font-size:13px;flex-wrap:wrap;flex-basis:100%}
  .lg-head{padding:40px 20px 48px}
  .lg-wrap{padding:0 18px 56px}
  .lg-toc{padding:20px;margin:-24px 0 34px}
  .lg-card{padding:20px}
  .lg-card dl{grid-template-columns:1fr;gap:3px 0}
  .lg-card dd{margin-bottom:9px}
}
