@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f3f5f0;
  --surface: #ffffff;
  --sunk: #e8ece5;
  --ink: #18211d;
  --muted: #5c6660;
  --line: #d9ded6;
  --moss: #2f6b4f;
  --moss-soft: #dcebe2;
  --on-moss: #ffffff;
  --marigold: #c98a12;
  --marigold-dot: #e3a82b;
  --marigold-soft: #f7ead0;
  --plum: #a23b5b;
  --plum-soft: #f3dde4;
  --focus: #1d5fd1;

  --display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', -apple-system, sans-serif;

  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4.5rem;

  --radius: 10px;
  --radius-sm: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121815;
    --surface: #19211d;
    --sunk: #0e1311;
    --ink: #e7ece6;
    --muted: #9aa59e;
    --line: #2c3631;
    --moss: #6db48f;
    --moss-soft: #1f3529;
    --on-moss: #0c1510;
    --marigold: #edba4a;
    --marigold-dot: #edba4a;
    --marigold-soft: #382d14;
    --plum: #e0829f;
    --plum-soft: #3a1f29;
    --focus: #7aa7ff;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s3);
}
h1 {
  font-size: 1.95rem;
}
h2 {
  font-size: 1.4rem;
}
h3 {
  font-size: 1.1rem;
  letter-spacing: 0;
}
p {
  margin: 0 0 var(--s4);
}
a {
  color: var(--moss);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons and forms */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font: 600 0.95rem/1 var(--body);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--muted);
}
.btn-primary {
  background: var(--moss);
  border-color: var(--moss);
  color: var(--on-moss);
}
.btn-primary:hover {
  filter: brightness(1.08);
  border-color: var(--moss);
}
.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--moss);
  padding-inline: var(--s2);
}
.btn-quiet:hover {
  border-color: transparent;
  text-decoration: underline;
}
.btn-danger {
  color: var(--plum);
}
.btn-lg {
  font-size: 1.05rem;
  padding: 0.9rem 1.4rem;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
}
form.inline {
  display: inline;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.925rem;
  margin-bottom: var(--s1);
}
.hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='date'],
input[type='number'],
input[type='url'],
select,
textarea {
  width: 100%;
  font: 400 1rem/1.4 var(--body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
}
textarea {
  min-height: 7rem;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: transparent;
}
.check {
  display: flex;
  gap: var(--s2);
  align-items: flex-start;
  font-weight: 400;
}
.check input {
  margin-top: 0.3rem;
  accent-color: var(--moss);
}
.field {
  margin-bottom: var(--s4);
}
.fields-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--s4);
}
.fields-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 var(--s4);
}
@media (max-width: 640px) {
  .fields-2,
  .fields-3 {
    grid-template-columns: 1fr;
  }
}
.money-input {
  position: relative;
}
.money-input span {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.money-input input {
  padding-left: 1.7rem;
}

.notice {
  border-radius: var(--radius-sm);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s4);
  background: var(--moss-soft);
}
.notice-error {
  background: var(--plum-soft);
}
.notice-warn {
  background: var(--marigold-soft);
}
.notice p:last-child {
  margin: 0;
}

/* Marketing pages */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--s5) var(--s4);
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.wordmark::before {
  content: '';
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--marigold-dot);
  box-shadow: 0.85rem 0 0 var(--moss);
  margin-right: 0.85rem;
}
.site-nav {
  display: flex;
  gap: var(--s2);
  align-items: center;
}
.site-nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  padding: var(--s2);
}
.site-nav a:not(.btn):hover {
  text-decoration: underline;
}
.site-nav a {
  white-space: nowrap;
}
@media (max-width: 520px) {
  .site-nav .nav-pricing {
    display: none;
  }
}

.hero {
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--s7) var(--s4) var(--s8);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--s7);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-bottom: var(--s5);
  font-variation-settings: 'opsz' 96;
}
.hero .lede {
  font-size: 1.2rem;
  max-width: 32rem;
  color: var(--muted);
  margin-bottom: var(--s6);
}
.hero .fine {
  margin-top: var(--s3);
  font-size: 0.9rem;
  color: var(--muted);
}
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: var(--s5);
    gap: var(--s6);
  }
}

