/* Nous — Book layout */

.book {
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  padding: var(--s-10) var(--s-9);
  position: relative;
  border-bottom: 1px solid var(--nous-rule-soft);
  display: flex;
  flex-direction: column;
}

.page--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-9);
}

.page__folio {
  position: absolute;
  top: var(--s-6);
  left: var(--s-9);
  right: var(--s-9);
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-sc);
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nous-ink-4);
}

.page__folio .num { font-variant-numeric: oldstyle-nums; }

.eyebrow {
  font-family: var(--ff-sc);
  font-size: var(--fs-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--nous-ink-3);
  margin: 0 0 var(--s-5) 0;
}

.eyebrow--accent { color: var(--nous-aegean); }

h1.display, .display {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: var(--fs-3xl);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}

h2.section {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: var(--fs-2xl);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0 0 var(--s-6) 0;
}

h3 {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: var(--fs-lg);
  letter-spacing: 0.005em;
  margin: 0 0 var(--s-4) 0;
}

p.lede {
  font-family: var(--ff-display);
  font-weight: 300;
  font-style: italic;
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--nous-ink-2);
  max-width: var(--measure);
  margin: 0;
}

.rule {
  border: 0;
  border-top: 1px solid var(--nous-rule);
  margin: var(--s-6) 0;
}

.rule--thin { border-top-color: var(--nous-rule-soft); }

.rule--meander {
  border: 0;
  height: 14px;
  background-image:
    linear-gradient(var(--nous-rule), var(--nous-rule)),
    linear-gradient(var(--nous-rule), var(--nous-rule));
  background-size: 100% 1px, 100% 1px;
  background-position: 0 0, 0 100%;
  background-repeat: no-repeat;
  position: relative;
}

/* Greek meander / key pattern via SVG background */
.meander {
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='16' viewBox='0 0 64 16'><g fill='none' stroke='%239a9081' stroke-width='1.2'><path d='M0 14 H10 V4 H20 V10 H14 V14 H32 V4 H42 V10 H36 V14 H64'/></g></svg>");
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.55;
}
[data-mode="dark"] .meander {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='16' viewBox='0 0 64 16'><g fill='none' stroke='%235e5844' stroke-width='1.2'><path d='M0 14 H10 V4 H20 V10 H14 V14 H32 V4 H42 V10 H36 V14 H64'/></g></svg>");
}

/* Drop-cap */
.dropcap::first-letter {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 5.2em;
  line-height: 0.82;
  float: left;
  padding: 0.08em 0.1em 0 0;
  color: var(--nous-terracotta);
}

/* Small-caps utility */
.sc {
  font-family: var(--ff-sc);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Greek text */
.greek {
  font-family: var(--ff-greek);
  font-style: normal;
  color: var(--nous-ink-2);
}

/* Prose */
.prose {
  max-width: var(--measure);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--nous-ink);
}
.prose p { margin: 0 0 1em 0; }
.prose p + p { text-indent: 1.4em; margin-top: 0; }
.prose p.noindent + p { text-indent: 0; }

/* Marginalia / footnote feel */
.margin-note {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: var(--fs-sm);
  color: var(--nous-ink-3);
  line-height: 1.45;
  max-width: 28ch;
}

/* Tag chip */
.chip {
  display: inline-block;
  font-family: var(--ff-sc);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nous-ink-3);
  padding: 3px 10px;
  border: 1px solid var(--nous-rule);
  border-radius: 2px;
  background: transparent;
}
.chip--accent { color: var(--nous-aegean); border-color: color-mix(in oklab, var(--nous-aegean) 40%, var(--nous-rule)); }
