/* Afterdue — paper, ink, one green. */

:root {
  --paper: #f1ebe0;
  --paper-deep: #e7dfd0;
  --sheet: #fffcf6;
  --ink: #1a1914;
  --ink-2: #3a352c;
  --ink-3: #6d665a;
  --rule: #d2c9b6;
  --accent: #1a4a38;
  --accent-2: #14382b;
  --accent-wash: #dce8e1;
  --late: #7a2e22;
  --warn: #8a5a12;
  --max: 72rem; /* 1152; content sits inside 1280 canvas */
  --page: 80rem; /* 1280 */
  --serif: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 0 rgba(26, 25, 20, 0.04), 0 18px 50px -24px rgba(26, 25, 20, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  background:
    radial-gradient(ellipse 90% 40% at 100% 0%, rgba(26, 74, 56, 0.07), transparent 55%),
    radial-gradient(ellipse 60% 30% at 0% 10%, rgba(26, 25, 20, 0.04), transparent 50%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, .wordmark, .sheet-brand, .sheet-stamp, .price-amt {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}

h1, h2, h3 { margin: 0 0 0.5rem; color: var(--ink); }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-2); }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: var(--sheet);
  padding: 0.5rem 0.75rem;
  z-index: 20;
}
.skip:focus { top: 0.75rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
}

.kicker {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 600;
}

.wordmark:hover { color: var(--ink); }

.mark {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.nav-buy-mobile { display: inline-block; }

.nav {
  display: none;
  align-items: center;
  gap: 1.15rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.nav a:hover { color: var(--ink); }

.nav-buy {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
}

@media (min-width: 720px) {
  .nav { display: flex; }
  .nav-buy-mobile { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-ink {
  background: var(--ink);
  color: var(--sheet);
}

.btn-ink:hover { background: #000; color: var(--sheet); }

.btn-accent {
  background: var(--accent);
  color: #f4faf6;
}

.btn-accent:hover { background: var(--accent-2); color: #f4faf6; }

.btn-ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink-2);
}

.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-text {
  background: none;
  border: 0;
  padding: 0.35rem 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-text:hover { color: var(--accent-2); }

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Hero */
.hero {
  padding: 3.25rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.hero-inner { max-width: 42rem; }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.05;
  font-weight: 500;
  margin-bottom: 1.1rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-2);
  margin: 0 0 1.5rem;
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-3);
}

/* Sections */
.section-head { max-width: 38rem; margin-bottom: 1.75rem; }

.section-head h2 {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  line-height: 1.12;
}

.section-dek {
  margin: 0;
  color: var(--ink-2);
}

.invoice-section { padding: 2.75rem 0 3.5rem; }
.chase-section,
.pricing-section,
.faq-section { padding: 3.5rem 0; }
.chase-section,
.faq-section { border-top: 1px solid var(--rule); }

/* Invoice form */
.invoice-layout {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 980px) {
  .invoice-layout {
    grid-template-columns: minmax(18rem, 22.5rem) minmax(0, 1fr);
    align-items: start;
    gap: 2.25rem;
  }
  .preview-col { position: sticky; top: 4.25rem; }
}

.invoice-form {
  background: color-mix(in srgb, var(--sheet) 70%, var(--paper));
  border: 1px solid var(--rule);
  padding: 1rem 1rem 1.15rem;
}

fieldset {
  border: 0;
  margin: 0 0 1.1rem;
  padding: 0;
}

legend {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
  padding: 0;
}

label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

input, textarea {
  display: block;
  width: 100%;
  margin-top: 0.28rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--rule);
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  border-radius: 0;
}

input:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

textarea { resize: vertical; min-height: 4.5rem; }

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.65rem;
}

.meta-grid legend { grid-column: 1 / -1; }

.items-head {
  display: none;
}

.line-item {
  display: grid;
  grid-template-columns: 1fr 4.2rem 6.2rem auto;
  gap: 0.35rem;
  align-items: end;
  margin-bottom: 0.45rem;
}

.line-item label { margin: 0; }

.item-remove {
  height: 2.35rem;
  width: 2.15rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.item-remove:hover { border-color: var(--late); color: var(--late); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.form-hint {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* Preview */
.preview-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}

.preview-total { letter-spacing: 0; text-transform: none; color: var(--accent); font-size: 0.95rem; }

.invoice-sheet {
  background: var(--sheet);
  box-shadow: var(--shadow);
  border: 1px solid #cfc6b4;
  padding: 1.5rem 1.35rem 1.15rem;
  min-height: 28rem;
  position: relative;
}

.invoice-sheet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--accent);
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.sheet-brand {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

.sheet-quiet {
  margin: 0.2rem 0 0;
  color: var(--ink-3);
  font-size: 0.92rem;
}

.sheet-stamp {
  text-align: right;
}

.sheet-stamp span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--accent);
}

.sheet-stamp strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
}

.sheet-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
}

.sheet-label {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-3);
}

.sheet-strong { margin: 0; font-weight: 650; font-size: 1.05rem; }

