/**
 * Looking Glass — dark theme (with Bootstrap 5)
 */

 :root {
  --lg-bg: #0f172a;
  --lg-card: rgba(30, 41, 59, 0.72);
  --lg-card-solid: #1e293b;
  --lg-border: rgba(148, 163, 184, 0.14);
  --lg-accent: #3b82f6;
  --lg-accent-hover: #2563eb;
  --lg-muted: #9ca3af;
  --lg-text: #f8fafc;
  --lg-terminal-bg: #020617;
  --lg-terminal-inner: #0f172a;
  --lg-ip-blue: #60a5fa;
  --lg-ip-mint: #6ee7b7;
  --lg-asn: #46c6ff;
  --lg-radius: 12px;
  --lg-radius-sm: 8px;
  --lg-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lg-font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
}

.lg-app--dark {
  --bs-font-monospace: var(--lg-font-mono);
  background: var(--lg-bg);
  color: var(--lg-text);
  font-family: var(--lg-font-sans);
}

.lg-app--dark.text-body {
  color: var(--lg-text);
}

/* Skip link */
.lg-skip-link {
  z-index: 1080;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  overflow: hidden;
}

.lg-skip-link:focus {
  clip: auto;
  clip-path: none;
  padding: 0.35rem 0.75rem;
  background: var(--lg-accent);
  color: #fff;
  border-radius: var(--lg-radius-sm);
}

/* Shell + grid layout */
.lg-shell {
  max-width: 1180px;
}

.lg-layout--grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 992px) {
  .lg-layout--grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  }
}

/* Hero header */
.lg-hero.lg-card {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.lg-hero.lg-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(59, 130, 246, 0.15) 18%,
    var(--lg-accent) 42%,
    #38bdf8 62%,
    rgba(56, 189, 248, 0.12) 82%,
    transparent 100%
  );
  opacity: 0.9;
  pointer-events: none;
}

.lg-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.35rem 1.4rem 1.3rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .lg-hero__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
  }
}

.lg-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.lg-brand__mark {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}

.lg-brand__icon-ring {
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.45) 0%,
    rgba(56, 189, 248, 0.15) 50%,
    rgba(37, 99, 235, 0.35) 100%
  );
  opacity: 0.85;
  filter: blur(0.5px);
}

.lg-brand__icon {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(
    155deg,
    #3b82f6 0%,
    #2563eb 42%,
    #1d4ed8 100%
  );
  background: rgba(59, 130, 246, 0.09);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 10px 28px rgba(37, 99, 235, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset; */
}

.lg-brand__icon svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  opacity: 0.6;
}

.lg-brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.lg-brand__eyebrow {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #64748b;
}

.lg-brand__title {
  margin: 0;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.lg-brand__title-main {
  background: linear-gradient(
    120deg,
    #bfdbfe 0%,
    var(--lg-accent) 38%,
    #38bdf8 72%,
    #7dd3fc 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (background-clip: text) {
  .lg-brand__title-main {
    color: var(--lg-accent);
    background: none;
  }
}

.lg-brand__domain {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--lg-muted);
}

.lg-brand__domain-host {
  font-family: var(--lg-font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #94a3b8;
  padding: 0.2rem 0.55rem 0.22rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

/* Meta strip — node summary + addresses */
.lg-meta-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--lg-radius-sm);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--lg-border);
  flex: 1;
  min-width: 0;
}

@media (min-width: 768px) {
  .lg-meta-bar {
    flex-direction: row;
    align-items: stretch;
    gap: 1rem 1.35rem;
    padding: 0.75rem 1.1rem;
    min-width: min(100%, 560px);
  }
}

@media (min-width: 992px) {
  .lg-meta-bar {
    min-width: min(100%, 640px);
  }
}

.lg-meta-bar__lead {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

@media (min-width: 768px) {
  .lg-meta-bar__lead {
    flex-direction: column;
    justify-content: center;
    padding-bottom: 0;
    padding-right: 1rem;
    margin-right: 0.25rem;
    border-bottom: none;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    max-width: 13rem;
    flex-shrink: 0;
  }
}

.lg-meta-bar__pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: lg-meta-pulse 2.5s ease-out infinite;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .lg-meta-bar__pulse {
    margin-top: 0.25rem;
  }
}

