/* GitAccounting site — brand stylesheet.
   Adapted from the app design tokens (desktop/src/renderer/src/styles/tokens/).
   Warm stone neutrals, ledger green primary, IBM Plex superfamily,
   restrained radii and subtle grounded shadows. */

:root {
  /* Warm stone neutrals */
  --stone-50:  #FAF9F7;
  --stone-100: #F2F0EC;
  --stone-200: #E6E2DB;
  --stone-300: #D5D0C7;
  --stone-400: #A8A299;
  --stone-500: #78736B;
  --stone-600: #57534D;
  --stone-700: #403D38;
  --stone-900: #1A1917;

  /* Ledger green primary */
  --green-50:  #ECF7F1;
  --green-600: #167A4E;
  --green-700: #12603E;
  --green-800: #0F4C31;

  /* Trust blue accent */
  --blue-600: #1F5FC4;

  /* Semantic */
  --surface-app:    var(--stone-50);
  --surface-card:   #FFFFFF;
  --border-subtle:  var(--stone-200);
  --border-default: var(--stone-300);
  --text-primary:   var(--stone-900);
  --text-secondary: var(--stone-600);
  --text-tertiary:  var(--stone-500);
  --text-link:      var(--blue-600);
  --accent:         var(--green-600);
  --accent-hover:   var(--green-700);
  --accent-active:  var(--green-800);
  --accent-soft:    var(--green-50);

  /* Type */
  --font-sans:  'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-serif: 'IBM Plex Serif', ui-serif, Georgia, serif;
  --ls-caps: 0.06em;

  /* Radii & shadows (restrained, ledger-precise) */
  --radius-sm: 5px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(26, 25, 23, 0.06), 0 1px 3px rgba(26, 25, 23, 0.05);
  --shadow-md: 0 2px 4px rgba(26, 25, 23, 0.06), 0 4px 10px rgba(26, 25, 23, 0.07);
  --ring: rgba(22, 122, 78, 0.35);

  --content-max: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: 34px; font-weight: 700; margin: 0 0 12px; }
h2 { font-size: 24px; font-weight: 600; margin: 40px 0 12px; }
h3 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--stone-100);
  border-radius: 3px;
  padding: 1px 5px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-primary);
}
.wordmark:hover { text-decoration: none; }
.wordmark-git { font-family: var(--font-mono); color: var(--accent); }
.wordmark-accounting { font-family: var(--font-sans); color: var(--text-primary); }
.wordmark-small { font-size: 15px; }
.site-logo { width: 26px; height: 26px; display: block; flex-shrink: 0; }
.footer-inner .site-logo { width: 20px; height: 20px; }

.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 4px 2px;
}
.site-nav a:hover { color: var(--text-primary); text-decoration: none; }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; max-width: 720px; }
.hero h1 { font-size: 42px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: 18px; color: var(--text-secondary); margin: 0 0 24px; }

.button {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  transition: background 130ms ease;
}
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-hover); text-decoration: none; }
.button-primary:active { background: var(--accent-active); }
.button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.button-secondary {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.button-secondary:hover { background: var(--stone-100); text-decoration: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.article-card {
  display: block;
  color: var(--text-primary);
  transition: box-shadow 130ms ease, transform 130ms ease;
}
.article-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.article-card h3 { margin: 0 0 6px; color: var(--accent); }
.article-card p { margin: 0 0 10px; font-size: 14px; color: var(--text-secondary); }
.card-meta { font-size: 12px; color: var(--text-tertiary); }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 24px 0 8px;
}
.feature-card h3 { margin-top: 0; color: var(--text-primary); }
.feature-card p { margin: 0; font-size: 14px; color: var(--text-secondary); }

.kb-preview { padding: 40px 0 64px; }
.kb-header { padding: 48px 0 8px; }
.section-lead { color: var(--text-secondary); max-width: 640px; margin: 0 0 24px; }

.kb-group { padding: 8px 0 24px; }
.kb-group h2 { margin: 24px 0 16px; }

/* ---------- Article ---------- */
.article { max-width: 720px; padding: 48px 0 64px; }

.article-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--accent);
  margin: 0 0 8px;
}

