:root {
  --gold: #c9a14b;
  --gold-soft: #dcc18d;
  --ink: #1b1c21;
  --ink-soft: #3a3d45;
  --muted: #6b6f78;
  --paper: #f8f5ee;
  --paper-alt: #f2ede2;
  --line: #d7d0c3;
  --dark: #14161b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", Arial, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: #e5e1d9;
  line-height: 1.6;
}

.guide-actions {
  width: min(100%, 1080px);
  margin: 16px auto 0;
  padding: 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.back-link,
.download-button,
.print-button {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
}

.back-link {
  border: 1px solid rgba(140, 106, 44, 0.45);
  color: #604820;
  background: rgba(255, 255, 255, 0.6);
}

.download-button {
  border: 1px solid rgba(140, 106, 44, 0.65);
  background: #d8b977;
  color: #231a08;
  font-weight: 600;
}

.print-button {
  border: 1px solid rgba(140, 106, 44, 0.55);
  background: #8c6a2c;
  color: #fff;
  cursor: pointer;
}

.guide {
  width: min(100%, 1080px);
  margin: 32px auto 64px;
  padding: 0 12px;
}

.page {
  background: var(--paper);
  margin: 0 auto 24px;
  width: 210mm;
  min-height: 297mm;
  padding: 22mm 22mm 18mm;
  page-break-after: always;
  break-after: page;
  box-shadow: 0 24px 54px rgba(20, 21, 26, 0.15);
  position: relative;
  overflow: hidden;
}

.page:last-child {
  page-break-after: auto;
  break-after: auto;
}

.folio {
  position: absolute;
  top: 12mm;
  right: 22mm;
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label {
  margin: 0 0 14px;
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #856423;
  border-bottom: 1px solid var(--line);
  display: inline-block;
  padding-bottom: 7px;
  padding-right: 26px;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
}

h1 {
  font-size: 4.8rem;
  color: #efe6d4;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 2.25rem;
  color: var(--ink);
  max-width: 92%;
}

h3 {
  font-size: 1.28rem;
  color: #6a4f1c;
}

p {
  margin: 0 0 12px;
}

.lead {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 92%;
  margin-bottom: 18px;
}

ul,
ol {
  margin: 0;
  padding-left: 18px;
}

li + li {
  margin-top: 7px;
}

.cover {
  background: linear-gradient(165deg, #161920 0%, #101216 100%);
  color: #efe6d4;
  padding: 0;
}

.frame {
  min-height: 297mm;
  margin: 8mm;
  border: 1px solid rgba(201, 161, 75, 0.33);
  padding: 20mm 18mm 14mm;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 10px;
  position: relative;
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 18mm;
  height: 18mm;
  border: 1px solid var(--gold);
}

.frame::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.frame::after {
  right: -1px;
  bottom: -1px;
  border-left: 0;
  border-top: 0;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: var(--gold-soft);
}

.cover-logo {
  width: 118px;
  height: auto;
  display: block;
  margin-bottom: 2px;
}

.tagline {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #d9ccb1;
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.cover-meta span {
  border: 1px solid rgba(201, 161, 75, 0.35);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #ceb98e;
}

.hero-image {
  margin: 0;
  border: 1px solid rgba(216, 185, 119, 0.48);
  border-radius: 12px;
  min-height: 130mm;
  overflow: hidden;
  background: #0f1014;
}

.hero-image img {
  width: 100%;
  height: 100%;
  min-height: 130mm;
  object-fit: cover;
  display: block;
}

.card-grid {
  display: grid;
  gap: 12px;
  margin: 10px 0 18px;
}

.card-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  border: 1px solid var(--line);
  background: var(--paper-alt);
  padding: 14px;
}

.toc {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.toc ol {
  columns: 2;
  column-gap: 28px;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.visual {
  margin: 0;
  border: 1px solid var(--line);
  background: #fff;
  min-height: 120mm;
  overflow: hidden;
}

.visual.wide {
  margin-top: 14px;
  min-height: 88mm;
}

.visual img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  display: block;
}

.placeholder {
  border-style: dashed;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fbf8f2 0%, #f3eee4 100%);
}

.placeholder figcaption {
  color: #8f8266;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.62rem;
  text-align: center;
  padding: 0 10px;
}

.bullet-list {
  padding-left: 18px;
}

.note {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  background: #efe7d8;
  font-size: 0.9rem;
  color: #5e4d2a;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.icon-grid article {
  border: 1px solid var(--line);
  background: var(--paper-alt);
  padding: 12px;
}

.icon-grid p {
  color: var(--muted);
  margin: 0;
}

.question-title {
  margin-top: 14px;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  border-bottom: 1px dotted var(--line);
  padding: 7px 0 8px 22px;
  position: relative;
}

.checklist li::before {
  content: "O";
  position: absolute;
  left: 0;
  top: 7px;
  color: #8a6c31;
  font-size: 0.8rem;
}

.journey {
  list-style: none;
  padding-left: 0;
  border-top: 1px solid var(--line);
}

.journey li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.journey span {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  color: var(--gold);
  line-height: 1;
}

.journey h3 {
  margin-bottom: 2px;
}

.journey p {
  margin: 0;
  color: var(--muted);
}

.check-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.notes-box {
  min-height: 64mm;
  border: 1px dashed #baa77d;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.8) 0,
    rgba(255, 255, 255, 0.8) 9mm,
    rgba(216, 185, 119, 0.14) 9mm,
    rgba(216, 185, 119, 0.14) 9.4mm
  );
}

.closing {
  background: linear-gradient(180deg, #f7f3ea 0%, #efe8da 100%);
}

.closing-footer {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.closing-footer p {
  margin: 0 0 5px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #796b4b;
}

body.pdf-export {
  background: #fff;
}

body.pdf-export .guide-actions {
  display: none !important;
}

body.pdf-export .guide {
  margin: 0;
  width: auto;
  max-width: none;
  padding: 0;
}

body.pdf-export .page {
  box-shadow: none;
  margin: 0;
}

@media screen and (max-width: 960px) {
  .guide-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .guide {
    margin-top: 16px;
    padding: 0 8px;
  }

  .page {
    width: auto;
    min-height: auto;
    padding: 24px 16px 20px;
    margin-bottom: 16px;
  }

  .folio {
    position: static;
    margin-bottom: 10px;
    text-align: right;
  }

  .frame {
    margin: 0;
    min-height: auto;
    padding: 18px 14px 14px;
  }

  h1 {
    font-size: 2.7rem;
  }

  h2 {
    font-size: 1.85rem;
    max-width: 100%;
  }

  .lead {
    max-width: 100%;
  }

  .card-grid.three,
  .card-grid.two,
  .split,
  .icon-grid,
  .check-columns {
    grid-template-columns: 1fr;
  }

  .toc ol {
    columns: 1;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    background: #fff;
  }

  .guide-actions {
    display: none !important;
  }

  .guide {
    margin: 0;
    width: auto;
    max-width: none;
    padding: 0;
  }

  .page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    border: 0;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
}
