:root {
  --manual-navy: #083f76;
  --manual-blue: #0d6cb8;
  --manual-cyan: #38bdf8;
  --manual-ink: #172033;
  --manual-muted: #58677c;
  --manual-line: #d8e3ef;
  --manual-wash: #f4f8fc;
}

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

.manual-hero {
  color: #fff;
  background:
    radial-gradient(circle at 82% 12%, rgba(56, 189, 248, 0.28), transparent 26rem),
    linear-gradient(135deg, #062f5a 0%, #0b4f8a 58%, #0d6cb8 100%);
}

.manual-hero__inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 44px;
  align-items: end;
}

.manual-hero .eyebrow {
  color: #7dd3fc;
}

.manual-hero h1 {
  max-width: 820px;
  margin: 8px 0 18px;
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.manual-hero__intro {
  max-width: 780px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.manual-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.manual-meta span {
  padding: 7px 11px;
  border: 1px solid rgba(191, 219, 254, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e0f2fe;
  font-size: 0.78rem;
  font-weight: 800;
}

.manual-hero__actions {
  min-width: 210px;
  display: grid;
  gap: 10px;
}

.manual-hero__actions .button {
  justify-content: center;
  text-align: center;
}

.button--ghost {
  border-color: rgba(255, 255, 255, 0.55) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.button--ghost:hover,
.button--ghost:focus-visible {
  border-color: #fff !important;
  background: rgba(255, 255, 255, 0.16) !important;
}

.manual-search-wrap {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 40px));
  margin: -28px auto 0;
}

.manual-search-card {
  padding: 18px 20px 15px;
  border: 1px solid var(--manual-line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(8, 63, 118, 0.14);
}

.manual-search-card > label {
  display: block;
  margin-bottom: 8px;
  color: var(--manual-ink);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.manual-search-control {
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  border: 2px solid #bcd0e3;
  border-radius: 12px;
  background: #fafdff;
}

.manual-search-control:focus-within {
  border-color: var(--manual-blue);
  box-shadow: 0 0 0 4px rgba(13, 108, 184, 0.13);
}

.manual-search-control svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #55718c;
  stroke-linecap: round;
  stroke-width: 1.9;
}

.manual-search-control input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--manual-ink);
  font: inherit;
  font-size: 1rem;
}

.manual-search-control button {
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: #e6f1fb;
  color: var(--manual-navy);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.manual-search-status {
  margin: 8px 2px 0;
  color: var(--manual-muted);
  font-size: 0.78rem;
}

.manual-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 42px auto 90px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.manual-toc {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--manual-line);
  border-radius: 15px;
  background: #fff;
}

.manual-toc__title {
  margin: 0 0 10px;
  color: var(--manual-ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manual-toc nav {
  display: grid;
  gap: 2px;
}

.manual-toc a {
  padding: 7px 9px;
  border-radius: 7px;
  color: #42556b;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.28;
  text-decoration: none;
}

.manual-toc a:hover,
.manual-toc a:focus-visible,
.manual-toc a.is-active {
  background: #e8f3fc;
  color: var(--manual-navy);
}

.manual-toc a.is-active {
  box-shadow: inset 3px 0 0 var(--manual-blue);
}

.manual-article {
  min-width: 0;
}

.manual-section {
  margin: 0 0 28px;
  padding: 38px;
  border: 1px solid var(--manual-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 11px 30px rgba(44, 67, 92, 0.06);
}

.manual-section[hidden] {
  display: none;
}

.manual-section__heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.manual-section__heading .eyebrow {
  margin: 0 0 4px;
}

.manual-section__heading h2 {
  margin: 0;
  color: var(--manual-ink);
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.08;
}

.manual-number {
  min-width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--manual-navy), var(--manual-blue));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(8, 63, 118, 0.2);
}

.manual-section h3 {
  margin: 30px 0 10px;
  color: #153a5c;
  font-size: 1.16rem;
  line-height: 1.3;
}

.manual-section > h3:first-of-type {
  margin-top: 20px;
}

.manual-section p,
.manual-section li,
.manual-section dd {
  color: #3d4b5d;
  line-height: 1.72;
}

.manual-section p {
  margin: 0 0 16px;
}

.manual-section ul,
.manual-section ol {
  margin: 12px 0 20px;
  padding-left: 1.4rem;
}

.manual-section li + li {
  margin-top: 8px;
}

.manual-section code {
  padding: 2px 6px;
  border: 1px solid #d7e3ee;
  border-radius: 6px;
  background: #f2f6fa;
  color: #123e65;
  font-size: 0.9em;
}

.manual-section kbd {
  display: inline-block;
  min-width: 1.7em;
  margin: 0 1px;
  padding: 2px 6px;
  border: 1px solid #b8c7d6;
  border-bottom-width: 3px;
  border-radius: 5px;
  background: #f8fafc;
  color: #21364b;
  font: 700 0.78em/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
  white-space: nowrap;
}

.ui-label {
  color: #123f69;
  font-weight: 850;
}

.manual-steps {
  margin: 24px 0;
  padding: 22px 24px 7px;
  border-radius: 15px;
  background: var(--manual-wash);
}

.manual-steps h3 {
  margin-top: 0;
}

.manual-callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--manual-blue);
  border-radius: 0 12px 12px 0;
  background: #eaf5fe;
}

