/* Smart-Home-Themenfarbe und Ratgeberlayout im gemeinsamen QUAMARO-Design. */
.sh-editorial {
  --sh-accent: #345879;
  --sh-accent-strong: #223e59;
  --sh-surface: #eaf1f8;
  --sh-rule: #d5e0eb;
  --qds-paper: #f5f7fa;
  --qds-copper: var(--sh-accent);
  --qds-copper-hover: var(--sh-accent-strong);
  --qds-line: var(--sh-rule);
  --qguide-line: var(--sh-rule);
  --qguide-copper: var(--sh-accent);
  --qguide-petrol: var(--sh-accent-strong);
  background: var(--qds-paper);
}

.sh-editorial [id] {
  scroll-margin-top: 1.5rem;
}

.sh-editorial :is(#sh-guide-find, #uebergabe-im-alltag) {
  scroll-margin-block-start: 6rem;
}

.sh-guide-find-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: .6rem 1rem;
}

.sh-guide-find-controls label {
  display: grid;
  gap: .25rem;
  min-width: 0;
  font-weight: 650;
}

.sh-guide-find-controls :is(input, select) {
  font: inherit;
  font-weight: 400;
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--sh-accent);
  border-radius: 8px;
  padding: .5rem .6rem;
  background: #fff;
  color: var(--sh-accent-strong);
}

.sh-guide-find-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1rem;
  margin-block: .7rem 1.15rem;
}

.sh-guide-find-meta p {
  margin: 0;
}

.sh-guide-find-controls[hidden],
.sh-editorial [data-guide-situations][hidden] {
  display: none;
}

@media (max-width: 640px) {
  .sh-guide-find-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .sh-guide-find-controls button {
    justify-self: start;
  }
}

.sh-editorial :is(.qds-title, .qguide-section-head h2, .sh-reading h2, .sh-checklist h2) {
  font-family: var(--q-display, Georgia, serif);
}

.sh-editorial :is(a, summary):focus-visible {
  outline: 3px solid var(--sh-accent);
  outline-offset: 3px;
}

.sh-editorial .qds-button {
  line-height: 1.3;
  padding-block: .6rem;
  text-align: center;
}

.sh-editorial .qds-button:not(.qds-button--secondary) {
  box-shadow: var(--qds-shadow-sm);
}

.sh-editorial .qds-section {
  padding-block: clamp(2.25rem, 5.5vw, 4rem);
}

.sh-editorial .qds-subpage-hero + .qds-section {
  padding-top: 1rem;
}

.sh-editorial .sh-keep-together {
  white-space: nowrap;
}

.sh-editorial .qguide-card__media {
  height: auto;
}

.sh-editorial .qguide-card__body :last-child {
  margin-bottom: 0;
}

.sh-editorial :is(.sh-quick-links, .sh-next, .sh-checklist, .sh-partner) {
  background: var(--sh-surface);
  border: 1px solid var(--sh-rule);
  border-radius: var(--qds-radius-lg);
  padding: clamp(1.15rem, 3vw, 1.85rem);
}

.sh-editorial .sh-quick-links .qds-title,
.sh-editorial .sh-next .qds-title {
  margin-bottom: 1rem;
}

.sh-editorial .sh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.sh-editorial .sh-more-links {
  margin-block: .7rem 0;
  column-gap: 1.25rem;
}

.sh-editorial :is(.sh-reading, .sh-more-links, .sh-checklist, .sh-toc) a:not(.qds-button) {
  color: var(--sh-accent-strong);
  text-decoration: underline;
  text-underline-offset: .18em;
  overflow-wrap: anywhere;
}

.sh-editorial .sh-checklist-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.sh-editorial .sh-checklist h2 {
  margin: 0;
  color: var(--qds-ink);
  font-size: var(--qds-font-size-h3);
  letter-spacing: -.02em;
  line-height: 1.25;
}

.sh-editorial .sh-checklist li + li {
  margin-top: .55rem;
}

.sh-editorial .sh-checklist p:last-child {
  margin-bottom: 0;
}

body.qds-scope .sh-editorial .qds-subpage-hero.sh-article-hero {
  --qds-font-size-h1: clamp(2.25rem, 4.1vw, 3.35rem);
  --qds-subpage-hero-title-width: 18ch;
}

/* Editorial images stay inset and retain the complete 4:3 or 16:9 motif. */
body.qds-scope .sh-editorial .qds-subpage-hero .qds-subpage-hero__media {
  height: auto;
  aspect-ratio: auto;
  box-shadow: none;
}

body.qds-scope .sh-editorial .qds-subpage-hero .qds-subpage-hero__media > img {
  height: auto;
  min-height: 0;
  aspect-ratio: revert-layer;
  object-fit: contain;
}

.sh-editorial .sh-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 46rem) minmax(13rem, 20rem);
  grid-template-areas: "reading toc";
  justify-content: space-between;
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-block: .75rem clamp(3rem, 6vw, 5.5rem);
}

.sh-editorial .sh-toc {
  grid-area: toc;
  min-width: 0;
}

.sh-editorial .sh-toc details {
  border: 1px solid var(--sh-rule);
  border-radius: var(--qds-radius-md);
  background: var(--qds-surface);
  padding: .4rem 1rem .65rem;
}

.sh-editorial .sh-toc summary {
  min-height: 44px;
  align-content: center;
  color: var(--qds-ink);
  font-weight: 800;
  cursor: pointer;
}

.sh-editorial .sh-toc ol {
  margin: 0;
  padding-left: 1.4rem;
}

.sh-editorial :is(.sh-toc, .sh-more-links) a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.sh-editorial .sh-reading {
  grid-area: reading;
  min-width: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.sh-editorial .sh-reading > section + section {
  margin-top: clamp(1.8rem, 4vw, 2.75rem);
}

.sh-editorial .sh-reading h2 {
  margin: 0 0 .8rem;
  color: var(--qds-ink);
  font-size: clamp(1.45rem, 2.55vw, 2rem);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.sh-editorial .sh-reading p,
.sh-editorial .sh-reading :is(ol, ul) {
  max-width: 67ch;
  margin-block: 0 1rem;
}

.sh-editorial .sh-reading li + li {
  margin-top: .55rem;
}

.sh-editorial .sh-partner {
  border-inline-start: .25rem solid var(--sh-accent);
}

.sh-editorial .sh-partner p.sh-partner-label {
  margin-block-end: .5rem;
  color: var(--sh-accent-strong);
  font-size: .875rem;
}

.sh-editorial .sh-partner .qds-button {
  max-width: 100%;
  min-height: 44px;
  white-space: normal;
}

.sh-editorial .sh-partner p.sh-partner-privacy {
  margin: .25rem 0 0;
}

.sh-editorial .sh-partner-privacy a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.sh-editorial .sh-sources {
  border-top: 1px solid var(--sh-rule);
  padding-top: 1.35rem;
}

@media (max-width: 820px) {
  .sh-editorial .sh-article-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "toc" "reading";
  }
}

@media (max-width: 600px) {
  .sh-editorial .sh-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .sh-editorial .sh-reading {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-editorial .qguide-card {
    transition: none;
  }

  .sh-editorial .qguide-card:hover {
    transform: none;
  }
}
