/* ============================================================
   NARRATORIA — Shared Publishing Guide stylesheet
   One brand for every guide page. Link this file and delete the
   per-file <style> block:
     <link rel="stylesheet" href="guides.css" />
   Fonts (add to each guide <head>):
     <link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap" rel="stylesheet" />

   Brand: ink-black page, parchment-cream reading panel, antique-gold
   accents. Cinzel for display headings, Cormorant Garamond for body.
   Mobile-first; usable down to 380px.
   ============================================================ */

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

:root {
  --ink:          #000000;   /* page background */
  --ink-2:        #0e0c09;   /* header band / footer */
  --parchment:    #f5edd8;   /* content panel */
  --parchment-2:  #efe4c8;   /* alt panel / table stripe */
  --paper-line:   #e2d6b4;   /* hairline rules on parchment */
  --gold:         #d4af37;   /* accents, bullets, rules */
  --gold-deep:    #9c7a1e;   /* links / text-weight gold on cream */
  --gold-soft:    rgba(212,175,55,0.28);
  --text:         #241f17;   /* body ink on parchment */
  --text-2:       #4a4133;   /* secondary */
  --text-3:       #6d6151;   /* muted */
  --red:          #8a3a1e;
  --red-bg:       rgba(138,58,30,0.09);
  --blue:         #2f4a6b;
  --blue-bg:      rgba(47,74,107,0.09);
  --green:        #2f5a34;
  --green-bg:     rgba(47,90,52,0.10);
  --display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --body:    'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }

body {
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.7;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* wide children (specimens/tables) scroll internally, never the page */
}

/* ─── Header band ─── */
.guide-header {
  background: var(--ink-2);
  color: var(--parchment);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--gold-soft);
}
.guide-header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(212,175,55,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 20% 90%, rgba(212,175,55,0.07) 0%, transparent 55%);
}
.guide-header-inner {
  position: relative;
  max-width: 780px; margin: 0 auto;
  padding: 44px 32px 40px;
}
/* nav/back link: dark-on-parchment by default (older guides nest it inside the
   content panel); light only inside the dark .guide-header band. */