@keyframes lg-meta-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-meta-bar__pulse {
    animation: none;
    box-shadow: none;
  }
}

.lg-meta-bar__lead-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.lg-meta-bar__lead-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lg-muted);
}

.lg-meta-bar__lead-desc {
  font-size: 0.75rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.lg-meta-bar__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  flex: 1;
  min-width: 0;
}

@media (min-width: 576px) {
  .lg-meta-bar__stats {
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.85rem 1.15rem;
    align-items: start;
  }
}

@media (min-width: 768px) {
  .lg-meta-bar__stats {
    gap: 0 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(7.25rem, 1fr));
  }
}

.lg-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
  padding-left: 0;
}

.lg-meta-item--divider {
  border-left: none;
  padding-left: 0;
}

@media (min-width: 576px) {
  .lg-meta-item--divider {
    border-left: 1px solid rgba(148, 163, 184, 0.14);
    padding-left: 0.85rem;
  }
}

.lg-meta-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--lg-muted);
}

.lg-meta-icon {
  flex-shrink: 0;
  opacity: 0.85;
  color: #64748b;
}

.lg-meta-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

.lg-meta-value {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: var(--lg-text);
  word-break: break-word;
}

.lg-meta-value--ip {
  color: var(--lg-ip-blue);
  font-family: var(--lg-font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.045em;
  flex: 1;
  min-width: 0;
}

.lg-meta-value--ip6 {
  color: #a5b4fc;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.lg-meta-value--you {
  color: var(--lg-ip-mint);
  font-family: var(--lg-font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.045em;
  flex: 1;
  min-width: 0;
}

.lg-meta-value--asn {
  flex: 1;
  min-width: 0;
  font-family: var(--lg-font-mono);
  font-size: 0.8125rem;
  letter-spacing: 1px;
  color: var(--lg-asn);
}

.lg-meta-value--location {
  flex: 1;
  min-width: 0;
}

.lg-meta-flag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 2px;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
  pointer-events: none;
}

.lg-meta-flag__svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

.lg-meta-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(51, 65, 85, 0.45);
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lg-meta-copy:hover {
  background: rgba(59, 130, 246, 0.22);
  color: var(--lg-accent);
}

.lg-meta-copy:focus {
  outline: none;
}

.lg-meta-copy:focus-visible {
  outline: 2px solid var(--lg-accent);
  outline-offset: 2px;
}

.lg-meta-copy.lg-meta-copy--ok {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}

.lg-meta-copy.lg-meta-copy--ok:hover {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
}

/* Cards */
.lg-card {
  border-radius: var(--lg-radius);
  background: var(--lg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--lg-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.lg-card-body {
  padding: 1.25rem 1.35rem;
}

.lg-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--lg-text);
}

.lg-section-title__icon {
  display: inline-flex;
  color: var(--lg-accent);
}

.lg-section-title__icon--green {
  color: #34d399;
}

.lg-section-title__icon--speed {
  color: #38bdf8;
}

.lg-section-title--files {
  margin-bottom: 0.85rem;
}

.lg-section-title--sp {
  margin-bottom: 0;
}

/* Network utilities — header + lead */
.lg-util-head {
  margin-bottom: 1rem;
}

.lg-section-title--util {
  margin-bottom: 0.35rem;
}

.lg-util-lead {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #94a3b8;
  /* border-left: 3px solid rgba(56, 189, 248, 0.55); */
  max-width: 36rem;
  margin: 0.55rem 0 0;
  padding: 0.15rem 0 0.15rem 0.75rem;
  border-left: 3px solid rgba(56, 189, 248, 0.55);
}

/* Tab strip — underline-style tab bar */
.lg-tabs-track {
  margin-bottom: 1.35rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(71, 85, 105, 0.35);
}

.lg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 0;
}

@media (max-width: 479px) {
  .lg-tabs {
    gap: 0;
  }
}

