:root {
  --sage-900: #344f1f;
  --amber-600: #f4991a;
  --sand-200: #f2ead3;
  --shell-100: #f9f5f0;
  --body-text: #2a2a2a;
  --muted-text: #5f5f5f;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--shell-100);
  color: var(--body-text);
  line-height: 1.6;
}

:focus-visible {
  outline: 3px solid var(--amber-600);
  outline-offset: 3px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 4rem clamp(1.5rem, 6vw, 5rem);
  background: linear-gradient(120deg, var(--sand-200), var(--shell-100));
  position: relative;
}

.lang-switch {
  position: absolute;
  top: 1.5rem;
  right: clamp(1.5rem, 5vw, 4rem);
  display: flex;
  gap: 0.5rem;
}

.lang-switch__btn {
  border: 1px solid rgba(52, 79, 31, 0.4);
  background: rgba(255, 255, 255, 0.6);
  color: var(--sage-900);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch__btn.active {
  background: var(--sage-900);
  color: white;
  border-color: var(--sage-900);
}

.hero__content h1 {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: var(--sage-900);
  line-height: 1.2;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--muted-text);
}

.hero__lead {
  max-width: 40ch;
}

.hero__card {
  background: radial-gradient(circle at top, #ffffff 0%, #f9f5f0 45%, #f2ead3 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(52, 79, 31, 0.18);
  border: 1px solid rgba(52, 79, 31, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero__card h2 {
  margin: 0;
  color: var(--sage-900);
}

.hero__card-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--sage-900);
}

.hero__card-footer {
  font-size: 0.9rem;
  color: var(--muted-text);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 0.85rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(52, 79, 31, 0.05);
  margin-top: 0.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.response {
  background: var(--sand-200);
  border-radius: 1rem;
  padding: 1rem;
}

.response__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.response__grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1rem;
}

.response__summary-card,
.response__details-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  box-shadow: 0 10px 30px rgba(52, 79, 31, 0.08);
  border: 1px solid rgba(52, 79, 31, 0.08);
}

.response__summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--sage-900);
}

.response__details-header h4 {
  margin: 0;
  color: var(--sage-900);
}

.response__details-header p {
  margin: 0.2rem 0 1rem;
  color: var(--muted-text);
}

.response__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--sage-900);
}

.response__body p {
  margin: 0;
}

.response__body ul {
  margin: 0;
  padding-left: 1.25rem;
}

.response__body li {
  margin-bottom: 0.25rem;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: clamp(1.5rem, 5vw, 5rem);
}

.workflow article {
  background: white;
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(52, 79, 31, 0.2);
}

.panel {
  margin: 0 clamp(1.5rem, 5vw, 5rem);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: white;
  border-radius: 1.5rem;
  border: 1px solid rgba(244, 153, 26, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel__header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.badge {
  background: var(--sage-900);
  color: white;
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

label,
legend {
  font-weight: 600;
  color: var(--sage-900);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(52, 79, 31, 0.3);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font: inherit;
  background: var(--shell-100);
}

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

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #344f1f 50%),
    linear-gradient(135deg, #344f1f 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 3px),
    calc(100% - 15px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.fieldset {
  border: 1px solid rgba(52, 79, 31, 0.3);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.radio input {
  width: auto;
  accent-color: var(--sage-900);
}

.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.measurements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.measurements__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.spinner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--shell-100);
  border: 1px solid rgba(52, 79, 31, 0.3);
  border-radius: 1rem;
  padding: 0.5rem;
}

.spinner input {
  text-align: center;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  width: 100%;
  pointer-events: auto;
}

.spinner__btn {
  border: none;
  background: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  color: var(--sage-900);
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(52, 79, 31, 0.15);
  transition: transform 0.2s ease;
}

.spinner__btn:active {
  transform: scale(0.95);
}

.conditional {
  margin-top: 0.75rem;
  border-radius: 1rem;
  border: 1px dashed rgba(52, 79, 31, 0.3);
  padding: 0.85rem 1rem;
  background: #fcfaf7;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--amber-600);
  color: white;
  box-shadow: 0 12px 24px rgba(244, 153, 26, 0.3);
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(52, 79, 31, 0.4);
  color: var(--sage-900);
}

.btn--full {
  width: 100%;
}

.btn--sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
}

.status {
  min-height: 1.5rem;
  font-weight: 600;
  color: var(--muted-text);
}

.status.status--loading {
  position: relative;
  padding-left: 1.75rem;
}

.status.status--loading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--amber-600);
  border-top-color: transparent;
  border-radius: 50%;
  transform: translateY(-50%);
  animation: spin 0.8s linear infinite;
}

.status[data-state="success"] {
  color: var(--sage-900);
}

.status[data-state="error"] {
  color: #a62828;
}

.status[data-state="info"] {
  color: var(--amber-600);
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}


.disclaimer {
  background: var(--sage-900);
  color: white;
  padding: clamp(1.5rem, 4vw, 3rem);
  margin: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 5vw, 5rem);
  border-radius: 1.25rem;
}

footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted-text);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .hero__actions {
    flex-direction: column;
  }

  .panel {
    margin: 0 1rem;
  }

  .disclaimer {
    margin: 2rem 1rem;
  }

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