.page-home {
  --home-glow-cyan: rgba(43, 245, 224, .32);
  --home-glow-magenta: rgba(255, 61, 190, .26);
  --home-scan: rgba(167, 156, 196, .04);
  position: relative;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
}

.page-home::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, var(--home-scan) 0 1px, transparent 1px 5px);
}

.page-home .hero,
.page-home .section {
  position: relative;
  z-index: 1;
}

.page-home .container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 56px);
}

.page-home .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.page-home .tone-cyan { color: var(--cyan); }
.page-home .tone-yellow { color: var(--yellow); }

.page-home .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.page-home .sec-head {
  max-width: 760px;
  margin-bottom: clamp(24px, 4vw, 46px);
}

.page-home .sec-head--wide {
  max-width: 860px;
}

.page-home .sec-head h2,
.page-home .index-head {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.75rem, 4vw, 2.9rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  text-shadow: 0 0 24px var(--home-glow-cyan);
}

.page-home .sec-lede,
.page-home .plate-note {
  color: rgba(242, 238, 249, .78);
  max-width: 660px;
  margin: 0;
  font-size: 16px;
}

.page-home .plate-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- hero ---------- */

.page-home .hero {
  padding: clamp(28px, 5vw, 68px) 0 clamp(40px, 6vw, 92px);
  background:
    radial-gradient(120% 78% at 80% 6%, var(--home-glow-magenta), transparent 62%),
    radial-gradient(90% 70% at 6% 96%, var(--home-glow-cyan), transparent 64%);
}

.page-home .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 44px);
  align-items: start;
}

.page-home .hero-copy {
  position: relative;
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.page-home .hero-copy::after {
  content: "";
  position: absolute;
  left: -5px;
  top: 0;
  bottom: 0;
  width: 9px;
  background: repeating-linear-gradient(to bottom, var(--cyan) 0 1px, transparent 1px 14px);
  opacity: .5;
  pointer-events: none;
}

.page-home .scale-cap {
  position: absolute;
  left: -20px;
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
  display: none;
}

.page-home .scale-cap--top { top: 0; }
.page-home .scale-cap--bottom { bottom: 0; }

.page-home .hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 5.4vw, 3.5rem);
  line-height: 1.16;
  letter-spacing: -.025em;
  margin: 0 0 18px;
  text-shadow: 0 0 30px var(--home-glow-cyan);
}

.page-home .hero-lede {
  margin: 0 0 26px;
  max-width: 620px;
  font-size: 17px;
  line-height: 1.85;
  color: rgba(242, 238, 249, .82);
}

.page-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.page-home .hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.page-home .hero-fact dt {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 4px;
}

.page-home .hero-fact dd {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  color: var(--yellow);
}

.page-home .hero-media {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(43, 245, 224, .12), 0 28px 70px -34px var(--home-glow-cyan);
  animation: home-breathe 4s var(--ease) infinite;
}

.page-home .hero-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

@keyframes home-breathe {
  0%, 100% { box-shadow: 0 0 0 1px rgba(43, 245, 224, .12), 0 28px 70px -34px rgba(43, 245, 224, .6); }
  50% { box-shadow: 0 0 0 1px rgba(43, 245, 224, .26), 0 28px 70px -34px rgba(43, 245, 224, .95); }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero-media { animation: none; }
}

.page-home .hero-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.page-home .hero-card {
  padding: 15px 16px 18px;
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-top-width: 2px;
  border-radius: 3px;
  backdrop-filter: blur(6px);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}

.page-home .hero-card--cyan { border-top-color: var(--cyan); }
.page-home .hero-card--magenta { border-top-color: var(--magenta); }
.page-home .hero-card--yellow { border-top-color: var(--yellow); }

.page-home .hero-card:hover {
  border-color: var(--blue);
  border-top-color: currentColor;
  transform: translateY(-3px);
}

.page-home .card-num {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.1;
  color: var(--yellow);
}

.page-home .card-unit {
  margin: 4px 0 10px;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--muted);
}

