html {
  font-size: 15px;
  scroll-padding-top: 92px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html,
body {
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding-bottom: 78px;
  font-family: "Noto Sans TC", "Segoe UI", sans-serif;
  background:
    linear-gradient(140deg, rgba(17, 41, 69, 0.11) 0 22%, transparent 22% 100%),
    radial-gradient(circle at 10% 8%, rgba(204, 162, 51, 0.22), transparent 31%),
    radial-gradient(circle at 88% 4%, rgba(31, 99, 130, 0.18), transparent 34%),
    linear-gradient(180deg, #eff4f9 0%, #e4ecf5 48%, #d9e2ec 100%);
  color: #1f2a36;
  position: relative;
}

body.site-shell {
  padding-bottom: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    url('/images/icon_defense.png') no-repeat 3% 86% / 150px auto,
    url('/images/icon_defense.png') no-repeat 97% 18% / 188px auto;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.site-header {
  background: linear-gradient(120deg, #0f263f, #1c4167 64%, #20354c);
  box-shadow: 0 10px 24px rgba(11, 30, 52, 0.18);
  position: relative;
  z-index: 2;
}

.site-header .navbar {
  min-height: 66px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.brand-standard-mark {
  width: min(44vw, 210px);
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.brand-system-title {
  font-size: 1rem;
  white-space: nowrap;
}

.brand-icon,
.title-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.title-icon {
  padding-bottom: 0;
  height: 34px;
}

.footer {
  border-top: 1px solid #dbe3ee;
  box-shadow: 0 -8px 24px rgba(20, 38, 59, 0.1);
  position: relative;
  white-space: normal;
}

.footer.footer-fixed {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  line-height: 1.45 !important;
  white-space: normal !important;
}

.footer.footer-fixed .container {
  line-height: 1.45 !important;
  white-space: normal !important;
}

.landing-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.landing-card {
  border-radius: 16px;
}

.landing-entry-section {
  padding: clamp(12px, 2vw, 24px) 0;
  position: relative;
  z-index: 1;
}

.landing-entry-wrap {
  max-width: 1100px;
  display: grid;
  gap: 14px;
}

.landing-hero-panel {
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid rgba(194, 204, 216, 0.88);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(17, 41, 69, 0.96), rgba(32, 75, 118, 0.92)),
    #112945;
  box-shadow: 0 18px 44px rgba(17, 41, 69, 0.18);
  color: #fff;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f7d66e;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.landing-title {
  margin: 12px 0 0;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.08;
  font-weight: 800;
}

.landing-lead {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

.landing-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.landing-pill-row span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #f5f8fb;
  font-size: 0.9rem;
  font-weight: 700;
}

.landing-flow-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.landing-flow-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.landing-flow-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(247, 214, 110, 0.18);
  color: #f7d66e;
  font-size: 0.82rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.landing-flow-list strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
}

.landing-flow-list span {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.landing-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-signal-card {
  padding: 16px 18px;
  border: 1px solid rgba(194, 204, 216, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 28px rgba(17, 41, 69, 0.08);
}

.landing-signal-label {
  color: #7d6630;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.landing-signal-card strong {
  display: block;
  color: #173d63;
  font-size: 1rem;
  font-weight: 800;
}

.landing-signal-card span {
  display: block;
  margin-top: 8px;
  color: #52667b;
  line-height: 1.7;
}

.landing-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.landing-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid rgba(194, 204, 216, 0.92);
  font: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(17, 41, 69, 0.12);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.landing-action-card:hover,
.landing-action-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(17, 41, 69, 0.16);
}

.landing-action-card.is-primary {
  background: linear-gradient(135deg, #f7fbff, #eef5ff);
  color: #173d63;
}

.landing-action-card.is-outline {
  background: linear-gradient(135deg, #fffdf7, #f7f2df);
  color: #4f3f17;
}

.landing-action-card.is-primary:hover,
.landing-action-card.is-primary:focus-visible {
  border-color: #2e6aa6;
}

.landing-action-card.is-outline:hover,
.landing-action-card.is-outline:focus-visible {
  border-color: #b59333;
}

.landing-invite-panel {
  display: none;
  max-width: 760px;
  margin: 18px auto 0;
  padding: 18px;
  border: 1px solid rgba(194, 204, 216, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(17, 41, 69, 0.1);
}

.landing-invite-panel.is-open {
  display: block;
}

.landing-invite-header {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.landing-invite-step {
  color: #7d6630;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.landing-invite-title {
  margin: 4px 0 6px;
  color: #173d63;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 800;
}

.landing-invite-copy {
  margin: 0;
  color: #52667b;
  line-height: 1.75;
}

.landing-invite-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-invite-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f5f8fc;
  border: 1px solid #d6e0ea;
  color: #304f6e;
  font-size: 0.82rem;
  font-weight: 700;
}

.landing-invite-helper {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: #586b7d;
  font-size: 0.9rem;
  line-height: 1.65;
}

.landing-invite-error {
  border-left: 4px solid #b42318;
}

.landing-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.landing-support-card {
  padding: 14px;
  border: 1px solid rgba(194, 204, 216, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(17, 41, 69, 0.08);
}

.landing-support-kicker {
  color: #7d6630;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.landing-support-title {
  margin: 6px 0 8px;
  color: #173d63;
  font-size: 1rem;
  font-weight: 800;
}

.landing-support-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.1rem;
  color: #52667b;
  line-height: 1.55;
}

.landing-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(22, 48, 77, 0.08);
}

.landing-action-icon svg {
  width: 32px;
  height: 32px;
}

.landing-action-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.landing-action-title {
  font-size: 1.26rem;
  line-height: 1.35;
  font-weight: 800;
}

.landing-action-copy {
  color: inherit;
  opacity: 0.82;
  font-size: 0.95rem;
  line-height: 1.7;
}

.landing-action-meta {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(23, 61, 99, 0.08);
  font-size: 0.86rem;
  font-weight: 800;
}

.form-shell {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.form-hero {
  min-height: 0;
  display: block;
  margin-bottom: 18px;
  border: 1px solid rgba(194, 204, 216, 0.85);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(17, 41, 69, 0.97), rgba(34, 79, 124, 0.95)),
    #112945;
  box-shadow: 0 18px 44px rgba(17, 41, 69, 0.18);
  overflow: hidden;
}

.form-hero-content {
  padding: clamp(24px, 4vw, 42px);
  color: #fff;
}

.form-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f7d66e;
  font-weight: 700;
  font-size: 0.86rem;
}

.form-main-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.site-shell:has(.form-shell) .form-assist-panel {
  top: 118px;
}

.form-hero-lead {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

.form-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.form-hero-meta span {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f5f8fb;
  font-weight: 700;
  font-size: 0.9rem;
}

.form-hero-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 22px 18px 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08));
}

.form-hero-mark img {
  width: min(100%, 220px);
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.22));
}

.form-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.form-verification-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid #d7e3ef;
  border-left: 5px solid #2f8a61;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f4fbf7 58%, #edf7f1 100%);
  box-shadow: 0 12px 26px rgba(17, 41, 69, 0.08);
}

.form-verification-summary {
  display: grid;
  gap: 10px;
}

.form-verification-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 138, 97, 0.12);
  color: #1f6b49;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.form-verification-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.form-verification-title {
  margin: 0;
  color: #173d63;
  font-size: clamp(1.22rem, 2vw, 1.58rem);
  font-weight: 800;
}

