/* The public site.
 *
 * The palette and the type are the extension's, copied rather than imported:
 * tokens.css carries a hundred variables for a UI this site does not have, and
 * a website that pulls in an extension stylesheet breaks the moment either one
 * moves. What matters is that a person arriving from the Web Store listing
 * recognises the thing they are about to install.
 *
 * No script, no analytics, no third-party request. The fonts are the same
 * vendored files the extension ships. A privacy policy that phones home while
 * you read it is not one.
 */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('./fonts/archivo-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/bodoni-moda-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('./fonts/bodoni-moda-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('./fonts/ibm-plex-mono-normal-500.woff2') format('woff2');
}

:root {
  --bg: #f6f4ee;
  --surface: #fdfcf9;
  --line: #e2ded4;
  --hair: #f1efe6;
  --text: #1b1a17;
  --body: #3d3a2e;
  --muted: #8b8778;
  --faint: #b0ab99;
  --accent: #6d6a30;
  --tint: #f1efdf;

  --serif: 'Bodoni Moda', 'Bodoni MT', Didot, Georgia, serif;
  --sans: Archivo, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, ui-monospace, monospace;

  /* paper.css renders the hero invoice and asks for the app's own font tokens
   * by their app names. Aliased rather than duplicated, so the document on the
   * front page is set in exactly what the printed one is set in. */
  --s-serif: var(--serif);
  --s-sans: var(--sans);
  --s-mono: var(--mono);

  /* 4pt scale. Semantic names, because "the space between a heading and its
   * section" survives a redesign and "24px" does not. */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
}

/* Two ways in, on purpose.
 *
 * A head script resolves the theme once, before first paint, from the stored
 * choice or the machine's, and stamps data-theme. Everything below keys off
 * that. The media query is only the no-JavaScript fallback, which is why it is
 * scoped to the case where nothing has been stamped: with script running,
 * data-theme is always present and the explicit choice always wins.
 *
 * The values are written twice rather than aliased because CSS has no way to
 * share a declaration block between a media query and an attribute selector.
 * Keep them in step. */
:root[data-theme='dark'] {
    --bg: #131209;
    --surface: #1c1b14;
    --line: #333025;
    --hair: #272419;
    --text: #f2efe4;
    --body: #ddd8c8;
    --muted: #9c9583;
    --faint: #6d6757;
    --accent: #b3ae62;
    --tint: #2a2718;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #131209;
    --surface: #1c1b14;
    --line: #333025;
    --hair: #272419;
    --text: #f2efe4;
    --body: #ddd8c8;
    --muted: #9c9583;
    --faint: #6d6757;
    --accent: #b3ae62;
    --tint: #2a2718;
  }
}

/* Same-origin navigation crossfades instead of blinking white.
 *
 * Clicking through from the site to the editor is a full document navigation,
 * and the gap between the old page going and the new one painting is the part
 * that feels cheap. Chrome does the crossfade natively from this one rule;
 * browsers that do not support it simply navigate as before, so there is
 * nothing to fall back to and nothing to ship. */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--text); }

:where(a):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- chrome ---------------------------------------------------------- */

/* Two widths, deliberately.
 *
 * 720px is right for the legal documents: they are read start to finish and a
 * long measure is fatiguing. It is wrong for the front page, where a column
 * that narrow on a laptop reads as an unfinished layout rather than restraint.
 * The front page opts into the wide track by carrying `.front`. */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* The front page runs to the width of the screen it is on, held off the edges
 * rather than pinned to a column. A fixed 1200px looks the same on a 1366
 * laptop and a 2560 monitor, and on the monitor it reads as a phone layout that
 * forgot to grow. The ceiling exists only so a very wide display does not
 * stretch a line of body text past the point it can be read. */
.wrap:has(.front) {
  max-width: min(1680px, 92vw);
  padding: 0 clamp(24px, 3vw, 56px);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 0;
  flex-wrap: wrap;
}

