/* ==========================================================================
   "Byg nyt med Shelly" — the inspiration page. Loaded on that page only
   (extraCss). Same tokens and the same card language as site.css; what is
   different is the width — the page is a tour, not a column of steps — and
   the house at the top, which is the one place on the site that moves.
   Every animation is switched off under prefers-reduced-motion.
   ========================================================================== */

/* The page is wider than a guide. :has() keeps it to this page without a
   class on <body>; a browser without :has() gets the ordinary guide column,
   which is narrower and otherwise the same page. */
:root:has(.nb) { --wrap-guide: 1180px; }

.nb { --nb-gap: 18px; }
.nb h2 { text-wrap: balance; }
.nb h3 {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sg-muted); margin: 20px 0 8px; font-weight: 800;
}

/* --- Three layers --------------------------------------------------------- */
.nb-principle {
  display: grid; gap: 18px 28px; align-items: center;
  background: var(--sg-paper); border: 1px solid var(--sg-line);
  border-radius: var(--sg-r); box-shadow: var(--sg-shadow);
  padding: 24px 26px; margin: 0 0 var(--nb-gap);
}
@media (min-width: 960px) { .nb-principle { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); } }
.nb-principle h2 { margin: 0 0 8px; }
.nb-principle__head p { margin: 0; color: var(--sg-muted); }
.nb-layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 700px) { .nb-layers { grid-template-columns: repeat(3, 1fr); } }
.nb-layer {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 16px 16px 16px 18px; border-radius: var(--sg-r-sm);
  background: var(--sg-tint); border: 1px solid var(--sg-line);
  font-size: 14px; color: var(--sg-muted);
}
.nb-layer strong { color: var(--sg-navy); font-size: 16px; }
.nb-layer__n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sg-navy); color: #fff; font-weight: 800; font-size: 14px; margin-bottom: 4px;
}
.nb-layer--2 .nb-layer__n { background: var(--sg-blue); }
.nb-layer--3 .nb-layer__n { background: var(--sg-sky); color: var(--sg-midnight); }

