/* Finolio — public site
   Appearance-adaptive neutral, financial-grade. System font stack only.
   The brand gradient (#5973FF → #8C59FF, top-left → bottom-right) appears
   ONLY on the brand mark and the primary CTA. Everything else is neutral;
   red/green is semantic amount coding, never brand. No external deps. */

:root {
  color-scheme: light dark;

  /* Brand — the one gradient, and its flat tint for small elements */
  --grad: linear-gradient(135deg, #5973ff 0%, #8c59ff 100%);
  --tint: #5a73ff;

  /* Neutrals — light */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #56565c;
  --text-3: #86868b;
  --hairline: rgba(0, 0, 0, 0.10);
  --hairline-strong: rgba(0, 0, 0, 0.18);

  /* Semantic amount coding — content, not brand */
  --amount-neg: #c22030;
  --amount-pos: #1f7a3d;

  --radius: 12px;
  --max-w: 1024px;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tint: #7d8eff;
    --bg: #101012;
    --bg-alt: #1a1a1d;
    --text: #f5f5f7;
    --text-2: #b6b6bc;
    --text-3: #86868b;
    --hairline: rgba(255, 255, 255, 0.14);
    --hairline-strong: rgba(255, 255, 255, 0.24);
    --amount-neg: #ff6b60;
    --amount-pos: #4cd964;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
}

::selection {
  background: rgba(90, 115, 255, 0.22);
}

a {
  color: var(--tint);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.prose {
  max-width: var(--measure);
  margin: 0 auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--hairline);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav a {
  color: var(--text-2);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 160ms ease;
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 88px 0 72px;
  text-align: center;
}
h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 auto 20px;
  max-width: 22ch;
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 34rem;
  margin: 0 auto 36px;
}
.cta-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Primary CTA — the one gradient moment outside the brand mark */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: var(--radius);
  transition: opacity 160ms ease, transform 160ms ease;
}
.btn-store:hover {
  text-decoration: none;
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-store svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
  margin-top: -2px;
}
.cta-note {
  font-size: 14px;
  color: var(--text-3);
}
.cta-note a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline-strong);
}
.cta-note a:hover {
  color: var(--text);
}

/* The ledger — hero centerpiece. Pure typography; the only color is
   the semantic red/green amount coding. */
.ledger-wrap {
  padding: 0 0 88px;
}
.ledger {
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.ledger-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--text-3);
}
.ledger-caption strong {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
}
.ledger-row {
  display: grid;
  grid-template-columns: 4.25rem 1fr auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hairline);
}
.ledger-row:last-of-type {
  border-bottom: none;
}
.l-date {
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.l-merchant {
  font-size: 15px;
  font-weight: 500;
  min-width: 0;
}
.l-meta {
  grid-column: 2;
  font-size: 13px;
  color: var(--text-3);
}
.l-amount {
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}
.l-amount.neg { color: var(--amount-neg); }
.l-amount.pos { color: var(--amount-pos); }
.ledger-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 20px;
  border-top: 1px solid var(--hairline);
  background: var(--bg-alt);
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.ledger-note {
  max-width: 640px;
  margin: 14px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

/* Sections */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--hairline);
}
.section-title {
  max-width: var(--measure);
  margin: 0 auto 48px;
}
.section-title h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.017em;
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 10px;
}
.section-title p {
  color: var(--text-2);
  font-size: 17px;
  max-width: 36rem;
}

/* Feature walkthrough — numbered ledger-style entries, no cards, no icons */
.feature-list {
  max-width: var(--measure);
  margin: 0 auto;
  list-style: none;
  border-top: 1px solid var(--hairline);
}
.feature-list li {
  display: grid;
  grid-template-columns: 3.5rem 14rem 1fr;
  gap: 8px 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
}
.f-num {
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}
.feature-list h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.feature-list p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

/* Contact */
.contact-card {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 36px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.contact-card h3 {
  font-size: 21px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.contact-card p {
  color: var(--text-2);
  margin-bottom: 18px;
}
.email-link {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  transition: border-color 160ms ease;
}
.email-link:hover {
  text-decoration: none;
  border-color: var(--text-3);
}

/* Doc pages (privacy, terms, support) */
.doc-header + .contact-card {
  border-top: none;
  padding-top: 0;
}

.doc {
  padding: 64px 0 96px;
}
.doc-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}
.doc-header h1 {
  font-size: clamp(32px, 4.5vw, 44px);
  margin: 0 0 8px;
  max-width: none;
}
.doc-meta {
  color: var(--text-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.doc h2 {
  font-size: 23px;
  letter-spacing: -0.013em;
  margin: 48px 0 14px;
  font-weight: 600;
}
.doc h3 {
  font-size: 17px;
  margin: 30px 0 10px;
  font-weight: 600;
}
.doc p,
.doc ul,
.doc ol {
  color: var(--text-2);
  font-size: 16px;
  margin-bottom: 14px;
}
.doc strong {
  color: var(--text);
  font-weight: 600;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li {
  margin-bottom: 8px;
}
.doc li > ul {
  margin-top: 8px;
}
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--text);
}
.callout {
  background: var(--bg-alt);
  border-left: 3px solid var(--tint); /* flat tint — never gradient on hairlines */
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
}
.callout p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--hairline);
}
.faq details:first-of-type {
  border-top: 1px solid var(--hairline);
}
.faq summary {
  cursor: pointer;
  padding: 16px 4px;
  font-weight: 500;
  font-size: 16px;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--text-3);
  flex-shrink: 0;
}
.faq details[open] summary::after {
  content: "\2212"; /* minus sign */
}
.faq-body {
  padding: 0 4px 20px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.65;
}
.faq-body p { margin-bottom: 12px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body ul,
.faq-body ol {
  padding-left: 20px;
  margin-bottom: 12px;
}
.faq-body li { margin-bottom: 6px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 48px;
  margin-top: 96px;
  background: var(--bg-alt);
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}
.footer-brand {
  color: var(--text-2);
  font-size: 14px;
  max-width: 24rem;
}
.footer-brand .brand {
  margin-bottom: 10px;
}
.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 8rem;
}
.footer-col span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.footer-col a {
  color: var(--text-2);
  font-size: 14px;
}
.footer-col a:hover {
  color: var(--text);
  text-decoration: none;
}
.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-3);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 720px) {
  .feature-list li {
    grid-template-columns: 3rem 1fr;
  }
  .feature-list li p {
    grid-column: 2;
  }
}
@media (max-width: 640px) {
  .hero { padding: 56px 0 48px; }
  .ledger-wrap { padding-bottom: 64px; }
  .section { padding: 56px 0; }
  .doc { padding: 40px 0 64px; }
  .site-footer { margin-top: 64px; }
  .ledger-row { padding: 12px 16px; }
  .ledger-caption, .ledger-foot { padding-left: 16px; padding-right: 16px; }
  .l-date { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