.nav-back, .back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold-deep);
  text-decoration: none;
  font-family: var(--body);
  font-size: 15px; letter-spacing: 0.04em;
  margin-bottom: 22px;
  transition: color 0.2s, padding-left 0.2s;
}
.nav-back:hover, .back-link:hover { color: #7c5f13; padding-left: 4px; }
.nav-back svg { width: 14px; height: 14px; }
.guide-header .nav-back { color: rgba(245,237,216,0.55); }
.guide-header .nav-back:hover { color: var(--gold); }

.phase-chip, .timeframe {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,175,55,0.14);
  border: 1px solid var(--gold-soft);
  color: var(--gold-deep);
  font-family: var(--display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px;
  margin-bottom: 16px;
}
.guide-header .phase-chip { color: var(--gold); }
.phase-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

h1, .guide-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 700; line-height: 1.15;
  color: #1c1710; letter-spacing: 0.01em;
  margin-bottom: 16px;
}
/* white title only on the dark header band */
.guide-header h1, .guide-title { color: #fff; }
.guide-title em, .guide-header h1 em { color: var(--gold); font-style: italic; }
h1 em { color: var(--gold-deep); font-style: italic; }

.guide-subtitle {
  font-size: 19px; color: var(--gold); font-style: italic;
  font-weight: 500; max-width: 580px; line-height: 1.5;
  opacity: 0.92;
}
.header-meta { display: flex; align-items: center; gap: 20px; margin-top: 26px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 7px; font-size: 15px; color: rgba(245,237,216,0.55); }
.meta-item svg { width: 14px; height: 14px; opacity: 0.7; }

/* ─── Content panel (the parchment sheet) ─── */
.content, .container {
  max-width: 780px; margin: 40px auto;
  padding: 52px 56px 60px;
  background: var(--parchment);
  border: 1px solid var(--gold-soft);
  border-radius: 6px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  overflow-wrap: break-word; /* long URLs/words break instead of widening the panel */
}

.section-label {
  display: inline-block;
  font-family: var(--display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-deep); margin-bottom: 10px;
}

/* ─── Typography ─── */
h2 {
  font-family: var(--display);
  font-size: 1.7rem; font-weight: 600;
  color: #1c1710; line-height: 1.25;
  margin: 48px 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--gold-soft);
}
h2:first-child { margin-top: 0; }
h3 {
  font-family: var(--display);
  font-size: 1.2rem; font-weight: 600;
  color: #2a2318; line-height: 1.3;
  margin: 30px 0 8px;
}
p  { margin-bottom: 16px; color: var(--text); }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; color: #1c1710; }
em { font-style: italic; }
code {
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  font-size: 0.82em; background: var(--parchment-2);
  border: 1px solid var(--paper-line);
  padding: 1px 6px; border-radius: 4px; color: #5a3d10;
}
pre {
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  font-size: 13px; line-height: 1.5; color: #3a3126;
  background: var(--parchment-2); border: 1px solid var(--paper-line);
  border-radius: 6px; padding: 14px 16px; margin: 20px 0;
  overflow-x: auto; max-width: 100%;
}
pre code { background: none; border: none; padding: 0; font-size: 1em; }
a { color: var(--gold-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7c5f13; }

hr, .rule { border: none; border-top: 1px solid var(--paper-line); margin: 40px 0; }

/* ─── Lists ─── */
ul, ol { margin: 4px 0 20px 0; padding-left: 0; list-style: none; }
li { position: relative; padding-left: 24px; margin-bottom: 9px; color: var(--text); line-height: 1.6; }
ul li::before { content: '\2013'; position: absolute; left: 0; color: var(--gold-deep); font-weight: 700; }
ol { counter-reset: li-c; }
ol li { counter-increment: li-c; }
ol li::before { content: counter(li-c) '.'; position: absolute; left: 0; top: 1px; color: var(--gold-deep); font-weight: 700; font-family: var(--display); font-size: 0.8em; }

/* ─── Callouts (rich guides) + legacy boxes ─── */
.callout {
  border-radius: 8px; padding: 20px 24px; margin: 26px 0;
  display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start;
}
.callout-icon { font-size: 18px; line-height: 1.5; }
.callout-body p:last-child { margin-bottom: 0; }
.callout-title { font-family: var(--display); font-size: 0.98rem; font-weight: 600; margin-bottom: 6px; }

.callout-tip, .tip-box     { background: rgba(212,175,55,0.12); border: 1px solid var(--gold-soft); border-radius: 8px; padding: 20px 24px; margin: 26px 0; }
.callout-tip .callout-title, .tip-box h3, .tip-box h4 { color: var(--gold-deep); }
.callout-warning, .warning-box { background: var(--red-bg);  border: 1px solid rgba(138,58,30,0.30); border-radius: 8px; padding: 20px 24px; margin: 26px 0; }
.callout-warning .callout-title, .warning-box h3, .warning-box h4 { color: var(--red); }
.callout-insight { background: var(--blue-bg); border: 1px solid rgba(47,74,107,0.28); border-radius: 8px; padding: 20px 24px; margin: 26px 0; }
.callout-insight .callout-title { color: var(--blue); }
.callout-success, .success-box { background: var(--green-bg); border: 1px solid rgba(47,90,52,0.28); border-radius: 8px; padding: 20px 24px; margin: 26px 0; }
.callout-success .callout-title, .success-box h3, .success-box h4 { color: var(--green); }
.tip-box p, .warning-box p, .success-box p, .example-box p { font-size: 17.5px; margin-bottom: 8px; }
.tip-box h3, .warning-box h3, .success-box h3 { font-family: var(--display); font-size: 1rem; margin-bottom: 6px; }

/* Example / copyright specimen box (legacy templates) */
.example-box { background: var(--parchment-2); border: 1px solid var(--paper-line); border-radius: 8px; padding: 22px 24px; margin: 24px 0; }
.copyright-text { font-family: 'SFMono-Regular','Consolas',monospace; font-size: 14px; line-height: 1.7; color: #3a3126; overflow-x: auto; max-width: 100%; }

/* ─── Steps ─── */
.steps { margin: 24px 0; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 0 18px; padding-bottom: 26px; position: relative; }
.step:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--paper-line); }
.step-number {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink-2); color: var(--gold);
  border: 1px solid var(--gold-soft);
  font-family: var(--display); font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; z-index: 1;
}
.step-content { padding-top: 8px; }
.step-title { font-family: var(--display); font-size: 1.05rem; font-weight: 600; color: #1c1710; margin-bottom: 8px; }
.step p { font-size: 17.5px; margin-bottom: 12px; }
.step p:last-child { margin-bottom: 0; }

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; margin: 24px 0; border-radius: 8px; border: 1px solid var(--paper-line); }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
thead th {
  background: var(--ink-2); color: var(--gold);
  font-family: var(--display); font-weight: 600;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 16px; text-align: left;
}
tbody tr { border-bottom: 1px solid var(--paper-line); }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) td { background: var(--parchment-2); }
tbody td { padding: 11px 16px; color: var(--text); vertical-align: top; }
td.mono, .mono { font-family: 'SFMono-Regular','Consolas',monospace; font-size: 13px; color: var(--gold-deep); }
td.check-yes, .check-yes { color: var(--green); font-weight: 600; }
td.check-no,  .check-no  { color: var(--red);   font-weight: 600; }
.compare-yes::before { content: '\2713 '; color: var(--green); }
.compare-no::before  { content: '\2717 '; color: var(--red); }

