/* SITE-NETWORK: styles for the redesigned /network and /faq pages (src/site/pages/network.js, faq.js).
 * Loaded after site.css by those two pages only (layout.js page.styles), so site.css stays inside its budget.
 * Same rules as site.css: colours only from tokens.css (through the short names site.css maps on body.site),
 * no external resources, sentence case, and every animation is short (it stops by itself within 5 seconds,
 * WCAG 2.2.2) and is switched off under prefers-reduced-motion. */

/* ------------------------------------------------------------ shared */
.net-section, .faq-section { padding: clamp(3.5rem, 2.5rem + 3.5vw, 6rem) 0; }
.net-section .section-head { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.net-section code, .faq-section code { padding: .05rem .35rem; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--line); color: var(--text); font-size: .92em; overflow-wrap: anywhere; }
.page-hero .lede a, .net-section a, .faq-section a { color: var(--site-ember-text); }

/* ------------------------------------------------------------ /network hero */
.net-hero { position: relative; isolation: isolate; overflow: hidden; }
.net-hero-fx, .net-hero-fx > * { position: absolute; pointer-events: none; }
.net-hero-fx { inset: 0; z-index: -1; }
.net-grid { inset: 0; opacity: .7; background-image: linear-gradient(90deg, var(--site-cyan-haze) 1px, transparent 1px), linear-gradient(180deg, var(--site-cyan-haze) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(180deg, var(--site-text), transparent 85%); -webkit-mask-image: linear-gradient(180deg, var(--site-text), transparent 85%); }
.net-hero .orb-cyan { width: 26rem; height: 26rem; top: -6rem; right: -6rem; left: auto; bottom: auto; }
.net-hero-layout { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .net-hero-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4rem; } }
.net-hero h1 { max-width: 18ch; }
.net-hero .lede { max-width: 56ch; }
.net-hero .hero-actions { margin-top: 2rem; }
@media (min-width: 521px) { .net-hero .hero-actions .btn-lg { padding: .75rem 1.3rem; font-size: 1.17rem; } /* 18.7 px bold: still large text for the white label */ }

.net-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0; }
.net-stats div:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .net-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .net-stats div, .net-stats div:last-child:nth-child(odd) { grid-column: span 2; }
  .net-stats div:nth-child(4):nth-last-child(2), .net-stats div:nth-child(5):last-child { grid-column: span 3; }
}
.net-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .2rem; padding: .85rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--line); background-color: var(--surface); background-image: linear-gradient(160deg, var(--surface-2), var(--bg-2)); min-width: 0; }
.net-stats dt { color: var(--muted); font-size: .85rem; }
.net-stats dd { margin: 0; color: var(--text); font-size: clamp(1.2rem, 1.05rem + .6vw, 1.55rem); font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.net-stats div:first-child dd { color: var(--site-led-green); }

/* The route diagram: upstreams, then our edge, then your server, joined by short glowing links. */
.route-map { margin: 0; padding: 1.5rem 1.25rem 1.1rem; border-radius: var(--r); border: 1px solid var(--line-strong); background-color: var(--bg-2); background-image: linear-gradient(180deg, var(--surface-2), var(--bg)); box-shadow: 0 30px 80px var(--site-shade), 0 0 60px var(--site-cyan-soft); }
.route { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.75rem; }
.route-stage { position: relative; display: grid; justify-items: center; gap: .55rem; }
.route-label { margin: 0; justify-self: start; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .12em; }
.route-stage + .route-stage::before { content: ""; position: absolute; top: -2.75rem; left: 50%; width: 2px; height: 2.75rem; margin-left: -1px; background-image: linear-gradient(180deg, var(--site-cyan-strong), var(--site-ember)); opacity: .8; }
.route-stage + .route-stage::after { content: ""; position: absolute; top: -2.75rem; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--site-cyan); box-shadow: 0 0 10px var(--site-cyan), 0 0 18px var(--site-cyan-glow); opacity: 0; animation: route-pulse 1.6s ease-in-out 3 both; }
.route-stage.route-you::after { background: var(--site-ember); box-shadow: 0 0 10px var(--site-ember), 0 0 18px var(--site-ember-glow); animation-delay: .8s; }
@keyframes route-pulse { 0% { transform: translateY(0); opacity: 0; } 20%, 80% { opacity: 1; } 100% { transform: translateY(calc(2.75rem - 8px)); opacity: 0; } }
.route-nodes { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.route-node { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .6rem; align-items: center; padding: .6rem .8rem; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface-2); min-width: 0; }
.route-node strong { font-size: .98rem; overflow-wrap: anywhere; }
.route-node small { grid-column: 2; color: var(--muted); font-size: .8rem; }
.route-led { grid-row: span 2; width: 8px; height: 8px; border-radius: 50%; background: var(--site-led-green); box-shadow: 0 0 8px var(--site-led-green); }
.route-box { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .85rem; align-items: center; width: min(100%, 22rem); padding: .85rem 1.1rem; border-radius: 12px; border: 1px solid var(--site-cyan-strong); background: var(--surface-2); box-shadow: 0 0 0 4px var(--site-cyan-soft), 0 0 30px var(--site-cyan-soft); min-width: 0; }
.route-box strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.route-box small { grid-column: 2; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.route-box small code { padding: 0 .3rem; border-radius: 4px; background: var(--surface-3); color: var(--text); font-size: .95em; }
.route-icon { grid-row: span 2; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--site-cyan-soft); color: var(--site-cyan); }
.route-box-you { border-color: var(--site-ember); box-shadow: 0 0 0 4px var(--site-ember-soft), 0 0 30px var(--site-ember-soft); }
.route-box-you .route-icon { background: var(--site-ember-soft); color: var(--site-ember-text); }
.route-caption { margin: 1.1rem 0 0; color: var(--muted); font-size: .85rem; text-align: center; }