.mark {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .01em;
  color: var(--text);
  text-decoration: none;
}

.top nav { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }

/* The one thing the site is for. It sits at the end of the nav, which puts it
 * in the top right corner, and it is the only filled control above the fold. */
.top nav a.cta {
  color: var(--bg);
  background: var(--text);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity .16s ease;
}
.top nav a.cta:hover, .top nav a.cta[aria-current] { color: var(--bg); opacity: .84; }

@media (max-width: 520px) {
  .top { gap: 12px; }
  .top nav { gap: 14px; font-size: 12px; }
  .top nav a.cta { padding: 8px 14px; }
}

/* ---- the theme dial ----------------------------------------------------
 * The same two-state control the extension carries in its sidebar, so the site
 * and the app agree, and the choice is stored under the same key so it travels
 * from one to the other. */

.dial {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.dial button {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 11px;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.dial button:hover { color: var(--text); }
.dial button[aria-pressed='true'] {
  background: var(--text);
  color: var(--bg);
}
.dial button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .dial button { transition: none; }
}

.foot {
  margin: 72px 0 0;
  border-top: 1px solid var(--hair);
  padding: 22px 0 48px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--faint);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ---- the documents ---------------------------------------------------- */

main { padding-top: 56px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 14px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 7vw, 46px);
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 0 0 20px;
}

.intro {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 8px;
  text-wrap: pretty;
}

section { margin-top: 40px; }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 10px;
}

p { margin: 0 0 14px; text-wrap: pretty; }


/* The document.
 *
 * This is the only surface that ignores the theme. It is paper: it prints, it
 * gets forwarded, it lands in someone's accounts folder. So it hardcodes the
 * light palette rather than reading --s-* tokens, and dark mode leaves it
 * alone. Only --paper-accent / --paper-tint come from outside.
 */

.sb-paper {
  --paper-accent: #6d6a30;
  --paper-tint: #f1efdf;
  --paper-ink: #1b1a17;
  --paper-body: #5c584c;
  --paper-muted: #8b8778;
  --paper-faint: #b0ab99;
  --paper-rule: #eae6db;

  width: 816px;
  min-height: 1056px;
  background: #fdfcf9;
  color: var(--paper-ink);
  border: 1px solid #e2ded4;
  border-radius: 4px;
  box-shadow: 0 30px 60px -34px rgba(27, 26, 23, 0.3);
  padding: 88px 80px 64px;
  display: flex;
  flex-direction: column;
  font-family: var(--s-sans);
  flex: 0 0 auto;
}

.sb-paper[data-size='a4'] { width: 794px; min-height: 1123px; }

