.page-products {
  --fx-hair: 1px solid var(--line);
}

.page-products .fx-hero {
  padding-top: var(--space-sm);
}

.page-products .fx-hero-frame {
  position: relative;
  padding: clamp(20px, 3.6vw, 48px);
  background: linear-gradient(180deg, rgba(18, 32, 58, 0.85), rgba(10, 20, 36, 0.55));
}

.page-products .fx-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(16px, 2.4vw, 28px);
}

.page-products .fx-hero-title {
  margin: 0 0 clamp(16px, 2vw, 24px);
  max-width: 17ch;
}

.page-products .fx-hero-lead {
  max-width: 62ch;
  margin: 0 0 clamp(24px, 3.4vw, 40px);
}

.page-products .fx-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: var(--fx-hair);
  margin-bottom: clamp(24px, 3vw, 36px);
}

.page-products .fx-index-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 20px;
  background: var(--ink);
}

.page-products .fx-index-no {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--cyan);
}

.page-products .fx-index-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.page-products .fx-index-note {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.page-products .fx-hero-actions,
.page-products .fx-flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-products .fx-matrix-wrap {
  border: var(--fx-hair);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-products .fx-matrix {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.page-products .fx-matrix caption {
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  border-bottom: var(--fx-hair);
}

.page-products .fx-matrix th,
.page-products .fx-matrix td {
  padding: 16px;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
  line-height: 1.7;
  border-bottom: var(--fx-hair);
}

.page-products .fx-matrix thead th {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(18, 32, 58, 0.6);
}

.page-products .fx-matrix tbody th {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  white-space: nowrap;
}

.page-products .fx-matrix tbody td {
  color: var(--paper);
}

.page-products .fx-matrix tbody tr:last-child th,
.page-products .fx-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.page-products .fx-lane {
  padding: clamp(28px, 4vw, 52px) 0;
  border-top: var(--fx-hair);
}

.page-products .fx-lane:last-of-type {
  border-bottom: var(--fx-hair);
}

.page-products .fx-lane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.page-products .fx-lane-no {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.4vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--orange);
}

.page-products .fx-lane-title {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  letter-spacing: -0.01em;
  color: var(--paper);
}

.page-products .fx-lane-tag {
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--cyan-soft);
  border: var(--fx-hair);
}

.page-products .fx-lane-body {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}

.page-products .fx-lane-copy p {
  margin: 0 0 16px;
}

.page-products .fx-points {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.page-products .fx-points li {
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--paper);
}

.page-products .fx-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 12px;
  height: 1px;
  background: var(--cyan);
}

.page-products .fx-lane-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.page-products .fx-lane-link:hover,
.page-products .fx-lane-link:focus-visible {
  border-bottom-color: var(--cyan);
}

.page-products .fx-lane-media {
  position: relative;
  margin: 0;
  border: var(--fx-hair);
  background: var(--panel);
}

.page-products .fx-lane-media img,
.page-products .fx-scene-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-products .fx-lane-media .media-caption {
  padding: 12px 14px;
  border-top: var(--fx-hair);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--muted);
}

.page-products .fx-lane:nth-of-type(even) .fx-lane-media::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 44px;
  height: 44px;
  background: var(--orange);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  opacity: 0.85;
}

.page-products .fx-dist {
  padding: clamp(16px, 2.4vw, 24px);
  border: var(--fx-hair);
  background: var(--panel);
}

.page-products .fx-dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.page-products .fx-dist-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-products .fx-dist-legend .lg-goal,
.page-products .fx-dist-legend .lg-conc {
  display: inline-block;
  width: 18px;
  height: 8px;
}

.page-products .fx-dist-legend .lg-goal {
  background: linear-gradient(90deg, var(--warm), var(--orange));
}

.page-products .fx-dist-legend .lg-conc {
  background: linear-gradient(90deg, var(--cool), var(--cyan));
}

.page-products .fx-dist svg {
  display: block;
  width: 100%;
  height: auto;
}

.page-products .fx-dist svg text {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--muted);
}

.page-products .fx-archive-toggle {
  margin-bottom: 16px;
}

.page-products .fx-archive {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 1px;
  background: var(--line);
  border: var(--fx-hair);
  margin: 0 0 20px;
}

.page-products .fx-archive span {
  display: block;
  padding: 12px 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  background: var(--ink);
  color: var(--paper);
}

.page-products .fx-scene-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: var(--fx-hair);
}

.page-products .fx-scene {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2.4vw, 26px);
  background: rgba(18, 32, 58, 0.55);
}

.page-products .fx-scene-combo {
  align-self: flex-start;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--cyan-soft);
  border: var(--fx-hair);
}

.page-products .fx-scene-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--paper);
}

.page-products .fx-scene p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--paper);
}

.page-products .fx-scene-media {
  margin: 0;
  border: var(--fx-hair);
  background: var(--panel);
}

.page-products .fx-scene-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-products .fx-flow-inner {
  padding: clamp(24px, 4vw, 56px);
}

.page-products .fx-steps {
  display: grid;
  gap: 1px;
  grid-template-columns: minmax(0, 1fr);
  margin: clamp(20px, 3vw, 32px) 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: var(--fx-hair);
}

.page-products .fx-steps li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px;
  background: var(--ink);
}

.page-products .fx-step-no {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--orange);
}

.page-products .fx-step-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.page-products .fx-step-note {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--muted);
}

.page-products .fx-rhythm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: var(--fx-hair);
  margin-bottom: clamp(20px, 2.6vw, 28px);
}

.page-products .fx-rhythm-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  background: var(--ink);
}

.page-products .fx-rhythm-value {
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  letter-spacing: -0.01em;
  color: var(--orange);
}

.page-products .fx-rhythm-label {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.page-products .fx-flow-note {
  margin: 0 0 clamp(20px, 2.6vw, 28px);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
}

.page-products .fx-index-item,
.page-products .fx-scene,
.page-products .fx-matrix tbody tr,
.page-products .fx-archive span {
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}

@media (hover: hover) {
  .page-products .fx-index-item:hover,
  .page-products .fx-scene:hover {
    background: var(--panel);
  }

  .page-products .fx-matrix tbody tr:hover {
    background: var(--panel);
  }

  .page-products .fx-matrix tbody tr:hover th {
    box-shadow: inset 3px 0 0 var(--orange);
  }

  .page-products .fx-archive span:hover {
    background: var(--panel);
    color: var(--orange);
  }
}

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

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

@media (min-width: 900px) {
  .page-products .fx-lane-body {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
  }

  .page-products .fx-lane:nth-of-type(even) .fx-lane-body {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .page-products .fx-lane:nth-of-type(even) .fx-lane-media {
    order: -1;
  }

  .page-products .fx-scene-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .page-products .fx-scene {
    grid-column: span 2;
  }

  .page-products .fx-scene--wide {
    grid-column: span 6;
    flex-direction: row;
    align-items: stretch;
    gap: clamp(20px, 3vw, 36px);
  }

  .page-products .fx-scene--wide .fx-scene-media {
    flex: 1 1 46%;
    transform: rotate(-1.2deg);
  }

  .page-products .fx-scene--wide .fx-scene-body {
    flex: 1 1 54%;
    justify-content: center;
  }

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

@media (prefers-reduced-motion: reduce) {
  .page-products .fx-index-item,
  .page-products .fx-scene,
  .page-products .fx-matrix tbody tr,
  .page-products .fx-archive span {
    transition: none;
  }

  .page-products .fx-scene--wide .fx-scene-media {
    transform: none;
  }
}
