/* Age & class eligibility — 50/50 calculator + criteria */
.agecalc {
  --age-purple: #363587;
  --age-deep: #343272;
  --age-gold: #e5b622;
  --age-ink: #272640;
  --age-muted: #747386;
  --age-line: #e7e6f0;
  padding: 18px 0 8px;
  background: #f8f8fc;
  border-bottom: 1px solid var(--age-line);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  color: var(--age-ink);
}

.agecalc-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--age-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(52, 50, 114, 0.06);
}

.agecalc-left,
.agecalc-right {
  min-width: 0;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.agecalc-left {
  border-right: 1px solid var(--age-line);
  background: #fff;
}

.agecalc-right {
  background: #faf9fe;
}

.agecalc-intro {
  min-width: 0;
}

.agecalc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 4px;
  color: var(--age-purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.agecalc-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--age-gold);
}

.agecalc-intro h2,
.agecalc-criteria-head h3 {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--age-deep);
  font-weight: 700;
}

.agecalc-intro p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--age-muted);
  line-height: 1.4;
}

.agecalc-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  align-items: end;
  min-width: 0;
}

.agecalc-field {
  min-width: 0;
}

.agecalc-field label {
  display: block;
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--age-deep);
}

.agecalc-field input,
.agecalc-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dfdeeb;
  border-radius: 10px;
  background: #fafaff;
  color: var(--age-ink);
  font: inherit;
  font-size: 14px;
}

.agecalc-field input:focus,
.agecalc-field select:focus,
.agecalc-actions button:focus-visible {
  outline: 3px solid rgba(229, 182, 34, 0.45);
  outline-offset: 2px;
}

.agecalc-hint {
  margin: 5px 0 0;
  font-size: 11.5px;
  color: var(--age-muted);
  line-height: 1.35;
}

.agecalc-cutoff {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  text-align: left;
}

#agecalc-dob-hint {
  display: none;
}

.agecalc-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.agecalc-actions button {
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.18s, transform 0.18s;
}

.agecalc-actions button[type="submit"] {
  flex: 1;
  background: var(--age-gold);
  color: var(--age-deep);
  white-space: nowrap;
}

.agecalc-actions button[type="submit"]:hover {
  background: #f5c307;
  transform: translateY(-1px);
}

.agecalc-actions .agecalc-reset {
  background: #f1f0f8;
  color: var(--age-purple);
}

.agecalc-actions .agecalc-reset:hover {
  background: #e8e6f4;
}

.agecalc-feedback {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.agecalc-error {
  margin: 0;
  color: #a52b23;
  font-size: 13px;
}

.agecalc-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  width: 100%;
  padding: 12px 14px;
  background: #f4f3fc;
  border: 1px solid #e0def2;
  border-left: 4px solid var(--age-gold);
  border-radius: 12px;
}

.agecalc-result-label {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--age-purple);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: 100%;
}

.agecalc-class {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--age-deep);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.agecalc-age {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--age-ink);
}

.agecalc-detail {
  margin: 0;
  flex: 1 1 100%;
  font-size: 12px;
  color: var(--age-muted);
  line-height: 1.45;
}

.agecalc-empty {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed #dedaee;
  border-radius: 12px;
  background: #faf9fe;
  font-size: 12.5px;
  color: var(--age-muted);
}

.agecalc-criteria-head {
  min-width: 0;
}

/* Right panel: 50/50 split of criteria content */
.agecalc-criteria-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  flex: 1;
  min-height: 0;
}

.agecalc-table-wrap {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--age-line);
  border-radius: 12px;
  padding: 4px 6px 2px;
}

.agecalc-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.agecalc-table-wrap th {
  text-align: left;
  color: var(--age-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.agecalc-table-wrap td,
.agecalc-table-wrap th {
  padding: 7px 8px;
  border-bottom: 1px solid #efedf5;
}

.agecalc-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.agecalc-table-wrap td:first-child {
  font-weight: 500;
  color: var(--age-deep);
}

.agecalc-table-wrap td:last-child {
  color: #686778;
  white-space: nowrap;
}

.agecalc-table-wrap tbody tr.active td {
  background: #eeecfa;
  font-weight: 700;
  color: var(--age-deep);
}

.agecalc-table-wrap tbody tr.active td:first-child {
  box-shadow: inset 3px 0 var(--age-gold);
}

.agecalc-note {
  margin: 0;
  font-size: 11.5px;
  color: var(--age-muted);
  line-height: 1.5;
}

.agecalc [hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .agecalc-bar {
    grid-template-columns: 1fr;
  }

  .agecalc-left {
    border-right: 0;
    border-bottom: 1px solid var(--age-line);
  }
}

@media (max-width: 640px) {
  .agecalc-left,
  .agecalc-right {
    padding: 16px;
  }

  .agecalc-form {
    grid-template-columns: 1fr;
  }

  .agecalc-criteria-cols {
    grid-template-columns: 1fr;
  }

  .agecalc-actions button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agecalc-actions button {
    transition: none;
  }

  .agecalc-actions button[type="submit"]:hover {
    transform: none;
  }
}
