/* HDS public controls. HeroUI secondary Tabs pattern, adapted to vanilla HTML.
   Product controllers retain ownership of selection, filtering and panels. */
body {
  --hds-control-ink: #111;
  --hds-control-muted: #666;
  --hds-control-line: #dedede;
  --hds-control-wash: #f4f4f4;
}
body .hds-control-list.hds-control-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
  height: auto;
  padding: 0 2px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #b8b8b8 transparent;
  border: 0;
  border-bottom: 1px solid var(--hds-control-line);
  background: transparent;
  -webkit-overflow-scrolling: touch;
}
body .hds-control-list.hds-control-list > button {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 44px;
  min-height: 48px;
  height: auto;
  margin: 0;
  padding: 12px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--hds-control-muted);
  font: 400 14px/1.4 'Inter HDS', Inter, Arial, sans-serif;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
  touch-action: manipulation;
}
body .hds-control-list.hds-control-list > button::after { content: none; }
body .hds-control-list.hds-control-list > button:is([aria-selected="true"], [aria-pressed="true"], [data-current="true"], .is-active) {
  border-bottom: 2px solid var(--hds-control-ink);
  background: transparent;
  color: var(--hds-control-ink);
  font-weight: 500;
  text-decoration: none;
}
body .hds-control-list.hds-control-list > button:is([aria-selected="true"], [aria-pressed="true"], [data-current="true"], .is-active)::after { content: none; }
body .hds-control-list.hds-control-list > button:focus-visible {
  outline: 2px solid var(--hds-control-ink);
  outline-offset: -3px;
  background: var(--hds-control-wash);
}
body .hds-control-list.hds-control-list > button:active { background: var(--hds-control-wash); }
body .hds-control-list.hds-control-list > button:is(:disabled, [aria-disabled="true"]) {
  opacity: .45;
  cursor: not-allowed;
}
@media (hover: hover) {
  body .hds-control-list.hds-control-list > button:not(:disabled):hover { color: var(--hds-control-ink); background: var(--hds-control-wash); }
}
/* Existing home mobile rules have high specificity; keep the shared rail intact. */
body .hdt-filters > .hds-control-list { flex: 1; }
body .hds-public-today .hdt-filters { border: 0; min-height: 0; padding-bottom: 0; }
body .hdt-filters > span:empty { display: none; }
body .editions-periods.hds-control-list { margin-block: 16px; }