.page-home .card-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(242, 238, 249, .72);
}

/* ---------- section base ---------- */

.page-home .section {
  padding: clamp(48px, 7vw, 96px) 0;
}

/* ---------- plate ---------- */

.page-home .table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: rgba(26, 16, 48, .5);
}

.page-home .plate-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.page-home .plate-table th,
.page-home .plate-table td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.page-home .plate-table thead th {
  font-size: 12px;
  letter-spacing: .16em;
  font-weight: 400;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.page-home .plate-table tbody tr {
  transition: background .22s var(--ease);
}

.page-home .plate-table tbody tr:hover {
  background: rgba(76, 123, 255, .12);
}

.page-home .plate-table tbody tr:last-child td {
  border-bottom: 0;
}

.page-home .plate-table td:first-child {
  font-size: 15px;
  white-space: nowrap;
}

/* ---------- swap ---------- */

.page-home .swap-section {
  background:
    linear-gradient(180deg, rgba(58, 14, 36, .7), rgba(11, 6, 22, 0) 68%),
    radial-gradient(70% 60% at 92% 12%, var(--home-glow-magenta), transparent 66%);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.page-home .swap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
}

.page-home .swap-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-home .swap-media {
  margin: 0;
  border: 1px solid rgba(255, 61, 190, .3);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 22px 54px -32px var(--home-glow-magenta);
}

.page-home .swap-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-home .side-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .swap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-content: start;
}

.page-home .swap-item {
  background: rgba(26, 16, 48, .66);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.page-home .swap-item:hover {
  border-color: rgba(255, 61, 190, .45);
}

.page-home .swap-item[open] {
  border-color: rgba(43, 245, 224, .45);
  background: rgba(26, 16, 48, .9);
}

.page-home .swap-item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.page-home .swap-item > summary::-webkit-details-marker { display: none; }

.page-home .swap-item > summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  color: var(--cyan);
  transition: transform .24s var(--ease), color .24s var(--ease);
}

.page-home .swap-item[open] > summary::after {
  transform: rotate(45deg);
  color: var(--magenta);
}

.page-home .swap-item > summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.page-home .swap-body {
  padding: 12px 16px 16px;
  margin: 0 16px 0;
  border-top: 1px dashed var(--line-soft);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .swap-body p {
  margin: 0 0 6px;
}

.page-home .swap-body p:last-child {
  margin-bottom: 0;
}

.page-home .swap-body strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- endgame ---------- */

.page-home .endgame-section {
  background:
    radial-gradient(80% 60% at 12% 8%, rgba(43, 245, 224, .1), transparent 62%),
    var(--bg);
}

.page-home .endgame-media {
  margin: 0 0 clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  max-width: 900px;
}

.page-home .endgame-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-home .endgame-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.page-home .endgame-card {
  padding: 20px 20px 22px;
  background: linear-gradient(180deg, rgba(14, 59, 58, .55), rgba(11, 6, 22, .4));
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--cyan);
  border-radius: 3px;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}

.page-home .endgame-card:hover {
  border-left-color: var(--yellow);
  transform: translateY(-3px);
}

.page-home .endgame-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 10px 0 8px;
  letter-spacing: -.01em;
}

.page-home .endgame-card p {
  margin: 0 0 8px;
  font-size: 14.5px;
  color: rgba(242, 238, 249, .76);
}

.page-home .endgame-card p:last-child {
  margin-bottom: 0;
}

.page-home .endgame-hint {
  font-size: 13px;
  color: var(--muted) !important;
  letter-spacing: .04em;
}

.page-home .endgame-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- guide ---------- */

.page-home .guide-section {
  background: linear-gradient(180deg, rgba(26, 16, 48, .6), rgba(11, 6, 22, 0) 78%);
  border-top: 1px solid var(--line-soft);
}

.page-home .guide-path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  counter-reset: guide;
}

