@font-face {
  font-family: "Fraunces";
  src: url("../fonts/web/Fraunces-Regular.woff2") format("woff2"), url("../fonts/Fraunces-Regular.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/web/Fraunces-Bold.woff2") format("woff2"), url("../fonts/Fraunces-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/web/IBMPlexSans-Regular.woff2") format("woff2"), url("../fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/web/IBMPlexSans-SemiBold.woff2") format("woff2"), url("../fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/web/IBMPlexSans-Italic.woff2") format("woff2"), url("../fonts/IBMPlexSans-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #1c2a24;
  --ink-soft: #3d4f47;
  --paper: #f6f1e6;
  --paper-2: #efe6d4;
  --leaf: #2c6a56;
  --leaf-dark: #1d473a;
  --clay: #b85c38;
  --rule: #d9d0c1;
  --white: #fffdf8;
  --danger: #8b2e1f;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Atkinson Hyperlegible", system-ui, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
h1, h2, h3, .logo {
  font-family: "Fraunces", "Palatino Linotype", "Palatino", serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--leaf-dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0.2rem 0 0.8rem; }
h2 { font-size: 1.5rem; }
a { color: var(--leaf); }
a:hover { color: var(--clay); }
.wrap { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; }
.narrow { width: min(740px, calc(100% - 2rem)); }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 1rem; background: var(--white); padding: 0.3rem 0.6rem; }
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 5;
}
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.9rem 0; }
.logo { font-size: 1.45rem; text-decoration: none; color: var(--leaf-dark); }
nav a { margin-left: 1.1rem; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
nav a:hover { color: var(--leaf); }
.hero { padding: 3rem 0 2rem; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 2.5rem; align-items: start; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 600; color: var(--clay); margin: 0 0 0.6rem; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 38rem; }
.hero-card, .pay-box, .upload, .product-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 8px 24px rgba(28, 42, 36, 0.04);
}
.hero-card ul { padding-left: 1.1rem; margin: 0.4rem 0 0; }
.hero-card li { margin: 0.35rem 0; }
.upload label, .upload input, .upload button { display: block; }
.upload input[type="file"] { margin: 0.4rem 0 1rem; }
button, .button {
  background: var(--leaf);
  color: var(--white);
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .button:hover { background: var(--leaf-dark); color: white; }
button:disabled { background: #8aa397; cursor: not-allowed; }
.button.secondary { background: transparent; color: var(--leaf-dark); border: 1px solid var(--leaf); }
.hint, .muted, .foot-note { color: var(--ink-soft); font-size: 0.92rem; }
.band { background: var(--paper-2); padding: 2.6rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.intro { max-width: 36rem; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.4rem 0; }
.product-card { text-decoration: none; color: inherit; display: block; }
.product-card h3, .product-card h2 { margin-top: 0; font-size: 1.25rem; }
.product-card h2 a, .product-card h3 a { text-decoration: none; color: var(--leaf-dark); }
.shop-group { margin-top: 2rem; }
.related-packs ul { padding-left: 1.2rem; }
.related-packs li { margin: .4rem 0; }
.price { font-weight: 600; color: var(--leaf-dark); margin-bottom: 0; }
.price.large { font-size: 1.6rem; }
.table-wrap { overflow: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--white); margin: 1rem 0 1.4rem; }
.preview-table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.preview-table th, .preview-table td { border-bottom: 1px solid var(--rule); padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; }
.preview-table th { background: #e7f0ec; }
.flash { background: #f8e6df; border: 1px solid #e8b8a6; color: var(--danger); padding: 0.7rem 1rem; border-radius: 12px; }
.empty { background: var(--white); border: 1px dashed var(--rule); padding: 1rem 1.1rem; border-radius: 12px; }
.pay-box { margin: 1.4rem 0; }
.downloads { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.site-footer { border-top: 1px solid var(--rule); margin-top: 3rem; }
.foot-links a { margin-right: 1rem; }
.foot-brand, .foot-note { margin: 0.2rem 0; }
.legal h1 { margin-bottom: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-link { font-weight: 600; }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  nav a { margin-left: 0.7rem; }
}
.product-card img, .product-hero img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); background: #fff; }
.product-hero { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2rem; align-items: start; padding: 2rem 0; }
.product-hero ul { padding-left: 1.1rem; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.6rem; }
.notice { background: #e7f0ec; border: 1px solid #b9d3c8; padding: 0.8rem 1rem; border-radius: 12px; }
.faq dt { font-weight: 600; margin-top: 1rem; }
.faq dd { margin: 0.2rem 0 0; }
.test-banner { background: #fff3cd; color: #5c4400; text-align: center; font-size: 0.85rem; padding: 0.3rem; }
@media (max-width: 800px) { .product-hero { grid-template-columns: 1fr; } }
.pay-box form { margin: 0.6rem 0; }
.secondary-pay { background: var(--clay); }
.launch { display: block; font-size: 0.8rem; font-weight: 400; }
.redeem input { font: inherit; padding: 0.5rem; border: 1px solid var(--rule); border-radius: 10px; min-width: 18rem; margin: 0.3rem 0.4rem 0.3rem 0; }
.code-box code { font-size: 1.3rem; background: var(--white); border: 1px dashed var(--leaf); padding: 0.4rem 0.7rem; border-radius: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.gallery img { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--white); }
.nowrap { white-space: nowrap; }
/* bank-CSV tidy */
.map-form label { display: block; margin: 0.4rem 0; }
.map-form select, .tidy-table select, .by-payee select { font: inherit; padding: 0.25rem; max-width: 100%; }
.map-form fieldset { border: 1px solid var(--rule); margin: 0.6rem 0; }
.mapping, .by-payee { margin: 1rem 0; }
.mapping summary, .by-payee summary { cursor: pointer; font-weight: 600; }
.preview-table td.num { text-align: right; }
.preview-table tr.excluded td { color: var(--ink-soft); text-decoration: line-through; }
.plain { list-style: none; padding-left: 0; }
.api-docs pre.sample { background: var(--white); border: 1px solid var(--rule); border-radius: 10px; padding: 0.7rem 0.9rem; overflow-x: auto; font-size: 0.85rem; }
.api-docs .pay-box button { margin: 0.2rem 0; }

/* Affiliate links box (rimuleaf/affiliate.py): plain, clearly labelled, below the main content */
.affiliate-box { margin: 2rem 0 1rem; padding: 1rem 1.2rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper-2); }
.affiliate-box h2 { margin: 0 0 .5rem; font-size: 1.05rem; }
.affiliate-box ul { margin: 0 0 .6rem; padding-left: 1.2rem; }
.aff-tag { display: inline-block; font-size: .78rem; font-weight: 700; border: 1px solid var(--ink-soft); border-radius: 4px; padding: 0 .35rem; margin: 0 .25rem; }
.aff-disclosure { margin: 0; }

.refund-summary { color: var(--ink-soft); font-size: 0.92rem; margin: 0.6rem 0; }
/* home: shop by category */
.home-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem 2rem; }
.home-category h3 { margin: 0 0 0.4rem; }
.home-category ul { margin: 0; padding-left: 1.1rem; }
/* free printable landing pages */
.free-samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.free-samples figure { margin: 0; }
.free-samples img { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--white); }
.free-samples figcaption { font-size: 0.92rem; margin-top: 0.4rem; color: var(--ink-soft); }
.free-pack-box { border: 1px solid var(--rule); border-radius: 12px; background: var(--paper-2); padding: 0.2rem 1.2rem 0.6rem; margin: 1.6rem 0; }
.free-pack-box h2 { margin-top: 0.8rem; }