.form-verification-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(23, 61, 99, 0.08);
  color: #173d63;
  font-size: 0.84rem;
  font-weight: 800;
}

.form-verification-meta-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.form-verification-meta-list div {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d8e5dd;
  background: rgba(255, 255, 255, 0.82);
}

.form-verification-meta-list dt {
  color: #667788;
  font-size: 0.8rem;
  font-weight: 700;
}

.form-verification-meta-list dd {
  margin: 4px 0 0;
  color: #173d63;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.form-assist-panel {
  position: sticky;
  top: 82px;
  z-index: 20;
}

.assist-panel-card {
  padding: 16px;
  border: 1px solid rgba(199, 212, 228, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(17, 41, 69, 0.1);
  backdrop-filter: blur(10px);
}

.assist-panel-card-secondary {
  background: rgba(252, 250, 244, 0.92);
}

.assist-tip-list {
  display: grid;
  gap: 10px;
  padding-left: 1rem;
  color: #445a70;
}

.assist-tip-list li {
  line-height: 1.65;
}

.assist-eyebrow {
  color: #6f7f90;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.form-main-panel {
  min-width: 0;
}

.form-quick-nav {
  display: grid;
  gap: 8px;
}

.quick-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 42px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid #cfd8e3;
  background: #ffffff;
  color: #2a4764;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.quick-nav-link span {
  color: #8b9aae;
  font-size: 0.74rem;
  font-weight: 800;
}

