:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-2: #eef5f2;
  --ink: #15211d;
  --muted: #5f6f69;
  --line: #d7e1dc;
  --teal: #0f766e;
  --teal-dark: #0b514c;
  --amber: #c47a17;
  --blue: #2f65c8;
  --rose: #ba3d5a;
  --shadow: 0 20px 55px rgba(31, 50, 43, 0.11);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.15), transparent 34rem),
    linear-gradient(180deg, #fbfcfa 0%, var(--bg) 40%, #eef3f1 100%);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .hero-copy h1,
[dir="rtl"] .hero-copy p,
[dir="rtl"] .content-section h2,
[dir="rtl"] .guide-list p,
[dir="rtl"] .explain-grid p,
[dir="rtl"] .faq-list p,
[dir="rtl"] .panel-note {
  text-align: right;
}

[dir="rtl"] .nav-links,
[dir="rtl"] .hero-actions,
[dir="rtl"] .footer-links {
  flex-direction: row-reverse;
}

button {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(215, 225, 220, 0.8);
  background: rgba(251, 252, 250, 0.88);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  gap: 24px;
}

.brand,
.nav-links,
.hero-actions,
.panel-head,
.fingerprint-summary,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.nav-links {
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a:hover {
  color: var(--teal-dark);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.64fr);
  align-items: center;
  gap: 28px;
  min-height: 0;
  margin-bottom: 24px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 8px 0 14px;
  font-size: clamp(2.15rem, 4.4vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 660px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.primary-action,
.secondary-action,
.panel-action,
.icon-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-action,
.panel-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.24);
}

.primary-action {
  padding: 0 20px;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--teal-dark);
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(15, 118, 110, 0.08) 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(15, 118, 110, 0.08) 47px 48px);
  box-shadow: var(--shadow);
}

.signal-card,
.signal-row {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(215, 225, 220, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 36px rgba(31, 50, 43, 0.1);
  backdrop-filter: blur(10px);
}

.signal-card {
  top: 20px;
  left: 18px;
  right: 18px;
  padding: 15px;
}

.signal-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #24b47e;
  box-shadow: 0 0 0 8px rgba(36, 180, 126, 0.14);
}

.signal-card small,
.signal-row span {
  color: var(--muted);
}

.radar {
  position: absolute;
  inset: 108px 42px 102px;
  display: grid;
  place-items: center;
}

.radar span {
  position: absolute;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 50%;
}

.radar span:nth-child(1) {
  width: 46%;
  aspect-ratio: 1;
}

.radar span:nth-child(2) {
  width: 68%;
  aspect-ratio: 1;
}

.radar span:nth-child(3) {
  width: 90%;
  aspect-ratio: 1;
}

.radar-core {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-dark);
  color: #ffffff;
  font-weight: 900;
}

.signal-row {
  right: 18px;
  left: 18px;
  justify-content: space-between;
  padding: 12px 14px;
}

.signal-row:nth-of-type(3) {
  bottom: 108px;
}

.signal-row:nth-of-type(4) {
  bottom: 62px;
}

.signal-row:nth-of-type(5) {
  bottom: 16px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-panel,
.content-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 42px rgba(31, 50, 43, 0.08);
}

.tool-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.tool-panel.wide {
  grid-column: 1 / -1;
}

.panel-head {
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2,
.content-section h2 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  width: 44px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--teal-dark);
  font-weight: 900;
}

.result-hero {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 8px;
  background: #f0f7f5;
}

#ip-address {
  overflow-wrap: anywhere;
  font-size: clamp(1.5rem, 4vw, 2.65rem);
  font-weight: 900;
}

.result-hero small,
.panel-note,
.guide-list p,
.explain-grid p,
.site-footer p {
  color: var(--muted);
  line-height: 1.65;
}

.data-list,
.fingerprint-grid {
  display: grid;
  gap: 10px;
  margin: 0;
}

.data-list div,
.fingerprint-grid div,
.dns-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

