/* ConsciousEd atelier theme - calm study room aesthetic */
:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --ink: #1a1715;
  --ink-soft: #3b3530;
  --ink-mute: #6b625a;
  --rule: #d9cfbb;
  --sage: #7a8b6d;
  --coral: #c97862;
  --ochre: #c79a4a;
  --shadow: 0 1px 0 rgba(26,23,21,0.04), 0 12px 32px rgba(26,23,21,0.06);
  --measure: 38rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(1200px 700px at 12% -10%, rgba(199,154,74,0.08), transparent 60%),
    radial-gradient(900px 600px at 90% 0%, rgba(122,139,109,0.07), transparent 55%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
.skip-link {
  position: absolute; left: -9999px; top: auto;
  background: var(--ink); color: var(--paper); padding: .5rem .75rem;
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 1000; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,239,230,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: 84rem; margin: 0 auto;
}
.brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  font-family: var(--sans); font-weight: 700; letter-spacing: .04em;
  background: var(--ink); color: var(--paper); padding: .15rem .45rem; border-radius: 2px;
  font-size: .85rem;
}
.brand-word { font-family: var(--sans); font-weight: 600; letter-spacing: .02em; font-size: 1.05rem; }
.nav-primary ul {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem;
}
.nav-primary a {
  font-family: var(--sans); font-size: .92rem; color: var(--ink-soft); text-decoration: none;
}
.nav-primary a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.nav-search { color: var(--coral) !important; }
.menu-trigger {
  display: none; font-family: var(--sans); font-size: .8rem; letter-spacing: .15em;
  background: transparent; border: 1px solid var(--ink); color: var(--ink); padding: .35rem .65rem;
  cursor: pointer;
}
.overlay-menu {
  position: fixed; inset: 0; background: var(--paper);
  padding: 5rem 2rem; z-index: 60;
}
.overlay-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.overlay-menu a { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); text-decoration: none; }

@media (max-width: 820px) {
  .nav-primary { display: none; }
  .menu-trigger { display: inline-block; }
}

/* Main + prose */
.site-main {
  max-width: 84rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem;
}
.page-eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .18em;
  font-size: .72rem; color: var(--ink-mute); margin: 0 0 .75rem;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; margin: 0 0 1rem; letter-spacing: -.01em; font-weight: 600; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin: 2.4rem 0 .75rem; font-weight: 600; letter-spacing: -.005em; }
h3 { font-size: 1.18rem; margin: 1.6rem 0 .5rem; font-weight: 600; font-family: var(--sans); }
p, li { font-size: 1.05rem; }
.page-lede {
  font-size: 1.2rem; color: var(--ink-soft); max-width: var(--measure);
  margin: 0 0 2rem; line-height: 1.55;
}
.prose {
  max-width: var(--measure); margin: 0 auto;
}
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: .2em; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .25rem; }
.prose blockquote {
  margin: 1.5rem 0; padding: .25rem 0 .25rem 1rem;
  border-left: 2px solid var(--sage); color: var(--ink-soft); font-style: italic;
}

