/* Smart Home only. Shared QUAMARO tokens are consumed without modifying them. */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--q-bg);
  color: var(--q-ink);
  font: 16px/1.55 var(--q-font);
}
a {
  color: var(--q-theme-accent-dark);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
:focus-visible {
  outline: 3px solid #0f7aa8;
  outline-offset: 4px;
}
input,
select {
  min-height: 46px;
  border: 1px solid #a6b5c3;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #fff;
  color: var(--q-ink);
  width: 100%;
  min-width: 0;
}
input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: #0f7aa8;
}
label {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
}
label small {
  display: block;
  color: var(--q-text);
  font-weight: 400;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
legend {
  font-weight: 750;
  margin: 0 0 0.7rem;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: var(--q-display);
  font-size: clamp(2rem, 4.5vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.03rem;
  line-height: 1.4;
}
p {
  color: var(--q-text);
}
[hidden] {
  display: none !important;
}
.sh-shell {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}
@media screen and (min-width: 781px), screen and (scripting: enabled) {
  main.sh-shell {
    min-block-size: calc(100svh - 3.75rem);
  }
}
.sh-header {
  background: #fff;
  border-bottom: 1px solid var(--q-line);
}
.sh-header-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.sh-logo {
  display: block;
  width: 174px;
  height: auto;
}
.sh-studio {
  border-left: 1px solid var(--q-line-strong);
  padding-left: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
}
.sh-studio span {
  display: block;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--q-text);
  margin-top: 3px;
}
.sh-project-link {
  margin-left: auto;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 750;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.sh-skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.8rem;
  background: #fff;
}
.sh-skip:focus {
  top: 1rem;
}
.sh-hero {
  padding: 2.75rem 0 2rem;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 3rem;
  align-items: center;
}
.sh-hero h1 {
  max-width: 600px;
}
.sh-hero p {
  max-width: 58ch;
  margin-bottom: 0;
}
.sh-hero-note {
  padding: 1.5rem 1.7rem;
  border: 1px solid #ccdfec;
  border-radius: 22px;
  background: linear-gradient(140deg, #e7f5fb, #fff);
}
.sh-hero-note strong {
  display: block;
  font-size: 1.08rem;
  margin: 0.5rem 0;
}
.sh-hero-note .sh-orbit {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #fff;
  font-size: 1.5rem;
  color: #0f7aa8;
}
.sh-hero-note p {
  font-size: 0.88rem;
}
.sh-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.25rem;
  align-items: start;
}
.sh-sidebar {
  position: sticky;
  top: 1.5rem;
  padding-top: 1rem;
}
.sh-sidebar h2 {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--q-text);
  margin-bottom: 1rem;
}
.sh-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.sh-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--q-text);
  padding: 0.8rem 0.7rem;
  border-radius: 12px;
  min-height: 48px;
  font-size: 0.9rem;
  font-weight: 650;
}
.sh-step span {
  display: grid;
  place-items: center;
  border: 1px solid #cbd6df;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 0.72rem;
  flex-shrink: 0;
}
.sh-step[aria-current="step"] {
  background: #e3f1f8;
  color: #0b5e82;
}
.sh-step[aria-current="step"] span {
  background: #0f7aa8;
  color: #fff;
  border-color: #0f7aa8;
}
.sh-mini {
  margin: 1.5rem 0.7rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--q-line);
  font-size: 0.8rem;
  color: var(--q-text);
}
.sh-mini strong {
  display: block;
  font-size: 1.08rem;
  color: var(--q-ink);
}
.sh-card {
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--q-line);
  border-radius: 22px;
  box-shadow: 0 12px 30px #102a4707;
  min-width: 0;
}
.sh-card-head {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1.8rem;
}
.sh-card-head h2 {
  margin-bottom: 0.5rem;
}
.sh-card-head p {
  margin-bottom: 0;
  font-size: 0.93rem;
}
.sh-count {
  font-size: 0.8rem;
  color: var(--q-theme-accent-dark);
  white-space: nowrap;
  padding: 0.35rem 0.6rem;
  border-radius: 7px;
  background: #e7f5fb;
}
.sh-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}
.sh-fields > label input,
.sh-fields > label select {
  margin-top: 0.4rem;
}
.sh-wide {
  grid-column: 1/-1;
}
.sh-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.sh-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid #cbd6df;
  border-radius: 12px;
  min-height: 54px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
}
.sh-choice:has(input:checked) {
  background: #edf8fc;
  border-color: #0f7aa8;
  color: #0b5e82;
}
.sh-choice input {
  flex-shrink: 0;
}
.sh-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.sh-actions .sh-spacer {
  flex: 1;
}
.sh-bottom {
  border-top: 1px solid var(--q-line);
  padding-top: 1.3rem;
  margin-top: 1.75rem;
}
.sh-note {
  background: #f0f5f9;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--q-text);
  margin: 1.25rem 0;
}
.sh-note strong {
  display: block;
  color: var(--q-ink);
}
.sh-save {
  font-size: 0.76rem;
  color: var(--q-text);
  margin-top: 1rem;
  min-height: 1.2em;
}
.sh-linkbtn {
  border: 0;
  background: none;
  color: #0b5e82;
  text-decoration: underline;
  min-height: 44px;
  padding: 0.4rem 0.5rem;
  font-size: 0.88rem;
}
.sh-danger {
  color: #9c3030;
}
.sh-room {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--q-line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.65rem;
}
.sh-room strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.sh-room small {
  color: var(--q-text);
  font-size: 0.78rem;
}
.sh-room .sh-linkbtn {
  flex-shrink: 0;
}
.sh-empty {
  border: 1px dashed #b6c9d8;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  color: var(--q-text);
  font-size: 0.9rem;
}
.sh-domainnav {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0 0 0.8rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}
.sh-domainnav button {
  white-space: nowrap;
  min-height: 44px;
  border-radius: 30px;
  border: 1px solid #c9d7e2;
  background: #fff;
  color: var(--q-text);
  padding: 0.55rem 0.85rem;
  font-size: 0.83rem;
}
.sh-domainnav button[aria-pressed="true"] {
  background: #102a47;
  color: #fff;
  border-color: #102a47;
}
.sh-feature {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--q-line);
  border-radius: 14px;
  margin: 0.65rem 0;
}
.sh-feature h3 {
  margin: 0 0 0.2rem;
}
.sh-feature p {
  font-size: 0.82rem;
  margin: 0;
}
.sh-feature button {
  min-height: 44px;
  font-size: 0.83rem;
}
.sh-need {
  border: 1px solid #ccdfeb;
  border-radius: 14px;
  padding: 1rem;
  margin-top: 0.75rem;
  background: #fbfdff;
}
.sh-need-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.sh-need-head h3 {
  margin: 0;
}
.sh-need .sh-fields {
  gap: 0.8rem;
}
.sh-need details {
  margin-top: 1rem;
}
details > summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: #0b5e82;
  min-height: 44px;
  padding: 0.55rem 0;
  font-weight: 650;
}
details[open] > summary {
  margin-bottom: 0.6rem;
}
.sh-help {
  font-size: 0.8rem;
  margin-bottom: 1rem;
}
.sh-inventory {
  padding: 1rem;
  background: #f6f8fb;
  border: 1px solid var(--q-line);
  border-radius: 14px;
  margin: 0.8rem 0;
}
.sh-badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  font-size: 0.73rem;
  line-height: 1.5;
  font-weight: 750;
  border: 1px solid #d0dce7;
  border-radius: 7px;
  background: #edf2f7;
  color: #42596c;
}
.sh-badge.confirmed {
  color: #196342;
  background: #e9f5ee;
  border-color: #a5cbb6;
}
.sh-badge.conditional {
  color: #805000;
  background: #fff4da;
  border-color: #dfc28a;
}
.sh-badge.incompatible {
  color: #a02432;
  background: #fff0f1;
  border-color: #e5a8b0;
}
.sh-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.5rem 0;
}
.sh-metric {
  padding: 1.1rem;
  border-radius: 15px;
  border: 1px solid var(--q-line);
  background: #fff;
}
.sh-metric small {
  display: block;
  color: var(--q-text);
  font-size: 0.76rem;
}
.sh-metric strong {
  display: block;
  font-size: 1.35rem;
  margin: 0.3rem 0;
}
.sh-metric.sh-highlight {
  background: #102a47;
  color: #fff;
}
.sh-metric.sh-highlight small {
  color: #cedce9;
}
.sh-cost-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 125px;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--q-line);
  align-items: center;
}
.sh-cost-row strong {
  display: block;
  font-size: 0.9rem;
}
.sh-cost-row small {
  font-size: 0.77rem;
  color: var(--q-text);
}
.sh-cost-row label {
  font-size: 0.75rem;
}
.sh-cost-row input {
  margin-top: 0.2rem;
}
.sh-quote {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0.8rem 0;
}
.sh-quote label {
  font-size: 0.78rem;
  flex: 1;
  min-width: 120px;
}
.sh-result-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 2.7rem 0 0;
}
.sh-result-head h1 {
  font-size: 2.7rem;
  margin: 0.2rem 0 0.6rem;
  overflow-wrap: anywhere;
}
.sh-result-head p {
  font-size: 0.85rem;
}
.sh-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 1.25rem;
}
.sh-result-grid .sh-card {
  padding: 1.5rem;
}
.sh-result-grid .sh-wide {
  grid-column: 1/-1;
}
.sh-room-summary {
  padding: 1rem 0;
  border-bottom: 1px solid var(--q-line);
}
.sh-room-summary h3 {
  margin-bottom: 0.35rem;
}
.sh-room-summary p {
  font-size: 0.86rem;
  margin-bottom: 0.5rem;
}
.sh-result-list {
  padding-left: 1.1rem;
  color: var(--q-text);
  font-size: 0.88rem;
}
.sh-result-list li {
  margin: 0.45rem 0;
}
.sh-check {
  padding: 1rem 0;
  border-bottom: 1px solid var(--q-line);
}
.sh-check h3 {
  margin: 0.4rem 0;
}
.sh-check ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--q-text);
}
.sh-tablewrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}
th,
td {
  padding: 0.8rem 0.65rem;
  border-bottom: 1px solid var(--q-line);
  vertical-align: top;
}
th {
  font-size: 0.76rem;
  color: var(--q-text);
}
td small {
  display: block;
  color: var(--q-text);
}
.sh-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--q-line);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.sh-footer img {
  height: auto;
}
.sh-footer p {
  font-size: 0.82rem;
  margin: 0;
}
.sh-footer p span {
  display: block;
  font-size: 0.74rem;
  margin-top: 0.3rem;
}
#sh-message:not(:empty),
#sh-conflict {
  padding: 1rem;
  border: 1px solid #dfc28a;
  border-radius: 13px;
  background: #fff6e3;
  margin-top: 1rem;
  font-size: 0.88rem;
}
#sh-message:empty {
  display: none;
}
#sh-conflict p {
  color: #694900;
}
dialog {
  border: 1px solid var(--q-line);
  border-radius: 20px;
  max-width: min(500px, calc(100% - 2rem));
  padding: 1.5rem;
  color: var(--q-ink);
}
dialog::backdrop {
  background: #102a4777;
}
.sh-recovery {
  margin: 3rem auto;
  max-width: 700px;
}
.sh-over {
  color: #a02432 !important;
}
.sh-inline-summary {
  font-size: 0.8rem;
  color: var(--q-text);
  margin-top: 1rem;
}
.sh-revision {
  font-size: 0.75rem;
  color: var(--q-text);
}
@media (max-width: 900px) {
  .sh-shell {
    width: calc(100% - 2rem);
  }
  .sh-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1rem;
  }
  .sh-card {
    padding: 1.4rem;
  }
  .sh-options {
    grid-template-columns: 1fr 1fr;
  }
  .sh-hero {
    gap: 1.5rem;
  }
  .sh-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .sh-result-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .sh-shell {
    width: calc(100% - 1.5rem);
  }
  .sh-header-inner {
    min-height: 72px;
    gap: 0.6rem;
  }
  .sh-logo {
    width: 128px;
  }
  .sh-studio {
    font-size: 0.78rem;
    padding-left: 0.7rem;
  }
  .sh-studio span {
    font-size: 0.64rem;
  }
  .sh-project-link {
    font-size: 0.76rem;
    gap: 0.2rem;
    max-width: 85px;
  }
  .sh-hero {
    display: block;
    padding: 1.6rem 0 1.25rem;
  }
  .sh-hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.65rem;
  }
  .sh-hero p {
    font-size: 0.9rem;
  }
  .sh-hero-note {
    display: none;
  }
  .sh-layout {
    display: block;
  }
  .sh-sidebar {
    position: static;
    padding: 0;
  }
  .sh-sidebar h2,
  .sh-mini {
    display: none;
  }
  .sh-steps {
    display: flex;
    overflow-x: auto;
    margin: 0 0 0.8rem;
    gap: 0.3rem;
    padding-bottom: 0.3rem;
  }
  .sh-steps li {
    flex-shrink: 0;
  }
  .sh-step {
    padding: 0.55rem;
    gap: 0.4rem;
    font-size: 0.75rem;
    min-height: 44px;
  }
  .sh-step span {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }
  .sh-step:not([aria-current="step"]) {
    font-size: 0;
    gap: 0;
  }
  .sh-card {
    padding: 1.15rem;
    border-radius: 17px;
  }
  .sh-card-head {
    margin-bottom: 1.25rem;
  }
  .sh-card-head h2 {
    font-size: 1.3rem;
  }
  .sh-card-head p {
    font-size: 0.85rem;
  }
  .sh-fields {
    gap: 0.9rem;
    grid-template-columns: 1fr;
  }
  .sh-wide {
    grid-column: auto;
  }
  .sh-options {
    grid-template-columns: 1fr 1fr;
  }
  .sh-choice {
    padding: 0.7rem;
    font-size: 0.82rem;
    gap: 0.5rem;
  }
  .sh-bottom {
    margin-top: 1.25rem;
  }
  .sh-bottom .q-btn {
    padding: 0.7rem 0.85rem;
  }
  .sh-feature {
    padding: 0.85rem;
    gap: 0.5rem;
  }
  .sh-feature h3 {
    font-size: 0.9rem;
  }
  .sh-feature p {
    font-size: 0.77rem;
  }
  .sh-feature .q-btn {
    padding: 0.6rem 0.7rem;
  }
  .sh-need .sh-fields {
    grid-template-columns: 1fr 1fr;
  }
  .sh-need .sh-fields .sh-wide {
    grid-column: 1/-1;
  }
  .sh-cost-row {
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 0.6rem;
  }
  .sh-cost-row .sh-cost-total {
    grid-column: 1/-1;
    font-size: 0.78rem;
    text-align: right;
  }
  .sh-result-head {
    display: block;
    padding-top: 1.5rem;
  }
  .sh-result-head h1 {
    font-size: 2.2rem;
  }
  .sh-metrics {
    gap: 0.6rem;
  }
  .sh-metric {
    padding: 0.85rem;
  }
  .sh-metric strong {
    font-size: 1.15rem;
  }
  .sh-result-grid .sh-card {
    padding: 1.1rem;
  }
  .sh-result-grid .sh-wide {
    grid-column: auto;
  }
  .sh-footer {
    display: block;
    margin-top: 2rem;
  }
  .sh-footer img {
    margin-bottom: 0.7rem;
  }
  .sh-room {
    flex-wrap: wrap;
    padding: 0.7rem;
  }
  .sh-room small {
    display: none;
  }
  table {
    font-size: 0.78rem;
  }
  th,
  td {
    padding: 0.65rem 0.4rem;
  }
  .sh-revision {
    overflow-wrap: anywhere;
  }
}
@media print {
  body {
    background: #fff;
    font-size: 10pt;
  }
  .sh-header,
  .sh-footer,
  .sh-actions,
  .sh-sidebar,
  .sh-hero,
  #sh-message,
  #sh-planning-drafts,
  #sh-conflict,
  dialog,
  .sh-skip {
    display: none !important;
  }
  .sh-shell {
    width: 100%;
  }
  .sh-result-head {
    padding-top: 0;
  }
  .sh-result-grid {
    display: block;
  }
  .sh-card,
  .sh-metric {
    box-shadow: none;
    border-color: #bbb;
    break-inside: avoid;
    margin-bottom: 1rem;
  }
  .sh-metrics {
    grid-template-columns: repeat(4, 1fr);
  }
  details {
    display: block;
  }
  details > * {
    display: block !important;
  }
  summary {
    display: none;
  }
  .sh-check {
    break-inside: avoid;
  }
  /* Keep section/phase headings and individual rows together in paged output. */
  h2,
  h3 {
    break-after: avoid;
  }
  .sh-wide > h2 + p {
    break-after: avoid;
    break-inside: avoid;
  }
  .sh-room-summary,
  tr {
    break-inside: avoid;
  }
  thead {
    display: table-header-group;
    break-after: avoid;
  }
  button,
  .sh-save,
  summary {
    display: none !important;
  }
  details::details-content {
    content-visibility: visible;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  .sh-result-head h1 {
    font-size: 24pt;
  }
  .sh-tablewrap {
    overflow: visible;
  }
}
/* P2 stays inside the existing five stages and project view. */
.sh-advice { margin: 1.5rem 0; }
.sh-recommendations, .sh-option-grid, .sh-phases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.sh-recommendation, .sh-option, .sh-phases article, .sh-automation, .sh-selected {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--q-line);
  border-radius: 14px;
  background: var(--q-surface, #fff);
  overflow-wrap: anywhere;
}
.sh-recommendation h3, .sh-recommendation h4, .sh-option h4 { margin: .35rem 0 .7rem; font-size: 1rem; }
.sh-recommendation p, .sh-option p, .sh-option li, .sh-recommendation li,
.sh-automation p, .sh-automation li, .sh-automation dl { font-size: .85rem; line-height: 1.6; }
.sh-recommendation ul, .sh-option ul, .sh-automation ul { padding-left: 1.2rem; }
.sh-selected { background: #f1f7f8; margin-bottom: .8rem; }
.sh-chosen { border: 2px solid var(--q-accent, #20756e); }
.sh-comparison > summary { font-weight: 650; min-height: 44px; }
.sh-option-grid { margin-top: 1rem; }
.sh-option dl, .sh-automation dl { margin: 1rem 0; }
.sh-option dt, .sh-automation dt { font-weight: 650; margin-top: .6rem; }
.sh-option dd, .sh-automation dd { margin-left: 0; overflow-wrap: anywhere; }
.sh-prerequisite { padding: .8rem 0; border-bottom: 1px solid var(--q-line); }
.sh-prerequisite p { margin: .5rem 0 0; }
.sh-automation { margin: 1rem 0; }
.sh-cost-breakdown { margin: 1.5rem 0; }
.sh-cost-breakdown caption { text-align: left; font-weight: 650; padding: .7rem 0; }
.sh-phases { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sh-phases p { font-size: .8rem; }
[data-p2-preview] { margin-top: 1rem; }
.sh-advice-summary, .sh-automation-summary { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .sh-option-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .sh-recommendations, .sh-phases { grid-template-columns: 1fr; }
  .sh-recommendation, .sh-option, .sh-automation { padding: .85rem; }
  .sh-recommendation .q-btn, .sh-option .q-btn { width: 100%; white-space: normal; }
}
@media print {
  .sh-advice-summary, .sh-automation-summary, .sh-cost-breakdown { break-inside: auto; }
  .sh-recommendations, .sh-phases { display: block; }
  .sh-recommendation, .sh-automation, .sh-phases article, .sh-prerequisite { break-inside: avoid; margin-bottom: .6rem; }
  .sh-recommendation p, .sh-recommendation li, .sh-automation p, .sh-automation li, .sh-automation dl { font-size: 9pt; }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
.sh-models { margin: 1rem 0; }
.sh-model-item { margin: 1rem 0; padding: 1rem; border: 1px solid var(--q-line); border-radius: 14px; overflow-wrap: anywhere; }
@media print {
  @page { size: A4; margin: 12mm; }
  .sh-model-summary { break-inside: auto; }
  .sh-model-item { break-inside: avoid; font-size: 9pt; }
  .sh-model-item h3 { font-size: 11pt; }
}


/* P3 uses the existing studio grid and print document. */
.sh-system-planning { margin-bottom: 2rem; }
.sh-shopping { overflow-wrap: anywhere; }
.sh-shopping-totals { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; padding: 1rem; background: #eaf3f2; border-radius: 12px; }
.sh-shopping-lines { margin: 1.2rem 0; }
.sh-shopping-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, .3fr); gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--q-line); }
.sh-shopping-line h3 { font-size: 1.05rem; margin-top: .3rem; }
.sh-shopping-price { text-align: right; }
.sh-shopping-price strong { font-size: 1.2rem; }
.sh-shopping-price small { display: block; }
.sh-shopping-line p, .sh-shopping-line li, .sh-shopping-line dl { font-size: .85rem; line-height: 1.6; }
.sh-shopping-line dd { margin-left: 0; }
.sh-shopping-line dt { font-weight: 650; margin-top: .6rem; }
.sh-shopping-recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: .75rem;
}
.sh-shopping-recommendation {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: .9rem;
  border: 1px solid var(--q-line);
  border-radius: 12px;
}
.sh-shopping-recommendation dl { margin-block: .75rem; }
.sh-shopping-recommendation dt { font-weight: 650; }
.sh-shopping-recommendation dd { margin: 0 0 .4rem; }
.sh-shopping-recommendation .q-btn { white-space: normal; }
.sh-product-image { max-width: 100%; height: auto; }
.sh-offers { margin-block: .55rem; padding-inline-start: 1.25rem; overflow-wrap: anywhere; }
.sh-offers li + li { margin-top: .65rem; }
.sh-fach-cost-row > .sh-wide { grid-column: 1 / -1; min-width: 0; }
.sh-shopping summary, .sh-system-planning summary { min-height: 44px; cursor: pointer; }
.sh-sources a { display: inline-block; padding: .3rem 0; }
@media screen and (max-width: 440px) {
  .sh-fach-screen .sh-fach-cost-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .sh-shopping-line { grid-template-columns: minmax(0, 1fr); }
  .sh-shopping-price { text-align: left; }
  .sh-shopping-totals { display: grid; }
}
@media print {
  .sh-shopping, .sh-shopping-line, .sh-shopping details { break-inside: auto; }
  .sh-shopping-line { display: block; padding: 3mm 0; }
  .sh-shopping-line > div { break-inside: avoid; }
  .sh-shopping-line > div:first-child { break-after: avoid; }
  .sh-shopping-line dt { break-after: avoid; }
  .sh-shopping-line dd { break-inside: avoid; }
  .sh-shopping-price { text-align: left; }
  .sh-shopping-totals, .sh-product-unknowns li, .sh-offers li { break-inside: avoid; }
  .sh-shopping p, .sh-shopping li, .sh-shopping dl { font-size: 9pt; }
  .sh-shopping .sh-actions { display: none; }
  .sh-fach-print .sh-fach-print-offers { break-inside: auto; }
  .sh-fach-print-offers h4 { break-after: avoid; margin-bottom: .25rem; }
}

.sh-project-fachlinks {
  margin-bottom: .7rem;
  gap: .35rem 1rem;
}

.sh-project-fachlinks a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media print {
  .sh-project-tools {
    display: none !important;
  }
}

.sh-guided {
  margin-block: 1.25rem 1.75rem;
  overflow-wrap: anywhere;
}
.sh-guided > [data-guided-summary] {
  margin-block: 1rem;
  padding: 0;
  border: 0;
  box-shadow: none;
}
.sh-guided h1,
.sh-guided h2,
#compatibility,
#sh-scenes-title,
#sh-shopping-title,
#sh-setup-title,
#sh-setup-stages {
  scroll-margin-block-start: 6rem;
}
.sh-guided-start {
  margin-block: 1.5rem;
}
.sh-guided-start > p,
.sh-guided > p {
  max-inline-size: 66ch;
}
.sh-guided-goals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: .65rem;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}
.sh-guided-goal {
  min-inline-size: 0;
}
.sh-guided-goals :is([data-guided-goal], [data-guided-device-goal]) {
  display: grid;
  align-content: center;
  gap: .25rem;
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 48px;
  min-inline-size: 0;
  padding: .75rem 1rem;
  border: 1px solid var(--q-line-strong);
  border-radius: 12px;
  color: var(--q-theme-accent-dark);
  background: var(--q-surface, #fff);
  text-align: start;
  text-decoration: none;
  line-height: 1.35;
}
.sh-guided-goals :is([data-guided-goal], [data-guided-device-goal]):is(:hover, [aria-current], [aria-pressed="true"]) {
  border-color: var(--q-theme-accent-dark);
  background: #edf5f8;
}
.sh-guided-goals :is([data-guided-goal], [data-guided-device-goal]) small {
  display: block;
  color: var(--q-text);
}
.sh-guided-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem 1rem;
  margin-block: 1rem;
}
.sh-guided-fields input,
.sh-guided-fields select {
  margin-block-start: .35rem;
}
.sh-guided-fields [aria-invalid="true"] {
  border: 2px solid #9c3030;
}
.sh-guided-continue {
  margin-block: 1rem;
}
.sh-guided-continue h3,
.sh-guided-purchase h3 {
  margin: 0;
}
.sh-guided-continue input[aria-invalid="true"],
.sh-guided-continue select[aria-invalid="true"] {
  border-color: #9c3030;
}
.sh-guided-purchase {
  border-block-start: 1px solid var(--q-line);
  padding-block-start: 1rem;
}
.sh-guided #sh-tech-inventory {
  margin-block-start: 1rem;
}
.sh-guided-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0 1rem;
  margin-block: 1rem;
}
.sh-guided-overview > div {
  min-inline-size: 0;
  padding-block: .6rem;
  border-block-start: 1px solid var(--q-line);
}
.sh-guided-overview dt {
  font-weight: 750;
}
.sh-guided-overview dd {
  margin-inline-start: 0;
  color: var(--q-text);
}
.sh-hue-answers,
.sh-hue-answers label {
  min-inline-size: 0;
}
.sh-hue-answers select {
  inline-size: 100%;
  max-inline-size: 100%;
}
.sh-hue-outcome {
  margin-block: .6rem;
}
.sh-hue-outcome > div {
  padding-block: .4rem;
}
@media (max-width: 460px) {
  .sh-hue-outcome {
    grid-template-columns: minmax(0, 1fr);
  }
}
.sh-guided-next {
  padding: .8rem 1rem;
  border-inline-start: 3px solid var(--q-theme-accent-dark);
  border-radius: 0 8px 8px 0;
  background: #edf5f8;
}
.sh-journey {
  margin-block: 1rem;
}
.sh-journey > a,
.sh-shopping .sh-actions > a.q-btn {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  max-inline-size: 100%;
  white-space: normal;
}
.sh-guided-error {
  color: #9c3030;
  font-weight: 650;
}
.sh-guided-error:empty {
  margin: 0;
}
.sh-guided .sh-actions > :is(a, button),
.sh-guided-details > summary {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  max-inline-size: 100%;
  white-space: normal;
  text-align: start;
}
.sh-guided-details > summary {
  display: list-item;
  cursor: pointer;
}
.sh-guided-print {
  display: none;
}
@media (max-width: 650px) {
  .sh-guided-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media print {
  .sh-guided-start,
  .sh-guided-continue,
  .sh-guided-goals,
  .sh-guided-fields,
  .sh-guided-error {
    display: none !important;
  }
  .sh-guided-print {
    display: block;
    break-inside: avoid;
  }
}

.sh-project-selection {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin-block: 1rem;
}
.sh-project-selection .sh-dash-list {
  padding-inline-start: 0;
  list-style: none;
}
.sh-project-selection .sh-dash-list a {
  display: flex;
  align-items: center;
  min-block-size: 44px;
  overflow-wrap: anywhere;
}
