.page-home {
  --home-cut: 14px;
  --home-cut-sm: 8px;
  --home-edge: rgba(53, 232, 192, 0.22);
  --home-paper-line: rgba(28, 23, 16, 0.16);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.page-home .home-head {
  max-width: 780px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.page-home .home-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--heading);
  margin: 8px 0 12px;
}

.page-home .home-head p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.75;
  font-size: 16px;
}

/* ---------- hero ---------- */
.page-home .home-hero {
  position: relative;
  padding-block: clamp(18px, 2.6vw, 34px) clamp(40px, 6vw, 74px);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}

.page-home .home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(72% 58% at 82% 6%, var(--glow), transparent 68%);
  pointer-events: none;
}

.page-home .home-hero > .ky-container {
  position: relative;
}

.page-home .hero-intro {
  max-width: 840px;
}

.page-home .hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6.2vw, 60px);
  line-height: 1.03;
  letter-spacing: 0.005em;
  color: var(--heading);
  margin: 10px 0 16px;
  text-wrap: balance;
}

.page-home .hero-lede {
  margin: 0;
  max-width: 66ch;
  font-size: 16px;
  line-height: 1.78;
  color: var(--text-dim);
}

.page-home .hero-collage {
  margin-top: clamp(24px, 3.4vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(14px, 2vw, 22px);
}

/* entry card */
.page-home .collage-entry {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2.6vw, 30px);
  background: linear-gradient(152deg, var(--ink-800), var(--surface-alt) 72%);
  clip-path: polygon(
    var(--home-cut) 0,
    100% 0,
    100% calc(100% - var(--home-cut)),
    calc(100% - var(--home-cut)) 100%,
    0 100%,
    0 var(--home-cut)
  );
  box-shadow: inset 0 0 0 1px var(--home-edge);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.page-home .collage-entry:hover,
.page-home .collage-entry:focus-within {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 2px var(--teal);
}

.page-home .entry-art {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  pointer-events: none;
}

.page-home .entry-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
}

.page-home .collage-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(152deg, rgba(7, 14, 23, 0.94), rgba(7, 14, 23, 0.7));
  pointer-events: none;
}

.page-home .entry-body {
  position: relative;
  z-index: 2;
}

.page-home .entry-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.15;
  color: var(--heading);
  margin: 14px 0 12px;
}

.page-home .entry-body p {
  margin: 0 0 20px;
  color: var(--text-dim);
  line-height: 1.78;
  max-width: 54ch;
}

.page-home .entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* marquee */
.page-home .collage-status {
  position: relative;
  overflow: hidden;
  padding: 11px 0;
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--home-cut-sm)), calc(100% - var(--home-cut-sm)) 100%, 0 100%);
}

.page-home .marquee-track {
  display: flex;
  width: max-content;
  animation: home-marquee 44s linear infinite;
}

.page-home .marquee-track:hover {
  animation-play-state: paused;
}

.page-home .marquee-group {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
}

.page-home .marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  white-space: nowrap;
}

.page-home .marquee-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--signal-soft);
}

@keyframes home-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* two-step strip */
.page-home .collage-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px clamp(14px, 2vw, 20px);
  background: var(--surface);
  clip-path: polygon(
    var(--home-cut-sm) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--home-cut-sm)
  );
  box-shadow: inset 0 0 0 1px var(--line);
}

.page-home .step-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ice);
}

.page-home .step-pill b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-accent);
  background: var(--teal);
}

.page-home .step-arrow {
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: 14px;
}

.page-home .step-result {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  padding: 4px 9px;
  border: 1px solid rgba(255, 194, 75, 0.4);
}

/* scoreboard panel */
.page-home .collage-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ink-800);
  clip-path: polygon(
    0 0,
    calc(100% - var(--home-cut)) 0,
    100% var(--home-cut),
    100% 100%,
    var(--home-cut) 100%,
    0 calc(100% - var(--home-cut))
  );
  box-shadow: inset 0 0 0 1px var(--line);
}

.page-home .panel-art {
  position: relative;
  flex: 1 1 auto;
  min-height: 150px;
  max-height: 240px;
  overflow: hidden;
}