.article h1 { font-family: var(--font-serif); font-weight: 600; }
.article-updated { font-size: 13px; color: var(--text-tertiary); margin: 0 0 28px; }

.article-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 24px; }
.article-body li { margin-bottom: 6px; }
.article-body h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

/* ---------- "Which account?" callout ---------- */
.callout {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 32px 0;
}
.callout-account {
  background: var(--accent-soft);
  border: 1px solid var(--green-600);
}
.callout-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--green-700);
  margin: 0 0 10px;
}
.account-list { list-style: none; margin: 0; padding: 0; }
.account-list li { margin-bottom: 4px; }
.account-ref {
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.account-note { font-size: 14px; color: var(--text-secondary); margin: 10px 0 0; }

/* ---------- Disclaimer ---------- */
.disclaimer,
.footer-disclaimer {
  font-size: 13px;
  color: var(--text-tertiary);
  border-left: 3px solid var(--border-default);
  padding-left: 12px;
}

/* ---------- Ad slot (clearly separated from content) ---------- */
.ad-slot {
  margin: 40px 0;
  padding: 20px;
  background: var(--stone-100);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
  text-align: center;
}
.ad-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.ad-placeholder {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-tertiary);
}
/* House ad (self-promotional card shown until a real ad provider is set). */
.ad-house { text-align: left; background: var(--accent-soft); border-style: solid; border-color: var(--border-subtle); }
.house-ad { display: flex; flex-direction: column; gap: 5px; text-decoration: none; }
.house-ad:hover { text-decoration: none; }
.house-ad:hover .house-ad-cta { text-decoration: underline; }
.house-ad-headline { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.house-ad-body { font-size: 13px; line-height: 1.45; color: var(--text-secondary); }
.house-ad-cta { margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--accent); }
.house-ad-sponsor {
  display: block; margin-top: 10px; font-size: 11px;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--text-tertiary);
}

/* ---------- Related ---------- */
.related { margin-top: 8px; }
.related h2 { font-size: 20px; }

/* ---------- Download teaser (home) ---------- */
.download-teaser { padding: 16px 0 40px; }
.platform-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 36px;
  margin-top: 20px;
}
.platform-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 220px;
  color: var(--text-primary);
  transition: box-shadow 130ms ease, transform 130ms ease;
}
a.platform-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.platform-icon { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.platform-name { font-size: 17px; font-weight: 600; }
.platform-detail { font-size: 13px; color: var(--text-secondary); }
.platform-cta { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--accent); }

/* Mobile store badges — disabled placeholders until the apps ship. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
}
.store-badge-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 172px;
  padding: 9px 16px;
  border-radius: 9px;
  background: var(--stone-900);
  color: #fff;
  border: 1px solid var(--stone-900);
  text-decoration: none;
  user-select: none;
}
.store-badge-glyph { width: 26px; height: 26px; flex-shrink: 0; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.12; text-align: left; }
.store-badge-line1 { font-size: 10px; letter-spacing: 0.02em; opacity: 0.9; }
.store-badge-line2 { font-size: 18px; font-weight: 600; letter-spacing: 0.01em; }
.store-badge.is-disabled {
  filter: grayscale(1);
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.store-caption {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ---------- Download page ---------- */
.download-head { padding: 56px 0 8px; max-width: 720px; }
.download-note { font-size: 14px; color: var(--text-secondary); }

.download-loading, .download-fallback {
  padding: 32px 0;
  color: var(--text-secondary);
}

.dl-featured { padding: 24px 0 8px; }
.dl-featured-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}
.dl-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--accent);
}
.dl-featured-title { font-size: 26px; font-weight: 600; margin: 2px 0 0; }
.dl-featured-date { font-size: 13px; color: var(--text-tertiary); }