.sb-paper .p-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}
.sb-paper .p-title {
  font-family: var(--s-serif);
  font-size: 66px;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.sb-paper .p-ref {
  font-family: var(--s-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--paper-accent);
  margin-top: 10px;
}
.sb-paper .p-from { text-align: right; display: flex; flex-direction: column; gap: 11px; align-items: flex-end; }
.sb-paper .p-logo { max-height: 52px; max-width: 200px; object-fit: contain; margin-bottom: 2px; }
.sb-paper .p-from b { font-size: 14px; font-weight: 600; }
.sb-paper .p-from address {
  font-family: var(--s-mono);
  font-size: 11px;
  line-height: 1.9;
  color: var(--paper-muted);
  font-style: normal;
}

.sb-paper .p-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-top: 88px;
}
.sb-paper .p-meta section { display: flex; flex-direction: column; gap: 11px; }
.sb-paper .p-cap {
  font-family: var(--s-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.sb-paper .p-meta b { font-size: 14px; font-weight: 600; }
.sb-paper .p-meta .val { font-size: 14px; }
.sb-paper .p-meta address {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--paper-body);
  font-style: normal;
}
.sb-paper .p-meta small { font-size: 12.5px; color: var(--paper-muted); }

.sb-paper .p-items { margin-top: 96px; display: flex; flex-direction: column; }
.sb-paper .p-items .p-row {
  display: grid;
  grid-template-columns: 1fr 96px 140px;
  gap: 24px;
  align-items: baseline;
}
.sb-paper .p-items .p-row.head { padding-bottom: 20px; }
.sb-paper .p-items .p-row.head span {
  font-family: var(--s-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.sb-paper .p-items .p-row.item {
  padding: 20px 0;
  border-top: 1px solid var(--paper-rule);
  break-inside: avoid;
}
.sb-paper .p-items .p-row.item:last-child { border-bottom: 1px solid var(--paper-rule); }
.sb-paper .p-items .desc { font-size: 15px; }
.sb-paper .p-items .desc small {
  display: block;
  font-size: 11.5px;
  color: var(--paper-muted);
  margin-top: 4px;
}
.sb-paper .p-items .qty {
  text-align: right;
  font-family: var(--s-mono);
  font-size: 12px;
  color: var(--paper-muted);
}
.sb-paper .p-items .amt {
  text-align: right;
  font-family: var(--s-mono);
  font-size: 14px;
}

.sb-paper .p-foot {
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 56px;
  break-inside: avoid;
}
.sb-paper .p-note { max-width: 300px; display: flex; flex-direction: column; gap: 8px; }
.sb-paper .p-note p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--paper-body);
  text-wrap: pretty;
  white-space: pre-wrap;
}
.sb-paper .p-due { text-align: right; display: flex; flex-direction: column; gap: 7px; }
.sb-paper .p-due .p-cap { color: var(--paper-accent); letter-spacing: 0.18em; }
.sb-paper .p-due .big {
  font-family: var(--s-serif);
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.sb-paper .p-due small { font-size: 12px; color: var(--paper-muted); }

.sb-paper .p-pay {
  margin-top: 40px;
  background: var(--paper-tint);
  border-radius: 6px;
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  break-inside: avoid;
}
.sb-paper .p-pay p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: #2b291c;
  white-space: pre-wrap;
}

.sb-paper .p-tail {
  margin-top: auto;
  padding-top: 48px;
  font-family: var(--s-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--paper-faint);
}

/* ---- the stamp --------------------------------------------------------
 *
 * A watermark across the whole document, the way an invoice comes back from
 * a company: centred, enormous, rotated, and behind everything. It used to be
 * a small mark in the top right corner, sitting on top of the business logo —
 * two things fighting for one corner, and the logo lost.
 *
 * It sits under the content on purpose. A watermark that obscures the amount
 * is not a watermark, it is a redaction, so this is pale enough to read
 * straight through and the document keeps a layer above it.
 *
 * Both states get one. Paid takes the accent's own tint; overdue is the one
 * place on this paper that is allowed to be red, because a client looking at
 * an overdue invoice should not have to find that out from the small print. */
.sb-paper .p-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--s-serif);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.14em;
  transform: translate(-50%, -50%) rotate(-24deg);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
/* Sized so each word lands at roughly three quarters of the page width —
 * PAID has four letters to spend it on and OVERDUE has eight, so they cannot
 * share a font size and still look like the same stamp. */
.sb-paper .p-stamp.paid {
  font-size: 196px;
  color: var(--paper-accent);
  opacity: .12;
}
.sb-paper .p-stamp.overdue {
  font-size: 116px;
  color: #8a4230;
  opacity: .12;
}

/* Everything else on the page rides above the watermark. */
.sb-paper > * { position: relative; z-index: 1; }
.sb-paper > .p-stamp { z-index: 0; }
.sb-paper { position: relative; }

/* ---- printing -------------------------------------------------------
 * Print pulls the .sb-paper block out of whatever surface it is sitting in and
 * makes it the only thing on the page, so the same markup serves preview and
 * PDF export with no second renderer to keep in step. */

