/* The site's design system: Brutalist Pop. Ink on paper, a flame accent, a
   yellow marker, thick rules and hard offset shadows. Sora for the headlines,
   Manrope for everything else.

   Everything here is a token or a component. A page uses classes, never
   inline colour. The public pages are built from the masthead, strip, clause
   and card components; the signed-in shell and the admin reuse the same
   buttons, tables, badges and notices, so one sheet dresses the whole site. */

/* The two families, served from this origin as one variable file each.
   Latin subsets: the pages are in English and the data is numbers. */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/sora-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --ink: #252525;
  --paper: #ffffff;
  --flame: #ff5722;
  --mark: #ffeb3b;
  /* 4.6:1 on paper; the handoff's #7a7a7a sat just under 4.5. */
  --muted: #757575;
  --red: #d32f2f;
  --green: #0b6b3a;

  --ink-65: rgba(37, 37, 37, 0.65);
  --ink-50: rgba(37, 37, 37, 0.5);
  --ink-20: rgba(37, 37, 37, 0.2);
  --ink-15: rgba(37, 37, 37, 0.15);
  --ink-10: rgba(37, 37, 37, 0.1);
  --ink-4: rgba(37, 37, 37, 0.04);
  --paper-70: rgba(255, 255, 255, 0.7);
  --mark-15: #fffde6;
  --mark-25: #fffbd0;
  --red-soft: #fdecea;
  --green-soft: #e8f4ed;

  /* The names the components were written against. */
  --ground: var(--paper);
  --surface: #f6f6f6;
  --surface-2: #e9e9e9;
  --ink-soft: var(--ink-65);
  --rule: var(--ink);
  --rule-soft: var(--ink-15);
  --accent: var(--flame);
  --accent-hover: var(--ink);
  --accent-ink: var(--paper);
  --accent-soft: var(--mark-25);

  --sans: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Sora", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 4px;
  --radius-btn: 3px;
  --shadow: 10px 10px 0 0 var(--ink);
  --shadow-flame: 10px 10px 0 0 var(--flame);
  --shadow-sm: 6px 6px 0 0 var(--ink);
  --scroll-shadow: rgba(37, 37, 37, 0.2);
}

/* ------------------------------------------------------------- structure */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}
img, svg { max-width: 100%; }
::selection { background: var(--mark); color: var(--ink); }

.wrap { max-width: 75rem; margin-inline: auto; padding-inline: 1.5rem; }

/* A section is a full-width row; the rule variant draws the thick line the
   pages use between one topic and the next. */
.section { padding: 3.5rem 0; }
.section--rule { border-top: 2px solid var(--ink); }
.section__head { display: grid; gap: 0.75rem; margin-bottom: 2.5rem; }
.section__head--row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }

/* Two columns whose proportions a page names: 5/7 for a text column beside a
   wide one, 7/5 the other way, 4/8 for a clause. */
.cols { display: grid; gap: 3rem; align-items: start; }
.cols--5-7 { grid-template-columns: 5fr 7fr; }
.cols--7-5 { grid-template-columns: 7fr 5fr; }
.cols--4-8 { grid-template-columns: 4fr 8fr; }

/* One band is a labelled row: the label in its own column, the content in
   another. The signed-in pages are built from it. */
.band {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1.5rem 3rem;
  padding: 3rem 0;
  border-top: 1px solid var(--ink-15);
}
.band--first { border-top: 0; padding-top: 2rem; }
.band--full { grid-template-columns: minmax(0, 1fr); }
.band--tight { padding: 2rem 0; }
.band__label { align-self: start; }
.band__label .mono { font-size: 1em; }
.band__body { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }

/* ------------------------------------------------------------ typography */