/* ─── Price cards ─── */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.price-card { border: 1px solid var(--paper-line); border-radius: 10px; padding: 20px; text-align: center; background: #fbf6e6; }
.price-card.featured { border: 2px solid var(--gold); position: relative; }
.price-card.featured::before {
  content: 'Recommended'; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #1c1710; font-family: var(--display);
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 12px; border-radius: 100px;
}
.price-qty { font-family: var(--display); font-size: 1.8rem; font-weight: 700; color: #1c1710; line-height: 1; margin-bottom: 4px; }
.price-label { font-size: 13px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.price-total { font-size: 1.3rem; font-weight: 700; color: var(--gold-deep); margin-bottom: 2px; }
.price-per { font-size: 13px; color: var(--text-3); }

/* ─── Completion checklist ─── */
.completion-checklist { margin: 26px 0; display: flex; flex-direction: column; border: 1px solid var(--paper-line); border-radius: 10px; overflow: hidden; }
.check-item { display: flex; align-items: flex-start; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--paper-line); font-size: 17px; color: var(--text); }
.check-item:last-child { border-bottom: none; }
.check-box { width: 20px; height: 20px; border: 2px solid var(--gold); border-radius: 5px; flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; color: var(--gold-deep); font-size: 12px; }

/* ─── Resources ─── */
.resources { border: 1px solid var(--paper-line); border-radius: 10px; overflow: hidden; margin: 34px 0; }
.resources-header, .resources h2 {
  background: var(--ink-2); color: var(--gold);
  padding: 14px 22px; margin: 0; border: none;
  font-family: var(--display); font-size: 1rem; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.resource-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 22px; text-decoration: none; color: var(--text);
  font-size: 16px; border-bottom: 1px solid var(--paper-line);
  transition: background 0.15s, color 0.15s;
}
.resource-link:last-child { border-bottom: none; }
.resource-link:hover { background: rgba(212,175,55,0.12); color: var(--gold-deep); }
.resource-link-label { display: flex; align-items: center; gap: 10px; }
.resource-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.resource-link svg { width: 14px; height: 14px; opacity: 0.4; flex-shrink: 0; }

/* ─── CTA / action ─── */
.cta-block, .action-section {
  background: var(--ink-2); border: 1px solid var(--gold-soft);
  border-radius: 12px; padding: 34px 40px; text-align: center; margin-top: 44px;
  position: relative; overflow: hidden;
}
.cta-block::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(212,175,55,0.16) 0%, transparent 60%); }
.cta-block * { position: relative; }
.cta-block p, .action-section p { color: rgba(245,237,216,0.72); font-size: 17px; margin: 0 auto 20px; max-width: 460px; }
.cta-title { font-family: var(--display); font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.cta-button, .action-button {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold), #b8912b);
  color: #1c1710; text-decoration: none; font-family: var(--display);
  font-weight: 700; font-size: 14px; letter-spacing: 0.02em;
  padding: 13px 30px; border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.cta-button:hover, .action-button:hover { color: #1c1710; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,0.5); }

/* ─── Intro panel & publisher-thinking ─── */
.intro-panel { border-left: 3px solid var(--gold); padding: 20px 26px; background: var(--parchment-2); border-radius: 0 8px 8px 0; margin-bottom: 36px; }
.intro-panel p { font-size: 18.5px; line-height: 1.65; margin-bottom: 10px; }
.intro-panel p:last-child { margin-bottom: 0; }
.publisher-thinking { background: var(--ink-2); border: 1px solid var(--gold-soft); color: rgba(245,237,216,0.85); border-radius: 12px; padding: 30px 36px; margin: 38px 0; }
.publisher-thinking h2 { font-family: var(--display); font-size: 1.4rem; color: var(--gold); margin: 0 0 16px; border: none; padding: 0; }
.publisher-thinking p { color: rgba(245,237,216,0.7); }
.publisher-thinking ul { margin-bottom: 0; }
.publisher-thinking li { color: rgba(245,237,216,0.82); }
.publisher-thinking li::before { color: var(--gold); }

/* ─── ISBN specimen ─── */
.isbn-display {
  font-family: 'SFMono-Regular','Consolas',monospace;
  font-size: 1.5rem; font-weight: 700; letter-spacing: 0.12em;
  color: #1c1710; background: var(--parchment-2);
  border: 2px dashed var(--paper-line); border-radius: 10px;
  padding: 18px 24px; text-align: center; margin: 20px 0;
}
.isbn-display span { color: var(--gold-deep); }

/* ─── Footer ─── */
footer {
  text-align: center; margin: 0 auto; max-width: 780px;
  padding: 30px 32px 48px; color: rgba(245,237,216,0.5);
  font-family: var(--display); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
footer a { color: var(--gold); }
footer p { color: #b8ac93; } /* muted parchment — legible on the dark page bg; the global `p{color:var(--text)}` is near-black here */

/* ─── Mobile (down to 380px) ─── */
@media (max-width: 640px) {
  body { font-size: 18px; }
  .guide-header-inner { padding: 34px 20px 32px; }
  .content, .container { margin: 20px 12px; padding: 30px 22px 40px; border-radius: 6px; }
  h2 { font-size: 1.4rem; }
  .price-grid { grid-template-columns: 1fr; }
  .price-card.featured { margin-top: 12px; }
  .cta-block, .action-section { padding: 26px 22px; }
  .step { grid-template-columns: 36px 1fr; gap: 0 14px; }
  .step-number { width: 36px; height: 36px; font-size: 14px; }
  .step:not(:last-child)::after { left: 17px; top: 36px; }
}

/* ============================================================
   GATE — teaser fade + unlock panel. The guide body is NOT in the
   page HTML; gate.js injects it into #ncc-gate-root for active
   licences, else renders .ncc-lock. The teaser (hero + first
   section) softly fades into the unlock CTA for locked readers.
   ============================================================ */
/* Fades only the final ~2 lines (body is 20px × 1.7 ≈ 34px/line) and bottoms
   out at 0.5 opacity — text stays at least ~50% visible so every word remains
   readable, while still signalling "there's more" before the paywall. */
.ncc-teaser-fade {
  height: 64px;
  margin-top: -64px;
  position: relative;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(245,237,216,0) 0%, rgba(245,237,216,0.5) 100%);
}
body.ncc-unlocked .ncc-teaser-fade { display: none; }

.ncc-lock {
  margin: 10px auto 6px;
  max-width: 560px;
  text-align: center;
  background: var(--ink-2);
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  padding: 34px 24px;
  color: var(--parchment);
}
.ncc-lock-badge {
  display: inline-block;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.ncc-lock-title {
  font-family: var(--display);
  color: var(--gold);
  font-size: clamp(20px, 5vw, 28px);
  line-height: 1.2;
  margin: 0 0 12px;
  border: 0;
  padding: 0;
}
.ncc-lock-copy {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  color: rgba(245,237,216,0.86);
  margin: 0 auto 10px;
  max-width: 460px;
}
.ncc-lock-trial { color: var(--gold); font-weight: 600; }
/* Emphasis inside the dark panels: the global `strong` colour (#1c1710) is
   near-black and illegible on ink. Use the bright antique gold, matching the
   "Try free for 10 days" line. Covers the paywall panel and the free-sample
   end panel. */
.ncc-lock strong, .ncc-sample-cta strong { color: var(--gold); }
.ncc-lock-cta {
  display: inline-block;
  margin-top: 12px;
  background: linear-gradient(to right, var(--gold), var(--gold-deep));
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 12px;
}
.ncc-lock-cta:hover { filter: brightness(1.06); }
.ncc-lock-sub {
  margin-top: 16px;
  font-family: var(--body);
  font-size: 14px;
  color: var(--text-3);
}
.ncc-lock-sub a { color: var(--gold); text-decoration: underline; }

/* ============================================================
   FREE SAMPLE — the one public guide (imprint-name). A gold badge
   sits at the top of the content; a non-blocking trial CTA is
   appended AFTER the full body. Both injected by gate.js.
   ============================================================ */
.ncc-sample-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: rgba(212,175,55,0.10);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 0 0 22px;
}
.ncc-sample-cta {
  margin: 44px auto 6px;
  max-width: 560px;
  text-align: center;
  background: var(--ink-2);
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  padding: 34px 24px;
  color: var(--parchment);
}
.ncc-sample-cta-title {
  font-family: var(--display);
  color: var(--gold);
  font-size: clamp(20px, 5vw, 26px);
  line-height: 1.2;
  margin: 0 0 12px;
  border: 0;
  padding: 0;
}
.ncc-sample-cta-copy {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  color: rgba(245,237,216,0.86);
  margin: 0 auto 14px;
  max-width: 460px;
}
.ncc-sample-cta-btn {
  display: inline-block;
  margin-top: 6px;
  background: linear-gradient(to right, var(--gold), var(--gold-deep));
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 12px;
}
.ncc-sample-cta-btn:hover { filter: brightness(1.06); }
.ncc-sample-cta-sub {
  margin-top: 14px;
  font-family: var(--body);
  font-size: 14px;
  color: var(--text-3);
}
