.oj-home-shell {
  display: grid;
  gap: 28px;
}

.oj-home-hero {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  padding: 8px 0 0;
}

.oj-home-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 36px;
}

.oj-home-title {
  color: var(--oj-heading);
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 16px;
  max-width: 760px;
}

.oj-home-logo {
  display: block;
  height: auto;
  margin-bottom: 18px;
  width: min(240px, 60%);
}

.oj-home-copy {
  color: var(--oj-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 680px;
}

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

.oj-practice-panel {
  padding: 24px 26px;
}

.oj-practice-note {
  border-top: 1px solid var(--oj-border-faint);
  padding-top: 14px;
}

.oj-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.oj-segmented button {
  background: var(--oj-panel-muted);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--oj-text-soft);
  font-size: 13px;
  font-weight: 500;
  min-height: 38px;
  padding: 6px 16px;
  transition: background 0.15s ease, color 0.15s ease;
}

.oj-segmented button:hover,
.oj-segmented button:focus {
  background: var(--oj-hover-bg);
  color: var(--oj-heading);
}

.oj-segmented button.active {
  background: var(--oj-primary);
  color: var(--oj-primary-contrast);
  font-weight: 600;
}

.oj-home-stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.oj-home-stat {
  min-width: 0;
  padding: 18px 20px;
}

.oj-home-stat strong {
  color: var(--oj-heading);
  display: block;
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 7px;
}

.oj-problem-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oj-problem-card {
  color: inherit;
  display: block;
  min-height: 156px;
  padding: 20px 22px;
  text-decoration: none;
}

.oj-problem-card:hover {
  color: inherit;
}

.oj-problem-card-code {
  color: var(--oj-muted);
  font-family: var(--oj-font-mono);
  font-size: 13px;
}

.oj-problem-card-title {
  color: var(--oj-heading);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}

.oj-problem-card-tags {
  color: var(--oj-muted);
  font-size: 12px;
}

@media (max-width: 991.98px) {
  .oj-home-hero {
    align-items: start;
    gap: 14px;
    grid-template-columns: 1fr;
    padding-top: 0;
  }
}

@media (max-width: 767.98px) {
  .oj-home-shell {
    gap: 20px;
  }

  .oj-home-hero-copy {
    padding: 24px 22px;
  }

  .oj-home-title {
    font-size: clamp(28px, 9vw, 40px);
  }

  .oj-home-stat-grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oj-problem-grid {
    grid-template-columns: 1fr;
  }
}
