.page-home {
  --home-max: 1200px;
  --home-pad: clamp(20px, 4vw, 40px);
  --home-panel: rgba(18, 26, 44, 0.72);
  --home-border: rgba(0, 212, 255, 0.28);
  --home-glow: rgba(0, 212, 255, 0.12);
  --home-radius: 0;
  position: relative;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.7;
  background:
    linear-gradient(0deg, rgba(10, 14, 23, 0.92), rgba(10, 14, 23, 0.92)),
    repeating-linear-gradient(90deg, rgba(30, 42, 58, 0.5) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(30, 42, 58, 0.5) 0 1px, transparent 1px 64px);
}

.page-home .container {
  max-width: var(--home-max);
  margin: 0 auto;
  padding: 24px var(--home-pad) 0;
  position: relative;
  z-index: 1;
}

.page-home .section-pad {
  padding: 64px 0;
  scroll-margin-top: calc(var(--header-h, 64px) + 12px);
}

.page-home .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 24px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.page-home .breadcrumb-sep {
  color: var(--neon-blue);
  font-family: var(--font-display);
}

.page-home .section-heading {
  margin-bottom: 28px;
}

.page-home .section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 8px;
  padding-left: 14px;
  border-left: 4px solid var(--neon-blue);
  text-shadow: 0 0 18px var(--home-glow);
}

.page-home .section-sub {
  margin: 0;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 15px;
  max-width: 640px;
}

.page-home img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-home .btn-primary,
.page-home .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.page-home .btn-primary {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  color: #0A0E17;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.page-home .btn-primary:hover,
.page-home .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.35);
}

.page-home .btn-ghost {
  border: 1px solid rgba(155, 89, 255, 0.6);
  color: var(--text-main);
  background: transparent;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.page-home .btn-ghost:hover,
.page-home .btn-ghost:focus-visible {
  border-color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(155, 89, 255, 0.28);
  transform: translateY(-2px);
}

/* ===== Hero ===== */
.page-home .home-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 32px 0 48px;
  border-top: 1px solid rgba(30, 42, 58, 0.9);
  border-bottom: 1px solid rgba(30, 42, 58, 0.9);
}

.page-home .home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 255, 0.04) 50%, transparent 100%);
}

.page-home .hero-copy {
  position: relative;
  z-index: 2;
}

.page-home .hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid rgba(57, 255, 20, 0.35);
  background: rgba(57, 255, 20, 0.06);
  padding: 6px 12px;
  margin-bottom: 24px;
}

.page-home .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
}

.page-home .hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 7vw, 66px);
  font-style: italic;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-shadow: 0 0 32px rgba(0, 212, 255, 0.18);
}

.page-home .hero-desc {
  max-width: 620px;
  color: var(--text-dim);
  font-size: 16px;
  margin: 0 0 30px;
  border-left: 2px solid rgba(155, 89, 255, 0.5);
  padding-left: 16px;
}

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

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

.page-home .hero-stat {
  position: relative;
  padding: 4px 0 4px 14px;
  border-left: 2px solid var(--neon-blue);
}

.page-home .hero-stat dt {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.page-home .hero-stat dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.page-home .hero-stat dd::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 6px;
  background: linear-gradient(90deg, var(--neon-blue), transparent);
}

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

.page-home .hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  filter: contrast(1.1) saturate(1.1);
  border: 1px solid rgba(0, 212, 255, 0.4);
  outline: 1px solid rgba(155, 89, 255, 0.3);
  outline-offset: -8px;
}

.page-home .hero-window {
  position: absolute;
  inset: -10px;
  pointer-events: none;
  z-index: 0;
  border: 1px solid rgba(0, 212, 255, 0.22);
  background:
    repeating-linear-gradient(90deg, rgba(0, 212, 255, 0.04) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(155, 89, 255, 0.04) 0 1px, transparent 1px 28px);
}

.page-home .window-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-style: solid;
  border-color: var(--neon-blue);
}

.page-home .corner-tl {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.page-home .corner-tr {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}

.page-home .corner-bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}

