:root {
  color-scheme: light;
  font-family:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: black;
  background: white;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

main {
  width: min(100%, 64rem);
  margin-inline: auto;
  padding: clamp(3rem, 8vh, 6rem) clamp(1.25rem, 5vw, 4rem) 2rem;
  text-align: center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 15ch;
  margin-inline: auto;
  font-size: clamp(2.75rem, 6.5vw, 5rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1.06;
  text-wrap: balance;
}

.intro {
  max-width: 42ch;
  margin: 1.25rem auto 0;
  font-size: 1.125rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  margin-block: 3rem 2rem;
  padding-block: 2rem;
  border-block: 1px solid lightgray;
}

.domain {
  min-width: 0;
}

.label {
  margin-bottom: 0.75rem;
  color: dimgray;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.domain-name {
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.unicode {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 550;
  letter-spacing: -0.035em;
}

.lookalike {
  text-decoration: underline;
  text-decoration-color: firebrick;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

.punycode,
code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-variant-ligatures: none;
}

.punycode {
  font-size: clamp(1.125rem, 2.25vw, 1.625rem);
}

.arrow {
  color: dimgray;
  font-size: 2rem;
}

.explanation,
.warning {
  max-width: 37rem;
  margin-inline: auto;
  font-size: 1.0625rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.distinction {
  margin-bottom: 0.375rem;
  font-size: 1.25rem;
  font-weight: 650;
}

code {
  font-size: 0.9em;
}

.warning {
  margin-top: 2.5rem;
}

h2 {
  max-width: 27ch;
  margin: 0 auto 0.75rem;
  color: firebrick;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
  text-wrap: balance;
}

footer {
  max-width: 35rem;
  margin: 3rem auto 0;
  color: dimgray;
  font-size: 0.8125rem;
  line-height: 1.7;
}

a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  color: inherit;
  text-underline-offset: 0.2em;
}

a:hover {
  color: black;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

@media (max-width: 42rem) {
  .comparison {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
    padding-block: 1.5rem;
  }

  .unicode {
    font-size: 2.5rem;
  }

  .punycode {
    font-size: 1.375rem;
  }

  .arrow {
    justify-self: center;
    line-height: 1;
    transform: rotate(90deg);
  }
}
