/* Surftec Cloud Tools: content that only one tool has (charts, gauges, posters, printed sheets, celebrations).
   Never restyle kit components here (Standards D-EN-09): change the kit's ui.css upstream instead.
   Colours come from tokens (assets/kit/tokens.css, ui.css component tokens); no new hex values. */

/* Paper: the Wi-Fi poster and the printed test sheet keep their printed (light) colours in the dark theme. */
.poster, .sheet-frame { color-scheme: light; --text: var(--paper-text); --muted: var(--paper-muted); --heading: var(--paper-heading); --surface: var(--paper); }

/* QR maker */
.qr-out { display: flex; justify-content: center; }
.qr-out svg { width: 100%; max-width: 360px; height: auto; border-radius: 8px; border: 1px solid var(--line); }

/* Wi-Fi poster: the 2022 layout on A4 (positions in cm, as container units: 1 cm = 100/21 cqw) */
.poster-frame { container-type: inline-size; width: 100%; max-width: 520px; margin: 0 auto; box-shadow: 0 2px 12px rgba(47,69,80,.15); }
.poster { aspect-ratio: 210 / 297; background: #fff; color: #000; position: relative; overflow: hidden; font-family: Verdana, 'DejaVu Sans', sans-serif; }
.poster > * { position: absolute; left: 0; right: 0; margin-left: auto; margin-right: auto; }
.poster-wifi { top: 5.714cqw; width: 30.24cqw; height: auto; }                      /* 1.2 cm; 6.35 cm wide artwork */
.poster-qr { top: 34.29cqw; width: 50cqw; height: 50cqw; display: flex; align-items: center; justify-content: center; } /* 7.2 cm; 10.5 cm square (was 11.9 cm, too close to the text) */
.poster-qr svg { width: 100%; height: 100%; display: block; }
.poster-qr p { font-size: 3cqw; margin: 0; }
.poster-details { top: 89.52cqw; width: 92cqw; margin-top: 0; margin-bottom: 0; text-align: center; font-size: 4.536cqw; line-height: 1.2; overflow-wrap: anywhere; } /* 18.8 cm, 1.1 cm below the QR; 27 pt */
.poster-address { top: auto; bottom: 8.571cqw; width: 66cqw; display: flex; align-items: center; gap: 3cqw; font-family: var(--font-ui); }
.poster-address img { width: 36cqw; height: auto; flex: none; }
.poster-address address { font-style: normal; font-size: 1.45cqw; line-height: 1.45; color: var(--midnight); border-left: 0.25cqw solid #000; padding-left: 3.5cqw; white-space: nowrap; }
.poster-address b { font-weight: 700; }   /* foot of the block sits 1.8 cm above the page edge */

/* Printing: the kit's sheet-page mode hides the page chrome; the poster card loses its frame. */
@media print {
  body.wifi-page form, body.wifi-page .card-head { display: none !important; }
  body.wifi-page .cols, body.wifi-page section.card { display: block; padding: 0; border: 0; background: none; }
  body.wifi-page .poster-frame { width: 210mm; max-width: none; box-shadow: none; margin: 0; }
  body.wifi-page .poster { width: 210mm; height: 296mm; aspect-ratio: auto; break-after: avoid; }
}

/* Camera and mic test */
.av-video { width: 100%; max-height: 520px; background: var(--midnight); border-radius: var(--r-box); display: block; aspect-ratio: 16 / 9; }
.meterWrap { display: flex; align-items: center; gap: 14px; }
.meter { flex: 1; min-width: 0; height: 16px; background: var(--ground); border-radius: var(--r-pill); overflow: hidden; border: 2px solid var(--line); }
.meterFill { height: 100%; width: 0%; background: var(--grad); transition: width .05s linear; }

/* Full-screen celebration template ("All working", support thank-you) */
body.working { background: var(--midnight); color: #fff; overflow: hidden; }
.working-main { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 6vh 6vw; text-align: center; }
.working-tick { width: clamp(72px, 12vw, 132px); height: clamp(72px, 12vw, 132px); border-radius: 50%; background: var(--grad-diag); display: flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 0 0 10px rgba(62,186,206,.15); animation: pop .8s cubic-bezier(.2,1.6,.4,1) both; }
.working-tick svg { width: 58%; height: 58%; }
.working-tick path { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw .7s .45s ease-out forwards; }
.working h1 { margin: 0; font-weight: 800; font-size: clamp(2.4rem, 8vw, 5.5rem); letter-spacing: .02em; line-height: 1.05; }
.working .sub { margin: 0; font-size: clamp(1rem, 2.2vw, 1.4rem); color: var(--mint); font-weight: 500; }
.working-logo { width: min(60vw, 320px); height: auto; margin-top: 2vh; }
.working-foot { position: relative; z-index: 1; text-align: center; font-size: 12px; color: rgba(255,255,255,.6); padding: 14px; }
.bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.glow { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(60px); opacity: .45; animation: wander 26s ease-in-out infinite alternate; }
.g1 { background: radial-gradient(circle, var(--sea) 0%, transparent 65%); left: -20vmax; top: -25vmax; }
.g2 { background: radial-gradient(circle, var(--teal) 0%, transparent 65%); right: -25vmax; bottom: -30vmax; animation-duration: 32s; animation-direction: alternate-reverse; }
.g3 { background: radial-gradient(circle, var(--mint) 0%, transparent 60%); left: 30vw; top: 35vh; width: 45vmax; height: 45vmax; opacity: .18; animation-duration: 21s; }
.bg-logos img { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: auto; min-width: 120px; opacity: 0; animation-name: logofade, logodrift; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-duration: var(--dur), var(--dur2); animation-delay: var(--delay), var(--delay2); }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: -1; }
.burst i { position: absolute; width: 22px; height: 9px; border-radius: 999px; left: -11px; top: -4px; opacity: 0; background: var(--c); animation: burst 1.6s cubic-bezier(.15,.8,.3,1) var(--delay, 0ms) forwards; }
.working h1, .working .sub { text-shadow: 0 2px 18px rgba(20,32,38,.6); }
@keyframes wander { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(18vw, 12vh) scale(1.15); } 100% { transform: translate(-8vw, 22vh) scale(.95); } }
@keyframes logofade { 0%, 100% { opacity: 0; } 25%, 55% { opacity: .28; } 75% { opacity: 0; } }
@keyframes logodrift { 0% { transform: translate(0, 0) scale(.92); } 50% { transform: translate(2.5vw, 1.5vh) scale(1.04); } 100% { transform: translate(0, 0) scale(.92); } }
@keyframes burst { 0% { opacity: 0; transform: rotate(var(--a)) translateX(0) rotate(var(--r)); } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) rotate(calc(var(--r) + 220deg)); } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .working-tick path { stroke-dashoffset: 0; } .burst { display: none; } .bg-logos img { opacity: .15; } }
/* "Now working" title wave: each letter grows, thickens and brightens in turn, every 6 seconds.
   Thickness comes from a text stroke, not font-weight, so neighbouring letters never shift. */
