.page-products {
  --p-rail: 236px;
  --p-gap: clamp(22px, 3.4vw, 48px);
  --p-line: rgba(30, 44, 85, 0.85);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

.page-products .p-hero {
  position: relative;
  background:
    radial-gradient(120% 88% at 84% 8%, rgba(44, 229, 216, 0.14), transparent 58%),
    radial-gradient(90% 70% at 8% 96%, rgba(79, 139, 98, 0.16), transparent 62%),
    linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 100%);
  border-bottom: 1px solid var(--grid);
}

.page-products .p-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(30, 44, 85, 0.5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 44, 85, 0.5) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.5;
  pointer-events: none;
}

.page-products .p-hero__inner {
  position: relative;
  display: grid;
  gap: clamp(30px, 5vw, 56px);
  padding-block: clamp(40px, 7vw, 92px);
}

.page-products .p-hero__lead {
  min-width: 0;
}

.page-products .p-hero__text {
  margin: clamp(18px, 2.4vw, 26px) 0 0;
  max-width: 46ch;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.85;
  color: var(--cream);
}

.page-products .p-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 32px);
}

.page-products .p-hero__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: clamp(28px, 4vw, 42px) 0 0;
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--p-line);
}

.page-products .p-fact {
  min-width: 0;
  padding-left: 12px;
  border-left: 2px solid var(--turf);
}

.page-products .p-fact dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

.page-products .p-fact dd {
  margin: 6px 0 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.page-products .p-num {
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--amber);
}

.page-products .p-fact dd small {
  font-size: 12px;
  color: var(--stone);
}

.page-products .p-hero__figure {
  margin: 0;
}

/* ---------- .page-products grid ---------- */

.page-products .p-body {
  display: grid;
  gap: clamp(26px, 4vw, 48px);
  padding-top: clamp(32px, 5vw, 68px);
}

.page-products .p-flow {
  min-width: 0;
}

/* ---------- timeline rail ---------- */

.page-products .p-timeline {
  position: relative;
  border: 1px solid var(--grid);
  border-radius: var(--r-lg);
  padding: 16px 16px 18px;
  background: linear-gradient(180deg, rgba(30, 44, 85, 0.4), rgba(7, 12, 31, 0.72));
}

.page-products .p-timeline__label {
  margin: 0;
  color: var(--turf);
  letter-spacing: 0.16em;
}

.page-products .p-timeline__list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0 0 4px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.page-products .p-timeline__item {
  flex: 0 0 auto;
  min-width: 150px;
  scroll-snap-align: start;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  background: rgba(11, 18, 48, 0.7);
}

.page-products .p-timeline__item.is-current {
  border-color: rgba(44, 229, 216, 0.6);
  background: rgba(44, 229, 216, 0.08);
}

.page-products .p-timeline__code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.page-products .p-timeline__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--cream);
}

.page-products .p-timeline__note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--stone);
}

/* ---------- sections ---------- */

.page-products .p-sec {
  padding-block: clamp(34px, 5.4vw, 70px);
  border-top: 1px solid var(--p-line);
}

.page-products .p-sec:first-child {
  border-top: 0;
  padding-top: 0;
}

.page-products .p-sec__title {
  margin: 8px 0 0;
  font-size: clamp(23px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--cream);
  max-width: 24ch;
}

.page-products .p-sec__lead {
  margin: clamp(16px, 2vw, 22px) 0 0;
  max-width: 60ch;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--cream);
}

.page-products .p-scan li strong,
.page-products .p-note--strong {
  color: var(--cyan);
}

.page-products .p-note {
  margin: clamp(16px, 2vw, 22px) 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--turf);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--stone);
  max-width: 58ch;
}

/* ---------- wireframe svg ---------- */

.page-products .p-wire {
  display: block;
  width: 100%;
  height: auto;
  max-width: 640px;
  margin: clamp(22px, 3vw, 32px) 0 0;
}

/* ---------- three columns ---------- */

.page-products .p-cols {
  display: grid;
  gap: 14px;
  margin-top: clamp(20px, 3vw, 30px);
}

.page-products .p-col {
  padding: 20px 20px 22px;
  min-width: 0;
}

.page-products .p-col h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--cream);
}

.page-products .p-col p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--stone);
}

