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

.oj-home-hero {
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.14), rgba(255, 255, 255, 0) 42%),
    #ffffff;
  border: 1px solid var(--oj-border);
  border-radius: var(--oj-radius);
  box-shadow: var(--oj-shadow-md);
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  overflow: hidden;
  padding: 30px;
  position: relative;
}

.oj-home-hero::before {
  background: linear-gradient(180deg, #0f172a, #164e63);
  content: "";
  height: 100%;
  opacity: 0.035;
  position: absolute;
  right: 0;
  top: 0;
  width: 38%;
}

.oj-home-hero-copy,
.oj-practice-panel {
  position: relative;
  z-index: 1;
}

.oj-home-title {
  color: #0f172a;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.02;
  margin-bottom: 16px;
  max-width: 780px;
}

.oj-home-title.is-typing::after {
  color: var(--oj-accent);
  content: "|";
  margin-left: 4px;
}

.oj-home-kicker {
  align-items: center;
  color: var(--oj-accent-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.oj-home-kicker::before {
  background: var(--oj-accent);
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.oj-home-copy {
  color: #475569;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 680px;
}

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

.oj-practice-panel {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--oj-radius);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.20);
  color: #f8fafc;
  padding: 22px;
}

.oj-practice-panel input {
  background: rgba(255, 255, 255, 0.96);
}

.oj-practice-panel .form-label,
.oj-practice-panel .text-muted {
  color: #cbd5e1 !important;
}

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

.oj-segmented button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #f8fafc;
  font-weight: 700;
  padding: 8px 12px;
}

.oj-segmented button:hover,
.oj-segmented button:focus {
  border-color: rgba(103, 232, 249, 0.8);
  color: #ffffff;
}

.oj-segmented button.active {
  background: #67e8f9;
  border-color: #67e8f9;
  color: #0f172a;
}

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

.oj-home-stat {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--oj-border);
  border-radius: var(--oj-radius);
  box-shadow: var(--oj-shadow-sm);
  padding: 18px;
}

.oj-home-stat strong {
  color: #0f172a;
  display: block;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.oj-problem-grid {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-auto-rows: minmax(176px, auto);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.oj-problem-card {
  color: inherit;
  display: grid;
  grid-template-rows: auto minmax(64px, 1fr) auto;
  min-height: 176px;
  padding: 16px;
  text-decoration: none;
  transform: none !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.oj-problem-card:hover {
  border-color: rgba(8, 145, 178, 0.45);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.10);
  color: inherit;
  transform: none !important;
}

.oj-problem-card-title {
  color: #0f172a;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 64px;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.oj-problem-card-tags {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 58px;
  overflow: hidden;
}

.oj-problem-card-tag {
  background: #eef2f7;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 5px 9px;
  white-space: normal;
}

.oj-home-stat,
.oj-home-actions .btn,
.oj-segmented button {
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .oj-home-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767.98px) {
  .oj-home-hero {
    padding: 22px;
  }

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