/* Session 9 Keeper props — printable period documents.
   Screen: desk view like the gazetteer. Print: one sheet per A4 page.
   PRINTING: in the print dialog enable "Background graphics", margins: None. */

:root {
  --desk-1: #191108;
  --desk-2: #2a1c0e;
  --ink: #2a2118;
  --ink-faint: #4d4234;
  --iron-gall: #3a2c1c;
  --graphite: #5a564f;
  --stamp-red: #8e3a2c;
  --gilt: #c9a75c;
}

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

body {
  background-color: var(--desk-1);
  background-image:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(255,196,110,0.10), transparent 60%),
    radial-gradient(ellipse 140% 120% at 50% 55%, var(--desk-2), var(--desk-1) 85%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'IM Fell English', serif;
  min-height: 100vh;
  padding: 0 0 6rem;
}

.ribbon {
  display: flex; justify-content: space-between; align-items: baseline;
  max-width: 900px; margin: 0 auto; padding: 1.1rem 1.4rem 0.4rem;
  font-family: 'IM Fell English SC', serif; font-size: 0.95rem; letter-spacing: 0.14em;
}
.ribbon a { color: var(--gilt); text-decoration: none; border-bottom: 1px solid rgba(201,167,92,0.35); }
.ribbon .plate { color: rgba(201,167,92,0.55); }

/* ---- sheets ---- */
.sheet {
  position: relative;
  width: 210mm;
  min-height: 296mm;
  max-width: 96vw;
  margin: 1.6rem auto;
  padding: 24mm 22mm;
  background:
    linear-gradient(rgba(242,231,205,0.25), rgba(238,224,194,0.30)),
    url('../assets/paper-light.jpg');
  background-size: cover;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 14px 44px rgba(0,0,0,0.55),
    inset 0 0 60px rgba(96,68,30,0.20), inset 0 0 6px rgba(70,48,20,0.25);
  border-radius: 2px;
  overflow: hidden;
}
.sheet.pamphlet { width: 148mm; min-height: 210mm; padding: 18mm 16mm; } /* octavo feel */

/* foxing spots */
.sheet::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle 26px at 88% 6%, rgba(122,84,40,0.14), transparent 70%),
    radial-gradient(circle 14px at 8% 88%, rgba(122,84,40,0.12), transparent 70%),
    radial-gradient(circle 40px at 96% 94%, rgba(100,66,28,0.10), transparent 70%),
    radial-gradient(circle 10px at 20% 12%, rgba(122,84,40,0.10), transparent 70%);
}

/* ---- letterpress voice ---- */
.press { font-size: 1.06rem; line-height: 1.62; color: var(--ink); }
.press p { margin: 0 0 0.9em; text-align: justify; text-indent: 1.6em; }
.press p.noindent { text-indent: 0; }
.title-block { text-align: center; margin: 10mm 0 8mm; }
.title-block .rule { border: none; border-top: 1px solid rgba(74,60,40,0.6); width: 38%; margin: 1.1rem auto; }
.title-main { font-family: 'IM Fell English SC', serif; font-size: 1.65rem; letter-spacing: 0.14em; line-height: 1.5; font-weight: 400; }
.title-sub { font-family: 'IM Fell English', serif; font-style: italic; font-size: 1.12rem; line-height: 1.65; margin-top: 1rem; }
.title-byline { font-family: 'IM Fell English SC', serif; font-size: 1.05rem; letter-spacing: 0.22em; margin-top: 1.4rem; }
.title-imprint { font-family: 'IM Fell English', serif; font-size: 0.98rem; margin-top: 0.5rem; }
.smallcaps { font-family: 'IM Fell English SC', serif; letter-spacing: 0.1em; }

/* pencil marginalia */
.margin-note {
  position: absolute; font-family: 'La Belle Aurore', cursive;
  color: var(--graphite); opacity: 0.85; font-size: 1.05rem; transform: rotate(-4deg);
}

