/* The app's own tokens, trimmed to what one page needs, so the site and the app are
   plainly the same product. Keep these in step with static/ds.css. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700&display=swap');

:root {
  color-scheme: light;
  --bg: #FBF9F6; --surface: #FFFFFF; --text: #262421; --body: #504B45;
  --muted: #6E6862; --faint: #908A83;
  --line: #EAE4DC; --hair: #F2EDE6; --edge: #D6CFC5; --chip: #F5F1EB;
  --accent: #0E6E5E; --accent-hover: #0B5A4D; --accent-100: #E8F2F0;
  --tie: #2E7D5B; --tie-100: #E5F1EB; --warn: #A03A16; --warn-100: #FBE9E0;
  --keyed: #2C5C7A;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-card: 18px; --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(38,36,33,.04), 0 10px 30px rgba(38,36,33,.05);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font);
       -webkit-font-smoothing: antialiased; }
main, header, footer { max-width: 860px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 52px); }
h2 { font-size: clamp(22px, 3.4vw, 28px); margin: 0 0 10px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 14px; color: var(--body); }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--body); max-width: 62ch; }
.muted { color: var(--muted); font-size: 14.5px; }
a { color: var(--accent); }

.top { display: flex; align-items: center; gap: 10px; padding-top: 26px; padding-bottom: 26px; }
.mark { width: 26px; height: 26px; border-radius: 9px; background: var(--accent); display: inline-block; }
.brand { font-weight: 700; letter-spacing: -.01em; }
.tag { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: var(--radius-pill);
       background: var(--chip); color: var(--muted); }
.top .spacer { margin-left: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
       text-decoration: none; white-space: nowrap; font-weight: 500; font-size: 15px;
       line-height: 1.2; color: var(--text); background: var(--surface);
       border: 1px solid transparent; padding: 12px 22px; border-radius: var(--radius-pill); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { border-color: var(--edge); }
.btn-secondary:hover { border-color: var(--text); }
.btn-sm { padding: 9px 17px; font-size: 13px; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 8px; }

section { padding: 34px 0; border-top: 1px solid var(--line); }
section.hero { border-top: 0; padding-top: 8px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
        padding: 18px 20px; box-shadow: var(--shadow); }
.card .step { font-size: 12px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.list { margin: 12px 0 0; padding-left: 20px; color: var(--body); }
.list li { margin: 0 0 8px; }

/* A drawing of a tie-out, not a screenshot of one. */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
         box-shadow: var(--shadow); overflow: hidden; margin-top: 18px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
            color: var(--faint); font-weight: 600; padding: 12px 16px; background: #FDFCFA;
            border-bottom: 1px solid var(--line); }
.sheet td { padding: 10px 16px; border-bottom: 1px solid var(--hair); }
.sheet tr:last-child td { border-bottom: 0; }
.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.keyed { color: var(--keyed); }
.total td { font-weight: 700; border-top: 1px solid var(--edge); }
.pill { font-size: 11.5px; font-weight: 500; padding: 2px 9px; border-radius: var(--radius-pill);
        background: var(--tie-100); color: var(--tie); white-space: nowrap; }
.pill-warn { background: var(--warn-100); color: var(--warn); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }

footer { padding: 28px 24px 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line);
         display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
footer .spacer { margin-left: auto; }

@media (max-width: 640px) {
  .buttons .btn { flex: 1 1 100%; }
  .sheet table { font-size: 13px; }
  .sheet th:nth-child(3), .sheet td:nth-child(3) { display: none; }
  /* Measured at 375 CSS px: the sample table is 441px wide inside a 310px card whose
     overflow is hidden, so the right-hand columns - the figures - were clipped with no
     way to reach them. Hiding a column is not enough on a narrow phone; the card
     scrolls, and the page still does not. */
  .sheet { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sheet table { min-width: 320px; }
}