/* Hero figure */
.page-hero {
  margin: 0 0 2.5rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.page-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Sensitive note */
.sensitive-note {
  background: rgba(122,139,109,0.08);
  border: 1px solid rgba(122,139,109,0.35);
  padding: .9rem 1.1rem;
  border-radius: 4px;
  margin: 1rem 0 2rem;
  max-width: var(--measure);
}
.sensitive-note p { margin: 0; font-size: .98rem; color: var(--ink-soft); }

/* Related */
.related {
  max-width: var(--measure); margin: 3rem auto 0;
  padding-top: 1.5rem; border-top: 1px solid var(--rule);
}
.related-label { font-family: var(--sans); text-transform: uppercase; letter-spacing: .15em; font-size: .72rem; color: var(--ink-mute); margin: 0 0 .5rem; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.related a { color: var(--ink); }

/* Atelier composition blocks (used inside markdown via raw HTML) */
.rooms {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem;
  margin: 2rem 0; max-width: 64rem;
}
@media (max-width: 720px) { .rooms { grid-template-columns: 1fr; } }
.room {
  background: var(--paper-2); border: 1px solid var(--rule); padding: 1.25rem 1.4rem; border-radius: 6px;
  display: block; color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow);
}
.room:hover { background: #fff; }
.room-no { font-family: var(--sans); font-size: .72rem; letter-spacing: .2em; color: var(--ink-mute); }
.room-title { font-family: var(--serif); font-size: 1.5rem; margin: .35rem 0 .35rem; font-weight: 600; }
.room-blurb { font-size: .98rem; color: var(--ink-soft); margin: 0; }

.shelf {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin: 2rem 0; max-width: 64rem;
}
@media (max-width: 760px) { .shelf { grid-template-columns: 1fr; } }
.shelf a {
  display: block; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--rule); border-radius: 4px;
  color: var(--ink); text-decoration: none; font-size: .98rem;
}
.shelf a:hover { border-color: var(--ink); }
.shelf .author { display: block; font-family: var(--sans); font-size: .78rem; color: var(--ink-mute); margin-top: .25rem; letter-spacing: .04em; }

.practice-table {
  background: var(--paper-2); border: 1px dashed var(--rule); padding: 1.5rem;
  border-radius: 6px; margin: 2rem 0; max-width: 64rem;
}
.practice-table h3 { margin-top: 0; }

.search-drawer {
  background: var(--paper-2); border: 1px solid var(--rule); padding: 1.25rem;
  border-radius: 4px; margin: 2rem 0;
}
.search-drawer input[type="search"] {
  width: 100%; padding: .75rem .9rem; border: 1px solid var(--rule);
  background: #fff; font-family: var(--serif); font-size: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule); margin-top: 4rem;
  background: var(--paper-2);
}
.footer-inner {
  max-width: 84rem; margin: 0 auto; padding: 2rem 1.5rem 2.5rem;
  display: grid; gap: .75rem;
}
.footer-mark { font-family: var(--sans); font-weight: 600; letter-spacing: .04em; margin: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-family: var(--sans); font-size: .9rem; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-fineprint { font-family: var(--sans); font-size: .8rem; color: var(--ink-mute); margin: .5rem 0 0; }

/* Body layouts */
.layout-wiki .wiki-prose h2,
.layout-book .book-prose h2,
.layout-idea .idea-prose h2 { border-bottom: 1px solid var(--rule); padding-bottom: .35rem; }

/* Search page */
.search-results { list-style: none; padding: 0; margin: 1.5rem 0; max-width: var(--measure); }
.search-results li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.search-results a { color: var(--ink); font-weight: 600; }
.search-results .snippet { color: var(--ink-soft); font-size: .95rem; margin: .25rem 0 0; }

/* 404 */
.layout-404 .site-main { text-align: center; }

/* ── Article + Sidebar layout ───────────────────────────────────────────── */
.article-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 3rem;
  align-items: start;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (max-width: 55rem) {
  .article-with-sidebar {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ── Newsletter sidebar ──────────────────────────────────────────────────── */
.newsletter-sidebar {
  position: sticky;
  top: 2rem;
}
.nl-sidebar-inner {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
}
.nl-eyebrow {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 .5rem;
}
.nl-headline {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 .6rem;
  line-height: 1.3;
}
.nl-pitch {
  font-size: .9rem;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  line-height: 1.55;
}
.nl-label {
  display: block;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: .3rem;
}
.nl-label abbr { text-decoration: none; color: var(--coral); }
.nl-field { margin-bottom: .75rem; }
.nl-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: .55rem .75rem;
  transition: border-color .15s;
}
.nl-input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122,139,109,.18);
}
.nl-btn {
  display: block;
  width: 100%;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--sage);
  border: none;
  border-radius: 4px;
  padding: .65rem 1rem;
  cursor: pointer;
  transition: background .15s;
  margin-top: .25rem;
}
.nl-btn:hover { background: var(--ink-soft); }
.nl-btn:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.nl-status {
  font-size: .85rem;
  margin: .65rem 0 0;
  min-height: 1.2em;
}
.nl-status[data-ok]   { color: var(--sage); }
.nl-status[data-err]  { color: var(--coral); }
.nl-fine {
  font-size: .75rem;
  color: var(--ink-mute);
  margin: .75rem 0 0;
  line-height: 1.4;
}
/* Honeypot — completely hidden */
.nl-honey { display: none !important; visibility: hidden !important; }

/* ── Newsletter inline block (hub pages) ────────────────────────────────── */
.newsletter-inline {
  background: var(--paper-2);
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  padding: 2.5rem 1.5rem;
  margin: 3rem 0;
}
.nl-inline-inner {
  max-width: var(--measure);
  margin: 0 auto;
}
.nl-inline-headline {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--ink);
  margin: 0 0 .65rem;
}
.nl-inline-pitch {
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}
.nl-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: .75rem;
  align-items: end;
}
@media (max-width: 42rem) {
  .nl-field-row { grid-template-columns: 1fr; }
}
.nl-btn--wide { width: auto; padding: .65rem 1.5rem; }