/* ---- manuscript voices ---- */
.fairhand { font-family: 'Tangerine', cursive; font-size: 1.6rem; line-height: 1.44; color: var(--iron-gall); }
.fairhand p { margin: 0 0 0.7em; }
.fairhand .para-space { margin-top: 1.1em; }
.roughhand { font-family: 'La Belle Aurore', cursive; font-size: 1.28rem; line-height: 1.9; color: var(--iron-gall); }
.roughhand p { margin: 0 0 0.9em; }
.roughhand del { text-decoration: line-through; text-decoration-thickness: 2px; opacity: 0.8; }
.roughhand .marginal { display: inline-block; font-size: 1.05rem; transform: rotate(-2deg); opacity: 0.85; }
.ms-title { text-align: center; margin: 26mm 0 0; }
.ms-title .t1 { font-family: 'Tangerine', cursive; font-size: 3.4rem; line-height: 1.2; color: var(--iron-gall); }
.ms-title .t2 { font-family: 'Tangerine', cursive; font-size: 2.1rem; line-height: 1.45; color: var(--iron-gall); margin-top: 0.8rem; }
.ms-rule { border: none; text-align: center; margin: 1.2rem 0; }
.ms-rule::after { content: "— ✦ —"; color: rgba(74,60,40,0.55); font-size: 0.9rem; }

/* pinned note */
.pinned {
  position: absolute; top: 12mm; right: 14mm; width: 62mm; padding: 5mm 6mm 4mm;
  background: linear-gradient(rgba(232,218,186,0.92), rgba(224,207,170,0.94)), url('../assets/paper-light.jpg');
  background-size: cover;
  transform: rotate(3.5deg);
  box-shadow: 0 3px 9px rgba(30,18,6,0.45);
  font-family: 'La Belle Aurore', cursive; font-size: 1.02rem; line-height: 1.6;
  color: #2c2013;
}
.pinned::before {
  content: ""; position: absolute; top: -4px; left: 50%; width: 9px; height: 9px;
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d8d4cc, #6d6a63 60%, #3a3833);
  box-shadow: 0 2px 3px rgba(0,0,0,0.5);
}

/* filing stamp + clerk */
.stamp {
  position: absolute; top: 10mm; right: 14mm; width: 52mm; padding: 3mm 2mm;
  border: 2.5px solid var(--stamp-red); border-radius: 50%;
  color: var(--stamp-red); text-align: center;
  font-family: 'IM Fell English SC', serif; font-size: 0.95rem; letter-spacing: 0.2em;
  transform: rotate(-7deg); opacity: 0.72;
  -webkit-mask-image: radial-gradient(ellipse at 40% 60%, black 55%, rgba(0,0,0,0.55) 80%, rgba(0,0,0,0.85));
          mask-image: radial-gradient(ellipse at 40% 60%, black 55%, rgba(0,0,0,0.55) 80%, rgba(0,0,0,0.85));
}
.clerk {
  position: absolute; top: 26mm; right: 12mm; width: 58mm;
  font-family: 'La Belle Aurore', cursive; font-size: 1.05rem; line-height: 1.5;
  color: #4a3a26; transform: rotate(-2deg);
}

/* ---- newspaper clipping ---- */
.clip-wrap { display: flex; align-items: center; justify-content: center; min-height: 200mm; }
.clipping {
  width: 92mm; padding: 6mm 7mm;
  background: linear-gradient(rgba(228,214,180,0.9), rgba(221,205,168,0.92)), url('../assets/paper-light.jpg');
  background-size: cover;
  box-shadow: 0 4px 14px rgba(20,12,4,0.5);
  transform: rotate(-1.2deg);
  clip-path: polygon(0 1%, 4% 0, 96% 0.5%, 100% 2%, 99.6% 97%, 94% 99.4%, 55% 98.6%, 30% 100%, 3% 99%, 0.4% 96%);
  border-top: 1px solid rgba(74,60,40,0.55);
  border-bottom: 1px solid rgba(74,60,40,0.55);
}
.clipping .clip-head { font-family: 'IM Fell English SC', serif; letter-spacing: 0.16em; font-weight: 400; font-size: 1rem; display: inline; }
.clipping p { font-size: 0.94rem; line-height: 1.5; text-align: justify; display: inline; }