.dl-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.dl-col {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dl-col.is-recommended { border-color: var(--green-600); box-shadow: var(--shadow-md); }
.dl-col.is-empty { opacity: 0.75; }
.dl-col-head { display: flex; align-items: center; gap: 8px; }
.dl-col-icon { font-size: 20px; line-height: 1; }
.dl-col-name { font-size: 16px; font-weight: 600; }
.dl-col-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--green-700);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 8px;
}
.dl-col-none { font-size: 13px; color: var(--text-tertiary); margin: 0; }

.dl-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: background 130ms ease, border-color 130ms ease;
}
.dl-button:hover { text-decoration: none; background: var(--stone-100); border-color: var(--stone-400); }
.dl-button-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.dl-button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.dl-button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.dl-button-size { font-size: 12px; opacity: 0.8; font-variant-numeric: tabular-nums; }

.dl-previous { padding: 32px 0 16px; }
.dl-prev-list { display: flex; flex-direction: column; gap: 8px; }
.dl-prev-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.dl-prev-meta { display: flex; align-items: baseline; gap: 10px; min-width: 120px; }
.dl-prev-version { font-family: var(--font-mono); font-weight: 600; font-size: 15px; }
.dl-prev-date { font-size: 12px; color: var(--text-tertiary); }
.dl-prev-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.dl-prev-link { font-size: 13px; }
.dl-prev-none { font-size: 13px; color: var(--text-tertiary); }

.download-help { padding: 24px 0 64px; max-width: 720px; }
.download-help ul { padding-left: 20px; }
.download-help li { margin-bottom: 8px; color: var(--text-secondary); }
.download-help li strong { color: var(--text-primary); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-card);
  margin-top: 24px;
}
.footer-inner { padding: 28px 20px 36px; }
.footer-inner p { margin: 0 0 10px; font-size: 14px; color: var(--text-secondary); }

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

@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 30px; }
  h1 { font-size: 28px; }

  /* Four nav items no longer fit beside the wordmark on a phone. Stack the
     nav under it and let it scroll rather than spill out of the header. */
  .header-inner { flex-wrap: wrap; row-gap: 6px; }
  .site-nav {
    width: 100%;
    gap: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; }
}

/* ---------- Pricing (bank sync is the one paid feature) ---------- */
.hero-narrow { max-width: 640px; }

.bank-sync-teaser { padding: 8px 0 0; }
.bank-sync-card {
  background: var(--green-50);
  border-color: var(--green-600);
}
.bank-sync-card h2 { margin-top: 0; color: var(--green-800); }
.bank-sync-card .section-lead { margin-bottom: 16px; }

.pricing-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 8px 0 24px;
  align-items: start;
}
.pricing-card { display: flex; flex-direction: column; }
.pricing-card h2 { margin: 0 0 4px; }
/* The paid plan is the one that needs explaining, not the one that needs
   selling hardest — a tint, not a spotlight. */
.pricing-card-paid { border-color: var(--green-600); }

.pricing-amount {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.pricing-period { font-size: 15px; color: var(--text-tertiary); font-weight: 400; }
.pricing-note { margin: 4px 0 16px; font-size: 13px; color: var(--text-tertiary); }

.pricing-list {
  margin: 0 0 20px;
  padding-left: 18px;
  flex: 1;
}
.pricing-list li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.pricing-why { padding: 24px 0 8px; }
.pricing-why .features { padding-top: 12px; }

.pricing-faq { padding: 24px 0 64px; }
.pricing-faq h2 { margin-bottom: 8px; }
.pricing-faq h3 {
  margin: 22px 0 4px;
  font-size: 16px;
  color: var(--text-primary);
}
.pricing-faq p { margin: 0; font-size: 14px; color: var(--text-secondary); }
