html:has(body.aft-page) { scroll-behavior: smooth; }

.aft-page {
  --aft-ink: #17231b;
  --aft-muted: #5c675f;
  --aft-line: #dfe5e0;
  --aft-soft: #f4f7f4;
  --aft-green: #17663a;
  --aft-green-dark: #104c2b;
  --aft-green-soft: #eaf5ee;
  --aft-red: #a22929;
  --aft-red-soft: #fff0f0;
  background: #f7f9f7;
  color: var(--aft-ink);
}

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

.aft-page main { padding: 0 18px 72px; }
.aft-page .aft-shell { width: min(1120px, 100%); margin: 0 auto; }

.aft-page .aft-page-header { max-width: 800px; padding: 34px 0 26px; }
.aft-page .aft-breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 27px; color: #6b756e; font-size: .88rem; }
.aft-page .aft-breadcrumbs a { color: #4c5b51; text-decoration: none; }
.aft-page .aft-breadcrumbs a:hover { color: var(--aft-green); text-decoration: underline; }
.aft-page .aft-eyebrow,
.aft-page .aft-step-label { margin: 0 0 8px; color: var(--aft-green); font-size: .76rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.aft-page h1 { margin: 0; font-size: clamp(2.25rem, 5vw, 4.25rem); line-height: .98; letter-spacing: -.045em; }
.aft-page .aft-lead { max-width: 760px; margin: 20px 0 8px; color: #334039; font-size: clamp(1.04rem, 2vw, 1.23rem); line-height: 1.65; }
.aft-page .aft-supporting { margin: 0; color: var(--aft-muted); font-size: .94rem; }

.aft-page .aft-calculator-card,
.aft-page .aft-results,
.aft-page .aft-content-section { border: 1px solid var(--aft-line); border-radius: 20px; background: #fff; box-shadow: 0 16px 40px rgba(22, 38, 28, .055); }
.aft-page .aft-calculator-card { overflow: hidden; }
.aft-page .aft-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 27px 30px; border-bottom: 1px solid var(--aft-line); background: linear-gradient(115deg, #fbfdfb 0%, #f0f6f1 100%); }
.aft-page .aft-card-heading h2,
.aft-page .aft-section-heading h2,
.aft-page .aft-content-section > h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.15rem); letter-spacing: -.025em; }
.aft-page .aft-data-status { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border: 1px solid #cfd9d1; border-radius: 999px; color: var(--aft-muted); background: rgba(255,255,255,.8); font-size: .78rem; white-space: nowrap; }
.aft-page .aft-data-status.is-ready { color: var(--aft-green); border-color: #add0bb; background: var(--aft-green-soft); }
.aft-page .aft-data-status.is-error { color: var(--aft-red); border-color: #edb6b6; background: var(--aft-red-soft); }

.aft-page #aft-form { padding: 8px 30px 30px; }
.aft-page .aft-fieldset { min-width: 0; margin: 0; padding: 28px 0; border: 0; border-bottom: 1px solid var(--aft-line); }
.aft-page .aft-fieldset > legend { display: flex; align-items: center; gap: 11px; width: 100%; margin: 0 0 18px; padding: 0; color: #253129; font-size: 1.03rem; font-weight: 800; }
.aft-page .aft-fieldset > legend span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--aft-green); font-size: .8rem; }
.aft-page .aft-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.aft-page .aft-choice { position: relative; display: block; cursor: pointer; }
.aft-page .aft-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.aft-page .aft-choice > span { display: flex; min-height: 104px; flex-direction: column; gap: 7px; padding: 19px 20px 18px 52px; border: 1px solid var(--aft-line); border-radius: 14px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.aft-page .aft-choice > span::before { content: ""; position: absolute; top: 23px; left: 20px; width: 19px; height: 19px; border: 2px solid #a8b2aa; border-radius: 50%; background: #fff; }
.aft-page .aft-choice > span strong { font-size: 1rem; }
.aft-page .aft-choice > span small { color: var(--aft-muted); font-size: .9rem; line-height: 1.45; }
.aft-page .aft-choice input:checked + span { border-color: var(--aft-green); background: var(--aft-green-soft); box-shadow: 0 0 0 1px var(--aft-green); }
.aft-page .aft-choice input:checked + span::before { border: 5px solid var(--aft-green); }
.aft-page .aft-choice input:focus-visible + span { outline: 3px solid rgba(23,102,58,.24); outline-offset: 3px; }

.aft-page .aft-specialty-disclosure { margin-top: 15px; border: 1px solid var(--aft-line); border-radius: 12px; background: #fafcfb; }
.aft-page .aft-specialty-disclosure summary { padding: 14px 17px; color: var(--aft-green-dark); font-weight: 750; cursor: pointer; }
.aft-page .aft-specialty-disclosure > p { margin: 0; padding: 0 17px 12px; color: var(--aft-muted); font-size: .9rem; }
.aft-page .aft-specialty-link { color: var(--aft-green-dark); font-weight: 750; text-underline-offset: 2px; }
.aft-page .aft-specialty-link:focus-visible { outline: 3px solid rgba(23,102,58,.25); outline-offset: 3px; }

.aft-page .aft-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.aft-page .aft-field,
.aft-page .aft-sex-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.aft-page .aft-field > label,
.aft-page .aft-sex-fieldset > legend,
.aft-page .aft-event-card > label,
.aft-page .aft-control-label,
.aft-page .aft-chart-controls label { display: block; margin: 0 0 8px; color: #2f3c34; font-size: .88rem; font-weight: 750; }
.aft-page input[type="number"],
.aft-page select { width: 100%; height: 48px; padding: 0 12px; border: 1px solid #cfd7d1; border-radius: 9px; color: var(--aft-ink); background: #fff; font: inherit; }
.aft-page input[type="number"]:focus,
.aft-page select:focus { border-color: var(--aft-green); outline: 3px solid rgba(23,102,58,.16); }
.aft-page input[aria-invalid="true"] { border-color: var(--aft-red); background: #fffafa; }
.aft-page .aft-input-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid #cfd7d1; border-radius: 9px; background: #fff; overflow: hidden; }
.aft-page .aft-input-unit:focus-within { border-color: var(--aft-green); outline: 3px solid rgba(23,102,58,.16); }
.aft-page .aft-input-unit input { border: 0; border-radius: 0; }
.aft-page .aft-input-unit input:focus { outline: 0; }
.aft-page .aft-input-unit > span { padding: 0 13px; color: var(--aft-muted); font-size: .88rem; font-weight: 700; }
.aft-page .aft-help { margin: 8px 0 0; color: var(--aft-muted); font-size: .82rem; line-height: 1.45; }
.aft-page .aft-segmented { display: grid; grid-template-columns: repeat(2, 1fr); padding: 4px; border: 1px solid #cfd7d1; border-radius: 10px; background: var(--aft-soft); }
.aft-page .aft-segmented label { position: relative; cursor: pointer; }
.aft-page .aft-segmented input { position: absolute; opacity: 0; }
.aft-page .aft-segmented span { display: grid; place-items: center; height: 39px; border-radius: 7px; font-size: .9rem; font-weight: 700; }
.aft-page .aft-segmented input:checked + span { color: var(--aft-green-dark); background: #fff; box-shadow: 0 1px 5px rgba(22,38,28,.12); }
.aft-page .aft-segmented input:focus-visible + span { outline: 2px solid var(--aft-green); }
.aft-page .aft-sex-fieldset[hidden] { display: none; }

.aft-page .aft-event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.aft-page .aft-event-card { position: relative; min-width: 0; padding: 20px; border: 1px solid var(--aft-line); border-radius: 14px; background: #fcfdfc; }
.aft-page .aft-event-card-wide { grid-column: 1 / -1; }
.aft-page .aft-event-number { margin-bottom: 9px; color: #809087; font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.aft-page .aft-event-card h3 { margin: 0 0 17px; padding-right: 8px; font-size: 1rem; line-height: 1.35; }
.aft-page .aft-time-input { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); align-items: end; gap: 7px; max-width: 330px; }
.aft-page .aft-time-input label { display: flex; flex-direction: column-reverse; gap: 5px; color: var(--aft-muted); font-size: .72rem; text-transform: uppercase; }
.aft-page .aft-time-input b { align-self: center; padding-top: 17px; font-size: 1.1rem; }
.aft-page .aft-errors { margin: 22px 0 0; padding: 13px 15px; border: 1px solid #e6adad; border-radius: 10px; color: #7e2525; background: var(--aft-red-soft); font-size: .9rem; }
.aft-page .aft-errors ul { margin: 0; padding-left: 20px; }
.aft-page .aft-actions { display: flex; gap: 11px; padding-top: 24px; }
.aft-page .aft-primary-button,
.aft-page .aft-secondary-button { min-height: 48px; padding: 0 19px; border-radius: 9px; font: inherit; font-size: .92rem; font-weight: 800; cursor: pointer; }
.aft-page .aft-primary-button { border: 1px solid var(--aft-green); color: #fff; background: var(--aft-green); }
.aft-page .aft-primary-button:hover:not(:disabled) { background: var(--aft-green-dark); }
.aft-page .aft-primary-button:disabled { border-color: #aeb8b1; background: #aeb8b1; cursor: wait; }
.aft-page .aft-secondary-button { border: 1px solid #cbd3cd; color: #334039; background: #fff; }
.aft-page .aft-primary-button:focus-visible,
.aft-page .aft-secondary-button:focus-visible,
.aft-page summary:focus-visible { outline: 3px solid rgba(23,102,58,.25); outline-offset: 3px; }

.aft-page .aft-results { margin-top: 22px; padding: 28px 30px; scroll-margin-top: 24px; }
.aft-page .aft-results.is-fail { border-color: #e7baba; }
.aft-page .aft-result-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--aft-line); }
.aft-page .aft-result-summary h2 { margin: 0; font-size: clamp(2.5rem, 7vw, 4.4rem); line-height: 1; letter-spacing: -.05em; }
.aft-page .aft-result-summary h2 small { color: var(--aft-muted); font-size: .33em; letter-spacing: 0; }
.aft-page .aft-status { display: flex; min-width: 144px; flex-direction: column; align-items: center; gap: 4px; padding: 15px 17px; border: 1px solid #acd2ba; border-radius: 13px; color: var(--aft-green-dark); background: var(--aft-green-soft); }
.aft-page .aft-status strong { font-size: 1.16rem; letter-spacing: .05em; }
.aft-page .aft-status span { font-size: .75rem; }
.aft-page .aft-results.is-fail .aft-status { border-color: #e9b5b5; color: var(--aft-red); background: var(--aft-red-soft); }
.aft-page .aft-result-message { margin: 20px 0; color: #37443c; line-height: 1.6; }
.aft-page .aft-breakdown { display: grid; gap: 10px; }
.aft-page .aft-breakdown-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(100px, .7fr) minmax(150px, 1fr); align-items: center; gap: 16px; padding: 13px 14px; border: 1px solid var(--aft-line); border-radius: 10px; background: #fcfdfc; }
.aft-page .aft-breakdown-row.is-below { border-color: #e8c5c5; background: #fffafa; }
.aft-page .aft-event-result strong { display: block; font-size: .9rem; }
.aft-page .aft-event-result small { display: block; margin-top: 3px; color: var(--aft-muted); font-size: .77rem; }
.aft-page .aft-raw-result { color: #3c4941; font-size: .88rem; }
.aft-page .aft-points { display: grid; grid-template-columns: auto minmax(60px, 1fr); align-items: center; gap: 10px; }
.aft-page .aft-points strong { min-width: 54px; font-size: .87rem; }
.aft-page .aft-progress { height: 7px; border-radius: 999px; background: #e6ebe7; overflow: hidden; }
.aft-page .aft-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--aft-green); }
.aft-page .is-below .aft-progress > span { background: var(--aft-red); }
.aft-page .aft-result-total { display: flex; justify-content: space-between; margin-top: 13px; padding: 16px 14px 0; border-top: 1px solid var(--aft-line); font-size: 1.02rem; }

.aft-page .aft-content-section { margin-top: 24px; padding: 30px; }
.aft-page .aft-section-heading { max-width: 760px; margin-bottom: 22px; }
.aft-page .aft-section-heading > p:last-child { margin: 11px 0 0; color: var(--aft-muted); line-height: 1.6; }
.aft-page .aft-chart-controls { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(120px, .7fr)); gap: 12px; padding: 18px; border: 1px solid var(--aft-line); border-radius: 13px; background: var(--aft-soft); }
.aft-page .aft-chart-controls label { margin: 0; }
.aft-page .aft-chart-controls select { margin-top: 7px; font-size: .88rem; }
.aft-page .aft-chart-controls label[hidden] { display: none; }
.aft-page .aft-chart-caption { margin: 17px 0 10px; color: var(--aft-muted); font-size: .86rem; }
.aft-page .aft-table-wrap { max-height: 480px; overflow-y: auto; border: 1px solid var(--aft-line); border-radius: 12px; }
.aft-page .aft-score-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.aft-page .aft-score-table th { position: sticky; top: 0; z-index: 1; color: #fff; background: #273b2e; text-align: left; }
.aft-page .aft-score-table th,
.aft-page .aft-score-table td { padding: 11px 16px; border-bottom: 1px solid var(--aft-line); }
.aft-page .aft-score-table tr:last-child td { border-bottom: 0; }
.aft-page .aft-score-table tbody tr:nth-child(even) { background: #f8faf8; }
.aft-page .aft-score-table td:last-child { width: 34%; font-weight: 800; }
.aft-page .aft-standard-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.aft-page .aft-standard-cards article { padding: 22px; border: 1px solid var(--aft-line); border-radius: 14px; background: #fbfdfb; }
.aft-page .aft-standard-cards span { display: block; color: var(--aft-green); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.aft-page .aft-standard-cards strong { display: block; margin: 9px 0; font-size: 2rem; letter-spacing: -.035em; }
.aft-page .aft-standard-cards p,
.aft-page .aft-prose p { margin: 0; color: var(--aft-muted); line-height: 1.65; }
.aft-page .aft-prose p + p { margin-top: 10px; }
.aft-page .aft-prose > h2 { margin-bottom: 15px; }
.aft-page .aft-infographic { display: block; width: 100%; height: auto; border: 1px solid var(--aft-line); border-radius: 14px; }
.aft-page #combat-aft-specialties { scroll-margin-top: 96px; }
.aft-page .aft-code-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.aft-page .aft-code-list > div,
.aft-page .aft-code-list > span { display: flex; min-width: 0; gap: 9px; padding: 10px 11px; border: 1px solid var(--aft-line); border-radius: 8px; background: #fafcfb; font-size: .8rem; line-height: 1.35; }
.aft-page .aft-code-list strong { flex: 0 0 auto; color: var(--aft-green-dark); }
.aft-page .aft-steps { margin: 0; padding-left: 23px; color: var(--aft-muted); }
.aft-page .aft-steps li { padding: 4px 0 4px 4px; line-height: 1.5; }
.aft-page .aft-faq-list { display: grid; gap: 9px; }
.aft-page .aft-faq-list details { border: 1px solid var(--aft-line); border-radius: 11px; background: #fcfdfc; }
.aft-page .aft-faq-list summary { padding: 16px 18px; font-weight: 750; cursor: pointer; }
.aft-page .aft-faq-list p { margin: 0; padding: 0 18px 17px; color: var(--aft-muted); line-height: 1.6; }
.aft-page .aft-sources { font-size: .9rem; }
.aft-page .aft-sources h2 { margin-bottom: 10px; }
.aft-page .aft-sources p { color: var(--aft-muted); line-height: 1.55; }
.aft-page .aft-sources ul { padding-left: 20px; }
.aft-page .aft-sources li { margin: 7px 0; line-height: 1.5; }
.aft-page .aft-sources a { color: var(--aft-green-dark); font-weight: 700; }
.aft-page .aft-checked { margin-bottom: 4px; font-weight: 700; }
.aft-page .aft-disclaimer { margin-top: 4px; font-size: .8rem; }

@media (max-width: 820px) {
  .aft-page .aft-chart-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aft-page .aft-code-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .aft-page main { padding: 0 12px 50px; }
  .aft-page .aft-page-header { padding-top: 22px; }
  .aft-page .aft-breadcrumbs { margin-bottom: 20px; font-size: .78rem; }
  .aft-page .aft-card-heading { padding: 21px 18px; }
  .aft-page .aft-data-status { white-space: normal; text-align: center; }
  .aft-page #aft-form { padding: 4px 18px 22px; }
  .aft-page .aft-choice-grid,
  .aft-page .aft-detail-grid,
  .aft-page .aft-event-grid,
  .aft-page .aft-standard-cards { grid-template-columns: 1fr; }
  .aft-page .aft-event-card-wide { grid-column: auto; }
  .aft-page .aft-choice > span { min-height: 92px; }
  .aft-page .aft-actions { display: grid; grid-template-columns: 1fr; }
  .aft-page .aft-results,
  .aft-page .aft-content-section { padding: 22px 18px; border-radius: 16px; }
  .aft-page .aft-result-summary { align-items: flex-start; }
  .aft-page .aft-status { min-width: 118px; padding: 12px; }
  .aft-page .aft-breakdown-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
  .aft-page .aft-points { grid-column: 1 / -1; }
  .aft-page .aft-chart-controls { grid-template-columns: 1fr; padding: 14px; }
  .aft-page .aft-code-list { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .aft-page .aft-card-heading { display: block; }
  .aft-page .aft-data-status { margin-top: 13px; }
  .aft-page .aft-result-summary { display: block; }
  .aft-page .aft-status { width: 100%; margin-top: 17px; }
  .aft-page .aft-time-input { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.aft-page) { scroll-behavior: auto; }
  .aft-page * { scroll-behavior: auto !important; transition: none !important; }
}