.lg-tab {
  position: relative;
  border: none;
  border-radius: var(--lg-radius-sm) var(--lg-radius-sm) 0 0;
  padding: 0.55rem 1rem 0.7rem;
  margin-bottom: -1px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.lg-tab__icon {
  flex-shrink: 0;
  opacity: 0.92;
}

.lg-tab:not(.lg-tab--active) .lg-tab__icon {
  color: #64748b;
}

.lg-tab:hover:not(.lg-tab--active) {
  background: rgba(59, 130, 246, 0.06);
  color: #cbd5e1;
}

.lg-tab:hover:not(.lg-tab--active) .lg-tab__icon {
  color: #94a3b8;
}

/* Active tab: strong typography + bottom indicator instead of heavy fill */
.lg-tab--active {
  background: rgba(59, 130, 246, 0.09);
  color: #f1f5f9;
  font-weight: 700;
  box-shadow: none;
}

.lg-tab--active .lg-tab__icon {
  color: var(--lg-accent);
}

.lg-tab--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--lg-accent), #38bdf8);
}

.lg-tab:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

/* Form */
.lg-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Form row — single-line combined field */
.lg-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}

/* Input + run button combined shell */
.lg-input-shell {
  display: flex;
  align-items: stretch;
  flex: 1 1 220px;
  min-width: 0;
  box-sizing: border-box;
  height: 2.75rem;
  min-height: 2.75rem;
  max-height: 2.75rem;
  border: 1px solid var(--lg-border);
  border-radius: var(--lg-radius-sm);
  background: rgba(15, 23, 42, 0.6);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.lg-input-shell:focus-within {
  border-color: rgba(59, 130, 246, 0.35);
}

.lg-input-shell .lg-input {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 0.85rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--lg-text);
  font-family: var(--lg-font-mono);
  font-size: 0.875rem;
  line-height: 1.25;
}

.lg-input-shell .lg-input:focus {
  outline: none;
}

.lg-input-shell .lg-btn-run {
  box-sizing: border-box;
  flex-shrink: 0;
  align-self: stretch;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0 1.1rem;
  border: none;
  border-radius: 0;
  /* border-left: 1px solid rgba(148, 163, 184, 0.18); */
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  /* cursor: pointer; */
  background: linear-gradient(180deg, var(--lg-accent) 0%, var(--lg-accent-hover) 100%);
  color: #fff;
  transition: filter 0.15s ease, transform 0.08s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  appearance: none;
  -webkit-appearance: none;
}

.lg-input::placeholder {
  color: #64748b;
}

.lg-btn-run__icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.lg-btn-run:hover:not(:disabled) {
  filter: brightness(1.06);
}

.lg-btn-run:active:not(:disabled) {
  transform: translateY(1px);
}

.lg-btn-run:disabled {
  opacity: 0.65;
  cursor: wait;
}

.lg-input-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #64748b;
}

.lg-extra-block {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.lg-extra-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--lg-muted);
  margin-bottom: 0.55rem;
}

.lg-extra-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
}

.lg-chip-cmd,
.lg-extra-cmds .lg-link-cmd {
  margin: 0;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lg-chip-cmd:hover,
.lg-extra-cmds .lg-link-cmd:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.45);
  color: #dbeafe;
}

.lg-chip-cmd:focus-visible,
.lg-extra-cmds .lg-link-cmd:focus-visible {
  outline: 2px solid var(--lg-accent);
  outline-offset: 2px;
}

.lg-dig-row {
  margin-top: 0.85rem;
}

.lg-label-dig {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lg-muted);
  margin-bottom: 0.35rem;
}

.lg-select-dig {
  width: 100%;
  max-width: 12rem;
  min-height: 2.25rem;
  border-radius: var(--lg-radius-sm);
  border: 1px solid var(--lg-border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--lg-text);
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
}

/* Terminal */
.lg-terminal .lg-terminal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--lg-border);
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--lg-radius) var(--lg-radius) 0 0;
}

.lg-terminal__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--lg-muted);
}

.lg-terminal__dots {
  display: inline-flex;
  gap: 0.35rem;
}

.lg-terminal__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.lg-terminal__dots span:nth-child(1) {
  background: #ef4444;
}

.lg-terminal__dots span:nth-child(2) {
  background: #eab308;
}

.lg-terminal__dots span:nth-child(3) {
  background: #22c55e;
}

/* Page + terminal — shared dark scrollbar */
html.lg-page {
  color-scheme: dark;
  scrollbar-gutter: stable;
}

html.lg-page,
.lg-terminal__body {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.75) rgba(15, 23, 42, 0.75);
}