.page-products .p-code-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.page-products .p-code {
  position: relative;
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--cyan);
  border: 1px solid rgba(44, 229, 216, 0.42);
  border-radius: var(--r-sm);
  cursor: help;
  outline-offset: 3px;
}

.page-products .p-code__tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 6;
  width: max-content;
  max-width: 230px;
  padding: 8px 10px;
  background: var(--ink-deep);
  border: 1px solid var(--cyan);
  border-radius: var(--r-sm);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 12.5px;
  letter-spacing: 0;
  line-height: 1.55;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
  pointer-events: none;
}

.page-products .p-code:hover .p-code__tip,
.page-products .p-code:focus .p-code__tip,
.page-products .p-code:focus-visible .p-code__tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.page-products .p-scan {
  list-style: none;
  margin: clamp(20px, 3vw, 30px) 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.page-products .p-scan li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--stone);
}

.page-products .p-scan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 2px;
  background: var(--cyan);
}

/* ---------- steps ---------- */

.page-products .p-steps {
  list-style: none;
  margin: clamp(20px, 3vw, 30px) 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.page-products .p-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  background: rgba(7, 12, 31, 0.55);
}

.page-products .p-step__num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--cyan);
}

.page-products .p-step h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--cream);
}

.page-products .p-step p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--stone);
}

.page-products .p-switch__figure {
  margin: clamp(24px, 3.4vw, 36px) 0 0;
}

/* ---------- quote ---------- */

.page-products .p-quote {
  margin: clamp(38px, 6vw, 84px) 0;
  padding: 6px 0 6px clamp(18px, 3vw, 34px);
  border-left: 3px solid var(--cyan);
  max-width: 34ch;
  font-size: clamp(19px, 2.5vw, 28px);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--cream);
}

/* ---------- V4 nav layers ---------- */

.page-products .p-nav4 {
  list-style: none;
  margin: clamp(22px, 3vw, 32px) 0 0;
  padding: 0;
}

.page-products .p-nav4 li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--p-line);
}

.page-products .p-nav4 li:first-child {
  border-top: 1px solid var(--p-line);
}

.page-products .p-nav4__code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--clay);
  padding-top: 3px;
}

.page-products .p-nav4 h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--cream);
}

.page-products .p-nav4 p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--stone);
  max-width: 56ch;
}

.page-products .p-entry {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-top: clamp(24px, 3vw, 34px);
  padding: 20px 20px 22px;
  border: 1px solid rgba(44, 229, 216, 0.35);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(44, 229, 216, 0.1), rgba(7, 12, 31, 0.4) 62%);
}

.page-products .p-entry p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--stone);
  max-width: 54ch;
}

.page-products .p-v4__figure {
  margin: clamp(24px, 3.4vw, 36px) 0 0;
}

/* ---------- split ---------- */

.page-products .p-split {
  display: grid;
  gap: clamp(20px, 3vw, 34px);
  margin-top: clamp(22px, 3vw, 32px);
}

.page-products .p-mobile__figure {
  margin: 0;
  max-width: 340px;
}

.page-products .p-split__body h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--cream);
}

.page-products .p-diffs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.page-products .p-diffs li {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--p-line);
}

.page-products .p-diffs__k {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.page-products .p-diffs__v {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--cream);
}

/* ---------- table ---------- */

.page-products .p-table-wrap {
  margin-top: clamp(22px, 3vw, 32px);
  border: 1px solid var(--grid);
  border-radius: var(--r-md);
  overflow: hidden;
}

.page-products .p-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.page-products .p-table__caption {
  caption-side: top;
  text-align: left;
  padding: 14px 16px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.page-products .p-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.page-products .p-table,
.page-products .p-table tbody,
.page-products .p-table tr,
.page-products .p-table td {
  display: block;
  width: 100%;
}

.page-products .p-table tr {
  padding: 8px 0 12px;
  border-top: 1px solid var(--p-line);
  background: rgba(7, 12, 31, 0.42);
}

.page-products .p-table tbody tr:nth-child(even) {
  background: rgba(79, 139, 98, 0.12);
}

.page-products .p-table td {
  padding: 7px 16px;
  color: var(--cream);
  line-height: 1.7;
}

.page-products .p-table td::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.page-products .p-table td:first-child {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--amber);
}

.page-products .p-table td:first-child::before {
  content: none;
}

/* ---------- filters ---------- */