/* --- The house ------------------------------------------------------------ */
.nb-house {
  background: linear-gradient(160deg, var(--sg-navy) 0%, var(--sg-midnight) 70%);
  border-radius: var(--sg-r); box-shadow: var(--sg-shadow-lift);
  color: #fff; padding: 22px 22px 10px; margin: 0 0 var(--nb-gap); overflow: hidden;
}
.nb-house__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.nb-house h2 { color: #fff; margin: 0; }
.nb-house__head p { margin: 0; color: var(--sg-sky); font-size: 15px; }
.nb-house__scroll { overflow-x: auto; margin: 6px -22px 0; padding: 0 22px; }
.nb-house__scroll:focus-visible { outline: 2px solid var(--sg-sky); outline-offset: -2px; }
.nb-svg { display: block; width: 100%; min-width: 760px; height: auto; }
.nb-house__caption {
  min-height: 1.6em; margin: 0 0 8px; text-align: center; font-weight: 700; color: #fff;
  font-size: 15px;
}

.nb-art { transition: opacity .25s, filter .25s; }
.nb-house.is-focus .nb-art { opacity: .28; }
.nb-house.is-focus .nb-art.is-active { opacity: 1; filter: drop-shadow(0 0 8px rgba(170, 225, 250, .9)); }

.nb-spot { cursor: pointer; }
.nb-spot text { fill: var(--sg-midnight); pointer-events: none; }
.nb-spot__dot { fill: #fff; stroke: var(--sg-blue); stroke-width: 3; transition: fill .15s, stroke .15s; }
.nb-spot__ring { fill: none; stroke: #fff; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: nb-ring 3.6s ease-out infinite; }
.nb-spot:hover .nb-spot__dot, .nb-spot:focus-visible .nb-spot__dot, .nb-spot.is-active .nb-spot__dot { fill: #ffd98a; stroke: #fff; }
.nb-spot:focus { outline: none; }
.nb-spot:focus-visible .nb-spot__dot { stroke-width: 5; }
.nb-spot.is-off { opacity: .25; }
.nb-spot.is-on-plan .nb-spot__dot { fill: #8dffb0; stroke: #fff; }

@keyframes nb-ring { 0% { transform: scale(1); opacity: .7; } 60%, 100% { transform: scale(2.1); opacity: 0; } }
@keyframes nb-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes nb-wifi { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes nb-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes nb-hue { to { filter: hue-rotate(360deg); } }
@keyframes nb-flow { to { stroke-dashoffset: -48; } }
@keyframes nb-spin { to { transform: rotate(360deg); } }
@keyframes nb-awning { 0%, 12% { transform: scale(.18); } 38%, 74% { transform: scale(1); } 100% { transform: scale(.18); } }
@keyframes nb-curtain { 0%, 15% { transform: scaleX(1); } 45%, 75% { transform: scaleX(.35); } 100% { transform: scaleX(1); } }
@keyframes nb-skylight { 0%, 20% { transform: rotate(0); } 45%, 80% { transform: rotate(-17deg); } 100% { transform: rotate(0); } }
@keyframes nb-rise { 0% { transform: translateY(6px); opacity: 0; } 40% { opacity: .8; } 100% { transform: translateY(-10px); opacity: 0; } }
@keyframes nb-drop { 0% { transform: translateY(-12px); opacity: 0; } 30% { opacity: 1; } 80%, 100% { transform: translateY(4px); opacity: 0; } }

.nb-blink { animation: nb-blink 2.2s ease-in-out infinite; }
.nb-wifi path { animation: nb-wifi 2.4s ease-in-out infinite; }
.nb-wifi path:nth-child(2) { animation-delay: .3s; }
.nb-wifi path:nth-child(3) { animation-delay: .6s; }
.nb-radar path { animation: nb-wifi 2.8s ease-in-out infinite; }
.nb-radar path:nth-child(2) { animation-delay: .35s; }
.nb-radar path:nth-child(3) { animation-delay: .7s; }
.nb-lampglow { animation: nb-breathe 5s ease-in-out infinite; }
.nb-ledglow { animation: nb-hue 14s linear infinite; }
.nb-flow { animation: nb-flow 2.4s linear infinite; }
.nb-spin { animation: nb-spin 3.2s linear infinite; }
.nb-awning { animation: nb-awning 11s ease-in-out infinite; }
.nb-curtain { animation: nb-curtain 13s ease-in-out infinite; }
.nb-skylight { animation: nb-skylight 12s ease-in-out infinite; }
.nb-heat path, .nb-air path { animation: nb-rise 3.4s ease-in-out infinite; }
.nb-heat path:nth-child(2), .nb-air path:nth-child(2) { animation-delay: 1.2s; }
.nb-drop { animation: nb-drop 3.6s ease-in infinite; }
.nb-sun__rays { animation: nb-spin 40s linear infinite; }

/* --- Filter and index ----------------------------------------------------- */
.nb-nav {
  background: var(--sg-paper); border: 1px solid var(--sg-line); border-radius: var(--sg-r);
  box-shadow: var(--sg-shadow); padding: 16px 18px; margin: 0 0 var(--nb-gap);
}
.nb-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--sg-line); }
.nb-filter[hidden] { display: none; }
.nb-filter__label { font-size: 13px; font-weight: 700; color: var(--sg-muted); }
.nb-filter__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nb-chip {
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--sg-line);
  background: var(--sg-shell); color: var(--sg-navy); transition: background .15s, color .15s, border-color .15s;
}
.nb-chip:hover { border-color: var(--sg-blue); }
.nb-chip.is-on { background: var(--sg-navy); border-color: var(--sg-navy); color: #fff; }
.nb-index { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .nb-index { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .nb-index { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.nb-index li { display: flex; }
.nb-index li[hidden] { display: none; }
.nb-index a {
  flex: 1; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 10px;
  min-height: 44px; padding: 6px 10px; border-radius: var(--sg-r-sm);
  text-decoration: none; color: var(--sg-navy); font-weight: 700; font-size: 14px; line-height: 1.25;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.nb-index a:hover, .nb-index a.is-active { background: var(--sg-tint); border-color: var(--sg-line); }
.nb-index a.is-on-plan .nb-index__n { background: #1f9d55; }
.nb-index__n {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; line-height: 1;
  background: var(--sg-navy); color: #fff; font-size: 12px; font-weight: 800;
}

/* --- One solution (layout v2) ---------------------------------------------
   Top: text, and the mood image filling the other half edge to edge. Foot:
   preparation and devices on a tinted band. The card has no padding of its
   own, so the image can reach the corner. */
.nb-sol {
  scroll-margin-top: 84px; overflow: hidden;
  background: var(--sg-paper); border: 1px solid var(--sg-line); border-radius: var(--sg-r);
  box-shadow: var(--sg-shadow); margin: 0 0 var(--nb-gap);
  transition: box-shadow .3s, border-color .3s, opacity .5s, transform .5s;
}
.nb-sol[hidden] { display: none; }
.nb-sol:target { border-color: var(--sg-blue); box-shadow: var(--sg-shadow-lift); }
.nb-sol.is-on-plan { border-color: #1f9d55; }
.nb.is-ready .nb-sol.is-waiting { opacity: 0; transform: translateY(18px); }

.nb-sol__top { display: grid; }
.nb-sol__main { padding: 26px 28px 24px; display: grid; gap: 4px 34px; align-content: start; }
@media (max-width: 600px) { .nb-sol__main { padding: 20px; } }
@media (min-width: 900px) {
  .nb-sol--media .nb-sol__top { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  /* No image: the text and its points share the width instead. */
  .nb-sol:not(.nb-sol--media) .nb-sol__main { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .nb-sol:not(.nb-sol--media) .nb-sol__points > :first-child { margin-top: 44px; }
}

.nb-mood { margin: 0; position: relative; min-height: 220px; background: var(--sg-tint); }
.nb-mood { overflow: hidden; }
.nb-mood img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s ease; }
.nb-sol:hover .nb-mood img { transform: scale(1.03); }
@media (max-width: 899px) { .nb-mood { order: -1; aspect-ratio: 16 / 9; min-height: 0; } }

.nb-sol__kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.nb-num {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sg-navy); color: #fff; font-weight: 800; font-size: 15px;
}
.nb-cat { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sg-blue-600); }
.nb-sol h2 { margin: 0 0 10px; font-size: clamp(21px, 2.3vw, 26px); }
.nb-sol__intro > p { margin: 0 0 10px; max-width: 62ch; }
.nb-sol__more { margin: 12px 0 0 !important; font-weight: 700; font-size: 15px; }
.nb-sol__points h3 { margin-top: 14px; }

.nb-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px 22px; font-size: 15px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.nb-benefits li { position: relative; padding-left: 28px; }
.nb-benefits li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--sg-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.4' fill='none' stroke='%23003C82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.nb-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nb-facts li { padding: 12px 14px; border-radius: var(--sg-r-sm); background: var(--sg-tint); border: 1px solid var(--sg-line); display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 2px 14px; align-items: baseline; }
.nb-facts strong { grid-row: span 2; font-size: 20px; font-weight: 800; color: var(--sg-navy); line-height: 1.15; }
.nb-facts__label { font-weight: 700; font-size: 14px; color: var(--sg-midnight); }
.nb-facts__note { font-size: 13px; color: var(--sg-muted); }

/* The foot: preparation | devices, and the plan button under the devices. */
.nb-sol__foot {
  display: grid; gap: 18px 34px; padding: 20px 28px 22px;
  background: var(--sg-shell); border-top: 1px solid var(--sg-line);
}
@media (max-width: 600px) { .nb-sol__foot { padding: 18px 20px 20px; } }
@media (min-width: 900px) { .nb-sol__foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); } }
/* No devices (the network card): the preparation list takes the width in two columns. */
@media (min-width: 900px) {
  .nb-sol__foot--solo { grid-template-columns: minmax(0, 1fr); }
  .nb-sol__foot--solo .nb-prep ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; }
}
.nb-sol__foot h3 { margin: 0 0 10px; }
.nb-prep h3 { color: var(--sg-amber); }
.nb-prep ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 15px; }
.nb-prep li { position: relative; padding-left: 24px; }
.nb-prep li::before { content: ""; position: absolute; left: 0; top: .32em; width: 13px; height: 13px; border: 2px solid var(--sg-amber); border-radius: 4px; background: var(--sg-paper); }

/* Devices as compact rows. Still .sg-part — same content, same order — only
   drawn small: photo to the left, name, EAN and note beside it. */
.nb-kit__list { display: grid; gap: 8px; }
@media (min-width: 620px) { .nb-kit__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nb-kit .sg-part {
  display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 12px; align-content: center;
  padding: 10px 12px; background: var(--sg-paper);
}
.nb-kit .sg-part__shot { grid-row: 1 / span 4; align-self: center; width: 54px; height: 54px; margin: 0; }
.nb-kit .sg-part__shot img { max-width: 54px; max-height: 54px; width: auto; height: auto; object-fit: contain; }
.nb-kit .sg-part strong { font-size: 14px; line-height: 1.25; }
.nb-kit .sg-part__ean { font-size: 11px; margin: 1px 0 2px; }
.nb-kit .sg-part p { font-size: 13px; line-height: 1.35; }
.nb-kit .sg-part > :not(.sg-part__shot) { grid-column: 2; }
.nb-soon { border-style: dashed; }
.nb-soon__shot span {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sg-tint); color: var(--sg-blue); font-weight: 800; font-size: 20px;
}
.nb-badge {
  justify-self: start; display: inline-block; margin: 2px 0 3px; padding: 1px 8px; border-radius: 999px;
  background: var(--sg-navy); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}

.nb-add {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px;
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
  padding: 9px 16px; border-radius: 999px;
  border: 2px solid var(--sg-navy); background: var(--sg-paper); color: var(--sg-navy);
  transition: background .15s, color .15s, border-color .15s;
}
.nb-add[hidden] { display: none; }
.nb-add:hover { background: var(--sg-tint); }
.nb-add__mark { width: 18px; height: 18px; border-radius: 5px; border: 2px solid currentColor; display: grid; place-items: center; }
.nb-add[aria-pressed="true"] { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.nb-add[aria-pressed="true"] .nb-add__mark::after { content: "✓"; font-size: 13px; line-height: 1; }
@media (max-width: 899px) { .nb-add { width: 100%; } }

/* --- The plan ------------------------------------------------------------- */
.nb-plan {
  scroll-margin-top: 84px;
  background: var(--sg-paper); border: 2px solid var(--sg-navy); border-radius: var(--sg-r);
  box-shadow: var(--sg-shadow-lift); padding: 26px 28px; margin: 28px 0 var(--nb-gap);
}
@media (max-width: 600px) { .nb-plan { padding: 20px; } }
.nb-plan h2 { margin: 0 0 8px; }
.nb-plan__lead { margin: 0 0 14px; color: var(--sg-muted); max-width: 70ch; }
.nb-plan__empty { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--sg-r-sm); background: var(--sg-shell); border: 1px dashed var(--sg-line); color: var(--sg-muted); }
.nb-plan__empty[hidden], .nb-plan__list[hidden], .nb-plan__actions[hidden] { display: none; }
.nb-plan__list { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 860px) { .nb-plan__list { grid-template-columns: 1fr 1fr; } }
.nb-plan__item { border: 1px solid var(--sg-line); border-radius: var(--sg-r-sm); padding: 14px 16px; break-inside: avoid; }
.nb-plan__item h3 { text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--sg-navy); margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.nb-plan__item h3 span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sg-navy); color: #fff; font-size: 12px; }
.nb-plan__item ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 5px; }
.nb-plan__item li { position: relative; padding-left: 26px; }
.nb-plan__item li::before { content: ""; position: absolute; left: 0; top: .22em; width: 15px; height: 15px; border: 2px solid var(--sg-navy); border-radius: 4px; }
.nb-plan__dev { margin: 10px 0 0; font-size: 13px; color: var(--sg-muted); }
.nb-plan__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nb-btn {
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; padding: 10px 16px;
  border-radius: var(--sg-r-sm); border: 2px solid var(--sg-navy); background: var(--sg-paper); color: var(--sg-navy);
}
.nb-btn--primary { background: var(--sg-navy); color: #fff; }
.nb-btn--quiet { border-color: transparent; color: var(--sg-muted); text-decoration: underline; }
.nb-plan__status { font-size: 14px; font-weight: 700; color: #1f9d55; }
.nb-plan__foot { margin: 14px 0 0; font-size: 13px; color: var(--sg-muted); }

.nb-cta { text-align: center; padding: 22px 0 8px; }
.nb-cta h2 { margin: 0 0 6px; }
.nb-cta > p { margin: 0 0 16px; color: var(--sg-muted); }
.nb-cta__grid { display: grid; gap: 12px; text-align: left; }
@media (min-width: 760px) { .nb-cta__grid { grid-template-columns: 1fr 1fr; } }
.nb-cta__grid .sg-tool { margin: 0; }

.nb-pill {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; text-decoration: none;
  background: var(--sg-navy); color: #fff; font-weight: 800; box-shadow: var(--sg-shadow-lift);
}
.nb-pill[hidden] { display: none; }
.nb-pill__n { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: #8dffb0; color: var(--sg-midnight); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .nb *, .nb *::before, .nb *::after { animation: none !important; transition: none !important; }
  .nb-awning { transform: none; }
  .nb.is-ready .nb-sol.is-waiting { opacity: 1; transform: none; }
}

/* Printing with a plan: the plan is the page. Without one the whole page
   prints as it reads. */
@media print {
  .nb-pill, .nb-plan__actions, .nb-add, .nb-filter { display: none !important; }
  .nb-sol, .nb-plan, .nb-principle, .nb-nav { box-shadow: none; }
  .nb.is-ready .nb-sol.is-waiting { opacity: 1; transform: none; }
  /* The whole page on paper: no mood pictures (the text takes the width),
     no house and no index — neither means anything without a click — and a
     card stays on one sheet where it fits on one. */
  .nb-mood, .nb-house, .nb-nav { display: none !important; }
  .nb-sol--media .nb-sol__top { grid-template-columns: minmax(0, 1fr); }
  .nb-sol { break-inside: avoid; }
  body.nb-print-plan header, body.nb-print-plan footer, body.nb-print-plan .sg-band,
  body.nb-print-plan .sg-card, body.nb-print-plan .sg-pager,
  body.nb-print-plan .nb > :not(.nb-plan) { display: none !important; }
  body.nb-print-plan .nb-plan { border: 0; padding: 0; margin: 0; }
  body.nb-print-plan .nb-plan__lead { display: none; }
  body.nb-print-plan .nb-plan__list { grid-template-columns: 1fr 1fr; }
}