html.lg-page::-webkit-scrollbar,
.lg-terminal__body::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

html.lg-page::-webkit-scrollbar-track,
.lg-terminal__body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 8px;
  margin: 6px 0;
}

html.lg-page::-webkit-scrollbar-thumb,
.lg-terminal__body::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(88, 101, 122, 0.95) 0%,
    rgba(51, 65, 85, 0.95) 100%
  );
  border-radius: 8px;
  border: 2px solid rgba(15, 23, 42, 0.85);
  background-clip: padding-box;
}

html.lg-page::-webkit-scrollbar-thumb:hover,
.lg-terminal__body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(129, 145, 166, 0.98) 0%,
    rgba(71, 85, 105, 0.98) 100%
  );
  border: 2px solid rgba(15, 23, 42, 0.85);
  background-clip: padding-box;
}

html.lg-page::-webkit-scrollbar-thumb:active,
.lg-terminal__body::-webkit-scrollbar-thumb:active {
  background: rgba(59, 130, 246, 0.45);
}

html.lg-page::-webkit-scrollbar-corner {
  background: var(--lg-bg);
}

.lg-terminal__body::-webkit-scrollbar-corner {
  background: var(--lg-terminal-inner);
}

.lg-terminal__body {
  margin: 0;
  min-height: 14rem;
  max-height: 55vh;
  overflow: auto;
  padding: 1rem 1.1rem;
  background: var(--lg-terminal-inner);
  border-radius: 0 0 var(--lg-radius) var(--lg-radius);
  font-size: 0.8125rem;
  line-height: 1.55;
  box-shadow: inset 0 2px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-top: none;
  color-scheme: dark;
  scrollbar-gutter: stable;
}

.lg-out-code {
  display: block;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
  color: var(--lg-text);
}

.lg-out-code.lg-out-empty {
  color: #94a3b8;
}

.lg-out-code.lg-err {
  color: #f87171;
}

.lg-out-code.lg-loader {
  color: #fbbf24;
}

#lg-out::selection,
#lg-out ::selection {
  background: rgba(59, 130, 246, 0.35);
  color: #f8fafc;
}

/* Sidebar blocks */
.lg-files,
.lg-about-card {
  padding: 16px;
}

.lg-terminal {
  overflow: hidden;
}

/* Sidebar — test files */
.lg-files.lg-card {
  position: relative;
  overflow: hidden;
}

.lg-files.lg-card::before {
  /* content: ""; */
  /* position: absolute; */
  left: 0;
  /* right: 0; */
  /* top: 0; */
  /* height: 2px; */
  /* background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(52, 211, 153, 0.25) 25%,
    #34d399 50%,
    rgba(52, 211, 153, 0.2) 75%,
    transparent 100%
  ); */
  opacity: 0.9;
  pointer-events: none;
}

.lg-section-title--files {
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.lg-file-list {
  padding: 0;
  margin: 0;
}

.lg-file-row {
  margin-bottom: 0.45rem;
}

.lg-file-row:last-child {
  margin-bottom: 0;
}

.lg-file-form {
  margin: 0;
}

button.lg-file-link {
  width: 100%;
  border: none;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
}

.lg-file-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem 0.55rem 0.45rem;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    rgba(51, 65, 85, 0.55) 0%,
    rgba(30, 41, 59, 0.42) 100%
  );
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--lg-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.lg-file-link__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  /* background: linear-gradient(
    180deg,
    rgba(52, 211, 153, 0.85) 0%,
    rgba(45, 212, 191, 0.35) 100%
  ); */
  border-radius: 11px 0 0 11px;
  opacity: 0.85;
  transition: opacity 0.18s ease;
}

.lg-file-link__info {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  flex: 1;
  padding-left: 0.35rem;
}

.lg-file-label {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}

