/* ============================================================
   assets/css/tech-article.css — artykuły Tech z pakietów Claude Design
   Loaded only on posts that use .st-article / [st_fala] / [st_wlacznik] (inc/tech-article.php).
   Theme tokens only (DESIGN.md): --fs-* sizes, --elev-* shadows, no 1px borders.
   Base post typography (h2, p, lists) stays in pages.css → .post-content.
   ============================================================ */

.st-article,
.st-fala,
.st-switch {
  --st-gap:   var(--sp-4);                /* space between cards ("bubbles") */
  --st-dim:   #3A424D;                    /* unlit dot on night */
  --st-muted: rgba(238, 242, 246, 0.72);  /* secondary text on night */
}

/* ── Article pieces ─────────────────────────────────────── */

.st-article a { color: var(--pillar-tech-ink); text-underline-offset: 3px; }
.st-article a:hover { color: var(--ink); }

.st-article .st-kicker {
  font: 500 var(--fs-label)/1.5 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pillar-tech-ink);
  margin: 0 0 var(--sp-1);
}
.st-article p > .st-kicker { display: inline-block; }

/* Answer box: the 2-sentence answer under the title */
.st-article .st-answer {
  background: var(--pillar-tech-tint);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  font: 500 var(--fs-body)/1.6 var(--font-body);
  color: var(--ink);
}

/* Photo placeholder — replaced with a real Image block before publishing */
.st-article .st-photo-todo {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
  padding: var(--sp-6);
  background: var(--tech-night);
  color: var(--st-muted);
  border-radius: var(--radius-lg);
  font: 400 var(--fs-small)/1.5 var(--font-body);
  text-align: center;
}
.st-article .wp-block-image img { border-radius: var(--radius-lg); }

/* Groups: the classic theme wraps Group content in .wp-block-group__inner-container,
   so the grid goes on that wrapper (or on the group itself when there is none). */
.st-article :is(.st-layers, .st-day) > .wp-block-group__inner-container,
.st-article :is(.st-layers, .st-day):not(:has(> .wp-block-group__inner-container)) {
  display: grid;
  gap: var(--st-gap);
}
.st-article :is(.st-layers, .st-day) > .wp-block-group__inner-container > *,
.st-article :is(.st-layers, .st-day) > * { margin: 0; }
.st-article :is(.st-layers, .st-day) { margin-bottom: var(--sp-6); }

/* Three layers */
.st-article .st-layer {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-2);
  padding: var(--sp-5);
}
.st-article .st-layer p { margin: 0; color: var(--ink); }
.st-article .st-layer .st-kicker { margin-bottom: var(--sp-2); }
.st-article .st-layer--dark { background: var(--tech-night); box-shadow: none; }
.st-article .st-layer--dark p { color: var(--tech-on-night); }
.st-article .st-layer--dark .st-kicker { color: var(--tech-sky); }

/* One day with us */
.st-article .st-day { --st-gap: var(--sp-5); }
.st-article .st-day p { margin: 0; }

/* What can be connected: tinted rows, no dividers */
.st-article ul.st-connect {
  list-style: none; padding: 0;
  display: grid; gap: var(--st-gap);
}
.st-article ul.st-connect li {
  list-style: none;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-1);
  padding: var(--sp-3) var(--sp-4);
  color: var(--ink-2);
}
.st-article ul.st-connect strong { display: block; color: var(--ink); }

/* Cost table: one card, tinted first row */
.st-article .st-costs table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-2);
  overflow: hidden;
}
.st-article .st-costs td { border: 0; padding: var(--sp-4) var(--sp-5); vertical-align: top; }
.st-article .st-costs tr:first-child td { background: var(--pillar-tech-tint); }
.st-article .st-costs td:first-child { color: var(--ink-2); }
.st-article .st-costs td:first-child strong { display: block; color: var(--ink); }
.st-article .st-costs td:last-child {
  text-align: right; white-space: nowrap;
  font: 500 var(--fs-ui)/1.5 var(--font-mono);
  color: var(--pillar-tech-ink);
}
.st-article .st-note { font: 400 var(--fs-small)/1.5 var(--font-body); color: var(--ink-2); }

/* Pros / cons with ✓ / ✗ */
.st-article ul.st-pros,
.st-article ul.st-cons { list-style: none; padding: 0; gap: var(--sp-3); }
.st-article ul.st-pros li,
.st-article ul.st-cons li { list-style: none; position: relative; padding-left: var(--sp-8); }
.st-article ul.st-pros li::before,
.st-article ul.st-cons li::before {
  content: ""; position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px;
  -webkit-mask: var(--st-icon) center / contain no-repeat;
          mask: var(--st-icon) center / contain no-repeat;
}
.st-article ul.st-pros li::before {
  background: var(--forest);
  --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E");
}
.st-article ul.st-cons li::before {
  background: var(--sale);
  --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

/* FAQ (core Details block) */
.st-article .st-faq {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-1);
  margin: 0 0 var(--st-gap);
}
.st-article .st-faq summary {
  list-style: none; cursor: pointer; position: relative;
  min-height: 44px;
  padding: var(--sp-4) var(--sp-12) var(--sp-4) var(--sp-5);
  font: 600 var(--fs-body)/1.45 var(--font-body);
  color: var(--ink);
}
.st-article .st-faq summary::-webkit-details-marker { display: none; }
.st-article .st-faq summary::after {
  content: "+"; position: absolute; right: var(--sp-5); top: var(--sp-4);
  font: 500 var(--fs-title)/1 var(--font-mono);
  color: var(--pillar-tech-ink);
}
.st-article .st-faq[open] summary::after { content: "–"; }
.st-article .st-faq p { margin: 0; padding: 0 var(--sp-5) var(--sp-4); }

