summary {
    font-weight: bold;
}

details p {
    margin-left: 1rem;
}
/* Enable transitions to keyword sizes like 'auto' */
html {
  interpolate-size: allow-keywords;
}

/* 1. Container and Layout Setup */
[name="accordion"] {
  width: 100%;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
}

/* 2. Styling the Summary (Header) */
[name="accordion"] summary {
  padding: 1rem;
  cursor: pointer;
  list-style: none; /* Hide standard browser arrow */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hide WebKit-specific native summary arrows */
[name="accordion"] summary::-webkit-details-marker {
  display: none;
}

/* 3. Creating a Custom, Animatable Arrow */
[name="accordion"] summary::before {
  content: "+";
  display: inline-block;
  transition: transform 0.3s ease;
  color: var(--complementary);
}

/* Rotate arrow when disclosure is open */
[name="accordion"][open] summary::before {
  transform: rotate(45deg);
}

/* 4. Animating the Inner Content Box */
[name="accordion"]::details-content {
  block-size: 0;
  opacity: 0;
  overflow: hidden;
  transition-property: block-size, opacity, content-visibility;
  transition-duration: 0.3s;
  transition-timing-function: ease;
  transition-behavior: allow-discrete; /* Essential for handling state flips */
}

/* Define the expanded end-state */
[name="accordion"][open]::details-content {
  block-size: auto;
  opacity: 1;
}

/* Optional padding wrapper inside the content */
.content-wrapper {
  padding: 1rem;
}
