/*
 * public/styles.css — generated by scripts/build.js. Do not edit:
 * the source lives in src/ (design tokens, then one file per atomic tier).
 */

/* ===== styles/tokens.css ===== */

/*
 * Design tokens — the raw material of the garden's design.
 *
 * This file holds only values (palette, fonts, layout) plus the bare
 * document reset. Everything more specific lives in the tier files
 * (0_atoms/atoms.css, 1_molecules/molecules.css, 2_organisms/organisms.css,
 * 3_templates/templates.css). build.js concatenates them, in atomic
 * order, into public/styles.css — so this file always comes first.
 */

:root {
  /* palette */
  --paper: #faf8f4;
  --ink: #22201c;
  --ink-soft: #5d594f;
  --line: #e4dfd4;
  --accent: #3e6b4f;
  --accent-soft: #eef3ee;

  /* type */
  --font-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-sans: -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* layout */
  --measure: 42rem;
}

/* Dark mode: override the palette, keep the same token names. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17181a;
    --ink: #e8e4da;
    --ink-soft: #a09a8c;
    --line: #2c2e31;
    --accent: #86b495;
    --accent-soft: #1f2620;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.65 var(--font-serif);
  -webkit-font-smoothing: antialiased;
}


/* ===== 0_atoms/atoms.css ===== */

/*
 * Atoms — the smallest pieces of the garden:
 * container width, headings, body text, links, eyebrow, tag, badge,
 * and prose (markdown as rendered from notes).
 *
 * Atoms that take data (a tag with a label, a date, ...) are small
 * functions in scripts/components.js; their *look* is defined here.
 */

/* Container — the page-width column every page renders inside. */
.container {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
}

/* Heading — page titles (h1) and section titles (h2). */
h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2.75rem 0 0.75rem;
}

/* BodyText — a muted intro paragraph under a heading. */
.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Link */
a { color: var(--accent); }

/* Eyebrow — a small uppercase label above a heading. */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

/* Tag — a note's type label (claim, question, tension, path, revival). */
.tag {
  font-family: var(--font-mono);
  font-size: 0.8em;
  color: var(--accent);
  margin-right: 0.5rem;
}

/* Badge — a small uppercase label for a panel (e.g. "young garden"). */
.badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Prose — markdown rendered from notes. */
.prose p { margin-bottom: 1rem; }

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.15rem 0 0.15rem 1.25rem;
  border-left: 3px solid var(--accent);
  font-size: 1.08rem;
  line-height: 1.6;
}

.prose blockquote p { margin-bottom: 0.4rem; }

.prose blockquote p:last-child {
  /* the attribution line of a quote */
  margin-bottom: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--ink-soft);
}


/* ===== 1_molecules/molecules.css ===== */

/*
 * Molecules — atoms combined: the back crumb, the claim line, the
 * note-meta line (tag · status · first noticed), the note card used in
 * the feed, and the source/graph lines (source-meta, cited-in, the
 * "Sources:" and "Also touches:" lines under a note's quotes). (The
 * data-driven halves live as functions in scripts/components.js.)
 */

/* Crumb — the "back to the garden" link at the top of a note page. */
.crumb {
  margin: 0 0 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

/* Claim — the italic one-line idea under a note title. */
.claim {
  margin: -0.5rem 0 0.75rem;
  font-size: 1.3rem;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink-soft);
}

/* NoteMeta — the tag · status · first-noticed line on a note page. */
.note-meta {
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* The tag in the meta line wears the pill style. */
.note-meta .tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

/* NoteCard — one entry in the notes feed (title link + claim line). */
.note-card {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.note-card:last-child { border-bottom: 0; }

.note-card a {
  font-size: 1.2rem;
  text-decoration: none;
}

.note-card a:hover { text-decoration: underline; }

.note-card p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-style: italic;
}

/* SourceMeta — a source page's kind · author · link line. Reuses the
   note-meta line's look; its tag is the source kind. */
.source-meta a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.source-meta a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* CitedIn — the list of notes that cite a source, on a source page. */
.cited-in {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.cited-in li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.cited-in li:last-child { border-bottom: 0; }

.cited-in a {
  text-decoration: none;
  font-size: 1.05rem;
}

.cited-in a:hover { text-decoration: underline; }

/* NoteSources / AlsoTouch — the small provenance and implicit-graph
   lines under a note's quotes. */
.note-sources,
.also-touch {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 1.75rem 0 0;
}

.also-touch .via { font-size: 0.8rem; }


/* ===== 2_organisms/organisms.css ===== */

/*
 * Organisms — page-level regions: the site header and footer, the
 * home intro, the status panel, the notes feed, and the note-types
 * legend. Their markup lives in the .html files next to this CSS.
 */

/* SiteHeader — the thin bar at the top of every page. */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans);
}

.site-header a {
  text-decoration: none;
  color: var(--ink);
}

.site-header a:hover { color: var(--accent); }

.site-header__name {
  font-size: 0.95rem;
  font-weight: 600;
}

.site-header__ui {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* SiteFooter — the bar at the bottom of every page. */
.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.site-footer p { margin: 0; }

/* StatusPanel — the bordered callout box on the home page. */
.status {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--accent-soft);
}

.status p { margin: 0.5rem 0 0; }

/* NotesFeed — the list of note cards (or the empty-garden line). */
.note-feed {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

/* Empty state shown when there are no public notes yet. */
.empty {
  color: var(--ink-soft);
  font-style: italic;
}

/* NoteTypes — the "how the notes look" legend list. */
.types {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.types li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.types li:last-child { border-bottom: 0; }


/* ===== 3_templates/templates.css ===== */

/*
 * Templates — page-level layout: home section spacing and the /ui/
 * component gallery (the kitchen sink).
 */

/* Home — spacing between the home page's sections. */
.home-section { margin-top: 2.5rem; }

/* Ui — the component gallery. Each demo is captioned with a .ui-item
   line, then the live component below it. */
.ui-section { margin-top: 2.5rem; }

.ui-item {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 1.5rem 0 0.25rem;
}
