/* Shared styles for the static pages: how-it-works, about, privacy, terms
   Mirrors the app's "Organic" tokens (see src/styles.css) so these pages
   read as the same product. Light theme only, fonts self-hosted. */

@font-face {
  font-family: 'Caprasimo';
  src: url('/fonts/caprasimo-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-latin-ext-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-latin-ext-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f5ead8;
  --surface: #fffdf8;
  --surface-alt: #ebddc5;
  --text: #201e1d;
  --text-soft: #5f574b;
  --text-faint: #82796a;
  --line: rgba(32, 30, 29, 0.16);
  --accent: #237257; /* mint-dark reads better than terracotta for links */
  --accent-strong: #185340;

  --box-1: #22409e;
  --box-2: #2f5bea;
  --box-3: #2e82c9;
  --box-4: #3aa6b0;
  --box-5: #5fc2a8;
  --box-learned: #a19786;

  /* Content pages (blog, FAQ) — mirrors src/styles.css's Organic palette */
  --mint-panel: #d2f2e5; /* --color-mint-100 / header wash */
  --heading-deep: #0f3628; /* --color-mint-900 */
  --chip-text: #453f36; /* --color-neutral-800 */
  --chip-hover: #e4d8c3; /* --color-neutral-300 */
  --card-shadow: 0 1px 2px rgba(46, 43, 37, 0.14);
  --card-shadow-hover: 0 3px 10px rgba(46, 43, 37, 0.16);

  --radius: 16px;
  --font-heading: 'Caprasimo', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  max-width: 660px;
  margin: 0 auto;
  padding: 32px 20px 72px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0 0 4px;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 20px;
  color: var(--text);
  margin: 40px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

p,
li {
  font-size: 15px;
}
li {
  margin: 4px 0;
}
ul {
  padding-left: 20px;
}

.lede {
  font-size: 16px;
  color: var(--text-soft);
}

.updated {
  margin-top: 0;
  font-size: 13px;
  color: var(--text-faint);
}

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-strong);
}

strong {
  font-weight: 700;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 13px;
}
pre {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
  line-height: 1.5;
}
:not(pre) > code {
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 1px 5px;
}

/* ---- Content pages: blog index, blog posts, FAQ ------------------------- */
/* Shared shell. The 720px measure and the exact header sizes are set per
   page, since the section pages (blog, FAQ) carry a Myata illustration the
   article pages do not. */

.pg-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  text-decoration: none;
}
.pg-back:hover {
  color: var(--accent);
}

.pg-header {
  position: relative;
  overflow: hidden;
  background: var(--mint-panel);
  border-radius: 0 0 28px 28px;
  padding: 28px 28px 32px;
}
.pg-header h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.04;
  color: var(--heading-deep);
}
.pg-header .pg-sub {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--accent);
}
.pg-header .pg-date {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--heading-deep);
  opacity: 0.72;
}
/* Author(s) and reading time, one line, right under the date */
.pg-header .pg-meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--heading-deep);
  opacity: 0.72;
}
.pg-header h1,
.pg-header .pg-sub,
.pg-header .pg-date,
.pg-header .pg-meta {
  max-width: 58%;
}
.pg-header img {
  position: absolute;
  height: auto; /* width is set per page; keep the aspect ratio, not the height attr */
  pointer-events: none;
  user-select: none;
}
/* Blog post with no hero art of its own: the title can use the full width */
.pg-header--post h1,
.pg-header--post .pg-date,
.pg-header--post .pg-meta {
  max-width: none;
}
.pg-header--post {
  padding: 26px 28px 26px;
}
.pg-header + .lede {
  margin-top: 24px;
}
@media (max-width: 680px) {
  .pg-header {
    padding: 22px 22px 26px;
  }
  .pg-header h1 {
    font-size: 29px;
  }
  .pg-header h1,
  .pg-header .pg-sub,
  .pg-header .pg-date,
  .pg-header .pg-meta {
    max-width: none;
    padding-right: 84px;
  }
  .pg-header--post h1,
  .pg-header--post .pg-date,
  .pg-header--post .pg-meta {
    padding-right: 0;
  }
}

.chip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.chip-links a {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--chip-text);
  text-decoration: none;
}
.chip-links a:hover {
  background: var(--chip-hover);
  color: var(--chip-text);
}

.post-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.post-card {
  display: block;
  background: var(--surface);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.post-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}
.post-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.post-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.15;
  color: var(--text);
}
.post-card time {
  flex: none;
  font-size: 12px;
  color: var(--text-faint);
}
.post-card p {
  margin: 9px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-soft);
}
.post-list .empty {
  color: var(--text-faint);
}

.faq-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-list details {
  background: var(--surface);
  border-radius: 18px;
  padding: 4px 22px;
  box-shadow: var(--card-shadow);
}
.faq-list summary {
  cursor: pointer;
  position: relative;
  padding: 16px 30px 16px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary:hover {
  color: var(--accent);
}
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-faint);
}
.faq-list details[open] summary::after {
  content: "\2212";
}
.faq-answer {
  padding: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-answer p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-soft);
}

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