/* ============================================================
   MORPHEUS USER MANUAL — manual-specific components

   Layered ON TOP of spec-sheet.css. manual.html links BOTH:
     <link rel="stylesheet" href="assets/spec-sheet.css">
     <link rel="stylesheet" href="assets/manual.css">
   ============================================================ */

/* ---------- Cover Page (Page 1) ---------- */

.cover-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.title-block {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.brand-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  align-self: flex-start;
}

.cover-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  flex: 1;
}

.cover-col-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cover-col-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cover-hero-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px dashed var(--dauer-charcoal-200);
}

/* Page 1 Cover column info cards & details */
.cover-info__card {
  background: #2b2b2b;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
}

.cover-info__title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: #f7941d;
  text-transform: uppercase;
  margin: 10px 0 4px;
}

.cover-info__list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cover-info__row {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #e2dfd8;
  padding-bottom: 4px;
}

.cover-info__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: #2b2b2b;
  letter-spacing: .05em;
  text-transform: uppercase;
  width: 0.86in;
  flex: none;
}

.cover-info__value {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #3a3a3a;
  line-height: 1.25;
}

.cover-info__drawing {
  width: 100%;
  max-height: 2.2in !important;
  object-fit: contain;
  margin-top: 15px !important;
  flex: 1;
}

.cover-info__footer {
  display: flex;
  gap: 0.15in;
  margin-top: auto;
  align-items: flex-end;
  justify-content: flex-end;
}

/* Grow only the cover's demo QR inside the existing footer spacing. Keep its
   layout box and bottom edge fixed so the drawings, marks and footer stay put. */
.cover-info__footer .qr-clickable,
.cover-info__footer .qr-clickable:hover {
  transform: scale(1.5151515152); /* 0.55in to approximately 80px / 0.83in */
  transform-origin: center bottom;
}

@media screen and (max-width: 480px) {
  .cover-info__footer .qr-clickable,
  .cover-info__footer .qr-clickable:hover {
    transform: scale(1.15); /* Fit the mobile footer's smaller 8px vertical gap. */
  }
}

@media (min-width: 600px) {
  .title-block {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.3in;
  }

  .brand-logo {
    height: 0.9in;
    padding-left: 60px;
    padding-bottom: 10px;
    align-self: center;
  }

  .cover-grid {
    flex-direction: row;
    gap: 0.34in;
    margin-top: 0.34in;
    min-height: 0;
  }

  .cover-col-media {
    flex: 1.25;
    min-width: 0;
    gap: 0.15in;
  }

  .cover-col-info {
    flex: 1;
  }

  .cover-hero-img {
    flex: 1;
    display: block;
    width: 340px;
  }
}

/* ---------- Table of Contents (Page 2) ---------- */

.toc-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.toc-list {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}

.toc-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  text-decoration: none;
  color: inherit;
}

.toc-row+.toc-row {
  border-top: 1px solid var(--dauer-paper-100);
}

.toc-row__label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.toc-row__label--sub {
  font-weight: 500;
  color: var(--dauer-charcoal-700);
  padding-left: 12px;
}

.toc-row__leader {
  flex: 1;
  border-bottom: 1px dotted var(--dauer-charcoal-200);
  transform: translateY(-3px);
}

.toc-row__num {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-accent);
  flex: none;
  min-width: 1.4em;
  text-align: right;
}

.toc-row:hover .toc-row__label {
  color: var(--color-text-accent);
}

.toc-appblock {
  margin-top: 21px;
  padding-top: 17px;
  border-top: var(--border-hairline);
  text-align: center;
}

.toc-appblock__codes {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.toc-appblock__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.toc-appblock__col img.qr {
  width: 1.01in;
  height: 1.01in;
  background: #fff;
  border: 1px solid #e2dfd8;
  border-radius: 6px;
  display: block;
}

.toc-appblock__col img.badge {
  width: 0.9in;
  height: 0.27in;
  display: block;
  object-fit: contain;
}

.toc-appblock__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  color: #2b2b2b;
  letter-spacing: .01em;
  margin-top: 16px;
}

/* ---------- Specifications & Ordering (Page 3) ---------- */

.specs-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}

.specs-section-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: #f7941d;
  text-transform: uppercase;
  margin-bottom: 4px;
  margin-top: 6px;
}

.specs-ref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}

.specs-ref-cell {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: #3a3a3a;
  padding: 2px 0;
  border-bottom: 1px solid #e2dfd8;
}

.specs-ref-cell.empty-cell {
  border-bottom: none;
}

.specs-ref-header {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: #2b2b2b;
  text-transform: uppercase;
  padding: 3px 0 2px;
  border-bottom: 1px solid #2b2b2b;
  background: #f1efea;
  grid-column: 1 / -1;
}

.ref-table-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

@media (min-width: 600px) {
  .ref-table-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 22px;
  }
}

.mount-photos-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin-top: 8px;
  align-items: center;
}

