:root {
  --bg: #faf8f4;
  --bg-alt: #f1ede5;
  --text: #17191c;
  --muted: #5c6570;
  --accent: #0b5c2e;
  --accent-dark: #08431f;
  --line: rgba(23, 25, 28, 0.14);
  --line-soft: rgba(23, 25, 28, 0.08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; min-width: 0; }
html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p { overflow-wrap: break-word; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-dark); }
.container { width: min(1160px, calc(100% - 2rem)); margin: 0 auto; }

/* Header */
.topbar { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; gap: 1rem; }
.brand { font-weight: 700; font-size: 1.1rem; }
.brand-logo { height: 38px; display: block; }
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.nav-links a { font-weight: 600; font-size: .95rem; color: var(--muted); padding: .2rem 0; border-bottom: 1px solid transparent; }
.nav-links a:hover { color: var(--text); border-bottom-color: var(--accent); }
.header-actions { display: flex; gap: 1rem; align-items: center; }
.header-actions .btn-ghost { padding: .5rem 0; }
.header-actions .btn-primary.small { padding: .6rem 1.15rem; font-size: .9rem; }
.menu-toggle { display: none; color: var(--text); background: transparent; border: none; font-size: 1.3rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .35rem; padding: .85rem 1.4rem; border-radius: 6px; font-weight: 600; font-size: .95rem; letter-spacing: .01em; border: 1px solid transparent; cursor: pointer; transition: all .15s ease; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-secondary::after { content: "\2192"; transition: transform .15s ease; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-secondary:hover::after { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--muted); border: none; }
.btn-ghost:hover { color: var(--text); text-decoration: underline; }

/* Eyebrow label */
.eyebrow { display: flex; align-items: center; gap: .6rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-size: .74rem; font-weight: 700; margin-bottom: .9rem; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); display: inline-block; }

/* Headings */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .6rem; color: var(--text); }
.hero h1 { font-size: clamp(2.5rem, 4.6vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.2rem; }

/* Hero */
.hero { padding: 4.5rem 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: start; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.hero-text { font-size: 1.08rem; color: var(--muted); max-width: 620px; margin-top: .6rem; }
.hero-badges { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 1.3rem 0 1.3rem; color: var(--muted); font-size: .92rem; }
.hero-badges span:not(:last-child)::after { content: "\00b7"; margin-left: .5rem; color: var(--line); }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.3rem; }
.small-note { color: var(--muted); font-size: .9rem; margin-top: 1.4rem; }

.hero-card { border: 1px solid var(--line); border-radius: 8px; padding: 1.75rem; background: var(--bg-alt); }
.hero-card-badge { display: inline-block; text-transform: uppercase; font-size: .72rem; letter-spacing: .14em; font-weight: 700; color: var(--accent); margin-bottom: 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--accent); }
.hero-card p.muted { margin-bottom: 0; }
.app-id-badge { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.app-id-badge img { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; object-fit: cover; }
.app-id-badge p { margin: 0; font-size: .82rem; color: var(--muted); }

.stats-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; padding: 1.75rem 0 3rem; }
.stat-card { background: none; border: none; box-shadow: none; padding: 0; text-align: left; }
.stat-card strong { font-family: var(--serif); font-size: 1.9rem; color: var(--accent); display: block; margin-bottom: .2rem; font-weight: 600; }
.stat-card span { color: var(--muted); font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; }

/* Sections */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-heading { margin-bottom: 1.6rem; }
.muted { color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }

.card { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem; transition: border-color .15s ease, transform .15s ease; color: inherit; text-decoration: none; }
.section-alt .card { background: var(--bg); }
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card h3 { margin-top: 0; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); }

/* Grid page-cards (index.html About / Trust section) */
.card-grid .page-card { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 1.75rem; }
.card-grid .page-card ul { padding-left: 1.2rem; color: var(--muted); }

