/* The app's own palette, so the site and the product look like one
   thing. These are the values in lib/theme.dart — if they change
   there, they change here. */
:root {
  --paper: #faf9f7;
  --ink: #1a1a1a;
  --muted: #8a8a85;
  --hairline: #e8e6e1;
  --card: #ffffff;
  --spend: #b0453b;
  --earn: #2e6f52;
}

/* The un-stamped document, which is what most people see: only the OS
   setting separates the two themes. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141414;
    --ink: #dcdad4;
    --muted: #8e8e88;
    --hairline: #2e2e2c;
    --card: #1d1d1c;
    --spend: #e09189;
    --earn: #8cc6a6;
  }
}

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

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

body {
  margin: 0;
  /* Explicit, so the page never borrows a ground it was not designed
     against. */
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif,
    system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  /* About 68 characters of running text: past that the eye loses the
     start of the next line. */
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px 96px;
}

/* --- masthead ----------------------------------------------------- */

header.site {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 0 0;
}

header.site img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
}

header.site a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

h1,
h2,
h3 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
  line-height: 1.2;
}

h1 {
  font-size: 2.1rem;
  margin: 48px 0 8px;
}

h2 {
  font-size: 1.35rem;
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

h3 {
  font-size: 1.05rem;
  margin: 32px 0 8px;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--spend);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

strong {
  font-weight: 650;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 2em;
  text-wrap: pretty;
}

.stamp {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 2.5em;
}

ul {
  padding-left: 1.2em;
  margin: 0 0 1.1em;
}

li {
  margin-bottom: 0.5em;
}

/* --- tables ------------------------------------------------------- */

.scroll {
  overflow-x: auto;
  margin: 0 0 1.6em;
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- the one card on the landing page ----------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 24px 26px;
  margin: 0 0 1.6em;
}

.card h3 {
  margin-top: 0;
}

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

.rows {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 2em 0;
}

footer.site {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 5px;
}
