/* X Networks — web tools (xnet.ax/tools/): dialog styles for the speed test, ping, my IP, password generator,
   Wi-Fi QR, case converter, support and IT request tools. Night only, design D; sharp corners everywhere
   (site.css already forces border-radius 0; nothing here draws circles or rings). */
:root {
  --t-deep: #0F0A1C; --t-panel: #1A1330; --t-bg2: #140E25; --t-line: #2E2550;
  --t-ink: #F3EFFA; --t-soft: #CFC7E2; --t-mut: #A79FBE;
  --t-acc: #C8F135; --t-hi: #E6FF8F; --t-glow: rgba(200,241,53,0.18); --t-vi: #8A5CF5;
  --t-grad: linear-gradient(135deg, #C8F135, #A9D61A);
  --t-display: 'Saira Condensed', 'Arial Narrow', sans-serif; --t-body: 'Saira', system-ui, sans-serif;
  --t-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.opt { color: var(--t-mut); font-weight: 400; font-size: 0.82em; }

.loc-note { flex-basis: 100%; text-align: center; font-size: 0.82rem; color: var(--t-mut); }
.loc-note:empty { display: none; }
.loc-note.ok { color: #4ade80; }
.loc-note.err { color: #f87171; }
.loc-note.hint { color: var(--t-mut); }

/* ---- Email verification widget (IT Request) ---- */
.ev-row { display: flex; gap: 6px; align-items: stretch; }
.ev-row input { flex: 1; min-width: 0; }
.ev-btn {
  flex-shrink: 0; padding: 0 11px; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer;
  color: #C8F135; background: rgba(200,241,53,0.12); border: 1px solid rgba(200,241,53,0.45); white-space: nowrap; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.ev-btn:hover { background: rgba(200,241,53,0.2); border-color: rgba(200,241,53,0.65); color: #E6FF8F; }
.ev-btn:disabled { opacity: 0.55; cursor: default; }
.ev-btn.ev-btn-verify {
  color: #86EFAC; background: rgba(22,163,74,0.16); border: 1px solid rgba(22,163,74,0.55);
}
.ev-btn.ev-btn-verify:hover { background: rgba(22,163,74,0.28); border-color: rgba(22,163,74,0.8); color: #BBF7D0; }
.ev-code-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.ev-code-row input {
  width: 150px; letter-spacing: 3px; font-weight: 700; text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.ev-note { font-size: 0.82rem; color: var(--t-mut, #6b7a99); display: block; margin-top: 6px; }
.ev-note:empty { margin-top: 0; }
.ev-note.ok { color: #16a34a; font-weight: 600; }
.ev-note.err { color: #dc2626; font-weight: 600; }
.ev-verified-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.82rem; font-weight: 700; color: #16a34a;
  margin-top: 6px;
}
.ev-row input.ev-field-error, .form-group input.ev-field-error {
  border: 2px solid #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.16);
}
.ev-btn.ev-btn-error {
  border: 2px solid #ef4444; color: #ef4444; background: rgba(239,68,68,0.12);
  animation: evPulse 0.9s ease 2;
}
@keyframes evPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 7px rgba(239,68,68,0); }
}
@keyframes evCheckPop {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  55% { transform: scale(1.45) rotate(8deg); opacity: 1; }
  75% { transform: scale(0.9) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes evCheckBurst {
  0% { transform: scale(0.3); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}
.ev-check {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; background: #16a34a; color: #fff;
  font-size: 12px; font-weight: 900; flex-shrink: 0; margin-right: 2px;
  animation: evCheckPop 0.55s cubic-bezier(.34,1.56,.64,1);
}
.ev-check::before, .ev-check::after {
  content: ''; position: absolute; inset: 0;
  border: 2px solid #4ade80; animation: evCheckBurst 0.6s ease-out both;
  pointer-events: none;
}
.ev-check::after { animation-delay: 0.1s; border-color: #C8F135; }
@media (prefers-reduced-motion: reduce) { .ev-check, .ev-check::before, .ev-check::after { animation: none; } }
/* Centered validation modal: pops in like the success toast, but flagged red for an error.
   Shared by the "verify your email" and "phone number invalid" checks -- one modal, reused
   via showEvModal(text), so both read the exact same way. */
.ev-modal {
  position: fixed; inset: 0; z-index: 2300; display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 24px; max-width: none; max-height: none; width: 100%; height: 100%; border: none;
  background: rgba(15,10,28,0.62); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.ev-modal::backdrop { background: transparent; }
.ev-modal.show {
  opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s ease;
}
.ev-modal-card {
  width: min(380px, 100%); overflow: hidden; text-align: center;
  background: linear-gradient(180deg, #1A1330, #140E25); border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55);
  transform: scale(0.82); transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.ev-modal.show .ev-modal-card { transform: scale(1); }
.ev-modal-bar { height: 5px; background: var(--t-grad); }
.ev-modal-icon {
  width: 52px; height: 52px; margin: 26px auto 6px;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 900;
  color: #fff; background: #ef4444; box-shadow: 0 0 0 7px rgba(239,68,68,0.15);
}
.ev-modal-text { padding: 12px 28px 20px; font-size: 1.05rem; font-weight: 700; color: #eef4ff; line-height: 1.4; }
.ev-modal-countdown { margin: 0 0 18px; width: calc(100% - 40px); margin-inline: auto; animation-play-state: paused; }
.ev-modal.show .ev-modal-countdown { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) { .ev-modal, .ev-modal-card { transition: none; } }

dialog.enq {
  width: min(480px, calc(100% - 24px)); max-height: calc(100% - 24px); margin: auto; padding: 28px;
  overflow-y: auto; text-align: left; color: var(--t-soft);
  background: var(--t-panel); border: 1px solid var(--t-line);
  box-shadow: var(--t-shadow);
}
dialog.enq::backdrop { background: rgba(15,10,28,0.75); backdrop-filter: blur(4px); }
dialog.enq .form-row { gap: 10px; }
dialog.enq h2 { font-size: 1.3rem; margin-bottom: 4px; color: var(--t-ink); font-family: var(--t-display); }
dialog.enq .lead { color: var(--t-soft); font-size: 0.92rem; margin-bottom: 16px; line-height: 1.5; }
dialog.enq .fine { margin-top: 14px; font-size: 0.78rem; line-height: 1.45; color: var(--t-mut); }
dialog.enq .fine b { color: var(--t-soft); font-weight: 600; }
dialog.enq p.agree { margin-top: 14px; font-size: 0.84rem; line-height: 1.45; color: var(--t-mut); }
dialog.enq p.agree b { color: var(--t-ink); font-weight: 600; }
dialog.enq p.agree a { color: var(--t-acc); }
dialog.enq.ipinfo { width: min(520px, calc(100% - 24px)); }
dialog.enq.support { width: min(620px, calc(100% - 24px)); }
dialog.enq.support .form-group { margin-bottom: 12px; }
dialog.enq.support textarea { min-height: 120px; resize: vertical; }

/* ---- Password Gen tool ---- */
dialog.enq.pwgen { width: min(560px, calc(100% - 24px)); }
.pw-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.pw-tab { flex: 1; font: inherit; font-size: 0.86rem; font-weight: 600; padding: 9px 6px; cursor: pointer;
  color: var(--t-soft); background: none; border: 0; transition: background 0.2s ease, color 0.2s ease; }
.pw-tab:hover { color: var(--t-ink); background: rgba(255,255,255,0.06); }
.pw-tab.active { color: var(--t-deep); background: var(--t-grad); }
.pw-hint { margin-top: 14px; line-height: 1.5; }
.pw-len-combo { display: flex; align-items: center; gap: 12px; }
.pw-len-combo input[type="range"] { flex: 1; }
.pw-len-combo input[type="number"] {
  width: 72px; flex-shrink: 0; padding: 8px 6px; text-align: center;
  font: inherit; font-size: 0.95rem; font-weight: 700; color: var(--t-ink);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(200,241,53,0.35);
}
.pw-len-combo input[type="number"]:focus { outline: none; border-color: var(--t-acc); box-shadow: 0 0 0 3px rgba(200,241,53,0.2); }
dialog.enq.pwgen select { width: 100%; }
dialog.enq.pwgen .pp-row { grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 8px; }
dialog.enq.pwgen .pp-row select { padding: 11px 8px; font-size: 0.86rem; }
dialog.enq.pwgen .pp-row .form-group { margin-bottom: 8px; }
.pp-pos { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.pp-pos button { font: inherit; font-size: 0.7rem; width: 34px; height: 28px; padding: 0; cursor: pointer; flex-shrink: 0;
  color: var(--t-deep); background: var(--t-grad); border: 0; }
.pp-pos button:disabled { opacity: 0.3; cursor: default; }
.pp-pos span { flex: 1; text-align: center; font-size: 0.78rem; font-weight: 600; color: var(--t-acc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-pos.idle { opacity: 0.45; }
.hy-sliders { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.hy-sliders .pw-range-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-nostore { font-weight: 700; background: var(--t-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
@media (max-width: 480px) { dialog.enq.pwgen .pp-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } dialog.enq.pwgen .pp-row .pp-custom-group { grid-column: 1 / -1; } }
.pw-out-wrap { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.pw-out {
  flex: 1; min-height: 52px; display: flex; align-items: center; padding: 12px 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 1.05rem; font-weight: 600;
  letter-spacing: 0.5px; color: var(--t-ink); word-break: break-all; line-height: 1.35;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(200,241,53,0.35);
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.pw-out.erasing { filter: blur(6px); opacity: 0.25; }
.pw-out.stealth { color: transparent; text-shadow: 0 0 9px rgba(200,241,53,0.9); user-select: none; -webkit-user-select: none; letter-spacing: 2px; }
.pw-stealth { display: flex; align-items: center; gap: 12px; margin-top: 12px; cursor: pointer; user-select: none; }
.pw-stealth input { position: absolute; opacity: 0; width: 0; height: 0; }
.pw-switch { position: relative; flex-shrink: 0; width: 42px; height: 24px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.15); transition: background 0.25s ease, border-color 0.25s ease; }
.pw-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--t-soft); transition: transform 0.25s ease, background 0.25s ease; }
.pw-stealth input:checked + .pw-switch { background: var(--t-grad); border-color: transparent; }
.pw-stealth input:checked + .pw-switch::after { transform: translateX(18px); background: var(--t-deep); }
.pw-stealth input:focus-visible + .pw-switch { box-shadow: 0 0 0 3px rgba(200,241,53,0.35); }
.pw-stealth-txt { font-size: 0.88rem; color: var(--t-soft); line-height: 1.3; }
.pw-stealth-txt b { color: var(--t-ink); }
.pw-stealth-txt small { display: block; font-size: 0.75rem; color: var(--t-mut); }
.pw-copy {
  flex-shrink: 0; width: 46px; height: 46px; display: grid; place-items: center; cursor: pointer;
  color: var(--t-acc); background: rgba(200,241,53,0.08); border: 1px solid rgba(200,241,53,0.4);
  transition: background 0.2s ease, transform 0.15s ease;
}
.pw-copy:hover { background: rgba(200,241,53,0.18); }
.pw-copy:active { transform: scale(0.94); }
.pw-copy:disabled { opacity: 0.4; cursor: default; }
.pw-copy svg { width: 20px; height: 20px; }
.pw-meter { height: 6px; margin-top: 12px; background: rgba(255,255,255,0.08); overflow: hidden; }
.pw-meter-bar { height: 100%; width: 0; background: #f87171; transition: width 0.35s ease, background 0.35s ease; }
.pw-strength { margin-top: 8px; font-size: 0.82rem; color: var(--t-mut); }
.pw-strength b { color: var(--t-ink); }
.pw-ctrl { margin-top: 18px; }
.pw-range-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--t-soft); margin-bottom: 8px; }
.pw-range-label b { color: var(--t-acc); font-weight: 700; }
#pw-len, #pp-words, #un-len, #hy-words, #hy-rand { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, #C8F135 var(--pw-fill, 20%), rgba(255,255,255,0.12) var(--pw-fill, 20%)); }
#pw-len::-webkit-slider-thumb, #pp-words::-webkit-slider-thumb, #un-len::-webkit-slider-thumb, #hy-words::-webkit-slider-thumb, #hy-rand::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px;
  background: var(--t-grad); border: 2px solid var(--t-panel); box-shadow: 0 0 0 3px rgba(200,241,53,0.25); cursor: pointer; }
#pw-len::-moz-range-thumb, #pp-words::-moz-range-thumb, #un-len::-moz-range-thumb, #hy-words::-moz-range-thumb, #hy-rand::-moz-range-thumb { width: 20px; height: 20px; background: var(--t-grad); border: 2px solid var(--t-panel); box-shadow: 0 0 0 3px rgba(200,241,53,0.25); cursor: pointer; }
.pw-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 16px; }
.pw-chk { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; color: var(--t-soft); user-select: none; }
.pw-chk input { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; flex-shrink: 0; cursor: pointer;
  border: 1px solid rgba(200,241,53,0.45); background: rgba(255,255,255,0.05); display: grid; place-items: center; }
.pw-chk input:checked { background: var(--t-grad); border-color: transparent; }
.pw-chk input:checked::after { content: ""; width: 6px; height: 10px; border: solid var(--t-deep); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
dialog.enq.pwgen .form-row { margin-top: 16px; }
dialog.enq.pwgen .form-group input { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* explosion overlay — fixed to the viewport so it works even when the dialog scrolls on small screens */
.pw-boom { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  background: rgba(15,10,28,0.94); z-index: 5; padding: 24px; overflow: hidden; }
.pw-boom[hidden] { display: none; }
.pw-boom-core { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(200,241,53,0.55), rgba(138,92,245,0.45) 50%, rgba(248,113,113,0.5));
  animation: pwFlash 0.55s ease-out forwards; }
@keyframes pwFlash {
  0%   { opacity: 0; }
  12%  { opacity: 1; }
  100% { opacity: 0; }
}
.pw-boom-msg { position: relative; z-index: 1; animation: pwMsgIn 0.5s ease 0.45s both; }
@keyframes pwMsgIn { from { opacity: 0; transform: translateY(10px) scale(0.95); } to { opacity: 1; transform: none; } }
.pw-boom-title { font-family: var(--t-display); font-size: 1.35rem; font-weight: 800; color: var(--t-ink); }
.pw-boom-sub { margin-top: 8px; font-size: 0.92rem; color: var(--t-soft); max-width: 360px; line-height: 1.5; }
.pw-boom-count { margin-top: 14px; font-size: 0.8rem; color: var(--t-mut); }
.pw-boom-msg .countdown-bar { max-width: 220px; margin: 10px auto 0; }
.pw-boom-actions { justify-content: center; margin-top: 18px; }
.pw-boom-actions .go { min-width: 180px; padding: 14px 32px; font-size: 1rem; font-weight: 700;
  background: var(--t-grad); color: var(--t-deep); box-shadow: 0 0 0 1px rgba(200,241,53,0.35), 0 10px 30px rgba(138,92,245,0.45); }
.pw-boom-actions .go:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(200,241,53,0.6), 0 14px 36px rgba(200,241,53,0.45); }
.pw-spark { position: absolute; left: 50%; top: 50%; width: 4px; height: 22px; pointer-events: none; transform-origin: center;
  clip-path: polygon(50% 0, 100% 35%, 60% 100%, 0 70%);
  animation: pwSpark 1s cubic-bezier(0.1, 0.8, 0.3, 1) forwards; }
@keyframes pwSpark { 0% { transform: translate(0, 0) rotate(var(--rot, 0deg)) scale(1.3); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) rotate(calc(var(--rot, 0deg) + 540deg)) scale(0.2); opacity: 0; } }
/* ---- Case Converter ---- */
.cc-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; margin: 14px 0 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.cc-styles .pw-tab { flex: none; width: 100%; font-size: 0.78rem; padding: 9px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caseconv textarea { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.88rem; line-height: 1.5; resize: vertical; }
.caseconv #cc-out { border-color: rgba(200,241,53,0.45); }
.cc-out-group { margin-top: 14px; }
.cc-stats { margin-top: 8px; font-size: 0.74rem; letter-spacing: 0.3px; color: var(--t-mut); text-align: right; }
@media (max-width: 560px) { .cc-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- WiFi QR Code ---- */
.wq-pass-row { display: flex; gap: 8px; align-items: stretch; }
.wq-pass-row input { flex: 1; min-width: 0; }
.wq-eye { flex: 0 0 auto; font: inherit; font-size: 0.78rem; font-weight: 600; padding: 0 14px; cursor: pointer;
  color: var(--t-hi); background: rgba(200,241,53,0.08); border: 1px solid rgba(200,241,53,0.3); transition: background 0.2s ease, color 0.2s ease; }
.wq-eye:hover { background: rgba(200,241,53,0.18); color: var(--t-ink); }
.wq-stage { margin-top: 18px; display: flex; justify-content: center; }
.wq-card { display: none; flex-direction: column; align-items: center; gap: 0; padding: 12px;
  background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.28); }
.wq-card.on { display: flex; }
.wq-card canvas { display: block; width: 280px; height: auto; }
.wq-caption { display: flex; flex-direction: column; align-items: center; gap: 1px; max-width: 260px; margin-top: -16px; }
.wq-cap-ssid { font-weight: 800; font-size: 1rem; color: #0F0A1C; word-break: break-word; text-align: center; }
.wq-cap-sub { font-size: 0.7rem; letter-spacing: 0.3px; color: #64748b; text-align: center; }
.wq-cap-credit { font-size: 0.7rem; letter-spacing: 0.3px; color: #64748b; text-align: center; text-transform: uppercase; }
.wq-empty { font-size: 0.82rem; color: var(--t-mut); text-align: center; margin: 10px 0; }
.wifiqr .pw-hint { margin-top: 14px; }

/* ---- IT Request wizard ---- */
.wiz-bar { display: flex; gap: 6px; list-style: none; margin: 18px 0 20px; padding: 0; }
.wiz-bar li { flex: 1; display: flex; align-items: center; gap: 7px; font-size: 0.72rem;
  letter-spacing: 0.6px; text-transform: uppercase; color: var(--t-mut); }
.wiz-bar li span { width: 22px; height: 22px; flex: none; display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
  background: rgba(255,255,255,0.08); color: var(--t-soft); }
.wiz-bar li.on { color: var(--t-ink); }
.wiz-bar li.on span { background: var(--t-grad); color: var(--t-deep); }
.ir-review .r.head { margin: 0; text-align: left; }
.wiz-bar li.done span { background: #4ade80; color: #052e16; }
@media (max-width: 560px) { .wiz-bar li { font-size: 0; gap: 0; } .wiz-bar li span { font-size: 0.72rem; } }

/* the dialog borrows .spd for its width, which also carries a section
   padding meant for the speed-test layout -- neutralise it here */
.itreq .wiz-step { padding: 0; margin: 0; }
/* Wider than the standard dialog -- this wizard has several side-by-side
   fields (email + Send code, phone, etc.) that felt cramped at the default
   480px dialog width. */
dialog.itreq { width: min(640px, calc(100% - 24px)); }
.wiz-step { display: none; }
.wiz-step.on { display: block; animation: ir-in 0.18s ease-out; }
@keyframes ir-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.ir-seg { display: inline-flex; gap: 4px; padding: 4px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); margin-bottom: 14px; }
.ir-seg-btn { border: 0; background: transparent; color: var(--t-soft); cursor: pointer;
  padding: 8px 18px; font-size: 0.85rem; font-weight: 600; font-family: inherit; }
.ir-seg-btn.on { background: var(--t-grad); color: var(--t-deep); font-weight: 700; }

.ir-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.ir-card { text-align: left; cursor: pointer; font-family: inherit; padding: 13px 14px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12); color: var(--t-soft); transition: border-color .15s, background .15s; }
.ir-card b { display: block; color: var(--t-ink); font-size: 0.92rem; font-weight: 700; margin-bottom: 3px; }
.ir-card span { display: block; font-size: 0.74rem; line-height: 1.35; }
.ir-card:hover { border-color: rgba(200,241,53,0.45); background: rgba(200,241,53,0.06); }
.ir-card.on { border-color: #C8F135; background: rgba(200,241,53,0.12); }
.ir-card.on b { color: #C8F135; }

.ir-sub { display: block; margin: 16px 0 8px; font-size: 0.78rem; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--t-soft); }
.itreq .req { color: #C8F135; }
.ir-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ir-review { display: flex; flex-direction: column; gap: 0; margin-top: 4px;
  border: 1px solid rgba(255,255,255,0.12); overflow: hidden; }
.ir-review .r { display: grid; grid-template-columns: 42% 1fr; gap: 10px; padding: 9px 13px;
  font-size: 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.ir-review .r:last-child { border-bottom: 0; }
.ir-review .r span { color: var(--t-mut); }
.ir-review .r b { color: var(--t-ink); font-weight: 600; word-break: break-word; }
.ir-review .r.head { background: rgba(200,241,53,0.08); grid-template-columns: 1fr; }
.ir-review .r.head b { color: #C8F135; letter-spacing: 0.5px; text-transform: uppercase; font-size: 0.72rem; }

.ir-done { margin-top: 16px; padding: 16px; text-align: center;
  background: rgba(74,222,128,0.12); border: 1px solid #4ade80; }
.ir-done b { display: block; font-size: 1.05rem; color: #bbf7d0; font-weight: 800; letter-spacing: 0.4px; }
.ir-done .ref { display: inline-block; margin: 9px 0 6px; padding: 7px 14px;
  background: rgba(0,0,0,0.3); color: #fff; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.95rem; letter-spacing: 1px; }
.ir-done span { display: block; font-size: 0.78rem; color: var(--t-soft); }
.itreq textarea { width: 100%; resize: vertical; }
.ir-sub em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--t-mut); }
/* The form inputs are LIGHT (white background, dark text). Setting
   color-scheme:dark here made the browser paint the date text white on that
   white background -- the date was being entered, just invisible. Match the
   other inputs instead and leave the picker icon in its native dark form. */
.itreq input[type="date"] { color-scheme: dark; }
.itreq input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.65; cursor: pointer; }
.itreq input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* ---- Ping Test ---- */
.pg-results { margin-top: 18px; padding: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); }
.pg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pg-target { font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.9rem; font-weight: 600; color: var(--t-ink); word-break: break-all; }
.pg-org { margin-top: 4px; font-size: 0.78rem; font-weight: 600; color: #4ade80; }
.pg-verdict { font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 10px; white-space: nowrap; }
.pg-verdict.up   { color: #052e16; background: #4ade80; }
.pg-verdict.down { color: #fff;    background: #ef4444; }
.pg-verdict.wait { color: var(--t-deep); background: var(--t-acc); }
.pg-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px;
  font-size: 0.8rem; color: var(--t-soft); }
.pg-summary b { color: var(--t-ink); font-weight: 700; }
.pg-dns { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.72rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--t-mut); }
.pg-dns i { font-style: normal; color: var(--t-soft); }
.pg-dns .r-used i { color: #4ade80; font-weight: 700; }
.pg-dns .r-stale i { color: #fbbf24; }
.pg-dns .r-none i { color: var(--t-mut); }

.pg-replies { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.pg-reply { display: grid; grid-template-columns: 54px 1fr 70px; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.76rem; color: var(--t-soft); }
.pg-reply .pg-seq { color: var(--t-mut); }
.pg-reply .pg-ms  { text-align: right; color: var(--t-ink); font-weight: 600; }
.pg-reply > span:nth-child(2) { display: block; width: 100%; }
.pg-bar { display: block; height: 8px; background: var(--t-grad); min-width: 3px; }
.pg-reply.lost .pg-bar { background: #ef4444; }
.pg-reply.lost .pg-ms  { color: #fca5a5; }
.pingtool .pw-hint { margin-top: 14px; }

/* ---- Ping Test: multi-host mode ---- */
.pg-multi-check-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: -4px; margin-bottom: 14px; }
.pg-multi-check { margin: 0; }
.pg-stepper { display: flex; align-items: center; gap: 6px; }
.pg-step-btn {
  width: 28px; height: 28px; line-height: 1; font-size: 1rem; font-weight: 700;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); color: var(--t-ink); cursor: pointer;
}
.pg-step-btn:hover:not(:disabled) { border-color: var(--t-acc); }
.pg-step-btn:disabled { opacity: 0.4; cursor: default; }
#pg-multi-count {
  width: 42px; text-align: center; padding: 5px 2px;
  background: rgba(255,255,255,0.05); color: var(--t-ink); border: 1px solid rgba(255,255,255,0.18); font-size: 0.86rem;
}
.pg-stepper-cap { color: var(--t-mut); font-size: 0.74rem; white-space: nowrap; }
.pg-lock-btn {
  width: 28px; height: 28px; background: transparent; border: 1px solid transparent;
  font-size: 0.95rem; cursor: pointer; opacity: 0.55;
}
.pg-lock-btn:hover { opacity: 1; border-color: rgba(255,255,255,0.18); }
.pg-lock-box { margin: -6px 0 14px; display: flex; justify-content: flex-end; }
#pg-lock-code {
  width: 120px; padding: 6px 10px; font-size: 0.8rem; text-align: center;
  background: rgba(255,255,255,0.05); color: var(--t-ink); border: 1px solid rgba(255,255,255,0.18);
  letter-spacing: 1px;
}
.pg-multi-base-group { margin-bottom: 14px; }
.pg-multi-base-group .mini-hint { color: var(--t-mut); font-weight: 400; font-size: 0.78rem; }
.pg-multi-base-hint code {
  background: rgba(255,255,255,0.08); color: var(--t-ink);
  padding: 1px 5px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.78rem;
}
.pg-multi { margin-bottom: 16px; }
.pg-multi-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pg-multi-row { display: flex; gap: 8px; align-items: center; }
.pg-multi-row .pg-multi-input {
  flex: 1 1 auto; min-width: 0; padding: 10px 12px;
  background: rgba(255,255,255,0.05); color: var(--t-ink);
  border: 1px solid rgba(255,255,255,0.15); font-size: 0.86rem;
  transition: border-color 0.2s ease;
}
.pg-multi-row .pg-multi-input:focus { outline: none; border-color: var(--t-acc); }
/* brief glow + scale when a subdomain box is auto-expanded with the base
   domain on tab-out, so the fill-in is noticeable, not silent */
@keyframes pg-autofill-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(200,241,53,0.55); border-color: var(--t-acc); background: rgba(200,241,53,0.12); }
  60%  { box-shadow: 0 0 0 7px rgba(200,241,53,0); border-color: var(--t-acc); }
  100% { box-shadow: 0 0 0 0 rgba(200,241,53,0); background: rgba(255,255,255,0.05); }
}
#pg-host.pg-auto-filled, .pg-multi-row .pg-multi-input.pg-auto-filled { animation: pg-autofill-pulse 0.7s ease-out; }
@media (prefers-reduced-motion: reduce) {
  #pg-host.pg-auto-filled, .pg-multi-row .pg-multi-input.pg-auto-filled { animation: none; border-color: var(--t-acc); }
}
.pg-multi-remove {
  flex: 0 0 auto; width: 32px; height: 32px; line-height: 1;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  color: var(--t-soft); font-size: 1.1rem; cursor: pointer;
}
.pg-multi-remove:hover:not(:disabled) { border-color: #ef4444; color: #fca5a5; }
.pg-multi-remove:disabled { opacity: 0.35; cursor: default; }
.pg-multi-results { display: flex; flex-direction: column; gap: 12px; }
.pg-multi-card {
  padding: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
}
.pg-multi-note { margin-top: 8px; color: #fca5a5; min-height: 1em; }

/* ---- Ping Test: multi-host GRID (desktop only, >2 hosts) ----
   Below this breakpoint the extra classes JS adds (.pg-grid-mode, .pg-wide)
   are inert and every card keeps stacking and scrolling exactly as before
   -- this block is additive, not a fork. All hosts' full results stay
   visible at once; nothing is hidden behind a tab to click through. */
@media (min-width: 820px) {
  dialog.enq.pingtool.pg-wide { width: min(980px, calc(100% - 24px)); }
  .pg-multi-results.pg-grid-mode {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px; align-items: start;
  }
  .pg-multi-results.pg-grid-mode .pg-multi-card { margin: 0; }
}

/* Confetti canvas is appended INSIDE the dialog: a modal lives in the
   browser's top layer, so a sibling elsewhere in the DOM would render
   underneath it no matter how high its z-index. */
.pg-confetti {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 50;
}
dialog.pingtool { position: fixed; }

/* Same-IP celebration popup: full-viewport overlay (position: fixed, not
   absolute -- see the comment on pgSameIpPopup in tools.js for why
   fixed is required: the dialog itself scrolls, and an absolutely
   positioned child would be laid out relative to that scrolled content
   instead of what's actually on screen). z-index 60 keeps it above the
   confetti's 50 so the burst visibly plays behind the card. Lives inside
   the dialog for the same top-layer reason as .pg-confetti. */
.pg-sameip {
  position: fixed; inset: 0; z-index: 60; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(15,10,28, 0.62); backdrop-filter: blur(3px);
  animation: pgSameipFadeIn 0.22s ease-out;
}
.pg-sameip.pg-sameip-out { animation: pgSameipFadeOut 0.22s ease-in forwards; }
@keyframes pgSameipFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pgSameipFadeOut { from { opacity: 1; } to { opacity: 0; } }
.pg-sameip-card {
  position: relative; max-width: 400px; width: 100%; text-align: center;
  padding: 30px 24px 22px;
  background: linear-gradient(160deg, var(--t-panel), var(--t-deep));
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 1.5px rgba(200,241,53,0.55), 0 0 0 3px rgba(138,92,245,0.22),
              0 0 60px rgba(200,241,53,0.15), 0 18px 50px rgba(0,0,0,0.55);
  animation: pgSameipPop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  overflow: hidden;
}
/* faint scanning sweep across the card -- a small, cheap touch that reads
   as "live diagnostic instrument" rather than a static graphic */
.pg-sameip-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 40%, rgba(200,241,53,0.09) 50%, transparent 60%);
  background-size: 220% 220%; animation: pgSameipSweep 3.6s linear infinite;
}
@keyframes pgSameipSweep { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@keyframes pgSameipPop { from { transform: scale(0.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pg-sameip-close {
  position: absolute; top: 8px; right: 10px; width: 26px; height: 26px; z-index: 2; border: 0; background: rgba(255,255,255,0.08);
  color: var(--t-soft); font-size: 1.05rem; line-height: 1; cursor: pointer;
}
.pg-sameip-close:hover { background: rgba(255,255,255,0.16); color: #fff; }
.pg-sameip-badge {
  position: relative; z-index: 1; display: inline-block; margin-bottom: 12px;
  padding: 3px 11px; font-size: 0.66rem; font-weight: 800;
  letter-spacing: 1.6px; color: var(--t-deep); background: var(--t-grad);
  box-shadow: 0 0 16px rgba(200,241,53,0.5);
}
.pg-sameip-msg {
  position: relative; z-index: 1; font-size: 0.92rem; font-weight: 600; color: var(--t-ink);
  line-height: 1.35; margin: 2px 6px 14px;
}
.pg-sameip-addr {
  position: relative; z-index: 1;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.6rem; font-weight: 800; letter-spacing: 0.5px;
  background: var(--t-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  word-break: break-all; margin-bottom: 8px;
}
.pg-sameip-sub { position: relative; z-index: 1; font-size: 0.76rem; color: var(--t-mut); line-height: 1.3; margin-bottom: 16px; }
/* technical readout -- aggregated sent/received/loss/min/max/jitter across
   every host in the run, styled like a diagnostic instrument panel:
   monospace values, hairline grid, a colour-coded loss figure. */
.pg-sameip-stats {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; overflow: hidden;
  background: rgba(255,255,255,0.08);   /* shows through the gaps as hairlines */
  border: 1px solid rgba(255,255,255,0.1);
}
.pg-sameip-stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 11px; background: rgba(255,255,255,0.03);
}
.pg-sameip-stat-label {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--t-mut);
}
.pg-sameip-stat-val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.92rem; font-weight: 700; color: var(--t-ink);
}
.pg-sameip-stat-val.good { color: #4ade80; }
.pg-sameip-stat-val.bad { color: #f87171; }
.pg-sameip-card .countdown-bar { margin-top: 18px; position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .pg-sameip, .pg-sameip-card, .pg-sameip-card::before { animation: none; }
}

/* ---- Standard countdown bar for any popup/toast that auto-dismisses on a
   timer. Set the element's own duration with an inline
   `style="--countdown-ms: <ms>ms"` so the bar always matches the real
   setTimeout it rides next to -- never hardcode a duration only in CSS,
   or the two will drift the next time someone tunes the timeout. Reuse
   this one class rather than a bespoke bar per popup. */
.countdown-bar {
  height: 3px; background: var(--t-grad);
  width: 100%; transform-origin: left; opacity: 0.85;
  animation: countdownShrink var(--countdown-ms, 10000ms) linear forwards;
}
@keyframes countdownShrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .countdown-bar { animation: none; opacity: 0.35; }
}

.pg-found {
  margin-top: 12px; padding: 11px 13px;
  background: rgba(74, 222, 128, 0.12); border: 1px solid #4ade80;
  border-left: 4px solid #4ade80;
}
.pg-found b {
  display: block; color: #bbf7d0; font-size: 0.86rem; font-weight: 700;
  letter-spacing: 0.2px; font-variant-numeric: tabular-nums;
}
.pg-found span {
  display: block; margin-top: 4px; font-size: 0.74rem; color: var(--t-soft);
  font-variant-numeric: tabular-nums;
}

.pg-retry {
  display: block; margin-top: 12px; padding: 12px;
  border: 1px solid rgba(200,241,53, 0.35);
  background: rgba(200,241,53, 0.07);
}
.pg-retry-lead { display: block; font-size: 0.78rem; color: var(--t-soft); margin-bottom: 9px; }
.pg-retry-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pg-retry-row select {
  flex: 1 1 170px; min-width: 150px; padding: 8px 10px;
  background: rgba(255,255,255,0.06); color: var(--t-ink);
  border: 1px solid rgba(255,255,255,0.18); font-size: 0.82rem;
}
.pg-retry-btn { padding: 8px 20px !important; font-size: 0.82rem !important; }
.pg-retry-btn.stop { background: #ef4444 !important; border-color: #ef4444 !important; color: #fff !important; }
.pg-retry-status {
  display: block; margin-top: 9px; font-size: 0.76rem; color: var(--t-acc);
  font-variant-numeric: tabular-nums; min-height: 1em;
}
@media (max-width: 520px) { .pg-retry-row select, .pg-retry-btn { flex: 1 1 100%; } }

/* amber = the name resolves now, but to an address we cannot ping.
   Distinct from red (nothing resolving) so a state change is visible
   without reading the text. */
#pg-note.pg-warn {
  display: block; margin: 12px 0 0; padding: 10px 12px;
  color: #fde68a; background: rgba(251, 191, 36, 0.14);
  border: 1px solid #fbbf24; border-left: 4px solid #fbbf24;
  font-weight: 700; font-size: 0.82rem; line-height: 1.4; letter-spacing: 0.2px;
  animation: pg-shake 0.3s ease-out;
}
.pg-retry.pg-retry-warn {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.07);
}
/* the countdown stays green throughout -- it reports the watch is alive and
   ticking, which is unchanged regardless of what DNS is currently returning.
   Colour-coding it too made the timer look like part of the problem. */

#pg-note.pg-err {
  display: block; margin: 12px 0 0; padding: 10px 12px;
  color: #fecaca; background: rgba(239, 68, 68, 0.16);
  border: 1px solid #ef4444; border-left: 4px solid #ef4444;
  font-weight: 700; font-size: 0.82rem; line-height: 1.4; letter-spacing: 0.2px;
  animation: pg-shake 0.3s ease-out;
}
@keyframes pg-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.pingtool .go.stop { background: #ef4444; border-color: #ef4444; color: #fff; }
.pingtool .go.stop:hover { background: #dc2626; border-color: #dc2626; }
@keyframes pg-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.pg-verdict.wait { animation: pg-pulse 1.1s ease-in-out infinite; }
.pg-reply { animation: pg-in 0.18s ease-out; }
@keyframes pg-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.pw-credit { margin-top: 18px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); text-align: center; font-size: 0.72rem; letter-spacing: 0.4px; color: var(--t-mut); }
/* ---- hide scrollbars in dialogs; scrolling still works by wheel,
       trackpad, touch-drag, keyboard and scroll-anchoring ---- */
dialog.enq,
dialog.enq .cc-out,
#cc-out,
.pg-replies {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* old Edge/IE */
}
dialog.enq::-webkit-scrollbar,
dialog.enq .cc-out::-webkit-scrollbar,
#cc-out::-webkit-scrollbar,
.pg-replies::-webkit-scrollbar {
  width: 0; height: 0;          /* Chrome, Safari, Edge */
}
/* keep momentum scrolling smooth on iOS */
dialog.enq { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@media (max-width: 420px) {
  .pw-toggles { grid-template-columns: 1fr; }
  .pw-out { font-size: 0.92rem; }
  dialog.enq.pwgen .form-row { flex-direction: column; }
}
dialog.enq .ipinfo-rows { display: flex; flex-direction: column; gap: 0; margin-bottom: 4px; }
dialog.enq .ipinfo-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--t-line);
}
dialog.enq .ipinfo-row:last-child { border-bottom: none; }
dialog.enq .ipinfo-label { font-size: 0.85rem; color: var(--t-mut); flex-shrink: 0; }
dialog.enq .ipinfo-value { font-size: 0.92rem; color: var(--t-ink); font-weight: 600; text-align: right; word-break: break-word; }
dialog.enq .fine code { background: rgba(255,255,255,0.08); padding: 2px 6px; font-size: 0.88em; }
dialog.enq .actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
dialog.enq .go { padding: 12px 24px; font: inherit; font-weight: 700; cursor: pointer; color: var(--t-deep); border: 0; background: var(--t-grad); }
dialog.enq .go:disabled { opacity: 0.45; cursor: default; }
dialog.enq .cancel { padding: 12px 16px; font: inherit; cursor: pointer; color: var(--t-mut); background: none; border: 0; }

.spd-big { margin: 14px 0 12px; min-height: 3.4rem; font-size: 3rem; font-weight: 800; line-height: 1.1; text-align: center;
  background: var(--t-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spd-track { height: 8px; background: rgba(255,255,255,0.08); overflow: hidden; }
.spd-bar { height: 100%; width: 0; background: var(--t-grad); transition: width 0.25s linear; }
.spd-stats { display: flex; gap: 10px; margin: 16px 0 4px; }
.spd-stats-4 { flex-wrap: wrap; }
.spd-stats-4 > div { flex: 1 1 calc(50% - 5px); }
.cspd-done-title { font-family: var(--t-display); font-size: 1.1rem; color: var(--t-ink); margin-bottom: 2px; }
.mode-pick { border: 0; padding: 0; margin: 0 0 16px; }
.form-row[hidden], [hidden] { display: none !important; }
.mode-pick legend { padding: 0; margin-bottom: 10px; font-size: 0.82rem; font-weight: 600; color: var(--t-soft); }
.mode-opt { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  transition: border-color 0.2s ease, background 0.2s ease; }
.mode-opt:hover { background: rgba(255,255,255,0.07); }
.mode-opt input { -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 18px; height: 18px; margin: 2px 0 0; cursor: pointer;
  border: 1px solid rgba(200,241,53,0.5); display: grid; place-items: center; }
.mode-opt input:checked { border-color: var(--t-acc); }
.mode-opt input:checked::after { content: ""; width: 9px; height: 9px; background: var(--t-grad); }
.mode-opt:has(input:checked) { border-color: rgba(200,241,53,0.5); background: rgba(200,241,53,0.07); }
.mode-opt b { display: block; font-size: 0.9rem; color: var(--t-ink); font-weight: 600; }
.mode-opt small { display: block; margin-top: 2px; font-size: 0.78rem; color: var(--t-mut); line-height: 1.4; }
.spd-stats div { flex: 1; padding: 14px 6px; text-align: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(200,241,53,0.25); }
.spd-stats span { display: block; font-size: 1.7rem; font-weight: 800; color: var(--t-ink); }
.spd-stats small { color: var(--t-mut); font-size: 0.75rem; }

.toast {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(15,10,28,0.55); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.toast.show { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.6s ease; }
.toast .card {
  width: min(420px, 100%); padding: 28px 34px 32px; text-align: center;
  background: linear-gradient(180deg, var(--t-bg2), var(--t-panel)); border: 1px solid var(--t-line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px var(--t-glow);
  position: relative;
  transform: translateY(10px) scale(0.98); transition: transform 0.6s ease;
}
.toast-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: var(--t-soft); font-size: 1.3rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.toast-close:hover { background: rgba(255,255,255,0.14); color: var(--t-ink); }
.toast.show .card { transform: none; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2100; pointer-events: none; }
.toast .check {
  width: 46px; height: 46px; margin: 0 auto 14px; display: grid; place-items: center;
  font-size: 1.4rem; color: var(--t-deep); background: var(--t-grad);
  animation: pop 0.7s cubic-bezier(.2,1.4,.4,1) both 0.15s;
}
@keyframes pop { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
.toast h3 { font-size: 1.25rem; margin-bottom: 6px; color: var(--t-ink); font-family: var(--t-display); }
.toast p { color: var(--t-soft); line-height: 1.5; font-size: 0.95rem; }
.toast p + p { margin-top: 10px; }
#toast-text strong { display: block; color: var(--t-ink); font-size: 1rem; margin-bottom: 8px; }
.toast .card .countdown-bar { margin-top: 18px; }

@media (max-width: 480px) {
  .loc-note.hint { display: none; }
}


/* ================= design-D layer (overrides the ported rules above) ================= */
dialog.enq, .toast, .ev-modal { font-family: var(--t-body); line-height: 1.55; }
dialog.enq :where(h2, h3, p, ol, ul, fieldset, legend), .toast :where(h3, p) { margin: 0; padding: 0; }
dialog.enq :where(ol, ul) { list-style: none; }
dialog.enq {
  color: var(--t-soft); border: 0; padding: 28px;
  background: linear-gradient(180deg, var(--t-panel), var(--t-bg2));
  box-shadow: inset 0 3px 0 var(--t-acc), inset 0 0 0 1px var(--t-line), var(--t-shadow);
}
dialog.enq::backdrop { background: rgba(15,10,28,0.82); backdrop-filter: blur(4px); }
dialog.enq .logo-mini, .toast .logo-mini { display: flex; margin: 0 0 18px; }
.toast .logo-mini { justify-content: center; padding-bottom: 16px; border-bottom: 1px solid var(--t-line); }
dialog.enq h2 { font-family: var(--t-display); font-weight: 800; font-size: 34px; line-height: 1; text-transform: uppercase; color: var(--t-ink); margin: 0 0 10px; letter-spacing: .01em; }
dialog.enq h3, .toast h3 { font-family: var(--t-display); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
dialog.enq .lead { font-size: 15px; color: var(--t-mut); max-width: none; margin: 0 0 16px; }
dialog.enq a { color: var(--t-acc); border-bottom: 1px solid rgba(200,241,53,.35); }
dialog.enq code { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* form controls: dark fields like the contact form */
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 4px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
dialog.enq .form-group label, dialog.enq .ir-sub, dialog.enq .mode-pick legend { font-size: 13px; font-weight: 500; color: var(--t-mut); }
.field-hint { font-size: 12.5px; color: var(--t-mut); }
dialog.enq input[type=text], dialog.enq input[type=email], dialog.enq input[type=tel], dialog.enq input[type=number],
dialog.enq input[type=password], dialog.enq input[type=date], dialog.enq textarea, dialog.enq select {
  width: 100%; background: var(--t-deep); border: 1px solid var(--t-line); color: var(--t-ink);
  padding: 11px 13px; font: inherit; font-size: 15px; -webkit-appearance: none; appearance: none;
}
dialog.enq select { background-image: linear-gradient(45deg, transparent 50%, var(--t-acc) 50%), linear-gradient(135deg, var(--t-acc) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
dialog.enq input:focus, dialog.enq textarea:focus, dialog.enq select:focus { outline: none; border-color: var(--t-acc); }
dialog.enq ::placeholder { color: #7D7499; opacity: 1; }
select option, select optgroup { background-color: var(--t-deep); color: var(--t-ink); }
dialog.enq input[readonly] { color: var(--t-soft); }
.opt, .mini-hint { color: var(--t-mut); font-weight: 400; font-size: .85em; }

/* buttons: lime chamfered primary, ghost secondary (same language as .btn) */
dialog.enq .actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
dialog.enq .go, .pw-boom-actions .go { display: inline-flex; align-items: center; justify-content: center; padding: 13px 26px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  color: var(--t-deep); border: 0; background: var(--t-grad);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
dialog.enq .go:hover:not(:disabled) { filter: brightness(1.08); }
dialog.enq .cancel { padding: 13px 18px; font: inherit; font-size: 15px; cursor: pointer; color: var(--t-ink); background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--t-line); }
dialog.enq .cancel:hover { box-shadow: inset 0 0 0 1px var(--t-acc); }
.pingtool .go.stop, .pg-retry-btn.stop { background: #EF4444 !important; color: #fff !important; }
dialog.enq .ev-btn { padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--t-acc); background: rgba(200,241,53,.08); border: 1px solid rgba(200,241,53,.45); }
dialog.enq .ev-btn.ev-btn-verify { color: #86EFAC; background: rgba(22,163,74,.14); border-color: rgba(22,163,74,.6); }
.pw-credit { border-top: 1px solid var(--t-line); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--t-mut); }
.pw-credit .ver { color: var(--t-acc); }

/* small angular marks instead of round dots */
.mode-opt input:checked::after { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--t-acc); width: 10px; height: 10px; }
.toast .check, .ev-modal-icon { clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); box-shadow: none; }
.wiz-bar li span { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.pw-switch::after { background: var(--t-soft); }

/* speed test */
.spd-big { font-family: var(--t-display); font-weight: 800; font-size: 56px; letter-spacing: .01em; }
.spd-stats span { font-family: var(--t-display); font-weight: 800; font-size: 34px; line-height: 1.1; }
.spd-stats small, .ipinfo-label, .pg-summary, .cc-stats { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .04em; }
.spd-stats div { background: var(--t-deep); border-color: var(--t-line); }
.spd-track { background: var(--t-deep); box-shadow: inset 0 0 0 1px var(--t-line); height: 10px; }

/* support form bits that used inline styles in the old markup (CSP: style-src 'self') */
.sr-hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-group.sr-confirm { flex-direction: row; align-items: flex-start; gap: 10px; margin-top: 4px; }
.form-group.sr-confirm input { margin-top: 4px; flex: 0 0 auto; accent-color: #C8F135; width: 16px; height: 16px; }
.form-group.sr-confirm label { font-weight: 400; cursor: pointer; color: var(--t-soft); }
#ev-validation-modal-bar { --countdown-ms: 5000ms; }
#pw-boom-bar { --countdown-ms: 10000ms; }
#toast-bar { --countdown-ms: 15000ms; }

/* toast (site.css .card gives it the chamfered panel) */
.toast .card { width: min(440px, 100%); padding: 30px 32px 30px; text-align: center; }
.toast-close { top: 16px; right: 18px; }
.toast h3 { font-size: 26px; line-height: 1.05; color: var(--t-ink); margin: 0 0 8px; }
.toast p { color: var(--t-mut); font-size: 15px; }
.toast .check { color: var(--t-deep); }
.ev-modal-card { background: linear-gradient(180deg, var(--t-panel), var(--t-bg2)); border: 1px solid var(--t-line); }
.ev-modal-bar { background: #EF4444; }
.ev-modal-text { color: var(--t-ink); }

/* Wi-Fi QR: print-only sheet (see the Print handler in tools.js) */
#wq-print-sheet { display: none; }
@media print {
  html.wq-printing body > *:not(#wq-print-sheet), html.wq-printing dialog { display: none !important; }
  html.wq-printing body { background: #fff; }
  html.wq-printing #wq-print-sheet { display: flex; align-items: center; justify-content: center; min-height: 95vh; }
  html.wq-printing #wq-print-sheet img { width: 360px; height: auto; border: 2px solid #000; padding: 12px; }
}

/* ================= tool pages + hub ================= */
.tools-grid .card { display: flex; flex-direction: column; }
.tools-grid .card p { flex: 1; }
.tools-grid .card .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.tools-grid .card .btn { padding: 12px 20px; font-size: 14px; }
.tool-panel { max-width: 860px; margin: 0 auto; background: var(--t-panel); padding: 36px; box-shadow: inset 0 0 0 1px var(--t-line);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px)); }
.tool-panel .cta { justify-content: flex-start; margin-top: 26px; }
.tool-panel .checks { margin-top: 22px; }
.tool-panel p { color: var(--t-mut); font-size: 17px; margin: 0 0 12px; }
.hero.sub .lead a, .tool-panel a.lk { color: var(--t-acc); }

/* small layout fixes on top of the ported rules */
.spd-stats small { display: block; font-size: 11px; line-height: 1.4; margin-top: 4px; }
.wq-hidden-chk { margin-top: 2px; }
dialog.enq.caseconv textarea { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; }
.ir-tiers { margin-bottom: 18px; }
.wiz-bar { margin: 18px 0 22px; }
.wiz-bar li.done span { background: var(--t-acc); color: var(--t-deep); }

@media (max-width: 680px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  dialog.enq { padding: 22px 18px; width: calc(100% - 16px); max-height: calc(100% - 16px); }
  dialog.enq h2 { font-size: 28px; }
  .spd-big { font-size: 44px; }
  .tool-panel { padding: 24px; }
}