/* Read next */
.st-article .st-next a {
  display: flex; flex-direction: column; gap: var(--sp-2);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  text-decoration: none;
  font: 600 var(--fs-title)/1.3 var(--font-display);
}
.st-article .st-next a::before {
  content: "Czytaj dalej";
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-article .st-next a:hover { color: var(--tech-on-night); box-shadow: var(--elev-3); }

/* ── [st_fala] hero (single.php prints it above the title) ── */

.st-fala {
  display: flex; flex-direction: column; gap: var(--sp-5);
  margin: 0 0 var(--sp-8);
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
}
.st-fala__eyebrow,
.st-fala__labels {
  font: 500 var(--fs-label)/1.3 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.st-fala__eyebrow { color: var(--tech-sky); }
.st-fala__count {
  font: 700 calc(var(--fs-stat) * 2)/1 var(--font-display);   /* graphic number: 60 mobile / 72 desktop */
  color: var(--tech-sky);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.st-fala__grid {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: var(--sp-3);
  width: 100%; max-width: 420px;
}
.st-dot { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; font-style: normal; }
.st-dot::before {
  content: ""; width: 58%; aspect-ratio: 1; border-radius: 50%;
  background: var(--tech-sky);
  transition: background-color 0.22s ease, transform 0.22s ease;
}
.st-dot--first::before { width: 100%; }
.st-fala.is-animating .st-dot::before { background: var(--st-dim); }
.st-fala.is-animating .st-dot.is-on::before { background: var(--tech-sky); }
.st-fala.is-animating .st-dot.is-edge::before { background: var(--tech-on-night); transform: scale(1.35); }
.st-fala__labels { display: flex; justify-content: space-between; gap: var(--sp-3); width: 100%; max-width: 420px; }
.st-fala__labels span:first-child { color: var(--tech-sky); }
.st-fala__labels span:last-child { color: var(--st-muted); text-align: right; }

/* ── [st_wlacznik] switch ───────────────────────────────── */

.st-switch {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-6);
  margin: var(--sp-8) 0;
  padding: var(--sp-10) var(--sp-6);
  background: #0C0F13;                      /* "lights off": deeper than --tech-night */
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
  text-align: center;
  transition: background-color 0.6s ease, color 0.6s ease;
}
.st-switch p { margin: 0; }
.st-switch .st-switch__eyebrow {
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-switch .st-switch__headline { font: 700 var(--fs-h2)/1.2 var(--font-display); max-width: 560px; }
.st-switch .st-switch__text { font: 500 var(--fs-body)/1.5 var(--font-body); color: var(--st-muted); max-width: 320px; }
.st-switch__plate {
  display: flex; align-items: center; justify-content: center;
  width: 150px; height: 180px;
  border-radius: var(--radius-xl);
  background: #171C23;
  transition: background-color 0.6s ease;
}
.st-switch .st-switch__rocker,
.st-switch .st-switch__rocker:hover,
.st-switch .st-switch__rocker:active {
  position: relative;
  width: 76px; height: 120px; min-height: 0;
  margin: 0; padding: 0; border: 0;
  border-radius: var(--radius-md);
  background: #1E242C;
  box-shadow: 0 5px 0 #000;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.6s ease, box-shadow 0.2s ease;
}
.st-switch .st-switch__rocker:focus-visible { outline: 3px solid var(--tech-sky); outline-offset: 4px; }
.st-switch__led {
  position: absolute; left: 50%; top: 16px;
  width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%;
  background: var(--tech-sky);
}
.st-switch.is-on { background: var(--pillar-tech-tint); color: var(--ink); }
.st-switch.is-on .st-switch__eyebrow { color: var(--pillar-tech-ink); }
.st-switch.is-on .st-switch__plate { background: var(--bg-surface); }
.st-switch.is-on .st-switch__rocker,
.st-switch.is-on .st-switch__rocker:hover,
.st-switch.is-on .st-switch__rocker:active { background: var(--bg-base); box-shadow: 0 -5px 0 #D8CDBD; }
.st-switch.is-on .st-switch__led { background: var(--bg-surface); }
.st-switch.is-on .st-switch__text { color: var(--ink-2); }

/* ── Phones: hero and switch edge to edge ───────────────── */

@media (max-width: 639px) {
  .single-post--hero { padding-top: 0; }
  /* cost card: tighter cells; the price column may wrap so the card never overflows at 360px */
  .st-article .st-costs td { padding: var(--sp-3) var(--sp-4); }
  .st-article .st-costs td:last-child { white-space: normal; min-width: 6.5em; }
  .st-fala,
  .st-switch {
    margin-inline: calc(-1 * var(--page-margin));
    border-radius: 0;
  }
}

/* ── Wider screens ──────────────────────────────────────── */

@media (min-width: 640px) {
  .st-fala {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    grid-template-areas: "eyebrow grid" "count grid" "labels grid";
    align-items: center;
    column-gap: var(--sp-10); row-gap: var(--sp-5);
    padding: var(--sp-10);
  }
  .st-fala__eyebrow { grid-area: eyebrow; align-self: end; }
  .st-fala__count   { grid-area: count; }
  .st-fala__grid    { grid-area: grid; }
  .st-fala__labels  { grid-area: labels; flex-direction: column; align-self: start; }
  .st-fala__labels span:last-child { text-align: left; }

  /* Layers stay stacked (3 columns are too narrow in the 720px post column):
     label on the left, text on the right. */
  .st-article .st-layer > .wp-block-group__inner-container,
  .st-article .st-layer:not(:has(> .wp-block-group__inner-container)) {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    column-gap: var(--sp-5);
    align-items: baseline;
  }
  .st-article .st-layer .st-kicker { margin: 0; }
  .st-article .st-layer { padding: var(--sp-5) var(--sp-6); }
  .st-article ul.st-connect { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-switch { padding: var(--sp-12) var(--sp-10); }
}

@media (prefers-reduced-motion: reduce) {
  .st-switch, .st-switch *, .st-dot::before { transition: none; }
}

/* ── [st_zarowka] hero „Zacznij od jednej.” (single.php prints it above the title) ── */

.st-zarowka {
  --st-bulb:      #F2C879;               /* set by JS per scene; static = warm white */
  --st-tile:      #1E242C;               /* Tech night-2 surface */
  --st-tile-ink:  #4A5361;
  --st-tile-num:  #6B7380;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  grid-template-areas: "text bulb" "steps steps";
  row-gap: var(--sp-5);
  margin: 0 0 var(--sp-8);
  padding: var(--sp-6) var(--sp-5);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
}
.st-zarowka p { margin: 0; }
.st-zarowka__text { grid-area: text; display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-1); }
.st-zarowka__eyebrow,
.st-zarowka__scene {
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.st-zarowka__eyebrow { color: var(--tech-sky); }
.st-zarowka__headline { font: 700 var(--fs-h2)/1.12 var(--font-display); }
.st-zarowka__scene { color: var(--st-bulb); transition: color 1.2s ease; }

/* bulb + halo share one centre point, so the glow is always symmetric */
.st-zarowka__bulb { grid-area: bulb; position: relative; display: grid; place-items: center; min-height: 200px; }
.st-zarowka__halo {
  position: absolute; left: 50%; top: 50%;
  width: 186px; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--st-bulb) 17%, transparent);
  transition: background-color 1.2s ease;
}
.st-zarowka__bulb svg { position: relative; width: 120px; height: auto; }
.st-zarowka__glass { fill: var(--st-bulb); transition: fill 1.2s ease; }

.st-article .st-zarowka__steps,
.st-zarowka__steps {
  grid-area: steps;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2);
}
.st-zarowka__steps li {
  list-style: none;
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  margin: 0;
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--st-tile-num);
}
.st-zarowka__steps span {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--st-tile);
  transition: background-color 1.2s ease;
}
.st-zarowka__steps svg {
  width: 24px; height: 24px;
  fill: none; stroke: var(--st-tile-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.st-zarowka__steps li.is-active { color: var(--tech-on-night); }
.st-zarowka__steps li.is-active span { background: var(--st-bulb); }
.st-zarowka__steps li.is-active svg { stroke: var(--tech-night); }

@media (max-width: 639px) {
  .st-zarowka { margin-inline: calc(-1 * var(--page-margin)); border-radius: 0; }
}
@media (min-width: 640px) {
  .st-zarowka {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas: "text bulb" "steps bulb";
    align-content: space-between;
    min-height: 380px;
    padding: var(--sp-10);
  }
  .st-zarowka__halo { width: 300px; }
  .st-zarowka__bulb svg { width: 150px; }
  .st-zarowka__steps { display: flex; gap: var(--sp-3); align-self: end; }
  .st-zarowka__steps span { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-zarowka * { transition: none; }
}

/* ── [st_hub] hero „Jeden system, wszystkie marki.” (single.php prints it above the title) ──
   Default = everything connected; JS adds .is-animating, then .is-on per [data-i]. */

.st-hub {
  --st-hub-line: #2A313B;
  display: flex; flex-direction: column; gap: var(--sp-3);
  margin: 0 0 var(--sp-8);
  padding: var(--sp-6) var(--sp-5);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
}
.st-hub p { margin: 0; }
.st-hub__text { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.st-hub__eyebrow,
.st-hub__count {
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.st-hub__eyebrow { color: var(--tech-sky); }
.st-hub__count { color: rgba(238, 242, 246, 0.72); white-space: nowrap; }
.st-hub__headline { display: none; }          /* phones: the diagram is the message */
.st-hub__map { display: block; width: 100%; max-width: 350px; height: auto; margin: 0 auto; overflow: visible; }

/* diagram (SVG user units: these sizes scale with the drawing, like the logo exception) */
.st-hub__lines line { stroke: var(--tech-sky); stroke-width: 2; transition: stroke 0.4s ease; }
.st-hub__core rect { fill: var(--tech-sky); }
.st-hub__core text { text-anchor: middle; fill: var(--tech-night); }
.st-hub__core-name { font: 700 20px var(--font-display); }
.st-hub__core-since { font: 500 10px var(--font-mono); letter-spacing: 0.08em; }
.st-hub__node rect { fill: var(--tech-on-night); transition: fill 0.4s ease; }
.st-hub__node text { text-anchor: middle; fill: var(--tech-night); font: 600 13px var(--font-body); transition: fill 0.4s ease; }
.st-hub__node .st-hub__role { font: 500 9px var(--font-mono); letter-spacing: 0.03em; opacity: 0.8; }

.st-hub.is-animating .st-hub__lines line { stroke: var(--st-hub-line); }
.st-hub.is-animating .st-hub__node rect { fill: #1E242C; }
.st-hub.is-animating .st-hub__node text { fill: #6B7380; }
.st-hub.is-animating .st-hub__lines line.is-on { stroke: var(--tech-sky); }
.st-hub.is-animating .st-hub__node.is-on rect { fill: var(--tech-on-night); }
.st-hub.is-animating .st-hub__node.is-on text { fill: var(--tech-night); }

@media (max-width: 639px) {
  .st-hub { margin-inline: calc(-1 * var(--page-margin)); border-radius: 0; }
}
@media (min-width: 640px) {
  .st-hub {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: var(--sp-6);
    min-height: 380px;
    padding: var(--sp-10);
  }
  .st-hub__text { flex-direction: column; justify-content: space-between; align-items: flex-start; }
  .st-hub__headline { display: block; font: 700 var(--fs-stat)/1.18 var(--font-display); }  /* narrow column beside the diagram */
  .st-hub__map { max-width: 380px; align-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  .st-hub * { transition: none; }
}

/* ── list.st-timeline: the path so far, on a core ordered list (CSS only) ── */

.st-article ol.st-timeline {
  list-style: none;
  display: block;
  margin: 0 0 var(--sp-6);
  padding: var(--sp-5) var(--sp-4) var(--sp-2);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-2);
}
.st-article ol.st-timeline li {
  list-style: none;
  position: relative;
  margin: 0;
  padding: 0 0 var(--sp-4) var(--sp-8);
  font: 400 var(--fs-small)/1.5 var(--font-body);
  color: var(--ink-2);
}
.st-article ol.st-timeline li::before {         /* dot */
  content: ""; position: absolute; left: 5px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--pillar-tech-ink);
}
.st-article ol.st-timeline li::after {          /* line to the next dot */
  content: ""; position: absolute; left: 10px; top: 22px; bottom: 2px;
  width: 2px; background: var(--pillar-tech-tint);
}
.st-article ol.st-timeline li:last-child::after { display: none; }
.st-article ol.st-timeline .st-kicker { display: block; margin: 0 0 2px; }
.st-article ol.st-timeline strong { display: block; color: var(--ink); font: 600 var(--fs-title-sm)/1.35 var(--font-body); }
.st-article ol.st-timeline li:last-child {      /* today, highlighted */
  margin: 0 calc(-1 * var(--sp-3)) var(--sp-3);
  padding: var(--sp-3) var(--sp-3) var(--sp-3) calc(var(--sp-8) + var(--sp-3));
  background: var(--pillar-tech-tint);
  border-radius: var(--radius-md);
  color: var(--ink);
}
.st-article ol.st-timeline li:last-child::before {
  left: calc(5px + var(--sp-3)); top: calc(4px + var(--sp-3));
  box-shadow: 0 0 0 4px rgba(61, 106, 150, 0.18);
}
@media (min-width: 640px) {                     /* four columns on one line */
  .st-article ol.st-timeline {
    position: relative;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4);
    padding: var(--sp-6);
  }
  .st-article ol.st-timeline::before {
    content: ""; position: absolute; left: var(--sp-6); right: var(--sp-6); top: calc(var(--sp-6) + 5px);
    height: 2px; background: var(--pillar-tech-tint);
  }
  .st-article ol.st-timeline li { padding: 26px 0 0; }
  .st-article ol.st-timeline li::before { left: 0; top: 0; }
  .st-article ol.st-timeline li::after { display: none; }
  .st-article ol.st-timeline li:last-child {
    margin: calc(-1 * var(--sp-3)) calc(-1 * var(--sp-3)) calc(-1 * var(--sp-3)) 0;
    padding: calc(26px + var(--sp-3)) var(--sp-3) var(--sp-3);
  }
  .st-article ol.st-timeline li:last-child::before { left: var(--sp-3); top: var(--sp-3); }
}

/* ── Comparison tables (plain core table): scroll inside their own card on phones ── */

.st-article .wp-block-table:not(.st-costs) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-2);
}
.st-article .wp-block-table:not(.st-costs) table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate; border-spacing: 0;
  font: 400 var(--fs-small)/1.45 var(--font-body);
}
.st-article .wp-block-table:not(.st-costs) :is(th, td) {
  padding: var(--sp-3) var(--sp-4);
  border: 0;
  border-bottom: 1px solid var(--bg-base);    /* data table: row hairlines are allowed (DESIGN.md §2) */
  text-align: left; vertical-align: top;
  color: var(--ink-2);
}
.st-article .wp-block-table:not(.st-costs) th { background: var(--pillar-tech-tint); color: var(--ink); font-weight: 600; }
.st-article .wp-block-table:not(.st-costs) tr:last-child td { border-bottom: 0; }
.st-article .wp-block-table:not(.st-costs) :is(th, td):first-child {   /* sticky row labels */
  position: sticky; left: 0; z-index: 1;
  background: var(--bg-surface);
  color: var(--ink);
}
.st-article .wp-block-table:not(.st-costs) th:first-child { background: var(--pillar-tech-tint); }

/* Phones: no sideways scrolling. 2 columns = a plain table that fits. 3+ columns (.is-wide, --sh-cols = value
   columns, both from smartandi_table_cols() in inc/tech-article.php) = "pasek wiersza": the row name is a band across
   the full width, its values sit under it in columns lined up with the headers, and the header row stays frozen
   under the mobile header until the table ends. Desktop keeps the table above. */
@media (max-width: 640px) {
  .st-article .wp-block-table:not(.st-costs) { overflow: visible; }
  .st-article .wp-block-table:not(.st-costs) table { min-width: 0; }
  .st-article .wp-block-table:not(.st-costs) :is(th, td) { position: static; }
  .st-article .wp-block-table:not(.st-costs):not(.is-wide) :is(th, td) { padding: var(--sp-3); }

  .st-article .wp-block-table.is-wide :is(table, thead, tbody) { display: block; }
  .st-article .wp-block-table.is-wide tr { display: grid; grid-template-columns: repeat(var(--sh-cols, 2), minmax(0, 1fr)); }
  .st-article .wp-block-table.is-wide :is(th, td) {
    padding: var(--sp-2) var(--sp-3) var(--sp-3);
    border: 0;
    font: 400 var(--fs-small)/1.45 var(--font-body);
    overflow-wrap: break-word;
  }
  .st-article .wp-block-table.is-wide[style*="--sh-cols:3"] :is(th, td) { padding-left: var(--sp-2); padding-right: var(--sp-2); }
  .st-article .wp-block-table.is-wide :is(th, td) + :is(th, td) + :is(th, td) { box-shadow: inset 1px 0 0 var(--bg-base); }

  .st-article .wp-block-table.is-wide thead {
    position: sticky; top: var(--nav-h); z-index: 2;
    box-shadow: 0 2px 6px rgba(44, 25, 14, 0.10);
  }
  .st-article .wp-block-table.is-wide thead th { padding-top: var(--sp-3); font-weight: 600; color: var(--ink); overflow-wrap: normal; }
  .st-article .wp-block-table.is-wide thead th:first-child { display: none; }
  .st-article .wp-block-table.is-wide thead th:nth-child(2) { border-top-left-radius: var(--radius-lg); }
  .st-article .wp-block-table.is-wide thead th:last-child { border-top-right-radius: var(--radius-lg); }
  .st-article .wp-block-table.is-wide tbody td:first-child {
    grid-column: 1 / -1;
    padding: var(--sp-2) var(--sp-3);
    background: var(--bg-base);
    font-weight: 600; color: var(--ink);
  }
}

/* ── Shared by the night diagrams below ─────────────────── */

.st-mesh,
.st-awaria {
  --st-off-tile: #1E242C;    /* dimmed box (Tech night-2) */
  --st-off-line: #2A313B;    /* dimmed link */
  --st-off-text: #6B7380;    /* dimmed label */
  --st-off-dot:  #3A424D;
  --st-off-ring: #4A5361;
  --st-pulse:    #F2C879;    /* warm-white lamp colour of the series */
  --st-alert:    #E5928C;    /* "Brak internetu" on night (--sale is too dark there) */
  --st-muted:    rgba(238, 242, 246, 0.72);
}

/* ── [st_mesh] hero „Żarówka podaje dalej.” (single.php prints it above the title) ──
   Default (no JS / reduced motion) = the whole path lit + closing caption. */

.st-mesh {
  display: flex; flex-direction: column; gap: var(--sp-3);
  margin: 0 0 var(--sp-8);
  padding: var(--sp-6) var(--sp-5);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
}
.st-mesh p { margin: 0; }
.st-mesh__text { display: contents; }
.st-mesh__eyebrow {
  order: 0;
  display: flex; justify-content: space-between; gap: var(--sp-3);
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-mesh__hint { color: var(--st-muted); }
.st-mesh__headline { display: none; }
.st-mesh__map { order: 1; display: block; width: 100%; max-width: 350px; height: auto; margin: 0 auto; overflow: visible; }
.st-mesh__cap { order: 2; display: flex; flex-direction: column; gap: var(--sp-2); min-height: 50px; }
.st-mesh__cap-k {
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-mesh__cap-t { font: 600 var(--fs-body)/1.4 var(--font-body); }

/* diagram (SVG user units scale with the drawing) */
.st-mesh__link { stroke: var(--st-off-line); stroke-width: 2; transition: stroke 0.4s ease; }
.st-mesh__link.is-path { stroke: var(--tech-sky); }
.st-mesh__node .mains { fill: var(--st-off-dot); transition: fill 0.4s ease; }
.st-mesh__node .bat { fill: var(--tech-night); stroke: var(--st-off-ring); stroke-width: 3; transition: stroke 0.4s ease; }
.st-mesh__node .gw { fill: var(--tech-sky); }
.st-mesh__node text { fill: var(--st-off-text); font: 500 10px var(--font-mono); letter-spacing: 0.05em; text-anchor: middle; transition: fill 0.4s ease; }
.st-mesh__node.is-path .mains { fill: var(--tech-on-night); }
.st-mesh__node.is-path .bat { stroke: var(--tech-on-night); }
.st-mesh__node.is-path text { fill: var(--tech-on-night); }
.st-mesh__pulse {
  fill: var(--st-pulse); stroke: rgba(242, 200, 121, 0.3); stroke-width: 10;
  opacity: 0;
  transition: transform 0.8s ease-in-out, opacity 0.3s ease;
}
.st-mesh.is-animating .st-mesh__link.is-path:not(.is-on) { stroke: var(--st-off-line); }
.st-mesh.is-animating .st-mesh__node.is-path:not(.is-on) .mains { fill: var(--st-off-dot); }
.st-mesh.is-animating .st-mesh__node.is-path:not(.is-on) .bat { stroke: var(--st-off-ring); }
.st-mesh.is-animating .st-mesh__node.is-path:not(.is-on) text { fill: var(--st-off-text); }
.st-mesh.is-animating .st-mesh__pulse.is-on { opacity: 1; }

/* ── [st_awaria] „Internet pada. Światło działa.” (in the article) ──
   Default (no JS / reduced motion) = the outage state: .is-down .is-dead .is-local */

.st-awaria {
  display: flex; flex-direction: column; gap: var(--sp-3);
  margin: var(--sp-8) 0;
  padding: var(--sp-6) var(--sp-5);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
}
.st-awaria p { margin: 0; }
.st-awaria__text { display: flex; flex-direction: column; gap: var(--sp-3); }
.st-awaria__eyebrow {
  display: flex; justify-content: space-between; gap: var(--sp-3);
  font: 500 var(--fs-label)/1.3 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-awaria__status { color: var(--st-muted); white-space: nowrap; }
.st-awaria.is-down .st-awaria__status { color: var(--st-alert); }
.st-awaria__headline { font: 700 var(--fs-stat)/1.2 var(--font-display); }
.st-awaria__cap { min-height: 44px; font: 600 var(--fs-body)/1.4 var(--font-body); }
.st-awaria__map { display: block; width: 100%; max-width: 350px; height: auto; margin: 0 auto; overflow: visible; }

.st-awaria line { stroke: var(--tech-sky); stroke-width: 2; transition: stroke 0.4s ease; }
.st-awaria .pill rect { fill: var(--tech-on-night); transition: fill 0.4s ease; }
.st-awaria .pill text { fill: var(--tech-night); font: 500 10px var(--font-mono); letter-spacing: 0.05em; text-anchor: middle; transition: fill 0.4s ease; }
.st-awaria .pill.gw rect { fill: var(--tech-sky); }
.st-awaria .grp { fill: var(--st-muted); font: 500 10px var(--font-mono); letter-spacing: 0.08em; text-anchor: middle; }
.st-awaria .grp--zig { fill: var(--tech-sky); }
.st-awaria .x { opacity: 0; transition: opacity 0.3s ease; }
.st-awaria .x circle { fill: var(--sale); }
.st-awaria .x text { fill: #FFF; font: 700 13px var(--font-body); text-anchor: middle; }
.st-awaria.is-down .net-link { stroke: var(--sale); }
.st-awaria.is-down .x { opacity: 1; }
.st-awaria.is-down .pill.net rect { fill: var(--st-off-tile); }
.st-awaria.is-down .pill.net text { fill: var(--st-off-text); }
.st-awaria.is-dead .wifi-link { stroke: var(--st-off-line); }
.st-awaria.is-dead .pill.wifi-dev rect { fill: var(--st-off-tile); }
.st-awaria.is-dead .pill.wifi-dev text { fill: var(--st-off-text); }
.st-awaria.is-local .pill.zig rect {
  stroke: var(--tech-sky); stroke-width: 5; stroke-opacity: 0.4;
  animation: st-awaria-glow 1.2s ease-in-out infinite alternate;
}
@keyframes st-awaria-glow { from { stroke-opacity: 0.15; } to { stroke-opacity: 0.55; } }

/* phones: edge to edge, like the other night panels */
@media (max-width: 639px) {
  .st-mesh,
  .st-awaria { margin-inline: calc(-1 * var(--page-margin)); border-radius: 0; }
}
/* wider: text left, diagram right */
@media (min-width: 640px) {
  .st-mesh,
  .st-awaria {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: var(--sp-6);
  }
  .st-mesh { min-height: 380px; padding: var(--sp-10); }
  .st-mesh__text { display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-4); }
  .st-mesh__hint { display: none; }
  .st-mesh__headline { display: block; font: 700 var(--fs-stat)/1.18 var(--font-display); }
  .st-mesh__cap { min-height: 72px; }
  .st-mesh__map,
  .st-awaria__map { max-width: 360px; align-self: center; }

  .st-awaria { padding: var(--sp-8) var(--sp-10); }
  .st-awaria__text { justify-content: space-between; }
  .st-awaria__eyebrow { flex-direction: column; gap: var(--sp-2); }
  .st-awaria__cap { min-height: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-mesh *, .st-awaria * { transition: none; animation: none; }
}

/* ── [st_montaz] hero „Żarówka, włącznik czy taśma LED?” (single.php prints it above the title) ──
   Three tiles act out the install. Root .is-1 .is-2 .is-3 = bulb / switch / strip on (cumulative);
   default markup = all on. .is-cur-N highlights the step that just happened. */

.st-montaz {
  --st-tile-bg:  #1A1F26;
  --st-off:      #3A424D;
  --st-off-2:    #4A5361;
  --st-off-text: #6B7380;
  --st-metal:    #B9BDC4;
  --st-warm:     #FFF1D6;
  --st-led:      #FFC27A;
  display: flex; flex-direction: column; gap: var(--sp-4);
  margin: 0 0 var(--sp-8);
  padding: var(--sp-6) var(--sp-5);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
}
.st-montaz p { margin: 0; }
.st-montaz__text { display: flex; flex-direction: column; gap: var(--sp-3); }
.st-montaz__eyebrow {
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-montaz__headline { font: 700 var(--fs-stat)/1.2 var(--font-display); }
.st-montaz__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); width: 100%; max-width: 350px; }
.st-montaz__item { min-width: 0; text-align: center; }
.st-montaz__tile { position: relative; aspect-ratio: 11 / 16; overflow: hidden; border-radius: var(--radius-md); background: var(--st-tile-bg); }
.st-montaz__tile > span { position: absolute; display: block; }
.st-montaz .st-montaz__verb {
  margin-top: var(--sp-2);
  font: 700 var(--fs-title-sm)/1.2 var(--font-display);
  color: var(--st-off-2);
  transition: color 200ms ease;
}
.st-montaz .st-montaz__name {
  margin-top: var(--sp-1);
  font: 500 var(--fs-label)/1.2 var(--font-mono);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--st-off-2);
  transition: color 200ms ease;
}
.st-montaz.is-1 .st-montaz__item--bulb p,
.st-montaz.is-2 .st-montaz__item--switch p,
.st-montaz.is-3 .st-montaz__item--strip p { color: var(--tech-on-night); }
.st-montaz.is-1 .st-montaz__item--bulb .st-montaz__name,
.st-montaz.is-2 .st-montaz__item--switch .st-montaz__name,
.st-montaz.is-3 .st-montaz__item--strip .st-montaz__name { color: var(--st-metal); }
.st-montaz.is-cur-1 .st-montaz__item--bulb .st-montaz__name,
.st-montaz.is-cur-2 .st-montaz__item--switch .st-montaz__name,
.st-montaz.is-cur-3 .st-montaz__item--strip .st-montaz__name { color: var(--tech-sky); }
.st-montaz__glow { opacity: 0; transition: opacity 330ms ease; }

/* 1 · bulb – wkręcasz */
.st-montaz__item--bulb .st-montaz__glow { left: -18%; top: -6%; width: 136%; height: 106%; background: radial-gradient(closest-side, rgba(255, 190, 110, 0.6), rgba(255, 190, 110, 0)); }
.st-montaz__cord { left: calc(50% - 1px); top: 0; width: 2px; height: 21%; background: var(--st-off); }
.st-montaz__socket { left: 40%; top: 18.75%; width: 20%; height: 7.5%; border-radius: 3px; background: var(--st-off-text); }
.st-montaz__tile > .st-montaz__bulb {
  left: 27.3%; top: 26.25%; width: 45.5%; height: 50%;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transform: translateY(22%) rotateY(0deg);
  transition: transform 450ms ease-in-out;
}
.st-montaz__bulb i { flex: none; width: 48%; height: 6px; border-radius: 2px; background: var(--st-metal); }
.st-montaz__bulb i + i { background: #8D949E; }
.st-montaz__bulb b { flex: 1; width: 100%; border-radius: 32% 32% 50% 50% / 28% 28% 43% 43%; background: var(--st-off); transition: background-color 270ms ease; }
.st-montaz.is-1 .st-montaz__tile > .st-montaz__bulb { transform: translateY(0) rotateY(720deg); }
.st-montaz.is-1 .st-montaz__bulb b { background: var(--st-warm); transition-delay: 350ms; }
.st-montaz.is-1 .st-montaz__item--bulb .st-montaz__glow { opacity: 1; transition-delay: 350ms; }

/* 2 · switch – montujesz */
.st-montaz__item--switch .st-montaz__glow { left: -9%; top: -19%; width: 118%; height: 94%; background: radial-gradient(closest-side, rgba(236, 244, 255, 0.55), rgba(236, 244, 255, 0)); }
.st-montaz__ceiling { left: 18%; top: 0; width: 64%; height: 7px; border-radius: 0 0 7px 7px; background: var(--st-off); transition: background-color 270ms ease; }
.st-montaz__plate {
  left: 21%; top: 38.75%; width: 58%; aspect-ratio: 1;
  box-sizing: border-box; padding: 12.5%;
  border-radius: var(--radius-md);
  background: var(--tech-on-night);
  opacity: 0; transform: scale(0.6);
  transition: opacity 200ms ease, transform 330ms cubic-bezier(0.3, 1.5, 0.6, 1);
}
.st-montaz__well { position: relative; display: block; width: 100%; height: 100%; border-radius: var(--radius-sm); background: #D7DEE6; }
.st-montaz__rocker { position: absolute; left: 0; top: 50%; width: 100%; height: 50%; border-radius: var(--radius-sm); background: #FFF; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2); transition: top 130ms ease; }
.st-montaz.is-2 .st-montaz__plate { opacity: 1; transform: scale(1); }
.st-montaz.is-2 .st-montaz__rocker { top: 0; transition-delay: 300ms; }
.st-montaz.is-2 .st-montaz__ceiling { background: #F4F8FF; transition-delay: 350ms; }
.st-montaz.is-2 .st-montaz__item--switch .st-montaz__glow { opacity: 1; transition-delay: 350ms; }

/* 3 · LED strip – przyklejasz */
.st-montaz__item--strip .st-montaz__glow { left: -9%; top: 25%; width: 118%; height: 75%; background: radial-gradient(ellipse 50% 50% at 50% 30%, rgba(255, 159, 67, 0.6), rgba(255, 159, 67, 0)); }
.st-montaz__shelf { left: 9%; top: 35%; width: 82%; height: 10px; border-radius: 2px; background: var(--st-off); }
.st-montaz__strip { left: 9%; top: calc(35% + 12px); width: 82%; height: 8px; clip-path: inset(0 100% 0 0); transition: clip-path 530ms ease; }
.st-montaz__strip > span {
  position: absolute; left: 0; top: 0; width: 100%; height: 8px;
  display: flex; justify-content: space-around; align-items: center;
  border-radius: 4px; background: #2A313B;
}
.st-montaz__strip i { width: 4px; height: 4px; border-radius: 50%; background: var(--st-off-2); transition: background-color 130ms ease; }
.st-montaz__counter { left: 9%; top: 82.5%; width: 82%; height: 3px; background: #2A313B; }
.st-montaz__mug { left: 23.6%; top: 71.25%; width: 14.5%; height: 11.25%; border-radius: 2px 2px 5px 5px; background: var(--st-off); }
.st-montaz.is-3 .st-montaz__strip { clip-path: inset(0 0 0 0); }
.st-montaz.is-3 .st-montaz__strip i { background: var(--st-led); }
.st-montaz.is-3 .st-montaz__item--strip .st-montaz__glow { opacity: 1; transition-delay: 450ms; }
.st-montaz.is-3 .st-montaz__strip i:nth-child(1) { transition-delay: 400ms; }
.st-montaz.is-3 .st-montaz__strip i:nth-child(2) { transition-delay: 435ms; }
.st-montaz.is-3 .st-montaz__strip i:nth-child(3) { transition-delay: 470ms; }
.st-montaz.is-3 .st-montaz__strip i:nth-child(4) { transition-delay: 505ms; }
.st-montaz.is-3 .st-montaz__strip i:nth-child(5) { transition-delay: 540ms; }
.st-montaz.is-3 .st-montaz__strip i:nth-child(6) { transition-delay: 575ms; }
.st-montaz.is-3 .st-montaz__strip i:nth-child(7) { transition-delay: 610ms; }
.st-montaz.is-3 .st-montaz__strip i:nth-child(8) { transition-delay: 645ms; }
.st-montaz.is-3 .st-montaz__strip i:nth-child(9) { transition-delay: 680ms; }

/* ── [st_sciana] „Nie gaś na ścianie.” (in the article) ──
   Default (no JS / reduced motion) = the solution: switch stays on, remote beside it, bulb on.
   .is-off = switched off at the wall (bulb dark, wire cut, offline); .is-pilot = remote shown. */

.st-sciana {
  --st-alert:  #E5928C;
  --st-muted:  rgba(238, 242, 246, 0.72);
  display: flex; flex-direction: column; gap: var(--sp-4);
  margin: var(--sp-8) 0;
  padding: var(--sp-6) var(--sp-5);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
}
.st-sciana p { margin: 0; }
.st-sciana__text { display: flex; flex-direction: column; gap: var(--sp-3); }
.st-sciana__eyebrow {
  display: flex; justify-content: space-between; gap: var(--sp-3);
  font: 500 var(--fs-label)/1.3 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-sciana__status { color: var(--st-muted); white-space: nowrap; transition: color 0.3s ease; }
.st-sciana.is-off .st-sciana__status { color: var(--st-alert); }
.st-sciana__headline { font: 700 var(--fs-stat)/1.2 var(--font-display); }
.st-sciana .st-sciana__cap { display: flex; flex-direction: column; gap: var(--sp-2); min-height: 66px; font: 600 var(--fs-body)/1.4 var(--font-body); }
.st-sciana__cap-k {
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-sciana__map { display: block; width: 100%; max-width: 350px; height: auto; margin: 0 auto; }

/* diagram (SVG user units scale with the drawing) */
.st-sciana .wall { fill: #1A1F26; }
.st-sciana .lbl { font: 500 10px var(--font-mono); letter-spacing: 0.08em; fill: var(--st-muted); text-anchor: middle; }
.st-sciana .lbl--dim { fill: #6B7380; text-anchor: start; }
.st-sciana .lbl--sky { fill: var(--tech-sky); }
.st-sciana .wire { stroke: var(--tech-sky); stroke-width: 2; stroke-dasharray: 6 5; transition: stroke 0.4s ease; }
.st-sciana .x { opacity: 0; transition: opacity 0.3s ease; }
.st-sciana .x circle { fill: var(--sale); }
.st-sciana .x text { fill: #FFF; font: 700 13px var(--font-body); text-anchor: middle; }
.st-sciana .plate { fill: var(--tech-on-night); }
.st-sciana .well { fill: #D7DEE6; }
.st-sciana .rocker { fill: #FFF; transition: transform 0.25s ease; }
.st-sciana .pilot { opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; }
.st-sciana .pilot rect { fill: #FFF; stroke: var(--tech-sky); stroke-width: 2; }
.st-sciana .pilot circle { fill: #D7DEE6; }
.st-sciana .glow { transition: opacity 0.4s ease; }
.st-sciana .cord { stroke: #3A424D; stroke-width: 2; }
.st-sciana .bulb { fill: #FFF4DC; transition: fill 0.4s ease; }
.st-sciana .base { fill: #8D949E; }
.st-sciana .chip { fill: #1E242C; transition: fill 0.4s ease; }
.st-sciana .chip-t,
.st-sciana .auto-t,
.st-sciana .auto-dot { fill: var(--tech-sky); }
.st-sciana .auto-t { text-anchor: start; }
.st-sciana.is-off .rocker { transform: translateY(40px); }
.st-sciana.is-off .wire { stroke: #3A424D; }
.st-sciana.is-off .x { opacity: 1; }
.st-sciana.is-off .glow { opacity: 0; }
.st-sciana.is-off .bulb { fill: #3A424D; }
.st-sciana.is-off .chip { fill: #3A1D1C; }
.st-sciana.is-off .chip-t,
.st-sciana.is-off .auto-t,
.st-sciana.is-off .auto-dot { fill: var(--st-alert); }
.st-sciana.is-pilot .pilot { opacity: 1; transform: none; }

@media (max-width: 639px) {
  .st-montaz,
  .st-sciana { margin-inline: calc(-1 * var(--page-margin)); border-radius: 0; }
  .st-montaz__row { margin: 0 auto; }
}
@media (min-width: 640px) {
  .st-montaz,
  .st-sciana {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    align-items: center; gap: var(--sp-6);
    padding: var(--sp-8) var(--sp-10);
  }
  .st-montaz__text { align-self: stretch; justify-content: flex-start; gap: var(--sp-16); }
  .st-montaz__row { max-width: 360px; }
  .st-sciana__text { align-self: stretch; justify-content: space-between; }
  .st-sciana__map { max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-montaz *, .st-sciana * { transition: none; }
}

/* ── IKEA article: shared panel for [st_ikea_ha] .st-ikea, [st_ikea_apps] .st-ia, [st_ikea_matter] .st-im ── */

.st-ikea,
.st-ia,
.st-im {
  --st-off:     #3A424D;
  --st-off-2:   #4A5361;
  --st-tile:    #1E242C;
  --st-card:    #1A1F26;
  --st-muted:   rgba(238, 242, 246, 0.72);
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
}
.st-ikea { margin: 0 0 var(--sp-8); }
.st-ia, .st-im { margin: var(--sp-8) 0; }
:is(.st-ikea, .st-ia, .st-im) p { margin: 0; }
:is(.st-ia, .st-im) [class$="__text"] { display: flex; flex-direction: column; gap: var(--sp-3); }
.st-ikea__eyebrow, .st-ia__eyebrow, .st-im__eyebrow {
  font: 500 var(--fs-label)/1.3 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-ia__eyebrow { display: flex; justify-content: space-between; gap: var(--sp-3); }
.st-ia__hint { color: var(--st-muted); white-space: nowrap; }
.st-ikea__headline, .st-ia__headline, .st-im__headline { font: 700 var(--fs-stat)/1.2 var(--font-display); }
.st-ikea .st-ikea__cap, .st-ia .st-ia__cap, .st-im .st-im__cap {
  display: flex; flex-direction: column; gap: var(--sp-2);
  min-height: 66px;
  font: 600 var(--fs-body)/1.4 var(--font-body);
}
.st-ia .st-ia__cap { min-height: 88px; }
.st-ikea__cap-k, .st-ia__cap-k, .st-im__cap-k {
  font: 500 var(--fs-label)/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}

/* [st_ikea_ha] hero: phones = eyebrow, headline, scene, caption */
.st-ikea__text { display: contents; }
.st-ikea__eyebrow { order: 0; }
.st-ikea__headline { order: 1; }
.st-ikea__scene { order: 2; }
.st-ikea .st-ikea__cap { order: 3; }

.st-ikea__scene {
  position: relative;
  width: 100%; max-width: 350px; aspect-ratio: 350 / 240;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #1B2028;
}
.st-ikea__scene > span { position: absolute; display: block; box-sizing: border-box; }
.st-ikea__lampglow { background: radial-gradient(closest-side, rgba(255, 226, 180, 0.45), rgba(255, 226, 180, 0)); opacity: 0; transition: opacity 400ms ease; }
.st-ikea__lamp { border-radius: 0 0 8px 8px; background: var(--st-off); transition: background-color 300ms ease; }
.st-ikea__scene > .st-ikea__fronts { display: flex; gap: 4px; }
.st-ikea__fronts i { flex: 1; border: 2px solid var(--st-off); border-radius: 4px; }
.st-ikea__fronts--base i { border-color: #2A313B; }
.st-ikea__stripglow { background: radial-gradient(ellipse 50% 50% at 50% 0%, rgba(255, 159, 67, 0.6), rgba(255, 159, 67, 0)); opacity: 0; transition: opacity 400ms ease; }
.st-ikea__strip { border-radius: 2px; background: #FFC27A; box-shadow: 0 0 8px 2px rgba(255, 159, 67, 0.7); clip-path: inset(0 100% 0 0); transition: clip-path 450ms ease; }
.st-ikea__counter { border-radius: 2px; background: var(--st-off); }
.st-ikea__scene > .st-ikea__remote { display: flex; flex-direction: column; gap: 2px; padding: 3px; border-radius: 5px; background: var(--tech-on-night); }
.st-ikea__remote i { flex: 1; border-radius: 2px; background: #C9D1DA; }
.st-ikea__pax { border: 2px solid var(--st-off); border-radius: 4px; background: #1B2028; transition: background 400ms ease 250ms; }
.st-ikea__rail { background: var(--st-off); transition: background-color 400ms ease 250ms; }
.st-ikea__cloth { border-radius: 3px; background: #2A313B; transition: background-color 400ms ease 250ms; }
.st-ikea__door { background: #20262F; border-right: 2px solid var(--st-off); }
.st-ikea__door--open { border-right: 0; border-left: 2px solid var(--st-off); transform-origin: 100% 50%; transition: transform 450ms ease; }
.st-ikea__floor { background: rgba(0, 0, 0, 0.3); }
.st-ikea__net { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-ikea__net line { stroke: var(--tech-sky); stroke-width: 2; stroke-dasharray: 5 5; opacity: 0; transition: opacity 250ms ease; }
.st-ikea__pulse { fill: #F2C879; opacity: 0; transform: translate(175px, 200px); transition: transform 300ms ease-in-out, opacity 150ms ease; }
.st-ikea__scene > .st-ikea__ha {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px;
  background: var(--st-tile); color: var(--st-muted);
  font: 500 10px var(--font-mono);   /* label inside the drawing, scales with it */
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  transition: background-color 250ms ease, color 250ms ease, box-shadow 250ms ease;
}
.st-ikea__ha i { width: 6px; height: 6px; border-radius: 50%; background: var(--forest); }

.st-ikea.is-1 .st-ikea__lampglow { opacity: 1; transition-delay: 300ms; }
.st-ikea.is-1 .st-ikea__lamp { background: #FFF4DC; transition-delay: 300ms; }
.st-ikea.is-cur-1 .st-ikea__remote { animation: st-ikea-press 300ms ease; }
@keyframes st-ikea-press { 50% { transform: scale(0.86); } }
.st-ikea.is-2 .st-ikea__stripglow { opacity: 1; transition-delay: 300ms; }
.st-ikea.is-2 .st-ikea__strip { clip-path: inset(0 0 0 0); }
.st-ikea.is-3 .st-ikea__door--open { transform: scaleX(0.18); }
.st-ikea.is-3 .st-ikea__pax { background: linear-gradient(180deg, #5A4630, #2A2420); }
.st-ikea.is-3 .st-ikea__rail { background: #FFD9A0; }
.st-ikea.is-3 .st-ikea__cloth { background: #8A6A52; }
.st-ikea.is-cur-1 .l1,
.st-ikea.is-cur-2 .l2,
.st-ikea.is-cur-3 .l3,
.st-ikea.is-4 .st-ikea__net line { opacity: 1; }
.st-ikea.is-cur-1 .st-ikea__pulse { opacity: 1; transform: translate(178px, 128px); }
.st-ikea.is-cur-2 .st-ikea__pulse { opacity: 1; transform: translate(90px, 88px); }
.st-ikea.is-cur-3 .st-ikea__pulse { opacity: 1; transform: translate(262px, 130px); }
.st-ikea.is-1 .st-ikea__scene > .st-ikea__ha { background: var(--tech-sky); color: var(--tech-night); }
.st-ikea.is-1 .st-ikea__ha i { background: var(--tech-night); }
.st-ikea.is-4 .st-ikea__scene > .st-ikea__ha { box-shadow: 0 0 0 4px rgba(125, 175, 226, 0.3); }

/* [st_ikea_apps] one bulb, four apps */
.st-ia__stage { position: relative; width: 100%; max-width: 350px; aspect-ratio: 350 / 236; margin: 0 auto; }
.st-ia__net { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-ia__net line { stroke: var(--tech-sky); stroke-width: 2; opacity: 0; transition: opacity 250ms ease; }
.st-ia__tile {
  position: absolute; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  background: var(--st-tile); color: var(--st-muted);
  font: 400 13px/1.2 var(--font-body);   /* label inside the drawing */
  transition: background-color 300ms ease 200ms, color 300ms ease 200ms;
}
.st-ia__tile b { font-weight: 600; }
.st-ia__tile i { font-style: normal; opacity: 0; transition: opacity 200ms ease 300ms; }
.st-ia__bulb {
  position: absolute; box-sizing: border-box;
  margin: 0; padding: 0; border: 0; min-height: 0;
  border-radius: 22px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.st-ia__bulb:hover, .st-ia__bulb:active { background: transparent; }
.st-ia__bulb:focus-visible { outline: 3px solid var(--tech-sky); outline-offset: 4px; }
.st-ia__bulb::before { content: ""; position: absolute; left: -40%; top: -30%; width: 180%; height: 140%; background: radial-gradient(closest-side, rgba(255, 200, 130, 0.45), rgba(255, 200, 130, 0)); }
.st-ia__glass { position: absolute; left: 16%; top: 4%; width: 68%; height: 66%; border-radius: 40% 40% 48% 48% / 36% 36% 50% 50%; background: #FFF1D6; transition: transform 120ms ease; }
.st-ia__base { position: absolute; left: 34%; top: 72%; width: 32%; height: 16%; border-radius: 3px 3px 6px 6px; background: repeating-linear-gradient(180deg, #B9BDC4 0 4px, #8D949E 4px 7px); }
.st-ia__bulb:active .st-ia__glass { transform: scale(0.94); }
.st-ia.is-all .st-ia__net line,
.st-ia.is-a0 line[data-i="0"], .st-ia.is-a1 line[data-i="1"],
.st-ia.is-a2 line[data-i="2"], .st-ia.is-a3 line[data-i="3"] { opacity: 1; }
.st-ia.is-all .st-ia__tile,
.st-ia.is-a0 .st-ia__tile[data-i="0"], .st-ia.is-a1 .st-ia__tile[data-i="1"],
.st-ia.is-a2 .st-ia__tile[data-i="2"], .st-ia.is-a3 .st-ia__tile[data-i="3"] { background: var(--tech-sky); color: var(--tech-night); }
.st-ia.is-all .st-ia__tile i,
.st-ia.is-a0 .st-ia__tile[data-i="0"] i, .st-ia.is-a1 .st-ia__tile[data-i="1"] i,
.st-ia.is-a2 .st-ia__tile[data-i="2"] i, .st-ia.is-a3 .st-ia__tile[data-i="3"] i { opacity: 1; }

/* [st_ikea_matter] old TRÅDFRI + new KAJPLATS */
.st-im__stage { position: relative; width: 100%; max-width: 350px; aspect-ratio: 350 / 236; margin: 0 auto; }
.st-im__stage span { position: absolute; display: block; box-sizing: border-box; }
.st-im__card { overflow: hidden; border-radius: var(--radius-lg); background: var(--st-card); transition: opacity 400ms ease, transform 400ms ease; }
.st-im__glow { background: radial-gradient(closest-side, rgba(255, 190, 110, 0.5), rgba(255, 190, 110, 0)); }
.st-im__card--new .st-im__glow { background: radial-gradient(closest-side, rgba(205, 226, 255, 0.5), rgba(205, 226, 255, 0)); }
.st-im__cord { background: var(--st-off); }
.st-im__socket { border-radius: 3px; background: #6B7380; }
.st-im__bulb { border-radius: 35% 35% 50% 50% / 30% 30% 42% 42%; background: #FFE2B0; }
.st-im__card--new .st-im__bulb { background: #F4F8FF; }
.st-im__name { text-align: center; font: 700 var(--fs-title)/1.35 var(--font-display); }
.st-im__tag { text-align: center; font: 500 10px/16px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--st-muted); white-space: nowrap; }
.st-im__card--new .st-im__tag { color: var(--tech-sky); }
.st-im__card--new { opacity: 0; transform: translateY(12px); }
.st-im__stage .st-im__ok {
  display: flex; align-items: center;
  padding: 0 var(--sp-2);
  border-radius: var(--radius-pill);
  background: var(--forest);
  font: 500 10px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 300ms ease, transform 300ms ease;
}
.st-im__stage .st-im__home {
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: var(--st-tile); color: var(--st-off-2);
  font: 500 10px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  transition: background-color 300ms ease 300ms, color 300ms ease 300ms;
}
.st-im__net { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-im__net line { stroke: var(--tech-sky); stroke-width: 2; opacity: 0; transition: opacity 300ms ease; }
.st-im.is-new .st-im__card--new { opacity: 1; transform: none; }
.st-im.is-ok .st-im__stage .st-im__ok { opacity: 1; transform: none; }
.st-im.is-home .st-im__stage .st-im__home { background: var(--tech-sky); color: var(--tech-night); }
.st-im.is-home .st-im__net line { opacity: 1; }

@media (max-width: 639px) {
  .st-ikea, .st-ia, .st-im { margin-inline: calc(-1 * var(--page-margin)); border-radius: 0; }
}
@media (min-width: 640px) {
  .st-ikea {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); grid-template-rows: auto auto 1fr;
    column-gap: var(--sp-6); row-gap: var(--sp-3);
    padding: var(--sp-8) var(--sp-10);
  }
  .st-ikea__eyebrow { grid-column: 1; grid-row: 1; }
  .st-ikea__headline { grid-column: 1; grid-row: 2; }
  .st-ikea .st-ikea__cap { grid-column: 1; grid-row: 3; align-self: end; min-height: 88px; }
  .st-ikea__scene { grid-column: 2; grid-row: 1 / span 3; align-self: center; max-width: 360px; }

  .st-ia, .st-im {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    align-items: center; gap: var(--sp-6);
    padding: var(--sp-8) var(--sp-10);
  }
  :is(.st-ia, .st-im) [class$="__text"] { align-self: stretch; justify-content: space-between; }
  .st-ia__eyebrow { flex-direction: column; gap: var(--sp-2); }
  .st-ia__stage, .st-im__stage { max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-ikea *, .st-ia *, .st-im * { transition: none; animation: none; }
}

/* ── [st_usb] „Odsuń bramkę od komputera.” (in the article, static) ── */
.st-usb {
  --st-alert: #E5928C;
  --st-muted: rgba(238, 242, 246, 0.72);
  display: flex; flex-direction: column; gap: var(--sp-4);
  margin: var(--sp-8) 0;
  padding: var(--sp-6) var(--sp-5);
  background: var(--tech-night);
  color: var(--tech-on-night);
  border-radius: var(--radius-xl);
}
.st-usb p { margin: 0; }
.st-usb__text { display: flex; flex-direction: column; gap: var(--sp-3); }
.st-usb__eyebrow {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3);
  font: 500 var(--fs-label)/1.3 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech-sky);
}
.st-usb__status { color: var(--st-muted); }
.st-usb__headline { font: 700 var(--fs-stat)/1.2 var(--font-display); }
.st-usb__cap { font: 400 var(--fs-body)/1.5 var(--font-body); color: var(--st-muted); }
.st-usb__map { display: block; width: 100%; max-width: 350px; height: auto; margin: 0 auto; }

.st-usb .panel { fill: #1A1F26; }
.st-usb .lbl { font: 500 10px var(--font-mono); letter-spacing: 0.08em; fill: var(--st-muted); text-anchor: middle; }
.st-usb .lbl--start { text-anchor: start; }
.st-usb .lbl--end { text-anchor: end; }
.st-usb .lbl--sky { fill: var(--tech-sky); }
.st-usb .lbl--alert { fill: var(--st-alert); }
.st-usb .pc { fill: #2A313B; }
.st-usb .vent { stroke: #3A424D; stroke-width: 3; stroke-linecap: round; }
.st-usb .port { fill: #12151B; }
.st-usb .stick { fill: var(--tech-sky); }
.st-usb .noise { fill: none; stroke: var(--st-alert); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-usb .wave { fill: none; stroke: var(--tech-sky); stroke-width: 2; stroke-linecap: round; opacity: 0.8; }
.st-usb .cable { fill: none; stroke: #8D949E; stroke-width: 3; stroke-linecap: round; }
.st-usb .link { stroke: var(--tech-sky); stroke-width: 2; }
.st-usb .link--off { stroke: #3A424D; stroke-dasharray: 5 4; }
.st-usb .x circle { fill: var(--sale); }
.st-usb .x text { fill: #FFF; font: 700 12px var(--font-body); text-anchor: middle; }
.st-usb .pill rect { fill: var(--tech-on-night); }
.st-usb .pill text { fill: var(--tech-night); font: 500 10px var(--font-mono); letter-spacing: 0.05em; text-anchor: middle; }
.st-usb .pill.off rect { fill: #1E242C; }
.st-usb .pill.off text { fill: #6B7380; }

@media (max-width: 639px) {
  .st-usb { margin-inline: calc(-1 * var(--page-margin)); border-radius: 0; }
}
@media (min-width: 640px) {
  .st-usb {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
    align-items: center; gap: var(--sp-6);
    padding: var(--sp-8) var(--sp-10);
  }
  .st-usb__eyebrow { flex-direction: column; gap: var(--sp-2); }
}