.mount-photo-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: #3a3a3a;
  padding: 2px 0;
  border-bottom: 1px solid #e2dfd8;
  width: auto;
  text-align: right;
}

.mount-photo-img {
  width: 70px !important;
  height: 50px !important;
  border-radius: 3px;
  display: block;
  background-color: #ffffff;
  object-fit: contain !important;
}

@media (min-width: 600px) {
  .mount-photos-grid {
    grid-template-columns: 1fr auto 1fr auto !important;
    gap: 4px 8px !important;
    margin-top: 4px !important;
  }

  .mount-photo-label {
    width: 200px;
  }
}


/* ---------- Safety Information (Page 4) ---------- */

.safety-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.safety-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.safety-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.safety-item__num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2b2b2b;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.safety-item__text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.45;
  color: #3a3a3a;
  padding-top: 3px;
  text-wrap: pretty;
}

/* ---------- How-To Grid (Pages 5–11) ---------- */

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

@media (min-width: 640px) {
  .figure-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 760px) {
  .figure-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.figure-cell {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2dfd8;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
  break-inside: avoid;
  min-height: 0;
}

.figure-cell__img {
  width: 100%;
  height: 120px;
  background: #f1efea;
  display: block;
  flex: none;
  object-fit: contain;
}

.figure-cell__body {
  padding: 5px 7px 6px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.figure-cell__fig {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: #f7941d;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.figure-cell__caption {
  font-family: var(--font-body);
  font-size: var(--text-fs, 0.78rem);
  line-height: 1.28;
  color: #3a3a3a;
  text-wrap: pretty;
  overflow: hidden;
}

.chapter-lead-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 5px;
  background: #f1efea;
  padding: 9px 7px;
  break-inside: avoid;
  text-align: center;
  min-height: 0;
  overflow: hidden;
}

.chapter-lead-card__eyebrow {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: #f7941d;
  text-transform: uppercase;
}

.chapter-lead-card__title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #2b2b2b;
  line-height: 1.12;
  letter-spacing: .01em;
}

.chapter-lead-card__qr {
  width: 0.84in;
  height: 0.84in;
  background: #fff;
  border-radius: 3px;
  display: block;
  flex: none;
  margin-top: 1px;
}

.chapter-lead-card__caption {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: #6a6a6a;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Additional Topics (Page 11) ---------- */

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topic-row {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid #e2dfd8;
  break-inside: avoid;
}

.topic-row__num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #f7941d;
  line-height: 1;
  width: 0.36in;
  flex: none;
}

.topic-row__body {
  flex: 1;
  min-width: 0;
}

.topic-row__eyebrow {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: #8a8a8a;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.topic-row__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #2b2b2b;
  line-height: 1.2;
  letter-spacing: .01em;
}

.topic-row__text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.45;
  color: #3a3a3a;
  margin-top: 6px;
  text-wrap: pretty;
}

.topic-row__shot {
  flex: none;
  width: 1.8in;
  height: 1.35in;
  background: #f1efea;
  border-radius: 4px;
  overflow: hidden;
  display: block;
}

.topic-row-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 520px) {
  .topic-row {
    flex-wrap: wrap;
  }

  .topic-row__shot {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    order: 3;
  }
}

/* ============================================================
   SCREEN LAYOUT (Wide screen min-width: 900px)
   Recreates the exact print preview presentation: stacked sheets
   on a grey background, hiding accordion headers.
   ============================================================ */

