/* ============================================================
   UFJL, Manual page (screen)
   "Field guide" book-style chapters with sticky TOC.
   ============================================================ */

/* ---------- Cover / hero ---------- */
.manual-cover {
  background:
    radial-gradient(ellipse 80% 60% at 30% 110%, rgba(242,168,29,.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(200,16,46,.10), transparent 65%),
    var(--navy-ink);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 6px solid var(--gold);
}
.manual-cover::before {
  content: "";
  position: absolute;
  right: -100px; top: -100px;
  width: 400px; height: 400px;
  background: var(--gold);
  opacity: .06;
  transform: rotate(18deg);
  pointer-events: none;
}

.manual-cover__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 920px) {
  .manual-cover__inner { grid-template-columns: 1fr; }
}

.manual-cover .eyebrow-row .num { background: var(--gold); color: var(--navy-ink); }
.manual-cover .eyebrow-row .label { color: rgba(255,255,255,.7); }

.manual-cover h1 {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 112px);
  line-height: .88;
  letter-spacing: -.045em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}
.manual-cover h1 .gold { color: var(--gold); }
.manual-cover h1 .serif {
  font-family: var(--f-serif);
  font-style: normal;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -.02em;
  display: block;
  font-size: .82em;
}

.manual-cover .lede {
  font-family: var(--f-serif);
  font-style: normal;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  color: rgba(255,255,255,.85);
  margin-top: 24px;
  max-width: 52ch;
}

.manual-cover .cover-cta {
  display: flex; flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.manual-cover .cover-cta .btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.manual-cover .cover-cta .btn--ghost:hover {
  background: #fff; color: var(--navy-ink); border-color: #fff;
}

/* Book mock on the right */
.book-mock {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
  margin-left: auto;
  perspective: 1400px;
}
.book-mock__cover {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.25)),
    var(--navy);
  border: 1px solid rgba(255,255,255,.12);
  border-left: 8px solid var(--gold);
  border-radius: 2px 6px 6px 2px;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,.6),
    0 10px 30px -10px rgba(0,0,0,.4),
    inset 4px 0 0 rgba(0,0,0,.2);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotateY(-12deg) rotateX(2deg);
  transform-origin: left center;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.book-mock:hover .book-mock__cover {
  transform: rotateY(-6deg) rotateX(0);
}
.book-mock__cover::after {
  /* paper edge */
  content: "";
  position: absolute;
  right: -1px; top: 6px; bottom: 6px; width: 4px;
  background: repeating-linear-gradient(
    to bottom,
    #f6f2e7 0, #f6f2e7 1px,
    #e0d8b6 1px, #e0d8b6 2px
  );
  border-radius: 0 2px 2px 0;
}
.book-mock__crest {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
}
.book-mock__title {
  font-family: var(--f-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.03em;
  line-height: .9;
  color: #fff;
  font-size: clamp(28px, 3.6vw, 44px);
}
.book-mock__title span {
  display: block;
  font-family: var(--f-serif);
  font-style: normal;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -.01em;
  color: var(--gold);
  font-size: .7em;
  margin-top: 6px;
}
.book-mock__seal {
  align-self: flex-start;
  width: 180px;
  display: flex; align-items: center; justify-content: flex-start;
}
.book-mock__seal img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.book-mock__meta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  border-top: 1px solid rgba(242,168,29,.4);
  padding-top: 12px;
}
.book-mock__meta b { color: #fff; display: block; font-family: var(--f-display); font-size: 13px; letter-spacing: .04em; margin-bottom: 4px; }

/* ---------- Cover stats ribbon ---------- */
.cover-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.18);
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: clamp(28px, 4vw, 40px);
  position: relative;
  z-index: 1;
}
.cover-stats__cell {
  padding: 0 clamp(16px, 2vw, 28px);
  border-right: 1px solid rgba(255,255,255,.14);
}
.cover-stats__cell:last-child { border-right: 0; }
.cover-stats__cell:first-child { padding-left: 0; }
.cover-stats__cell .n {
  display: block;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -.03em;
  color: var(--gold);
  line-height: 1;
}
.cover-stats__cell .l {
  display: block;
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
@media (max-width: 720px) {
  .cover-stats { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .cover-stats__cell:nth-child(2) { border-right: 0; }
  .cover-stats__cell:nth-child(3) { padding-left: 0; }
}

/* ---------- Body layout: TOC + chapters ---------- */
.manual-body {
  background: var(--paper);
  padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 7vw, 96px);
}
.manual-body__grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 980px) { .manual-body__grid { grid-template-columns: 1fr; } }

