/* Shared native disclosures: opening, closing and form state remain browser-owned.
   The class-qualified selector also supersedes older component-only spacing. */
body details,
body details[class] {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  margin: 14px 0;
  padding: 0 16px;
  border: 1px solid #aabca0;
  border-radius: 15px;
  background: #f8faf2;
  color: #214536;
}
body details[open] { padding-bottom: 16px; }
body details > summary,
body details[class] > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  min-height: 64px;
  margin: 0 -16px;
  padding: 16px;
  border-radius: 14px;
  background: #e3ebd9;
  color: #214536;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
body details > summary::-webkit-details-marker { display: none; }
body details > summary::marker { content: ''; }
body details > summary::after {
  content: '';
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin: -4px 3px 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
body details[open] > summary {
  margin-bottom: 14px;
  border-bottom: 1px solid #b7c7ad;
  border-radius: 14px 14px 0 0;
}
body details[open] > summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
}
body details > summary:focus-visible {
  outline: 3px solid #315b45;
  outline-offset: 3px;
}
body details > summary:active,
body details[class] > summary:active { background: #d7e3ca; }
body details > .portal-check { margin: 12px 0; }
body details .portal-check span { min-width: 0; overflow-wrap: anywhere; }

/* Date totals and holiday cues keep their existing meaning. */
body details.ts-day > summary::before { content: none; }
body details.ts-day > summary > span { min-width: 0; }
body details.ts-day > summary > strong { flex-shrink: 0; white-space: nowrap; }
body details.is-holiday { background: #fff9d8; border-color: #b5a85b; }
body details.is-holiday > summary { background: #fff1ae; }

/* Forecast subtitle stays below its heading rather than crowding the chevron. */
body details.hourly-details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  gap: 2px 14px;
}
body details.hourly-details > summary > span {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}
body details.hourly-details > summary::after {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
}
body details.official-alert { border-left: 3px solid #788b5a; }
body .alerts-dialog details.official-alert { margin: 14px 0; }
@media (hover: hover) {
  body details > summary:hover,
  body details[class] > summary:hover { background: #dce7d1; }
  body details.is-holiday > summary:hover { background: #ffed9a; }
}