/* clipping: block-flow variant for columns with several paragraphs */
.clipping.column .clip-head { display: block; text-align: center; margin-bottom: 2mm; }
.clipping.column p { display: block; margin: 0 0 0.45em; text-indent: 1.2em; }
.clipping.column p.noindent { text-indent: 0; }
.clipping .prule { border: none; border-top: 1px solid rgba(74,60,40,0.5); width: 24%; margin: 2.5mm auto; }
.clipping .sigcaps { font-family: 'IM Fell English SC', serif; letter-spacing: 0.14em; }
.clipping .addr { font-style: italic; }
.clipping .ad-title { display: block; text-align: center; font-family: 'IM Fell English SC', serif; font-size: 1.3rem; letter-spacing: 0.08em; margin: 2mm 0; }
.clipping .ad-line { display: block; text-align: center; }
.clipping .sixpoint { font-size: 0.72rem; line-height: 1.45; }
.clipping .lot-bold { font-weight: bold; font-size: 1.02rem; }
.clipping .woodcut { display: block; text-align: center; margin-bottom: 1mm; }

/* ---- sketch sheet ---- */
.sketch-sheet { display: flex; align-items: center; justify-content: center; }
.sketch-sheet svg { max-width: 150mm; height: auto; }

.credits { max-width: 900px; margin: 2rem auto 0; padding: 0 1.4rem; color: rgba(201,167,92,0.45); font-size: 0.85rem; text-align: center; }


/* ---- new voices (Chapter 4 build) — one hand per writer, see the guide's hand registry ---- */
/* Harcourt — a peer's confident, rushed hand */
.noble { font-family: 'Great Vibes', cursive; font-size: 1.5rem; line-height: 1.6; color: var(--iron-gall); }
.noble p { margin: 0 0 0.8em; }
.noble .dateline { text-align: right; margin-bottom: 1.6em; }
.noble .signature { font-size: 2.2rem; margin-left: 8mm; }

/* Movses Zorab — a fluent sloping merchant's hand */
.merchant { font-family: 'Allura', cursive; font-size: 1.5rem; line-height: 1.62; color: var(--iron-gall); }
.merchant p { margin: 0 0 0.85em; }
.merchant .signature { font-size: 1.9rem; letter-spacing: 0.04em; }
.merchant .armenian { position: absolute; font-family: serif; font-size: 0.95rem; color: var(--iron-gall); opacity: 0.75; transform: rotate(-3deg); }

/* Arbuthnot — an English copperplate loosening as it goes */
.fieldhand { font-family: 'Homemade Apple', cursive; font-size: 1.02rem; line-height: 2.05; color: var(--iron-gall); }
.fieldhand p { margin: 0 0 1.1em; }
.fieldhand .entry-date { font-weight: 400; text-decoration: underline; text-decoration-thickness: 1px; }
.fieldhand .looser-1 { font-size: 1.1rem; }
.fieldhand .looser-2 { font-size: 1.2rem; line-height: 2.2; transform: rotate(-0.6deg); }

/* ---- invitation card ---- */
.card-wrap { display: flex; align-items: center; justify-content: center; min-height: 240mm; }
.card {
  width: 116mm; padding: 12mm 10mm; text-align: center; position: relative;
  background: linear-gradient(rgba(246,238,216,0.94), rgba(240,229,202,0.95)), url('../assets/paper-light.jpg');
  background-size: cover;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35), 0 10px 26px rgba(20,12,4,0.5);
  border: 1px solid rgba(120,98,60,0.25);
  color: var(--ink);
  font-family: 'IM Fell English', serif; font-size: 1.02rem; line-height: 1.7;
}
.card .small-caps { font-family: 'IM Fell English SC', serif; letter-spacing: 0.22em; font-size: 0.98rem; }
.card .script-line { font-family: 'Pinyon Script', cursive; font-size: 2rem; line-height: 1.3; color: var(--iron-gall); }
.card .names { font-size: 1.08rem; line-height: 1.85; }
.card .card-rule { border: none; border-top: 1px solid rgba(74,60,40,0.5); width: 30%; margin: 0.9rem auto; }
.card p { margin: 0 0 0.7em; }
.card .answer { font-size: 0.9rem; font-style: italic; margin-top: 1.2em; }