/* TOC */
.toc {
  position: sticky;
  top: 96px;
  align-self: start;
}
.toc__head {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--navy-ink);
}
.toc__list { list-style: none; padding: 0; margin: 0; }
.toc__list li { border-bottom: 1px solid var(--line); }
.toc__list li:last-child { border-bottom: 0; }
.toc__list a {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--navy-ink);
  text-decoration: none;
  align-items: baseline;
  transition: color .15s;
}
.toc__list a:hover { color: var(--gold); text-decoration: none; }
.toc__list a .n {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted);
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.toc__list a.is-active {
  color: var(--gold);
}
.toc__list a.is-active .n { color: var(--navy-ink); background: var(--gold); padding: 3px 6px; border-radius: 2px; }

.toc__pdf {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.toc__pdf .meta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

@media (max-width: 980px) {
  .toc { position: static; }
}

/* ---------- Chapter blocks ---------- */
.chapter {
  scroll-margin-top: 96px;
  padding-bottom: clamp(56px, 8vw, 104px);
}
.chapter + .chapter { padding-top: 16px; }
.chapter:not(:last-child) { border-bottom: 1px solid var(--line); margin-bottom: clamp(48px, 7vw, 80px); }

.chapter__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: end;
  border-bottom: 3px solid var(--navy-ink);
  padding-bottom: 22px;
  margin-bottom: 28px;
}
.chapter__num {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(64px, 9vw, 120px);
  line-height: .82;
  letter-spacing: -.05em;
  color: var(--gold);
  -webkit-text-stroke: 0;
}
.chapter__num span {
  font-family: var(--f-mono);
  display: block;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  -webkit-text-stroke: 0;
}
.chapter__title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.025em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--navy-ink);
  margin: 0;
}
.chapter__sub {
  font-family: var(--f-serif);
  font-style: normal;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--navy);
  margin-top: 10px;
  line-height: 1.4;
}

.chapter__body p { color: var(--ink); font-size: 17px; line-height: 1.65; max-width: 64ch; }
.chapter__body p + p { margin-top: 14px; }

.chapter__body h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .22em;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  margin: 36px 0 14px;
}

/* "Walk-through", numbered steps with rich body */
.steps {
  list-style: none; padding: 0; margin: 24px 0 0;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 22px 0 22px 76px;
  border-top: 1px solid var(--line);
}
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 22px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -.03em;
  color: var(--gold);
  background: var(--navy-ink);
  width: 56px;
  text-align: center;
  padding: 6px 0;
  border-radius: 2px;
  line-height: 1;
}
.steps > li b {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  color: var(--navy-ink);
  font-size: 17px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: -.005em;
}
.steps > li p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* Sample script callout, looks like a typed page */
.script {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 2px;
  padding: clamp(20px, 3vw, 32px);
  margin: 24px 0;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
  position: relative;
  box-shadow: var(--shadow-1);
}
.script::before {
  content: attr(data-label);
  position: absolute;
  top: -10px; left: 16px;
  background: var(--navy-ink);
  color: var(--gold);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 2px;
}
.script .blank {
  display: inline-block;
  background: rgba(242,168,29,.18);
  border-bottom: 2px solid var(--gold);
  padding: 0 4px;
  color: var(--navy-ink);
  font-weight: 600;
}
.script .stage {
  display: block;
  font-family: var(--f-mono);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 16px 0 6px;
  font-weight: 700;
}
.script p { margin: 0 0 12px; max-width: none; }
.script p:last-child { margin-bottom: 0; }