/* The hero demo: one invoice ageing in real time, reminders landing, then paid */
.showcase {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--s5);
}
.showcase-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
  margin-bottom: var(--s5);
}
.showcase-head strong {
  font-family: var(--display);
  font-size: 1.25rem;
}
.showcase-amount {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
}
.showcase .strip {
  height: 3.2rem;
}
.showcase-log {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  font-size: 0.925rem;
  min-height: 7.6rem;
}
.showcase-log li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: var(--s3);
  padding: var(--s1) 0;
  opacity: 0;
  animation: log-in 0.4s ease-out forwards;
}
.showcase-log time {
  color: var(--muted);
}
.showcase-log .paid {
  color: var(--moss);
  font-weight: 600;
}
.showcase-status {
  font-weight: 600;
  color: var(--plum);
}
@keyframes log-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.band {
  border-top: 1px solid var(--line);
}
.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--s8) var(--s4);
}
.section-intro {
  max-width: 38rem;
  margin-bottom: var(--s6);
}
.section-intro h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.03em;
}
.section-intro p {
  font-size: 1.1rem;
  color: var(--muted);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 3px solid var(--ink);
  padding-top: var(--s4);
}
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  display: block;
  margin-bottom: var(--s3);
  color: var(--moss);
}
.steps p {
  color: var(--muted);
}
@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.ladder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--s7);
  align-items: start;
}
.ladder-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ladder-list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
}
.ladder-list li span:first-child {
  color: var(--muted);
}
.mail-sample {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--s5);
  font-size: 0.975rem;
}
.mail-sample header {
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--s3);
  margin-bottom: var(--s4);
  font-size: 0.9rem;
  color: var(--muted);
}
.mail-sample header b {
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 860px) {
  .ladder {
    grid-template-columns: 1fr;
    gap: var(--s6);
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s5) var(--s7);
}
.features h3 {
  margin-bottom: var(--s2);
}
.features p {
  color: var(--muted);
  margin: 0;
}
@media (max-width: 760px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  gap: var(--s7);
  align-items: center;
}
.price-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: var(--s6);
}
.price-card .price {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--s4);
}
.price-card ul {
  padding-left: 1.1rem;
  margin: 0 0 var(--s5);
}
.price-card li {
  margin-bottom: var(--s2);
}
.price-card .btn-primary {
  width: 100%;
}
@media (prefers-color-scheme: dark) {
  .price-card {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
  }
}
@media (max-width: 760px) {
  .pricing {
    grid-template-columns: 1fr;
  }
}

.faq dt {
  font-weight: 700;
  margin-top: var(--s5);
}
.faq dd {
  margin: var(--s2) 0 0;
  color: var(--muted);
  max-width: 44rem;
}

.site-foot {
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--s6) var(--s4) var(--s7);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
}
.site-foot a {
  color: var(--muted);
}

/* Auth pages */

.auth {
  max-width: 26rem;
  margin: var(--s6) auto var(--s8);
  padding: 0 var(--s4);
}
.auth .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--s6);
}
.auth .btn-primary {
  width: 100%;
  margin-top: var(--s2);
}
.auth-alt {
  text-align: center;
  margin-top: var(--s4);
  color: var(--muted);
}

/* App shell */