.quick-nav-link:hover {
  border-color: #2e6aa6;
  background: #f1f7ff;
  color: #173d63;
}

.quick-nav-link:focus-visible,
.quick-nav-link.is-active {
  border-color: #2e6aa6;
  background: #e8f2ff;
  color: #173d63;
  box-shadow: 0 0 0 0.18rem rgba(46, 106, 166, 0.18);
}

.quick-nav-link.quick-nav-complete {
  border-color: #2f8a61;
  background: #eaf8f1;
  color: #1f6d4b;
}

.quick-nav-note {
  color: #5d7083;
  font-size: 0.86rem;
  line-height: 1.65;
}

.validation-jump-panel {
  border: 1px solid #d9e2ec;
  border-left: 4px solid #59758f;
  background: #f8fafc;
}

.validation-jump-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.validation-jump-title {
  color: #263f55;
}

.validation-jump-summary {
  color: #6c757d;
}

.validation-jump-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #4d5c6e;
}

.validation-severity-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  margin-right: 4px;
}

.validation-severity-chip.severity-must {
  background: #fdecea;
  color: #a71d2a;
  border-color: #f5c1c4;
}

.validation-severity-chip.severity-suggest {
  background: #fff5e0;
  color: #8a5a00;
  border-color: #f5d99b;
}

.validation-severity-chip.severity-autofill {
  background: #e6f2ff;
  color: #17427a;
  border-color: #b7d1ee;
}

.validation-jump-list {
  display: grid;
  gap: 6px;
  padding-left: 0;
  list-style: none;
}

.validation-jump-item {
  padding: 10px 12px;
  border: 1px solid #f1c5c0;
  border-radius: 12px;
  background: #fff7f6;
}

.validation-jump-button {
  border: 0;
  background: transparent;
  color: #842029;
  font-weight: 700;
  text-align: left;
  padding: 0;
  text-decoration: underline;
}

.validation-jump-message {
  margin-top: 4px;
  color: #7a2730;
  font-size: 0.88rem;
  line-height: 1.55;
}

.validation-jump-hint {
  margin-top: 2px;
  color: #5c6f82;
  font-size: 0.85rem;
  line-height: 1.55;
}

.validation-jump-button:hover,
.validation-jump-button:focus-visible {
  color: #5c151c;
}

.validation-jump-item.severity-must {
  border-color: #f1c5c0;
  background: #fff7f6;
}

.validation-jump-item.severity-suggest {
  border-color: #f5d99b;
  background: #fffaee;
}

.validation-jump-item.severity-suggest .validation-jump-button {
  color: #8a5a00;
}

.validation-jump-item.severity-autofill {
  border-color: #b7d1ee;
  background: #f0f6ff;
}

