/* Clean Invoice — cleaninvoice.org
 *
 * The app's own palette, sampled from Packages/DesignSystem/Tokens/Palette.swift
 * rather than matched by eye: warm cream ground, deep forest ink, one chartreuse
 * accent. Dark mode uses the same tokens' dark values.
 *
 * No webfonts, no analytics, no third-party requests of any kind. A privacy
 * policy that loads a tracker to render itself is not one. */

:root {
  --ground:      #F5F1E7;
  --card:        #FFFFFF;
  --card-border: #EDE8DA;
  --ink:         #12301C;
  --ink-2:       #6B7A6E;
  --ink-3:       #9AA79C;
  --accent:      #D0F850;
  --on-accent:   #12301C;
  --hero:        #12301C;
  --on-hero:     #F0EDE0;
  --separator:   #E3DECF;

  --measure: 34rem;
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:      #0A1710;
    --card:        #132018;
    --card-border: #132018;
    --ink:         #F0EDE0;
    --ink-2:       #8C9A8F;
    --ink-3:       #5F6E63;
    --accent:      #C7F03F;
    --on-accent:   #0A1710;
    --hero:        #17321F;
    --separator:   #26362C;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

/* ── masthead ─────────────────────────────────────────────────────────── */

.masthead {
  background: var(--hero);
  color: var(--on-hero);
  padding: 2.5rem 1rem 3rem;
}

.masthead .inner { max-width: var(--measure); margin: 0 auto; }

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--on-hero);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2rem;
}

.masthead h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

.masthead .updated {
  color: var(--on-hero);
  opacity: 0.7;
  font-size: 0.9rem;
  margin: 0;
}

/* ── body ─────────────────────────────────────────────────────────────── */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}

h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
}

h2:first-of-type { margin-top: 0; }

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.4rem;
}

p, li { color: var(--ink); }
p { margin: 0 0 1rem; }

ul { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }

strong { font-weight: 600; }

a { color: var(--ink); text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

/* The one thing a reader should take away from a section. */
.key {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
}

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

.key .lead {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--separator);
  margin: 3rem 0 2rem;
}

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem 3rem;
  color: var(--ink-2);
  font-size: 0.9rem;
}

footer nav { margin-bottom: 0.75rem; }
footer nav a { margin-right: 1rem; }

@media (min-width: 40rem) {
  .masthead { padding: 3rem 2rem 3.5rem; }
  main { padding: 3rem 2rem 4rem; }
  footer { padding: 0 2rem 3rem; }
}