.manual-callout strong {
  color: #0b4576;
}

.manual-callout p {
  margin: 5px 0 0;
  color: #31526e;
}

.manual-callout--important {
  border-left-color: #f59e0b;
  background: #fff8e7;
}

.manual-callout--important strong,
.manual-callout--important p {
  color: #6f4811;
}

.manual-callout--warning {
  border-left-color: #dc2626;
  background: #fff0f0;
}

.manual-callout--warning strong,
.manual-callout--warning p {
  color: #7e2424;
}

.manual-tip {
  margin: 22px 0 0 !important;
  padding: 14px 16px;
  border-radius: 10px;
  background: #eef8f2;
  color: #245a3a !important;
}

.manual-table-wrap {
  margin: 16px 0 26px;
  overflow-x: auto;
  border: 1px solid var(--manual-line);
  border-radius: 12px;
}

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

.manual-table-wrap th,
.manual-table-wrap td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--manual-line);
  color: #3d4b5d;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.manual-table-wrap th {
  background: #edf5fb;
  color: #163f62;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.manual-table-wrap tr:last-child td {
  border-bottom: 0;
}

.manual-definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.manual-definition-grid > div {
  padding: 16px;
  border: 1px solid var(--manual-line);
  border-radius: 12px;
  background: #fbfdff;
}

.manual-definition-grid dt {
  margin-bottom: 4px;
  color: #133f66;
  font-weight: 900;
}

.manual-definition-grid dd {
  margin: 0;
  font-size: 0.9rem;
}

.manual-diagram {
  margin: 24px 0;
  display: grid;
  gap: 6px;
  color: #163f62;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.manual-diagram > div {
  padding: 10px;
  border: 1px solid #a9c7df;
  border-radius: 8px;
  background: #eaf4fb;
}

.manual-diagram__body {
  min-height: 150px;
  display: grid;
  grid-template-columns: 112px 82px minmax(170px, 1fr) 112px;
  gap: 6px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.manual-diagram__body > div {
  display: grid;
  place-items: center;
  padding: 12px 6px;
  border: 1px solid #bfd3e5;
  border-radius: 8px;
  background: #f4f8fc;
}

.manual-diagram__canvas {
  color: #fff;
  background: linear-gradient(145deg, #0c5c9d, #0d78bc) !important;
}

.manual-troubleshooting {
  display: grid;
  gap: 10px;
}

.manual-troubleshooting details {
  border: 1px solid var(--manual-line);
  border-radius: 11px;
  background: #fbfdff;
}

.manual-troubleshooting summary {
  padding: 15px 18px;
  color: #153f63;
  font-weight: 900;
  cursor: pointer;
}

.manual-troubleshooting details p {
  margin: 0;
  padding: 0 18px 17px;
}

.manual-no-results {
  padding: 30px;
  border: 1px solid #f3c7c7;
  border-radius: 14px;
  background: #fff2f2;
  color: #7e2424;
  text-align: center;
}

.manual-end {
  margin-top: 34px;
  padding: 26px;
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  background: linear-gradient(135deg, #062f5a, #0d6cb8);
}

.manual-end h3,
.manual-end p {
  color: #fff;
}

.manual-end h3 {
  margin: 3px 0 6px;
}

.manual-end p {
  margin: 0;
}

.manual-end .eyebrow {
  color: #7dd3fc;
}

@media (max-width: 920px) {
  .manual-hero__inner {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }

  .manual-hero__actions {
    width: min(340px, 100%);
  }

  .manual-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .manual-toc {
    position: static;
    max-height: none;
  }

  .manual-toc nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .manual-hero__inner,
  .manual-search-wrap,
  .manual-layout {
    width: min(100% - 24px, 1180px);
  }

  .manual-hero__inner {
    padding: 52px 0 58px;
  }

  .manual-section {
    padding: 25px 19px;
    border-radius: 15px;
  }

  .manual-section__heading {
    gap: 12px;
  }

  .manual-number {
    min-width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .manual-toc nav,
  .manual-definition-grid {
    grid-template-columns: 1fr;
  }

  .manual-diagram__body {
    min-height: 240px;
    grid-template-columns: 70px 52px minmax(110px, 1fr) 70px;
    font-size: 0.64rem;
  }

  .manual-search-control {
    grid-template-columns: 21px minmax(0, 1fr);
  }

  .manual-search-control button {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }

  .manual-end {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .site-header,
  .site-footer,
  .manual-hero__actions,
  .manual-search-wrap,
  .manual-toc,
  .manual-end .button {
    display: none !important;
  }

  .manual-hero {
    color: #000;
    background: #fff;
  }

  .manual-hero__inner,
  .manual-layout {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
  }

  .manual-hero h1,
  .manual-hero__intro,
  .manual-meta span {
    color: #000;
  }

  .manual-hero {
    margin-bottom: 24px;
  }

  .manual-section {
    margin: 0;
    padding: 20px 0;
    border: 0;
    box-shadow: none;
    break-inside: avoid-page;
  }
}
