/* ===========================================================
   Family Gathering Workbook — Layout System (canvas chrome)
   ----------------------------------------------------------
   Design thesis:
   - Borders are rare. Fills are rarer.
   - Hierarchy is type, indent, weight, and hairline rule.
   - One callout (Group Instructions) earns visual weight; the rest
     of the page stays quiet.
   =========================================================== */

:root {
  /* ink */
  --ink:        #000000;
  --graphite:   #2F2525;
  --quiet:      #6c625e;
  --hairline:   #cfc8c2;
  --hairline-2: #e6e0d8;
  --paper:      #ffffff;
  --stage:      #f3eee6;     /* warm off-white background for specimens */
  --stage-deep: #ebe4d8;

  /* accents — used at hairline scale only */
  --blue:       #3d6f9c;
  --green:      #6f9c39;
  --raspberry:  #9c3d6f;
  --purple:     #693d9c;
  --orange:     #ea5812;

  /* type */
  --serif:      "Red Hat Display", "Helvetica Neue", Arial, sans-serif;
  --display:    Georgia, "Iowan Old Style", "Source Serif Pro", serif;
  --hebrew:     "Frank Ruhl Libre", "SBL Hebrew", "David Libre", Georgia, serif;
  --tnum:       "tnum" 1, "lnum" 1;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--stage);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-width: 1440px; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3, h4, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead {
  background: var(--stage);
  padding: 96px 80px 80px;
  border-bottom: 1px solid var(--hairline);
}
.masthead-inner { max-width: 1280px; margin: 0 auto; }

.masthead-eyebrow {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--quiet);
}
.masthead-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 96px;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-top: 18px;
  color: var(--ink);
}
.masthead-amp {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.55em;
  color: var(--quiet);
}
.masthead-lede {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  max-width: 720px;
  margin-top: 28px;
  color: var(--graphite);
}

.masthead-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 56px;
  max-width: 980px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.meta-col { display: flex; flex-direction: column; gap: 4px; }
.meta-k {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 6px;
}
.meta-v {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--graphite);
  line-height: 1.5;
}

/* TOC */
.toc {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  max-width: 980px;
}
.toc-head {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 18px;
}
.toc-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 48px;
}
.toc-list li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dotted var(--hairline);
}
.toc-num {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--quiet);
}
.toc-list a {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
.toc-sub {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
  white-space: nowrap;
}

/* ============================================================
   BLOCK / SECTION
   ============================================================ */
.block {
  padding: 80px 80px 60px;
  max-width: 1440px;
  margin: 0 auto;
}
.block-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: baseline;
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
}
.block-num {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--quiet);
}
.block-title {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.block-purpose {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--graphite);
  max-width: 760px;
  margin-top: 14px;
}
.block-purpose em { font-style: italic; }

/* Foundations layout */
.found-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 28px 0;
  align-items: start;
}
.found-row + .found-row { border-top: 1px solid var(--hairline-2); }
.found-label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--quiet);
  padding-top: 32px;
}

/* ============================================================
   PAPER — the white surface that holds a component specimen
   ============================================================ */
.paper {
  background: var(--paper);
  position: relative;
  padding: 36px 40px;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.04),
    0 10px 28px -18px rgba(40,30,20,0.18);
}
.paper-wide { padding: 48px 56px; }
.paper-page {
  width: 612px;     /* 8.5 × 11 at 72dpi ish — close enough to read at "print scale" */
  height: 792px;
  padding: 48px 48px 40px 68px;  /* 1in left gutter */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.paper-block {
  padding: 36px 44px;
}
.paper-full { width: 100%; }

/* ============================================================
   SPECIMENS — the meta layer around components
   ============================================================ */
.specimens { display: grid; gap: 36px; }
.specimens-three { grid-template-columns: repeat(3, 1fr); align-items: start; }
.specimens-two   { grid-template-columns: repeat(2, 1fr); align-items: start; }
.specimens-pull  { grid-template-columns: 1fr 1.25fr; align-items: start; }
.specimens-stacked { grid-template-columns: 1fr; max-width: 980px; margin: 0 auto; gap: 56px; }

.specimen { margin: 0; display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.specimens-stacked .specimen { align-items: center; }
.specimens-stacked .paper-page,
.specimens-stacked .paper-full { width: 760px; max-width: 100%; }

.caption {
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--graphite);
  padding: 0 4px;
  max-width: 760px;
}
.caption b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-right: 6px;
}

.sub-section {
  margin-bottom: 56px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.sub-eyebrow {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 14px;
}

.recommendation {
  max-width: 980px;
  margin: 36px auto 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--hairline-2);
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--graphite);
}
.rec-pill {
  display: inline-block;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid currentColor;
  padding: 2px 9px 3px;
  margin-right: 10px;
  vertical-align: 2px;
}