@media (min-width: 900px) {
  body {
    background: #d8d6cf;
  }

  .sheet-stack {
    background: #d8d6cf !important;
    padding: 0.55in 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.4in !important;
    max-width: none !important;
  }

  .sheet-section {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    width: 100% !important;
  }

  .sheet-section__summary {
    display: none !important;
  }

  .sheet-section__body {
    padding: 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .sheet {
    width: 90% !important;
    max-width: 1150px !important;
    height: auto !important;
    padding: 0.5in !important;
    background: #fff !important;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .13) !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Force 4x4 figure grid on desktop screen view */
  .figure-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(4, 1fr) !important;
    gap: 0.15in !important;
    padding-top: 0.14in !important;
    flex: 1;
    min-height: 0;
  }

  .figure-cell__img {
    height: 1.65in !important;
  }
}

@media (max-width: 480px) {
  .toc-row {
    gap: 6px;
  }

  .toc-row__label {
    font-size: 0.85rem;
  }

  .cover-info__footer {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
  }

  .cover-info__footer div {
    width: 100% !important;
    text-align: center;
    margin-left: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* ============================================================
   PRINT — letter page frames, page breaks, and column forces.
   Inherits letter dimensions from spec-sheet.css.
   ============================================================ */

@media print {
  .floating-toc-btn {
    display: none !important;
  }

  /* No auto-growing sheets for print! Keep the fixed geometry. */
  .sheet {
    break-inside: avoid;
  }

  .sheet-section {
    break-before: page;
  }

  .sheet-section:first-child {
    break-before: auto;
  }

  /* Figures layout in print */
  .figure-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(4, 1fr) !important;
    gap: 0.12in !important;
    padding-top: 0.10in !important;
    flex: 1;
    min-height: 0;
  }

  .figure-cell__img {
    height: 1.45in !important;
  }

  .figure-cell__body {
    padding: 4px 6px !important;
  }

  .figure-cell__caption {
    font-size: 6.5pt !important;
    line-height: 1.25 !important;
  }

  .figure-cell__fig {
    font-size: 6pt !important;
  }

  .safety-item__text {
    font-size: 10pt !important;
  }

  .toc-row__label {
    font-size: 9.5pt !important;
  }

  .topic-row__text {
    font-size: 9pt !important;
  }

  .mount-photos-grid {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr auto !important;
    gap: 4px 8px !important;
    margin-top: 4px !important;
  }

  .mount-photo-img {
    width: 70px !important;
    height: 50px !important;
  }

  .cover-grid {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.34in !important;
    margin-top: 0.34in !important;
    flex: 1 !important;
    min-height: 0 !important;
  }

  .cover-col-media {
    flex: 1.25 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.15in !important;
  }

  .cover-col-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .cover-hero-img {
    flex: 1 !important;
    display: block !important;
    width: 340px !important;
  }

  .title-block {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .brand-logo {
    height: 0.9in !important;
    padding-left: 60px !important;
    padding-bottom: 10px !important;
    display: block !important;
  }

  /* Page 1 (Cover) tight print overrides */
  .cover-grid {
    margin-top: 0.15in !important;
  }

  .cover-info__card {
    padding: 8px 12px !important;
  }

  .cover-info__title {
    margin: 8px 0 4px !important;
  }

  .cover-info__row {
    padding-bottom: 1px !important;
  }

  .cover-info__value {
    font-size: 7.5pt !important;
  }

  .cover-info__drawing {
    height: 2.5in !important;
    max-height: 2.5in !important;
    margin-top: 8px !important;
  }

  .cover-info__footer {
    margin-top: auto !important;
  }

  /* Page 3 (Specs & Ordering) tight print overrides */
  .data-table th,
  .data-table td {
    padding: 3.5px 5px !important;
    font-size: 7.2pt !important;
  }

  .data-table td[colspan="5"] {
    padding: 4px 5px 2px !important;
    font-size: 7.2pt !important;
  }

  .specs-ref-cell {
    font-size: 7.2pt !important;
    padding: 1.5px 0 !important;
  }

  .specs-ref-header {
    font-size: 6.8pt !important;
    padding: 2px 0 1px !important;
  }

  .specs-section-title {
    font-size: 7.5pt !important;
    margin-top: 4px !important;
    margin-bottom: 2px !important;
  }

  .mount-photo-label {
    font-size: 7.2pt !important;
    padding: 1.5px 0 !important;
  }

  .cover-info__title {
    font-size: 7.5pt !important;
  }

  .toc-appblock__title {
    font-size: 12.75pt !important;
  }

  .safety-item__num {
    font-size: 11pt !important;
  }

  .chapter-lead-card__eyebrow {
    font-size: 6pt !important;
  }

  .chapter-lead-card__title {
    font-size: 9pt !important;
  }

  .chapter-lead-card__caption {
    font-size: 5.2pt !important;
  }

  .topic-row__num {
    font-size: 18pt !important;
  }

  .topic-row__eyebrow {
    font-size: 6.5pt !important;
  }

  .topic-row__title {
    font-size: 11pt !important;
  }

  /* Section headers print overrides to preserve exact original sizes */
  #beam-angle h2,
  #ordering-info h2 {
    font-size: 18pt !important;
    margin: 0 !important;
  }

  #beam-angle p {
    font-size: 8pt !important;
    margin-top: 3px !important;
    color: #8a8a8a !important;
  }

  .safety-body .section-intro h2,
  .topic-list .section-intro h2 {
    font-size: 20pt !important;
    margin-bottom: 0.06in !important;
    margin-top: 0 !important;
  }

  .safety-body .section-intro p {
    font-size: 8.5pt !important;
    margin-bottom: 0.22in !important;
    color: #8a8a8a !important;
  }

  .topic-list .section-intro p {
    font-size: 8.5pt !important;
    margin-bottom: 0.14in !important;
    color: #6f6f6f !important;
    line-height: 1.35 !important;
  }
}

/* Floating TOC button for mobile viewport */
.floating-toc-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  background: #2b2b2b;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.25s ease, transform 0.2s ease;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-toc-btn svg {
  width: 22px;
  height: 22px;
}

.floating-toc-btn:hover,
.floating-toc-btn:focus {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* Only display on narrow screen / mobile breakpoint */
@media (max-width: 759px) {
  .floating-toc-btn {
    display: flex;
  }
}