.page-home .panel-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
  opacity: 0.72;
}

.page-home .panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px clamp(14px, 2vw, 20px) 0;
}

.page-home .panel-head p {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.page-home .panel-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  background: var(--line);
}

.page-home .panel-stat {
  background: var(--ink-800);
  padding: 14px clamp(12px, 1.8vw, 18px) 16px;
}

.page-home .stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 500;
  line-height: 1;
  color: var(--ice);
  letter-spacing: -0.01em;
}

.page-home .stat-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* ---------- two step path ---------- */
.page-home .home-path {
  border-top: 1px solid var(--line);
}

.page-home .path-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 30px);
}

.page-home .path-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(20px, 3vw, 34px);
  position: relative;
}

.page-home .path-steps::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 26px;
  bottom: 26px;
  border-left: 2px dashed var(--teal-deep);
  opacity: 0.65;
}

.page-home .path-step {
  position: relative;
  padding: clamp(16px, 2.2vw, 24px) clamp(16px, 2.2vw, 24px) clamp(16px, 2.2vw, 24px) clamp(66px, 7vw, 82px);
  background: var(--surface);
  clip-path: polygon(
    var(--home-cut) 0,
    100% 0,
    100% calc(100% - var(--home-cut)),
    calc(100% - var(--home-cut)) 100%,
    0 100%,
    0 var(--home-cut)
  );
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.page-home .path-step::before {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  background: var(--bg);
  border: 1px solid var(--teal);
  outline: 1px solid var(--teal-deep);
  outline-offset: 4px;
}

.page-home .path-step:nth-child(1)::before {
  content: "01";
}

.page-home .path-step:nth-child(2)::before {
  content: "02";
}

.page-home .path-step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
  color: var(--heading);
  margin: 0 0 10px;
}

.page-home .path-step p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.78;
  font-size: 15px;
}

.page-home .path-view {
  padding: clamp(18px, 2.6vw, 28px);
  background: linear-gradient(165deg, var(--surface-alt), var(--ink-800));
  clip-path: polygon(
    0 0,
    calc(100% - var(--home-cut)) 0,
    100% var(--home-cut),
    100% 100%,
    0 100%
  );
  box-shadow: inset 0 0 0 1px var(--home-edge);
}

.page-home .view-title {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
}

.page-home .view-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.page-home .view-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.page-home .view-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.page-home .view-key {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  letter-spacing: 0.04em;
}

.page-home .view-val {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ---------- league rail ---------- */
.page-home .rail-paper {
  padding: clamp(18px, 3vw, 34px);
  background: var(--cream);
  color: var(--brown);
  clip-path: polygon(
    var(--home-cut) 0,
    100% 0,
    100% calc(100% - var(--home-cut)),
    calc(100% - var(--home-cut)) 100%,
    0 100%,
    0 var(--home-cut)
  );
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 30px);
}

.page-home .rail-art {
  order: 2;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--home-cut-sm)), calc(100% - var(--home-cut-sm)) 100%, 0 100%);
}

.page-home .rail-art img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

.page-home .rail-main {
  order: 1;
}

.page-home .home-head--paper h2 {
  color: var(--brown);
}

.page-home .home-head--paper p {
  color: #4A4030;
}

.page-home .home-head--paper .ky-label {
  color: #8A5A12;
}

.page-home .league-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.page-home .league-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--home-paper-line);
}

.page-home .league-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--brown);
}

.page-home .league-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #6B5D45;
}

.page-home .league-row--sub .league-name {
  color: #8A3A22;
}

.page-home .rail-foot {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.page-home .rail-note {
  flex: 1 1 240px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #4A4030;
}

/* ---------- compare ---------- */
.page-home .home-compare {
  border-top: 1px solid var(--line);
}

.page-home .compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(12px, 1.8vw, 20px);
}

.page-home .compare-card {
  position: relative;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--surface);
  clip-path: polygon(
    var(--home-cut) 0,
    100% 0,
    100% calc(100% - var(--home-cut)),
    calc(100% - var(--home-cut)) 100%,
    0 100%,
    0 var(--home-cut)
  );
  box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: box-shadow 200ms ease;
}

