:root {
  --bg: #10110d;
  --bg-2: #171812;
  --ink: #f3f0e6;
  --muted: #9a9586;
  --line: rgba(243, 240, 230, 0.1);
  --lime: #d6ff3f;
  --lime-ink: #14160c;
  --warn: #ff8a5b;
  --ok: #8ef0b8;
  --map: #1b1c16;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --sans: "Outfit", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--sans);
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 8;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

body::before {
  content: "";
  position: fixed;
  inset: 0 auto auto 0;
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  background: radial-gradient(circle, rgba(214, 255, 63, 0.09), transparent 68%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.top,
main,
footer {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 8px;
}

.mark {
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
  text-decoration: none;
}

.mark span {
  color: var(--lime);
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.kicker {
  margin: 56px 0 10px;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.15rem;
  color: var(--muted);
}

.hero {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.ip {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.6rem, 8.5vw, 5.2rem);
  letter-spacing: -0.06em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.ip.is-loading {
  color: var(--muted);
  opacity: 0.55;
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 18px;
}

.place {
  margin: 0;
  color: var(--muted);
}

.copy,
.lookup button,
.ghost {
  font: inherit;
  cursor: pointer;
}

.copy,
.lookup button {
  border: 0;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
}

.copy:disabled,
.lookup button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}

.error {
  margin: 16px 0 0;
  color: var(--warn);
}

.facts {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-top: 22px;
}

.location {
  grid-row: span 2;
}

.browser-card {
  grid-column: 1 / -1;
}

.browser-tests {
  margin-top: 28px;
}

.card-note {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.fine-note {
  margin: 12px 0 0;
  font-size: 0.8rem;
}

.status {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status.ok {
  color: var(--ok);
}

.status.warn {
  color: var(--warn);
}

.status.bad {
  color: #ff6b6b;
}

.status.muted {
  color: var(--muted);
}

.notice {
  margin: 18px 0 0;
  padding: 14px 16px;
  max-width: 72ch;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lime);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.notice strong {
  color: var(--ink);
}

.seo-blurb {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.ua {
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
}

.card-head,
.card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card h2 {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.flag {
  width: 32px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--bg);
  visibility: hidden;
}

.flag[src] {
  visibility: visible;
}

dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin: 0;
}

dl div.wide {
  grid-column: 1 / -1;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  min-height: 34px;
}

.pills li {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  border: 1px solid var(--line);
}

.pills li.skeleton {
  color: var(--muted);
  opacity: 0.5;
}

.pills .on {
  background: rgba(142, 240, 184, 0.12);
  color: var(--ok);
  border-color: transparent;
}

.pills .alert {
  background: rgba(255, 138, 91, 0.12);
  color: var(--warn);
  border-color: transparent;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.map-wrap {
  margin-top: 18px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  height: 240px;
  background: var(--map);
}

.map-wrap.is-empty {
  display: none;
}

#map {
  height: 100%;
}

#map:empty::before {
  content: "Hämtar plats…";
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 0.85rem;
}

#map .leaflet-tile-pane {
  filter: grayscale(1) invert(1) contrast(0.92) brightness(0.78) hue-rotate(20deg);
}

#map .leaflet-control-attribution {
  background: rgba(16, 17, 13, 0.72);
  color: var(--muted);
  font-size: 10px;
}

.lookup {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: end;
  margin: 42px 0 20px;
}

.lookup h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.7rem;
}

.lookup p,
footer {
  color: var(--muted);
}

.lookup form {
  display: flex;
  gap: 8px;
}

.lookup input {
  flex: 1;
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 500 0.95rem var(--mono);
  padding: 12px 14px;
  border-radius: 999px;
  outline: none;
}

.lookup input:focus {
  border-color: var(--lime);
}

.faq {
  margin: 56px 0 28px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.faq-intro {
  max-width: 62ch;
  margin-bottom: 22px;
}

.faq-intro h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.faq-intro p {
  margin: 0;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 18px;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 14px 0;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--lime);
  font-weight: 500;
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details p {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 70ch;
  line-height: 1.55;
}

.faq-list code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--ink);
}

footer {
  padding: 8px 0 40px;
  font-size: 0.92rem;
}

footer code {
  font-family: var(--mono);
  font-size: 0.84em;
  color: var(--ink);
}

.fine {
  max-width: 62ch;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.leaflet-container {
  background: var(--map);
  font-family: var(--sans);
}

.pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 8px rgba(214, 255, 63, 0.18);
}

@media (max-width: 860px) {
  .facts,
  .lookup,
  dl {
    grid-template-columns: 1fr;
  }

  .location {
    grid-row: auto;
  }

  .lookup form {
    flex-direction: column;
  }

  .faq-list summary::after {
    float: none;
    margin-left: 8px;
  }

  .kicker {
    margin-top: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