.page-home .corner-br {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.page-home .hero-glyph {
  position: absolute;
  right: 12px;
  top: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(57, 255, 20, 0.6);
  background: rgba(10, 14, 23, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.page-home .hero-glyph .glyph-h,
.page-home .hero-glyph .glyph-v {
  position: absolute;
  background: rgba(57, 255, 20, 0.7);
}

.page-home .hero-glyph .glyph-h {
  left: 0;
  right: 0;
  height: 1px;
  top: 50%;
}

.page-home .hero-glyph .glyph-v {
  top: 0;
  bottom: 0;
  width: 1px;
  left: 50%;
}

.page-home .hero-glyph .glyph-c {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  color: var(--neon-green);
  letter-spacing: 0.12em;
}

/* ===== Ranking ===== */
.page-home .ranking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.page-home .ranking-panel {
  background: var(--home-panel);
  border: 1px solid rgba(30, 42, 58, 0.8);
  padding: 20px;
  position: relative;
  transition: box-shadow var(--transition);
}

.page-home .ranking-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
}

.page-home .rank-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.page-home .rank-filter-item {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid rgba(30, 42, 58, 0.9);
  padding: 5px 10px;
  cursor: default;
}

.page-home .rank-filter-item.is-active {
  color: var(--neon-blue);
  border-color: rgba(0, 212, 255, 0.55);
  background: rgba(0, 212, 255, 0.06);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.12);
}

.page-home .rank-table {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.page-home .rank-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 46px 86px 20px;
  align-items: center;
  gap: 10px;
  padding: 11px 8px;
  border-bottom: 1px solid rgba(30, 42, 58, 0.7);
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
  scroll-margin-top: calc(var(--header-h, 64px) + 12px);
}

.page-home .rank-row:hover {
  background: rgba(0, 212, 255, 0.06);
  border-left: 2px solid var(--neon-blue);
  transform: translateX(3px);
}

.page-home .rank-index {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.page-home .rank-team {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.page-home .rank-zone {
  display: none;
}

.page-home .rank-points {
  text-align: right;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.25);
}

.page-home .rank-rate {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-home .rate-bar {
  flex: 1;
  height: 4px;
  background: rgba(30, 42, 58, 0.9);
  min-width: 30px;
}

.page-home .rate-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
}

.page-home .rate-num {
  font-size: 11px;
  color: var(--text-dim);
  width: 30px;
  text-align: right;
}

.page-home .rank-trend {
  font-size: 12px;
  text-align: center;
}

.page-home [data-trend="up"] .rank-trend {
  color: var(--neon-green);
}

.page-home [data-trend="down"] .rank-trend {
  color: var(--neon-purple);
}

.page-home .rank-more {
  margin-top: 20px;
  width: 100%;
}

.page-home .ranking-aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-home .aside-card {
  background: var(--home-panel);
  border: 1px solid rgba(155, 89, 255, 0.2);
  padding: 22px;
  position: relative;
}

.page-home .aside-card::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent rgba(155, 89, 255, 0.5) transparent transparent;
}

.page-home .aside-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neon-blue);
  border: 1px solid rgba(0, 212, 255, 0.4);
  padding: 3px 8px;
  margin-bottom: 12px;
}

.page-home .aside-title {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.page-home .aside-text {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 14px;
}

.page-home .aside-img {
  width: 100%;
  height: auto;
  margin-top: 6px;
  border: 1px solid rgba(30, 42, 58, 0.9);
}

.page-home .aside-line {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--neon-green);
}

/* ===== Services ===== */
.page-home .service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.page-home .service-card {
  display: block;
  position: relative;
  background: var(--home-panel);
  border: 1px solid rgba(30, 42, 58, 0.9);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.page-home .service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--neon-blue), var(--neon-purple));
  opacity: 0.6;
}

.page-home .service-card:hover,
.page-home .service-card:focus-visible {
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.12);
  transform: translateY(-3px);
}

.page-home .service-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--neon-purple);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 10px;
}

.page-home .service-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--grid-line);
  padding-bottom: 3px;
  margin-bottom: 10px;
}

.page-home .service-name {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
  margin-bottom: 8px;
}

.page-home .service-desc {
  display: block;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.page-home .service-link {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--neon-blue);
  text-transform: uppercase;
}

.page-home .service-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(57, 255, 20, 0.05);
  border: 1px dashed rgba(57, 255, 20, 0.4);
  padding: 16px 18px;
  color: var(--text-dim);
  font-size: 13px;
}

.page-home .service-note-mark {
  flex: 0 0 8px;
  height: 8px;
  margin-top: 7px;
  background: var(--neon-green);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}