.sheet-dates {
  margin: 0;
  display: grid;
  gap: 0.45rem;
  justify-items: end;
  text-align: right;
}

.sheet-dates div { margin: 0; }
.sheet-dates dt {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.sheet-dates dd { margin: 0; font-variant-numeric: tabular-nums; }

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

.sheet-table th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--ink);
}

.sheet-table td {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.sheet-table .num,
.sheet-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.sheet-totals {
  display: flex;
  justify-content: flex-end;
  padding: 0.9rem 0 1.1rem;
}

.sheet-totals-rows {
  width: min(100%, 16rem);
}

.sheet-totals-rows div {
  display: flex;
  justify-content: space-between;
  padding: 0.28rem 0;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.sheet-totals-rows .grand {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.sheet-bottom {
  display: grid;
  gap: 1rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--rule);
}

@media (min-width: 640px) {
  .sheet-bottom { grid-template-columns: 1fr 1fr; }
  .invoice-sheet { padding: 2rem 2.1rem 1.4rem; }
}

.sheet-pre {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.sheet-foot {
  margin: 1.4rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* Chase */
.chase-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 860px) {
  .chase-list { grid-template-columns: 1fr 1fr; }
  .chase-list li:last-child { grid-column: 1 / -1; }
}

.chase-list li {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.05rem 1.1rem;
}

.chase-list li:nth-child(4) { border-left-color: var(--warn); }
.chase-list li:nth-child(5) { border-left-color: var(--late); }

.chase-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--ink-3);
  margin-bottom: 0.35rem;
}

.chase-list h3 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.chase-subject {
  margin: 0 0 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.chase-body {
  margin: 0;
  color: var(--ink-2);
  position: relative;
}

.chase-body::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1.4rem;
  background: linear-gradient(transparent, var(--sheet));
  pointer-events: none;
}

.chase-foot {
  margin: 1.5rem 0 1rem;
  color: var(--ink-2);
  max-width: 38rem;
}

.center { text-align: center; }

/* Pricing */
.price-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 800px) {
  .price-grid { grid-template-columns: 1.2fr 0.8fr; align-items: stretch; }
}

.price-card,
.price-aside {
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 1.4rem 1.35rem 1.5rem;
}

.price-card-main { border-top: 6px solid var(--accent); }

.price-name {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

.price-amt {
  margin: 0.2rem 0;
  font-size: clamp(3.4rem, 8vw, 4.6rem);
  line-height: 1;
}

.price-amt span { font-size: 0.45em; vertical-align: super; margin-right: 0.05em; }

.price-once { margin: 0 0 1rem; color: var(--ink-2); }

.price-list,
.price-aside ul {
  margin: 0 0 1rem;
  padding: 0 0 0 1.1rem;
}

.price-list li,
.price-aside li { margin: 0.35rem 0; }

.price-legal {
  font-size: 0.88rem;
  color: var(--ink-3);
  margin: 0 0 1.1rem;
}

.price-aside h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.price-aside h3 + p,
.price-aside p { margin: 0; color: var(--ink-2); }

.price-aside h3:nth-of-type(2) { margin-top: 1.4rem; }

/* Buy */
.buy-section {
  padding: 3.5rem 0;
  background: var(--ink);
  color: #ece6d8;
}

.buy-section .kicker { color: #9dccb4; }
.buy-section h2 { color: #f7f1e4; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.buy-section .lede { color: #cfc6b4; }

.buy-inner { max-width: 38rem; }

.buy-placeholder {
  margin: 1rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px dashed #6d665a;
  color: #cfc6b4;
  font-size: 0.95rem;
}

.buy-section .btn-accent:disabled {
  opacity: 0.7;
}

/* FAQ */
.faq {
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.faq > div {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.faq dt {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 550;
  margin-bottom: 0.35rem;
}

.faq dd {
  margin: 0;
  color: var(--ink-2);
  max-width: 40rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.4rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
}

.foot-mark {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.site-footer p { margin: 0; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.25rem;
  align-items: center;
}

.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* Privacy page */
.legal-page { padding: 3rem 0 4rem; }
.legal-page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal-page .wrap { max-width: 40rem; }
.legal-page p { color: var(--ink-2); }

/* Print */
@media print {
  @page { size: letter; margin: 0.55in; }

  body {
    background: #fff;
    color: #111;
  }

  .no-print { display: none !important; }

  .invoice-section { padding: 0; }
  .wrap { width: 100%; }

  .invoice-layout { display: block; }

  .invoice-sheet {
    box-shadow: none;
    border: 0;
    padding: 0;
    min-height: 0;
  }

  .invoice-sheet::before { display: none; }

  .sheet-foot { color: #666; }
}

@media (max-width: 520px) {
  .line-item {
    grid-template-columns: 1fr 1fr auto;
  }
  .line-item .item-desc { grid-column: 1 / -1; }
  .sheet-parties { grid-template-columns: 1fr; }
  .sheet-dates { justify-items: start; text-align: left; }
}