.page-products .p-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(22px, 3vw, 30px);
}

.page-products .p-vers__title {
  margin: clamp(28px, 4vw, 44px) 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--cream);
}

/* ---------- version cards ---------- */

.page-products .p-vers {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.page-products .p-ver {
  padding: 20px;
  min-width: 0;
  border-left: 3px solid var(--clay);
}

.page-products .p-ver__code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--clay);
}

.page-products .p-ver h4 {
  margin: 8px 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--cream);
}

.page-products .p-ver p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--stone);
}

.page-products .p-vers__figure {
  margin: clamp(26px, 3.6vw, 40px) 0 0;
}

/* ---------- scenes ---------- */

.page-products .p-scenes {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.page-products .p-scene {
  padding: 20px;
  min-width: 0;
}

.page-products .p-scene h3 {
  margin: 12px 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--cream);
}

.page-products .p-scene p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--stone);
}

/* ---------- next ---------- */

.page-products .p-next {
  margin-top: clamp(38px, 6vw, 78px);
  padding-top: clamp(30px, 4vw, 52px);
  border-top: 1px solid var(--grid);
}

.page-products .p-next__grid {
  display: grid;
  gap: 12px;
  margin-top: clamp(18px, 2.6vw, 26px);
}

.page-products .p-next__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  padding: 18px 20px;
  border: 1px solid var(--p-line);
  border-radius: var(--r-md);
  background: rgba(7, 12, 31, 0.5);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.page-products .p-next__item:hover,
.page-products .p-next__item:focus-visible {
  border-color: var(--cyan);
  background: rgba(44, 229, 216, 0.08);
  transform: translateX(3px);
}

.page-products .p-next__code {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--stone);
}

.page-products .p-next__name {
  grid-column: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--cream);
}

.page-products .p-next__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--cyan);
}

/* ---------- responsive ---------- */

@media (min-width: 700px) {
  .page-products .p-hero__facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .page-products .p-diffs li {
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: baseline;
    gap: 18px;
  }

  .page-products .p-table-wrap {
    overflow-x: auto;
  }

  .page-products .p-table {
    display: table;
    min-width: 660px;
  }

  .page-products .p-table thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    display: table-header-group;
  }

  .page-products .p-table tbody {
    display: table-row-group;
  }

  .page-products .p-table tr {
    display: table-row;
    padding: 0;
    border-top: 0;
    background: transparent;
  }

  .page-products .p-table td {
    display: table-cell;
    width: auto;
    padding: 14px 16px;
    border-top: 1px solid var(--p-line);
    vertical-align: top;
  }

  .page-products .p-table td::before {
    content: none;
  }

  .page-products .p-table th {
    padding: 13px 16px;
    text-align: left;
    background: var(--cyan);
    color: var(--ink-deep);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .page-products .p-table tbody tr:nth-child(even) {
    background: rgba(30, 44, 85, 0.28);
  }

  .page-products .p-table td:first-child {
    font-size: 13.5px;
    white-space: nowrap;
  }

  .page-products .p-vers,
  .page-products .p-scenes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 1000px) {
  .page-products .p-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    align-items: center;
  }

  .page-products .p-body {
    grid-template-columns: var(--p-rail) minmax(0, 1fr);
    align-items: start;
    gap: var(--p-gap);
  }

  .page-products .p-timeline {
    position: sticky;
    top: calc(var(--head-h) + 18px);
    padding: 20px 18px 22px;
  }

  .page-products .p-timeline__list {
    flex-direction: column;
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
    margin-top: 16px;
  }

  .page-products .p-timeline__item {
    min-width: 0;
    scroll-snap-align: none;
    padding: 11px 13px;
  }

  .page-products .p-timeline__item + .p-timeline__item {
    position: relative;
  }

  .page-products .p-timeline__item + .p-timeline__item::before {
    content: "";
    position: absolute;
    left: 21px;
    top: -10px;
    width: 1px;
    height: 10px;
    background: var(--grid);
  }

  .page-products .p-split {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    align-items: start;
  }

  .page-products .p-split__body {
    padding-top: 4px;
  }

  .page-products .p-vers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .page-products .p-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  }

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

@media (prefers-reduced-motion: reduce) {
  .page-products .p-code__tip,
  .page-products .p-next__item {
    transition: none;
  }
}