/* ===== Return ===== */
.page-home .home-return {
  position: relative;
  background: linear-gradient(135deg, rgba(155, 89, 255, 0.06), rgba(0, 212, 255, 0.04));
  border-top: 1px solid rgba(155, 89, 255, 0.22);
  border-bottom: 1px solid rgba(155, 89, 255, 0.22);
}

.page-home .return-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.page-home .return-visual img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(0, 212, 255, 0.35);
  outline: 1px solid rgba(155, 89, 255, 0.25);
  outline-offset: 6px;
}

.page-home .return-lead {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  font-style: italic;
  margin: 0 0 12px;
  color: var(--text-main);
}

.page-home .return-text {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 20px;
}

.page-home .return-points {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-home .return-points li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-main);
  border-left: 2px solid rgba(0, 212, 255, 0.5);
}

.page-home .return-points li::before {
  content: ">";
  position: absolute;
  left: 7px;
  color: var(--neon-purple);
  font-family: var(--font-display);
  font-weight: 700;
}

.page-home .return-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ===== Index table ===== */
.page-home .index-table {
  border-top: 2px solid rgba(0, 212, 255, 0.55);
  border-bottom: 1px solid rgba(30, 42, 58, 0.9);
  margin-bottom: 24px;
}

.page-home .index-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 16px 12px;
  border-bottom: 1px solid rgba(30, 42, 58, 0.7);
}

.page-home .index-head {
  display: none;
}

.page-home .index-row strong {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.02em;
}

.page-home .index-row span {
  color: var(--text-dim);
  font-size: 14px;
}

.page-home .index-row a {
  color: var(--neon-blue);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.page-home .index-row a:hover,
.page-home .index-row a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-home .index-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0 32px;
}

.page-home .index-stat {
  text-align: left;
  border-left: 2px solid var(--neon-purple);
  padding: 8px 0 8px 14px;
}

.page-home .index-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 900;
  color: var(--neon-green);
  text-shadow: 0 0 16px rgba(57, 255, 20, 0.3);
  line-height: 1.2;
}

.page-home .index-stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.page-home .index-cta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  border: 1px dashed rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.04);
  padding: 24px;
}

.page-home .index-cta p {
  margin: 0;
  color: var(--text-main);
  font-size: 15px;
}

.page-home .index-cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-home .index-cta-links a {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--neon-blue);
  border: 1px solid rgba(0, 212, 255, 0.4);
  padding: 7px 14px;
  transition: background var(--transition), color var(--transition);
}

.page-home .index-cta-links a:hover,
.page-home .index-cta-links a:focus-visible {
  background: rgba(0, 212, 255, 0.12);
  color: var(--text-main);
}

.page-home :focus-visible {
  outline: 2px solid var(--neon-blue);
  outline-offset: 3px;
}

/* ===== Tablet ===== */
@media (min-width: 640px) {
  .page-home .home-hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
  }

  .page-home .hero-img {
    max-height: 480px;
  }

  .page-home .hero-window {
    inset: -8px -8px 12px 12px;
  }

  .page-home .hero-glyph {
    right: -4px;
    top: -14px;
  }

  .page-home .rank-row {
    grid-template-columns: 36px minmax(0, 1fr) 52px 74px 96px 20px;
  }

  .page-home .rank-zone {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .page-home .service-note {
    grid-column: span 2;
  }

  .page-home .index-row {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    align-items: center;
    gap: 12px;
  }

  .page-home .index-head {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: rgba(30, 42, 58, 0.4);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    padding: 10px 12px;
  }
}

/* ===== Desktop ===== */
@media (min-width: 960px) {
  .page-home .container {
    padding: 24px var(--home-pad) 0;
  }

  .page-home .hero-title {
    font-size: clamp(42px, 6vw, 72px);
  }

  .page-home .ranking-grid {
    grid-template-columns: 1.7fr 1fr;
    gap: 28px;
    align-items: start;
  }

  .page-home .ranking-panel {
    padding: 28px;
  }

  .page-home .service-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .page-home .service-note {
    grid-column: span 3;
  }

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

  .page-home .service-card:nth-child(even):hover,
  .page-home .service-card:nth-child(even):focus-visible {
    transform: translateY(7px);
  }

  .page-home .return-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
  }

  .page-home .index-table {
    margin-bottom: 28px;
  }

  .page-home .index-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