/* Copy button (templates) */
.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--navy-ink);
  color: var(--gold);
  border: none;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, color .15s, transform .15s;
  z-index: 2;
}
.copy-btn::before {
  content: "⧉";
  font-size: 13px;
  line-height: 1;
}
.copy-btn:hover { background: var(--gold); color: var(--navy-ink); transform: translateY(-1px); }
.copy-btn.is-copied { background: #2f7d3a; color: #fff; }
.copy-btn.is-copied::before { content: "✓"; }

.script { position: relative; }
.email { position: relative; }
.email .copy-btn { top: 8px; right: 10px; background: rgba(255,255,255,.12); color: var(--gold); }
.email .copy-btn:hover { background: var(--gold); color: var(--navy-ink); }
.email .copy-btn.is-copied { background: #2f7d3a; color: #fff; }

/* Email template, looks like an email window */
.email {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 24px 0;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.email__head {
  background: var(--navy-ink);
  color: rgba(255,255,255,.85);
  padding: 12px 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}
.email__head .dots { display: inline-flex; gap: 5px; }
.email__head .dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.25);
}
.email__head .dots span:first-child { background: var(--alarm); }
.email__head .dots span:nth-child(2) { background: var(--gold); }
.email__head .dots span:nth-child(3) { background: #4ade80; }
.email__head .label { margin-left: 8px; color: var(--gold); }

.email__meta {
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px 12px;
}
.email__meta dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  padding-top: 2px;
}
.email__meta dd { margin: 0; color: var(--navy-ink); font-weight: 500; }

.email__body {
  padding: 22px 24px 26px;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
.email__body p { margin: 0 0 12px; max-width: none; }
.email__body p:last-child { margin-bottom: 0; }
.email__body .sig {
  margin-top: 18px;
  font-family: var(--f-serif);
  font-style: normal;
  color: var(--navy);
}
.email__body .blank {
  display: inline-block;
  background: rgba(242,168,29,.18);
  border-bottom: 1.5px solid var(--gold);
  padding: 0 4px;
  font-weight: 600;
  color: var(--navy-ink);
}

/* The 10 questions list */
.qbig { list-style: none; padding: 0; margin: 24px 0 0; counter-reset: qq; }
.qbig li {
  counter-increment: qq;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.qbig li:last-child { border-bottom: 0; }
.qbig li::before {
  content: counter(qq, decimal-leading-zero);
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -.03em;
  color: var(--navy-ink);
  line-height: 1;
  grid-column: 1;
  grid-row: 1 / span 2;
}
.qbig li > * { grid-column: 2; min-width: 0; }
.qbig li b,
.qbig li small { grid-column: 2; min-width: 0; }
.qbig li b {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--navy-ink);
  line-height: 1.4;
  letter-spacing: -.005em;
}
.qbig li small {
  display: block;
  font-family: var(--f-serif);
  font-style: normal;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 6px;
}

/* Pull-quote inside a chapter (margin note style) */
.note {
  background: #FFF5DE;
  border: 1px solid #e9c870;
  border-left: 4px solid var(--gold);
  border-radius: 2px;
  padding: 18px 22px;
  margin: 24px 0;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
}
.note__icon {
  font-family: var(--f-display);
  font-weight: 900;
  color: var(--navy-ink);
  background: var(--gold);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.note__body {
  font-family: var(--f-serif);
  font-style: normal;
  color: var(--navy-ink);
  font-size: 16px;
  line-height: 1.5;
}
.note__body b {
  font-style: normal;
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--navy-ink);
  font-size: 12px;
  display: block;
  margin-bottom: 4px;
}

/* "Field card", a checklist with a heading */
.checklist {
  background: var(--navy-ink);
  color: #fff;
  border-radius: 3px;
  padding: clamp(22px, 3vw, 32px);
  margin: 24px 0;
  position: relative;
}
.checklist h5 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 14px;
}
.checklist ul { list-style: none; padding: 0; margin: 0; }
.checklist li {
  padding: 10px 0 10px 36px;
  position: relative;
  border-bottom: 1px dashed rgba(255,255,255,.15);
  font-size: 15px;
  color: rgba(255,255,255,.92);
  line-height: 1.5;
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 14px;
  width: 18px; height: 18px;
  border: 1.5px solid var(--gold);
  border-radius: 3px;
}
.checklist li::after {
  content: "✓";
  position: absolute;
  left: 3px; top: 8px;
  font-size: 16px;
  font-weight: 900;
  color: var(--gold);
  opacity: 0;
  transition: opacity .15s;
}
.checklist li:hover::after { opacity: 1; }

/* Two-column row for cause/effect */
.split2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 24px 0;
}
@media (max-width: 720px) { .split2 { grid-template-columns: 1fr; } }
.split2 .col {
  background: #FBF7EA;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 22px;
}
.split2 .col h5 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 8px;
}
.split2 .col.bad h5  { color: var(--alarm); }
.split2 .col.good h5 { color: var(--navy); }
.split2 .col p {
  margin: 0;
  font-size: 15px;
  color: var(--navy-ink);
  line-height: 1.55;
}

/* Resource row at end of chapter */
.resources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}
@media (max-width: 720px) { .resources { grid-template-columns: 1fr; } }
.res-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px 18px;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s, border-color .15s;
}
.res-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--navy-ink);
  text-decoration: none;
}
.res-card .tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.res-card b {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  color: var(--navy-ink);
  font-size: 15px;
  letter-spacing: -.005em;
  line-height: 1.3;
}
.res-card span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* Closing CTA */
.manual-end {
  background: var(--navy-ink);
  color: #fff;
  padding: clamp(48px, 7vw, 96px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.manual-end::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(242,168,29,.20), transparent 60%);
  pointer-events: none;
}
.manual-end h2 { color: #fff; max-width: 18ch; margin: 0 auto; }
.manual-end .so { color: var(--gold); font-family: var(--f-serif); font-style: normal; font-weight: 500; text-transform: none; }
.manual-end p {
  color: rgba(255,255,255,.78);
  max-width: 56ch;
  margin: 18px auto 28px;
  font-size: 17px;
}
.manual-end .row {
  display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.manual-end .btn--ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.5);
}
.manual-end .btn--ghost:hover { background: #fff; color: var(--navy-ink); border-color: #fff; }