.app {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  border-right: 1px solid var(--line);
  padding: var(--s5) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  position: sticky;
  top: 0;
  height: 100vh;
}
.side nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem var(--s3);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.side nav a:hover {
  background: var(--sunk);
}
.side nav a[aria-current='page'] {
  background: var(--ink);
  color: var(--paper);
}
.side nav .count {
  font-size: 0.8rem;
  background: var(--marigold-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 0 0.45rem;
  min-width: 1.4rem;
  text-align: center;
}
.side-foot {
  margin-top: auto;
  font-size: 0.875rem;
  color: var(--muted);
}
.side-foot form button {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.main {
  padding: var(--s6) var(--s6) var(--s8);
  max-width: 76rem;
  width: 100%;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
}
.page-head h1 {
  margin: 0;
}
.page-head p {
  margin: var(--s1) 0 0;
}
.crumb {
  font-size: 0.9rem;
  margin-bottom: var(--s2);
  display: inline-block;
}
.banner {
  padding: var(--s3) var(--s6);
  background: var(--marigold-soft);
  font-size: 0.925rem;
  display: flex;
  gap: var(--s3);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.banner-plum {
  background: var(--plum-soft);
}
.banner p {
  margin: 0;
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: var(--s3) var(--s4);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: var(--s2);
  }
  .side nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }
  .side nav ul {
    display: flex;
    gap: var(--s1);
  }
  .side nav a {
    white-space: nowrap;
    gap: var(--s2);
  }
  .side-foot {
    margin: 0;
  }
  .main {
    padding: var(--s5) var(--s4) var(--s7);
  }
  .banner {
    padding: var(--s3) var(--s4);
  }
}

/* Dashboard */

.figures {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  border-top: 3px solid var(--ink);
  margin-bottom: var(--s6);
}
.figure {
  padding: var(--s4) var(--s4) var(--s4) 0;
}
.figure + .figure {
  padding-left: var(--s4);
  border-left: 1px solid var(--line);
}
.figure dt {
  font-size: 0.9rem;
  color: var(--muted);
}
.figure dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}
.figure:first-child dd {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.05;
}
.figure .sub {
  display: block;
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.figure.overdue dd {
  color: var(--plum);
}
@media (max-width: 860px) {
  .figures {
    grid-template-columns: 1fr 1fr;
  }
  .figure:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .figure:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

.attention {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--marigold-dot);
  border-radius: var(--radius-sm);
  padding: var(--s4) var(--s5);
  margin-bottom: var(--s6);
}
.attention h2 {
  font-size: 1.1rem;
}
.attention ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.attention li {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  align-items: center;
  padding: var(--s2) 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.attention li:first-child {
  border-top: 0;
}

.tabs {
  display: flex;
  gap: var(--s1);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s2);
  overflow-x: auto;
}
.tabs a {
  padding: var(--s2) var(--s3);
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  font-weight: 500;
}
.tabs a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.tabs a span {
  color: var(--muted);
  font-weight: 400;
}

/* Invoice list: every row's strip shares one scale, so due dates line up down the page */
.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ledger-head,
.ledger-row {
  display: grid;
  grid-template-columns: minmax(11rem, 1.3fr) 7.5rem minmax(12rem, 2fr) minmax(9rem, 1fr);
  gap: var(--s4);
  align-items: center;
}
.ledger-head {
  font-size: 0.8rem;
  color: var(--muted);
  padding: var(--s2) var(--s3);
}
.ledger-head .scale {
  position: relative;
  height: 1rem;
}
.ledger-head .scale span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.ledger-row {
  padding: var(--s3);
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.ledger-row:hover {
  background: var(--surface);
}
.ledger-row .who strong {
  display: block;
  font-weight: 600;
}
.ledger-row .who span {
  color: var(--muted);
  font-size: 0.875rem;
}
.ledger-row .amt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: right;
}
.ledger-row .state {
  font-size: 0.875rem;
}
.ledger-row .state strong {
  display: block;
  font-weight: 600;
}
.ledger-row .state span {
  color: var(--muted);
}
.state-overdue strong {
  color: var(--plum);
}
.state-paid strong {
  color: var(--moss);
}
.state-held strong {
  color: var(--marigold);
}
@media (max-width: 860px) {
  .ledger-head {
    display: none;
  }
  .ledger-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: 'who amt' 'strip strip' 'state state';
    gap: var(--s2) var(--s3);
    padding: var(--s4) 0;
  }
  .ledger-row .who {
    grid-area: who;
  }
  .ledger-row .amt {
    grid-area: amt;
  }
  .ledger-row .strip {
    grid-area: strip;
  }
  .ledger-row .state {
    grid-area: state;
  }
}