.validation-jump-item.severity-autofill .validation-jump-button {
  color: #17427a;
}

.validation-jump-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.field-highlight-pulse {
  animation: fieldHighlightPulse 1.6s ease-out;
}

@keyframes fieldHighlightPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 205, 0, 0.55); background-color: rgba(255, 244, 189, 0.85); }
  60% { box-shadow: 0 0 0 12px rgba(255, 205, 0, 0); background-color: rgba(255, 244, 189, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(255, 205, 0, 0); background-color: transparent; }
}

.progress-card {
  background: #ffffff;
}

.progress-title {
  color: #244363;
}

.progress-text {
  color: #2f69a8;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-progress-bar {
  background: linear-gradient(90deg, #1d5d88, #c49b2f);
}

.section-hint {
  margin-bottom: 1rem;
  color: #48607a;
  font-size: 0.92rem;
}

.form-guidance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 1rem;
}

.form-guidance-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dbe4ef;
  background: #f7fafc;
}

.form-guidance-item strong {
  display: block;
  margin-bottom: 4px;
  color: #244363;
}

.form-guidance-item span {
  color: #586b7e;
  font-size: 0.88rem;
  line-height: 1.6;
}

.landline-hint {
  min-height: 1.4rem;
  color: #445a70;
}

.photo-upload-grid {
  margin-top: 0.1rem;
}

.photo-upload-panel {
  background: #f8fbff;
  border: 1px solid #d9e3ef;
  border-radius: 12px;
  padding: 14px;
}

.civilian-compact-panel {
  background: linear-gradient(180deg, #fbfdff, #f4f8fc);
  border: 1px solid #d9e3ef;
  border-radius: 12px;
  padding: 14px;
}

.civilian-detail-grid {
  align-items: start;
}

.civilian-grade-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 6px;
  margin-top: 0;
}

.civilian-grade-field {
  min-width: 0;
}

.col-12.col-md-6.col-xl-6:has(> .civilian-grade-grid) > .form-label,
.civilian-grade-group-label {
  margin-bottom: 0.1rem;
}

.civilian-grade-field .form-label {
  margin-bottom: 0.08rem !important;
  font-size: 0.78rem;
  line-height: 1.15;
}

.civilian-grade-field .form-select {
  min-height: 42px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.civilian-grade-field .text-danger {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.82rem;
  line-height: 1.2;
}

.civilian-grade-field .text-danger:empty {
  display: none;
}

@media (min-width: 1200px) {
  .civilian-grade-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 8px;
  }
}

.civilian-photo-column {
  align-self: stretch;
}