.page-home .compare-card:hover {
  box-shadow: inset 0 0 0 2px var(--teal-deep);
}

.page-home .compare-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--on-accent);
  background: var(--teal);
  padding: 2px 8px;
}

.page-home .compare-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--heading);
  margin: 14px 0 10px;
}

.page-home .compare-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dim);
}

.page-home .compare-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(20px, 3vw, 30px);
}

/* ---------- sync ---------- */
.page-home .sync-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
  padding: clamp(20px, 3vw, 34px);
  background: linear-gradient(160deg, var(--surface-alt), var(--ink-800) 78%);
  clip-path: polygon(
    var(--home-cut) 0,
    100% 0,
    100% 100%,
    0 100%,
    0 var(--home-cut)
  );
  box-shadow: inset 0 0 0 1px var(--line);
}

.page-home .sync-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.1;
  color: var(--heading);
  margin: 8px 0 14px;
}

.page-home .sync-copy > p {
  margin: 0 0 20px;
  color: var(--text-dim);
  line-height: 1.78;
  max-width: 56ch;
}

.page-home .sync-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.page-home .sync-list li {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 2px solid var(--teal-deep);
}

.page-home .sync-key {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--teal);
}

.page-home .sync-val {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dim);
}

.page-home .sync-art {
  overflow: hidden;
  clip-path: polygon(
    0 0,
    calc(100% - var(--home-cut)) 0,
    100% var(--home-cut),
    100% 100%,
    0 100%
  );
  border: 1px solid var(--line-soft);
}

.page-home .sync-art img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

/* ---------- updates ---------- */
.page-home .update-list {
  display: grid;
  gap: 10px;
}

.page-home .update-item {
  background: var(--surface);
  border-left: 2px solid var(--line);
  transition: border-color 200ms ease, background 200ms ease;
}

.page-home .update-item[open] {
  border-left-color: var(--teal);
  background: var(--surface-alt);
}

.page-home .update-item summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 15px clamp(14px, 2vw, 22px);
  cursor: pointer;
  list-style: none;
}

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

.page-home .update-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  color: var(--on-accent);
  white-space: nowrap;
}

.page-home .update-tag--teal { background: var(--teal); }
.page-home .update-tag--amber { background: var(--amber); }
.page-home .update-tag--coral { background: var(--coral); }

.page-home .update-title {
  flex: 1 1 240px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ice);
}

.page-home .update-arrow {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--teal);
}

.page-home .update-item[open] .update-arrow {
  transform: rotate(45deg);
}

.page-home .update-item > p {
  margin: 0;
  padding: 0 clamp(14px, 2vw, 22px) 18px;
  font-size: 15px;
  line-height: 1.78;
  color: var(--text-dim);
  max-width: 78ch;
}

.page-home .update-foot {
  margin-top: clamp(18px, 2.6vw, 26px);
}

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .page-home .compare-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .page-home .hero-collage {
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.9fr);
    grid-template-areas:
      "entry panel"
      "steps panel"
      "status panel";
  }

  .page-home .collage-entry { grid-area: entry; }
  .page-home .collage-status { grid-area: status; }
  .page-home .collage-steps { grid-area: steps; }
  .page-home .collage-panel { grid-area: panel; }

  .page-home .path-board {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  }

  .page-home .path-steps {
    gap: 26px;
  }

  .page-home .rail-paper {
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
    align-items: start;
  }

  .page-home .rail-art {
    order: 1;
    position: sticky;
    top: 24px;
  }

  .page-home .rail-main {
    order: 2;
  }

  .page-home .sync-board {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    align-items: center;
  }
}

@media (max-width: 480px) {
  .page-home .panel-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .stat-num {
    font-size: 24px;
  }

  .page-home .entry-actions .ky-btn {
    width: 100%;
  }

  .page-home .path-step {
    padding-left: 58px;
  }

  .page-home .path-steps::before {
    left: 18px;
  }
}

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

  .page-home .collage-entry,
  .page-home .compare-card,
  .page-home .update-item,
  .page-home .update-arrow {
    transition: none;
  }

  .page-home .collage-entry:hover,
  .page-home .collage-entry:focus-within {
    transform: none;
  }
}