/* ---- the paged shell ---------------------------------------------------
 * From the print design. The document is wrapped in a single-cell table for
 * one reason: a browser repeats <thead> and <tfoot> on every printed page and
 * repeats nothing else. There is no CSS property that does this, and there has
 * not been one for twenty years.
 *
 * The cells are spacers. They reserve a strip at the top and bottom of every
 * sheet, and the running lines are drawn inside them, so a second page carries
 * the invoice number, the business, when payment is due and where to reply.
 * A page that can be separated from its first page has to be able to identify
 * itself; a column of figures on plain paper cannot.
 *
 * On screen the preview is one continuous sheet, so the runners are hidden.
 * Showing them there would invent a page boundary that does not exist.
 */
.sb-paper .p-sheet { width: 100%; border-collapse: collapse; }
.sb-paper .p-sheet > tbody > tr > td { padding: 0; }
.sb-paper .p-run { display: none; }

@media print {
  .sb-paper .p-run { display: table-header-group; }
  .sb-paper .p-run-foot { display: table-footer-group; }
  /* The gap between a runner and the page body is PADDING on the cell, never
   * margin on anything inside it. Chrome does not carry the spacers' vertical
   * margins onto pages after the first (WebKit bug 17205), so a margin here
   * would space the first page correctly and let every later page's header sit
   * on top of the content. The print design's own component carries the same
   * warning, and it is the sort of thing that only shows up on page two of a
   * long invoice — which is to say, at a client's desk. */
  .sb-paper .p-run-head > tr > td { padding: 0 0 18pt; }
  .sb-paper .p-run-foot > tr > td { padding: 18pt 0 0; }

  .sb-paper .p-runline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24pt;
    font-family: var(--s-mono);
    font-size: 8pt;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--paper-faint);
  }
  .sb-paper .p-run-head .p-runline { padding-bottom: 9pt; border-bottom: 1px solid var(--paper-rule); }
  .sb-paper .p-run-foot .p-runline { padding-top: 9pt; border-top: 1px solid var(--paper-rule); }

  /* Nothing that reads as one thing may be split across two sheets. A line
   * item torn in half, or a total separated from the figures above it, is the
   * kind of thing a client queries rather than pays. */
  .sb-paper .p-row,
  .sb-paper .p-meta,
  .sb-paper .p-foot,
  .sb-paper .p-pay,
  .sb-paper .p-head { break-inside: avoid; }

  /* The heading row of the items table repeats where the table itself breaks,
   * so a continued list still says which column is which. */
  .sb-paper .p-row.head { break-after: avoid; }
}

@media print {
  @page { size: var(--print-size, letter) portrait; margin: 0; }

  html, body {
    background: #fff !important;
    height: auto;
  }
  body > *:not(.print-root) { display: none !important; }

  .print-root { display: block !important; position: static !important; }
  .print-root .sb-paper {
    box-shadow: none;
    border: 0;
    border-radius: 0;
    margin: 0;
    width: 100%;
    min-height: 100vh;
  }
  /* The watermark must survive the print colour pass, or a paid invoice
   * prints looking unpaid. */
  .sb-paper .p-stamp { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* ==========================================================================
   THE FRONT PAGE
   Wide track only. The legal documents keep their 720px reading column.
   Concatenated onto site.css at build time; served as one stylesheet.
   ========================================================================== */

.front {
  --band-pad: clamp(32px, 4vw, 56px);
  padding-top: clamp(40px, 5vw, 72px);
}
.front section { margin-top: 0; }

.free {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--tint);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: var(--space-lg);
}

/* ---- hero ---------------------------------------------------------------
 * Asymmetric on purpose: the words take the smaller half. The document is the
 * thing being sold, so it gets the room. */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-bottom: clamp(48px, 6vw, 84px);
}

.hero-words { max-width: 30em; }