dt,
.hash-label,
.fingerprint-grid span,
.dns-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.panel-action {
  width: 100%;
  margin-top: auto;
  padding: 0 18px;
}

.status-pill,
.risk-meter {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  background: #edf4f1;
  color: var(--teal-dark);
  font-size: 0.84rem;
  font-weight: 850;
}

.dns-results {
  display: grid;
  gap: 10px;
}

.empty-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed #b9c8c2;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.dns-card strong,
.fingerprint-grid strong {
  overflow-wrap: anywhere;
}

.fingerprint-summary,
.vpn-summary {
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-radius: 8px;
  background: #f8f4ec;
}

.fingerprint-summary strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.vpn-summary {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  background: #edf4f8;
}

.score-ring {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  justify-self: center;
  border: 10px solid rgba(15, 118, 110, 0.18);
  border-top-color: var(--teal);
  border-radius: 50%;
  background: #ffffff;
}

.score-ring strong {
  display: block;
  margin-bottom: -26px;
  font-size: 2.35rem;
  line-height: 1;
}

.score-ring span,
#vpn-note {
  color: var(--muted);
}

#vpn-note {
  margin: 10px 0 0;
  line-height: 1.65;
}

.vpn-factors {
  display: grid;
  gap: 10px;
}

.vpn-factor {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.factor-state {
  display: inline-flex;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.vpn-factor.pass .factor-state {
  background: #e2f4ec;
  color: var(--teal-dark);
}

.vpn-factor.warn .factor-state {
  background: #fff1dc;
  color: #83510f;
}

.vpn-factor.fail .factor-state {
  background: #fbe7ec;
  color: #8e2840;
}

.vpn-factor.info .factor-state {
  background: #e8eefb;
  color: #244f9c;
}

.vpn-factor strong {
  display: block;
  margin-bottom: 4px;
}

.vpn-factor p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.vpn-advice {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #b9dccb;
  border-radius: 8px;
  background: #f3fbf7;
}

.vpn-advice strong {
  display: block;
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 1.05rem;
}

.vpn-advice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.vpn-advice ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.6;
}

[dir="rtl"] .vpn-advice ul {
  padding-right: 18px;
  padding-left: 0;
}

.fingerprint-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-section {
  display: grid;
  gap: 24px;
  margin-top: 28px;
  padding: 28px;
}

.content-section.split {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}

.explain-grid,
.guide-list,
.faq-list {
  display: grid;
  gap: 16px;
}

.explain-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.explain-grid article,
.guide-list article,
.faq-list article {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.explain-grid h3,
.guide-list h3,
.faq-list h3 {
  margin: 0 0 8px;
}

.explain-grid p,
.guide-list p,
.faq-list p,
.site-footer p {
  margin: 0;
}

.bottom {
  margin-top: 28px;
}

.site-footer {
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 44px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--teal-dark);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .nav-shell,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .tool-grid,
  .content-section.split,
  .explain-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 22px;
  }

  .hero-visual {
    min-height: 340px;
  }

  .fingerprint-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vpn-summary,
  .vpn-factor {
    grid-template-columns: 1fr;
  }

  .score-ring {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  main {
    padding: 24px 14px 44px;
  }

  .nav-shell,
  .site-footer {
    padding-inline: 14px;
  }

  .hero-copy h1 {
    font-size: 2rem;
    line-height: 1.08;
  }

  .hero-copy p {
    font-size: 0.96rem;
  }

  .hero-visual {
    min-height: 310px;
  }

  .radar {
    inset: 98px 22px 92px;
  }

  .signal-row {
    right: 14px;
    left: 14px;
    padding: 10px 12px;
  }

  .signal-row:nth-of-type(3) {
    bottom: 94px;
  }

  .signal-row:nth-of-type(4) {
    bottom: 54px;
  }

  .signal-row:nth-of-type(5) {
    bottom: 14px;
  }

  .tool-panel,
  .content-section {
    padding: 18px;
  }

  .fingerprint-grid {
    grid-template-columns: 1fr;
  }
}