.lg-file-sub {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.lg-file-link:hover {
  /* background: linear-gradient(
    145deg,
    rgba(71, 85, 105, 0.65) 0%,
    rgba(51, 65, 85, 0.55) 100%
  ); */
  /* border-color: rgba(52, 211, 153, 0.35); */
  /* box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(52, 211, 153, 0.12); */
  color: #fff;
  /* transform: translateY(-1px); */
}

.lg-file-link:hover .lg-file-link__accent {
  opacity: 1;
}

.lg-file-link:hover .lg-file-sub {
  color: #94a3b8;
}

.lg-file-link:focus {
  outline: none;
}

.lg-file-link:focus-visible {
  outline: 2px solid rgba(52, 211, 153, 0.65);
  outline-offset: 2px;
}

.lg-file-dl {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  background: rgb(52 211 153 / 7%);
  /* border: 1px solid rgba(52, 211, 153, 0.22); */
  color: #34d399;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.lg-file-link:hover .lg-file-dl {
  background: rgba(52, 211, 153, 0.22);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .lg-file-link {
    transition:
      background 0.18s ease,
      border-color 0.18s ease,
      box-shadow 0.18s ease;
    transform: none;
  }

  .lg-file-link:hover {
    transform: none;
  }

  .lg-file-link:hover .lg-file-dl {
    transform: none;
  }
}

/* About card */
.lg-about-card__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--lg-text);
}

.lg-about-card__title-icon {
  flex-shrink: 0;
}

.lg-about-card__text {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--lg-muted);
}

.lg-about-card__text strong {
  color: var(--lg-text);
  font-weight: 600;
}

/* Aside — operator quick links + snapshot copy */
.lg-quick-card__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--lg-text);
}

.lg-quick-card__title-icon {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--lg-accent);
}

.lg-quick-card__lead {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--lg-muted);
}

.lg-quick-links {
  padding: 0;
  margin: 0 0 0.85rem;
}

.lg-quick-links__item + .lg-quick-links__item {
  margin-top: 0.35rem;
}

.lg-quick-links__a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.42rem 0.5rem;
  border-radius: var(--lg-radius-sm);
  border: 1px solid var(--lg-border);
  background: rgba(30, 41, 59, 0.35);
  color: var(--lg-text);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.lg-quick-links__a:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
  color: #fff;
}

.lg-quick-links__label {
  flex: 1;
  min-width: 0;
}

.lg-quick-links__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.lg-quick-links__hint {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.lg-quick-links__ext {
  flex-shrink: 0;
  opacity: 0.65;
}

.lg-quick-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--lg-radius-sm);
  background: rgba(51, 65, 85, 0.45);
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.lg-quick-copy-btn__text {
  flex: 1;
  text-align: center;
}

.lg-quick-copy-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--lg-accent);
}

.lg-quick-copy-btn:focus {
  outline: none;
}

.lg-quick-copy-btn:focus-visible {
  outline: 2px solid var(--lg-accent);
  outline-offset: 2px;
}

.lg-quick-copy-btn--ok {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
}

/* Footer */
.lg-footer {
  color: #64748b;
  border-top: 1px solid var(--lg-border);
}

/* Speedtest — Sora heading, combined target + run */
.lg-speedtest {
  font-family: "Sora", var(--lg-font-sans);
}

.lg-sp-head {
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.lg-sp-head__title {
  letter-spacing: -0.02em;
}

.lg-sp-lead {
  margin: 0.55rem 0 0;
  padding: 0.15rem 0 0.15rem 0.75rem;
  border-left: 3px solid rgba(56, 189, 248, 0.55);
  font-size: 0.75rem;
  line-height: 1.55;
  color: #94a3b8;
  max-width: 42rem;
}

.lg-sp-cta {
  width: 100%;
}

.lg-speedtest .lg-sp-shell.lg-input-shell {
  height: auto;
  min-height: 3rem;
  max-height: none;
  border-radius: calc(var(--lg-radius-sm) + 2px);
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(
    165deg,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(30, 41, 59, 0.72) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 6px 24px rgba(0, 0, 0, 0.22);
}

.lg-speedtest .lg-sp-shell.lg-input-shell:focus-within {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 0 0 1px rgba(56, 189, 248, 0.12),
    0 8px 28px rgba(56, 189, 248, 0.12);
}

.lg-sp-shell .lg-sp-target {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 0.55rem 0.45rem 0.65rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
}

.lg-sp-target__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #38bdf8;
}

.lg-sp-target__stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
  min-width: 0;
  flex: 1;
}

