:root {
  --ink: #17211d;
  --muted: #5d6862;
  --line: #d9dfdb;
  --paper: #f4f1e9;
  --white: #ffffff;
  --accent: #b3542d;
  --accent-dark: #7e331b;
  --green: #26483b;
  --blue: #345c72;
  --soft: #e8ece8;
  --shadow: 0 22px 58px rgba(23, 33, 29, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(244, 241, 233, 0.9), rgba(244, 241, 233, 0.96)),
    url("assets/photos/chain-closeup.jpg") center top / 1100px auto fixed;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

main img {
  cursor: zoom-in;
}

.doc-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  color: var(--white);
  background: rgba(18, 27, 23, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--green);
  background: var(--white);
  border-radius: 4px;
}

.nav {
  gap: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  min-width: 0;
}

.nav a:hover {
  color: var(--white);
}

.doc-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 5vw, 62px);
  align-items: center;
  min-height: 76vh;
  padding: 86px clamp(20px, 6vw, 84px) 58px;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(13, 19, 16, 0.9), rgba(13, 19, 16, 0.48)),
    url("assets/photos/repair-stand.jpg") center / cover;
}

.doc-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(244, 241, 233, 0), var(--paper));
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.doc-hero .eyebrow {
  color: #f1b38c;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.hero-text p:not(.eyebrow),
.guide li,
.table-wrap,
.notice,
.credits p,
.legal p {
  color: var(--muted);
  font-size: 18px;
}

.doc-hero .hero-text p:not(.eyebrow) {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-links a {
  padding: 10px 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-links a:hover {
  background: rgba(179, 84, 45, 0.86);
  border-color: rgba(255, 255, 255, 0.38);
}

.hero-card,
.media-card {
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  z-index: 1;
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-card img {
  min-height: 420px;
}

figcaption {
  padding: 12px 14px;
  color: var(--muted);
  background: var(--white);
  font-size: 14px;
}

.notice {
  display: flex;
  gap: 12px;
  margin: 0 clamp(20px, 6vw, 84px);
  padding: 18px 20px;
  position: relative;
  z-index: 2;
  background: #fff7ed;
  border: 1px solid #f2cfb7;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.notice strong {
  color: var(--accent-dark);
}

.section {
  padding: 76px clamp(20px, 6vw, 84px);
  background: rgba(244, 241, 233, 0.92);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.9);
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--ink);
  background: var(--soft);
}

tr:last-child td {
  border-bottom: 0;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 0.9fr);
  gap: clamp(24px, 5vw, 60px);
  align-items: start;
}

.two-col.reverse {
  grid-template-columns: minmax(300px, 0.9fr) minmax(300px, 1fr);
}

.guide {
  max-width: 780px;
}

.guide ol {
  display: grid;
  gap: 12px;
  padding-left: 24px;
  margin: 0;
}

.guide li {
  padding-left: 6px;
}

.media-card img {
  min-height: 360px;
}

.media-card,
.example-grid article,
.tool-grid article,
.checklist li,
.maintenance-grid article {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.media-card:hover,
.example-grid article:hover,
.tool-grid article:hover,
.checklist li:hover,
.maintenance-grid article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.example-grid article,
.tool-grid article {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.example-grid img {
  height: 230px;
}

.image-lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(10, 15, 13, 0.9);
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox img {
  width: auto;
  max-width: min(1100px, 94vw);
  height: auto;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  cursor: zoom-out;
}

.image-lightbox button {
  position: fixed;
  top: 14px;
  right: 16px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.no-scroll {
  overflow: hidden;
}

.stacked-photos {
  display: grid;
  gap: 16px;
}

.stacked-photos .media-card img {
  min-height: 300px;
  height: 340px;
}

.example-grid h3,
.example-grid p {
  padding: 0 18px;
}

.example-grid h3 {
  margin-top: 18px;
}

.example-grid p {
  margin-bottom: 20px;
  color: var(--muted);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-grid article {
  min-height: 170px;
  padding: 22px;
}

.tool-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.wide-photo {
  margin: 18px 0 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.wide-photo img {
  height: min(420px, 45vw);
  min-height: 260px;
}

.checklist {
  background:
    linear-gradient(rgba(232, 236, 232, 0.92), rgba(232, 236, 232, 0.94)),
    url("assets/photos/puncture-repair-kit.jpg") center / cover;
}

.checklist ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.checklist li {
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.credits {
  padding: 42px clamp(20px, 6vw, 84px);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
}

.maintenance {
  background: var(--white);
}

.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.maintenance-grid article {
  min-height: 170px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.maintenance-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 18px;
}

.maintenance-grid span {
  color: var(--muted);
}

.credits h2 {
  font-size: 24px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(20px, 6vw, 84px);
  color: var(--white);
  background: #121b17;
  font-size: 14px;
}

.plain-page {
  background: var(--white);
}

.plain-page .doc-header {
  position: static;
}

.legal {
  max-width: 880px;
  padding: 72px clamp(20px, 6vw, 84px);
}

.legal h1 {
  color: var(--ink);
  font-size: clamp(36px, 5vw, 58px);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 4px;
  color: var(--white);
  background: var(--accent);
  font-weight: 700;
}

.button:hover {
  background: var(--accent-dark);
}

@media (max-width: 960px) {
  .doc-header {
    gap: 12px;
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    gap: 10px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  .nav a {
    display: inline-flex;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
  }

  .doc-hero,
  .two-col,
  .two-col.reverse,
  .example-grid,
  .checklist ul,
  .tool-grid,
  .maintenance-grid {
    grid-template-columns: 1fr;
  }

  .hero-card img,
  .media-card img {
    min-height: 300px;
  }

  .doc-hero {
    min-height: auto;
    padding-top: 48px;
  }

  table {
    min-width: 640px;
  }
}

@media (max-width: 560px) {
  body {
    background:
      linear-gradient(rgba(244, 241, 233, 0.95), rgba(244, 241, 233, 0.98)),
      url("assets/photos/chain-closeup.jpg") center top / 780px auto;
  }

  .doc-header {
    padding: 14px 18px;
    max-width: 100vw;
  }

  .doc-hero,
  .section {
    max-width: 100vw;
    padding-right: 20px;
    padding-left: 20px;
  }

  .doc-hero {
    gap: 20px;
    padding-top: 38px;
    padding-bottom: 44px;
  }

  h1 {
    font-size: 36px;
    line-height: 1.04;
  }

  h2 {
    font-size: 29px;
  }

  .doc-hero .hero-text p:not(.eyebrow),
  .hero-text p:not(.eyebrow),
  .guide li,
  .table-wrap,
  .notice,
  .credits p,
  .legal p {
    font-size: 16px;
  }

  .hero-links {
    max-width: calc(100vw - 40px);
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .hero-links a {
    flex: 0 0 auto;
  }

  .notice {
    flex-direction: column;
    margin-right: 20px;
    margin-left: 20px;
  }

  .footer {
    flex-direction: column;
  }

  .hero-card img,
  .media-card img,
  .example-grid img,
  .wide-photo img {
    min-height: 220px;
    height: 240px;
  }

  .stacked-photos .media-card img {
    min-height: 220px;
    height: 260px;
  }

  th,
  td {
    padding: 13px 14px;
  }

  .table-wrap {
    margin-right: -20px;
    margin-left: -20px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  table {
    min-width: 560px;
  }

  .image-lightbox {
    padding: 12px;
  }

  .image-lightbox img {
    max-width: 96vw;
    max-height: 82vh;
  }
}
