/* ---------- Self-hosted Expletus Sans (same files WordPress uses) ---------- */
@font-face {
  font-family: "Expletus Sans";
  src: url("https://ixlo.net/wp-content/uploads/fonts/RLpqK5v5_bqufTYdnhFzDj2dX_IwS3my73zcDaSY2s1tFQTcXfMm.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Expletus Sans";
  src: url("https://ixlo.net/wp-content/uploads/fonts/RLpqK5v5_bqufTYdnhFzDj2dX_IwS3my73zcDaSq2s1tFQTcXfMm.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Theme variables: dark by default ---------- */
:root {
  --bg: #121216;
  --fg: #e8e8ec;
  --muted: #9a9aa5;
  --card: #1e1e24;
  --border: #33333c;
  --accent: #60a5fa;
  --site-title: #4fa8e0;   /* lighter tint of #044363, same hue, for dark bg */
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --fg: #1a1a1a;
  --muted: #666;
  --card: #ffffff;
  --border: #ddd;
  --accent: #2563eb;
  --site-title: #044363;   /* matches WordPress header exactly */
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  max-width: 90vw;
  overflow: hidden;            /* content never escapes the box */
}

h1 {
  font-family: "Expletus Sans", sans-serif;
  color: var(--site-title);
  font-size: 1.25rem;
  margin: 0 0 1.5rem;
}

.label {
  font-family: "Expletus Sans", sans-serif;
  color: var(--site-title);
  font-size: .85rem;
  margin-bottom: .3rem;
}

.row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;             /* copy button drops below on narrow screens */
}

.ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.25rem;
  font-weight: 600;
  overflow-wrap: anywhere;     /* last resort if a single segment is too long */
  min-width: 0;                /* allow flex item to shrink */
  max-width: 100%;
}

/* ---------- Site title link ---------- */
.site-title {
  position: fixed;
  top: 1rem;
  left: 3.1rem;
  font-family: "Expletus Sans", sans-serif;
  font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.542), 1.2rem);
  color: var(--site-title);
  text-decoration: none;
  font-weight: 500;
}
.site-title:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
button {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  padding: .35rem .8rem;
  transition: background .15s, border-color .15s;
}
button:hover { border-color: var(--accent); color: var(--accent); }

.copy { font-size: .8rem; min-width: 4.5rem; }
.copy.copied { border-color: var(--accent); color: var(--accent); }

#theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  font-size: 1.1rem;
  padding: .4rem .6rem;
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .card { padding: 1.5rem 1rem; width: calc(100vw - 2rem); }
  .ip   { font-size: .95rem; }
  .row  { flex-direction: column; gap: .4rem; }
  .copy { align-self: center; }
  h1    { font-size: 1.1rem; }
  .site-title { top: .75rem; left: 1rem; }
}
