@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-500.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-600-italic.woff") format("woff");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-400-italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f0e6;
  --bg-elev: #fffbf4;
  --bg-tint: #efe6d6;
  --ink: #2a221a;
  --ink-soft: #5c5146;
  --muted: #6f6358;
  --line: #e4d8c8;
  --accent: #c45c26;
  --accent-dark: #9a3f16;
  --accent-soft: #f3e0d2;
  --forest: #3d5a46;
  --forest-soft: #e4ece6;
  --gold: #b8862a;
  --gold-soft: #f6ead0;
  --x-ink: #1a1714;
  --venmo: #3b7cb8;
  --venmo-dark: #2c628f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 28px rgba(42, 34, 26, 0.08);
  --shadow-sm: 0 2px 8px rgba(42, 34, 26, 0.06);
  --max: 1120px;
  --prose: 44rem;
  --header-h: 4.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", "Source Sans Pro", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(196, 92, 38, 0.08), transparent 55%),
    radial-gradient(900px 500px at -10% 100%, rgba(61, 90, 70, 0.07), transparent 50%),
    var(--bg);
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

[hidden],
.btn[hidden] {
  display: none !important;
}


h1, h2, h3, h4, .brand-name, .tagline {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.35rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bg-elev);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand img,
.brand svg {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex: none;
}
.brand-name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--accent-dark); }
.brand:hover .brand-name { color: var(--accent-dark); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.15rem;
  justify-content: flex-end;
}
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

/* Hero */
.hero {
  padding: 3.75rem 0 3rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.15rem, 6.2vw, 3.6rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}
.tagline {
  margin: 0;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
}
.hero-rule {
  width: 3.5rem;
  height: 3px;
  background: var(--accent);
  border: 0;
  border-radius: 2px;
  margin: 1.5rem auto 0;
}

/* About */
.about {
  padding: 0 0 3.25rem;
}
.about-card {
  max-width: 42rem;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.about-card h2 {
  font-family: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--accent-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.about-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

/* Project cards */
.projects {
  padding: 0 0 4.5rem;
}
.section-title {
  text-align: center;
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.45rem 1.4rem 1.3rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-height: 100%;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d3b49a;
  color: inherit;
}
.card-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 0.45rem;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}
.card p {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  flex: 1;
  font-size: 1.02rem;
}
.card-cta {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-dark);
}
.card:hover .card-cta { color: var(--accent); }

/* Footer + support */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-tint) 70%, var(--bg));
  padding: 2.25rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.75rem 2rem;
  align-items: end;
}
.support-label {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.support-note {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 34rem;
}
.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.2;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn-x {
  background: var(--x-ink);
  color: #fff8ef;
}
.btn-x:hover { background: #000; color: #fff8ef; }
.btn-venmo {
  background: var(--venmo);
  color: #fff;
}
.btn-venmo:hover { background: var(--venmo-dark); color: #fff; }
.btn-card {
  background: var(--bg-elev);
  color: var(--ink);
  border-color: var(--line);
}
.footer-meta {
  text-align: right;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-meta p { margin: 0 0 0.25rem; }
.footer-meta a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.footer-meta a:hover { color: var(--accent-dark); text-decoration: underline; }

/* Guide page */
.guide-main {
  padding: 2.25rem 0 4rem;
}
.article {
  max-width: var(--prose);
  margin: 0 auto;
}
.article > .wrap,
.article {
  max-width: var(--prose);
}
.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 0.7rem;
}
.kicker span + span::before {
  content: "·";
  margin: 0 0.55rem;
  opacity: 0.55;
}
.article h1 {
  font-size: clamp(2rem, 5.5vw, 2.85rem);
  font-weight: 700;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}
.article h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin: 2.6rem 0 0.85rem;
  padding-top: 0.4rem;
}
.article h3 {
  font-size: 1.22rem;
  margin: 1.85rem 0 0.55rem;
}
.article p { margin: 0 0 1rem; }
.article .lede { font-size: 1.16rem; color: var(--ink); }
.article ul, .article ol { margin: 0 0 1.15rem; padding-left: 1.25rem; }
.article li { margin: 0 0 0.55rem; }
.article li::marker { color: var(--accent-dark); font-weight: 600; }

.disclaimer {
  background: var(--gold-soft);
  border: 1px solid #e0c78a;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem 0.95rem 1.15rem;
  margin: 0 0 1.5rem;
  color: var(--ink);
  font-size: 1.02rem;
}
.disclaimer p { margin: 0; }
.disclaimer strong { font-weight: 700; }
.disclaimer-bottom { margin: 1.75rem 0 0; }

.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3.3rem;
  margin: 0 0 0.55rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.75rem;
  top: 0.85rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fffaf4;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: "Source Sans 3", sans-serif;
}

.rule-box {
  background: var(--forest-soft);
  border: 1px solid #c7d4cb;
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem 1.05rem;
  margin: 0 0 1.4rem;
}
.rule-box h3 { margin-top: 0; color: var(--forest); }
.rule-box p:last-child { margin-bottom: 0; }

.more-below {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 2.2rem 0 0.25rem;
}
.more-below::before,
.more-below::after {
  content: "";
  display: inline-block;
  width: 2.2rem;
  height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 0.7rem;
}

figure.chart {
  margin: 1.4rem 0 1.7rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
figure.chart img {
  width: 100%;
  background: #111;
}
figure.chart figcaption {
  padding: 0.8rem 1rem 0.95rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
  background: var(--bg-elev);
}
figure.chart figcaption strong {
  color: var(--ink);
  font-weight: 700;
}

.defs { padding: 0; margin: 0 0 1.2rem; }
.defs > div {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 0.4rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.defs dt {
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.defs dd { margin: 0; color: var(--ink-soft); }

.pattern-list > li { margin-bottom: 0.75rem; }

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  min-width: 28rem;
}
th, td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--bg-tint);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
tr:last-child td { border-bottom: 0; }

.toc {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem 1.05rem;
  margin: 0 0 1.75rem;
}
.toc h2 {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 0.45rem;
  padding: 0;
}
.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 1;
}
.toc li { margin: 0.2rem 0; }
.toc a { text-decoration: none; font-weight: 600; color: var(--ink-soft); }
.toc a:hover { color: var(--accent-dark); text-decoration: underline; }

.support-block {
  margin: 2.5rem 0 0;
  padding: 1.4rem 1.4rem 1.3rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.support-block .support-label { margin-bottom: 0.35rem; }
.support-block .support-note { margin-bottom: 0.95rem; max-width: none; }

.version-list { padding-left: 1.15rem; }
.muted { color: var(--muted); }

/* 404 */
.page-simple {
  max-width: 32rem;
  margin: 0 auto;
  padding: 4rem 0 5rem;
  text-align: center;
}
.page-simple h1 { font-size: 2.2rem; margin-bottom: 0.6rem; }

@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .defs > div { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (max-width: 520px) {
  body { font-size: 1.05rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .site-header .wrap {
    min-height: 3.7rem;
    padding-top: 0.35rem;
    padding-bottom: 0.45rem;
    flex-wrap: wrap;
  }
  .brand-name { font-size: 1.05rem; }
  .nav { width: 100%; justify-content: flex-start; }
  .nav a { padding: 0.3rem 0.55rem 0.3rem 0; font-size: 0.92rem; }
  .about-card, .card, .support-block { padding-left: 1.15rem; padding-right: 1.15rem; }
  .steps li { padding-left: 3.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .card:hover { transform: none; }
}

@media print {
  .site-header, .site-footer, .toc, .support-block, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .article { max-width: none; }
  .disclaimer, figure.chart, .rule-box, .steps li { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