.page-home .guide-step {
  position: relative;
  padding: 18px 18px 20px;
  background: rgba(26, 16, 48, .55);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.page-home .guide-step:hover {
  border-color: rgba(76, 123, 255, .5);
  background: rgba(26, 16, 48, .82);
}

.page-home .guide-num {
  display: block;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--cyan);
  margin-bottom: 8px;
}

.page-home .guide-step h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 8px;
}

.page-home .guide-step p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(242, 238, 249, .74);
}

.page-home .guide-time {
  margin: 0;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ---------- library ---------- */

.page-home .library-section {
  background:
    radial-gradient(72% 60% at 88% 88%, rgba(255, 226, 74, .08), transparent 62%),
    var(--bg);
}

.page-home .library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  align-items: start;
}

.page-home .library-copy p {
  margin: 0 0 18px;
  font-size: 16px;
  color: rgba(242, 238, 249, .8);
}

.page-home .library-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-home .library-list li {
  padding: 14px 16px;
  background: rgba(14, 59, 58, .45);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--yellow);
  border-radius: 3px;
}

.page-home .library-name {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}

.page-home .library-desc {
  display: block;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.page-home .library-meta {
  font-size: 13.5px !important;
  color: var(--muted) !important;
}

.page-home .library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-home .library-media {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 24px 60px -36px rgba(76, 123, 255, .8);
}

.page-home .library-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------- assure ---------- */

.page-home .assure-section {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(58, 14, 36, .38), rgba(11, 6, 22, 0) 72%);
}

.page-home .assure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.page-home .assure-item {
  padding: 18px 18px 20px;
  background: rgba(26, 16, 48, .58);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
}

.page-home .assure-item h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 10px;
}

.page-home .assure-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(242, 238, 249, .74);
}

.page-home .assure-data {
  font-size: 1.05rem !important;
  color: var(--yellow);
  margin-bottom: 10px !important;
}

.page-home .assure-foot {
  margin-top: 22px;
  padding: 20px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(11, 6, 22, .6);
}

.page-home .assure-foot p {
  margin: 0 0 16px;
  font-size: 15px;
  color: rgba(242, 238, 249, .8);
}

.page-home .assure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- index ---------- */

.page-home .home-index {
  padding-bottom: clamp(56px, 8vw, 110px);
}

.page-home .index-head {
  margin-bottom: 22px;
}

.page-home .index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  overflow: hidden;
}

.page-home .index-link {
  display: block;
  padding: 18px 18px 20px;
  background: rgba(11, 6, 22, .92);
  text-decoration: none;
  color: inherit;
  transition: background .24s var(--ease);
}

.page-home .index-link:hover,
.page-home .index-link:focus-visible {
  background: rgba(26, 16, 48, .95);
}

.page-home .index-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.page-home .index-link:hover .index-label {
  color: var(--cyan);
}

.page-home .index-note {
  display: block;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- breakpoints ---------- */

@media (min-width: 620px) {
  .page-home .hero-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .page-home .guide-path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .assure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .page-home .swap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .page-home .scale-cap {
    display: block;
  }

  .page-home .hero-inner {
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    grid-template-rows: auto auto;
    column-gap: clamp(34px, 5vw, 76px);
    row-gap: 34px;
  }

  .page-home .hero-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .page-home .hero-media {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
  }

  .page-home .hero-cards {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    gap: 10px;
  }

  .page-home .hero-card:nth-child(2) {
    transform: translateY(-10px);
  }

  .page-home .hero-card:nth-child(3) {
    transform: translateY(8px);
  }

  .page-home .hero-card:hover {
    transform: translateY(-13px);
  }

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

  .page-home .swap-layout {
    grid-template-columns: minmax(0, 34fr) minmax(0, 66fr);
  }

  .page-home .library-layout {
    grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
  }

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

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

@media (min-width: 1320px) {
  .page-home .swap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-home .index-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero-card,
  .page-home .endgame-card,
  .page-home .swap-item,
  .page-home .index-link {
    transition: none;
  }
}
