/*
 * Shared styles for spendingtracker.lawkauntangled.com
 *
 * Palette comes from the app itself: the ground is the icon's own #0B0E13, and
 * the rule under each header is the five default category colours in order, so
 * the site and the app read as one thing.
 *
 * No build step, no external fonts, no analytics. A privacy page that loaded a
 * tracker would be self-refuting, and the site claims the app phones nobody.
 */

:root {
  --ground: #fbfcfd;
  --surface: #ffffff;
  --rule: #e2e7ee;
  --ink: #0f1319;
  --ink-soft: #4c5666;
  --ink-faint: #77808f;
  --accent: #0a6fcb;
  --accent-soft: #eaf3fd;

  --lime: #8fd14f;
  --sky: #2ea8ff;
  --magenta: #e85bc8;
  --tangerine: #ff8a3d;
  --teal: #12c2b0;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b0e13;
    --surface: #131820;
    --rule: #262e3a;
    --ink: #e9edf4;
    --ink-soft: #aab4c3;
    --ink-faint: #7d8798;
    --accent: #5ebbff;
    --accent-soft: #15202e;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 20px 80px;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- header ------------------------------------------------------------- */

header.site {
  padding: 40px 0 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 23%;
  display: block;
}

.brand span {
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.01em;
}

/* The five default category colours, in the order the app seeds them. */
.spectrum {
  display: flex;
  height: 3px;
  margin: 26px 0 0;
  border-radius: 2px;
  overflow: hidden;
}

.spectrum i {
  flex: 1;
}
.spectrum i:nth-child(1) { background: var(--lime); }
.spectrum i:nth-child(2) { background: var(--sky); }
.spectrum i:nth-child(3) { background: var(--magenta); }
.spectrum i:nth-child(4) { background: var(--tangerine); }
.spectrum i:nth-child(5) { background: var(--teal); }

nav.site {
  display: flex;
  gap: 22px;
  padding: 16px 0 0;
  font-size: 15px;
}

nav.site a {
  color: var(--ink-faint);
  text-decoration: none;
}

nav.site a:hover {
  color: var(--ink);
}

nav.site a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ---- type --------------------------------------------------------------- */

h1 {
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.024em;
  font-weight: 700;
  margin: 44px 0 0;
  text-wrap: balance;
}

.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 18px 0 0;
}

h2 {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 54px 0 14px;
}

h3 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.011em;
  margin: 30px 0 8px;
  text-wrap: balance;
}

p {
  margin: 0 0 16px;
}

ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

li {
  margin-bottom: 9px;
}

strong {
  font-weight: 650;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 0.12em 0.36em;
}

/* Long-form reading — the privacy page sets this on its body. */
.prose p,
.prose li {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.prose strong {
  color: var(--ink);
}

.updated {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-faint);
  margin-top: 10px;
}

/* ---- blocks ------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 22px 24px;
  margin: 22px 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.email {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  word-break: break-all;
}

.features {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 0;
}

.features li {
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
  color: var(--ink-soft);
}

.features li:first-child {
  border-top: 1px solid var(--rule);
}

.features b {
  color: var(--ink);
  font-weight: 650;
  display: block;
  margin-bottom: 2px;
}

footer.site {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

footer.site a {
  color: var(--ink-faint);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
