/* Existing smartathome world; isolated catalogue/rail, loaded only on home + partner. */
.sah-systems-showcase {
  background: linear-gradient(115deg, #07171c, #0d101d 70%, #160c20);
  border-block: 1px solid var(--sah-line);
}
.sah-systems-showcase.sah-section { padding-block: 64px; }
.sah-systems-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.sah-systems-heading > div:first-child { max-width: 740px; }
.sah-systems-heading h2 { max-width: 22ch; }
.sah-systems-heading .sah-section-intro { margin-bottom: 0; }
.sah-systems-player { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sah-systems-player button, .sah-systems-reset {
  min-height: 44px; padding: 8px 14px; color: var(--sah-text); font: inherit; font-size: 14px; font-weight: 650;
  background: var(--sah-ink); border: 1px solid #426873; border-radius: 12px; cursor: pointer;
}
.sah-systems-player button:hover, .sah-systems-reset:hover:not(:disabled) { border-color: var(--sah-cyan); }
.sah-systems-player button:disabled, .sah-systems-reset:disabled { color: var(--sah-muted); cursor: default; }
.sah-systems-play { min-width: 94px; }
.sah-systems-arrow { width: 44px; display: grid; place-items: center; }
.sah-systems-arrow span { width: 9px; height: 9px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.sah-systems-arrow--prev span { transform: rotate(-135deg); }
.sah-systems-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 12px; overflow-x: auto;
  list-style: none; margin: 30px 0 18px; padding: 4px 3px 14px; scroll-snap-type: x proximity;
  scrollbar-color: #487580 var(--sah-surface); scrollbar-width: thin; overscroll-behavior-x: contain;
}
.sah-systems-rail li { min-width: 0; margin: 0; padding: 0; scroll-snap-align: start; }
.sah-system-tile {
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  min-height: 132px; padding: 18px 12px 14px; border: 1px solid #35535c; border-radius: 16px;
  background: var(--sah-ink); color: var(--sah-text); text-decoration: none;
  transition: border-color 180ms ease-out, background-color 180ms ease-out;
}
.sah-system-tile:hover { border-color: var(--sah-cyan); background: #0a1b23; color: var(--sah-text); }
.sah-system-mark { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-width: 0; height: 68px; background: #fff; color: #081116; padding: 8px; border-radius: 8px; }
.sah-system-mark--text { color: #081116; font-weight: 700; font-size: 19px; text-align: center; line-height: 1.3; }
.sah-system-mark--text > span { overflow-wrap: anywhere; }
.sah-system-mark img { display: block; width: auto; height: auto; max-width: 100%; max-height: 60px; object-fit: contain; }
.sah-system-tile__category { color: var(--sah-muted); font-size: 12px; line-height: 1.5; margin-top: 10px; }
.sah-system-tile__category--name { color: var(--sah-text); font-weight: 600; font-size: 14px; }
.sah-systems-footer { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.sah-systems-footer p { max-width: 72ch; font-size: 13px; line-height: 1.65; color: var(--sah-muted); margin: 0; }
.sah-systems-footer .sah-text-link { flex-shrink: 0; max-width: 30ch; font-size: 14px; }
.sah-systems-cta { margin-top: 28px; display: flex; gap: 18px; align-items: center; }
.sah-systems-cta > span { font-size: 16px; font-weight: 600; }
.sah-systems-controls { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-top: 28px; }
.sah-systems-controls > div { min-width: 0; }
.sah-systems-controls label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.sah-systems-controls input, .sah-systems-controls select {
  box-sizing: border-box; width: 100%; min-height: 48px; margin: 0; padding: 12px 14px;
  color: var(--sah-text); background: var(--sah-surface); border: 1px solid #426873; border-radius: 12px;
  font: inherit; font-size: 16px; caret-color: var(--sah-cyan); color-scheme: dark;
}
.sah-systems-controls input::placeholder { color: var(--sah-muted); opacity: 1; }
.sah-systems-reset { min-height: 48px; }
.sah-systems-count { margin: 24px 0 16px; color: var(--sah-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.sah-system-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; list-style: none; padding: 0; margin: 0; }
.sah-system-entry { display: flex; flex-direction: column; min-width: 0; padding: 26px 0 24px; margin: 0; border-top: 1px solid var(--sah-line); scroll-margin-top: 160px; }
.sah-system-entry .sah-system-mark { max-width: 180px; height: 68px; margin-bottom: 18px; }
.sah-system-reference { display: block; width: 100%; max-width: 180px; border-radius: 8px; }
.sah-system-entry .sah-system-mark img { max-height: 50px; }
/* The original 2N square includes clear space; 62px keeps its visible mark above the 50px brand minimum. */
.sah-system-mark img[src$="/2n.svg"] { width: 62px; height: 62px; max-height: 62px; }
.sah-system-entry__body { flex: 1; }
.sah-system-entry h3 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; overflow-wrap: anywhere; }
.sah-system-entry p { font-size: 14px; line-height: 1.65; margin: 0 0 12px; color: var(--sah-muted); }
.sah-system-entry__type { display: block; color: var(--sah-muted); font-size: 12px; line-height: 1.6; }
.sah-system-entry__link { display: inline-flex; align-items: center; align-self: start; gap: 10px; min-height: 44px; margin-top: 10px; font-size: 13px; font-weight: 650; color: var(--sah-cyan); text-underline-offset: 4px; }
.sah-system-entry__link > span:last-child { display: inline-block; width: 7px; height: 7px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); }
.sah-system-entry:target { border-top-color: var(--sah-magenta); }
.sah-system-entry:target h3 { text-decoration: underline; text-decoration-color: var(--sah-magenta); text-underline-offset: 5px; }
.sah-systems-more { display: flex; justify-content: center; padding-top: 20px; }
.sah-systems-empty { padding: 28px 0; max-width: 720px; }
.sah-systems-attribution { color: var(--sah-muted); max-width: 90ch; font-size: 12px; line-height: 1.7; margin-top: 32px; }
.sah-systems-showcase :focus-visible, .sah-systems-directory :focus-visible { outline: 2px solid var(--sah-cyan); outline-offset: 4px; }
.sah-systems-showcase [hidden], .sah-systems-directory [hidden] { display: none !important; }
@media (max-width: 1023px) {
  .sah-systems-heading { display: block; }
  .sah-systems-player { margin-top: 22px; }
  .sah-system-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sah-systems-footer { display: block; }
  .sah-systems-footer .sah-text-link { display: inline-flex; margin-top: 12px; }
  .sah-systems-controls { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .sah-systems-reset { justify-self: start; }
}
@media (max-width: 639px) {
  .sah-systems-showcase.sah-section { padding-block: 40px; }
  .sah-systems-heading h2 { max-width: 20ch; }
  .sah-systems-rail { grid-auto-columns: minmax(146px, 46%); margin-top: 22px; }
  .sah-system-tile { padding: 12px 10px; min-height: 120px; }
  .sah-system-mark--text { font-size: 17px; }
  .sah-system-results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .sah-system-entry { padding-block: 22px; }
  .sah-system-entry h3 { font-size: 17px; }
  .sah-system-entry p { font-size: 13px; }
  .sah-system-entry__type { font-size: 11px; }
  .sah-system-entry__link { font-size: 12px; }
  .sah-systems-controls { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .sah-systems-cta { flex-direction: column; align-items: stretch; gap: 12px; }
  .sah-systems-cta .sah-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sah-system-tile { transition: none; }
  .sah-systems-rail { scroll-behavior: auto; }
}
