/* truwiz.com — one stylesheet for every page. Colours come from the TruWiz logo
   (blue #44AEE2, star #FECB00, tile #111820) plus each app's own accent. */

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --paper-2: #f2f5f8;
  --ink: #15202b;
  --muted: #4b5561;
  --line: #dbe2e9;
  --link: #11618f;
  --night: #111820;
  --night-2: #18222d;
  --night-ink: #f4f5f6;
  --night-muted: #a8b5c1;
  --wiz: #44aee2;
  --star: #fecb00;
  --focus: #1d8fd0;

  --sf: #087a5f;   /* SpendFox */
  --rt: #006fc7;   /* RainTrace (logo #0090FD, deepened for text) */
  --tw: #11618f;   /* TruWiz app */

  --measure: 68ch;
  --page: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-tile: 22%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1319;
    --paper-2: #131b23;
    --ink: #e8edf2;
    --muted: #9eabb7;
    --line: #25313c;
    --link: #7fcaf0;
    --night: #141e28;
    --night-2: #1a2631;
    --focus: #7fcaf0;
    --sf: #3ddbb0;
    --rt: #58b4ff;
    --tw: #7fcaf0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: 'kern', 'liga';
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--paper); color: var(--ink); padding: 0.5rem 0.9rem; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 0.5rem; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 1.625rem; font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

/* App accents, set by class so the CSP can forbid inline styles */
.a-sf { --accent: var(--sf); }
.a-rt { --accent: var(--rt); }
.a-tw { --accent: var(--tw); }
.section.tight { padding-top: 1rem; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.25rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: inherit; text-decoration: none; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.01em;
}
.brand img { width: 2.1rem; height: 2.1rem; }
.nav { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.nav a { color: inherit; text-decoration: none; font-weight: 600; font-size: 0.9375rem; padding: 0.35rem 0; }
.nav a:hover, .nav a[aria-current='page'] { text-decoration: underline; text-underline-offset: 0.3em; }

/* ---------- Home hero: the one bold moment ---------- */
.hero { background: var(--night); color: var(--night-ink); overflow: hidden; }
.hero .site-header { border-bottom-color: rgba(255, 255, 255, 0.08); }
.hero .nav a { color: var(--night-ink); }
.hero-body {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center; gap: 2rem;
  padding-top: clamp(2.5rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 8vw, 6.5rem);
}
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 13ch; }
.hero-lede { color: var(--night-muted); font-size: 1.1875rem; max-width: 34rem; margin-top: 1.5rem; }
.hero-lede strong { color: var(--night-ink); font-weight: 700; }

.sky { position: relative; justify-self: center; width: min(100%, 26rem); aspect-ratio: 1; }
.sky .mark { position: absolute; inset: 6%; width: 88%; height: 88%; transform: rotate(-6deg); }
.sky .spark { position: absolute; color: var(--star); }
.sky .spark svg { width: 100%; height: 100%; }
.sky .s1 { width: 7%; left: 8%; top: 10%; }
.sky .s2 { width: 4.5%; left: 80%; top: 6%; }
.sky .s3 { width: 5.5%; left: 90%; top: 52%; }
.sky .s4 { width: 3.5%; left: 2%; top: 64%; }
.sky .s5 { width: 4%; left: 58%; top: 92%; }

@media (prefers-reduced-motion: no-preference) {
  .sky .mark { animation: tip 1.4s cubic-bezier(.2, .8, .2, 1) both; }
  .sky .spark { opacity: 0; animation: twinkle 1.6s ease-out both; }
  .sky .s1 { animation-delay: 0.5s; } .sky .s2 { animation-delay: 0.75s; }
  .sky .s3 { animation-delay: 1s; }   .sky .s4 { animation-delay: 1.2s; }
  .sky .s5 { animation-delay: 1.35s; }
  @keyframes tip { from { transform: rotate(-16deg) translateY(4%); opacity: 0; } to { transform: rotate(-6deg); opacity: 1; } }
  @keyframes twinkle { 0% { opacity: 0; transform: scale(.4); } 55% { opacity: 1; transform: scale(1.25); } 100% { opacity: 1; transform: scale(1); } }
}

/* ---------- Home: apps ---------- */
.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section > .wrap > h2 { margin-bottom: 0.4rem; }
.section-lede { color: var(--muted); max-width: 40rem; margin-bottom: 2rem; }

.apps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.app {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: 0.5rem 1.75rem;
  align-items: start; padding: 1.75rem 0; border-bottom: 1px solid var(--line);
}
.app-icon { width: 5.5rem; height: 5.5rem; border-radius: var(--radius-tile); }
.on-white { border: 1px solid var(--line); background: #fff; }
.app h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.app h3 a { color: var(--accent); text-decoration: none; }
.app h3 a:hover { text-decoration: underline; }
.app p { margin: 0.35rem 0 0; max-width: 38rem; }
.app .status { color: var(--muted); font-size: 0.9375rem; margin-top: 0.6rem; }
.app-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; justify-items: start; font-size: 0.9375rem; font-weight: 600; min-width: 10rem; }
.app-links a { color: var(--accent); }