/* Use the same thin, round-ended vector vocabulary as the existing HDS reader. */
body .hds-ui-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  vertical-align: -.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
body :is(.hds-home-select-chevron, .hds-focus-close > span) .hds-ui-icon { vertical-align: middle; }
body :is(.cookie-preferences-close, .editions-search-clear, #focus [data-close], #filter-sheet button[aria-label="Close filters"]) {
  min-width: 44px;
  min-height: 44px;
}
/* Native form semantics are retained; their visible affordances use HDS vectors. */
body select:not([multiple]):not([size]):not(.is-hds-enhanced) {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  padding-inline-end: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-size: 18px 18px;
  background-repeat: no-repeat;
}
body .editions-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
body summary { list-style: none; }
body summary::-webkit-details-marker { display: none; }
@media (max-width: 760px) {
  body .hds-control-list.hds-control-list { gap: 20px; scroll-padding-inline: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  body .hds-control-list.hds-control-list > button { transition: none; }
}

/* Spaces entry points: two editorial link groups, distinct from selection tabs. */

/* HDS grammar: explicit text CTAs keep their hairline; card titles use burgundy. */
body { --hds-burgundy: #581b27; }
body :is(.hs-intent-links a, .hs-shop-pieces a, a.hdt-story, a.de-space-card, a.space-card, a.directory-hub-card, a.directory-city-card, a.space-page-related-card, .brand-project-grid a, .hs-calendar-view li a, button.open-product),
body :is(.hs-intent-links a, .hs-shop-pieces a, a.hdt-story, a.de-space-card, a.space-card, a.directory-hub-card, a.directory-city-card, a.space-page-related-card, .brand-project-grid a, .hs-calendar-view li a, button.open-product) :is(strong, h2, h3, b, .space-title) { text-decoration: none; }
body :is(.hs-intent-links a, .hs-shop-pieces a, a.hdt-story, a.de-space-card, a.space-card, a.directory-hub-card, a.directory-city-card, a.space-page-related-card, .brand-project-grid a, .hs-calendar-view li a, button.open-product):focus-visible {
  outline: 2px solid var(--hds-burgundy);
  outline-offset: 4px;
}
body :is(.hs-intent-links a, .hs-shop-pieces a, a.hdt-story, a.de-space-card, a.space-card, a.directory-hub-card, a.directory-city-card, a.space-page-related-card, .brand-project-grid a, .hs-calendar-view li a, button.open-product):is(:focus-visible, :active) :is(strong, h2, h3, b, .space-title) {
  color: var(--hds-burgundy);
  text-decoration: none;
}
@media (hover: hover) {
  body :is(.hs-intent-links a, .hs-shop-pieces a, a.hdt-story, a.de-space-card, a.space-card, a.directory-hub-card, a.directory-city-card, a.space-page-related-card, .brand-project-grid a, .hs-calendar-view li a, button.open-product):hover,
  body :is(.hs-intent-links a, .hs-shop-pieces a, a.hdt-story, a.de-space-card, a.space-card, a.directory-hub-card, a.directory-city-card, a.space-page-related-card, .brand-project-grid a, .hs-calendar-view li a, button.open-product):hover :is(strong, h2, h3, b, .space-title) { text-decoration: none; }
  body :is(.hs-intent-links a, .hs-shop-pieces a, a.hdt-story, a.de-space-card, a.space-card, a.directory-hub-card, a.directory-city-card, a.space-page-related-card, .brand-project-grid a, .hs-calendar-view li a, button.open-product):hover :is(strong, h2, h3, b, .space-title) { color: var(--hds-burgundy); }
}
@media (prefers-reduced-motion: no-preference) {
  body :is(.hs-intent-links a, .hs-shop-pieces a, a.hdt-story, a.de-space-card, a.space-card, a.directory-hub-card, a.directory-city-card, a.space-page-related-card, .brand-project-grid a, .hs-calendar-view li a, button.open-product) :is(strong, h2, h3, b, .space-title) { transition: color 160ms ease; }
}

/* Text navigation uses the same burgundy feedback as linked cards. */
body :is(.hs-discover-nav a, .about-links a, .directory-link-group a, .route-link-group a, .route-switcher a, .space-page-crumbs a) { text-decoration: none; }
body :is(.hs-discover-nav a, .about-links a, .directory-link-group a, .route-link-group a, .route-switcher a, .space-page-crumbs a):focus-visible {
  outline: 2px solid var(--hds-burgundy);
  outline-offset: 4px;
}
body :is(.hs-discover-nav a, .about-links a, .directory-link-group a, .route-link-group a, .route-switcher a, .space-page-crumbs a):is(:focus-visible, :active) { color: var(--hds-burgundy); }
@media (hover: hover) {
  body :is(.hs-discover-nav a, .about-links a, .directory-link-group a, .route-link-group a, .route-switcher a, .space-page-crumbs a):hover {
    color: var(--hds-burgundy);
    text-decoration: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  body :is(.hs-discover-nav a, .about-links a, .directory-link-group a, .route-link-group a, .route-switcher a, .space-page-crumbs a) { transition: color 160ms ease; }
}

/* Keep Spaces filter menus on the same axis as their heading and dropdown. */
body.site-directory .directory-filter-menus.hds-control-list {
  justify-content: safe center;
}

body.site-editions .editions-discovery-bar .editions-search input[type="search"] { border: 0; border-bottom: 1px solid #aaa; border-radius: 0; box-shadow: none; background: transparent; min-height: 44px; font-size: 16px; }
body.site-editions .editions-discovery-bar .editions-search input[type="search"]:focus-visible { outline: none; border-bottom-color: #111; }

/* Keep the content rail steady between short and long result lists. */
html { scrollbar-gutter: stable; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 120ms; }
}
