:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --card: rgba(255, 255, 255, 0.82);
  --card-strong: #ffffff;
  --text: #19324d;
  --muted: #5f7186;
  --line: rgba(25, 50, 77, 0.12);
  --primary: #0e7c66;
  --primary-dark: #0a6452;
  --accent: #f1b24a;
  --danger: #d9544d;
  --success: #209769;
  --shadow: 0 24px 60px rgba(20, 51, 84, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 124, 102, 0.16), transparent 34%),
    radial-gradient(circle at bottom right, rgba(241, 178, 74, 0.18), transparent 28%),
    linear-gradient(180deg, #eef4fb 0%, #f8fbff 100%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.checker-panel,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 42px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(14, 124, 102, 0.1);
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.94;
}

.intro {
  margin: 20px 0 0;
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
}

.highlights {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.highlights li {
  margin-top: 12px;
  padding-left: 18px;
  position: relative;
  color: var(--text);
}

.highlights li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.checker-panel {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field span {
  font-weight: 600;
}

textarea,
button {
  font: inherit;
}

textarea {
  width: 100%;
  border: 1px solid rgba(25, 50, 77, 0.15);
  border-radius: 18px;
  background: var(--card-strong);
  color: var(--text);
  padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

textarea:focus {
  outline: none;
  border-color: rgba(14, 124, 102, 0.55);
  box-shadow: 0 0 0 5px rgba(14, 124, 102, 0.1);
}

.custom-select {
  position: relative;
}

.select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid rgba(25, 50, 77, 0.14);
  border-radius: 20px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 14px 28px rgba(53, 92, 140, 0.08);
}

.select-trigger:hover,
.select-trigger.active {
  transform: none;
  border-color: rgba(14, 124, 102, 0.35);
  box-shadow:
    0 0 0 5px rgba(14, 124, 102, 0.08),
    0 18px 32px rgba(53, 92, 140, 0.12);
}

.select-trigger:focus-visible {
  outline: none;
  border-color: rgba(14, 124, 102, 0.5);
  box-shadow:
    0 0 0 5px rgba(14, 124, 102, 0.12),
    0 18px 32px rgba(53, 92, 140, 0.12);
}

.select-icon {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.select-trigger.active .select-icon {
  transform: rotate(-135deg) translateY(-1px);
}

.select-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  z-index: 12;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(25, 50, 77, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 26px 44px rgba(32, 55, 88, 0.18),
    0 8px 20px rgba(32, 55, 88, 0.08);
  backdrop-filter: blur(18px);
}

.select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.select-option:hover,
.select-option:focus-visible {
  transform: none;
  background: linear-gradient(135deg, rgba(14, 124, 102, 0.12), rgba(241, 178, 74, 0.1));
  color: var(--primary-dark);
}

.select-option.selected {
  background: linear-gradient(135deg, var(--primary), #179578);
  color: white;
}

.option-title,
.option-meta {
  pointer-events: none;
}

.option-title {
  font-weight: 600;
}

.option-meta {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

textarea {
  resize: vertical;
  min-height: 190px;
  line-height: 1.6;
}

button {
  border: none;
  border-radius: 18px;
  padding: 15px 18px;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 14px 30px rgba(14, 124, 102, 0.28);
}

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

button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.helper-text {
  margin: 0;
  min-height: 1.5rem;
  color: var(--muted);
}

.helper-text.error {
  color: var(--danger);
}

.helper-text.success {
  color: var(--success);
}

.modal.hidden,
.select-menu.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 24, 42, 0.46);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(640px, calc(100% - 28px));
  margin: 8vh auto 0;
  padding: 34px;
  background: rgba(255, 255, 255, 0.94);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  box-shadow: none;
  background: rgba(25, 50, 77, 0.08);
  color: var(--text);
}

.modal-tag {
  margin: 0;
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-card h2 {
  margin: 10px 0 18px;
  font-size: 2rem;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.result-pill.spam {
  color: white;
  background: linear-gradient(135deg, #da5a52, #b93e36);
}

.result-pill.ham {
  color: white;
  background: linear-gradient(135deg, #20a876, #157b55);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.result-grid div,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 16px 18px;
}

dt {
  font-size: 0.88rem;
  color: var(--muted);
}

dd {
  margin: 8px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.result-panel h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.result-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .checker-panel {
    padding: 26px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 18px, 1180px);
    padding: 20px 0 30px;
  }

  h1 {
    font-size: 2.7rem;
  }

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

  .modal-card {
    margin-top: 4vh;
    padding: 24px;
  }
}
