:root {
  --ink: #152028;
  --muted: #5a6b76;
  --paper: #f3f6f4;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(21, 32, 40, 0.12);
  --accent: #0f7a6c;
  --accent-deep: #0a554c;
  --glow: rgba(15, 122, 108, 0.18);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: #dfe8e4;
  line-height: 1.5;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(15, 122, 108, 0.22), transparent 60%),
    radial-gradient(700px 480px at 95% 10%, rgba(40, 70, 90, 0.16), transparent 55%),
    linear-gradient(165deg, #e7efe9 0%, #d5e0db 48%, #c9d5d2 100%);
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(21, 32, 40, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 32, 40, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
}

.shell {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 3rem;
}

.brand {
  margin-bottom: 1.75rem;
  animation: rise 700ms ease both;
}

.mark {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.tag {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  padding: 1.6rem 1.5rem 1.5rem;
  animation: rise 800ms ease both;
  animation-delay: 80ms;
}

.panel h1 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel h2 {
  margin: 1.35rem 0 0.65rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 1rem;
  color: var(--ink);
  max-width: 58ch;
}

.collect-list {
  margin: 0 0 1.1rem;
  padding-left: 1.15rem;
  color: var(--ink);
}

.collect-list li {
  margin: 0.35rem 0;
}

.sources {
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  list-style: none;
  background: rgba(21, 32, 40, 0.035);
  border: 1px solid var(--line);
}

.sources li {
  margin: 0.55rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sources li:first-child {
  margin-top: 0;
}

.sources li:last-child {
  margin-bottom: 0;
}

.sources a {
  color: var(--accent-deep);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.sources a:hover {
  color: var(--accent);
}

.fine {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
}

button {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #f7fffc;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 500;
  padding: 0.8rem 1.15rem;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 10px 30px var(--glow);
}

button:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.meter {
  height: 3px;
  background: rgba(21, 32, 40, 0.08);
  overflow: hidden;
  margin: 1rem 0 0;
}

#meter-bar {
  display: block;
  height: 100%;
  width: 8%;
  background: var(--accent);
  transition: width 280ms ease;
}

.result {
  margin: 1.15rem 0 0;
  padding: 1rem;
  overflow: auto;
  background: rgba(21, 32, 40, 0.04);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  animation: rise 500ms ease both;
}

.hidden {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .shell {
    padding-top: 2.5rem;
  }

  .panel {
    padding: 1.25rem 1rem;
  }

  button {
    width: 100%;
  }
}
