:root {
  --navy: #0b4770;
  --navy-deep: #073e63;
  --blue: #1b6097;
  --blue-text: #14557f;
  --page-bg: #eeeeee;
  --card-border: #e7e7e7;
  --muted: #707070;
  --orange: #f47b20;
  --green: #3a9d68;
  --footer: #303030;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page-bg);
  color: #171717;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  color: #fff;
}

.header-main {
  position: relative;
  min-height: 108px;
  background: var(--navy);
  box-shadow: 0 3px 6px rgb(0 0 0 / 16%);
}

.brand-lockup,
.user-profile,
.page-titlebar-inner {
  width: min(1228px, calc(100% - 48px));
  margin: 0 auto;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 108px;
  gap: 22px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 125px;
  height: 85px;
  background: #fff;
  color: #0e4c77;
  box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  top: 18px;
  width: 34px;
  height: 15px;
  content: "";
}

.brand-mark::before {
  left: 33px;
  background: #0871ac;
}

.brand-mark::after {
  right: 33px;
  background: #f0444b;
}

.brand-name {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.brand-blue,
.brand-red {
  position: absolute;
  bottom: 20px;
  width: 34px;
  height: 5px;
}

.brand-blue {
  left: 33px;
  background: #0871ac;
}

.brand-red {
  right: 33px;
  background: #f0444b;
}

.brand-lower {
  bottom: 13px;
}

.brand-red.brand-lower {
  right: 33px;
}

.brand-blue.brand-lower {
  left: 33px;
  width: 18px;
}

.brand-divider {
  display: none;
}

.system-name {
  font-size: 24px;
  font-weight: 400;
}

.user-profile {
  position: absolute;
  top: 48px;
  right: 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.user-icon {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 8px;
  line-height: 1;
}

.color-track {
  position: absolute;
  right: max(24px, calc((100% - 1228px) / 2));
  bottom: 0;
  left: max(190px, calc((100% - 1228px) / 2 + 125px));
  display: flex;
  height: 11px;
}

.color-track span {
  flex: 1;
}

.track-green { background: #6abc55; }
.track-cyan { background: #43b9dc; }
.track-yellow { background: #fbc039; }
.track-orange { background: #f15c2d; }
.track-purple { background: #9c4f99; }
.track-indigo { background: #353a9e; }

.page-titlebar {
  background: var(--blue);
}

.page-titlebar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 70px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
}

.back-circle {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
}

.page-title {
  font-size: 24px;
  font-weight: 400;
}

.titlebar-spacer {
  display: block;
}

.page-shell {
  width: min(1228px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 52px;
}

.application-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 215px;
  padding-left: 15px;
  border-left: 6px solid #1a7abc;
}

.summary-copy h1 {
  margin: 0 0 2px;
  color: var(--blue);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.21;
}

.bases-link {
  display: inline-block;
  margin: 2px 0 11px 3px;
  color: #2b6e9b;
  font-size: 17px;
  text-decoration: underline;
}

.summary-copy p {
  margin: 6px 0;
  color: var(--blue-text);
  font-size: 18px;
  line-height: 1.25;
}

.summary-copy p:first-of-type {
  color: #2b2b2b;
}

.summary-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  margin-right: 6px;
  color: #333;
  font-size: 17px;
}

.info-icon {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--blue-text);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.pin-icon {
  color: var(--blue-text);
  font-size: 18px;
}

.summary-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  padding-top: 42px;
}

.eligibility-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 5px 8px 14px;
  border-radius: 3px;
  background: #fff;
  color: #444;
  font-size: 18px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
}

.check-badge {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #51a24f;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.small-blue-button,
.continue-button,
.save-button {
  border: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.1px;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.small-blue-button {
  min-height: 38px;
  padding: 0 13px;
  background: #22a9d1;
  font-size: 13px;
}

.continue-button {
  min-height: 40px;
  padding: 0 17px;
  border-radius: 2px;
  background: var(--green);
  font-size: 14px;
}

.small-blue-button:hover,
.continue-button:hover,
.save-button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.content-grid {
  display: grid;
  grid-template-columns: 322px minmax(0, 1fr);
  gap: 24px;
}

.sidebar {
  min-width: 0;
}

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  min-height: 68px;
  padding: 9px 12px;
  border: 0;
  border-radius: 2px;
  background: #d9d9d9;
  color: #8b8b8b;
  text-align: left;
}

.section-item.active {
  background: #fff;
  color: #262626;
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
}

.section-item.completed {
  background: #d4d4d4;
}

.section-number {
  display: inline-grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #999;
  color: #fff;
  font-size: 16px;
}

.active .section-number {
  background: #3858b3;
}

.section-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 19px;
  line-height: 1.05;
}

.section-label small {
  font-size: 16px;
  line-height: 1.2;
}

.status-ok,
.status-alert {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 4px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
}

.status-ok { background: #5aaf5b; }
.status-alert { background: #ef5b2f; }

.last-saved {
  margin: 20px 0 9px;
  color: #747474;
  font-size: 16px;
}

.save-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 2px;
  background: var(--orange);
  font-size: 14px;
}

.question-area {
  min-width: 0;
}

.venture-area {
  grid-column: 2;
  margin-top: 8px;
  padding-top: 1px;
}

.venture-area > h2 {
  margin: 5px 0 10px;
}

.question-area > h2 {
  margin: -38px 0 10px;
  color: var(--blue-text);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.venture-area > h2 {
  margin-top: 5px;
}

.question-card {
  margin: 0 0 24px;
  padding: 20px 18px 20px;
  border: 1px solid var(--card-border);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 2px 3px rgb(0 0 0 / 12%);
}

.question-title {
  margin: 0 0 19px;
  color: var(--blue-text);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.22;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.option-label {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  color: #171717;
  font-size: 17px;
  line-height: 1.33;
  cursor: pointer;
}

.option-label input {
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.option-label:hover {
  color: var(--blue-text);
}

.option-label input:focus-visible {
  outline: 3px solid rgb(27 96 151 / 28%);
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 3px 0 28px;
}

.site-footer {
  background: var(--footer);
  color: #fff;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  gap: 84px;
  width: min(1160px, calc(100% - 48px));
  min-height: 195px;
  margin: 0 auto;
  padding: 24px 0;
}

.government-mark {
  display: flex;
  width: 136px;
  height: 136px;
  margin-top: 1px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.government-blue,
.government-red {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 15px;
  text-align: center;
}

.government-blue {
  background: #1e68ae;
  font-size: 28px;
  line-height: 0.8;
}

.government-blue span {
  font-size: 22px;
}

.government-red {
  background: #ed203a;
  font-size: 16px;
  line-height: 1.1;
}

.footer-links h3 {
  margin: 4px 0 15px;
  font-size: 23px;
  font-weight: 400;
}

.link-columns {
  display: flex;
  gap: 68px;
}

.link-columns div {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  color: #fff;
  font-size: 19px;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 15px;
  margin: 38px 0 0 auto;
}

.social-links a {
  display: inline-grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 10px;
  background: #fff;
  color: #353535;
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
}

.social-links a:last-child {
  font-size: 20px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  max-width: min(390px, calc(100% - 44px));
  padding: 13px 17px;
  border-radius: 4px;
  background: #263746;
  color: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / 24%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .user-profile {
    right: 24px;
    max-width: 390px;
    font-size: 14px;
  }

  .system-name {
    font-size: 21px;
  }

  .application-summary {
    gap: 24px;
  }

  .summary-copy h1 {
    font-size: 24px;
  }

  .content-grid {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .footer-inner {
    gap: 40px;
  }
}

@media (max-width: 800px) {
  .header-main {
    min-height: 128px;
  }

  .brand-lockup {
    min-height: 94px;
    width: calc(100% - 32px);
    gap: 12px;
  }

  .brand-mark {
    width: 95px;
    height: 65px;
    transform: scale(0.85);
    transform-origin: left center;
  }

  .system-name {
    font-size: 18px;
  }

  .user-profile {
    top: 88px;
    right: 16px;
    left: 16px;
    justify-content: flex-end;
    max-width: none;
    font-size: 13px;
  }

  .color-track {
    right: 16px;
    left: 112px;
    height: 8px;
  }

  .page-titlebar-inner,
  .page-shell {
    width: calc(100% - 32px);
  }

  .page-titlebar-inner {
    min-height: 58px;
  }

  .back-button,
  .page-title {
    font-size: 18px;
  }

  .application-summary {
    flex-direction: column;
    min-height: 0;
    padding-bottom: 22px;
  }

  .summary-actions {
    align-items: flex-start;
    width: 100%;
    padding-top: 0;
  }

  .content-grid {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    order: 2;
  }

  .question-area {
    order: 1;
  }

  .venture-area {
    order: 1;
  }

  .question-area > h2 {
    margin: 3px 0 16px;
    text-align: left;
  }

  .section-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-label {
    font-size: 16px;
  }

  .section-label small {
    font-size: 13px;
  }

  .footer-inner {
    flex-wrap: wrap;
    gap: 24px;
  }

  .social-links {
    width: 100%;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .page-shell {
    padding-top: 24px;
  }

  .summary-copy h1 {
    font-size: 21px;
  }

  .summary-copy p {
    font-size: 15px;
  }

  .eligibility-badge {
    width: 100%;
    font-size: 15px;
  }

  .question-card {
    padding: 16px 13px;
  }

  .question-title {
    font-size: 18px;
  }

  .option-label {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 8px;
    font-size: 15px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .government-mark {
    width: 108px;
    height: 108px;
  }

  .footer-links h3 {
    font-size: 20px;
  }

  .footer-links a {
    font-size: 16px;
  }

  .link-columns {
    gap: 26px;
  }
}
