:root {
  --ink: #172027;
  --muted: #5a6872;
  --line: #d9e0e5;
  --paper: #f7f9fa;
  --white: #ffffff;
  --steel: #31485a;
  --teal: #0f766e;
  --blue: #1d4f91;
  --amber: #b7791f;
  --green: #52794b;
  --shadow: 0 18px 45px rgba(31, 43, 55, 0.12);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

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

a {
  color: var(--blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: var(--white);
  padding: 0.65rem 0.85rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(247, 249, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  font-size: 1.25rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.94rem;
}

.nav-menu a {
  color: var(--steel);
  text-decoration: none;
  font-weight: 650;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: var(--teal);
}

.hero {
  min-height: 78vh;
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  background: #111b22;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(11, 19, 24, 0.88), rgba(11, 19, 24, 0.58) 42%, rgba(11, 19, 24, 0.2)),
    url("hydraulic-hero.png");
  background-size: cover;
  background-position: center;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 7rem 0 5rem;
  color: var(--white);
}

.hero-kicker,
.eyebrow {
  color: #d7b16d;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  width: min(760px, 100%);
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.45rem, 6vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  width: min(680px, 100%);
  margin: 0;
  color: #edf3f4;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 0.95rem;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
}

.button {
  background: var(--teal);
  color: var(--white);
}

.button:hover {
  background: #0b5f59;
  color: var(--white);
}

.text-button {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.text-button:hover {
  border-color: var(--white);
  color: var(--white);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4rem 0;
}

.section-tight {
  padding-top: 2.5rem;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}

.section-header h2,
.content h2,
.page-hero h1,
.article h1 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
}

.section-header p,
.page-hero p,
.article-lede,
.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: 0 1px 0 rgba(31, 43, 55, 0.03);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card .meta {
  margin-top: 0.85rem;
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link:hover h3 {
  color: var(--teal);
}

.topic-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.topic-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: #eaf4f2;
  color: var(--teal);
  font-weight: 900;
}

.page-hero {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.page-hero--image {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  align-items: end;
  background: #172027;
  color: var(--white);
  border-bottom: 0;
}

.page-hero--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(14, 26, 33, 0.9), rgba(14, 26, 33, 0.68) 45%, rgba(14, 26, 33, 0.22)),
    var(--page-hero-image);
  background-position: center;
  background-size: cover;
}

.page-hero-inner {
  position: relative;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4.5rem 0 3rem;
}

.page-hero--image .page-hero-inner {
  padding-top: 6rem;
  padding-bottom: 4.25rem;
}

.page-hero h1,
.article h1 {
  font-size: clamp(2.15rem, 4.4vw, 4rem);
}

.page-hero--image h1 {
  color: var(--white);
}

.page-hero--image p {
  color: #e6eef1;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--teal);
}

.page-hero--image .breadcrumbs,
.page-hero--image .breadcrumbs a {
  color: #d8e6eb;
}

.page-hero--image .breadcrumbs a:hover {
  color: var(--white);
}

.layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 3rem 0 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: start;
}

.content,
.article {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2.2rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.article-lede {
  font-size: 1.16rem;
  border-left: 4px solid var(--teal);
  padding-left: 1rem;
}

.article section + section {
  margin-top: 2rem;
}

.article h2 {
  font-size: 1.65rem;
  margin-bottom: 0.65rem;
}

.article h3 {
  font-size: 1.12rem;
  margin: 1.15rem 0 0.35rem;
}

.article ul,
.article ol {
  padding-left: 1.2rem;
}

.article li + li {
  margin-top: 0.35rem;
}

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

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

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

th {
  background: #eef3f4;
  color: var(--steel);
}

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

.diagram {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 0.6rem;
  align-items: stretch;
  margin: 1.2rem 0;
}

.diagram span {
  min-height: 78px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.75rem;
  background: #edf6f4;
  border: 1px solid #c5ddd8;
  border-radius: var(--radius);
  color: #164e48;
  font-weight: 800;
}

.sidebar {
  min-width: 0;
  position: sticky;
  top: 92px;
  display: grid;
  gap: 1rem;
}

.sidebar h2,
.sidebar h3 {
  margin-top: 0;
}

.toc a,
.link-list a {
  display: block;
  padding: 0.42rem 0;
  color: var(--steel);
  text-decoration: none;
}

.toc a:hover,
.link-list a:hover {
  color: var(--teal);
}

.search-box {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: var(--white);
}

.cta-band {
  background: #172027;
  color: var(--white);
}

.cta-band .section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
}

.cta-band h2 {
  margin: 0 0 0.4rem;
}

.cta-band p {
  margin: 0;
  color: #dce6ea;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.footer-inner a {
  color: var(--steel);
  text-decoration: none;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.badge-list li {
  border: 1px solid var(--line);
  background: #f8fafb;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: var(--steel);
  font-size: 0.9rem;
}

.note {
  background: #fff8eb;
  border: 1px solid #ead5ad;
  border-radius: var(--radius);
  padding: 1rem;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.85rem;
    box-shadow: var(--shadow);
  }

  .nav-menu[data-open] {
    display: grid;
  }

  .grid-3,
  .grid-4,
  .layout,
  .cta-band .section {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .diagram {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 72vh;
  }

  .hero-inner {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }

  .section,
  .layout {
    width: min(100% - 24px, 1180px);
  }

  .card,
  .content,
  .article {
    padding: 1rem;
  }
}