.civilian-photo-column .photo-upload-panel {
  background: linear-gradient(180deg, #fbfdff, #f1f6fb);
}

.civilian-photo-column .photo-preview-wrap {
  justify-content: center;
}

.photo-preview-wrap {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.photo-preview-compact {
  justify-content: flex-start;
}

.photo-preview-box {
  width: min(100%, 400px);
  aspect-ratio: 4 / 5;
  max-height: 500px;
  border: 2px dashed #b9c8da;
  border-radius: 12px;
  overflow: hidden;
  background: #eef3f9;
  position: relative;
}

.photo-preview-box-fit-input {
  width: min(100%, 260px);
  max-width: 100%;
  max-height: 325px;
}

.add-family-btn {
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  border-radius: 10px;
}

.photo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #536577;
  font-weight: 600;
}

.form-section-toggle {
  width: 100%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  background: linear-gradient(135deg, #1e3b5b, #2e5985);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 14px 16px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  transition: background 0.2s ease;
}

.form-section-heading {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #f7d66e;
  font-size: 0.82rem;
  font-weight: 800;
}

.form-section-toggle:hover {
  background: linear-gradient(135deg, #1d3450, #284f76);
}

.form-section-toggle:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(222, 191, 96, 0.32);
}

.form-section-title {
  color: #fff;
  line-height: 1.35;
}

.section-toggle-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-completion-badge {
  font-size: 0.78rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #f1f7ff;
}

.section-completion-badge.is-complete {
  background: rgba(44, 141, 96, 0.22);
  border-color: rgba(158, 232, 198, 0.6);
  color: #d8f7e9;
}

.section-toggle-icon {
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.form-section-toggle[aria-expanded="false"] .section-toggle-icon {
  transform: rotate(-90deg);
}

.form-section-card.section-collapsed {
  box-shadow: 0 4px 12px rgba(17, 41, 69, 0.08) !important;
}

.form-section-card.section-collapsed .card-body {
  display: none;
}

.form-section-card,
#section-submit {
  scroll-margin-top: 88px;
}

.card {
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(17, 41, 69, 0.08) !important;
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-label-required::after {
  content: " *";
  color: #b42318;
  font-weight: 800;
}

.form-control,
.form-select {
  border-radius: 10px;
  border: 1px solid #cfd8e3;
  min-height: 46px;
  background-color: #fff;
}

.form-control[type="date"] {
  color-scheme: light;
  padding-right: 0.85rem;
}

.contact-details-grid > [class*="col-"] {
  min-width: 0;
}

.contact-subsection-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #dbe4ef;
  color: #244363;
  font-size: 0.9rem;
  font-weight: 800;
}

.contact-subsection-heading:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.contact-subsection-heading::before {
  content: "";
  width: 4px;
  height: 18px;
  flex: 0 0 4px;
  border-radius: 2px;
  background: #2e5985;
}

.search-combobox {
  position: relative;
  min-width: 0;
}

.search-combobox .form-control {
  padding-right: 2.5rem;
}

.search-combobox::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 17px;
  right: 17px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #536577;
  border-bottom: 2px solid #536577;
  transform: rotate(45deg);
  pointer-events: none;
}

.search-combobox:focus-within::after {
  top: 21px;
  transform: rotate(225deg);
}

.search-combobox-menu {
  display: block;
  position: absolute;
  z-index: 1080;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-width: 100%;
  max-height: min(19rem, 46vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #c8d5e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 41, 69, 0.16);
}

.search-combobox-menu[hidden] {
  display: none;
}

.search-combobox-option {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1f2a36;
  text-align: left;
  overflow-wrap: anywhere;
}

.search-combobox-option:hover,
.search-combobox-option.is-active {
  background: #eaf2fa;
  color: #173b5e;
}

.search-combobox-empty {
  padding: 10px;
  color: #64748b;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.certification-picker {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.certification-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 15rem;
  margin-top: 12px;
  overflow-x: hidden;
  overflow-y: auto;
}

.certification-results .btn,
.certification-selected .btn {
  max-width: 100%;
  margin: 0 !important;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.certification-selection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #dbe4ef;
  font-size: 0.9rem;
  font-weight: 700;
}

.certification-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin-top: 8px;
}

@media (max-width: 575.98px) {
  .search-combobox-menu {
    max-height: min(16rem, 42vh);
  }

  .certification-picker {
    padding: 12px;
  }

  .certification-results,
  .certification-selected {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .certification-results .btn,
  .certification-selected .btn {
    width: 100%;
  }
}

.form-control[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.92;
}

.form-control:focus,
.form-select:focus {
  border-color: #2f69a8;
  box-shadow: 0 0 0 0.2rem rgba(47, 105, 168, 0.15);
}

.driving-license-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.driving-license-item {
  margin: 0;
  padding: 9px 8px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #f8fbff;
  min-height: 44px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.driving-license-item .form-check-input {
  margin-top: 0;
  margin-left: 0;
}

@media (min-width: 768px) {
  .basic-data-grid > [class*="col-"] > .form-label {
    white-space: nowrap;
  }
}

.text-danger {
  font-size: 0.85rem;
}

.required-field-legend {
  margin: 0 0 12px;
  color: #52667b;
  font-size: 0.88rem;
}

.required-field-legend span {
  color: #b42318;
  font-weight: 800;
}

.family-row {
  background: #fbfcfe;
  border: 1px solid #dbe4ef !important;
}

.submit-context {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f7fafc;
  border: 1px solid #dbe4ef;
}

.submit-title {
  color: #244363;
  font-weight: 800;
}

.submit-copy {
  color: #586b7e;
  margin-top: 2px;
  font-size: 0.92rem;
}

.mobile-submit-bar {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(20, 43, 69, 0.96);
  color: #f4f8fb;
  box-shadow: 0 18px 40px rgba(17, 41, 69, 0.2);
}

.mobile-submit-meta {
  min-width: 0;
}

.mobile-submit-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-submit-title {
  color: #f4f8fb;
  font-size: 0.82rem;
  font-weight: 800;
}

.mobile-submit-progress {
  color: #d9e6f4;
  font-size: 0.82rem;
}

.mobile-submit-section {
  color: #f4f8fb;
  font-size: 0.95rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.mobile-submit-status {
  flex: 0 0 auto;
  color: #ffd7a0;
  font-size: 0.78rem;
  font-weight: 700;
}

.mobile-submit-status.is-complete {
  color: #aee8ca;
}

.mobile-step-indicators {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 5px;
  width: 100%;
  margin-top: 7px;
}

.mobile-step-indicator {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.mobile-step-indicator.is-complete {
  background: #78c9a2;
}

.mobile-step-indicator.is-current {
  background: #ffffff;
}

.mobile-submit-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.mobile-stepper-btn {
  min-width: 0;
  min-height: 40px;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  color: #f4f8fb;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-stepper-btn:hover:not(:disabled),
.mobile-stepper-btn:focus-visible:not(:disabled) {
  color: #f4f8fb;
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.18);
}

.mobile-stepper-btn:disabled {
  color: rgba(244, 248, 251, 0.4);
  border-color: rgba(255, 255, 255, 0.16);
  cursor: not-allowed;
}

.mobile-submit-button {
  flex: 0 0 auto;
  min-height: 46px;
  white-space: nowrap;
}

.submit-summary-button:disabled,
.mobile-submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.submit-summary-button.is-pending-validation,
.mobile-submit-button.is-pending-validation {
  filter: saturate(0.78);
}

.success-shell {
  max-width: 720px;
  margin: 0 auto;
}

.success-card {
  padding: clamp(28px, 5vw, 54px);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe4ef;
  box-shadow: 0 18px 44px rgba(17, 41, 69, 0.12);
}

.success-mark {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #eaf8f1;
  color: #1f7a53;
  font-size: 2rem;
  font-weight: 900;
}

.success-submission-id {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f4f7fb;
  color: #536577;
  font-size: 0.9rem;
}

.family-card {
  border-radius: 12px !important;
  box-shadow: 0 8px 20px rgba(22, 48, 77, 0.06);
}

.family-card-header {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e1e8f1;
}

.family-card-summary {
  margin-top: 0.15rem;
}

.privacy-protected-fields {
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.privacy-notice-modal .modal-header {
  background: #f6f9fc;
  border-bottom-color: #dbe4ef;
}

.privacy-notice-kicker {
  margin-bottom: 0.25rem;
  color: #2e6aa6;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.privacy-notice-body {
  color: #2b3b4d;
  line-height: 1.75;
}

.privacy-notice-body section {
  padding-block: 0.85rem;
  border-top: 1px solid #e2e9f1;
}

.privacy-notice-body h3 {
  margin: 0 0 0.55rem;
  color: #173d63;
  font-size: 1rem;
  font-weight: 800;
}

.privacy-notice-body ol {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.privacy-notice-details {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.5rem 0.85rem;
  margin-bottom: 0;
}

.privacy-notice-details dt {
  color: #244f78;
}

.privacy-notice-details dd {
  margin: 0;
}

.privacy-notice-footer {
  align-items: stretch;
  background: #f8fafc;
}

.submission-summary-modal .modal-header {
  background: #f6f9fc;
  border-bottom-color: #dbe4ef;
}

.submission-summary-status {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef5fc;
  color: #244363;
  font-size: 0.92rem;
  font-weight: 700;
}

.submission-summary-sections {
  display: grid;
  gap: 12px;
}

.submission-summary-section {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #dbe4ef;
  background: #fbfdff;
}

.submission-summary-heading {
  margin: 0 0 0.85rem;
  color: #244363;
  font-size: 1rem;
  font-weight: 800;
}

.submission-summary-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) 1fr;
  gap: 10px 14px;
  margin: 0;
}

.submission-summary-grid dt {
  color: #48607a;
  font-weight: 700;
}

.submission-summary-grid dd {
  margin: 0;
  color: #1f2a36;
  word-break: break-word;
}

.submission-summary-check {
  padding: 12px 14px 12px calc(14px + 1.5em);
  border-radius: 12px;
  border: 1px solid #dbe4ef;
  background: #f7fafc;
}

.submission-summary-check .form-check-label {
  color: #244363;
  font-weight: 700;
}

.submission-signature-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #dbe4ef;
  background: linear-gradient(180deg, #ffffff, #f6f9fc);
}

.submission-signature-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.submission-signature-title {
  margin: 0 0 0.35rem;
  color: #244363;
  font-size: 1rem;
  font-weight: 800;
}

.submission-signature-copy {
  color: #52667b;
  line-height: 1.65;
}

.submission-signature-canvas-shell {
  border: 1px solid #cfd8e3;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(32, 75, 118, 0.03), rgba(32, 75, 118, 0.01)),
    #ffffff;
  overflow: hidden;
}

.submission-signature-canvas {
  display: block;
  width: 100%;
  height: 220px;
  background: transparent;
  touch-action: none;
  cursor: crosshair;
}

.submission-signature-canvas:focus-visible {
  outline: 3px solid rgba(47, 105, 168, 0.26);
  outline-offset: -3px;
}

.submission-signature-meta {
  margin-top: 8px;
  color: #5c6d80;
  font-size: 0.88rem;
}

.signature-pad-error {
  min-height: 1.35rem;
  margin-top: 0.35rem;
}

.btn-primary {
  background: linear-gradient(135deg, #224f7c, #2e6aa6);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1b4167, #26598b);
}

.alert-danger ul {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  main,
  .container,
  .container-fluid,
  .card,
  .card-body,
  form,
  fieldset,
  .modal-content {
    min-width: 0;
    max-width: 100%;
  }

  input,
  select,
  textarea,
  button,
  canvas,
  iframe {
    max-width: 100%;
  }

  button,
  .btn {
    white-space: normal;
  }

  pre,
  code {
    max-width: 100%;
    overflow-x: auto;
    overflow-wrap: anywhere;
  }

  html {
    scroll-padding-top: 82px;
  }

  body.site-shell:has(.mobile-submit-bar) {
    padding-bottom: 224px;
  }

  #newMemberForm.mobile-wizard-active .form-section-card.section-collapsed,
  #newMemberForm.mobile-wizard-active #section-submit:not(.mobile-wizard-step-active) {
    display: none;
  }

  #newMemberForm.mobile-wizard-active .mobile-task-hidden {
    display: none !important;
  }

  #newMemberForm.mobile-wizard-active #section-submit.mobile-wizard-step-active {
    display: block;
  }

  #newMemberForm.mobile-wizard-active #section-submit.mobile-wizard-step-active .d-grid {
    display: none !important;
  }

  .footer .container {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 0.78rem;
  }

  .page-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .form-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0;
    border-radius: 14px;
  }

  .form-hero-content {
    padding: 22px;
  }

  .form-hero-mark {
    display: none;
  }

  .form-hero-lead {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .form-workspace {
    display: block;
  }

  .form-assist-panel {
    display: none;
  }

  .assist-panel-card {
    padding: 10px;
    border-radius: 12px;
    overflow: hidden;
  }

  .assist-panel-card-secondary {
    display: none;
  }

  .assist-eyebrow,
  .progress-title,
  .progress-text,
  .assist-panel-card .progress {
    display: none;
  }

  .form-quick-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    overflow: visible;
    gap: 6px;
    padding-bottom: 0;
    margin-top: 0 !important;
  }

  .quick-nav-link {
    min-width: 0;
    white-space: normal;
    min-height: 40px;
    padding: 6px 10px;
    overflow-wrap: anywhere;
  }

  .form-main-title {
    font-size: 2rem;
  }

  .brand-standard-mark {
    width: 148px;
    max-height: 34px;
  }

  .brand-system-title {
    font-size: 0.88rem;
  }

  .form-section-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    font-size: 0.95rem;
    padding: 12px;
  }

  .form-section-heading,
  .form-section-title,
  .section-toggle-meta {
    min-width: 0;
  }

  .form-section-title {
    overflow-wrap: anywhere;
  }

  .section-toggle-meta {
    gap: 6px;
  }

  .section-toggle-icon {
    flex: 0 0 auto;
  }

  .section-number {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .section-completion-badge {
    font-size: 0.74rem;
    padding: 5px 8px;
  }

  .section-hint {
    font-size: 0.88rem;
    margin-bottom: 0.8rem;
  }

  .validation-jump-list {
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
  }

  .validation-jump-item {
    padding: 8px 10px;
  }

  .validation-jump-message,
  .validation-jump-hint {
    line-height: 1.4;
  }

  .landing-action-grid,
  .landing-signal-grid,
  .form-guidance-grid,
  .landing-support-grid {
    grid-template-columns: 1fr;
  }

  .form-verification-banner,
  .form-verification-meta-list {
    grid-template-columns: 1fr;
  }

  .form-verification-heading {
    align-items: flex-start;
  }

  .landing-action-card {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 18px;
  }

  .landing-action-meta {
    grid-column: 1 / -1;
  }

  .photo-upload-panel {
    padding: 12px;
  }

  .photo-preview-box-fit-input {
    width: min(100%, 220px);
    max-height: 275px;
  }

  .add-family-btn {
    width: 100%;
  }

  .card-body {
    padding: 1rem !important;
  }

  .mobile-submit-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 10px;
    padding: 12px;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-submit-meta {
    width: 100%;
    display: grid;
    gap: 4px;
  }

  .mobile-submit-title,
  .mobile-submit-progress,
  .mobile-submit-section {
    white-space: normal;
    line-height: 1.4;
  }

  .mobile-submit-stepper {
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }

  .mobile-submit-stepper:has(.mobile-stepper-btn.d-none) .mobile-stepper-btn:not(.d-none) {
    flex-basis: 100%;
  }

  .mobile-stepper-btn {
    flex: 1 1 auto;
    min-height: 44px;
    border-radius: 12px;
    padding: 9px 10px;
    overflow-wrap: anywhere;
  }

  .civilian-photo-column {
    order: 2;
  }

  .mobile-submit-button {
    width: 100%;
  }

  .submission-summary-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .submission-summary-section {
    padding: 12px;
  }

  .submission-signature-header {
    flex-direction: column;
    align-items: stretch;
  }

  .submission-signature-canvas {
    height: 180px;
  }

  #submissionSummaryModal .modal-dialog {
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
  }

  #submissionSummaryModal .modal-content {
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  #submissionSummaryModal .modal-body {
    min-width: 0;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }

  #submissionSummaryModal .modal-footer {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 8px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: #ffffff;
  }

  #submissionSummaryModal .modal-footer > .btn {
    width: 100%;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
  }

  .submission-summary-grid dd {
    margin-bottom: 0.65rem;
  }
}