h1, h2, h3, h4 { margin: 0; font-family: var(--display); text-wrap: balance; }
h1 {
  font-size: clamp(2.75rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.02em;
}
h1.h1--masthead { font-size: clamp(3.5rem, 10vw, 8.5rem); }
h2 { font-size: clamp(1.875rem, 5vw, 2.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--flame); }

/* The marker: a thick yellow line under the words a headline lands on. */
.mark-under {
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.04em;
  text-decoration-skip-ink: none;
}

.label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--ink { color: var(--ink); }
.label--flame { color: var(--flame); }
.lede { font-size: 1.125rem; line-height: 1.625; color: var(--ink-65); max-width: 42rem; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8125rem; }
.mono { font-family: var(--mono); font-size: 0.9375em; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.display { font-family: var(--display); font-weight: 800; }

/* An icon is a Lucide outline, the size of the text it sits by. */
.icon { width: 1.25rem; height: 1.25rem; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 1.75rem; height: 1.75rem; }
.icon--flame { color: var(--flame); }

/* --------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--ink);
}
.site-header__inner { display: flex; align-items: center; gap: 2rem; height: 4rem; }
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand__to { font-family: var(--sans); font-size: 0.875rem; font-weight: 700; color: var(--flame); }
.site-nav { display: flex; align-items: center; gap: 2rem; margin-inline: auto; }
.site-nav a, .site-actions a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}
.site-nav a:hover, .site-actions a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--flame); }
.site-actions { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }

/* --------------------------------------------------------------- footer */

.site-footer {
  margin-top: 4rem;
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper-70);
  padding: 2.5rem 0;
  font-size: 0.8125rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2rem 3rem;
  align-items: center;
}
.site-footer .brand, .site-footer .brand:hover { color: var(--paper); }
.site-footer__legal { max-width: 32rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.site-footer a { color: var(--paper-70); text-decoration: none; }
.site-footer a:hover { color: var(--flame); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.6rem 1.5rem;
  min-height: 2.75rem;
  border: 2px solid var(--flame);
  border-radius: var(--radius-btn);
  background: var(--flame);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }
.btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--quiet {
  padding: 0.35rem 0.25rem;
  min-height: 0;
  background: none;
  border-color: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn--quiet:hover { background: none; border-color: transparent; color: var(--flame); }
.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger:hover { background: var(--ink); border-color: var(--ink); }
.btn--sm { padding: 0.35rem 1rem; font-size: 0.875rem; min-height: 2.25rem; }
.btn--lg { padding: 0.8rem 2rem; font-size: 1rem; min-height: 3rem; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* The way back to the converter from a standing page. */
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  text-decoration: none;
}
.backlink:hover { color: var(--flame); }
.backlink .icon { width: 0.875rem; height: 0.875rem; }

.cluster { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cluster--baseline { align-items: baseline; }
.cluster--spread { justify-content: space-between; align-items: flex-start; }
.cluster--center { justify-content: center; }
.stack { display: grid; gap: 1rem; }
.stack--sm { gap: 0.5rem; }
.stack--lg { gap: 2rem; }
.stack--start { justify-items: start; }
.stack--end { justify-items: end; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2rem; }
.rule-top { border-top: 1px solid var(--ink-15); padding-top: 1.5rem; }
.center { justify-items: center; text-align: center; }
.h-md { font-size: 1.25rem; }
.h-lg { font-size: 1.5rem; }
.signout { justify-self: start; padding-left: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------- cards */

.card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding: 1.75rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.card--surface { background: var(--surface); }
.card--flame { box-shadow: var(--shadow-flame); }
.card--ink { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-flame); }
.card--ink .muted, .card--ink .label { color: var(--paper-70); }
.card--ink a { color: var(--paper); }
.card--flat { box-shadow: none; }
.card--accent { border-color: var(--flame); }
.card__foot { margin-top: auto; padding-top: 0.5rem; }

.notice {
  padding: 0.9rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--mark-25);
  font-size: 0.9375rem;
  margin: 0;
}
.notice--warn { border-color: var(--red); background: var(--red-soft); }
.notice--ok { border-color: var(--green); background: var(--green-soft); }
.notice--plain { background: none; border-color: var(--ink-15); color: var(--muted); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 2px;
  white-space: nowrap;
}
.badge--mark { background: var(--mark); border-color: var(--mark); color: var(--ink); }
.badge--busy { color: var(--flame); }
.badge--done { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.badge--failed { color: var(--red); }
.badge--expired { color: var(--muted); }
.badge--ok { color: var(--green); }

/* A tag is a bank's name, or anything else listed in a row of chips. */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.tags li {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--ink-20);
  border-radius: 3px;
  background: var(--paper);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ------------------------------------------------------------ masthead */

.masthead { padding: 3.5rem 0 3rem; display: grid; gap: 1.75rem; }
.masthead > .label { margin-bottom: -0.5rem; }
.masthead .lede { font-size: 1.125rem; }
.masthead__sub { font-size: 0.9375rem; color: var(--muted); max-width: 42rem; line-height: 1.6; }

/* The landing page's hero: the headline, then the dropzone in front of a
   watermark. */
.hero { position: relative; padding-bottom: 4rem; }
.hero__panel { position: relative; max-width: 42rem; margin: 1rem auto 0; }
.hero__panel:has(.drop) { max-width: 42rem; }
.hero__panel:has(.table) { max-width: 60rem; }
.watermark {
  position: absolute;
  inset: auto 0 1rem;
  margin: 0;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(6rem, 22vw, 17rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink-4);
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}

/* A strip is a full-width yellow band of three short points. */
.strip { background: var(--mark-15); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 1.5rem 0; }
.strip--tall { padding: 3.5rem 0; }
.strip__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.strip__item { display: flex; gap: 0.75rem; padding: 0 2rem; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.strip__item + .strip__item { border-left: 1px solid var(--ink-15); }
.strip__item:first-child { padding-left: 0; }
.strip__item:last-child { padding-right: 0; }
.strip__item .icon { margin-top: 0.15rem; }
.strip__item h3 { font-size: 1.0625rem; margin-bottom: 0.25rem; }
.strip__item p { font-weight: 500; color: var(--ink-65); font-size: 0.875rem; }
.strip__item--tall { display: grid; gap: 0.75rem; align-content: start; }
.strip__item--tall h3 { font-size: 1.375rem; margin: 0; }
.strip__item--tall p { font-size: 0.9375rem; line-height: 1.6; }
.strip__note { font-size: 0.9375rem; }
.strip__note a { text-decoration-color: var(--flame); }

/* The three steps on the landing page. */
.steps { display: grid; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.25rem 0.75rem; }
.steps__n { grid-row: span 2; font-family: var(--display); font-size: 2rem; font-weight: 800; line-height: 1; color: var(--flame); }
.steps h3 { font-size: 1.125rem; }
.steps p { font-size: 0.9375rem; color: var(--ink-65); }

/* The price a teaser card shows: a large figure and what it is for. */
.figure { display: flex; align-items: baseline; gap: 0.75rem; }
.figure__n { font-family: var(--display); font-size: 3.5rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }

/* A clause is one numbered section of a policy: number and heading on the
   left, the words on the right. */
.clauses { border-top: 2px solid var(--ink); }
.clause { display: grid; grid-template-columns: 4fr 8fr; gap: 1rem 3rem; padding: 2.5rem 0; border-bottom: 1px solid var(--ink-15); }
.clause:last-child { border-bottom: 2px solid var(--ink); }
.clause__n { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.15em; color: var(--flame); margin-bottom: 0.5rem; }
.clause h2 { font-size: 1.5rem; }
.clause__body { display: grid; gap: 1rem; font-size: 0.9375rem; line-height: 1.65; color: var(--ink-65); }

/* ---------------------------------------------------------------- plans */

/* The interval is two links, so it works before the script does and the
   choice lives in the URL where a link can carry it. */
.switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  justify-self: start;
}
.switch a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}
.switch a:hover { color: var(--ink); }
.switch a small {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  background: var(--mark);
  color: var(--ink);
  border-radius: 2px;
}
.switch a[aria-current="true"] { background: var(--ink); color: var(--paper); }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  padding-right: 10px;
  margin-bottom: 2rem;
}

/* A plan card. The card is a column so the buttons line up across cards
   whatever length the feature lists are. The featured plan is inked. */
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem 1.5rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: inherit;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.plan--featured { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-flame); }
.plan--featured .muted { color: var(--paper-70); }
.plan--featured .plan__pages { color: var(--mark); }
.plan--featured .plan__cta .btn--ghost { background: var(--flame); border-color: var(--flame); color: var(--paper); }
.plan--featured .plan__cta .btn--ghost:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.plan__flag {
  position: absolute;
  top: -0.8rem;
  left: 1.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--mark);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 2px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.plan__name { font-size: 1.25rem; }
.plan__price { display: flex; align-items: baseline; gap: 0.5rem; }
.price {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.price--sm { font-size: 1.5rem; }
.plan__per { font-size: 0.875rem; color: var(--muted); }
.plan__pages { font-size: 0.9375rem; font-weight: 700; color: var(--flame); }
.plan .plan__cta { margin-top: auto; padding-top: 1rem; }
.plan .plan__cta .btn { width: 100%; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.ticks li { position: relative; padding-left: 1.25rem; font-size: 0.9375rem; font-weight: 600; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--flame);
}
.ticks--none li::before { background: none; content: "—"; top: 0; color: var(--muted); }
.ticks--plain li { padding-left: 0; }
.ticks--plain li::before { content: none; }

/* --------------------------------------------------------------- tables */

/* A wide table scrolls sideways; the gradients say there is more of it in
   that direction. */
.table-scroll {
  overflow-x: auto;
  background:
    linear-gradient(to right, var(--paper) 25%, rgba(0, 0, 0, 0)) left center / 26px 100% no-repeat local,
    linear-gradient(to left, var(--paper) 25%, rgba(0, 0, 0, 0)) right center / 26px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--scroll-shadow), rgba(0, 0, 0, 0)) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--scroll-shadow), rgba(0, 0, 0, 0)) right center / 12px 100% no-repeat scroll;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th, .table td {
  padding: 0.75rem 1rem 0.75rem 0;
  text-align: left;
  border-bottom: 1px solid var(--ink-10);
  vertical-align: top;
}
.table thead th {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink-15);
}
.table tbody th { font-weight: 500; color: var(--ink-65); }
.table .num { text-align: right; padding-right: 1rem; font-variant-numeric: tabular-nums; }
.table .col-mark, .table .row-mark td { background: var(--mark-25); }
.table tfoot td, .table tfoot th { border-bottom: 0; padding-top: 1rem; }
.table--dense th, .table--dense td { padding: 0.55rem 0.9rem 0.55rem 0; }
.table--records td, .table--records th { font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.cell-when { color: var(--muted); white-space: nowrap; }
.cell-email { white-space: nowrap; }
.cell-err { display: block; color: var(--red); font-size: 0.8125rem; margin-top: 0.35rem; }
.delta-given { color: var(--flame); }
.delta-spent { color: var(--ink); }

/* A boxed table: the ink header bar, the rows inside a thick border. */
.ledger { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.ledger__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.ledger__head .badge--mark { border-color: var(--mark); }
.ledger .table th:first-child, .ledger .table td:first-child { padding-left: 1rem; }
.ledger .table tr:last-child td { border-bottom: 0; }
.ledger__caption { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--muted); }

/* ----------------------------------------------------------------- faq */

.faq { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.faq details { padding: 0 1.5rem; border-bottom: 1px solid var(--ink-15); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-weight: 700;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 1.25rem;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--flame);
  border-bottom: 2px solid var(--flame);
  transform: rotate(45deg);
  transition: transform 150ms;
}
.faq details[open] summary::after { transform: rotate(225deg); top: 1.55rem; }
.faq details p { margin: 0 0 1.25rem; font-size: 0.9375rem; color: var(--ink-65); max-width: 46rem; }

/* --------------------------------------------------------------- legal */

.legal { display: grid; gap: 1.15rem; max-width: 46rem; }
.legal p { color: var(--ink-65); line-height: 1.65; }
.legal h2 { font-size: 1.125rem; margin-top: 0.9rem; }
.legal__dated { font-size: 0.875rem; color: var(--muted); }

/* --------------------------------------------------------------- stats */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1.5rem; }
.stat { display: grid; gap: 0.15rem; }
.stat__v { font-family: var(--display); font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__k { font-size: 0.8125rem; color: var(--muted); }

/* ------------------------------------------------------------- dropzone */

.drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 120ms;
}
.drop:hover, .drop:focus-within { background: var(--mark-15); }
.drop.over { background: var(--mark-25); outline: 2px solid var(--flame); outline-offset: -2px; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop .icon--lg { color: var(--flame); margin-bottom: 0.25rem; }
.drop strong { font-family: var(--display); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.drop small { color: var(--muted); font-size: 0.875rem; }
.drop .btn { margin-top: 0.75rem; position: relative; }
.drop__fine { margin-top: 0.75rem; }
.panel { padding: 1.5rem; }

.file {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--ink-15);
  border-bottom: 1px solid var(--ink-15);
}
.file .name { font-family: var(--mono); font-size: 0.9375rem; overflow-wrap: anywhere; }
.file .size { color: var(--muted); font-size: 0.875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.file button { margin-left: auto; background: none; border: 0; padding: 0; color: var(--ink); font: inherit; font-size: 0.875rem; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* --------------------------------------------------------------- forms */

.field { display: grid; gap: 0.4rem; }
.field > label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-btn);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }

.form-row { display: flex; align-items: end; gap: 0.75rem; flex-wrap: wrap; }
.form-row .field { flex: 0 1 auto; }
.form-row .btn { padding: 0.65rem 1.1rem; }

/* ---------------------------------------------------------------- auth */

.auth { display: grid; place-items: center; min-height: 68vh; padding: 3rem 0; }
.auth__card {
  width: min(28rem, 100%);
  display: grid;
  gap: 1.25rem;
  padding: 2.25rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.auth h1 { font-size: 2.25rem; line-height: 1.05; }

/* ----------------------------------------------------------- app shell */

.app { display: grid; grid-template-columns: 16rem minmax(0, 1fr); min-height: 100vh; }
.app__side {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 1.75rem;
  align-content: start;
  padding: 1.5rem 1.25rem 2rem;
  border-right: 2px solid var(--ink);
  background: var(--surface);
}
.app__nav { display: grid; gap: 0.15rem; align-content: start; }
.app__nav a {
  padding: 0.55rem 0.75rem;
  border-left: 3px solid transparent;
  color: var(--ink-65);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}
.app__nav a:hover { background: var(--paper); color: var(--ink); }
.app__nav a[aria-current="page"] {
  border-left-color: var(--flame);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}
.app__foot { display: grid; gap: 0.6rem; font-size: 0.8125rem; color: var(--muted); align-self: end; }
.app__foot form { display: grid; }
.app__legal { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; }
.app__legal a { color: var(--muted); text-decoration: none; }
.app__legal a:hover { color: var(--flame); }
.app__main { padding: 2rem 2.5rem 5rem; min-width: 0; }
.app__main > main { max-width: 62rem; }
.app__main h1 { font-size: 2rem; line-height: 1.1; letter-spacing: -0.02em; }
.app__head { display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }

.pill {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}
.pill__label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.pill__count { font-family: var(--display); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pill__of { font-family: var(--sans); font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.pill__track { height: 0.35rem; border-radius: 0; }
.pill--empty { font-size: 0.9375rem; font-weight: 700; color: var(--red); text-decoration: none; }
.pill--empty:hover { text-decoration: underline; text-underline-offset: 4px; }

.meter, .pill__track {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  width: 100%;
  background: var(--surface-2);
}
.meter { height: 0.5rem; overflow: hidden; }
.meter::-webkit-progress-bar, .pill__track::-webkit-progress-bar { background: var(--surface-2); }
.meter::-webkit-progress-value, .pill__track::-webkit-progress-value { background: var(--flame); }
.meter::-moz-progress-bar, .pill__track::-moz-progress-bar { background: var(--flame); }

.empty { padding: 2rem 0; color: var(--muted); }

.flash {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--mark-25);
  font-size: 0.9375rem;
  font-weight: 600;
}
.flash--alert { border-color: var(--red); background: var(--red-soft); }
.flash--ok { border-color: var(--green); background: var(--green-soft); }

/* ---------------------------------------------------- billing status */

.status { display: grid; gap: 1.25rem; padding: 3rem 0; justify-items: start; }
.status h1 { font-size: 2.25rem; }
.working { display: flex; align-items: center; gap: 0.75rem; font-size: 1.125rem; font-weight: 700; padding: 2rem; justify-content: center; }
.status__dot {
  width: 0.6rem;
  height: 0.6rem;
  background: var(--flame);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

/* ------------------------------------------------------------- admin */

.admin-bar {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0.5rem;
}
.admin-bar .form-row { margin-left: auto; align-items: end; }
.admin-plan { display: grid; gap: 0.75rem; padding: 1.5rem 0; border-top: 1px solid var(--ink-15); }
.admin-plan:first-of-type { border-top: 0; }
.kv { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 0.4rem 1.5rem; font-size: 0.9375rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* -------------------------------------------------------------- motion */

/* Content rises in on load. Steps and cards stagger by 80ms. */
@keyframes editorial-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: editorial-rise 500ms cubic-bezier(0.32, 0.72, 0, 1) both; }
.rise--2 { animation-delay: 80ms; }
.rise--3 { animation-delay: 160ms; }
.rise--4 { animation-delay: 240ms; }

/* ------------------------------------------------------------ small screens */

@media (max-width: 900px) {
  .band { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 2.25rem 0; }
  .cols--5-7, .cols--7-5, .cols--4-8, .clause { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .section__head--row { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .strip__grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .strip__item, .strip__item:first-child, .strip__item:last-child { padding: 0; }
  .strip__item + .strip__item { border-left: 0; border-top: 1px solid var(--ink-15); padding-top: 1.25rem; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app__side {
    grid-template-rows: auto auto auto;
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }
  .app__nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 0.25rem; }
  .app__nav a { border-left: 0; border-bottom: 3px solid transparent; }
  .app__nav a[aria-current="page"] { border-left: 0; border-bottom-color: var(--flame); }
  .app__foot { grid-auto-flow: column; justify-content: start; align-items: center; }
  .app__main { padding: 1.75rem 1.5rem 4rem; }
}
@media (max-width: 768px) {
  .site-nav { display: none; }
  .watermark { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 1.25rem; }
  .site-header__inner { gap: 1rem; }
  .site-actions { gap: 0.75rem; }
  .site-actions__signin { display: none; }
  .section { padding: 2.5rem 0; }
  .masthead { padding: 2.5rem 0 2rem; }
  .card, .plan, .faq, .ledger, .auth__card { box-shadow: var(--shadow-sm); }
  .card--ink, .card--flame, .plan--featured { box-shadow: 6px 6px 0 0 var(--flame); }
  .plan-grid { padding-right: 6px; }
  .kv { grid-template-columns: minmax(5.5rem, 7rem) minmax(0, 1fr); gap: 0.4rem 0.75rem; }
  .app__main h1 { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .drop, .faq summary::after { transition: none; }
  .status__dot, .rise { animation: none; }
}
