/*
 * Per-client manual export stylesheet — v4.0.0
 * Generated by src/lib/admin/export/shared-stylesheet.ts
 * Self-contained: no @import, no url(), no CSS custom properties.
 */

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
  line-height: 1.5;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #5500ff;
  text-decoration: underline;
}

a:hover {
  color: #3d0099;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em 0;
  font-weight: 600;
  line-height: 1.25;
}

p {
  margin: 0 0 1em 0;
}

ul, ol {
  margin: 0 0 1em 0;
  padding-left: 1.5em;
}

/* ---------- Layout ---------- */

/* Matches ManualViewer main: max-w-4xl mx-auto, space-y-6 */
.manual-page {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 1rem 6rem 1rem;
}

@media (min-width: 640px) { .manual-page { padding: 2rem 1.5rem 6rem 1.5rem; } }
@media (min-width: 1024px) { .manual-page { padding: 2rem 3rem 6rem 3rem; } }

.manual-page > * + * {
  margin-top: 1.5rem;
}

.manual-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.manual-header-logo {
  max-height: 3rem;
  width: auto;
}

.manual-header-client {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
}

/* ---------- Cover ---------- */

/* Cover section — matches Cover.tsx: card with flex row (image left, text right) */

.manual-cover {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .manual-cover { padding: 2rem; }
}

.manual-cover-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .manual-cover-layout {
    flex-direction: row;
    gap: 2.5rem;
  }
}

.manual-cover-image-col {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .manual-cover-image-col { width: 40%; }
}

.manual-cover-image {
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f3f4f6;
  object-fit: contain;
}

.manual-cover-text-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

/* "Instructions by" badge */
.manual-cover-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.manual-cover-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.manual-cover-badge-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
}

.manual-cover-badge-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  text-transform: capitalize;
}

.manual-cover-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

@media (min-width: 768px) {
  .manual-cover-title { font-size: 1.875rem; }
}

.manual-cover-description {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.625;
  margin: 0;
}

/* ---------- Product Information (matches ProductInfoStatic.astro) ---------- */

.manual-prodinfo {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 2rem;
}

.manual-prodinfo-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  padding: 1.25rem 1.25rem 0.75rem;
  margin: 0;
}

.manual-prodinfo-body {
  padding: 0 1.25rem 1.25rem;
}

@media (min-width: 768px) {
  .manual-prodinfo-body--has-image {
    display: flex;
    gap: 1.5rem;
  }
}

.manual-prodinfo-image-col {
  flex-shrink: 0;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .manual-prodinfo-image-col {
    width: 33.333%;
    margin-bottom: 0;
  }
}

.manual-prodinfo-image {
  width: 100%;
  border-radius: 0.5rem;
  background: #f3f4f6;
  object-fit: contain;
}

.manual-prodinfo-text-col {
  flex: 1;
  min-width: 0;
}

.manual-prodinfo-text-col > * + * {
  margin-top: 0.75rem;
}

.manual-prodinfo-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.manual-prodinfo-description {
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.6;
}

