/* Settled Nervous System — site stylesheet
   Brand: white paper, charcoal ink, one sage accent. Book-like, webfont-free. */

:root {
  --paper: #ffffff;
  --ink: #1a1a1a;
  --soft: #555555;
  --line: #dddddd;
  --sage: #2e7d32;
  --sage-soft: #e8f5e9;
  --warn: #ffebee;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Palatino Linotype", Palatino, serif;
  font-size: 18px;
  line-height: 1.6;
}

/* --- layout: single column, book-like measure --- */
main { max-width: 960px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
section { margin: 3rem 0; }

/* --- header: title + language switch + buy --- */
header.site {
  max-width: 960px; margin: 0 auto; padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid var(--line);
}
header.site .brand {
  font-variant: small-caps; letter-spacing: 0.08em;
  font-size: 1.05rem; color: var(--ink); text-decoration: none;
}
header.site nav { display: flex; gap: 1rem; align-items: center; }
header.site a { color: var(--soft); text-decoration: none; }
header.site a.lang { font-size: 0.9rem; }
header.site a.lang[aria-current="true"] { color: var(--sage); font-weight: bold; }

/* --- typography --- */
h1 { font-size: 2.1rem; line-height: 1.2; margin: 1.5rem 0 1rem; text-align: left; }
h2 { font-size: 1.45rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.15rem; font-style: italic; margin: 1.5rem 0 0.5rem; }
p  { margin: 0.75rem 0; }
a  { color: var(--sage); }
strong { font-weight: bold; }
em { font-style: italic; }

/* --- hero --- */
.hero { text-align: center; padding: 3.5rem 0 2rem; }
.hero h1 { font-size: 2.6rem; text-align: center; }
.hero p.sub { color: var(--soft); font-size: 1.15rem; max-width: 34em; margin: 1rem auto 1.75rem; }
.hero .cover { max-width: 220px; margin: 0 auto 1.5rem; display: block; box-shadow: 0 4px 18px rgba(0,0,0,0.12); }

/* --- buttons --- */
.btn, .btn-outline {
  display: inline-block; padding: 0.7em 1.5em; margin: 0.25em;
  border-radius: 4px; text-decoration: none; font-size: 1rem;
}
.btn { background: var(--sage); color: #fff !important; }
.btn:hover { background: #27672b; }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink) !important; }
.btn-outline:hover { background: var(--ink); color: #fff !important; }
.cta-row { text-align: center; margin: 1.75rem 0; }

/* --- four-map cards --- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.cards-2 { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }        /* AFTER .cards: wins the cascade */
.cards-2 .card { padding: 1.75rem; }
.cards-2 .card img { max-width: min(420px, 100%); margin: 0 auto 1rem; }
.card { border: 1px solid var(--line); border-radius: 4px; padding: 1.25rem; text-align: center; }
.card img { max-width: 100%; height: auto; margin: 0 auto 0.75rem; }
.card h3 { font-style: normal; font-variant: small-caps; letter-spacing: 0.05em; }

/* --- figures --- */
img { max-width: 100%; height: auto; display: block; margin: 1.5rem auto; }
figure { margin: 2rem auto; text-align: center; }
figure img { margin: 0 auto; }
figure figcaption, img + figcaption { color: var(--soft); font-size: 0.88rem; font-style: italic; margin-top: 0.6rem; text-align: center; }
.figure { margin: 2rem auto; text-align: center; max-width: 640px; }
.figure img { max-width: 100%; height: auto; border: 1px solid var(--line); }
.figure figcaption, figcaption { color: var(--soft); font-size: 0.9rem; font-style: italic; margin-top: 0.5rem; }

/* --- callouts --- */
.callout {
  background: var(--sage-soft); border-left: 4px solid var(--sage);
  padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 4px 4px 0;
}
.callout.warn { background: var(--warn); border-left-color: #c62828; }

/* --- experiment steps --- */
ol.steps { margin: 1.25rem 0; padding-left: 0; list-style: none; counter-reset: step; }
ol.steps li { counter-increment: step; margin: 1rem 0; padding-left: 2.6rem; position: relative; }
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.1rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--sage); color: #fff;
  font-size: 0.95rem; line-height: 1.7rem; text-align: center;
}

/* --- tables --- */
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; margin: 1.25rem 0; }
th { background: #f4f4f2; border-bottom: 2px solid var(--ink); padding: 0.45em 0.6em; text-align: left; }
td { border-bottom: 1px solid var(--line); padding: 0.45em 0.6em; vertical-align: top; }

/* --- THE SIX COLORS (same class names as the EPUB stylesheet) --- */
.c-yellow { color: #b8860b; font-weight: bold; }
.c-green  { color: #2e7d32; font-weight: bold; }
.c-blue   { color: #1565c0; font-weight: bold; }
.c-orange { color: #e65100; font-weight: bold; }
.c-red    { color: #c62828; font-weight: bold; }
.c-violet { color: #6a1b9a; font-weight: bold; }

/* --- email capture block --- */
.signup {
  border: 2px solid var(--sage); border-radius: 4px;
  padding: 1.75rem; margin: 2.5rem 0; text-align: center;
}
.signup h2 { margin-top: 0; }
.signup input[type="email"] {
  font: inherit; padding: 0.7em 1em; width: min(22rem, 100%);
  border: 1px solid var(--line); border-radius: 4px; margin: 0.5rem 0;
}

/* --- footer --- */
footer.site {
  border-top: 1px solid var(--line);
  max-width: 960px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem;
  color: var(--soft); font-size: 0.88rem; text-align: center;
}
footer.site a { color: var(--soft); }

/* --- single breakpoint --- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .hero h1 { font-size: 2rem; }
  header.site { flex-wrap: wrap; }
  .btn, .btn-outline { display: block; max-width: 20rem; margin: 0.5rem auto; }
  .cards, .cards-2 { grid-template-columns: 1fr; }   /* phones: single full-width column */
  .cards-2 .card img { max-width: 100%; }
}