.lg-sp-target__name {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--lg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lg-sp-target__meta {
  font-family: var(--lg-font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: #64748b;
}

.lg-sp-shell.lg-input-shell > .lg-btn-run {
  border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.lg-speedtest .lg-btn-run--speed {
  padding: 0 1.15rem;
  min-width: 5.0rem;
  background: linear-gradient(
    155deg,
    var(--lg-accent) 0%,
    #2563eb 48%,
    var(--lg-accent-hover) 100%
  );
}

.lg-speedtest .lg-btn-run--speed:hover:not(:disabled) {
  filter: brightness(1.08);
}

.lg-sp-footnote {
  margin: 0.55rem 0 0;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #64748b;
}

.lg-speedtest .lg-sp-cta-btn {
  border-radius: var(--lg-radius-sm);
  background: linear-gradient(165deg, var(--lg-accent) 0%, var(--lg-accent-hover) 100%) !important;
}

.lg-sp-intro--dark {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--lg-border) !important;
  color: var(--lg-muted);
}

.lg-sp-intro__strong {
  color: var(--lg-text);
}

.lg-speedtest .lg-sp-metrics {
  /* padding-top: 0.35rem; */
  /* margin-top: 0.85rem !important; */
  /* border-top: 1px solid rgba(148, 163, 184, 0.1); */
}

/* Speed metric tiles — accent variants */
.lg-sp-tile {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(
    155deg,
    rgba(51, 65, 85, 0.38) 0%,
    rgba(15, 23, 42, 0.92) 58%,
    rgba(15, 23, 42, 0.98) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 8px 28px rgba(0, 0, 0, 0.18);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.lg-sp-tile::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(
    90deg,
    var(--lg-sp-accent, #38bdf8) 0%,
    rgba(56, 189, 248, 0.15) 72%,
    transparent 100%
  );
  opacity: 0.95;
}

.lg-sp-tile--dl {
  --lg-sp-accent: #38bdf8;
}

.lg-sp-tile--ul {
  --lg-sp-accent: #34d399;
}

.lg-sp-tile--lat {
  --lg-sp-accent: #fbbf24;
}

.lg-sp-tile--jit {
  --lg-sp-accent: #a78bfa;
}

.lg-sp-tile--dl::before {
  background: linear-gradient(
    90deg,
    #38bdf8 0%,
    rgba(56, 189, 248, 0.12) 75%,
    transparent 100%
  );
}

.lg-sp-tile--ul::before {
  background: linear-gradient(
    90deg,
    #34d399 0%,
    rgba(52, 211, 153, 0.12) 75%,
    transparent 100%
  );
}

.lg-sp-tile--lat::before {
  background: linear-gradient(
    90deg,
    #fbbf24 0%,
    rgba(251, 191, 36, 0.12) 75%,
    transparent 100%
  );
}

.lg-sp-tile--jit::before {
  background: linear-gradient(
    90deg,
    #a78bfa 0%,
    rgba(167, 139, 250, 0.12) 75%,
    transparent 100%
  );
}


.lg-sp-tile__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 0.95rem 0.8rem;
  min-height: 7.25rem;
}

.lg-sp-tile__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lg-sp-tile__icon-wrap {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--lg-sp-accent, #38bdf8);
}

.lg-sp-tile--dl .lg-sp-tile__icon-wrap {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
}

.lg-sp-tile--ul .lg-sp-tile__icon-wrap {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.22);
  color: #34d399;
}

.lg-sp-tile--lat .lg-sp-tile__icon-wrap {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.28);
  color: #fbbf24;
}

.lg-sp-tile--jit .lg-sp-tile__icon-wrap {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.22);
  color: #a78bfa;
}

.lg-sp-tile__icon-svg {
  display: block;
}

.lg-sp-tile__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.lg-sp-tile__value {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 2.35rem;
  margin: 0;
  padding: 0;
  font-size: clamp(1.05rem, 2.6vw, 1.42rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #f1f5f9;
}

.lg-sp-tile__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 0.15rem;
}

.lg-sp-tile__unit {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.11);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

@media (max-width: 420px) {
  .lg-speedtest .lg-btn-run--speed {
    min-width: 0;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
  }

  .lg-sp-target__badge {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
  }

  .lg-sp-target__badge svg {
    width: 15px;
    height: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-tab,
  .lg-btn-run,
  .lg-file-link,
  .lg-sp-tile {
    transition: none;
  }
}
