/* ACDO — site styles */

:root {
  color-scheme: light dark;

  --bg:            #fbfbfa;
  --bg-raised:     #ffffff;
  --bg-sunken:     #f2f2f0;
  --border:        #e2e2de;
  --border-strong: #cfcfc9;

  --text:          #1c1c1a;
  --text-muted:    #5d5d57;
  --text-faint:    #85857e;

  --accent:        #1d5c4f;
  --accent-hover:  #17493f;
  --accent-soft:   #e7f1ee;
  --accent-text:   #ffffff;

  --warn-bg:       #fdf6e3;
  --warn-border:   #e8d9a8;
  --warn-text:     #6b5518;

  --radius:   10px;
  --radius-s: 6px;

  --maxw: 68rem;
  --gutter: 1rem;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #141514;
    --bg-raised:     #1c1e1c;
    --bg-sunken:     #0f100f;
    --border:        #2c2f2c;
    --border-strong: #3d413d;

    --text:          #ecece8;
    --text-muted:    #a6a89f;
    --text-faint:    #7c7e76;

    --accent:        #4fb39c;
    --accent-hover:  #62c4ac;
    --accent-soft:   #172b26;
    --accent-text:   #0c1512;

    --warn-bg:       #2a2415;
    --warn-border:   #4a4028;
    --warn-text:     #e0cf9b;
  }
}

:root[data-theme="dark"] {
  --bg:            #141514;
  --bg-raised:     #1c1e1c;
  --bg-sunken:     #0f100f;
  --border:        #2c2f2c;
  --border-strong: #3d413d;
  --text:          #ecece8;
  --text-muted:    #a6a89f;
  --text-faint:    #7c7e76;
  --accent:        #4fb39c;
  --accent-hover:  #62c4ac;
  --accent-soft:   #172b26;
  --accent-text:   #0c1512;
  --warn-bg:       #2a2415;
  --warn-border:   #4a4028;
  --warn-text:     #e0cf9b;
}

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

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

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; font-weight: 640; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); letter-spacing: -0.028em; }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 1.95rem); }
h3 { font-size: 1.12rem; }
p  { margin: 0 0 1rem; }

.lede { font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.22rem); color: var(--text-muted); max-width: 42ch; }

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 60px; flex-wrap: wrap;
}
.brand {
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.03em;
  color: var(--text); text-decoration: none; margin-right: auto;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.brand-mark {
  width: 24px; height: 24px; border-radius: 5.4px;
  display: block; flex: none;
}
.nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.93rem; font-weight: 500; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.62rem 1.15rem; border-radius: var(--radius-s);
  font-size: 0.95rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-faint); color: var(--text); }
.btn-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* ---------- sections ---------- */

.hero { padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { max-width: 44ch; margin-bottom: 2rem; }

.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.card h3 { margin-bottom: 0.35rem; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.09em;
  font-size: 0.73rem; font-weight: 700; color: var(--accent);
  margin: 0 0 0.75rem;
}

/* ---------- pricing ---------- */

.price-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.9rem;
  max-width: 24rem;
}
.price-card.featured { border-color: var(--accent); }
.price {
  display: flex; align-items: baseline; gap: 0.4rem;
  margin: 0.5rem 0 0.25rem;
}
.price-amount { font-size: 2.7rem; font-weight: 700; letter-spacing: -0.04em; }
.price-unit { color: var(--text-muted); font-size: 0.95rem; }
.price-note { color: var(--text-faint); font-size: 0.87rem; margin: 0 0 1.4rem; }

