:root {
  --bg: #060606;
  --bg-soft: #101010;
  --panel: rgba(14, 14, 14, 0.88);
  --panel-strong: rgba(18, 18, 18, 0.98);
  --text: #f4f0ea;
  --muted: #8f8a84;
  --accent: #ffffff;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 16px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 18%),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.04), transparent 16%),
    linear-gradient(180deg, #050505 0%, #0b0b0b 100%);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.panel {
  width: min(900px, 100%);
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 79px,
      rgba(255, 255, 255, 0.028) 79px,
      rgba(255, 255, 255, 0.028) 80px
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%);
  pointer-events: none;
}

.panel-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(240px, 0.78fr);
  gap: 22px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark,
.status-pill,
.label,
.eyebrow,
.micro-list span,
.copy-state {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.brand-mark,
.status-pill {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.66rem;
  background: rgba(255, 255, 255, 0.03);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.7rem;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(2.8rem, 6.4vw, 4.25rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.intro {
  max-width: 420px;
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.shortener-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.shortener-form input,
.shortener-form button,
.ghost-button {
  border-radius: 14px;
  font: inherit;
}

.shortener-form input {
  width: 100%;
  border: 1px solid var(--border);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  font-size: 0.94rem;
}

.shortener-form input::placeholder {
  color: #6e6a65;
}

.shortener-form input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.shortener-form button,
.ghost-button {
  border: 1px solid var(--border-strong);
  padding: 14px 18px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.shortener-form button {
  background: var(--accent);
  color: #090909;
}

.shortener-form button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24);
}

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

.micro-list span {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.62rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.info-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail-card {
  border: 1px solid var(--border);
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 16px;
}

.error {
  color: #ffb5b5;
  background: rgba(49, 17, 17, 0.78);
  border-color: rgba(255, 181, 181, 0.16);
}

.label {
  margin: 0 0 6px;
  font-size: 0.66rem;
  color: var(--muted);
}

.stat-card {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-value {
  display: block;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
  line-height: 0.95;
}

.result-link {
  color: var(--text);
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  word-break: break-all;
}

.idle-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.ghost-button {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.copy-state {
  font-size: 0.66rem;
  color: var(--muted);
}

.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;
}

@media (max-width: 980px) {
  .panel {
    width: min(780px, 100%);
    padding: 24px;
  }

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

  h1 {
    max-width: none;
  }
}

@media (max-width: 680px) {
  .shell {
    padding: 12px;
  }

  .panel {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.2rem, 12.5vw, 3.2rem);
  }

  .shortener-form {
    grid-template-columns: 1fr;
  }

  .shortener-form button,
  .ghost-button {
    width: 100%;
  }

  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
