:root {
  --navy-950: #090552;
  --navy-900: #10069f;
  --navy-800: #2117a7;
  --blue-700: #10069f;
  --blue-100: #e8ecf7;
  --blue-050: #f7f8fc;
  --gold-500: #efb538;
  --gold-100: #fff6df;
  --green-600: #8bc400;
  --red-600: #b42318;
  --ink: #101820;
  --muted: #5c6977;
  --line: #d8e0e8;
  --paper: #ffffff;
  --canvas: #f1f3f8;
  --shadow: 0 12px 32px rgba(8, 30, 61, 0.09);
  --sidebar-width: 318px;
  --topbar-height: 68px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 20px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Calibri, Aptos, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

body.menu-open { overflow: hidden; }

button, input { font: inherit; }
button { color: inherit; }

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -56px;
  padding: 10px 14px;
  color: white;
  background: var(--navy-950);
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  color: white;
  background: var(--navy-900);
  border-bottom: 3px solid var(--gold-500);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}
.brand-logo {
  display: block;
  width: 178px;
  max-height: 46px;
  object-fit: contain;
}
.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: .12em;
  line-height: 1.05;
}
.brand small {
  display: block;
  margin-top: 3px;
  color: #c7d8eb;
  font-size: 10px;
  letter-spacing: .24em;
}
.brand-mark {
  width: 34px;
  height: 26px;
  display: grid;
  align-content: center;
  gap: 3px;
  border-top: 2px solid white;
  border-bottom: 2px solid white;
}
.brand-mark span {
  display: block;
  height: 3px;
  background: var(--gold-500);
  transform: skewY(-18deg);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  background: transparent;
  cursor: pointer;
}
.icon-button:hover, .icon-button:focus-visible { background: rgba(255,255,255,.1); }
.icon-button svg { width: 20px; height: 20px; }
.menu-button { display: none; }

.search-box {
  width: min(360px, 35vw);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  color: #28435e;
  background: white;
  border: 1px solid transparent;
}
.search-box:focus-within { outline: 3px solid rgba(227,173,62,.36); }
.search-box svg { width: 18px; height: 18px; }
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}
.search-box kbd {
  padding: 2px 5px;
  border: 1px solid #cad2da;
  color: #6b7783;
  background: #f5f7f9;
  font-size: 11px;
}
.mobile-search-wrap { display: none; }

.language-switch {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,.35);
}
.language-switch button {
  min-width: 44px;
  height: 38px;
  padding: 0 10px;
  border: 0;
  color: white;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.language-switch button[aria-pressed="true"] {
  color: var(--navy-950);
  background: var(--gold-500);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  padding-top: var(--topbar-height);
}

.sidebar {
  position: fixed;
  z-index: 40;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  overflow-y: auto;
  padding: 25px 20px 22px;
  background: #f9fbfd;
  border-right: 1px solid var(--line);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 13px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}
.close-menu { display: none; color: var(--navy-900); border-color: var(--line); }

#toc { padding-top: 14px; }
.toc-chapter {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 9px;
  align-items: start;
  padding: 10px 9px;
  color: #283b4e;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.toc-chapter:hover { color: var(--navy-900); background: var(--blue-050); }
.toc-chapter.active {
  color: var(--navy-900);
  background: var(--blue-100);
  border-left-color: var(--gold-500);
  font-weight: 700;
}
.toc-number {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--navy-800);
  font-size: 12px;
  font-weight: 800;
}
.toc-text { font-size: 13px; line-height: 1.35; }
.toc-sublist {
  margin: 2px 0 9px 43px;
  padding: 0 0 0 11px;
  border-left: 1px solid var(--line);
}
.toc-sublist a {
  display: block;
  padding: 5px 2px;
  color: #5b6875;
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
}
.toc-sublist a:hover { color: var(--blue-700); }

.sidebar-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 24px 9px 0;
  padding-top: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: var(--gold-500);
  border-radius: 50%;
}

main {
  grid-column: 2;
  min-width: 0;
  padding: 30px clamp(24px, 5vw, 76px) 60px;
}