.working h1.wave span.word > span { transform-origin: 50% 80%; animation: letterwave 6s ease-in-out infinite; animation-delay: calc(1.6s + var(--i) * 80ms); }
.working h1.wave span.word { display: inline-block; white-space: nowrap; animation: none; }
.working h1.wave span.sp { display: inline; animation: none; }
.working h1.wave span.word > span { display: inline-block; }
@keyframes letterwave {
  0%, 14%, 100% { transform: none; -webkit-text-stroke: 0 transparent; color: #fff; }
  5% { transform: translateY(-.08em) scale(1.28); -webkit-text-stroke: .05em currentColor; color: var(--mint); paint-order: stroke fill; }
  9% { transform: scale(1.06); -webkit-text-stroke: .02em currentColor; color: #fff; }
}
@media (prefers-reduced-motion: reduce) { .working h1.wave span { animation: none; } }

/* My IP */
.guess { border-radius: var(--r-box); background: var(--ground); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.guess ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 13px var(--font-mono); padding: 4px 10px; border-radius: var(--r-pill); background: var(--ground); color: var(--heading); }
.chip.you { background: var(--teal); color: #fff; }
.chip.gw { background: var(--mint); }
.addr { font-family: var(--font-mono); font-weight: 600; overflow-wrap: anywhere; font-size: 28px; }
.addr.small { font-size: 22px; }
.addr-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.addr-row p { min-width: 0; }
table.t td.hopname { font-size: 12px; overflow-wrap: anywhere; min-width: 140px; }

/* Speed test */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--midnight); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: 13px; white-space: nowrap; transform: translate(-50%, -110%); }
.minutes { display: flex; flex-wrap: wrap; gap: 3px; }
.minute { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 22px; border-radius: 4px; font: 800 11px var(--font-ui); color: #fff; vertical-align: middle; }
.minute.good { background: var(--ok); } .minute.ok { background: var(--amber); color: #000; } .minute.poor { background: var(--danger); }
.bigcard { transition: border-color .3s; }
.bigcard.active { border-color: var(--mint); }
.big { position: relative; width: 100%; max-width: 340px; margin: 0 auto; }
.gauge { display: block; width: 100%; height: auto; overflow: visible; }
.gauge path { fill: none; stroke-width: 14; stroke-linecap: round; }
.gauge .g-bg { stroke: var(--ground); }
.gauge .g-val { stroke: var(--teal); stroke-dasharray: 100 100; stroke-dashoffset: 100; }
.gauge text { font: 600 9px var(--font-ui); fill: var(--muted); }
.bignum { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.bignum span { display: block; font-size: clamp(44px, 9vw, 72px); font-weight: 800; color: var(--heading); line-height: 1; }
.bignum small { font-size: 16px; font-weight: 700; color: var(--muted); }
.bigcard.active .bignum span { color: var(--accent); }
.linesplit { text-align: center; font-size: 14px; font-weight: 600; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }

/* DNS report */
.findings, .checklist, .spf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.findings li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; }
.findings .tag { justify-content: center; }
.checklist li { display: flex; gap: 10px; align-items: center; }
.checklist .mark { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.checklist .yes .mark { background: var(--tint-ok); color: var(--ok); }
.checklist .no .mark { background: var(--tint-err); color: var(--danger); }
.checklist .opt .mark { background: var(--ground); color: var(--muted); }
.spf li { padding-left: calc(var(--depth, 0) * 20px); }
table.dns td.mono { font-size: 13px; }
table.dns td:nth-child(2), table.dns td:nth-child(3) { white-space: nowrap; }
table.dns td:first-child { overflow-wrap: anywhere; min-width: 120px; }
@media (max-width: 599px) { .findings li { grid-template-columns: 1fr; gap: 4px; } .findings .tag { justify-self: start; } }

/* Remote support */
.engineer { display: flex; align-items: center; gap: 16px; }
.engineer-badge { width: 56px; height: 56px; border-radius: 50%; background: var(--grad-diag); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.engineer-badge .ico { width: 28px; height: 28px; }
.engineer .muted { margin: 0; }
.engineer-name { margin: 0; font-size: 24px; font-weight: 800; color: var(--heading); }
input.code-input { font: 700 22px var(--font-mono); letter-spacing: .08em; }

/* Support thank-you feedback */
body.working.scrollable { overflow: auto; }
.working-main.thanks { gap: 22px; padding-top: 5vh; }
.working h1.long { font-size: clamp(1.8rem, 4.6vw, 3.6rem); max-width: 1100px; line-height: 1.15; }
.working-logo.small { width: min(44vw, 220px); }
.feedback { position: relative; z-index: 1; width: min(720px, 100%); background: rgba(255,255,255,.08); border: 1px solid rgba(184,219,217,.25); border-radius: var(--r-card); padding: 22px; display: flex; flex-direction: column; gap: 16px; backdrop-filter: blur(6px); text-align: left; }
.faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.face { background: transparent; border: 2px solid transparent; border-radius: var(--r-box); color: #fff; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font: 600 13px var(--font-ui); transition: transform .15s, background .15s, border-color .15s; }
.face svg { width: clamp(44px, 9vw, 64px); height: auto; }
.face svg circle:first-child { fill: rgba(255,255,255,.12); stroke: var(--mint); stroke-width: 2.5; }
.face svg .eye { fill: #fff; }
.face svg path { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.face.f5 svg path { fill: #fff; }
.face:hover:not(:disabled), .face:focus-visible { transform: translateY(-3px) scale(1.06); background: rgba(255,255,255,.08); }
.face.on { border-color: var(--sea); background: rgba(62,186,206,.18); transform: scale(1.08); }
.face.on svg circle:first-child { fill: var(--sea); stroke: #fff; }
.faces.locked .face:not(.on) { opacity: .35; }
.face:disabled { cursor: default; }
.fb-fields { display: flex; flex-direction: column; gap: 10px; }
.fb-fields label { font-weight: 600; font-size: 14px; color: #fff; display: block; margin-bottom: 4px; }
.fb-fields .opt { font-weight: 500; color: var(--mint); font-size: 12px; margin-left: 4px; }
.fb-fields textarea, .fb-fields input { font-family: var(--font-ui); font-size: 15px; background: #fff; }
.fb-fields textarea { min-height: 110px; }
.fb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fb-fields .pill { align-self: flex-start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-done { margin: 0; font-size: 18px; font-weight: 700; color: var(--mint); text-align: center; }
.fb-error { margin: 0; color: #FFD7D3; font-weight: 600; }
@media (max-width: 599px) { .faces { gap: 2px; } .face span { font-size: 11px; } .fb-row { grid-template-columns: 1fr; } .feedback { padding: 14px; } }

/* Test print page */
.sheet-frame { max-width: 794px; margin: 0 auto; box-shadow: 0 6px 30px rgba(47, 69, 80, .18); background: #fff; }
.sheet { display: block; width: 100%; height: auto; }
@media print {
  body.printtest-page .sheet-frame { width: 210mm; max-width: none; box-shadow: none; margin: 0; }
  body.printtest-page .sheet { width: 210mm; height: 296.5mm; }
}

/* Subnet calculator: the reference-table row for the prefix being shown. */
.t tr.on td { background: var(--tint-info); font-weight: 700; }
