:root {
  --bg: #07080c;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.10);
  --text: #f2f4f8;
  --muted: #9aa3b2;
  --accent: #4f8cff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Soft glow behind the hero */
body::before {
  content: "";
  position: fixed;
  top: -30vh;
  left: 50%;
  width: 900px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(79, 140, 255, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(7, 8, 12, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-word { font-weight: 300; letter-spacing: 0.04em; }
.nav-word strong { font-weight: 800; }

.nav-word {
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}

.nav-tag {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Layout */
main {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 88px 0 48px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 24px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(79, 140, 255, 0.35);
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.08);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 30%, #a9b4c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 1.125rem;
}

/* Form card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

textarea,
select {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
  min-height: 220px;
  resize: vertical;
}

textarea::placeholder {
  color: #5d6676;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa3b2' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

select option {
  color: #f2f4f8;
  background: #11131a;
}

textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.18);
}

.hint {
  margin: 8px 0 20px;
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

button {
  width: 100%;
  padding: 16px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(180deg, #5b95ff, #2f6bff);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(47, 107, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 14px 36px rgba(47, 107, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

button:active {
  transform: translateY(0) scale(0.99);
}

.notice {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.results {
  margin-top: 32px;
}


/* Upload */
.upload {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.upload-button {
  display: inline-block;
  margin: 0;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-button:hover {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.10);
}

.upload-status {
  font-size: 0.8rem;
  color: var(--muted);
}
/* Results */
.result-card {
  margin-bottom: 14px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.result-text {
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.result-keywords {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--accent);
}

.result-message {
  padding: 16px;
  text-align: center;
  color: #ffb4a8;
  background: rgba(255, 120, 100, 0.08);
  border: 1px solid rgba(255, 120, 100, 0.35);
  border-radius: 12px;
}


.badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
}

.badge-pending { color: var(--muted); border-color: var(--border); }
.badge-high { color: #ff8a80; background: rgba(255, 90, 80, 0.12); border-color: rgba(255, 90, 80, 0.4); }
.badge-medium { color: #ffc46b; background: rgba(255, 180, 60, 0.12); border-color: rgba(255, 180, 60, 0.4); }
.badge-low { color: #8fb8ff; background: rgba(79, 140, 255, 0.12); border-color: rgba(79, 140, 255, 0.4); }
.badge-none { color: #7fdca4; background: rgba(60, 200, 120, 0.12); border-color: rgba(60, 200, 120, 0.4); }
.badge-unknown { color: var(--muted); background: rgba(255, 255, 255, 0.05); border-color: var(--border); }

.result-explanation {
  margin-top: 16px;
  padding-top: 16px;
  font-size: 0.92rem;
  color: #d5dae3;
  border-top: 1px solid var(--border);
}

.result-explanation:empty {
  display: none;
}

.result-explanation p {
  margin-bottom: 10px;
}

.result-explanation strong {
  color: var(--text);
}

button:disabled {
  cursor: wait;
  filter: saturate(0.5) brightness(0.85);
  transform: none;
}

/* Summary */
.summary {
  margin-bottom: 20px;
  padding: 26px 26px 22px;
  background: linear-gradient(180deg, rgba(79, 140, 255, 0.10), rgba(79, 140, 255, 0.03));
  border: 1px solid rgba(79, 140, 255, 0.35);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 84px;
}

.summary h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.summary-counts {
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-note {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #d5dae3;
}

.summary-list {
  margin: 16px 0 0 20px;
}

.summary-list li {
  margin-bottom: 8px;
  color: #ff8a80;
}

.summary-link {
  width: auto;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  color: var(--text);
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.summary-link:hover {
  color: var(--accent);
  transform: none;
  filter: none;
  box-shadow: none;
  text-decoration: underline;
}

.result-card {
  scroll-margin-top: 84px;
}

.minor {
  margin-top: 8px;
}

.minor summary {
  margin-bottom: 14px;
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}

.minor summary:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Consent */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  color: #cfd5df;
  cursor: pointer;
}

.consent input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.consent a {
  color: #8fb8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links {
  max-width: 720px;
  margin: 0 auto 6px;
  line-height: 1.9;
}
/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 40px 20px 56px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer p {
  margin-bottom: 6px;
}

.footer a {
  color: var(--text);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent);
}

.footer-note {
  margin-top: 12px;
  font-size: 0.75rem;
}

/* Phone size */
@media (max-width: 600px) {
  .hero {
    padding: 56px 0 32px;
  }

  .card {
    padding: 20px;
  }

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

  .nav {
    padding: 16px 18px;
  }
}