:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #1d2a2c;
  --muted: #5f6b6c;
  --line: #e7e1d7;
  --accent: #1d2a2c;
  --tint: #efeae1;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(29 42 44 / 6%), 0 8px 24px rgb(29 42 44 / 6%);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a1b;
    --surface: #1c2425;
    --ink: #eef1ee;
    --muted: #a3adab;
    --line: #2c3637;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
  body { --tint: color-mix(in srgb, var(--accent) 18%, var(--surface)) !important; }
  .app-card { --tint: color-mix(in srgb, var(--accent) 18%, var(--surface)) !important; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(100% - 32px, 760px); margin-inline: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding-block: 16px; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 600; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--bg); font: 600 19px/1 var(--serif); }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 15px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; padding-block: 24px 40px; }

main { padding-top: 48px; }
.lede { color: var(--muted); font-size: 19px; margin: 8px 0 0; }

/* Home */
.home-hero h1 { font-size: clamp(36px, 7vw, 52px); margin: 0; }
.home-hero .lede { max-width: 34em; }
.app-grid { display: grid; gap: 16px; margin-top: 40px; }
.app-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.app-card:hover { transform: translateY(-2px); }
.app-card-main { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 22px; color: inherit; text-decoration: none; }
.app-card h2 { margin: 0; font-size: 26px; }
.app-card p { margin: 2px 0 0; color: var(--muted); }
.app-card-links { display: flex; gap: 20px; margin: 0; padding: 12px 22px; background: var(--tint); font-size: 15px; font-weight: 500; }
.app-card-links a { text-decoration: none; }
.about { margin-top: 32px; color: var(--muted); font-size: 15px; }

.app-icon { width: 72px; height: 72px; flex: none; }
.app-icon svg, .app-icon img, .doc-icon svg { display: block; width: 100%; height: 100%; }
.app-icon img { border-radius: 22%; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.chip { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.chip-status { border-color: transparent; background: var(--tint); color: var(--accent); font-weight: 600; }

/* App page */
.app-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 28px; border-radius: calc(var(--radius) + 6px); background: var(--tint); }
.app-hero .app-icon { width: 104px; height: 104px; }
.app-hero h1 { margin: 0; font-size: clamp(34px, 6vw, 46px); }
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 32px; }
.link-card { display: grid; gap: 2px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.link-card strong { color: var(--accent); font-size: 18px; }
.link-card span { color: var(--muted); font-size: 15px; }
.link-card strong::after { content: " →"; }

/* Documents */
.doc-header { padding-bottom: 24px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc-icon { width: 48px; height: 48px; margin-bottom: 14px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.doc-header h1 { margin: 4px 0 0; font-size: clamp(30px, 5vw, 40px); }
.updated { display: inline-block; margin: 14px 0 0; padding: 3px 12px; border-radius: 999px; background: var(--tint); color: var(--muted); font-size: 14px; }

.prose { max-width: 40em; }
.prose h2 { margin: 40px 0 8px; font-size: 24px; }
.prose h3 { margin: 28px 0 4px; font-size: 18px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 10px 0; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 24px 0; padding: 16px 20px; border-radius: 14px; background: var(--tint); }
.prose blockquote p { margin: 0; font-size: 18px; font-weight: 600; }
.prose details { margin: 10px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.prose summary { cursor: pointer; font-weight: 600; }
.prose details[open] summary { margin-bottom: 6px; }
.prose details p { margin: 6px 0 0; color: var(--muted); }

@media (max-width: 520px) {
  main { padding-top: 32px; }
  .app-hero { grid-template-columns: 1fr; padding: 22px; }
  .app-hero .app-icon { width: 80px; height: 80px; }
  .app-card-main { padding: 18px; gap: 14px; }
  .app-icon { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .app-card { transition: none; } .app-card:hover { transform: none; } }