.strip {
  position: relative;
  height: 1.6rem;
}
.strip .track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: var(--sunk);
  border-radius: 2px;
}
.strip .late {
  position: absolute;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: var(--plum);
  border-radius: 2px;
}
.strip .due {
  position: absolute;
  top: 10%;
  bottom: 10%;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
}
.strip .today {
  position: absolute;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  margin: -0.35rem 0 0 -0.35rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
}
.strip .dot {
  position: absolute;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  margin: -0.325rem 0 0 -0.325rem;
  border-radius: 50%;
  border: 2px solid var(--moss);
  background: var(--surface);
}
.strip .dot.firm {
  border-color: var(--marigold-dot);
}
.strip .dot.final {
  border-color: var(--plum);
}
.strip .dot.opened {
  background: currentColor;
}
.strip .dot.friendly.opened {
  background: var(--moss);
}
.strip .dot.firm.opened {
  background: var(--marigold-dot);
}
.strip .dot.final.opened {
  background: var(--plum);
}
.strip .dot.planned {
  border-style: dashed;
  border-color: var(--muted);
  background: transparent;
}
.strip .paid-mark {
  position: absolute;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  margin: -0.45rem 0 0 -0.45rem;
  border-radius: 50%;
  background: var(--moss);
}
.strip .paid-mark::after {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 0.15rem;
  width: 0.22rem;
  height: 0.42rem;
  border: solid var(--on-moss);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.strip .edge {
  position: absolute;
  top: -0.45rem;
  font-size: 0.75rem;
  line-height: 1.1rem;
  color: var(--plum);
  font-weight: 600;
}

.legend {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: var(--s4);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}
.legend .strip {
  display: inline-block;
  width: 1rem;
  height: 1rem;
}
.legend .strip .dot,
.legend .strip .today,
.legend .strip .due {
  left: 50%;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: var(--s7) var(--s5);
  text-align: center;
}
.empty p {
  color: var(--muted);
  max-width: 30rem;
  margin-inline: auto;
}

/* Detail pages */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr);
  gap: var(--s6);
  align-items: start;
}
@media (max-width: 960px) {
  .detail {
    grid-template-columns: 1fr;
  }
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s5);
  margin-bottom: var(--s5);
}
.panel > h2:first-child {
  font-size: 1.15rem;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--s4);
  margin: 0 0 var(--s5);
}
.facts dt {
  font-size: 0.85rem;
  color: var(--muted);
}
.facts dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.big-amount {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.detail .strip {
  height: 2.6rem;
  margin: var(--s4) 0 var(--s2);
}
.strip-dates {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.42rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: var(--line);
}
.timeline li {
  position: relative;
  padding: 0 0 var(--s4) 1.8rem;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--muted);
}
.timeline li.friendly::before {
  border-color: var(--moss);
}
.timeline li.firm::before {
  border-color: var(--marigold-dot);
}
.timeline li.final::before,
.timeline li.failed::before {
  border-color: var(--plum);
}
.timeline li.paid::before {
  background: var(--moss);
  border-color: var(--moss);
}
.timeline .when {
  font-size: 0.85rem;
  color: var(--muted);
}
.timeline .what {
  font-weight: 600;
}
.timeline details {
  margin-top: var(--s1);
}
.timeline summary {
  cursor: pointer;
  color: var(--moss);
  font-size: 0.9rem;
}
.timeline pre,
.mail-preview {
  white-space: pre-wrap;
  font: 0.925rem/1.55 var(--body);
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: var(--s3) var(--s4);
  margin: var(--s2) 0 0;
}
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--sunk);
  color: var(--muted);
  vertical-align: middle;
}
.tag-moss {
  background: var(--moss-soft);
  color: var(--moss);
}
.tag-plum {
  background: var(--plum-soft);
  color: var(--plum);
}
.tag-marigold {
  background: var(--marigold-soft);
  color: var(--ink);
}