.manual-prodinfo-description p { margin: 0 0 0.25rem 0; }
.manual-prodinfo-description p:last-child { margin-bottom: 0; }
.manual-prodinfo-description a { color: var(--accent, #5500ff); text-decoration: underline; }
.manual-prodinfo-description strong { color: #111827; font-weight: 600; }

.manual-prodinfo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--accent, #5500ff);
  text-decoration: none;
}

.manual-prodinfo-link:hover { text-decoration: underline; }

/* Characteristics <dl> grid */
.manual-prodinfo-chars {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  font-size: 0.9375rem;
  margin: 0;
}

.manual-prodinfo-dt {
  font-weight: 500;
  color: #111827;
}

.manual-prodinfo-dd {
  color: #6b7280;
  margin: 0;
}

/* Specifications / Variations table */
.manual-prodinfo-specs {
  padding: 0 1.25rem 1.25rem;
}

.manual-prodinfo-specs > * + * {
  margin-top: 1.5rem;
}

.manual-prodinfo-spec-header {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.75rem 0;
}

.manual-prodinfo-table {
  width: 100%;
  font-size: 0.9375rem;
  border-collapse: collapse;
}

.manual-prodinfo-row-alt {
  background: rgba(243, 244, 246, 0.3);
}

.manual-prodinfo-td-label {
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
}

.manual-prodinfo-td-value {
  padding: 0.5rem 0.75rem;
  color: #6b7280;
}

/* Other info section */
.manual-prodinfo-other {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.6;
}

.manual-prodinfo-other p { margin: 0 0 0.25rem 0; }
.manual-prodinfo-other p:last-child { margin-bottom: 0; }
.manual-prodinfo-other strong { color: #111827; font-weight: 600; }
.manual-prodinfo-other a { color: var(--accent, #5500ff); text-decoration: underline; }

/* Legacy reference block (title/SKU/URL) — kept for backwards compat */
.manual-reference {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.manual-reference-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.manual-reference-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.manual-reference-list li {
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.manual-reference-label {
  font-weight: 600;
  color: #374151;
  margin-right: 0.5rem;
}

.manual-reference-link {
  color: #5500ff;
  text-decoration: underline;
}

.manual-reference-link:hover {
  color: #5500ff;
}

/* Visually-hidden text for screen readers (used by the "View on website"
   link to announce that the link opens in a new tab). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Breadcrumb (matches ManualViewer.tsx) ---------- */

.manual-breadcrumb {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.manual-breadcrumb-link {
  text-decoration: underline;
  color: #6b7280;
  text-transform: capitalize;
}

.manual-breadcrumb-link:hover { color: #111827; }

.manual-breadcrumb-sep { margin: 0 0.5rem; }

/* ---------- Chapters & steps (matches InstructionStep.tsx) ---------- */

.manual-chapter {
  margin-bottom: 1.5rem;
}

.manual-chapter > .manual-step-card + .manual-step-card {
  margin-top: 1rem;
}

/* Step card: article with border, rounded corners, shadow */
.manual-step-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  scroll-margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Sticky header inside each step card */
.manual-step-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1.25rem;
}

.manual-step-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.manual-step-num {
  color: var(--accent, #6b7280);
}

/* Step content area */
.manual-step-content {
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .manual-step-content--split {
    display: flex;
    gap: 1.5rem;
  }
}

.manual-step-media {
  flex-shrink: 0;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .manual-step-media {
    width: 50%;
    margin-bottom: 0;
  }
}

.manual-step-media--full {
  width: 100%;
}

.manual-step-text {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.6;
}

.manual-step-text p { margin: 0 0 0.5rem 0; }
.manual-step-text p:last-child { margin-bottom: 0; }
.manual-step-text strong { font-weight: 600; }
.manual-step-text a { color: var(--accent, #5500ff); text-decoration: underline; }
.manual-step-text ul, .manual-step-text ol { margin: 0.5rem 0 0.5rem 1.25rem; padding: 0; }
.manual-step-text li { margin: 0.125rem 0; }

.manual-step-image {
  max-width: 100%;
  width: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
}

.manual-step-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.manual-step-video {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.manual-step-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Info boxes (matches InfoBox.tsx) ---------- */

.manual-infobox {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.manual-infobox-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.manual-infobox-body {
  flex: 1;
  min-width: 0;
}

.manual-infobox-body > * + * {
  margin-top: 0.5rem;
}

.manual-infobox-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.manual-infobox-text {
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.6;
}

.manual-infobox-text p { margin: 0 0 0.25rem 0; }
.manual-infobox-text p:last-child { margin-bottom: 0; }
.manual-infobox-text strong { font-weight: 600; }

.manual-infobox-icon {
  flex-shrink: 0;
  color: #6b7280;
}

.manual-info-box-image {
  max-width: 100%;
  border-radius: 0.375rem;
}

/* Info box image-text split layout */
.manual-infobox-content--split {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .manual-infobox-content--split {
    flex-direction: row;
    gap: 1.5rem;
  }
}

.manual-infobox-media {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .manual-infobox-media { width: 35%; }
}

.manual-infobox-media img {
  width: 100%;
  border-radius: 0.5rem;
  object-fit: contain;
}

/* ---------- Parts / Materials (matches PartsInventory.tsx) ---------- */

.manual-parts {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.manual-parts-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  padding: 1.25rem 1.25rem 0.75rem;
  margin: 0;
}

.manual-parts-diagram {
  padding: 0 1.25rem 1rem;
}

.manual-parts-diagram img {
  width: 100%;
  border-radius: 0.5rem;
  background: #f3f4f6;
  object-fit: contain;
}

/* Numbered list with divide-y borders (when reference image exists) */
.manual-parts-list {
  border-top: 1px solid #e5e7eb;
}

.manual-parts-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.manual-parts-row:last-child {
  border-bottom: none;
}

.manual-parts-num {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent, #6b7280);
}

.manual-parts-thumb {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.manual-parts-name {
  flex: 1;
  font-size: 0.9375rem;
  color: #111827;
}

.manual-parts-qty {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

/* ---------- Variations (tile grid, no reference image) ---------- */

.manual-variations {
  margin: 2rem 0;
}

.manual-variations-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.manual-variations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  padding: 0 1.25rem 1.25rem;
}

.manual-variation {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #ffffff;
}

.manual-variation-image {
  max-width: 6rem;
  max-height: 6rem;
  object-fit: contain;
  background: #f9fafb;
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
}

.manual-variation-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.manual-variation-detail {
  font-size: 0.875rem;
  color: #6b7280;
}

/* ---------- Characteristics ---------- */

/* Legacy characteristics (kept for any remaining references) */
.manual-characteristics { margin: 2rem 0; padding: 1.25rem; background: #f9fafb; border-radius: 0.5rem; }
.manual-characteristics-title { font-size: 1.125rem; margin-bottom: 0.75rem; }
.manual-characteristics-list { list-style: none; padding: 0; margin: 0; }
.manual-characteristics-list li { padding: 0.5rem 0; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #f3f4f6; }
.manual-characteristics-label { font-weight: 600; color: #374151; }
.manual-characteristics-value { color: #6b7280; text-align: right; }

/* ---------- Video ---------- */

.manual-video {
  margin: 2rem 0;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 0.5rem;
  overflow: hidden;
}

.manual-video iframe,
.manual-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Image fallback ---------- */

.manual-image-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8rem;
  background: #f3f4f6;
  border: 1px dashed #d1d5db;
  border-radius: 0.5rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .manual-page {
    padding: 1rem 1rem 3rem 1rem;
  }
  .manual-cover-title {
    font-size: 1.75rem;
  }
  .manual-step {
    gap: 1rem;
  }
  .manual-step-number {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 320px) {
  .manual-page {
    padding: 0.75rem;
  }
  .manual-cover-title {
    font-size: 1.5rem;
  }
}

/* ---------- Landing page (story 141 — matches ClientLanding.tsx) ---------- */

.landing-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

@media (min-width: 640px) { .landing-main { padding: 2.5rem 1.5rem; } }
@media (min-width: 1024px) { .landing-main { padding: 2.5rem 3rem; } }

/* ── Header ── */

.landing-header {
  margin-bottom: 2.5rem;
}

.landing-logo {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

@media (min-width: 768px) { .landing-logo { height: 3rem; } }

.landing-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.25rem 0;
  text-transform: capitalize;
}

.landing-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

/* ── Toolbar: search + toggle + lang ── */

.landing-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.landing-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 28rem;
}

.landing-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  display: flex;
}

.landing-search-input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem 0 2.5rem;
  font-size: 0.9375rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #111827;
  outline: none;
}

.landing-search-input::placeholder {
  color: #9ca3af;
}

.landing-search-input:focus {
  border-color: var(--accent, #5500ff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #5500ff) 25%, transparent);
}

.landing-search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
}

.landing-search-clear:hover { color: #111827; }

/* ── View toggle ── */

.landing-view-toggle {
  display: flex;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.landing-view-btn {
  padding: 0.5rem;
  background: #ffffff;
  border: none;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-view-btn:hover { color: #111827; }

.landing-view-btn--active {
  background: var(--accent, #5500ff);
  color: #ffffff;
}

.landing-view-btn--active:hover { color: #ffffff; }

.landing-spacer { flex: 1; }

/* ── Language dropdown ── */

.landing-lang-select {
  height: 2.5rem;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  appearance: auto;
  outline: none;
}

.landing-lang-select:focus {
  border-color: var(--accent, #5500ff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #5500ff) 25%, transparent);
}

/* ── Category pills ── */

.landing-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.landing-cat-pill {
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  background: #f3f4f6;
  color: #111827;
  cursor: pointer;
  transition: background 0.15s;
}

.landing-cat-pill:hover { background: #e5e7eb; }

.landing-cat-pill--active {
  background: var(--accent, #5500ff);
  color: #ffffff;
}

.landing-cat-pill--active:hover { opacity: 0.9; }

/* ── Results count ── */

.landing-results {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

/* ── Card grid ── */

.landing-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

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

.landing-card--grid {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.landing-card--grid:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.landing-card--grid:focus-visible {
  outline: 2px solid var(--accent, #5500ff);
  outline-offset: 2px;
}

.landing-card-cover {
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
  overflow: hidden;
}

.landing-card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.landing-card--grid:hover .landing-card-cover-img {
  transform: scale(1.03);
}

.landing-card-cover--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 0.75rem;
  background: rgba(243, 244, 246, 0.5);
}

.landing-card-cover-logo {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  opacity: 0.2;
}

.landing-card-cover-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(107, 114, 128, 0.4);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.landing-card-body {
  padding: 1rem;
}

.landing-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

.landing-card--grid:hover .landing-card-title,
.landing-card--list:hover .landing-card-title {
  color: var(--accent, #5500ff);
}

.landing-card-desc {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── List view ── */

.landing-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.landing-card--list {
  display: flex;
  gap: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  padding: 1rem;
  transition: box-shadow 0.2s;
}

.landing-card--list:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.landing-card--list:focus-visible {
  outline: 2px solid var(--accent, #5500ff);
  outline-offset: 2px;
}

.landing-list-thumb {
  width: 5rem;
  height: 5rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f3f4f6;
}

@media (min-width: 640px) {
  .landing-list-thumb { width: 6rem; height: 6rem; }
}

.landing-list-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-list-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(243, 244, 246, 0.5);
}

.landing-list-thumb-logo {
  height: 2rem;
  width: auto;
  object-fit: contain;
  opacity: 0.2;
}

.landing-card--list .landing-card-body {
  flex: 1;
  min-width: 0;
  padding: 0.25rem 0;
}

.landing-card--list .landing-card-title {
  -webkit-line-clamp: 1;
}

/* ── Empty state ── */

.landing-empty {
  text-align: center;
  padding: 4rem 0;
  color: #6b7280;
}

.landing-empty-switch {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--accent, #5500ff);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.landing-empty-switch:hover {
  text-decoration: underline;
}

/* ── Footer ── */

.landing-footer {
  max-width: 72rem;
  margin: 0 auto;
  margin-top: 3rem;
  padding: 2rem 1rem 0;
  border-top: 1px solid #e5e7eb;
}

@media (min-width: 640px) { .landing-footer { padding: 2rem 1.5rem 0; } }
@media (min-width: 1024px) { .landing-footer { padding: 2rem 3rem 0; } }

.landing-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .landing-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.landing-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-social-link {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.landing-social-link:hover {
  color: #111827;
  background: #f3f4f6;
}

.landing-legal {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
}

.landing-legal a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s;
}

.landing-legal a:hover { color: #111827; }

/* ---------- Language switcher (inside manual pages) ---------- */

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1.5rem;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid #5500ff;
  color: #5500ff;
  background: #ffffff;
  text-decoration: none;
}

.lang-pill:hover {
  background: #eff6ff;
  color: #3d0099;
}

.lang-pill--current {
  background: #5500ff;
  color: #ffffff;
  border-color: #5500ff;
  cursor: default;
}

/* ---------- Chapter TOC (inside manual pages) ---------- */

.manual-toc {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.toc-back {
  display: inline-block;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  color: #6b7280;
  text-decoration: none;
}

.toc-back:hover {
  color: #5500ff;
  text-decoration: underline;
}

.toc-list {
  margin: 0;
  padding-left: 1.25rem;
}

.toc-list li {
  padding: 0.1875rem 0;
}

.toc-list a {
  color: #374151;
  text-decoration: none;
  font-size: 0.9375rem;
}

.toc-list a:hover {
  color: #5500ff;
  text-decoration: underline;
}

/* ---------- Page header (story 142 — matches [slug].astro) ---------- */

/* Row 1: logo left, language selector right */
.manual-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.manual-header-logo {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
}

@media (min-width: 768px) { .manual-header-logo { height: 3rem; } }

.manual-header-lang-select {
  height: 2.25rem;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.8125rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  appearance: auto;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.manual-header-lang-select:focus {
  outline: 2px solid var(--accent, #5500ff);
  outline-offset: 1px;
}

/* Row 2: breadcrumb */
.manual-header-breadcrumb {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.manual-header-breadcrumb-link {
  text-decoration: underline;
  color: #6b7280;
  text-transform: capitalize;
}

.manual-header-breadcrumb-link:hover {
  color: #111827;
}

.manual-header-breadcrumb-sep {
  margin: 0 0.5rem;
  color: #9ca3af;
}

/* Print page table — screen: invisible wrapper */
.print-page-table {
  display: contents;
}

.print-page-table > thead,
.print-page-table > tfoot {
  display: none;
}

.print-page-table > tbody,
.print-page-table > tbody > tr,
.print-page-table > tbody > tr > td {
  display: contents;
}

/* Print header/footer elements — hidden on screen, visible in print */
.print-header,
.print-footer {
  display: none;
}

/* ---------- Sticky sidebar outline (story 127) ---------- */

.manual-layout {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- Sidebar (story 142 — matches ChapterNav.tsx) ---------- */

/* Toggle button: fixed top-left, visible on mobile */
.sidebar-toggle {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: #111827;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sidebar-toggle-label { display: none; }
@media (min-width: 640px) { .sidebar-toggle-label { display: inline; } }

/* Sidebar toggle always visible — matches live site tablet/desktop behavior */

/* Overlay: click to close on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0,0,0,0.3);
}

.sidebar-overlay--visible { display: block; }

/* Sidebar overlay visible on all sizes when open */

/* Sidebar panel */
.manual-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 18rem;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  padding: 1rem;
  transform: translateX(-100%);
  transition: transform 0.3s;
}

.manual-sidebar.sidebar--open {
  transform: translateX(0);
}

/* Sidebar is always a slide-in overlay (matches live site behavior).
   No desktop sticky column layout — toggle button always visible. */

.manual-sidebar-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.25rem;
}

.sidebar-close:hover { color: #111827; }

@media (min-width: 1024px) { .sidebar-close { display: none; } }

/* Sidebar header: logo + title */
.manual-sidebar-header {
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.manual-sidebar-logo {
  height: 2rem;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.manual-sidebar-title {
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar search */
.sidebar-search {
  position: relative;
  margin-bottom: 0.75rem;
}

.sidebar-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  display: flex;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  font-size: 0.8125rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #111827;
  outline: none;
}

.sidebar-search-input::placeholder { color: #9ca3af; }

.sidebar-search-input:focus {
  border-color: var(--accent, #5500ff);
  box-shadow: 0 0 0 1px var(--accent, #5500ff);
}

.sidebar-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
}

.sidebar-search-clear:hover { color: #111827; }

/* Nav tree */
.sidebar-tree {
  flex: 1;
  overflow-y: auto;
}

.sidebar-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  color: #6b7280;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.sidebar-item:hover {
  background: #f3f4f6;
  color: #111827;
}

.sidebar-item--l0 {
  color: #111827;
  font-weight: 500;
  padding-left: 0.5rem;
}

.sidebar-item--l1 { padding-left: 0.75rem; }
.sidebar-item--l2 { padding-left: 1.5rem; }

.sidebar-item--header {
  font-weight: 600;
  color: #111827;
  font-size: 0.8125rem;
  margin-top: 0.75rem;
  cursor: default;
}

.sidebar-item--header:hover { background: transparent; }

.sidebar-empty {
  font-size: 0.8125rem;
  color: #6b7280;
  padding: 0.75rem 0.5rem;
}

/* Anchor landing offset */
.manual-cover,
.manual-infobox,
.manual-variations,
.manual-reference,
.manual-step-card,
.manual-chapter,
.manual-prodinfo {
  scroll-margin-top: 1rem;
}
.toc-level-2 > a,
.toc-level-2 > span {
  padding-left: 1.75rem;
}

/* ---------- Footer ---------- */

.manual-footer {
  border-top: 1px solid #e5e7eb;
  padding: 2rem 1.25rem;
  margin-top: 2rem;
}

.manual-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.manual-footer-logo {
  max-height: 2.5rem;
  width: auto;
}

.manual-footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.manual-footer-links a {
  color: #6b7280;
  text-decoration: none;
}

.manual-footer-links a:hover {
  color: #5500ff;
  text-decoration: underline;
}

/* ---------- Bottom toolbar (story 138) ---------- */

.manual-bottom-bar {
  position: fixed;
  bottom: 0;
  right: 1rem;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.625rem 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 639px) {
  .manual-bottom-bar {
    left: 0;
    right: 0;
    border-radius: 1rem 1rem 0 0;
    border-left: none;
    border-right: none;
  }
}

.manual-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  min-height: 2.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.manual-toolbar-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.manual-toolbar-btn:focus-visible {
  outline: 2px solid #5500ff;
  outline-offset: 2px;
}

.manual-toolbar-btn--primary {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.manual-toolbar-btn--primary:hover {
  background: rgba(17, 24, 39, 0.8);
}

.manual-toolbar-btn svg {
  flex-shrink: 0;
}

.manual-toolbar-label {
  display: none;
}

@media (min-width: 640px) {
  .manual-toolbar-btn {
    padding: 0.5rem 1rem;
  }
  .manual-toolbar-label {
    display: inline;
  }
}

/* ---------- Print ---------- */

/* ══════════════════════════════════════════════════════════
   PRINT STYLES — ported from src/print.css (production)
   Adapted for the export's class names.
   ══════════════════════════════════════════════════════════ */

@media print {
  @page {
    size: A4;
    margin: 10mm 18mm 10mm 18mm;
  }

  /* Hide UI chrome */
  .manual-sidebar,
  .manual-bottom-bar,
  .manual-header-lang-select,
  .manual-header-breadcrumb,
  .manual-header-row,
  .manual-toc,
  .lang-switcher,
  .sidebar-toggle,
  .sidebar-overlay,
  select, input, nav {
    display: none !important;
    position: static !important;
  }

  /* Print page table: repeating header/footer on every page */
  .print-page-table {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
  }
  .print-page-table > thead { display: table-header-group !important; border: none !important; }
  .print-page-table > tfoot { display: table-footer-group !important; border: none !important; }
  .print-page-table > tbody { display: table-row-group !important; border: none !important; }
  .print-page-table > thead > tr,
  .print-page-table > tfoot > tr,
  .print-page-table > tbody > tr { display: table-row !important; border: none !important; }
  .print-page-table > thead td,
  .print-page-table > tfoot td,
  .print-page-table > tbody td { display: table-cell !important; padding: 0 !important; border: none !important; }

  .print-header {
    display: flex !important;
    height: 15mm;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 8mm;
    border-bottom: 0.3mm solid var(--print-accent, #000) !important;
    background: #fff !important;
    font-size: 7pt;
    color: #888;
  }

  .print-header-logo {
    height: 6mm !important;
    width: auto !important;
    display: inline-block !important;
    object-fit: contain;
  }

  .print-header-url {
    font-weight: 600;
    font-size: 7pt;
    color: #888;
  }

  .print-footer {
    display: flex !important;
    height: 12mm;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin-top: 8mm;
    border-top: 0.15mm solid #ccc !important;
    font-size: 6.5pt;
    color: #888;
    background: #fff !important;
  }

  .print-footer-text {
    display: flex !important;
    flex-direction: column;
    line-height: 1.3;
  }

  .print-footer-byline { font-size: 6.5pt; font-weight: 600; color: #555; }
  .print-footer-title { font-size: 6pt; color: #999; }

  /* Document reset */
  html {
    height: auto !important;
    overflow: visible !important;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    height: auto !important;
    overflow: visible !important;
    font-size: 11pt !important;
    color: #1a1a1a !important;
    background: #fff !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  main, .manual-page {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
  }

  .manual-layout {
    display: block !important;
    max-width: none !important;
    padding: 0 !important;
  }

  /* Strip decorative styles */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Cards → flat document sections */
  .manual-step-card,
  .manual-infobox,
  .manual-prodinfo,
  .manual-cover {
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .manual-step-header {
    position: static !important;
    border-bottom: none !important;
    padding: 2mm 0 1mm 0 !important;
  }

  /* Typography */
  h1, h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
    color: #1a1a1a !important;
  }

  .manual-step-heading {
    font-size: 13.75pt !important;
    font-weight: 700 !important;
  }

  .manual-step-num {
    color: #666 !important;
    font-weight: 700 !important;
  }

  .manual-cover-title {
    font-size: 21.5pt !important;
    font-weight: 700 !important;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }

  /* Images */
  img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Step layout: image floats left, text wraps */
  .manual-step-content--split {
    display: block !important;
  }

  .manual-step-media {
    float: left;
    width: 35% !important;
    margin: 0 3mm 2mm 0 !important;
  }

  .manual-step-media--full {
    float: none;
    width: 90% !important;
    margin: 2mm auto !important;
  }

  .manual-step-content::after {
    content: "";
    display: table;
    clear: both;
  }

  /* Step cards: break-inside avoid for short steps */
  .manual-step-card {
    margin-bottom: 3mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Cover: force row layout */
  .manual-cover-layout {
    display: flex !important;
    flex-direction: row !important;
    gap: 4mm !important;
  }

  .manual-cover-image-col {
    width: 35% !important;
    flex-shrink: 0 !important;
  }

  .manual-cover-text-col {
    flex: 1 !important;
  }

  .manual-cover-badge {
    display: none !important;
  }

  .manual-cover-description {
    font-size: 11pt !important;
    color: #444 !important;
  }

  /* Product info: force row layout */
  .manual-prodinfo-body--has-image {
    display: flex !important;
    flex-direction: row !important;
    gap: 4mm !important;
  }

  .manual-prodinfo-image-col {
    width: 35% !important;
    flex-shrink: 0 !important;
  }

  .manual-prodinfo-image-col img {
    max-height: 60mm !important;
    object-fit: contain;
  }

  /* Info boxes: same float layout as steps (matches production print.css) */
  .manual-infobox {
    padding: 2mm 0 !important;
    margin-bottom: 3mm;
    break-inside: avoid;
  }

  .manual-infobox-icon {
    display: none !important;
  }

  .manual-infobox-title {
    font-size: 13.75pt !important;
    font-weight: 700 !important;
    margin-bottom: 2mm !important;
  }

  .manual-infobox-content--split {
    display: block !important;
  }

  .manual-infobox-media {
    float: left;
    width: 35% !important;
    margin: 0 3mm 2mm 0 !important;
  }

  .manual-infobox-media img {
    width: 100% !important;
    height: auto !important;
    max-height: 60mm !important;
    object-fit: contain;
  }

  .manual-infobox-content--split::after {
    content: "";
    display: table;
    clear: both;
  }

  /* Header: minimal */
  .manual-header {
    border-bottom: none !important;
    padding: 0.5rem 0 !important;
  }

  /* Footer */
  .manual-footer {
    border-top: 1px solid #ccc !important;
  }

  .manual-footer-links a::after {
    content: none;
  }

  /* Lists */
  ul, ol {
    padding-left: 5mm !important;
  }

  /* Page breaks */
  p {
    orphans: 3;
    widows: 3;
  }

  /* Step images constrain */
  .manual-step-image {
    max-height: 60mm !important;
    object-fit: contain;
  }

  /* Multi-image grid for print */
  .manual-step-images {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2mm !important;
  }

  .manual-step-images .manual-step-image {
    max-height: 50mm !important;
  }

  /* Tables */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  tr {
    border-bottom: 0.15mm solid #e5e5e5 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  td, th {
    padding: 1.5mm 0 !important;
    text-align: left;
  }
}