/* ------------------------------------------------------------ carriers */
.carrier-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 640px) { .carrier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .carrier-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.carrier { --v: var(--site-cyan-strong); --v-text: var(--site-cyan); --v-soft: var(--site-cyan-soft); position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 1rem; row-gap: .75rem; align-items: center; padding: 1.25rem; border-radius: var(--r); border: 1px solid var(--line); background-color: var(--surface); background-image: linear-gradient(160deg, var(--surface-2), var(--bg-2)); transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, opacity .6s var(--ease); }
.carrier.v-ember { --v: var(--site-ember); --v-text: var(--site-ember-text); --v-soft: var(--site-ember-soft); }
.carrier:hover { transform: translateY(-4px); border-color: var(--v); box-shadow: 0 0 40px var(--v-soft); }
.carrier-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--v); background: var(--v-soft); color: var(--v-text); font: 800 1.05rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.carrier-text { display: grid; min-width: 0; }
.carrier-name { font-size: 1.15rem; overflow-wrap: anywhere; }
.carrier-short { color: var(--muted); font-size: .85rem; }
.carrier-role { grid-column: 1 / -1; justify-self: start; padding: .15rem .65rem; border-radius: 999px; border: 1px solid var(--v-soft); background: var(--v-soft); color: var(--v-text); font-size: .8rem; font-weight: 650; }

.net-own { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 900px) { .net-own { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.net-own-item { padding: 1.4rem 1.5rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.net-own-item h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.net-own-item p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ------------------------------------------------------------ why Salt Lake City */
.net-section .tick-list .muted { display: block; color: var(--muted); }
.city-beacon { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; width: min(100%, 26rem); margin: 0 auto; border-radius: 50%; background-image: radial-gradient(circle, var(--site-ember-soft), transparent 62%), linear-gradient(90deg, var(--site-cyan-haze) 1px, transparent 1px), linear-gradient(180deg, var(--site-cyan-haze) 1px, transparent 1px); background-size: 100% 100%, 32px 32px, 32px 32px; mask-image: radial-gradient(circle, var(--site-text) 62%, transparent 71%); -webkit-mask-image: radial-gradient(circle, var(--site-text) 62%, transparent 71%); }
@media (max-width: 520px) { .city-beacon { width: min(100%, 19rem); } }
.beacon-ring { position: absolute; inset: 0; margin: auto; border-radius: 50%; border: 1px solid var(--site-ember); opacity: .45; }
.beacon-ring.r1 { width: 30%; height: 30%; opacity: .8; }
.beacon-ring.r2 { width: 58%; height: 58%; border-color: var(--site-cyan-strong); }
.beacon-ring.r3 { width: 88%; height: 88%; border-style: dashed; border-color: var(--line-strong); opacity: 1; }
.beacon-ring.r1, .beacon-ring.r2 { animation: beacon 2.4s ease-out 2 both; }
.beacon-ring.r2 { animation-delay: .6s; }
@keyframes beacon { 0% { transform: scale(.85); opacity: 0; } 30% { opacity: .9; } 100% { transform: scale(1); opacity: .45; } }
.beacon-pin { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background-color: var(--site-ember-strong); background-image: linear-gradient(135deg, var(--site-ember), var(--site-ember-hot)); color: var(--site-text); box-shadow: 0 0 0 8px var(--site-ember-soft), 0 12px 40px var(--site-ember-glow); }
.beacon-pin .icon { width: 30px; height: 30px; }
.beacon-label { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); display: grid; justify-items: center; padding: .5rem .9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--site-glass); white-space: nowrap; }
.beacon-label strong { font-size: 1rem; }
.beacon-label small { color: var(--muted); font-size: .8rem; }

/* ------------------------------------------------------------ test before you buy */
.net-section .section-head .test-network { color: var(--muted); font-size: 1.05rem; margin: 0; }
.test-grid { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .test-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .test-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .test-card-wide { grid-column: span 2; } }
.test-card { padding: 1.4rem 1.5rem; border-radius: var(--r); border: 1px solid var(--line); background-color: var(--surface); background-image: linear-gradient(180deg, var(--surface-2), var(--bg-2)); min-width: 0; transition: border-color .35s, opacity .6s var(--ease), transform .6s var(--ease); }
.test-card:hover { border-color: var(--site-ember-soft); }
.test-card h3 { display: flex; align-items: center; gap: .6rem; margin: 0 0 .6rem; font-size: 1.15rem; }
.test-card h3 .icon { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--site-cyan-soft); color: var(--site-cyan); }
.test-card p { margin: 0 0 .75rem; color: var(--muted); }
.test-card p:last-child { margin-bottom: 0; }
.cmd-list { margin: 0; }
.cmd-list dt { color: var(--text); }
.cmd-list dd { color: var(--muted); }
.test-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.test-links a { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; font-weight: 650; }
.test-links .icon { width: 1em; height: 1em; }

