/* amenbo — dark-first design tokens.
   The brand palette derives from the logo (a water strider): blue + coral.
   AI = blue, humans = coral. No third accent (purple retired) so the bright
   logo never reads as a different world from the site. crofty's warm-earth /
   serif defaults are intentionally replaced; `crofty doctor` still confirms
   the output contract (canonical link, feed, no third-party tracking). */

:root {
  color-scheme: dark;

  /* surfaces & text — dark base with a faint blue cast (night water) */
  --bg: #0a0c12;        /* page background */
  --ink: #dfe3ec;       /* body text and headings */
  --muted: #8b93a4;     /* dates, captions, secondary text */
  --line: #23262f;      /* rules, borders */
  --accent: #3fb4dd;    /* links on hover, active marks — blue */
  --code-bg: #14161c;   /* inline code and code blocks */

  --measure: 46rem;     /* reading-column width */

  /* type — sans for reading/chrome, mono for code/CLI. No serif. */
  --font-body:   system-ui, -apple-system, "Segoe UI", "Noto Sans JP", sans-serif;
  --font-chrome: system-ui, -apple-system, "Segoe UI", "Noto Sans JP", sans-serif;
  --font-mono:   ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;

  /* brand semantics (logo-derived) — AI is blue, humans are coral */
  --c-ai:     #3fb4dd;  /* AI = blue */
  --c-human:  #ff8a63;  /* humans = coral */
  --c-teal:   #1fa5cf;  /* blue accent — eyebrows, prompts, links */
  --c-orange: #ff7a59;  /* coral accent — CTA (a human's action) */
  --c-ok:     #45b37e;  /* success ✓ */
  --term-bg:  #10131b;  /* terminal surface */
  --term-bar: #191d27;  /* terminal title bar */
  --term-line:#262a35;
}

/* Light theme for readers whose system asks for it — dark is the default
   (dark-first), matching the always-dark terminal demo. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f6f8fb;
    --ink: #191c22;
    --muted: #58606e;
    --line: #e3e6ec;
    --accent: #1682a8;
    --code-bg: #eef1f5;
    --c-ai:     #1682a8;
    --c-human:  #e8663c;
    --c-teal:   #1682a8;
    --c-orange: #ef5f3c;
  }
}

/* Header — amenbo's own, not built on crofty's chrome (different class names so
   the theme's .site-header rules never apply). Logo + wordmark left, nav +
   language switch right, on one vertically-centered row aligned to the 64rem
   content width. */
.amn-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.amn-header-inner {
  max-width: 64rem;
  margin-inline: auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.amn-brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-chrome); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em;
}
.amn-logo { width: 26px; height: 26px; display: block; }
.amn-nav {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 1.4rem;
  font-family: var(--font-chrome); font-size: 0.9rem;
}
.amn-nav > a { color: var(--muted); text-decoration: none; }
.amn-nav > a:hover { color: var(--ink); }
.amn-nav .lang-switch { font-size: 0.85rem; margin-left: 0.3rem; }
.amn-nav .lang-switch a, .amn-nav .lang-switch .lang-current { margin-left: 0.7rem; }
.amn-nav .lang-switch a { color: var(--muted); text-decoration: none; }
.amn-nav .lang-switch a:hover { color: var(--ink); }
.amn-nav .lang-switch .lang-current { color: var(--c-teal); }
@media (max-width: 560px) { .amn-header-inner { flex-wrap: wrap; } }

/* Footer — amenbo's own (not crofty's chrome). Nav row, then © + crofty credit. */
.amn-footer { border-top: 1px solid var(--line); margin-top: 2rem; }
.amn-footer-inner {
  max-width: 64rem;
  margin-inline: auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  font-family: var(--font-chrome);
  font-size: 0.88rem;
}
.amn-footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.4rem; }
.amn-footer-nav a { color: var(--muted); text-decoration: none; }
.amn-footer-nav a:hover { color: var(--ink); }
.amn-footer-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; color: var(--muted); font-size: 0.82rem; }
.amn-credit { color: var(--muted); text-decoration: none; }
.amn-credit:hover { color: var(--c-teal); }

/* Markdown images in content pages (e.g. Start) — resolved via the image render hook. */
.md-img { display: block; max-width: 100%; height: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: 8px; }

/* Doc pages (Start / Releases / Privacy) — amenbo's own layout, matching the landing. */
.doc-wrap { max-width: 52rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) 1.5rem; font-family: var(--font-body); }
.doc-header { padding-bottom: 1.4rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.doc-title { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.doc-lead { margin: 0.7rem 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.doc-body { color: color-mix(in srgb, var(--ink) 90%, transparent); line-height: 1.75; }
.doc-body h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; margin: 2.6rem 0 0.8rem; color: var(--ink); }
.doc-body h3 { font-size: 1rem; font-weight: 700; margin: 1.9rem 0 0.5rem; color: var(--ink); }
.doc-body p, .doc-body ul { margin: 0 0 1rem; }
.doc-body ul { padding-left: 1.2rem; }
.doc-body li { margin: 0.3rem 0; }
.doc-body a { color: var(--c-teal); text-decoration: underline; text-underline-offset: 2px; }
.doc-body a:hover { color: var(--c-orange); }
.doc-body blockquote { margin: 1.2rem 0; padding: 0.7rem 1rem; border-left: 2px solid var(--c-teal); background: color-mix(in srgb, var(--ink) 3%, transparent); border-radius: 0 6px 6px 0; color: var(--muted); font-style: normal; }
.doc-body blockquote p { margin: 0; }
.doc-body :not(pre) > code { font-family: var(--font-mono); font-size: 0.85em; background: var(--code-bg); color: var(--c-teal); padding: 0.12em 0.4em; border-radius: 5px; }
.doc-body pre { background: #11131a; border: 1px solid #262a35; border-radius: 10px; padding: 1rem 1.15rem; overflow-x: auto; margin: 1.15rem 0; font-size: 0.85rem; line-height: 1.65; }
.doc-body pre, .doc-body pre * { color: #d7dae3 !important; background: none !important; }
.doc-body pre .c, .doc-body pre .cm, .doc-body pre .c1, .doc-body pre .cp { color: #7d8496 !important; }