.hero h1 {
  font-size: clamp(46px, 6.4vw, 88px);
  line-height: .96;
  letter-spacing: -.025em;
  margin: 0 0 var(--space-lg);
}
.hero h1 em { font-style: italic; color: var(--accent); }

.hero .intro {
  font-size: clamp(17px, 1.25vw, 19px);
  color: var(--body);
  max-width: 34ch;
  margin: 0;
}

.actions {
  margin-top: var(--space-xl);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
}

/* ---- the document itself ------------------------------------------------
 * paper.css sizes .sb-paper in real inches so it prints correctly, so it is
 * scaled here rather than restyled. A transform keeps the type metrics and the
 * rules exactly as they print; overriding the width would reflow them into
 * something that is no longer the real document.
 *
 * The transform does not affect layout, so the frame holds its own ratio and
 * clips, and the sheet fades out at the bottom rather than ending on a cut. */

.hero-paper { perspective: 1800px; }

.paper-frame {
  --sheet: 8.5in;
  --scale: .58;
  position: relative;
  width: calc(var(--sheet) * var(--scale));
  max-width: 100%;
  aspect-ratio: 85 / 96;
  margin-inline: auto;
  border-radius: 4px;
  overflow: hidden;
  background: #fdfcf9;
  box-shadow:
    0 1px 1px color-mix(in oklab, var(--text) 6%, transparent),
    0 8px 20px -6px color-mix(in oklab, var(--text) 14%, transparent),
    0 40px 70px -30px color-mix(in oklab, var(--text) 32%, transparent);
  transform: rotateY(-3.5deg) rotateX(1.5deg);
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.hero-paper:hover .paper-frame { transform: rotateY(0deg) rotateX(0deg); }

.paper-frame .sb-paper {
  transform: scale(var(--scale));
  transform-origin: top left;
  width: var(--sheet);
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}

.paper-frame::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 96px;
  background: linear-gradient(to bottom, rgba(253, 252, 249, 0), #fdfcf9);
  pointer-events: none;
}

@media (min-width: 1200px) { .paper-frame { --scale: .68; } }
@media (min-width: 1500px) { .paper-frame { --scale: .78; } }
@media (min-width: 1800px) { .paper-frame { --scale: .88; } }

@media (prefers-reduced-motion: reduce) {
  .paper-frame { transform: none; transition: none; }
  .hero-paper:hover .paper-frame { transform: none; }
}

/* ---- the one-line argument ---------------------------------------------- */

.band {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: var(--band-pad) 0;
}
.band .lede {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.18;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 0;
}
.band-note p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 40ch;
}

.section-head {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 var(--space-xl);
}

/* ---- what it does -------------------------------------------------------- */

.points { padding: var(--band-pad) 0; }

.point-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(28px, 3.5vw, 56px) clamp(24px, 3vw, 48px);
}
.point-grid article { max-width: 34ch; }
.point-grid .n {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--accent);
  margin: 0 0 var(--space-sm);
}
.point-grid h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 var(--space-xs);
}
.point-grid p { margin: 0; color: var(--body); font-size: 15px; }

/* ---- privacy -------------------------------------------------------------
 * A ledger rather than four more cards. The claims are a column of figures,
 * and a column of figures is what an invoicing app ought to set them as. */

.privacy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding: var(--band-pad) 0;
  border-top: 1px solid var(--hair);
}
.privacy h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 var(--space-lg);
  max-width: 16ch;
}
.privacy h2 em { font-style: italic; color: var(--accent); }
.privacy p { color: var(--body); max-width: 42ch; }
.privacy .fine { font-size: 14px; color: var(--muted); margin: 0; }

.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--hair);
}
.ledger li:first-child { border-top: 1px solid var(--hair); }
.ledger span { flex: 1; font-size: 15px; color: var(--body); }
.ledger b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

/* ---- asked often --------------------------------------------------------- */

