:root {
  --ink: #16312d;
  --muted: #5f7470;
  --brand: #126c60;
  --brand-dark: #0c4f47;
  --brand-soft: #e8f3f0;
  --line: #cfe0dc;
  --paper: #ffffff;
  --canvas: #eef4f2;
  --warning: #a65a16;
  --shadow: 0 16px 42px rgba(22, 49, 45, 0.08);
  --sidebar: 224px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--brand-dark); }

button, input { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  background: var(--brand-dark);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.manual-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  overflow-y: auto;
  color: white;
  background: linear-gradient(170deg, #0d3e38 0%, #092e2a 100%);
  box-shadow: 8px 0 28px rgba(6, 37, 33, 0.14);
}

.manual-brand { padding: 27px 25px 19px; }
.manual-brand h1 { margin: 0; color: white; font-size: 1.18rem; letter-spacing: 0.025em; }
.manual-brand p { margin: 5px 0 0; color: #bcd8d3; font-size: 0.82rem; line-height: 1.35; }

.manual-app-nav, .manual-index { padding: 0 12px 15px; }
.manual-app-nav .nav-title, .manual-index > p {
  margin: 0 12px 8px;
  color: #8fb9b2;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.manual-app-nav a, .manual-index a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 7px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: #dcebe8;
  font-size: 0.86rem;
  line-height: 1.25;
  text-decoration: none;
}
.manual-app-nav a:hover, .manual-app-nav a.active,
.manual-index a:hover, .manual-index a.is-active { color: white; background: rgba(255, 255, 255, 0.1); }
.manual-app-nav .nav-icon { display: grid; width: 20px; height: 20px; place-items: center; color: #91c8bf; font-size: 1rem; }

.manual-search { display: grid; gap: 6px; padding: 3px 18px 20px; }
.manual-search span { color: #c6dbd7; font-size: 0.78rem; font-weight: 700; }
.manual-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  padding: 8px 11px;
  color: white;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}
.manual-search input::placeholder { color: #acc7c2; }
.manual-search input:focus { border-color: #7dc5ba; box-shadow: 0 0 0 3px rgba(125, 197, 186, 0.18); }

.manual-index a span { color: #77b8ae; font-weight: 800; }
.manual-sidebar-footer { display: grid; gap: 10px; margin-top: auto; padding: 16px 18px 22px; color: #9fc1bb; font-size: 0.76rem; }
.manual-sidebar-footer .print-button { width: 100%; border: 1px solid rgba(177, 215, 208, .42); border-radius: 8px; padding: 9px 12px; color: white; background: rgba(255,255,255,.08); font-weight: 800; cursor: pointer; }
.manual-sidebar-footer .print-button:hover { background: rgba(255,255,255,.15); }
.menu-button { display: none; border: 1px solid #a7c8c1; border-radius: 9px; padding: 9px 13px; color: var(--brand-dark); background: white; font-weight: 800; box-shadow: 0 7px 20px rgba(22,49,45,.16); cursor: pointer; }

.manual-main {
  width: auto;
  max-width: 1500px;
  margin-left: var(--sidebar);
  padding: 34px 24px 90px;
}

.manual-hero {
  position: relative;
  overflow: hidden;
  min-height: 315px;
  padding: clamp(36px, 6vw, 72px);
  border-radius: 22px;
  color: white;
  background:
    linear-gradient(115deg, rgba(8, 58, 51, 0.98), rgba(15, 105, 93, 0.9)),
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(255, 255, 255, 0.06) 20px 21px);
  box-shadow: var(--shadow);
}
.manual-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -155px;
  width: 390px;
  height: 390px;
  border: 58px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}
.manual-hero > * { position: relative; z-index: 1; max-width: 760px; }
.manual-hero .eyebrow { margin: 0 0 8px; color: #b9ddd6; font-weight: 800; letter-spacing: 0.075em; text-transform: uppercase; }
.manual-hero h1 { margin: 0; color: white; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1.05; }
.manual-hero > p:not(.eyebrow) { margin: 20px 0 0; color: #e4f0ee; font-size: clamp(1.02rem, 2vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-actions a { padding: 11px 16px; border: 1px solid rgba(255,255,255,.45); border-radius: 9px; color: white; font-weight: 800; text-decoration: none; }
.hero-actions .primary-action { border-color: white; color: var(--brand-dark); background: white; }

.manual-article { display: grid; gap: 24px; margin-top: 28px; }
.chapter {
  min-width: 0;
  padding: clamp(27px, 5vw, 58px);
  border: 1px solid rgba(207, 224, 220, 0.95);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.chapter > h1 { margin: 0 0 30px; padding-bottom: 18px; border-bottom: 3px solid var(--brand-soft); color: var(--brand-dark); font-size: clamp(1.75rem, 3vw, 2.45rem); line-height: 1.15; }
.chapter > h1 { scroll-margin-top: 20px; }
.chapter h2 { margin: 38px 0 12px; color: var(--brand); font-size: clamp(1.16rem, 2vw, 1.42rem); line-height: 1.25; scroll-margin-top: 20px; }
.chapter p { margin: 0 0 14px; }
.chapter ul, .chapter ol { margin: 8px 0 22px; padding-left: 1.45rem; }
.chapter li { margin: 5px 0; padding-left: 3px; }
.chapter li > p { margin: 0; }
.chapter strong { color: #102d29; }
.chapter code { padding: 2px 6px; border-radius: 5px; background: #edf3f1; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.chapter table { display: block; width: 100%; margin: 18px 0 26px; overflow-x: auto; border-collapse: collapse; }
.chapter th, .chapter td { min-width: 120px; padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.chapter th { color: var(--brand-dark); background: var(--brand-soft); }

.chapter p:has(> .image-button), .chapter p:has(> img) { margin: 24px 0 8px; text-align: center; }
.image-button { display: block; width: 100%; margin: 0; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.image-button img, .chapter > img, .chapter p img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 760px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: 0 10px 28px rgba(22, 49, 45, 0.08);
}
.chapter em { color: var(--muted); }
.manual-figure { margin: 28px 0; text-align: center; }
.manual-figure figcaption, .workflow figcaption { margin-top: 10px; color: var(--muted); font-size: 0.88rem; font-style: italic; }
.technical-figure img { max-height: none; }

.manual-video { min-width: 0; max-width: 100%; margin: 28px 0 32px; }
.manual-video video {
  display: block;
  width: 100%;
  max-width: 1080px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--brand-dark);
  box-shadow: 0 12px 30px rgba(22, 49, 45, 0.12);
}
.manual-video figcaption { margin-top: 12px; color: var(--muted); font-size: .92rem; text-align: center; }
.manual-video figcaption strong { color: var(--brand-dark); }
.manual-video details { max-width: 1080px; margin: 12px auto 0; border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; background: #f8fbfa; }
.manual-video summary { color: var(--brand); font-weight: 800; cursor: pointer; }
.manual-video details p { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }

.workflow { margin: 28px 0 34px; padding: 22px; border: 1px solid #bad8d2; border-radius: 14px; background: linear-gradient(180deg, #f3faf8, #e9f3f1); }
.workflow-title { display: grid; gap: 2px; margin-bottom: 18px; text-align: center; }
.workflow-title span { color: var(--brand); font-size: .78rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.workflow-title strong { font-size: 1.05rem; }
.workflow-track { display: flex; gap: 8px; align-items: center; justify-content: center; }
.workflow-step { display: grid; width: 144px; min-height: 124px; place-content: center; border: 1px solid #b9d8d2; border-radius: 12px; padding: 11px; text-align: center; background: white; }
.workflow-step span { display: grid; width: 27px; height: 27px; margin: 0 auto 7px; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-size: .76rem; font-weight: 800; }
.workflow-step strong { line-height: 1.2; }
.workflow-step small { margin-top: 5px; color: var(--muted); line-height: 1.3; }
.workflow-arrow { color: #6d9f97; font-size: 1.35rem; }
.workflow-detail .workflow-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.workflow-detail .workflow-step { width: auto; min-width: 0; }
.workflow-detail .workflow-arrow { display: none; }

.exchange-map { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(300px, 2fr) minmax(150px, .8fr); gap: 18px; align-items: center; margin: 34px 0 12px; padding: 24px; border: 1px solid #b9d8d2; border-radius: 14px; background: #f2f8f6; }
.exchange-column { display: grid; min-height: 130px; place-content: center; border-radius: 12px; padding: 18px; color: white; text-align: center; background: var(--brand-dark); }
.exchange-column strong { color: white; font-size: 1.12rem; }
.exchange-column small { color: #c9e0dc; }
.exchange-lanes { display: grid; gap: 10px; }
.exchange-lane, .exchange-storage { display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.exchange-lane span { grid-row: 1 / 3; align-self: center; color: var(--brand); font-size: 1.5rem; }
.exchange-lane small, .exchange-storage small { color: var(--muted); line-height: 1.35; }
.exchange-storage { grid-template-columns: 1fr; border-style: dashed; background: #fbfdfc; }
.exchange-map figcaption { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; font-style: italic; text-align: center; }

.navigation-map { margin: 32px 0 12px; padding: 24px; border: 1px solid #b9d8d2; border-radius: 14px; background: #f2f8f6; text-align: center; }
.navigation-map-home { display: inline-grid; min-width: min(100%, 270px); gap: 3px; border-radius: 11px; padding: 15px 20px; color: white; background: var(--brand-dark); }
.navigation-map-home strong { color: white; font-size: 1.12rem; }
.navigation-map-home small { color: #c9e0dc; }
.navigation-map-arrow { margin: 6px 0; color: var(--brand); font-size: 1.7rem; line-height: 1; }
.navigation-map-pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.navigation-map-card { display: grid; min-height: 102px; place-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 11px; padding: 15px; background: white; }
.navigation-map-card strong { color: var(--brand-dark); font-size: 1.04rem; }
.navigation-map-card small, .navigation-map-note small { color: var(--muted); line-height: 1.45; }
.navigation-map-note { display: grid; gap: 4px; margin-top: 12px; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 16px; background: #fbfdfc; text-align: left; }
.navigation-map figcaption { margin-top: 11px; color: var(--muted); font-size: .88rem; font-style: italic; }

.job-folder-map { margin: 28px 0 12px; padding: 22px; border: 1px solid #b9d8d2; border-radius: 14px; background: #f2f8f6; }
.job-folder-root { display: grid; gap: 2px; border-radius: 10px; padding: 13px 16px; color: white; background: var(--brand-dark); }
.job-folder-root strong { color: white; font-size: 1.05rem; }
.job-folder-root small { color: #c9e0dc; }
.job-folder-list { position: relative; display: grid; gap: 8px; margin: 12px 0 0 18px !important; padding: 0 0 0 22px !important; list-style: none; }
.job-folder-list::before { content: ""; position: absolute; top: 0; bottom: 22px; left: 0; border-left: 2px solid #9dc9c0; }
.job-folder-list li { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; margin: 0; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: white; }
.job-folder-list li::before { content: ""; position: absolute; top: 50%; left: -24px; width: 22px; border-top: 2px solid #9dc9c0; }
.job-folder-list li > span { display: grid; width: 34px; height: 28px; place-items: center; border-radius: 6px; color: white; background: var(--brand); font-size: .76rem; font-weight: 900; }
.job-folder-list li > div { display: grid; gap: 2px; min-width: 0; }
.job-folder-list li strong { overflow-wrap: anywhere; color: var(--brand-dark); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92rem; }
.job-folder-list li small { color: var(--muted); line-height: 1.35; }
.job-folder-list .job-folder-directory { border-style: dashed; background: #fbfdfc; }
.job-folder-list .job-folder-directory > span { color: var(--brand-dark); background: var(--brand-soft); }
.job-folder-map figcaption { margin-top: 12px; color: var(--muted); font-size: .88rem; font-style: italic; text-align: center; }

.legacy-anchor { position: relative; top: -86px; visibility: hidden; }
.search-status { min-height: 24px; margin: 20px 4px 0; color: var(--muted); font-size: .9rem; }
.chapter.is-hidden { display: none; }
.search-hit { border-radius: 3px; color: #292400; background: #fff19d; }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 18;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--brand-dark);
  box-shadow: 0 8px 24px rgba(9, 55, 49, 0.25);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); }

.image-dialog { width: min(96vw, 1500px); max-width: none; max-height: 94vh; border: 0; border-radius: 14px; padding: 50px 18px 18px; background: #f8fbfa; box-shadow: 0 22px 80px rgba(0,0,0,.35); }
.image-dialog::backdrop { background: rgba(4, 24, 21, .78); }
.image-dialog-toolbar { position: absolute; top: 9px; left: 18px; display: flex; align-items: center; gap: 6px; }
.image-dialog-toolbar button { min-width: 34px; height: 32px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; color: var(--ink); background: white; font: inherit; font-weight: 800; cursor: pointer; }
.image-dialog-toolbar button:hover { background: var(--brand-soft); }
.image-dialog-toolbar output { min-width: 48px; color: var(--muted); font-size: .8rem; font-weight: 800; text-align: center; }
.image-dialog-stage { width: 100%; max-height: 76vh; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: #eef4f2; }
.image-dialog img { display: block; max-width: none; height: auto; margin: 0 auto; background: white; }
.image-dialog p { margin: 10px 0 0; color: var(--muted); text-align: center; }
.dialog-close { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--ink); background: #e5efed; font-size: 1.4rem; cursor: pointer; }

@media (max-width: 1180px) {
  :root { --sidebar: 200px; }
  .workflow-general .workflow-track { flex-direction: column; }
  .workflow-arrow { transform: rotate(90deg); text-align: center; }
  .workflow-step { width: min(100%, 420px); min-height: 94px; margin: auto; }
  .workflow-detail .workflow-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-detail .workflow-step { width: auto; }
  .exchange-map { grid-template-columns: 1fr; }
  .exchange-column { min-height: 94px; }
  .exchange-map figcaption { grid-column: 1; }
  .navigation-map-pages { grid-template-columns: 1fr; }
  .navigation-map-card { min-height: 84px; }
  .job-folder-map { padding: 18px 14px; }
  .job-folder-list { margin-left: 10px !important; padding-left: 18px !important; }
  .job-folder-list li::before { left: -20px; width: 18px; }
}

@media (max-width: 820px) {
  :root { --sidebar: 224px; }
  body.is-menu-open { overflow: hidden; }
  .manual-sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  body.is-menu-open .manual-sidebar { transform: translateX(0); }
  body.is-menu-open::after { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(4, 31, 27, .48); }
  body.is-menu-open .manual-sidebar { z-index: 40; }
  .menu-button { display: block; position: fixed; top: 12px; left: 12px; z-index: 24; }
  body.is-menu-open .menu-button { opacity: 0; pointer-events: none; }
  .manual-main { width: auto; margin: 0; padding: 72px 12px 68px; }
  .manual-hero { min-height: auto; border-radius: 16px; }
  .chapter { border-radius: 14px; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .manual-hero { padding: 30px 24px; }
  .manual-hero h1 { font-size: 2.35rem; }
  .chapter { padding: 24px 18px; }
  .chapter > h1 { font-size: 1.7rem; }
  .chapter h2 { margin-top: 30px; }
  .workflow-detail .workflow-track { grid-template-columns: 1fr; }
  .back-to-top { right: 14px; bottom: 14px; }
}

@media print {
  @page { size: A4; margin: 16mm; }
  body { color: #111; background: white; font-size: 10.5pt; }
  .manual-sidebar, .menu-button, .back-to-top, .image-dialog, .search-status, .manual-video video { display: none !important; }
  .manual-main { width: auto; margin: 0; padding: 0; }
  .manual-hero { min-height: 230mm; page-break-after: always; border-radius: 0; box-shadow: none; print-color-adjust: exact; }
  .manual-article { display: block; margin: 0; }
  .chapter { page-break-before: always; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
  .chapter h1, .chapter h2 { break-after: avoid; }
  .chapter p, .chapter li { orphans: 3; widows: 3; }
  .image-button { cursor: default; }
  .image-button img, .chapter img { max-height: 235mm; border: 0; box-shadow: none; }
  .workflow { break-inside: avoid; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
}