/* ---- ruled register (Custom House) ---- */
.register-head { font-family: 'IM Fell English SC', serif; letter-spacing: 0.14em; text-align: center; font-size: 1.05rem; margin-bottom: 6mm; }
.register-entry { font-family: 'Tangerine', cursive; font-size: 1.55rem; line-height: 1.5; color: var(--iron-gall); margin-bottom: 6mm; }
table.register { width: 100%; border-collapse: collapse; margin-top: 4mm; }
table.register th {
  font-family: 'IM Fell English SC', serif; font-weight: 400; letter-spacing: 0.1em; font-size: 0.85rem;
  border-bottom: 1.5px solid rgba(160,60,50,0.55); padding: 1.5mm 3mm; text-align: left;
}
table.register td {
  font-family: 'Tangerine', cursive; font-size: 1.5rem; line-height: 1.35; color: var(--iron-gall);
  border-bottom: 1px solid rgba(160,60,50,0.4); padding: 2mm 3mm; vertical-align: bottom;
}
table.register th + th, table.register td + td { border-left: 1px solid rgba(160,60,50,0.4); }
table.register tr.late-hand td { color: #241a10; font-family: 'La Belle Aurore', cursive; font-size: 1.12rem; }
.register-caption { font-family: 'Tangerine', cursive; font-size: 1.4rem; font-style: italic; color: var(--iron-gall); margin: 5mm 0 0; }

/* ---- proof-sheet furniture ---- */
.proof-running-head { display: flex; justify-content: space-between; font-family: 'IM Fell English SC', serif; letter-spacing: 0.14em; font-size: 0.9rem; border-bottom: 1px solid rgba(74,60,40,0.4); padding-bottom: 1.5mm; margin-bottom: 7mm; }
.compositor-query { position: absolute; font-family: 'La Belle Aurore', cursive; color: var(--graphite); font-size: 0.95rem; transform: rotate(-3deg); opacity: 0.85; width: 24mm; line-height: 1.4; }
.pencil-circle { position: relative; }
.pencil-circle::after { content: ""; position: absolute; inset: -0.35em -0.4em; border: 1.5px solid rgba(90,86,79,0.65); border-radius: 50%; transform: rotate(-3deg); }
.accession-stamp {
  position: absolute; bottom: 10mm; right: 12mm; padding: 1.5mm 3mm;
  border: 1.5px solid rgba(60,70,110,0.55); color: rgba(60,70,110,0.6);
  font-family: 'IM Fell English SC', serif; font-size: 0.75rem; letter-spacing: 0.12em; transform: rotate(4deg);
  -webkit-mask-image: radial-gradient(ellipse at 45% 55%, black 50%, rgba(0,0,0,0.5) 85%);
          mask-image: radial-gradient(ellipse at 45% 55%, black 50%, rgba(0,0,0,0.5) 85%);
}

/* ---- clipping variants ---- */
.clipping.tall { width: 96mm; }
.clip-mount { background: linear-gradient(rgba(150,146,138,0.9), rgba(138,133,124,0.92)); padding: 10mm 12mm; box-shadow: 0 4px 14px rgba(20,12,4,0.5); }
.clip-mount .clipping { box-shadow: 0 2px 6px rgba(20,12,4,0.45); margin: 0 auto 8mm; transform: rotate(-0.8deg); }
.clip-mount .clipping:last-child { margin-bottom: 0; transform: rotate(1deg); }
.pencil-cross { position: absolute; font-family: 'La Belle Aurore', cursive; color: var(--graphite); font-size: 1.6rem; }

/* ---- journal spread ---- */
.journal-spread { display: flex; gap: 0; min-height: 200mm; align-items: stretch; justify-content: center; }
.journal-page { width: 50%; padding: 8mm 9mm; position: relative; }
.journal-page.verso { border-right: 1px solid rgba(60,42,20,0.35); box-shadow: inset -14px 0 18px -12px rgba(60,40,16,0.5); }
.journal-page.recto { box-shadow: inset 14px 0 18px -12px rgba(60,40,16,0.5); }
.gutter-stain { position: absolute; top: 42%; width: 16mm; height: 26mm; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(150,160,165,0.5), rgba(130,145,155,0.28) 55%, transparent 75%);
  filter: blur(1px); }


