/* 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; }
.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); }

/* ---------- 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; }

/* ---------- 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; }
}
