:root {
  font-size: 100%;
  -webkit-text-size-adjust: auto;
  text-size-adjust: auto;
}

html[data-font-size="small"] { font-size: 87.5%; }
html[data-font-size="system"] { font-size: 100%; }
html[data-font-size="large"] { font-size: 112.5%; }
html[data-font-size="xlarge"] { font-size: 125%; }

body {
  font-size: 1rem;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
  line-height: 1.45;
}

button,
[role="button"],
a {
  overflow-wrap: anywhere;
}

button,
input,
select,
textarea {
  min-height: 2.75rem;
}

p,
li,
label,
figcaption {
  line-height: 1.6;
}

small,
.text-xs {
  font-size: 0.875rem !important;
  line-height: 1.5;
}

.clamp-2-lines {
  height: auto !important;
  min-height: 2.8em;
}

.imart-drawer-panel {
  max-width: 100%;
  overflow-y: scroll !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-y pinch-zoom !important;
  transform: translateZ(0) !important;
  will-change: scroll-position !important;
  contain: content !important;
  scroll-behavior: auto !important;
}

.imart-font-settings {
  margin: 0 0 1rem;
  padding: 0.75rem 0.875rem;
  color: #1e3a5f;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 1rem;
  transition: all 0.2s ease-in-out;
}

.imart-font-settings-heading {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.imart-font-settings-heading > span {
  display: grid;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  color: #ffffff;
  background: #2563eb;
  border-radius: 0.625rem;
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap !important;
}

.imart-font-settings-heading strong,
.imart-font-settings-heading small {
  display: block;
}

.imart-font-settings-heading strong {
  font-size: 0.95rem;
  white-space: nowrap !important;
}

.imart-font-settings-heading small {
  margin-top: 0.125rem;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.45;
}

.imart-font-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.375rem;
}

.imart-font-options button {
  min-width: 0;
  min-height: 3rem;
  padding: 0.5rem 0.35rem;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
}

.imart-font-options button[aria-pressed="true"] {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #bfdbfe;
}

.income-career-nav button {
  white-space: normal;
}

.app-search-input {
  min-width: 0;
}

.app-search-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .imart-font-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
  }
}

/* Banking-grade Terms of Service Modal */
.imart-terms-modal-card {
  max-width: 460px;
  width: 100%;
  animation: termsFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes termsFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.terms-scroll-body {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.terms-scroll-body::-webkit-scrollbar {
  width: 5px;
}
.terms-scroll-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
