.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px max(24px, calc((100vw - 1120px) / 2));
  background: white;
  border-bottom: 1px solid var(--line);
}
.portal-header .brand-mark {
  color: var(--blue);
}
.portal-header .wordmark small {
  color: var(--blue);
}
.portal-header .wordmark b {
  font-size: 21px;
}
.home-link {
  font-size: 13px;
  font-weight: 600;
}
.portal-skip {
  position: fixed;
  top: -100px;
  left: 12px;
  background: white;
  padding: 12px;
  z-index: 10;
}
.portal-skip:focus {
  top: 12px;
}
#portal-main {
  max-width: 1120px;
  margin: auto;
  padding: 54px 24px 72px;
  min-height: calc(100svh - 170px);
}
#portal-main:focus {
  outline: none;
}
.portal-heading {
  margin-bottom: 32px;
}
.portal-heading h1 {
  font-size: 40px;
  margin-bottom: 14px;
}
.portal-heading > p:last-child {
  color: var(--muted);
  margin: 0;
}
#portal-message:empty {
  display: none;
}
#portal-message {
  padding: 16px 20px;
  background: #e7f0f8;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  margin-bottom: 24px;
  white-space: pre-line;
}
#portal-message.error {
  background: #fff1ed;
  border-color: #b54b32;
  color: #8e3225;
}
.portal-login {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.portal-story {
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 560px;
  color: white;
  background:
    linear-gradient(180deg, #0b223d38, #0b223deb 75%),
    url("/assets/images/vanguard/presentation.webp") 32% center/cover;
}
.portal-story .eyebrow {
  color: var(--warm);
  font-size: 10px;
}
.portal-story h2 {
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}
.portal-story > p:last-child {
  color: #d4e2ef;
  line-height: 1.9;
  margin-bottom: 0;
}
.portal-login-body {
  padding: 44px;
}
.portal-login-body > h2 {
  font-size: 29px;
  margin-bottom: 10px;
}
.portal-login-body > p.muted {
  font-size: 14px;
  margin-bottom: 32px;
}
.portal-login .field {
  font-size: 14px;
}
.portal-login input[type="tel"] {
  font-size: 18px;
  min-height: 54px;
}
.portal-login .primary.wide {
  min-height: 52px;
  background: #b55216;
  border-color: #b55216;
}
.auth-explanation {
  padding: 18px;
  background: var(--paper);
  border-radius: 6px;
  font-size: 13px;
}
.auth-explanation b {
  font-size: 14px;
}
.auth-explanation p {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.8;
}
.portal-login .checkbox {
  align-items: flex-start;
  font-size: 12px;
  margin: 20px 0 24px;
}
.portal-login .checkbox input {
  flex-shrink: 0;
  margin-top: 2px;
}
.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 13px 20px;
  min-height: 48px;
  border-radius: 5px;
  background: var(--primary);
  color: white;
  font-weight: 650;
  font-size: 14px;
  text-align: center;
}
.portal-button:hover {
  background: var(--deep);
}
.portal-button.accent {
  background: #b55216;
  width: 100%;
}
.portal-button.accent:hover {
  background: #963f0c;
}
summary {
  cursor: pointer;
  font-weight: 650;
  line-height: 1.7;
}
summary::marker {
  color: var(--blue);
}
.verify-actions {
  margin: 8px 0 16px;
}
.verify-actions > button {
  width: 100%;
}
#sms-countdown {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.portal-welcome {
  padding: 32px;
  background: var(--primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-radius: 8px;
  margin-bottom: 40px;
}
.portal-welcome .eyebrow {
  color: var(--warm);
  font-size: 10px;
}
.portal-welcome h2 {
  font-size: 26px;
  margin-bottom: 12px;
}
.portal-welcome p:last-child {
  color: #d4e2ef;
  font-size: 14px;
  margin-bottom: 0;
}
.portal-welcome .portal-button {
  background: white;
  color: var(--primary);
  flex-shrink: 0;
}
.portal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 32px 0 18px;
}
.portal-section-head h2 {
  font-size: 22px;
  margin: 0;
}
.portal-section-head h2 span {
  color: var(--blue);
  font-size: 17px;
  margin-left: 8px;
}
.portal-section-head a {
  font-size: 13px;
  font-weight: 650;
  color: var(--primary);
}
.application-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  margin-bottom: 20px;
}
.application-card .card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.application-card h3 {
  font-size: 23px;
  margin: 10px 0;
}
.application-card .receipt-number {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin: 0;
}
.application-card .application-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.application-card .status-badge {
  border-radius: 4px;
  background: #eaf2fa;
  color: #23537f;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  white-space: nowrap;
}
.application-card .status-badge.terminal {
  background: #fff0e0;
  color: #864614;
}
.application-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0;
  list-style: none;
  gap: 8px;
  margin: 28px 0 0;
  counter-reset: step;
}
.application-timeline li {
  border-top: 3px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
  counter-increment: step;
}
.application-timeline li::before {
  content: "0" counter(step);
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
  letter-spacing: 0.08em;
}
.application-timeline .done {
  border-color: var(--blue);
  color: var(--primary);
}
.application-timeline .current {
  border-color: var(--accent);
  color: #9b4812;
  font-weight: 750;
}
.application-timeline .stopped {
  color: #718293;
}
.application-notice {
  margin-top: 24px;
  padding: 20px;
  background: var(--paper);
  border-radius: 6px;
}
.application-notice h4 {
  margin: 0 0 8px;
  font-size: 14px;
}
.application-notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.application-notice small {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.application-terminal {
  font-size: 14px;
  margin-top: 20px;
  margin-bottom: 0;
  color: var(--muted);
}
#claim-panel {
  margin: 24px 0 40px;
}
#claim-panel > p {
  font-size: 13px;
  margin: 18px 0 24px;
}
.briefing-card h3 {
  margin-bottom: 10px;
}
.briefing-card p {
  font-size: 14px;
  margin: 0;
  color: var(--muted);
}
.portal-contact {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 40px;
}
.portal-contact h3 {
  margin-bottom: 6px;
}
.portal-contact p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.portal-contact a {
  font-size: 14px;
  color: var(--primary);
}
.portal-footer {
  max-width: 1120px;
  margin: auto;
  padding: 24px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
@media (max-width: 900px) {
  .portal-login-body {
    padding: 32px;
  }
  .portal-story {
    padding: 32px 24px;
  }
  .portal-story h2 {
    font-size: 28px;
  }
}
@media (max-width: 700px) {
  .portal-header {
    padding: 18px 20px;
  }
  .portal-header .wordmark b {
    font-size: 16px;
  }
  .portal-header .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .portal-header .wordmark {
    gap: 9px;
  }
  .portal-header .home-link {
    display: none;
  }
  .portal-header button {
    font-size: 11px;
    padding: 8px 10px;
  }
  #portal-main {
    padding: 32px 20px 40px;
  }
  .portal-heading h1 {
    font-size: 32px;
  }
  .portal-heading > p:last-child {
    font-size: 14px;
  }
  .portal-login {
    grid-template-columns: 1fr;
  }
  .portal-story {
    min-height: 190px;
    padding: 24px;
    background-position: 32% 30%;
  }
  .portal-story h2 {
    font-size: 25px;
    margin-bottom: 0;
  }
  .portal-story h2 br {
    display: none;
  }
  .portal-story > p:last-child {
    display: none;
  }
  .portal-login-body {
    padding: 26px 22px;
  }
  .portal-login-body > h2 {
    font-size: 25px;
  }
  .portal-welcome {
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 30px;
  }
  .portal-welcome h2 {
    font-size: 23px;
  }
  .portal-section-head h2 {
    font-size: 20px;
  }
  .application-card {
    padding: 22px 18px;
  }
  .application-card h3 {
    font-size: 21px;
  }
  .application-timeline {
    gap: 6px;
  }
  .application-timeline li {
    font-size: 11px;
  }
  .application-notice {
    padding: 16px;
  }
  .portal-contact {
    align-items: flex-start;
    flex-direction: column;
  }
  .portal-footer span {
    display: none;
  }
  .portal-footer {
    padding: 22px 20px;
  }
  .field input {
    font-size: 16px;
  }
  .auth-explanation {
    padding: 14px;
  }
}
@media (max-width: 370px) {
  .application-timeline {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }
  .application-timeline li {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 0;
    border-left: 3px solid var(--line);
    padding: 5px 10px;
  }
  .application-timeline li::before {
    margin: 0;
  }
  .application-timeline .done {
    border-color: var(--blue);
  }
  .application-timeline .current {
    border-color: var(--accent);
  }
}
#sms-code {
  font-size: 30px;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-height: 64px;
  margin: 12px 0;
}