/* ---- shared seal + fold marks (promoted from the Salisbury page) ---- */
.wax {
  position: absolute; top: 12mm; left: 18mm; width: 17mm; height: 15mm;
  background: radial-gradient(circle at 38% 32%, #b5543c, #7d2f1f 55%, #571d12 85%);
  border-radius: 46% 54% 52% 48% / 55% 47% 53% 45%;
  box-shadow: inset 0 2px 5px rgba(255,190,150,0.25), inset 0 -3px 6px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.35);
  transform: rotate(-8deg); opacity: 0.9;
}
.wax::after { content: ""; position: absolute; left: 55%; top: -6%; width: 2px; height: 60%;
  background: rgba(40,10,4,0.5); transform: rotate(14deg); }
.foldmark-h { position: absolute; left: 0; right: 0; height: 1px; background: rgba(90,70,40,0.28); }
.foldmark-v { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(90,70,40,0.28); }
.damp-corner { position: absolute; pointer-events: none; width: 46mm; height: 40mm;
  background: radial-gradient(ellipse at 100% 0%, rgba(110,80,40,0.22), rgba(110,80,40,0.10) 55%, transparent 75%);
  top: 0; right: 0; }

/* ---- print ----
   Paper-agnostic: sheets fill whatever page box the print dialog produces
   (Letter or A4, any margin setting), so nothing overruns onto a second page. */
@page { size: auto; margin: 0; }
@media print {
  body { background: none; padding: 0; }
  .ribbon, .credits, .keeper-note { display: none; }
  .sheet, .sheet.pamphlet {
    width: auto; max-width: none; height: auto;
    min-height: 98vh;
    margin: 0; border-radius: 0; box-shadow: none;
    padding: 14mm 22mm;
    page-break-after: always;
    box-decoration-break: clone; -webkit-box-decoration-break: clone;
  }
  .sheet:last-of-type { page-break-after: auto; }
  .sheet.pamphlet { padding: 18mm 30mm; }
  .clip-wrap { min-height: 90vh; }
  .ms-title { margin-top: 18mm; }
  .fairhand { font-size: 1.42rem; line-height: 1.38; }
  .roughhand { font-size: 1.1rem; line-height: 1.68; }
  .press { font-size: 0.97rem; line-height: 1.52; }
  .ms-title .t1 { font-size: 3rem; }
  .ms-title .t2 { font-size: 1.8rem; }
  .noble { font-size: 1.3rem; line-height: 1.5; }
  .noble .signature { font-size: 1.9rem; }
  .merchant { font-size: 1.3rem; line-height: 1.5; }
  .merchant .signature { font-size: 1.65rem; }
  .fieldhand { font-size: 0.9rem; line-height: 1.85; }
  .fieldhand .looser-1 { font-size: 0.98rem; }
  .fieldhand .looser-2 { font-size: 1.06rem; line-height: 2; }
  .card-wrap { min-height: calc(96vh - 32mm); }
  .journal-spread { min-height: 80vh; }
  table.register td { font-size: 1.32rem; }
  .register-entry { font-size: 1.38rem; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  p { orphans: 3; widows: 3; }
}
