/* Smartmacherei — Zusatzbausteine des Ratgebers "Smart Home im Altbau ohne Stemmen":
   Rangliste der Funkprotokolle, Dreier-Karten, Schritt-Grafik, Legende fuers Netz-Schema.
   Baut auf /ratgeber/visual.css auf. Mobile zuerst, ab 720 px mehrspaltig. */

/* Dreier-Karten (Gewerke, Wer schliesst an) */
.article .rg-trio { display: grid; gap: 12px; margin: 16px 0 22px; padding: 0; list-style: none; }
.rg-trio li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; align-content: start; }
.rg-trio .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--card-soft); display: grid; place-items: center; }
.rg-trio .ic svg { width: 26px; height: 26px; fill: none; stroke: var(--deep); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rg-trio h3 { margin: 4px 0 4px; font-size: 17px; }
.rg-trio p { margin: 0; font-size: 14px; color: var(--text); }
.rg-trio .tag { display: inline-block; margin-top: 8px; font: 600 11px var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--deep); background: rgba(10,111,190,.08); border-radius: 100px; padding: 3px 9px; }
.rg-trio.who li { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 20px 16px; }
.rg-trio.who .ic { width: 56px; height: 56px; border-radius: 50%; }
.rg-trio.who .ic svg { width: 30px; height: 30px; }

/* Rangliste Funkprotokolle */
.article .rg-rank { display: grid; gap: 10px; margin: 16px 0 22px; padding: 0; list-style: none; counter-reset: rk; }
.rg-rank li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.rg-rank li::before { counter-increment: rk; content: counter(rk); width: 44px; height: 44px; border-radius: 12px; background: var(--deep); color: #fff; font: 700 20px var(--font-display); display: grid; place-items: center; }
.rg-rank li:nth-child(n+3)::before { background: var(--card-soft); color: var(--ink); }
.rg-rank li.first { border-color: rgba(19,135,92,.45); background: linear-gradient(180deg, rgba(19,135,92,.06), transparent); }
.rg-rank h3 { margin: 2px 0 2px; font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rg-rank h3 .tag { font: 600 11px var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--deep); background: rgba(10,111,190,.08); border-radius: 100px; padding: 3px 9px; }
.rg-rank p { margin: 0; font-size: 14px; color: var(--text); }

/* Bildpaare: Luft zur Legende und zur Bildunterschrift */
.article .rg-compare + .note, .article .rg-compare + .rg-legend { margin-top: 10px; }
.article .rg-legend + .note { margin-top: 8px; }

/* Legende Netz-Schema */
.rg-legend i.mesh { background: #0a6fbe; height: 2px; border-radius: 1px; opacity: .7; }
.rg-legend i.weak { background: #cf3d33; height: 2px; border-radius: 1px; opacity: .7; }
.rg-legend i.hub { background: #0a2a3d; width: 12px; height: 12px; border-radius: 3px; }
.rg-legend i.mains { background: #0a6fbe; width: 12px; height: 12px; border-radius: 50%; }
.rg-legend i.batt { background: #fff; border: 2px solid #0a2a3d; width: 9px; height: 9px; border-radius: 50%; }

/* Schritt-Grafik: Erst ein Raum, dann das Haus */
.article .rg-steps { display: grid; gap: 0; margin: 16px 0 22px; padding: 0; list-style: none; counter-reset: sp; }
.rg-steps li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 0 0 18px; align-content: start; }
.rg-steps li::before { counter-increment: sp; content: counter(sp); width: 40px; height: 40px; border-radius: 50%; background: var(--deep); color: #fff; font: 700 17px var(--font-display); display: grid; place-items: center; position: relative; z-index: 1; }
.rg-steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: rgba(10,111,190,.35); }
.rg-steps li:last-child { padding-bottom: 0; }
.rg-steps h3 { margin: 8px 0 2px; font-size: 17px; }
.rg-steps p { margin: 0; font-size: 14px; color: var(--text); }
.rg-steps .rooms { display: flex; gap: 4px; margin: 8px 0 0; }
.rg-steps .rooms i { width: 22px; height: 16px; border-radius: 4px; border: 1.5px solid rgba(10,42,61,.25); background: var(--card); }
.rg-steps .rooms i.on { background: rgba(19,135,92,.35); border-color: #13875c; }

@media (min-width: 720px) {
  .article .rg-trio { grid-template-columns: repeat(3, 1fr); }
  .rg-trio li { grid-template-columns: 1fr; }
  .rg-trio h3 { margin-top: 8px; }
  .article .rg-steps { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .rg-steps li { grid-template-columns: 1fr; padding: 0; }
  .rg-steps li:not(:last-child)::after { left: 40px; right: -14px; top: 19px; bottom: auto; width: auto; height: 2px; }
  .rg-steps h3 { margin-top: 10px; }
}
