html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(14, 165, 233, 0.16), transparent 38%),
    #f8fbf9;
  color: #172033;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.15rem rgba(14, 165, 233, 0.18);
}

.site-header {
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
}

.navbar-brand {
  color: #172033;
  font-weight: 900;
}

.site-main {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.site-footer {
  padding: 1.5rem 0;
  color: #64748b;
}

.home-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  gap: 3rem;
  align-items: center;
}

.home-kicker {
  margin: 0 0 0.75rem;
  color: #047857;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-intro h1,
.app-page-heading h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 950;
  line-height: 0.96;
}

.home-lead {
  max-width: 44rem;
  margin: 1.5rem 0 0;
  color: #1f2937;
  font-size: 1.35rem;
  font-weight: 750;
}

.home-copy,
.app-page-heading p:last-child {
  max-width: 44rem;
  margin: 1rem 0 0;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.7;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.primary-link,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 850;
}

.primary-link {
  border: 1px solid #111827;
  background: #111827;
  color: #ffffff;
  text-decoration: none;
}

.primary-link:hover,
.primary-link:focus {
  border-color: #047857;
  background: #047857;
  color: #ffffff;
}

.status-pill {
  border: 1px solid rgba(4, 120, 87, 0.22);
  background: #ffffff;
  color: #1f2937;
}

.summary-preview {
  display: grid;
  place-items: center;
}

.summary-panel {
  width: min(100%, 28rem);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.5rem;
  padding: 1.25rem;
  background: #ffffff;
  box-shadow: 0 1.4rem 3.5rem rgba(15, 23, 42, 0.12);
}

.summary-panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #334155;
  font-weight: 850;
}

.summary-panel__row strong {
  color: #111827;
  font-size: 2.4rem;
  font-weight: 950;
}

.summary-panel__meter {
  overflow: hidden;
  height: 1rem;
  margin: 1.2rem 0;
  border-radius: 999px;
  background: #e2e8f0;
}

.summary-panel__meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #0ea5e9);
}

.summary-panel__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.portal-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.72fr);
  gap: 2rem;
  align-items: start;
}

.portal-intro h1 {
  max-width: 48rem;
  margin: 0;
  color: #111827;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 950;
  line-height: 0.96;
}

.portal-app-list {
  display: grid;
  gap: 1rem;
}

.portal-app-card {
  display: grid;
  gap: 0.55rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.5rem;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  text-decoration: none;
  box-shadow: 0 1.2rem 3rem rgba(15, 23, 42, 0.1);
}

.portal-app-card:hover,
.portal-app-card:focus {
  border-color: rgba(4, 120, 87, 0.38);
  color: #111827;
}

.portal-app-card span {
  color: #047857;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-app-card strong {
  font-size: 1.35rem;
  line-height: 1.2;
}

.portal-app-card--muted {
  color: #64748b;
}

.account-nav {
  align-items: center;
}

.account-nav-identity {
  max-width: 18rem;
}

.account-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.account-nav-link svg {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  stroke: #047857;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.account-nav-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-nav-button {
  border: 0;
  background: transparent;
}

@media (max-width: 575px) {
  .navbar-collapse {
    padding-top: 0.75rem;
  }

  .navbar-nav,
  .account-nav {
    align-items: center;
    text-align: center;
  }

  .account-nav {
    gap: 0.35rem;
    padding-top: 0.5rem;
  }

  .account-nav-identity {
    max-width: min(100%, 20rem);
  }

  .account-nav-link {
    justify-content: center;
  }

  .portal-shell {
    grid-template-columns: 1fr;
  }
}

.account-shell {
  display: grid;
  place-items: start center;
  padding: 1rem 0 3rem;
}

.account-card {
  width: min(100%, 34rem);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.5rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1.4rem 3.5rem rgba(15, 23, 42, 0.12);
}

.account-kicker {
  margin: 0 0 0.5rem;
  color: #047857;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-card h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  font-weight: 950;
  line-height: 1;
}

.account-copy,
.account-alt {
  margin: 1rem 0 0;
  color: #64748b;
  line-height: 1.65;
}

.account-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field label,
.form-check-label {
  color: #334155;
  font-weight: 800;
}

.account-submit {
  justify-content: center;
  width: 100%;
  border: 0;
}

.account-summary {
  display: grid;
  gap: 0.75rem;
  margin: 1.4rem 0 0;
}

.account-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 0.5rem;
  padding: 0.9rem 1rem;
  background: #f1f5f9;
}

.account-summary dt {
  color: #64748b;
  font-weight: 850;
}

.account-summary dd {
  margin: 0;
  color: #111827;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.account-actions form {
  margin: 0;
}

.account-inline-button {
  border: 1px solid rgba(4, 120, 87, 0.22);
}

.account-status {
  margin-top: 1rem;
  border: 1px solid rgba(4, 120, 87, 0.2);
  border-radius: 0.5rem;
  padding: 0.8rem 1rem;
  background: rgba(220, 252, 231, 0.8);
  color: #14532d;
  font-weight: 850;
}

.spending-pot-card {
  width: min(100%, 42rem);
}

.empty-state {
  display: grid;
  gap: 0.25rem;
  margin-top: 1.4rem;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #f1f5f9;
}

.empty-state strong {
  color: #111827;
  font-weight: 950;
}

.empty-state span {
  color: #64748b;
  font-weight: 750;
}

.mfa-qr-panel {
  display: grid;
  place-items: center;
  margin-top: 1.4rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  background: #ffffff;
}

.mfa-qr-panel img {
  width: min(100%, 14rem);
  height: auto;
}

.mfa-key-summary dd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.08em;
}

.recovery-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.4rem 0;
}

.recovery-code-grid code {
  border-radius: 0.5rem;
  padding: 0.8rem;
  background: #f1f5f9;
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 575px) {
  .account-summary div {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-summary dd {
    text-align: left;
  }

  .recovery-code-grid {
    grid-template-columns: 1fr;
  }
}

.summary-panel__grid div {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.85rem;
  background: #f8fafc;
}

.summary-panel__grid span,
.summary-panel__grid strong {
  display: block;
}

.summary-panel__grid span {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 800;
}

.summary-panel__grid strong {
  margin-top: 0.15rem;
  color: #111827;
  font-size: 1.3rem;
  font-weight: 950;
}

.app-page-shell {
  display: grid;
  gap: 1.5rem;
}

.app-page-heading {
  max-width: 54rem;
}

@media (max-width: 768px) {
  .site-main {
    padding-top: 2.5rem;
  }

  .home-shell {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
}