.hero {
  position: relative;
  min-height: 490px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto 46px;
  padding: clamp(38px, 6vw, 74px);
  overflow: hidden;
  color: white;
  background: var(--navy-900);
  border-bottom: 8px solid var(--gold-500);
  box-shadow: var(--shadow);
}
.hero::before,
.chapter-banner::after {
  content: "";
  position: absolute;
  width: 390px;
  height: 110px;
  right: -48px;
  top: 68px;
  opacity: .16;
  border-top: 14px solid var(--gold-500);
  border-bottom: 14px solid var(--gold-500);
  transform: skewX(-24deg) rotate(-4deg);
  box-shadow: 0 30px 0 -22px var(--gold-500), 0 -30px 0 -22px var(--gold-500);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.hero-kicker {
  display: inline-block;
  margin-bottom: 18px;
  color: #ffda86;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 5.8vw, 78px);
  line-height: .98;
  letter-spacing: -.035em;
  font-family: Cambria, Georgia, serif;
}
.hero-company {
  margin: 18px 0 0;
  color: #a9d1ec;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 400;
}
.hero-strapline {
  margin: 34px 0 0;
  color: #d9e6f2;
  font-size: 16px;
  letter-spacing: .02em;
}
.hero-audience { margin: 12px 0 0; color: white; font-size: 18px; }
.hero-notice {
  margin: 34px 0 0;
  padding-left: 16px;
  color: #d9e6f2;
  border-left: 3px solid var(--gold-500);
  font-size: 13px;
}
.cover-card {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: min(100%, 315px);
  margin: 0;
  background: white;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 20px 42px rgba(0,0,0,.25);
  transform: rotate(1.2deg);
}
.cover-card button { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; background: white; }
.cover-card img { display: block; width: 100%; height: auto; }

.search-status {
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  color: var(--navy-900);
  background: var(--gold-100);
  border-left: 4px solid var(--gold-500);
  font-weight: 700;
}

#chapters { max-width: 1200px; margin: 0 auto; }
.chapter {
  margin: 0 0 54px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.chapter-banner {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 38px clamp(25px, 5vw, 58px);
  color: white;
  background: var(--navy-900);
  border-bottom: 6px solid var(--gold-500);
}
.chapter-banner::after { top: 15px; }
.chapter-number {
  position: relative;
  z-index: 1;
  margin-right: 24px;
  color: var(--gold-500);
  font-size: clamp(58px, 8vw, 98px);
  font-weight: 800;
  line-height: .8;
}
.chapter-title-wrap { position: relative; z-index: 1; }
.chapter-title-wrap .eyebrow { color: #9dc7e4; }
.chapter h2.chapter-title {
  max-width: 850px;
  margin: 7px 0 0;
  color: white;
  font-size: clamp(27px, 4vw, 45px);
  line-height: 1.08;
  letter-spacing: -.025em;
  font-family: Cambria, Georgia, serif;
}
.chapter-body { padding: clamp(28px, 5vw, 58px); }

.manual-block { scroll-margin-top: calc(var(--topbar-height) + 18px); }
.manual-block[hidden] { display: none !important; }

.manual-block.heading {
  position: relative;
  margin: 42px 0 16px;
  color: var(--navy-900);
  line-height: 1.24;
}
.manual-block.heading.level-2 {
  padding: 13px 16px;
  color: white;
  background: var(--navy-800);
  font-size: clamp(22px, 3vw, 31px);
}
.manual-block.heading.level-3 {
  padding-bottom: 9px;
  border-bottom: 2px solid var(--blue-100);
  font-size: clamp(19px, 2.3vw, 25px);
}
.manual-block.heading.level-3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 86px;
  height: 2px;
  background: var(--gold-500);
}
.manual-block.heading.level-4 { font-size: 18px; color: var(--blue-700); }

.manual-block.paragraph {
  max-width: 92ch;
  margin: 10px 0;
  color: #273443;
  font-size: 16px;
}
.manual-block.caption {
  margin: 8px auto 26px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.manual-list {
  max-width: 90ch;
  margin: 12px 0 18px;
  padding: 0;
  list-style: none;
}
.manual-list li {
  position: relative;
  margin: 7px 0;
  padding-left: 24px;
}
.manual-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .7em;
  width: 7px;
  height: 7px;
  background: var(--gold-500);
  transform: rotate(45deg);
}

.figure {
  margin: 24px auto 8px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
}
.figure button,
.document-page button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.figure img { display: block; max-width: 100%; max-height: 720px; width: auto; height: auto; margin: auto; }

.document-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0 10px;
}
.document-page {
  margin: 0;
  padding: 12px;
  background: #f7f9fb;
  border: 1px solid var(--line);
}
.document-page:hover { border-color: var(--blue-700); box-shadow: 0 8px 24px rgba(8,30,61,.1); }
.document-page img { display: block; width: 100%; height: auto; background: white; }
.document-page figcaption {
  padding: 10px 3px 1px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.table-wrap {
  margin: 20px 0 28px;
  overflow-x: auto;
  border: 1px solid #b9c7d4;
}
.manual-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: white;
  font-size: 14px;
}
.manual-table th,
.manual-table td {
  padding: 10px 12px;
  vertical-align: top;
  border: 1px solid #c7d1dc;
  text-align: left;
  white-space: pre-line;
}
.manual-table thead th,
.manual-table tr:first-child th {
  color: white;
  background: var(--navy-800);
  font-weight: 700;
}
.manual-table tbody tr:nth-child(even) { background: var(--blue-050); }
.manual-table td:first-child { color: var(--navy-900); font-weight: 700; }
.manual-table img {
  display: block;
  width: min(160px, 100%);
  height: auto;
  margin: 7px auto;
  cursor: zoom-in;
}

.equipment-card {
  margin: 22px 0 30px;
  border: 1px solid #aebdcb;
}
.equipment-card h3 {
  margin: 0;
  padding: 11px 15px;
  color: white;
  background: var(--navy-800);
  font-size: 17px;
}
.equipment-card dl {
  display: grid;
  grid-template-columns: minmax(180px, 36%) 1fr;
  margin: 0;
}
.equipment-card dt,
.equipment-card dd {
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid #c7d1dc;
}
.equipment-card dt { color: var(--navy-900); background: #deebf5; font-weight: 700; }
.equipment-card dd { background: white; }
.equipment-card dt:last-of-type,
.equipment-card dd:last-of-type { background: var(--gold-100); }

.quote-card {
  position: relative;
  margin: 16px 0;
  padding: 18px 22px 18px 54px;
  color: #25384a;
  background: var(--blue-050);
  border-left: 4px solid var(--gold-500);
}
.quote-card::before {
  content: "“";
  position: absolute;
  left: 18px;
  top: 1px;
  color: var(--blue-700);
  font-family: Georgia, serif;
  font-size: 48px;
  line-height: 1;
}

.checklist-panel {
  margin: 22px 0 30px;
  padding: 24px;
  background: var(--blue-050);
  border-top: 5px solid var(--navy-800);
}
.checklist-title {
  margin: 26px 0 0;
  padding: 22px 24px;
  color: white;
  background: var(--navy-800);
  border-bottom: 5px solid var(--gold-500);
}
.checklist-title span {
  display: block;
  color: #b8d6e9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
}
.checklist-title strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.checklist-group {
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
}
.checklist-group strong {
  display: block;
  margin-bottom: 10px;
  color: var(--navy-900);
  font-size: 14px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.checklist-group span { display: block; margin: 7px 0; font-size: 14px; }

.catalog-module,
.matrix-module,
.fefco-module {
  margin: 22px 0 34px;
  color: var(--ink);
}

.module-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  padding: 16px;
  background: var(--blue-100);
  border-left: 4px solid var(--navy-900);
}
.module-search {
  flex: 1;
  max-width: 650px;
}
.module-search span {
  display: block;
  margin-bottom: 6px;
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 700;
}
.module-search input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  color: var(--ink);
  background: white;
  border: 1px solid #aab6cf;
  outline: 0;
}
.module-search input:focus {
  border-color: var(--navy-900);
  box-shadow: 0 0 0 3px rgba(16, 6, 159, .13);
}
.module-result {
  min-width: 130px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.module-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px 12px;
}
.module-tabs button {
  min-width: 92px;
  padding: 10px 14px;
  color: var(--navy-900);
  background: white;
  border: 1px solid #b8c1d6;
  font-weight: 700;
  cursor: pointer;
}
.module-tabs button:hover,
.module-tabs button:focus-visible {
  border-color: var(--navy-900);
}
.module-tabs button[aria-selected="true"] {
  color: white;
  background: var(--navy-900);
  border-color: var(--navy-900);
  box-shadow: inset 0 -4px 0 var(--gold-500);
}
.module-tabs button[hidden] { display: none; }
.module-panel[hidden] { display: none; }

.sheet-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 18px;
  color: white;
  background: var(--navy-900);
  border-bottom: 4px solid var(--gold-500);
}
.sheet-heading span {
  color: #dfe2ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sheet-heading h3 {
  margin: 0;
  font-size: 22px;
}

