/* guides.css: visuals for /default-router-passwords, /find-router-ip-address and /router-ip-addresses:
   the example label helper, the phone-router-internet diagram, terminal output, the address split and
   the private-range cards. Every animation's resting state is the finished picture, and the global
   prefers-reduced-motion rule in site.css switches the motion off. */

[hidden] { display: none !important; }

/* ---------- Example router label (sticker helper) ---------- */
.sticker-demo { margin: 1rem 0 0.75rem; }
.sticker-card { max-width: 24rem; padding: 0.75rem 0.85rem 0.6rem; background: #fbfbf9; }
.sticker-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 0.5rem; margin-bottom: 0.35rem; border-bottom: 1px dashed #c4ccd4; }
.sticker-mark { width: 2.4rem; height: 0.9rem; border-radius: 3px; background: linear-gradient(90deg, var(--ink) 0 30%, transparent 30% 38%, var(--ink) 38% 100%); opacity: 0.75; }
.sticker-bars { width: 7.5rem; height: 1.4rem; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 3px, var(--ink) 3px 4px, transparent 4px 7px, var(--ink) 7px 10px, transparent 10px 11px); opacity: 0.8; }
.sticker-rows { list-style: none; margin: 0; padding: 0; }
.sticker-rows li + li { margin-top: 0; }
.sticker-rows button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: baseline; width: 100%; min-height: 2.6rem; padding: 0.35rem 0.45rem; border: 0; border-radius: 4px; background: transparent; color: var(--ink); font: 0.9375rem/1.3 var(--font); text-align: left; cursor: pointer; transition: background-color 0.2s, box-shadow 0.2s; }
.sticker-rows .k { color: var(--muted); }
.sticker-rows .v { font: 700 0.9375rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; text-align: right; }
.sticker-rows button:hover { background: var(--paper); }
.sticker-rows button[aria-pressed="true"] { background: #e8f0fd; box-shadow: inset 3px 0 0 var(--wan); }
.sticker-rows button[data-field="admin"][aria-pressed="true"] { background: #e8f5ee; box-shadow: inset 3px 0 0 var(--led); }
.sticker-rows button[data-field="wifi"][aria-pressed="true"] { background: var(--lan-wash); box-shadow: inset 3px 0 0 var(--lan); }
/* Invite a first tap: the two passwords people mix up glow in turn until something is picked */
.sticker-demo.is-ready:not([data-active]) [data-field="wifi"] { animation: sticker-hint 4s ease-in-out infinite; }
.sticker-demo.is-ready:not([data-active]) [data-field="admin"] { animation: sticker-hint 4s ease-in-out infinite; animation-delay: 2s; }
@keyframes sticker-hint { 0%, 40%, 100% { background: transparent; } 15%, 25% { background: #eef2f7; box-shadow: inset 3px 0 0 #9aa6b2; } }
.sticker-says { max-width: 24rem; margin: 0.6rem 0 0; padding: 0.7rem 0.85rem; border: 1px solid var(--rule); border-left: 4px solid var(--wan); border-radius: 0 var(--radius-label) var(--radius-label) 0; background: var(--surface); }
.sticker-says[data-field="admin"] { border-left-color: var(--led); }
.sticker-says[data-field="wifi"] { border-left-color: var(--lan); }
.sticker-says dt { font-weight: 700; }
.sticker-says dd { margin: 0.2rem 0 0; }
.sticker-demo figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 0.5rem; }
.sticker-key { margin: 1rem 0 0; }
.sticker-key > div { padding: 0.45rem 0.6rem; border-radius: var(--radius-label); }
.sticker-key > div + div { border-top: 1px solid var(--rule); }
.sticker-key > div.is-active { background: var(--surface); }
.sticker-key dt { font-weight: 700; }
.sticker-key dd { margin: 0.1rem 0 0; color: var(--muted); }
.sticker-key > div.is-active dd { color: var(--ink); }

/* ---------- Phone, router, internet ---------- */
.netpath { margin: 1rem 0 1.5rem; }
.netpath svg { display: block; width: 100%; max-width: 24rem; height: auto; margin: 0 0 0.5rem; }
.np-ink { fill: #18222e; }
.np-screen { fill: #dbe7fb; }
.np-you { fill: var(--wan); }
.np-router { fill: #fff; stroke: #18222e; stroke-width: 2.5; }
.np-antenna { stroke: #18222e; stroke-width: 4; stroke-linecap: round; }
.np-led { fill: var(--led); }
.np-led2 { fill: var(--wan); }
.np-port { fill: #d6dde4; }
.np-globe { fill: #e8f5ee; stroke: #566372; stroke-width: 2; }
.np-meridian { fill: none; stroke: #566372; stroke-width: 1.5; }
.np-line { stroke-width: 3; stroke-dasharray: 6 5; animation: np-flow 1.4s linear infinite; }
.np-line.lan { stroke: var(--led); }
.np-line.wan { stroke: #9aa6b2; }
.np-packet { opacity: 0; }
.np-packet.lan { fill: var(--led); animation: np-hop-lan 2.8s ease-in-out infinite; }
.np-packet.wan { fill: #566372; animation: np-hop-wan 2.8s ease-in-out infinite 1.4s; }
@keyframes np-flow { to { stroke-dashoffset: -22; } }
@keyframes np-hop-lan { 0% { opacity: 0; transform: none; } 10% { opacity: 1; } 45% { opacity: 1; transform: translateX(60px); } 55%, 100% { opacity: 0; transform: translateX(60px); } }
@keyframes np-hop-wan { 0% { opacity: 0; transform: none; } 10% { opacity: 1; } 45% { opacity: 1; transform: translateX(48px); } 55%, 100% { opacity: 0; transform: translateX(48px); } }
.netpath-key { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.netpath-key li + li { margin-top: 0; }
.netpath-key li { display: grid; grid-template-columns: 0.4rem minmax(0, 1fr); column-gap: 0.65rem; padding: 0.15rem 0; }
.netpath-key li::before { content: ""; grid-row: span 2; border-radius: 3px; background: #9aa6b2; }
.netpath-key li.is-you::before { background: var(--wan); }
.netpath-key li.is-router::before { background: var(--led); }
.netpath-key strong { font-size: 1.0625rem; }
.netpath-key span { color: var(--muted); font-size: 0.9375rem; }
.netpath figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 0.5rem; }

/* ---------- Device steps ---------- */
.device-steps code, .glossary code, main p code { font: 0.9375rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 0.05rem 0.3rem; }
.device-steps ol.steps { margin-bottom: 0.75rem; }

/* Terminal output (real OS text, example numbers) */
.term { margin: 0.75rem 0 1rem; }
.term pre { margin: 0; padding: 0.8rem 0.9rem; border-radius: 10px; background: #18222e; color: #dfe6ee; overflow-x: auto; font: clamp(0.6rem, 2.7vw, 0.8125rem)/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.term samp { font: inherit; }
.term .t-dim { color: #8a96a3; }
.term .t-hit { display: inline-block; min-width: 100%; color: #fff; font-weight: 700; background: rgba(23, 149, 90, 0.45); border-radius: 3px; animation: term-hit 3s ease-in-out infinite; }
.term figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 0.4rem; }
@keyframes term-hit { 0%, 100% { background: rgba(23, 149, 90, 0.45); } 50% { background: rgba(23, 149, 90, 0.7); } }

/* ---------- Address split: network part + device part ---------- */
.addr-split { display: grid; gap: 0.25rem; margin: 0.75rem 0 0.5rem; padding: 0.85rem 0.9rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); max-width: 24rem; font-variant-numeric: tabular-nums; }
.as-row { display: flex; align-items: center; gap: 0.15rem; font-weight: 700; font-size: 1.25rem; }
.as-guess { margin-top: 0.5rem; }
.as-net, .as-host, .as-router { display: inline-grid; place-items: center; flex: none; min-width: 2.6rem; height: 2.6rem; padding: 0 0.35rem; border-radius: 8px; }
.as-net { background: #e8f0fd; border: 2px solid #b9cdf3; }
.as-host { background: var(--lan-wash); border: 2px solid var(--lan); }
.as-router { position: relative; min-width: 3.6rem; background: #e8f5ee; border: 2px solid var(--led); overflow: hidden; }
.as-router span { grid-area: 1 / 1; }
.as-a { animation: as-swap-a 5s ease-in-out infinite; }
.as-b { opacity: 0; animation: as-swap-b 5s ease-in-out infinite; }
@keyframes as-swap-a { 0%, 45% { opacity: 1; transform: none; } 50%, 95% { opacity: 0; transform: translateY(-0.6rem); } 100% { opacity: 1; transform: none; } }
@keyframes as-swap-b { 0%, 45% { opacity: 0; transform: translateY(0.6rem); } 50%, 95% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.as-dot { color: var(--muted); padding: 0 0.05rem; }
.as-note { margin-left: 0.5rem; font-size: 0.8125rem; font-weight: 400; line-height: 1.2; color: var(--muted); }
.as-legend { display: flex; align-items: center; gap: 0.45rem; margin: 0.4rem 0 0; font-size: 0.8125rem; color: var(--muted); }
.as-swatch { width: 0.9rem; height: 0.9rem; border-radius: 3px; background: #e8f0fd; border: 2px solid #b9cdf3; }
@media (prefers-reduced-motion: reduce) { .as-b { display: none; } }

/* ---------- Glossary ---------- */
.glossary dt { font-weight: 700; margin-top: 0.75rem; }
.glossary dd { margin: 0.15rem 0 0; }

/* ---------- Private ranges ---------- */
.ranges { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.5rem; }
.ranges li + li { margin-top: 0; }
.ranges li { display: grid; gap: 0.15rem; padding: 0.65rem 0.8rem; border: 1px solid var(--rule); border-radius: var(--radius-label); background: var(--surface); transition: border-color 0.25s, box-shadow 0.25s; }
.ranges li > span:last-child { color: var(--muted); font-size: 0.9375rem; }
.ranges .ip { white-space: normal; }
.range-kind { justify-self: start; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; }
.range-kind.is-private { background: #e8f5ee; color: #0e5c37; }
.range-kind.is-shared, .range-kind.is-link { background: var(--lan-wash); color: #7a5306; }
.ranges li.is-match { border-color: var(--lan); box-shadow: 0 0 0 3px rgba(201, 138, 11, 0.25); animation: range-in 0.5s ease-out; }
@keyframes range-in { from { transform: translateX(-6px); } to { transform: none; } }
