:root {
  --bg: #0f0b16;
  --surface: #171122;
  --surface-2: #1e1730;
  --line: #2c2242;
  --text: #ece8f5;
  --muted: #a297bd;
  --faint: #6f6590;
  --accent: #9d5cff;
  --accent-text: #c4a6ff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(157, 92, 255, 0.16);
  --ok: #52d99a;
  --danger: #ff6b81;
  --gutter: clamp(16px, 5vw, 56px);
  --measure: 68rem;
  --sans: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f1fa;
    --surface: #ffffff;
    --surface-2: #ece6f8;
    --line: #ddd5ee;
    --text: #1d1630;
    --muted: #625a80;
    --faint: #8f86ab;
    --accent: #7b3fe4;
    --accent-text: #6a2fd6;
    --accent-soft: rgba(123, 63, 228, 0.12);
    --ok: #17924f;
    --danger: #c62a45;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-inline: var(--gutter);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.top,
.hero,
.foot {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
}

.top {
  padding-block: 28px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 26px;
  height: 26px;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(48px, 12vh, 140px) 56px;
}

.claim {
  margin: 0;
}

.url {
  --len: 8;
  --chars: calc(9 + var(--len) + 1);
  --avail: min(100vw - 2 * var(--gutter), var(--measure));
  display: flex;
  align-items: baseline;
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.25rem, calc(var(--avail) / (var(--chars) * 0.6)), 6.5rem);
  line-height: 1.1;
  letter-spacing: 0;
  font-variant-ligatures: none;
  font-feature-settings: 'calt' 0;
  white-space: nowrap;
  cursor: text;
}

.url .fixed {
  color: var(--text);
}

.url input {
  width: calc((var(--len) + 0.5) * 1ch);
  min-width: 3ch;
  max-width: 100%;
  padding: 0 0 0.1em;
  margin: 0;
  line-height: 1.3;
  border: 0;
  border-bottom: 0.055em solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--accent-text);
  font: inherit;
  font-weight: 500;
  letter-spacing: inherit;
  caret-color: var(--accent);
  outline: none;
  transition: border-color 160ms ease;
}

.url input::placeholder {
  color: var(--faint);
  opacity: 1;
}

.url input:focus {
  border-bottom-color: var(--accent);
}

.url:has(input:focus-visible) {
  outline: none;
}

.lede {
  max-width: 34rem;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.5;
}

.result {
  min-height: 112px;
  margin-top: 36px;
}

.result > * {
  animation: arrive 180ms ease-out;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.note {
  max-width: 40rem;
  margin: 0;
  color: var(--muted);
}

.note.bad {
  color: var(--danger);
}

.note code,
.note a {
  font-family: var(--mono);
  font-size: 0.94em;
  color: var(--accent-text);
}

.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  max-width: 44rem;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.who {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 16rem;
}

.avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 16px;
  background: var(--surface-2);
  object-fit: cover;
}

.names {
  min-width: 0;
}

.display {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.verified {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #3aa0ff;
}

.link {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: 600 0.95rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.btn:hover {
  border-color: var(--faint);
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn.primary:hover {
  background: color-mix(in oklab, var(--accent) 88%, white);
}

.btn[data-done] {
  background: var(--ok);
  border-color: var(--ok);
  color: #06140c;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 16px 32px;
  padding-block: 24px 28px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.875rem;
}

.made {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap;
}

.made:hover {
  color: var(--text);
  border-color: var(--faint);
}

.made span {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--faint);
}

@media (max-width: 520px) {
  .profile {
    padding: 12px;
  }
  .actions {
    width: 100%;
  }
  .actions .btn {
    flex: 1;
  }
}

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