/* CoPenny's site, in the same system as Anagnost's (measured from its page): paper and ink,
   Figtree at 500 for text, EB Garamond 400 for titles with an italic second line, ink buttons,
   white cards with a hairline. Fonts are served from here, so a visit sends nothing to anyone
   else. */

@font-face { font-family: "EB Garamond"; font-weight: 400; font-display: swap; src: url("/fonts/EBGaramond_400Regular.ttf") format("truetype"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/EBGaramond_400Regular_Italic.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/fonts/Figtree_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/fonts/Figtree_600SemiBold.ttf") format("truetype"); }

:root {
  --paper: #f5f1e8;
  --card: #ffffff;
  --ink: #1a1a1a;
  --on-ink: #f5f1e8;
  --muted: rgb(26 26 26 / 70%);
  --line: rgb(26 26 26 / 12%);
  --line-strong: rgb(26 26 26 / 22%);
  --crimson: #8b1538;
  --up: #2a744f;
  --down: #c42d4a;
  --tint: #ece6da;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1015;
    --card: #26161d;
    --ink: #f2ebe6;
    --on-ink: #1c1015;
    --muted: rgb(242 235 230 / 72%);
    --line: rgb(242 235 230 / 12%);
    --line-strong: rgb(242 235 230 / 24%);
    --crimson: #e8809b;
    --up: #7fd3a3;
    --down: #ff8597;
    --tint: #3a1a25;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 15px/1.45 "Figtree", system-ui, sans-serif;
}
a { color: inherit; text-underline-offset: 3px; }
.serif { font-family: "EB Garamond", Georgia, serif; font-weight: 400; }

.wrap { max-width: 1184px; margin: 0 auto; padding: 0 16px; }

/* The bar along the top. */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 16px; }
.brand svg { width: 26px; height: 26px; border-radius: 7px; }
nav.links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
nav.links a { text-decoration: none; }
nav.links a[aria-current="page"] { text-decoration: underline; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 8px; font-size: 15px; font-weight: 600;
  text-decoration: none; background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink);
}
.button.quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.button.small { height: 40px; padding: 0 16px; font-size: 14px; }

.eyebrow {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 16px;
}

/* The landing page. */
.hero { text-align: center; padding: 64px 0 40px; }
.hero h1 {
  font: 400 clamp(44px, 8vw, 72px)/1.02 "EB Garamond", Georgia, serif;
  letter-spacing: -0.015em; margin: 0 auto 20px; max-width: 14em;
}
.hero h1 em { font-style: italic; display: block; }
.hero .lede { font-size: 17px; line-height: 1.45; color: var(--muted); max-width: 568px; margin: 0 auto 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.example { display: grid; gap: 28px; padding: 36px; margin: 40px 0 0; }
@media (min-width: 860px) { .example { grid-template-columns: 1fr 1fr; align-items: center; } }
.example h2 { font: 400 32px/1.1 "EB Garamond", Georgia, serif; letter-spacing: -0.02em; margin: 0 0 12px; }
.example p:not(.eyebrow) { color: var(--muted); font-size: 16px; margin: 0; max-width: 30em; }
.rows { display: grid; gap: 10px; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline;
  padding: 14px 16px; border-radius: 14px; background: var(--paper);
}
.row .what { font: 400 19px/1.2 "EB Garamond", Georgia, serif; }
.row .amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.row .amount.up { color: var(--up); }
.row .amount.down { color: var(--down); }
.row .said { color: var(--muted); font-size: 13px; }
.badge {
  justify-self: end; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--tint); color: var(--ink);
}

.features { display: grid; gap: 32px; padding: 80px 0 24px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features svg { width: 22px; height: 22px; color: var(--crimson); }
.features h3 { font: 400 28px/1 "EB Garamond", Georgia, serif; letter-spacing: -0.02em; margin: 14px 0 10px; }
.features p { color: var(--muted); margin: 0; }

.figures { display: grid; margin: 56px 0 8px; }
@media (min-width: 760px) { .figures { grid-template-columns: repeat(3, 1fr); } }
.figures div { padding: 28px; }
.figures div + div { border-top: 1px solid var(--line); }
@media (min-width: 760px) { .figures div + div { border-top: 0; border-left: 1px solid var(--line); } }
.figures strong { display: block; font: 400 52px/1 "EB Garamond", Georgia, serif; color: var(--crimson); margin-bottom: 12px; }
.figures span { color: var(--muted); }

/* Policies and help. */
article { max-width: 680px; padding: 24px 0 56px; font-size: 16px; line-height: 1.6; }
article h1 { font: 400 clamp(36px, 6vw, 52px)/1.05 "EB Garamond", Georgia, serif; letter-spacing: -0.015em; margin: 16px 0 8px; }
article h2 { font: 400 28px/1.1 "EB Garamond", Georgia, serif; letter-spacing: -0.02em; margin: 40px 0 10px; }
article h3 { font: 400 22px/1.15 "EB Garamond", Georgia, serif; margin: 28px 0 8px; }
article p, article li { color: var(--ink); }
article ul, article ol { padding-left: 22px; }
article li { margin: 6px 0; }
article a { text-decoration: underline; }
.draft { background: var(--tint); border-radius: 14px; padding: 12px 16px; font-size: 14px; font-weight: 600; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }

footer.bottom {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--muted);
}
footer.bottom .brand { color: var(--ink); font-size: 15px; }
footer.bottom nav { display: flex; gap: 18px; }
footer.bottom a { text-decoration: none; }

/* Narrow phones: the bar keeps its one button (the links are in the footer), cards breathe less. */
.button { white-space: nowrap; }
@media (max-width: 520px) {
  nav.links a:not(.button) { display: none; }
  .example { padding: 24px; }
  .figures div { padding: 24px; }
}
