:root {
  /* Removes the section end markers */
  --ornament: "";
}

h2::before,
h3::before {
  /* remove indexing */
  content: none !important;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Responsive fallback */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

article {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Aligns content to top */
  height: 100%;
  padding: 2rem;
  border: 1px solid var(--cmed); /* Use classless.css variable for consistency */
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  background-color: var(--cbg);
  position: relative; /* All articles should be relative for consistency */
}

article:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  border-color: var(--cemph); /* Link hover color to theme primary */
}

article.plan {
  border: 2px solid var(--cemph);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 20px;
}

article.plan::before {
  position: absolute;
  top: -12px;
  right: 15px;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 1;
  border: 2px solid var(--cemph);
  background: var(--clight);
  color: var(--cemph);
}

article.plan.current {
  border-style: dashed;
  background-color: var(--clight);
}

/* Current Badge - Higher priority styling */
article.plan.current::before {
  content: "Your Plan";
}

/* Popular Badge - Only shows if NOT current */
article.plan.popular:not(.current)::before {
  content: "Popular";
}

/* Remove underlines from all links by default */
a,
a[href^="#"] {
  text-decoration: none !important;
  color: var(--clink);
  transition: color 0.2s ease;
}

/* Add underline on hover */
a:hover,
a[href^="#"]:hover {
  text-decoration: underline !important;
}

/* External link icon (as requested previously) */
a[href^="http"]::after {
  content: " ↗";
  display: inline-block;
  font-size: 0.85em;
  margin-left: 0.2rem;
  opacity: 0.7;
  /* Ensure the icon doesn't get underlined */
  text-decoration: none !important;
}
