.vital-shell {
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(139, 211, 169, 0.2), transparent 28%),
    linear-gradient(145deg, #fbfefc 0%, #f3faf6 100%);
}

.vital-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.78fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: stretch;
}

.vital-panel {
  min-width: 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d9e9df;
  border-radius: 16px;
}

.vital-input-panel {
  box-shadow: inset 0 3px 0 #8bcda7;
}

.vital-result-panel {
  box-shadow: inset 0 3px 0 #3f9b70;
}

.vital-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.vital-panel-heading h3 {
  margin: 3px 0 0;
  color: #18352b;
  font-size: 1.05rem;
  line-height: 1.35;
}

.vital-panel-kicker {
  margin: 0;
  color: #4f8d6c;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.vital-panel-step {
  color: #bad9c7;
  font: 700 1.55rem/1 Georgia, serif;
}

.vital-mode-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: #276d51;
  background: #e7f5ec;
  border: 1px solid #c7e2d2;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.vital-controls {
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.vital-controls .choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vital-controls .choice-option {
  justify-content: center;
  min-width: 0;
  padding-inline: 9px;
}

.vital-controls .number-input,
.vital-controls .money-input {
  background: #f8fcf9;
}

.vital-controls .number-input:focus-within,
.vital-controls .money-input:focus-within {
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(63, 155, 112, 0.16);
}

.vital-field-hint {
  margin: 7px 0 0;
  color: #74897f;
  font-size: 0.72rem;
  line-height: 1.45;
}

.vital-seahorse-field {
  margin-top: 2px;
  padding-top: 15px;
  border-top: 1px solid #e0ece4;
}

.vital-seahorse-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin: 0;
  padding: 13px;
  cursor: pointer;
  background: #eff8f2;
  border: 1px solid #cfe5d7;
  border-radius: 13px;
}

.vital-seahorse-toggle:hover {
  border-color: #8fc7a7;
}

.vital-seahorse-toggle:has(input:focus-visible) {
  outline: 3px solid rgba(63, 155, 112, 0.3);
  outline-offset: 2px;
}

.vital-seahorse-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.vital-toggle-track {
  position: relative;
  width: 43px;
  height: 24px;
  background: #b5c9be;
  border-radius: 999px;
  transition: background 160ms ease;
}

.vital-toggle-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(24, 53, 43, 0.22);
  transition: transform 160ms ease;
}

.vital-seahorse-toggle input:checked + .vital-toggle-track {
  background: var(--jade-dark);
}

.vital-seahorse-toggle input:checked + .vital-toggle-track span {
  transform: translateX(19px);
}

.vital-toggle-copy {
  min-width: 0;
}

.vital-toggle-copy strong,
.vital-toggle-copy small {
  display: block;
}

.vital-toggle-copy strong {
  color: #245f49;
  font-size: 0.84rem;
  line-height: 1.35;
}

.vital-toggle-copy small {
  margin-top: 3px;
  color: #677d72;
  font-size: 0.72rem;
  line-height: 1.45;
}

.vital-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.vital-summary .summary-card {
  display: flex;
  min-height: 112px;
  padding: 15px;
  flex-direction: column;
  justify-content: center;
}

.vital-summary .summary-card p {
  min-height: 2.5em;
  margin-bottom: 7px;
  line-height: 1.3;
}

.vital-summary .summary-card strong {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.42rem, 2.3vw, 1.9rem);
  line-height: 1.12;
}

.vital-summary .summary-card span {
  display: block;
  margin-top: 5px;
}

.vital-result-highlight {
  background: linear-gradient(145deg, #dff1e5, #edf8f1);
  border-color: #bcdcc9;
}

.vital-time-card {
  background: #f6faf7;
}

.vital-cap-card {
  min-height: 92px !important;
  background: #fbfdfb;
}

.vital-seahorse-note {
  margin: 14px 0 0;
  padding: 11px 13px;
  color: #235e47;
  background: #e6f4eb;
  border: 1px solid #c6e2d0;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.55;
}

.vital-seahorse-note[hidden] {
  display: none;
}

.vital-exact {
  margin: 13px 0 0;
  color: #62796e;
  font-size: 0.76rem;
  line-height: 1.6;
}

.vital-exact.is-error {
  color: var(--danger);
}

.vital-details {
  margin-top: 14px;
  color: #62796e;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d9e9df;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.65;
}

.vital-details summary {
  padding: 10px 13px;
  color: #356f55;
  cursor: pointer;
  font-weight: 800;
}

.vital-details summary:focus-visible {
  outline: 3px solid rgba(63, 155, 112, 0.3);
  outline-offset: 2px;
}

.vital-details > div {
  padding: 0 13px 12px;
  border-top: 1px solid #e3eee7;
}

.vital-details p {
  margin: 10px 0 0;
}

@media (max-width: 920px) {
  .vital-layout {
    grid-template-columns: 1fr;
  }

  .vital-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vital-seahorse-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .vital-shell {
    padding: 12px;
  }

  .vital-layout {
    gap: 12px;
  }

  .vital-panel {
    padding: 16px;
    border-radius: 14px;
  }

  .vital-controls,
  .vital-summary {
    grid-template-columns: 1fr;
  }

  .vital-seahorse-field {
    grid-column: auto;
  }

  .vital-summary .summary-card,
  .vital-cap-card {
    min-height: 0 !important;
  }

  .vital-summary .summary-card p {
    min-height: 0;
  }

  .vital-summary .summary-card strong {
    font-size: 1.52rem;
  }
}

@media (max-width: 340px) {
  .vital-panel {
    padding: 13px;
  }

  .vital-controls .choice-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vital-toggle-track,
  .vital-toggle-track span {
    transition: none;
  }
}
