:root {
  --faifce-green-900: #0a4930;
  --faifce-green-700: #0f6b46;
  --faifce-green-500: #1f9c64;
  --faifce-lime: #a4d65e;
  --text-strong: #13281d;
  --text-soft: #3f5448;
  --surface: #ffffff;
  --surface-muted: #edf6f0;
  --danger: #b42318;
  --ok: #136f38;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text-strong);
  background:
    radial-gradient(circle at 12% 15%, rgba(164, 214, 94, 0.2), transparent 35%),
    radial-gradient(circle at 88% 85%, rgba(31, 156, 100, 0.18), transparent 40%),
    linear-gradient(160deg, #f3faf5 0%, #e7f5ec 40%, #e5f3e9 100%);
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 73, 48, 0.08), transparent 25%);
}

.shell {
  width: min(960px, calc(100% - 2rem));
  margin: 2.2rem auto 2.4rem;
  position: relative;
  z-index: 1;
  animation: rise 420ms ease-out;
}

.hero {
  text-align: left;
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 73, 48, 0.1);
  color: var(--faifce-green-900);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.8rem;
}

h1 {
  margin: 0.75rem 0 0.3rem;
  font-size: clamp(1.65rem, 2.7vw, 2.35rem);
  line-height: 1.2;
}

.subtitle {
  margin: 0;
  color: var(--text-soft);
}

.faifce-link {
  margin-top: 0.85rem;
  display: inline-block;
  color: var(--faifce-green-700);
  font-weight: 700;
  text-decoration: none;
}

.faifce-link:hover {
  text-decoration: underline;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 14px 36px rgba(12, 50, 34, 0.12);
  border: 1px solid rgba(10, 73, 48, 0.08);
}

form {
  display: grid;
  gap: 0.75rem;
}

label {
  font-size: 0.92rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid #c7ddce;
  border-radius: 12px;
  padding: 0.82rem 0.9rem;
  font-size: 1rem;
  background: var(--surface-muted);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: var(--faifce-green-500);
  box-shadow: 0 0 0 4px rgba(31, 156, 100, 0.15);
  outline: none;
}

button {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.82rem 1rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--faifce-green-900), var(--faifce-green-700));
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

#msg {
  margin: 0.75rem 0 0;
  min-height: 1.2rem;
  font-weight: 700;
}

#msg.error {
  color: var(--danger);
}

#msg.ok {
  color: var(--ok);
}

.viewer-section {
  margin-top: 1rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 12px 30px rgba(10, 73, 48, 0.1);
  border: 1px solid rgba(10, 73, 48, 0.08);
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.viewer-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.ghost-btn {
  width: auto;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  background: #eef8f1;
  color: var(--faifce-green-900);
}

.pdf-viewer {
  width: 100%;
  height: min(78vh, 920px);
  border-radius: 12px;
  border: 1px solid #d7e9dd;
  background: #f7fbf8;
}

.hidden {
  display: none;
}

@keyframes rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(960px, calc(100% - 1rem));
    margin-top: 1rem;
  }

  .card,
  .viewer-section {
    padding: 0.85rem;
  }

  .viewer-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