.facts { background: var(--paper-2); }
.facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.facts-grid h3 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.facts-grid p { color: var(--muted); margin: 0; }

/* ---------- App pages ---------- */
.app-hero { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.app-hero .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem 2rem; align-items: center; }
.app-hero .app-icon { width: 7.5rem; height: 7.5rem; }
.app-hero h1 { color: var(--accent); }
.app-hero .lede { font-size: 1.1875rem; max-width: 40rem; margin: 0.6rem 0 0; }
.app-hero .status { color: var(--muted); margin: 0.6rem 0 0; font-size: 0.9375rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 2.5rem 4rem; align-items: start; }
.prose { max-width: var(--measure); }
.prose h2 { margin: 2.5rem 0 0.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.75rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.25em; }
.prose li { margin: 0.45em 0; padding-left: 0.2rem; }
.prose li::marker { color: var(--accent, var(--muted)); }

.feature-list { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 1.1rem; }
.feature-list li { padding: 0 0 0 1.1rem; border-left: 3px solid var(--accent); margin: 0; }
.feature-list strong { display: block; font-weight: 700; }

.aside { border-top: 3px solid var(--accent); padding-top: 1.25rem; font-size: 0.9375rem; }
.aside h2 { font-size: 1.125rem; margin-bottom: 0.75rem; }
.aside ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.5rem; }
.aside a { color: var(--accent); font-weight: 600; }
.aside p { color: var(--muted); }

.figure { margin: 2rem 0; }
.figure img { width: min(100%, 22rem); border-radius: 1.25rem; }
.figure figcaption { color: var(--muted); font-size: 0.9375rem; margin-top: 0.6rem; max-width: 22rem; }

/* ---------- Legal pages ---------- */
.doc-head { padding: clamp(2.25rem, 5vw, 3.5rem) 0 1.5rem; }
.doc-head .crumb { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.9rem; }
.doc-head .crumb a { color: var(--accent, var(--link)); }
.doc-head .updated { color: var(--muted); margin: 0.75rem 0 0; font-size: 0.9375rem; }
.doc { padding-bottom: 4rem; }
.doc .intro { font-size: 1.125rem; }
.toc { border-left: 3px solid var(--accent, var(--line)); padding: 0.25rem 0 0.25rem 1.1rem; margin: 0 0 2.5rem; font-size: 0.9375rem; }
.toc h2 { font-size: 1rem !important; margin: 0 0 0.5rem !important; }
.toc ul { list-style: none; padding: 0 !important; margin: 0 !important; columns: 2 14rem; column-gap: 2rem; }
.toc li { margin: 0 0 0.35rem; break-inside: avoid; }
.doc section { scroll-margin-top: 1.5rem; }
.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--link));
  border-radius: 0 10px 10px 0; padding: 1rem 1.25rem; margin: 1.5rem 0; background: var(--paper-2);
}
.callout p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem !important; margin: 0 0 1rem !important; min-height: 1.9rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.05rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 0.9375rem;
  background: var(--accent, var(--link)); color: var(--paper);
}

.button {
  display: inline-block; background: var(--accent, var(--link)); color: var(--paper);
  font-weight: 700; text-decoration: none; padding: 0.75rem 1.2rem; border-radius: 10px; margin: 0.25rem 0 1rem;
}
.button:hover { text-decoration: underline; }

.policy-list { list-style: none; padding: 0 !important; margin: 1.5rem 0 0 !important; border-top: 1px solid var(--line); }
.policy-list li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.policy-list img { width: 3rem; height: 3rem; border-radius: var(--radius-tile); }
.policy-list a { font-weight: 700; }
.policy-list span { display: block; color: var(--muted); font-size: 0.9375rem; }

kbd, .path { font-family: inherit; font-weight: 700; white-space: normal; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-footer a { color: inherit; }
.site-footer p { margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .hero-body { grid-template-columns: 1fr; }
  .sky { width: min(70%, 16rem); justify-self: start; order: -1; margin-bottom: -0.5rem; }
  .app { grid-template-columns: 4rem minmax(0, 1fr); }
  .app-icon { width: 4rem; height: 4rem; }
  .app-links { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin-top: 0.75rem; }
  .facts-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .split { grid-template-columns: 1fr; }
  .app-hero .wrap { grid-template-columns: 1fr; }
  .app-hero .app-icon { width: 5.5rem; height: 5.5rem; }
}

@media print {
  .site-header, .site-footer, .toc, .skip { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; }
}
