/* Finance 509 policy site — tokens mirror the app's brand green (AppColors.Green #10B77F).
   The light-mode --primary is darkened to #07704E so body-size links clear 4.5:1 on white;
   the raw brand green does not. One stylesheet for all four pages; privacy.html uses the
   extra blocks at the bottom. Structure is shared with apps/amazgone — keep them in step. */
:root {
  --bg: #f4f6f5;
  --bg-tint: #eafaf3;
  --surface: #ffffff;
  --surface-sunk: #f9fbfa;
  --text: #161a18;
  --muted: #515c57;
  --faint: #828c87;
  --outline: #dde4e0;
  --outline-strong: #c5cfc9;
  --primary: #07704e;
  --primary-ink: #04402c;
  --primary-wash: #d8f3e8;
  --shadow: 0 1px 2px rgba(22, 26, 24, .05), 0 8px 24px -16px rgba(22, 26, 24, .28);
  --maxw: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101413;
    --bg-tint: #121f1a;
    --surface: #1a1f1d;
    --surface-sunk: #151917;
    --text: #e6eae8;
    --muted: #a8b3ad;
    --faint: #7d8884;
    --outline: #2c3331;
    --outline-strong: #3c4441;
    --primary: #4ade9e;
    --primary-ink: #c6f6e1;
    --primary-wash: #123327;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  background:
    radial-gradient(60rem 28rem at 50% -14rem, var(--bg-tint), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

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

header.site {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
}

.brand { display: inline-block; line-height: 0; }

.brand img {
  height: 1.7rem;
  width: auto;
}

/* Home page hero: the full logo, tagline included. */
.hero-logo {
  display: block;
  width: 100%;
  max-width: 24rem;
  height: auto;
  margin: 0 0 2rem;
}

/* Logo variants are chosen by <picture media="(prefers-color-scheme: dark)">,
   so the browser downloads only the artwork it will actually show. */
.brand picture, .hero-logo { display: block; }

footer.site {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--outline);
  color: var(--faint);
  font-size: .875rem;
}

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

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

h1 {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0 0 .75rem;
}

h2 { font-size: 1.22rem; letter-spacing: -.012em; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
li::marker { color: var(--faint); }

.lede {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 .7rem;
}

.updated {
  display: inline-block;
  color: var(--muted);
  font-size: .8rem;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: .25rem .75rem;
  margin: 1.25rem 0 0;
}

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

code {
  font-size: .88em;
  background: var(--primary-wash);
  color: var(--primary-ink);
  padding: .1em .38em;
  border-radius: .3rem;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 1rem;
  padding: 1.3rem 1.45rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow);
}

.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-top: 0; }

.callout {
  background: var(--primary-wash);
  color: var(--primary-ink);
  border-radius: 1rem;
  padding: 1.1rem 1.35rem;
  margin: 1.75rem 0;
}

.callout > :last-child { margin-bottom: 0; }
.callout a { color: inherit; }

.links { display: flex; flex-wrap: wrap; gap: .6rem; margin: 2.5rem 0 0; }

.links a {
  display: inline-block;
  padding: .55rem 1.05rem;
  border: 1px solid var(--outline-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 550;
}

.links a:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- privacy: at-a-glance tiles ---------- */

.glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: .75rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.glance li {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: .9rem;
  padding: 1rem 1.05rem;
  margin: 0;
  box-shadow: var(--shadow);
}

.glance strong { display: block; font-size: .95rem; margin-bottom: .15rem; }
.glance span { color: var(--muted); font-size: .86rem; line-height: 1.5; display: block; }

/* ---------- privacy: contents ---------- */

.toc {
  background: var(--surface-sunk);
  border: 1px solid var(--outline);
  border-radius: 1rem;
  padding: 1.1rem 1.35rem;
  margin: 2rem 0 3rem;
}

.toc h2 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--faint);
  margin-bottom: .7rem;
}

.toc ol {
  columns: 2;
  column-gap: 1.75rem;
  margin: 0;
  padding-left: 1.1rem;
  font-size: .93rem;
}

.toc li { margin-bottom: .25rem; break-inside: avoid; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- privacy: numbered sections ---------- */

section.sec {
  padding-top: 2.4rem;
  margin-top: 2.4rem;
  border-top: 1px solid var(--outline);
}

section.sec:first-of-type { border-top: 0; margin-top: 0; }

section.sec > h2 {
  display: flex;
  align-items: baseline;
  gap: .6rem;
}

section.sec > h2 .n {
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-wash);
  border-radius: .45rem;
  padding: .1rem .45rem;
  flex: none;
}

/* ---------- privacy: what we collect ---------- */

.rows { margin: 1.25rem 0 0; }

.row {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 1.25rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--outline);
}

.row:last-child { border-bottom: 1px solid var(--outline); }
.row dt { font-weight: 620; font-size: .97rem; }
.row dt small { display: block; font-weight: 400; color: var(--faint); font-size: .83rem; line-height: 1.5; margin-top: .15rem; }
.row dd { margin: 0; color: var(--muted); font-size: .95rem; }

@media (max-width: 34rem) {
  .row { grid-template-columns: 1fr; gap: .35rem; }
  .toc ol { columns: 1; }
}

/* ---------- privacy: processors ---------- */

.parties { list-style: none; padding: 0; margin: 1.25rem 0 1rem; }

.parties li {
  border: 1px solid var(--outline);
  border-radius: .9rem;
  padding: .9rem 1.1rem;
  margin-bottom: .6rem;
  background: var(--surface);
}

.parties strong { font-size: .97rem; }
.parties .who { color: var(--faint); font-weight: 400; font-size: .88rem; }
.parties p { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }

/* legacy table styling, kept for any page that still uses one */
table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--outline); vertical-align: top; }
th { font-weight: 650; color: var(--muted); }

/* ---------- text wordmark ---------- */
/* Finance 509 has no wordmark PNG (the app ships only an icon), so the header brand is
   set in type. Keeps the page to two image requests: favicon and apple-touch-icon. */
.brand-text {
  font-size: 1.02rem;
  font-weight: 680;
  letter-spacing: -.015em;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
}

.brand-text .n509 { color: var(--primary); }

.hero-mark {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin: 0 0 2rem;
}

.hero-mark img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: .9rem;
  box-shadow: var(--shadow);
}

.hero-mark .name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.hero-mark .name span { color: var(--primary); }