/* ============================================================
   FOUNDATIONS — Type scale specimens
   ============================================================ */
.type-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: baseline;
  padding: 18px 0;
}
.type-row + .type-row { border-top: 1px dotted var(--hairline-2); }
.type-meta {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
  padding-top: 8px;
}
.t-h1 { font-family: var(--display); font-size: 56px; font-weight: 400; line-height: 1.04; letter-spacing: -0.02em; }
.t-h2 { font-family: var(--display); font-size: 22px; font-weight: 500; line-height: 1.15; }
.t-h3 { font-family: var(--display); font-size: 14px; font-weight: 600; line-height: 1.2; }
.t-eyebrow {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--quiet);
}
.t-body  { font-family: var(--serif); font-size: 14px; line-height: 1.55; max-width: 64ch; }
.t-aloud { font-family: var(--serif); font-size: 17px; line-height: 1.6; max-width: 50ch; }
.t-italic { font-family: var(--serif); font-style: italic; font-size: 13px; line-height: 1.5; color: var(--graphite); max-width: 56ch; }

/* Color palette */
.palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 36px;
}
.swatch { display: flex; gap: 14px; align-items: flex-start; }
.chip {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.chip-name {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.chip-hex {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--quiet);
  margin-top: 2px;
}
.chip-role {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--graphite);
  margin-top: 4px;
  line-height: 1.4;
}
.found-note {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.6;
  color: var(--graphite);
  max-width: 70ch;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dotted var(--hairline-2);
}

/* Page diagram */
.spacing-paper { padding: 36px 40px; }
.page-diagram { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.pd-page {
  width: 280px;
  height: 360px;
  background: var(--paper);
  border: 1px solid var(--ink);
  position: relative;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
}
.pd-gutter {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 33px;            /* 1" out of 8.5" ≈ 11.8% × 280 */
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,0.06) 6px 7px);
  border-right: 1px dashed var(--hairline);
}
.pd-gutter::after {
  content: attr(data-label);
  position: absolute;
  bottom: 8px;
  left: 4px;
  font-size: 7.5px;
  color: var(--quiet);
  transform: rotate(-90deg);
  transform-origin: left bottom;
  white-space: nowrap;
}
.pd-margin { position: absolute; }
.pd-margin-r { right: 0; top: 0; bottom: 0; width: 20px; border-left: 1px dashed var(--hairline); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,0.04) 6px 7px); }
.pd-margin-t { top: 0; left: 33px; right: 20px; height: 23px; border-bottom: 1px dashed var(--hairline); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,0.04) 6px 7px); }
.pd-margin-b { bottom: 0; left: 33px; right: 20px; height: 21px; border-top: 1px dashed var(--hairline); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,0.04) 6px 7px); }
.pd-live {
  position: absolute;
  left: 33px;
  right: 20px;
  top: 23px;
  bottom: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
  text-align: center;
}
.pd-notes { display: flex; flex-direction: column; gap: 16px; max-width: 60ch; }
.pd-notes li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: baseline; padding-bottom: 14px; border-bottom: 1px dotted var(--hairline-2); }
.pd-notes li:last-child { border-bottom: 0; }
.pd-k { font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--quiet); }
.pd-v { font-family: var(--serif); font-size: 14px; line-height: 1.5; color: var(--graphite); }

/* Ink rules list */
.rule-list { display: flex; flex-direction: column; gap: 14px; max-width: 64ch; counter-reset: rule; }
.rule-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--graphite);
  padding-bottom: 14px;
  border-bottom: 1px dotted var(--hairline-2);
}
.rule-list li:last-child { border-bottom: 0; }
.rule-list li::before {
  counter-increment: rule;
  content: counter(rule, decimal-leading-zero);
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--quiet);
  padding-top: 4px;
}
.rule-list b { font-family: var(--serif); font-weight: 700; color: var(--ink); }

/* ============================================================
   PAGE CHROME (used inside paper-page mockups)
   ============================================================ */
.page-chrome-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 0.75px solid var(--graphite);
  font-family: var(--display);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--quiet);
}
.page-chrome-bot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 0.5px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--quiet);
}
.page-live {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

/* ============================================================
   COMMON COMPONENT HELPERS
   ============================================================ */
.comp-eyebrow {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 10px;
}
.comp-eyebrow-sub { margin-top: 18px; margin-bottom: 10px; }

.rule-soft { border: 0; border-top: 1px solid var(--hairline); margin: 18px 0; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  body { background: #fff; min-width: 0; }
  .paper { box-shadow: none; }
  .block, .masthead { padding: 24px 36px; }
}