.actions {
  display: grid;
  gap: var(--s4);
}
.actions form {
  display: grid;
  gap: var(--s2);
}
.actions hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.action-inline {
  display: flex;
  gap: var(--s2);
  align-items: end;
}
.action-inline > div {
  flex: 1;
}

/* Tables (clients, activity, import preview) */

.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th {
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: var(--s3);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td.num,
th.num {
  text-align: right;
}
tr.bad td {
  color: var(--plum);
}
tr.skip td {
  color: var(--muted);
}

/* Settings: reminder steps */

.step-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4);
  margin-bottom: var(--s4);
  background: var(--surface);
}
.step-editor[data-disabled] {
  opacity: 0.65;
}
.step-top {
  display: grid;
  grid-template-columns: 9rem 9rem 1fr auto;
  gap: var(--s3);
  align-items: end;
  margin-bottom: var(--s3);
}
@media (max-width: 760px) {
  .step-top {
    grid-template-columns: 1fr 1fr;
  }
}
.placeholders {
  font-size: 0.875rem;
  columns: 2 16rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.placeholders code {
  font-family: var(--body);
  font-weight: 600;
  background: var(--sunk);
  padding: 0 0.3rem;
  border-radius: 4px;
}
.address {
  font-size: 1.05rem;
  font-weight: 600;
  word-break: break-all;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: var(--s3) var(--s4);
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  align-items: center;
}
.settings-nav {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
  font-size: 0.95rem;
}
.settings-section {
  scroll-margin-top: var(--s5);
}

/* Client-facing invoice page */

.pay-page {
  max-width: 34rem;
  margin: var(--s7) auto;
  padding: 0 var(--s4);
}
.pay-page .panel {
  padding: var(--s6);
}
.pay-page .from {
  color: var(--muted);
  margin-bottom: var(--s2);
}
.pay-page .bank {
  white-space: pre-line;
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: var(--s4);
  margin-bottom: var(--s5);
}
.pay-page .btn-primary {
  width: 100%;
  margin-bottom: var(--s5);
}
.powered {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: var(--s5);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition: none !important;
  }
}

/* Hero showcase choreography: about five seconds, plays once */
.showcase .today {
  left: 7%;
  animation:
    sc-today 4.4s cubic-bezier(0.45, 0, 0.55, 1) 0.4s forwards,
    sc-fade 0.3s ease-out 4.8s forwards;
}
.showcase .late {
  left: 25%;
  width: 0;
  animation: sc-late 2.6s linear 2.2s forwards;
}
.showcase .dot,
.showcase .paid-mark {
  opacity: 0;
  transform: scale(0.4);
  animation: sc-pop 0.35s cubic-bezier(0.3, 1.6, 0.6, 1) forwards;
}
.showcase .dot.opened {
  background: var(--surface);
  animation:
    sc-pop 0.35s cubic-bezier(0.3, 1.6, 0.6, 1) forwards,
    sc-open 0.3s ease-out forwards;
}
.showcase .dot.friendly.opened {
  --fill: var(--moss);
}
.showcase .dot.firm.opened {
  --fill: var(--marigold-dot);
}
.showcase-status span {
  display: inline-block;
}
.showcase-status .then {
  display: none;
}
@supports (animation-timeline: auto) or (display: grid) {
  .showcase-status {
    display: inline-grid;
  }
  .showcase-status span {
    grid-area: 1 / 1;
  }
  .showcase-status .then {
    display: inline-block;
    opacity: 0;
    color: var(--moss);
    animation: sc-show 0.3s ease-out 4.8s forwards;
  }
  .showcase-status .now {
    animation: sc-fade 0.3s ease-out 4.8s forwards;
  }
}
@keyframes sc-today {
  to {
    left: 57%;
  }
}
@keyframes sc-late {
  to {
    width: 32%;
  }
}
@keyframes sc-pop {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sc-open {
  to {
    background: var(--fill);
  }
}
@keyframes sc-fade {
  to {
    opacity: 0;
  }
}
@keyframes sc-show {
  to {
    opacity: 1;
  }
}