.ticks { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.ticks li {
  position: relative; padding-left: 1.6rem; margin-bottom: 0.55rem;
  font-size: 0.95rem; color: var(--text-muted);
}
.ticks li::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.52em;
  width: 0.5rem; height: 0.28rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- steps ---------- */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps > li {
  counter-increment: step;
  position: relative; padding-left: 2.9rem; margin-bottom: 1.5rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 1.85rem; height: 1.85rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 700;
}
.steps h3 { margin-bottom: 0.2rem; font-size: 1rem; }
.steps p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* ---------- callout ---------- */

.callout {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.callout strong { color: inherit; }
.callout :last-child { margin-bottom: 0; }

.note {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  margin: 1.5rem 0;
  font-size: 0.94rem;
  color: var(--text-muted);
}
.note :last-child { margin-bottom: 0; }

/* ---------- code / hashes ---------- */

code, .mono { font-family: var(--mono); font-size: 0.88em; }
code {
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-radius: 4px; padding: 0.1em 0.38em;
}
.hash {
  display: block; background: var(--bg-sunken);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  padding: 0.8rem 0.9rem; margin: 0.6rem 0 0;
  font-family: var(--mono); font-size: 0.82rem;
  word-break: break-all; line-height: 1.55; color: var(--text);
}

kbd {
  font-family: var(--font); font-size: 0.85em; font-weight: 600;
  background: var(--bg-raised); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 4px; padding: 0.08em 0.4em;
  white-space: nowrap;
}

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

.prose { max-width: 42rem; }
.prose h2 { margin-top: 2.4rem; font-size: 1.3rem; }
.prose h3 { margin-top: 1.7rem; font-size: 1.02rem; }
.prose ul { padding-left: 1.25rem; color: var(--text-muted); }
.prose li { margin-bottom: 0.45rem; }
.prose table {
  width: 100%; border-collapse: collapse; margin: 1.2rem 0;
  font-size: 0.93rem;
}
.prose th, .prose td {
  text-align: left; padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.prose th { font-weight: 640; }
.prose td { color: var(--text-muted); }

.updated { color: var(--text-faint); font-size: 0.88rem; margin-bottom: 2rem; }

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

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-faint); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0.8rem 0 0; color: var(--text-muted); font-size: 0.95rem; max-width: 46rem; }

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

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2.5rem 0 3rem;
  color: var(--text-faint);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid; gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  margin-bottom: 2rem;
}
.footer-grid h4 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 0.7rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a { color: var(--text-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.5rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

@media (max-width: 40rem) {
  .nav { gap: 0.9rem; font-size: 0.9rem; }
  .price-card { padding: 1.4rem; }
}

/* ---------- hero with visual ---------- */

.hero-split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 60rem) {
  .hero-split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

/* fake app window showing a balanced journal entry */
.ledger {
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 12px 32px -12px rgba(0,0,0,0.18);
  font-size: 0.87rem;
}
.ledger-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}
.ledger-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.ledger-title {
  margin-left: 0.5rem; color: var(--text-faint);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em;
}
.ledger-body { padding: 0.9rem 0.85rem 1rem; }
.ledger-meta {
  display: flex; justify-content: space-between; gap: 1rem;
  color: var(--text-faint); font-size: 0.76rem;
  padding: 0 0.3rem 0.7rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.2rem;
}
.ledger-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 5.4rem 5.4rem;
  gap: 0.5rem; align-items: baseline;
  padding: 0.44rem 0.3rem;
}
.ledger-head {
  color: var(--text-faint); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700;
  padding-top: 0.6rem;
}
.ledger-row .acct { color: var(--text); }
.ledger-row .sub { display: block; color: var(--text-faint); font-size: 0.74rem; }
.ledger-row .amt { font-family: var(--mono); font-size: 0.82rem; text-align: right; color: var(--text-muted); }
.ledger-row .amt.zero { color: var(--text-faint); }
.ledger-indent { padding-left: 1rem; }
.ledger-total {
  border-top: 1px solid var(--border-strong);
  margin-top: 0.35rem; padding-top: 0.6rem; font-weight: 640;
}
.ledger-total .amt { color: var(--text); }
.ledger-balanced {
  display: flex; align-items: center; gap: 0.45rem;
  margin-top: 0.85rem; padding: 0.5rem 0.6rem;
  background: var(--accent-soft); color: var(--accent);
  border-radius: var(--radius-s);
  font-size: 0.79rem; font-weight: 640;
}
.ledger-balanced::before {
  content: ""; width: 0.5rem; height: 0.28rem; flex: none;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-1px);
}

/* equal-height pricing cards with the button pinned to the bottom */
.price-grid { align-items: stretch; }
.price-grid .price-card {
  display: flex; flex-direction: column; max-width: none;
}
.price-grid .price-card .ticks { flex: 1 0 auto; }
.price-grid .price-card > .btn { margin-top: auto; }

/* pages whose hero is text-only need less air beneath it */
.hero.compact { padding-bottom: clamp(1rem, 2vw, 1.75rem); }