.asked {
  padding: var(--band-pad) 0;
  border-top: 1px solid var(--hair);
}
.asked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(28px, 3.5vw, 48px);
}
/* Six questions. Capped at three columns so they fall as two full rows rather
 * than four and a gap-toothed two. */
@media (min-width: 1100px) {
  .asked-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.asked-grid h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin: 0 0 var(--space-xs);
}
.asked-grid p { margin: 0; font-size: 15px; color: var(--body); max-width: 44ch; }

/* ---- closing -------------------------------------------------------------- */

.close {
  text-align: center;
  padding: clamp(56px, 7vw, 104px) 0 clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--hair);
}
.close h2 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -.025em;
  margin: 0 0 var(--space-md);
}
.close p { color: var(--body); margin: 0 auto var(--space-xl); max-width: 40ch; }
.close h2, .close p { margin-inline: auto; }

/* ---- buttons -------------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 9px;
  padding: 12px 22px;
  transition: opacity .18s ease, transform .18s ease;
}
.btn:hover { color: var(--bg); opacity: .88; transform: translateY(-1px); }
.btn.lg { font-size: 15px; padding: 15px 30px; }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.ghost:hover { color: var(--text); border-color: var(--text); }

.aside { font-size: 14px; color: var(--muted); }

/* ---- narrower than a laptop ----------------------------------------------- */

@media (max-width: 900px) {
  .hero, .privacy, .band { grid-template-columns: minmax(0, 1fr); }
  .band { gap: var(--space-lg); }
  .hero { gap: var(--space-2xl); }
  .hero-words { max-width: none; }
  .paper-frame { --scale: .46; transform: none; }
  .band .lede { max-width: none; }
}

@media (max-width: 560px) {
  .wrap:has(.front) { padding: 0 20px; }
  .front { padding-top: 40px; }
  .paper-frame { --scale: .38; }
}

/* ---- planned pricing -----------------------------------------------------
 * Three cards, and one of them is marked. The middle card is not enlarged or
 * lifted off the row: it carries the accent border and a small flag, which is
 * enough to say "this one" without shouting, and it keeps the three baselines
 * aligned so the prices can actually be compared.
 *
 * The calls to action are spans, not links or buttons. Nothing here can be
 * bought yet and a control that looks pressable but does nothing is worse than
 * one that plainly is not. */

.plans {
  padding: var(--band-pad) 0;
  border-top: 1px solid var(--hair);
}

.plans-note {
  max-width: 62ch;
  margin: 0 0 var(--space-xl);
  font-size: 15px;
  color: var(--muted);
}
.plans-note b { color: var(--text); font-weight: 600; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(16px, 1.6vw, 24px);
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: clamp(24px, 2.2vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 24px 48px -34px color-mix(in oklab, var(--text) 55%, transparent);
}

.plan .flag {
  position: absolute;
  top: -9px;
  left: clamp(24px, 2.2vw, 32px);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.plan-name {
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.plan-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.plan-price span {
  font-family: var(--serif);
  font-size: clamp(38px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--text);
}
.plan-price small { font-size: 13px; color: var(--muted); }

.plan-blurb {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--body);
}

.plan-lines {
  list-style: none;
  margin: 0;
  padding: var(--space-sm) 0 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid var(--hair);
}
.plan-lines li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
}
/* An en dash rather than a tick. Two of these lines describe what a plan does
 * not do, and a row of ticks against "No recurring, reminders or expenses"
 * would be actively misleading. */
.plan-lines li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--faint);
}

.plan-cta {
  margin-top: auto;
  padding: 11px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 9px;
  font-size: 13px;
  color: var(--muted);
  cursor: default;
}
.plan.featured .plan-cta {
  border-style: dashed;
  border-color: color-mix(in oklab, var(--accent) 55%, transparent);
  color: var(--accent);
}

.plans-fine {
  margin: var(--space-lg) 0 0;
  font-size: 13px;
  color: var(--faint);
  max-width: 62ch;
}
