
:root {
  --brand-deep: #024a3c;
  --brand-primary: #85c362;
  --brand-secondary: #3a8756;
  --brand-soft: #e7f7de;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --text: #17322a;
  --muted: #537066;
  --line: #d8e7dd;
  --shadow: 0 18px 48px rgba(2, 74, 60, 0.22);
  --danger: #9d2b2b;
  --danger-bg: #ffe9e9;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, rgba(2, 74, 60, 0.96), rgba(2, 74, 60, 0.92));
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,74,60,0.18), rgba(2,74,60,0.55));
  pointer-events: none;
}
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  padding: 22px 14px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shell {
  width: 100%;
  max-width: 520px;
}
.brand-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #f7fff9;
}
.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  
}
.brand-mark img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.brand-copy small {
  display: block;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .9;
}
.brand-copy strong {
  display: block;
  font-size: 20px;
  margin-top: 4px;
}
.header {
  margin-bottom: 14px;
  color: #f6fffa;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  margin-bottom: 10px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  border-radius: 99px;
  background: var(--brand-primary);
}
h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.08;
  color: #ffffff;
}
.subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(247, 255, 250, 0.9);
}
.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 24px;
  padding: 20px 16px;
  box-shadow: var(--shadow);
}
.card-intro {
  margin: 0 0 18px;
  padding: 14px 14px 0;
}
.card-intro h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
.card-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.form-grid {
  display: grid;
  gap: 14px;
}
.field-group {
  display: grid;
  gap: 14px;
}
label span, .choice-title {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 15px;
}
.field-help {
  display: block;
  margin-top: -2px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
input, select, textarea {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  font-size: 16px;
  color: var(--text);
  background: var(--surface-strong);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 4px rgba(133,195,98,0.18);
}
button, .button-link {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  box-shadow: 0 10px 24px rgba(58, 135, 86, 0.28);
}
button.secondary, .button-link.secondary {
  background: #eff7ef;
  color: var(--brand-deep);
  box-shadow: none;
  border: 1px solid var(--line);
}
.actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}
.option-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.88);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.option-card input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--brand-secondary);
}
.option-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}
.option-card small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}
.inline-note, .info {
  background: linear-gradient(180deg, rgba(231,247,222,0.95), rgba(255,255,255,0.95));
  color: var(--text);
  border: 1px solid rgba(133,195,98,0.35);
  padding: 14px;
  border-radius: 16px;
  line-height: 1.5;
}
.info strong, .inline-note strong { color: var(--brand-deep); }
.alerts { margin-bottom: 14px; }
.alert {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  line-height: 1.45;
}
.alert.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f4caca;
}
.split-grid {
  display: grid;
  gap: 14px;
}
.summary-grid {
  display: grid;
  gap: 14px;
}
.summary-grid section {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,0.82);
}
.summary-grid h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.summary-grid p {
  margin: 0 0 8px;
  line-height: 1.5;
}
.next-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.step-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #f9fffa;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}
.footer-note {
  margin-top: 14px;
  text-align: center;
  color: rgba(247,255,250,0.82);
  font-size: 13px;
  line-height: 1.45;
}
.hide { display: none !important; }
.mobile-only { display: block; }
.desktop-only { display: none; }
.animal-item { display: grid; gap: 12px; }
.application-block { display: grid; gap: 16px; }
.subtype-group.hide { display: none !important; }
@media (min-width: 640px) {
  .page { padding: 28px 18px 40px; }
  .card { padding: 24px; }
  .split-grid { grid-template-columns: 1fr 1fr; }
  .actions { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
}


@media (min-width: 768px) {
  body {
    background:
      linear-gradient(rgba(2, 74, 60, 0.90), rgba(2, 74, 60, 0.93)),
      image-set(
        url('/static/background.webp') type('image/webp'),
        url('/static/background.png') type('image/png')
      ) center/cover no-repeat;
  }
}

@media (max-width: 767px) {
  body::before {
    background:
      linear-gradient(180deg, rgba(2,74,60,0.10), rgba(2,74,60,0.30)),
      radial-gradient(circle at top right, rgba(133,195,98,0.18), transparent 22rem),
      radial-gradient(circle at bottom left, rgba(133,195,98,0.16), transparent 18rem);
  }

  .card {
    border-radius: 22px;
  }

  .brand-bar {
    margin-bottom: 12px;
  }

  .footer-note {
    padding-bottom: 8px;
  }
}

.animal-grid {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}
.animal-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(239,247,239,0.86));
  display: grid;
  gap: 8px;
  text-align: center;
  justify-items: center;
  min-height: 148px;
}
.animal-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.animal-card.selected {
  border-color: rgba(58,135,86,0.8);
  box-shadow: 0 0 0 4px rgba(133,195,98,0.18);
  background: linear-gradient(180deg, rgba(231,247,222,0.98), rgba(255,255,255,0.97));
}
.animal-icon {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(2,74,60,0.10), rgba(133,195,98,0.18));
  display: grid;
  place-items: center;
  font-size: 38px;
}
.animal-card strong {
  font-size: 20px;
  line-height: 1.15;
}
.animal-card small {
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}
.subtype-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255,255,255,0.82);
}
.subtype-panel-title {
  display: block;
  margin-bottom: 14px;
  font-weight: 800;
  color: var(--brand-deep);
  font-size: 18px;
}
.subtype-button-grid {
  display: grid;
  gap: 12px;
}
.subtype-button {
  position: relative;
  min-height: 58px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  text-align: center;
}
.subtype-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.subtype-button span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 0 6px;
  font-weight: 400;
  color: var(--text);
  font-size: 16px;
  line-height: 1.05;
  text-align: center;
}
.subtype-button.selected {
  border-color: rgba(58,135,86,0.78);
  background: linear-gradient(135deg, rgba(58,135,86,0.10), rgba(133,195,98,0.16));
  box-shadow: 0 0 0 3px rgba(133,195,98,0.14);
}
.application-note {
  margin-top: 6px;
}
.actions.single-action {
  grid-template-columns: 1fr;
  margin-top: 10px;
}
@media (min-width: 680px) {
  .shell {
    max-width: 640px;
  }
  .mobile-only { display: none; }
  .desktop-only { display: block; }
  .animal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .subtype-button-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

@media (max-width: 679px) {
  .page {
    align-items: flex-start;
    padding-top: max(52px, env(safe-area-inset-top, 0px) + 34px);
    padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px));
  }
  .header {
    margin-bottom: 18px;
  }
  h1 {
    font-size: clamp(26px, 8.2vw, 36px);
    line-height: 1.08;
    margin-bottom: 12px;
  }
  .subtitle {
    font-size: 18px;
    line-height: 1.62;
  }
  .card {
    padding: 24px 18px 22px;
  }
  .card-intro {
    padding: 2px 0 2px;
    margin-bottom: 20px;
  }
  .card-intro h2 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  .card-intro p {
    font-size: 15px;
    line-height: 1.65;
  }
  label span, .choice-title {
    margin-bottom: 10px;
    font-size: 15px;
  }
  .form-grid {
    gap: 18px;
  }
  .animal-grid {
    gap: 14px;
  }
  .animal-card {
    min-height: auto;
    grid-template-columns: 84px 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
    gap: 8px 14px;
    padding: 18px 16px;
  }
  .animal-icon {
    width: 76px;
    height: 76px;
    grid-row: 1 / span 2;
    font-size: 36px;
  }
  .animal-card strong,
  .animal-card small {
    grid-column: 2;
  }
  .animal-card strong {
    font-size: 18px;
    margin-top: 2px;
  }
  .animal-card small {
    font-size: 14px;
    line-height: 1.5;
  }
  .subtype-panel {
    margin-top: 14px;
    padding: 16px;
  }
  .subtype-panel-title {
    font-size: 16px;
    margin-bottom: 12px;
  }
  .subtype-button-grid {
    gap: 12px;
  }
  .subtype-button {
    min-height: 56px;
  }
  .subtype-button span {
    font-size: 15px;
  }
  .inline-note {
    padding: 16px;
    line-height: 1.7;
  }
  .actions.single-action {
    margin-top: 14px;
    margin-bottom: 10px;
  }
}