.excel-table-wrap {
  width: 100%;
  overflow: auto;
  background: white;
  border: 1px solid #aeb8cb;
  border-top: 0;
}
.excel-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  font-size: 12px;
  line-height: 1.25;
}
.excel-table td {
  min-width: 52px;
  max-width: 250px;
  padding: 6px 8px;
  vertical-align: middle;
  white-space: nowrap;
  border-right: 1px solid #b9c2d1;
  border-bottom: 1px solid #b9c2d1;
  background: var(--cell-fill, white);
}
.excel-table tr td:first-child { border-left: 0; }
.excel-row-header td {
  color: white;
  background: var(--navy-800) !important;
  font-weight: 700;
  text-align: center;
}
.excel-row-section td {
  padding-top: 8px;
  padding-bottom: 8px;
  color: var(--navy-950);
  background: var(--blue-100) !important;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.excel-row-title td {
  color: var(--navy-900);
  background: #f1f3f9 !important;
  font-weight: 800;
}
.excel-row-data:nth-child(even) td { background-color: #fafbfe; }
.excel-row-data:hover td { background: #fff7e4 !important; }

/* Chapter 1 keeps the semantic colours from the source boardgrade catalogues. */
.boardgrade-table .excel-row-title td,
.boardgrade-table .excel-row-section td,
.boardgrade-table .excel-row-header td,
.boardgrade-table .excel-row-data td,
.boardgrade-table .excel-row-data:nth-child(even) td,
.boardgrade-table .excel-row-data:hover td {
  color: #111827;
  background: var(--cell-fill, white) !important;
}
.boardgrade-table .excel-row-title td,
.boardgrade-table .excel-row-section td,
.boardgrade-table .excel-row-header td {
  font-weight: 800;
}
.boardgrade-table .excel-row-data:hover td {
  box-shadow: inset 0 1px 0 #efb538, inset 0 -1px 0 #efb538;
}
.empty-module-result {
  margin: 0;
  padding: 18px;
  color: var(--red-600);
  background: #fff4f2;
  border: 1px solid #f0c3bd;
  font-weight: 700;
}

.tir-table {
  width: 100%;
  min-width: 720px;
  font-size: 14px;
}
.tir-table td {
  min-width: 112px;
  padding: 9px 12px;
  text-align: center;
}
.tir-table .excel-row-data td:first-child { color: var(--navy-900); font-weight: 700; }

.fefco-intro {
  margin-bottom: 18px;
  padding: 22px 24px;
  background: var(--blue-050);
  border-top: 5px solid var(--navy-900);
}
.fefco-intro h3 { margin: 0 0 8px; color: var(--navy-900); font-size: 25px; }
.fefco-intro p { margin: 7px 0; }
.fefco-custom { color: var(--navy-900); font-weight: 700; }
.fefco-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: visible;
}
.fefco-tabs button {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.fefco-tabs button strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: white;
  background: var(--navy-900);
}
.fefco-tabs button[aria-selected="true"] strong { color: var(--navy-900); background: white; }
.fefco-tabs button span { line-height: 1.2; }
.fefco-panel {
  margin-top: 8px;
  padding: clamp(18px, 3vw, 32px);
  background: #f9fafc;
  border: 1px solid #bec7d9;
}
.fefco-group-head > span {
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.fefco-group-head h3 {
  margin: 5px 0 2px;
  color: var(--navy-900);
  font-size: clamp(24px, 3vw, 34px);
}
.fefco-group-head strong { color: var(--muted); font-size: 15px; }
.fefco-group-head p { max-width: 92ch; margin: 13px 0 0; }
.fefco-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 18px 0;
  padding: 12px 15px;
  background: white;
  border-left: 4px solid var(--gold-500);
  font-size: 13px;
}
.fefco-legend b { color: var(--navy-900); }
.fefco-codes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 16px 0 22px;
}
.fefco-codes > strong { margin-right: 5px; color: var(--navy-900); }
.fefco-codes span {
  padding: 4px 8px;
  color: var(--navy-900);
  background: white;
  border: 1px solid #c0c8d8;
  font-family: Consolas, monospace;
  font-size: 12px;
}
.fefco-codes span.code-match {
  color: var(--navy-950);
  background: #ffe5a8;
  border-color: var(--gold-500);
  font-weight: 800;
}
.fefco-pages { display: grid; grid-template-columns: 1fr; gap: 22px; }
.fefco-page {
  margin: 0;
  padding: 12px;
  background: white;
  border: 1px solid #c4ccda;
}
.fefco-page button { display: block; width: 100%; padding: 0; border: 0; background: white; cursor: zoom-in; }
.fefco-page img { display: block; width: 100%; height: auto; }
.fefco-page figcaption { padding: 10px 2px 0; color: var(--muted); font-size: 12px; text-align: center; }
.fefco-note {
  margin: 20px 0 0;
  padding: 13px 15px;
  color: var(--navy-900);
  background: var(--blue-100);
  border-left: 4px solid var(--navy-900);
  font-weight: 700;
}

.page-footer {
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 18px auto 0;
  padding: 24px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.page-footer a { color: var(--blue-700); font-weight: 700; }

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 35;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  color: white;
  background: var(--navy-900);
  border: 0;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: opacity .18s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top svg { width: 22px; height: 22px; }

.lightbox {
  width: min(96vw, 1500px);
  height: min(94vh, 1100px);
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #101820;
  box-shadow: 0 28px 80px rgba(0,0,0,.55);
}
.lightbox::backdrop { background: rgba(4,14,28,.8); }
.lightbox-bar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px 0 20px;
  color: white;
  background: var(--navy-950);
}
.lightbox-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-actions { display: flex; gap: 5px; }
.lightbox-canvas {
  height: calc(100% - 58px);
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 24px;
}
.lightbox-canvas img {
  display: block;
  max-width: none;
  background: white;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  transform-origin: center center;
}

.menu-scrim {
  position: fixed;
  z-index: 35;
  inset: var(--topbar-height) 0 0;
  background: rgba(5,18,37,.58);
}

.no-results { display: none; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 284px; }
  .search-box { width: 280px; }
  .hero { grid-template-columns: 1fr 235px; }
  .checklist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .topbar { padding: 0 14px; }
  .menu-button { display: inline-grid; }
  .topbar .search-box { display: none; }
  .mobile-search-wrap {
    position: sticky;
    z-index: 30;
    top: var(--topbar-height);
    display: block;
    padding: 10px 14px;
    background: #dfe7ed;
    border-bottom: 1px solid #c8d2db;
  }
  .mobile-search { width: 100%; }
  .app-shell { display: block; padding-top: var(--topbar-height); }
  .sidebar {
    top: var(--topbar-height);
    width: min(88vw, 340px);
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 20px 0 40px rgba(0,0,0,.18);
  }
  .sidebar.open { transform: translateX(0); }
  .close-menu { display: inline-grid; }
  main { padding: 24px 16px 50px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .cover-card { justify-self: start; width: min(280px, 76%); }
  .document-gallery { grid-template-columns: 1fr; }
  .fefco-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .brand small { display: none; }
  .brand strong { font-size: 13px; }
  .brand-mark { width: 28px; }
  .brand-logo { width: 142px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions > .icon-button { display: none; }
  .language-switch button { min-width: 40px; }
  .hero { padding: 34px 24px; }
  .hero h1 { font-size: 40px; }
  .chapter-banner { min-height: 160px; padding: 28px 22px; }
  .chapter-number { margin-right: 15px; font-size: 58px; }
  .chapter-body { padding: 26px 18px; }
  .checklist-grid { grid-template-columns: 1fr; }
  .equipment-card dl { grid-template-columns: 1fr; }
  .equipment-card dd { border-top: 0; }
  .manual-table { min-width: 580px; font-size: 13px; }
  .page-footer { flex-direction: column; }
  .module-toolbar { align-items: stretch; flex-direction: column; }
  .module-result { min-width: 0; text-align: left; }
  .fefco-tabs { grid-template-columns: 1fr; }
  .sheet-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media print {
  :root { --topbar-height: 0px; }
  body { background: white; }
  .topbar, .mobile-search-wrap, .sidebar, .back-to-top, .menu-scrim, .search-status, .page-footer { display: none !important; }
  .app-shell { display: block; padding: 0; }
  main { padding: 0; }
  .hero, .chapter { box-shadow: none; }
  .hero { min-height: 95vh; break-after: page; }
  .chapter { break-before: page; }
  .chapter-body { padding: 26px 0; }
  .document-gallery { grid-template-columns: 1fr; }
  .document-page { break-inside: avoid; }
  .figure, .table-wrap, .equipment-card, .quote-card { break-inside: avoid; }
  .lightbox { display: none; }
}
