/* ================================================================
   DOWNLOADS SECTION
================================================================ */
.hlx-dl-section {
  background: var(--clr-bg);
  padding: 48px 0 64px;

}

/* ── Horizontal Tabs ── */
.hlx-dl-tabs-wrap {
  margin-bottom: 28px;
}
.hlx-dl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  border-bottom: none;
}
.hlx-dl-tab {
  background: transparent;
  border: none;
  padding: 10px 0px;
  font-size: calc(15px * var(--a11y-font-scale, 1));
  font-weight: 500;
  color: var(--clr-text);
  cursor: pointer;
  font-family: var(--font);
  border-bottom: 4px solid transparent;
  transition: color var(--tr), border-color var(--tr);
  white-space: nowrap;
  line-height: 1.4;
}
.hlx-dl-tab:hover { color: var(--clr-primary); }
.hlx-dl-tab--active {
  color: var(--clr-primary);
  border-bottom: 4px solid var(--clr-primary);
  font-weight: 500;
}
.hlx-dl-tab:focus-visible {
  outline: 4px solid var(--clr-primary);
  outline-offset: 4px;
  border-radius: 4px;
}
.hlx-dl-tabs-border {
  height: 1px;
  background: var(--clr-border);
  margin-top: -1px;
}

/* ── Tab Panels ── */
.hlx-dl-panel { display: none; }
.hlx-dl-panel--active { display: block; }

/* ── Main Accordion ── */
.hlx-dl-accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hlx-dl-acc-item {
  border: 1px solid var(--clr-border);
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--clr-white);
}
.hlx-dl-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--clr-white);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: calc(15px * var(--a11y-font-scale, 1));
  font-weight: 500;
  color: var(--clr-text);
  text-align: left;
  transition: background var(--tr), color var(--tr);
}
.hlx-dl-acc-trigger:hover { background: #fafafa; }
.hlx-dl-acc-trigger[aria-expanded="true"] { color: var(--clr-text); }
.hlx-dl-acc-trigger[aria-expanded="true"] .hlx-dl-acc-arrow {
  transform: rotate(180deg);
}
.hlx-dl-acc-trigger:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: -2px;
}
.hlx-dl-acc-arrow {
  flex-shrink: 0;
  transition: transform var(--tr);
  color: var(--clr-text-muted);
}

/* Accordion body */
.hlx-dl-acc-body {
  border-top: 1px solid var(--clr-border);
  padding: 16px;
}
.hlx-dl-acc-body--closed { display: none; }

/* ── Year Accordion ── */
.hlx-dl-year-acc {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hlx-dl-year-item {
  border: 1px solid var(--clr-border);
  border-radius: 4px;
  margin-bottom: 6px;
  overflow: hidden;
  background: var(--clr-white);
}
.hlx-dl-year-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--clr-white);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: calc(15px * var(--a11y-font-scale, 1));
  font-weight: 500;
  color: var(--clr-text);
  text-align: left;
  transition: background var(--tr);
}
.hlx-dl-year-trigger:hover { background: #fafafa; }
.hlx-dl-year-trigger[aria-expanded="true"] .hlx-dl-acc-arrow {
  transform: rotate(180deg);
}
.hlx-dl-year-trigger:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: -2px;
}
.hlx-dl-year-body {
  border-top: 1px solid var(--clr-border);
  padding: 12px;
}
.hlx-dl-year-body--closed { display: none; }

/* ── Month Accordion ── */
.hlx-dl-month-item {
  border: 1px solid var(--clr-border);
  border-radius: 4px;
  margin-bottom: 6px;
  overflow: hidden;
}
.hlx-dl-month-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--clr-white);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: calc(15px * var(--a11y-font-scale, 1));
  font-weight: 500;
  color: var(--clr-text);
  text-align: left;
  transition: background var(--tr);
}
.hlx-dl-month-trigger:hover { background: #fafafa; }
.hlx-dl-month-trigger[aria-expanded="true"] .hlx-dl-acc-arrow {
  transform: rotate(180deg);
}
.hlx-dl-month-trigger:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: -2px;
}
.hlx-dl-month-body {
  border-top: 1px solid var(--clr-border);
  padding: 16px;
}
.hlx-dl-month-body--closed { display: none; }

/* ── Files Grid — 2 columns ── */
.hlx-dl-files-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.hlx-dl-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0px;
  font-size: calc(14px * var(--a11y-font-scale, 1));
  color: var(--clr-text);
  text-decoration: none;
  transition: color var(--tr), background var(--tr);
}
.hlx-dl-file:hover {
  color: var(--clr-primary);
}
.hlx-dl-file:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}
.hlx-dl-file img {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}
/* Remove bottom border from last 2 items (last row) */
.hlx-dl-files-grid .hlx-dl-file:nth-last-child(-n+2) {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 600px) {
  .hlx-dl-files-grid { grid-template-columns: 1fr; }
  .hlx-dl-files-grid .hlx-dl-file:last-child { border-bottom: none; }
  .hlx-dl-tab { padding: 8px 10px; font-size: calc(12px * var(--a11y-font-scale, 1)); }
}

/* Dark mode */
body.dark-mode .hlx-dl-acc-item,
body.dark-mode .hlx-dl-year-item,
body.dark-mode .hlx-dl-month-item { background: var(--clr-surface); border-color: var(--clr-border); }
body.dark-mode .hlx-dl-acc-trigger,
body.dark-mode .hlx-dl-year-trigger,
body.dark-mode .hlx-dl-month-trigger { background: var(--clr-surface); color: var(--clr-text); }
body.dark-mode .hlx-dl-file { color: var(--clr-text); border-color: var(--clr-border); }
body.dark-mode .hlx-dl-file:hover { background: rgba(227,123,36,0.1); }