/* ------------------------------------------------------------ transfer */
.transfer-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 1000px) { .transfer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } }
.transfer-tile { display: grid; gap: .2rem; padding: 1.25rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); min-width: 0; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.transfer-value { color: var(--text); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.transfer-tile:first-child .transfer-value { color: var(--site-cyan); }
.transfer-tile:last-child .transfer-value { color: var(--site-ember-text); }
.transfer-label { color: var(--text); font-weight: 650; }
.transfer-note { color: var(--muted); font-size: .9rem; }
.fair-use { max-width: 52rem; margin: 2rem auto 0; padding: 1.4rem 1.5rem; border-radius: var(--r); border: 1px solid var(--line); border-left: 4px solid var(--site-cyan-strong); background: var(--bg-2); }
.fair-use h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.fair-use p { margin: 0 0 .75rem; color: var(--muted); }
.fair-use p:last-child { margin: 0; }

/* ------------------------------------------------------------ /faq */
.faq-hero h1 { max-width: 20ch; }
.faq-hero { padding-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.faq-facts { justify-content: flex-start; margin: 1.5rem 0 0; }
.faq-layout { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .faq-layout { grid-template-columns: 14rem minmax(0, 1fr); gap: 3rem; align-items: start; } }
.faq-index { min-width: 0; }
.faq-index-title { margin: 0 0 .5rem; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .12em; }
.faq-index ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.faq-index a { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 650; text-decoration: none; transition: border-color .2s, background-color .2s; }
.faq-index a:hover { border-color: var(--site-ember); background: var(--surface-2); color: var(--text); }
.faq-count { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .35rem; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) {
  .faq-index { position: sticky; top: 96px; }
  .faq-index ul { flex-direction: column; flex-wrap: nowrap; }
  .faq-index a { width: 100%; justify-content: space-between; border-radius: var(--r-sm); }
}
.faq-groups { min-width: 0; display: grid; gap: 2.5rem; }
.faq-section .faq-group h2 { margin: 0 0 1rem; font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); scroll-margin-top: 96px; }
.faq-acc { display: grid; gap: .75rem; }
details.faq-item { border-radius: var(--r-sm); border: 1px solid var(--line); background-color: var(--surface); background-image: linear-gradient(180deg, var(--surface-2), var(--bg-2)); transition: border-color .2s, box-shadow .2s; }
details.faq-item:hover { border-color: var(--line-strong); }
details.faq-item[open] { border-color: var(--site-ember-soft); box-shadow: 0 0 0 1px var(--site-ember-soft), 0 12px 30px var(--site-shade); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding: .85rem 1.1rem; list-style: none; cursor: pointer; border-radius: var(--r-sm); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-item summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.faq-section .faq-item h3 { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.35; letter-spacing: 0; color: var(--text); scroll-margin-top: 96px; }
.faq-chevron { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-3); position: relative; transition: transform .2s var(--ease), border-color .2s; }
.faq-chevron::before { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -5px 0 0 -4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
details[open] > summary .faq-chevron { transform: rotate(180deg); border-color: var(--site-ember); }
.faq-item summary:hover .faq-chevron { border-color: var(--muted); }
.faq-answer { padding: 0 1.1rem 1.1rem; }
.faq-section .faq-answer p { margin: 0; color: var(--muted); max-width: 68ch; }
.faq-cta .hero-actions { margin-top: .5rem; }
/* SITE-QUICK: /network "Network questions" reuses the /faq accordion. */
.net-faq .faq-acc { max-width: 56rem; margin: 0 auto; }
.net-faq-more { margin: 1.25rem 0 0; font-weight: 650; text-align: center; }
.net-faq-more a { display: inline-flex; align-items: center; gap: .4rem; }
@media print { details.faq-item .faq-answer { display: block; } }

/* ------------------------------------------------------------ phones */
@media (max-width: 520px) {
  .route-map { padding: 1.1rem .9rem .9rem; }
  .route-nodes { gap: .5rem; }
  .route-node { padding: .5rem .6rem; column-gap: .45rem; }
  .route-node strong { font-size: .9rem; }
  .net-stats div { padding: .7rem .8rem; }
  .carrier { padding: 1rem; }
  .test-card, .net-own-item, .fair-use { padding: 1.1rem; }
  .transfer-tile { padding: 1rem; }
  .beacon-label { bottom: 8%; }
  .faq-item summary { padding: .75rem .9rem; }
  .faq-answer { padding: 0 .9rem .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .route-stage + .route-stage::after, .beacon-ring { animation: none !important; }
  .route-stage + .route-stage::after { opacity: 0; }
  .carrier, .faq-chevron, details.faq-item { transition: none; }
}