/* FAQ */
.faq-box { border-top: 1px solid var(--line); background: none; box-shadow: none; padding: 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 1.15rem 0; font-size: 1.05rem; font-weight: 600; font-family: var(--sans); color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; }
.faq-q:hover { color: var(--accent); }
.faq-a { padding: 0 0 1.15rem; color: var(--muted); max-width: 680px; }
.caret { color: var(--accent); font-weight: 400; flex-shrink: 0; }

/* Footer */
.footer { background: var(--bg-alt); color: var(--text); padding: 3.5rem 0 2.5rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 2rem; }
.footer h3 { font-size: 1.1rem; margin-bottom: .8rem; }
.footer p { color: var(--muted); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); text-decoration: underline; }

/* Standalone article pages (pages/*.html) */
.page-shell { padding: 3.5rem 0 5rem; }
.container.page-card { max-width: 760px; margin: 0 auto; background: none; border: none; padding: 0; box-shadow: none; }
.container.page-card h1 { font-size: clamp(2rem, 4vw, 2.7rem); border-bottom: 1px solid var(--line); padding-bottom: 1.3rem; margin-bottom: 1.3rem; }
.container.page-card h2 { margin-top: 2.2rem; font-size: 1.35rem; }
.container.page-card p { color: var(--text); }
.container.page-card ul, .container.page-card ol { padding-left: 1.3rem; color: var(--text); }
.container.page-card li + li { margin-top: .3rem; }

.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.4rem; display: block; }

.toc { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.toc p { margin: 0 0 .6rem; font-family: var(--sans); font-weight: 600; color: var(--text); }
.toc ol { margin: 0; padding-left: 1.3rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* Article layout with a right-hand table of contents */
.article-shell { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2.5rem; align-items: start; }
.article-shell .page-card { max-width: none; margin: 0; background: none; border: none; padding: 0; box-shadow: none; }
.article-shell .page-card h1 { font-size: clamp(2rem, 4vw, 2.7rem); border-bottom: 1px solid var(--line); padding-bottom: 1.3rem; margin-bottom: 1.3rem; }
.article-shell .page-card h2 { margin-top: 2.2rem; font-size: 1.35rem; }
.article-shell .page-card p { color: var(--text); }
.article-shell .page-card ul, .article-shell .page-card ol { padding-left: 1.3rem; color: var(--text); }
.article-shell .page-card li + li { margin-top: .3rem; }

.toc-sidebar { position: sticky; top: 96px; }
.toc-sidebar .toc { margin: 0; font-size: .93rem; }

@media (max-width: 900px) {
  .article-shell { grid-template-columns: 1fr; }
  .toc-sidebar { position: static; order: -1; }
}

/* Blog index cards with a thumbnail image */
.blog-card { padding: 0; overflow: hidden; }
.blog-card img { width: 100%; height: 170px; object-fit: cover; display: block; }
.blog-card-body { padding: 1.4rem 1.6rem 1.6rem; }
.blog-card-body h3 { margin-top: 0; }

.article-figure { margin: 1.75rem 0; }
.article-figure img { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--line); }
.article-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: .6rem; text-align: center; }

.table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.table th, .table td { border: 1px solid var(--line); padding: .75rem; text-align: left; }
.table th { background: var(--bg-alt); font-family: var(--sans); }

/* App screenshot gallery (homepage) */
.app-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.app-gallery figure { margin: 0; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; text-align: center; }
.app-gallery img { width: 100%; height: auto; border-radius: 8px; display: block; }
.app-gallery figcaption { margin-top: .8rem; font-size: .85rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid, .card-grid, .feature-list, .footer-grid, .stats-strip { grid-template-columns: 1fr; }
  .app-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 3rem; }
  .menu-toggle { display: inline-block; }
  .nav-wrap { align-items: flex-start; }
  .nav-right { width: 100%; display: none; flex-direction: column; align-items: flex-start; gap: .9rem; padding-top: 1rem; margin-top: .5rem; border-top: 1px solid var(--line); }
  .nav-right.open { display: flex; }
  .nav-links { flex-direction: column; width: 100%; gap: .9rem; }
  .nav-links a { width: 100%; }
  .header-actions { width: 100%; }
  .header-actions .btn { flex: 1; text-align: center; justify-content: center; }
}
