/* --- Global Reset & Variables --- */
:root {
  --brand-primary: #291f75;
  --brand-accent: #d92157;
  --brand-gradient: linear-gradient(135deg, #d92157 0%, #291f75 100%);
  --uaa-ink: #0d0d1a;
  --uaa-ink-2: #3d3d55;
  --uaa-ink-3: #66668a;
  --uaa-line-soft: rgba(13, 13, 26, 0.09);
  --surface-2: #f6f7fb;
  --white: #fff;
  --fs-sm: 13px;
  --fs-xs: 11px;
  --fs-lg: 16px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
  max-width: 100%;
}

/* Form controls don't inherit the page font by default */
button,
input,
select,
textarea {
  font-family: inherit;
}

body {
  font-family: "Lato", system-ui, sans-serif;
  background: var(--surface-2);
  color: var(--uaa-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Animations --- */
.ani {
  opacity: 0;
  animation: svcFadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.d1 {
  animation-delay: 0.04s;
}
.d2 {
  animation-delay: 0.1s;
}
.d3 {
  animation-delay: 0.18s;
}
.d4 {
  animation-delay: 0.26s;
}

@keyframes svcFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Header & Shell Layout --- */
.page-layout-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .uaa-chip-bar-desktop {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 18px 52px 12px;
  }

  .uaa-chip-bar-desktop .policy-carousel-wrap {
    display: flex;
    justify-content: center;
    width: auto;
  }

  .uaa-chip-bar-desktop .policy-carousel-track-outer {
    overflow: hidden;
    width: auto;
  }

  .uaa-chip-bar-desktop .policy-carousel-track {
    justify-content: center;
    width: auto;
  }

  .page-footer {
    margin-top: auto;
  }

  .hamburger-btn,
  .main-header .user-dropdown-wrap {
    display: none !important;
  }

  .main-header {
    gap: 8px;
  }
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 36px;
  border-top: 1px solid var(--uaa-line-soft);
  background: var(--white);
}

.footer-copy {
  color: var(--uaa-ink-3);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--uaa-ink-3);
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.mobile-footer-links {
  display: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-lockup__logo {
  width: auto;
  height: 24px;
  object-fit: contain;
}

.brand-lockup__text {
  display: flex;
  flex-direction: column;
}

.brand-lockup__label {
  background: var(--brand-gradient);
  background-clip: text;
  color: transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sj-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 13, 26, 0.58);
}

.sj-modal-overlay.sj-open {
  display: flex;
}

.sj-modal {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(13, 13, 26, 0.28);
  text-align: center;
}

.sj-modal .mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  background: #e7f6ef;
  color: #168a5b;
  font-size: 22px;
}

.sj-msg {
  margin-bottom: 20px;
  color: var(--uaa-ink-2);
  font-size: 15px;
  line-height: 1.55;
}

.uaa-chip-bar-desktop .policy-pill {
  display: flex;
  min-width: 0;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 20px;
  border: 1.5px solid rgba(13, 13, 26, 0.09);
  border-radius: 50px;
  background: var(--white);
  color: var(--uaa-ink-3);
  box-shadow: 0 2px 8px rgba(13, 13, 26, 0.06);
  text-align: center;
  white-space: nowrap;
}

.uaa-chip-bar-desktop {
  width: 100%;
  padding: 15px 0px;
}

.policy-carousel-wrap,
.policy-carousel-track-outer,
.policy-carousel-track {
  width: 100%;
}

.policy-carousel-track {
  display: flex;
  width: max-content;
  gap: 10px;
}

.uaa-chip-bar-desktop .policy-pill.active {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
}

.uaa-chip-bar-desktop .pp-name {
  color: var(--uaa-ink-3);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.uaa-chip-bar-desktop .pp-meta {
  color: var(--uaa-ink-3);
  font-family: "Lato", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.uaa-chip-bar-desktop .policy-pill.active .pp-name,
.uaa-chip-bar-desktop .policy-pill.active .pp-meta {
  color: #fff;
}

/* --- Policy Details Card (New Design) --- */
.cis-page .page-body {
  padding: 28px 0 40px;
}

.cis-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.policy-details-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(41, 31, 117, 0.1);
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(24, 29, 56, 0.08);
  overflow: hidden;
}

/* Card Header */
.policy-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--uaa-line-soft);
  background: linear-gradient(110deg, #fff 0%, #fbfaff 100%);
}

.ph-text {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ph-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 17px;
}

.ph-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--uaa-ink);
  letter-spacing: -0.025em;
}

.ph-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--uaa-ink-3);
}

.ph-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 7px 12px;
  border: 1px solid rgba(19, 115, 51, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.ph-status.active {
  background: #eef8f1;
  color: #137333;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #137333;
}

/* Card Grid Data */
.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 24px;
}

.pg-item:first-child,
.pg-item:last-child {
  grid-column: 1 / -1;
}

@media (min-width: 1024px) {
  .policy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pg-item:first-child {
    grid-column: 1 / -1;
  }

  .pg-item:last-child {
    grid-column: auto;
  }
}

.pg-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e9eaf2;
  border-radius: 11px;
  background: #fbfcff;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.pg-item:hover {
  border-color: rgba(41, 31, 117, 0.22);
  background: #f8f8fd;
}

.pg-label {
  display: block;
  margin-bottom: 6px;
  color: var(--uaa-ink-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.pg-value {
  display: block;
  color: var(--uaa-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
}

.policy-selector-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  border-top: 1px solid var(--uaa-line-soft);
  background: #fbfbfe;
}

.policy-selector-row--with-hint {
  flex-direction: column;
  gap: 8px;
}

.policy-year-hint {
  display: flex;
  /* width: min(100%, 340px); */
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: black;
  font-size: 13px;
  line-height: 1.45;
}

.policy-year-field {
  display: flex;
  width: min(100%, 340px);
  flex: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.policy-year-field .control {
  display: block;
  width: 100%;
  min-height: 46px;
  border-color: #dfe2eb;
  border-radius: 9px;
  background-color: #fff;
  color: var(--uaa-ink);
  font-size: 13px;
}

/* Card Footer Actions */
.policy-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 18px 24px;
  border-top: 1px solid var(--uaa-line-soft);
  background: #fafbfe;
}

.pf-note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  color: var(--uaa-ink-3);
  font-size: 12px;
  line-height: 1.5;
}

.pf-note i {
  flex: none;
  color: var(--brand-primary);
  font-size: 16px;
}

.pf-actions {
  display: flex;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.policy-footer .btn {
  min-height: 42px;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 13px;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.policy-footer .btn-primary {
  box-shadow: 0 5px 12px rgba(41, 31, 117, 0.18);
}

.policy-footer .btn-primary:hover {
  background: #1a114d;
  box-shadow: 0 7px 16px rgba(41, 31, 117, 0.23);
  transform: translateY(-1px);
}

.policy-footer .btn-outline {
  border-color: #dfe2eb;
  color: var(--uaa-ink-2);
}

.policy-footer .btn-outline:hover {
  border-color: rgba(41, 31, 117, 0.35);
  background: #f6f5fc;
  color: var(--brand-primary);
}

.policy-footer .btn:focus-visible {
  outline: 3px solid rgba(41, 31, 117, 0.28);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pg-item,
  .policy-footer .btn {
    transition: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  border: 1px solid var(--brand-primary);
}

.btn-primary:hover {
  background: #1a114d;
}

.btn-outline {
  background: #fff;
  color: var(--uaa-ink);
  border: 1px solid #cbd5e1;
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* --- Desktop Specific Overrides --- */
@media (min-width: 1024px) {
  .uaa-chip-bar-mobile {
    display: none !important;
  }

  body {
    font-family: "Lato", system-ui, sans-serif;
    background: #fff;
  }

  .mobile-hero-header,
  .mob-page-topbar,
  .bottom-nav {
    display: none !important;
  }

  .main-header {
    position: sticky;
    top: 0;
    z-index: 300;
    display: flex;
    width: 100%;
    height: 62px;
    flex-shrink: 0;
    align-items: center;
    gap: 0;
    padding: 0 36px;
    border-bottom: 1px solid var(--uaa-line-soft);
    background: var(--white);
    box-shadow: 0 1px 4px rgba(13, 13, 26, 0.07);
  }

  .hamburger-btn {
    display: flex;
    width: 34px;
    height: 30px;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-right: 12px;
    border: 1px solid var(--uaa-line-soft);
    border-radius: 10px;
    background: #f7f6f2;
    cursor: pointer;
    transition: background 0.2s;
  }

  .hamburger-btn:hover {
    background: #eeecea;
  }

  .hamburger-btn span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--uaa-ink-2);
    transition: all 0.3s;
  }

  .logo-wrap,
  .brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .logo-wrap {
    flex-shrink: 0;
    text-decoration: none;
  }
  .brand-lockup {
    min-width: 0;
  }
  .brand-lockup__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
  }
  .brand-lockup__label {
    background: var(--brand-gradient);
    background-clip: text;
    color: transparent;
    font-size: 16px;
    font-weight: 600;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .nav-pills {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 0 24px;
  }

  .nav-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition:
      background 0.2s,
      color 0.2s;
  }

  .nav-pill:hover {
    background: var(--surface-2);
    color: var(--brand-primary);
  }
  .nav-pill.active {
    background: none;
    color: #334155;
    font-weight: 500;
  }
  .desktop-header-icon {
    width: 25px;
    height: 25px;
    object-fit: contain;
  }

  .hdr-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
  }

  .icon-btn {
    position: relative;
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: none;
    color: var(--uaa-ink-2);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
  }

  .icon-btn img {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
  }

  .notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    display: flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--white);
    border-radius: 50px;
    background: var(--brand-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
  }

  .user-pill {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--uaa-line-soft);
    border-radius: 50%;
    background: var(--surface-2);
    cursor: pointer;
    transition: transform 0.15s;
  }

  .user-avatar {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a38d4, #e84472);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .pi-page-topbar {
    width: 100%;
    flex-shrink: 0;
  }
  .pi-page-topbar-inner {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    background: var(--brand-gradient);
  }

  .pi-page-title {
    width: 100%;
    margin: 0;
    color: #fff;
    font-family: "Lato", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-align: center;
  }
}

/* --- Mobile Specific Overrides --- */
@media (max-width: 1023px) {
  .uaa-chip-bar-desktop {
    display: none !important;
  }

  body {
    overflow-x: hidden;
    background: var(--surface-2);
    color: #0f172a;
    font-family: "Lato", system-ui, sans-serif;
  }

  .main-header {
    display: none !important;
  }
  .pi-page-topbar {
    display: none;
  }
  .pi-page-topbar.mob-page-topbar {
    display: block;
  }

  .pi-page-topbar.mob-page-topbar .pi-page-topbar-inner {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    background: var(--brand-gradient);
  }

  .pi-page-topbar.mob-page-topbar .pi-page-title {
    width: 100%;
    margin: 0;
    color: #fff;
    font-family: "Lato", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-align: center;
  }

  .page-layout-container {
    position: relative;
    display: flex;
    /* max-width: 430px; */
    min-height: 100dvh;
    flex-direction: column;
    margin: 0 auto;
    background: var(--surface-2);
  }

  .mobile-hero-header {
    display: block;
    overflow: hidden;
    padding: 14px 18px 0;
    background: #fff;
  }

  .hero-brand-row {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
  }

  .hbr-left {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
  }

  .menu-btn {
    display: flex;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--uaa-line-soft);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--brand-primary);
    font-size: 15px;
    transition: background 0.2s;
  }

  .menu-btn:hover {
    background: #e2e8f0;
  }

  .brand-logo-text {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-decoration: none;
  }

  .brand-logo-text .brand-lockup {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
  }
  .brand-logo-text .brand-lockup__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
  }
  .brand-logo-text .brand-lockup__label {
    background: var(--brand-gradient);
    background-clip: text;
    color: transparent;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hbr-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
  }

  .icon-btn {
    position: relative;
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
  }

  .icon-btn img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
  }

  .notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    display: flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 50px;
    background: var(--brand-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
  }

  .product-chip-bar {
    padding: 12px 12px 6px;
  }
  .product-chip-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .product-chip-scroll {
    display: flex;
    min-width: 0;
    flex: 1;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .product-chip-scroll::-webkit-scrollbar {
    display: none;
  }

  .product-chip {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    padding: 8px 14px;
    border: 1.5px solid rgba(13, 13, 26, 0.09);
    border-radius: 50px;
    background: var(--white);
    color: var(--uaa-ink-3);
    box-shadow: 0 2px 8px rgba(13, 13, 26, 0.06);
    font-family: inherit;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    transition: all 0.2s;
  }

  .product-chip-scroll > .uaa-chip-static:only-child {
    margin-inline: auto;
  }

  .product-chip .pc-name {
    color: var(--uaa-ink-3);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
  }
  .product-chip .pc-uin {
    color: var(--uaa-ink-3);
    font-family: "Lato", system-ui, sans-serif;
    font-size: 12px;
    letter-spacing: 0.3px;
  }
  .product-chip.active {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
  }
  .product-chip.active .pc-name,
  .product-chip.active .pc-uin {
    color: #fff;
  }

  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 100;
    display: flex;
    width: 100%;
    min-height: 68px;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px env(safe-area-inset-bottom);
    transform: translateX(-50%);
    border-top: 1px solid var(--uaa-line-soft);
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.07);
  }

  .bn-item {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 0;
    color: var(--brand-primary);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
  }

  .bn-icon-wrap {
    display: flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
  }
  .bn-icon-wrap img {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
  }

  .page-footer {
    display: none !important;
  }

  .mobile-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 10px;
  }

  .mobile-footer-links a {
    color: var(--brand-primary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
  }
  .pi-privacy-sep {
    color: #5b6b82;
    font-size: 12px;
    font-weight: 400;
  }

  /* --- Mobile Card Adjustments --- */
  .cis-inner {
    padding: 0 16px;
  }

  .policy-header {
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
  }
  .ph-title {
    font-size: 18px;
  }

  .policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pg-item {
    padding: 16px;
  }

  .policy-footer {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
  }

  .policy-selector-row {
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
  }

  .policy-year-hint {
    width: min(100%, 340px);
    text-align: left;
  }

  .policy-year-field {
    width: 100%;
  }

  .pf-actions {
    width: 100%;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .policy-footer .btn {
    width: auto;
    flex: 1 1 150px;
    max-width: 220px;
  }
}

@media (max-width: 600px) {
  .policy-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding: 16px;
  }

  .policy-header {
    padding: 14px 16px;
  }

  .ph-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 15px;
  }

  .policy-footer {
    padding: 16px;
  }

  .policy-selector-row {
    padding: 14px 16px;
  }

  .policy-footer .pf-actions .btn:last-child {
    width: 100%;
    max-width: none;
    flex-basis: 100%;
  }

  .pg-item:first-child,
  .pg-item:last-child {
    grid-column: auto;
  }
}

/* ==== Document layout (COI, CIS): member panel + details + actions ==== */
.doc-page .cis-inner {
  max-width: 1000px;
}

.doc-card {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  overflow: hidden;
  border: 1px solid rgba(41, 31, 117, 0.1);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(13, 13, 26, 0.08);
  font-family: "Lato", system-ui, sans-serif;
}

.doc-holder {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 36px;
  background: var(--brand-gradient);
  color: #fff;
}

.doc-holder__icon {
  display: grid;
  width: 56px;
  height: 56px;
  flex: none;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--brand-accent);
  font-size: 24px;
}

.doc-holder__text {
  min-width: 0;
}

.doc-holder__label {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  opacity: 0.85;
}

.doc-holder__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.doc-holder__name {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.doc-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 36px;
}

.doc-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.doc-field--wide {
  grid-column: 1 / -1;
}

.doc-field {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(41, 31, 117, 0.07);
  border-radius: 10px;
  background: #f8f8fc;
}

.doc-field dt {
  color: var(--uaa-ink-3);
  font-size: 12px;
  font-weight: 600;
}

.doc-field dd {
  margin: 4px 0 0;
  color: var(--uaa-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.doc-actions {
  display: flex;
  gap: 10px;
}

.doc-btn {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0px 16px;
  border: 1.5px solid #d5d2e6;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.doc-btn--primary {
  flex-grow: 1.6;
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: #fff;
}

.doc-btn--primary:hover {
  border-color: #1a114d;
  background: #1a114d;
}

.doc-btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

@media (min-width: 1024px) {
  .doc-page {
    background: var(--surface-2);
  }

  .doc-page .page-body {
    padding: 20px 0 48px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .doc-holder {
    padding: 32px 28px;
  }

  .doc-holder__name {
    font-size: 23px;
  }

  .doc-holder__label {
    margin-top: 16px;
  }

  .doc-main {
    padding: 32px 28px;
  }
}

/* Small screens: the member panel becomes a short strip above the details */
@media (max-width: 767px) {
  .doc-page .page-body {
    padding: 8px 0 24px;
  }

  .doc-card {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 16px;
  }

  .doc-holder {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
    padding: 16px;
  }

  .doc-holder__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 19px;
  }

  .doc-holder__name {
    margin-top: 3px;
    font-size: 18px;
  }

  .doc-holder__title {
    font-size: 17px;
  }

  .doc-holder__label {
    margin-top: 8px;
    font-size: 12px;
  }

  .doc-main {
    gap: 20px;
    padding: 20px 16px 16px;
  }

  .doc-details {
    gap: 16px;
  }

  .doc-field {
    padding: 10px 11px;
  }

  .doc-actions {
    flex-wrap: wrap;
  }

  .doc-btn--primary {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doc-btn {
    transition: none;
  }
}

/* Actions of equal weight: every button in the row looks the same */
.doc-actions--equal .doc-btn {
  min-width: 0;
  min-height: 45px;
  border-color: var(--brand-primary);
}

.doc-actions--equal .doc-btn i {
  font-size: 15px;
}

@media (max-width: 479px) {
  .doc-actions--equal {
    flex-direction: column;
  }

  .doc-actions--equal .doc-btn {
    flex: none;
    width: 100%;
  }
}

/* ==== Mail sent confirmation ==== */
.sj-modal--sent {
  padding: 32px 28px 28px;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(13, 13, 26, 0.28);
  font-family: "Lato", system-ui, sans-serif;
}

.sj-sent__title {
  color: var(--uaa-ink);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.sj-modal--sent .sj-msg {
  margin: 8px 0 20px;
  font-size: 16px;
}

.sj-modal--sent .sj-msg strong {
  display: block;
  color: var(--uaa-ink);
  overflow-wrap: anywhere;
}

.sj-sent__file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e4e8f0;
  border-radius: 10px;
  text-align: left;
}

.sj-sent__file i {
  flex: none;
  color: var(--brand-accent);
  font-size: 24px;
}

.sj-sent__file span {
  min-width: 0;
  color: var(--uaa-ink-3);
  font-size: 13px;
  line-height: 1.4;
}

.sj-sent__file b {
  display: block;
  color: var(--uaa-ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.sj-sent__note {
  margin: 16px 0 20px;
  color: var(--uaa-ink-2);
  font-size: 14px;
  line-height: 1.5;
}

.sj-modal--sent .btn {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
}

.sj-modal--sent .btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* ==== CIS page: the document, its actions and where to go next ==== */
.cis-doc,
.cis-more {
  font-family: "Lato", system-ui, sans-serif;
}

.cis-doc {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-areas:
    "cover head"
    "cover facts"
    "cover actions";
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(13, 13, 26, 0.08);
}

.cis-doc__cover {
  display: grid;
  grid-area: cover;
  padding: 28px;
  place-items: center;
  background: #e9ebf3;
}

.cis-doc__page {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-primary);
  font: inherit;
  cursor: pointer;
}

.cis-doc__paper {
  --cover-w: 220px;
  display: block;
  width: var(--cover-w);
  height: calc(var(--cover-w) * 1.414);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(13, 13, 26, 0.16);
  transition: box-shadow 0.18s ease;
}

.cis-doc__page:hover .cis-doc__paper {
  box-shadow: 0 6px 24px rgba(13, 13, 26, 0.24);
}

.cis-doc__paper .dp-paper {
  transform: scale(0.3056);
  transform-origin: 0 0;
  pointer-events: none;
}

/* The miniature keeps the A4 layout even where the viewer reflows. */
.cis-doc__paper.dp-sheet .dp-paper .dp-page-body {
  padding: 40px 56px 0;
}

.cis-doc__paper.dp-sheet .dp-paper .dp-field,
.cis-doc__paper.dp-sheet .dp-paper .dp-field.span-2 {
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
}

.cis-doc__paper.dp-sheet .dp-paper--first .dp-letterhead {
  gap: 36px;
}

.cis-doc__read {
  display: block;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 700;
}

.cis-doc__page:hover .cis-doc__read {
  text-decoration: underline;
}

.cis-doc__page:focus-visible,
.cis-jump button:focus-visible,
.cis-more__phone:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--brand-primary);
  outline-offset: 4px;
}

.cis-doc__head {
  grid-area: head;
  padding: 32px 36px 0;
}

.cis-doc__status {
  margin-bottom: 8px;
  color: #146b3e;
  font-size: 14px;
  font-weight: 700;
}

.cis-doc__title {
  color: var(--uaa-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.cis-doc__name {
  margin-top: 8px;
  color: var(--uaa-ink-2);
  font-size: 20px;
  line-height: 1.4;
}

.cis-doc__facts {
  grid-area: facts;
  align-self: center;
  padding: 16px 36px;
}

.cis-doc__facts div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  font-size: 15px;
  line-height: 1.5;
}

.cis-doc__facts div + div {
  border-top: 1px solid #e4e8f0;
}

.cis-doc__facts dt {
  color: black;
}

.cis-doc__facts dd {
  color: #66668a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.cis-doc__actions {
  grid-area: actions;
  align-items: center;
  padding: 0 36px 32px;
}

.cis-doc__actions .doc-btn {
  padding-right: 10px;
  padding-left: 10px;
  font-size: 15px;
}

.cis-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  padding: 32px 4px 0;
}

.cis-more__title {
  color: var(--uaa-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.cis-jump {
  margin-top: 6px;
  list-style: none;
}

.cis-jump li + li {
  border-top: 1px solid #dfe2ec;
}

.cis-jump button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  background: none;
  color: var(--brand-primary);
  font: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.cis-jump button:hover {
  text-decoration: underline;
}

.cis-jump span {
  flex: none;
  color: var(--uaa-ink-2);
  font-size: 14px;
}

.cis-more__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cis-more__side p {
  margin-top: 4px;
  color: var(--uaa-ink-2);
  font-size: 15px;
  line-height: 1.5;
}

.cis-more__phone {
  display: inline-block;
  padding: 10px 0 4px;
  color: var(--brand-primary);
  font-size: 18px;
  font-weight: 700;
}

.cis-more__phone:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .cis-doc__paper {
    transition: none;
  }
}

/* Card preview of a real PDF */
.cis-doc__paper canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.cis-doc__fallback {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--brand-primary);
  font-size: 40px;
}

/* Financial year row, between the details and the buttons */
.cis-doc--year {
  grid-template-areas:
    "cover head"
    "cover facts"
    "cover year"
    "cover actions";
}

.cis-doc__year {
  display: grid;
  grid-area: year;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 36px 24px;
}

.cis-doc__year label {
  color: black;
  font-size: 15px;
}

.cis-doc__year .policy-year-field .control {
  min-height: 44px;
  font-family: inherit;
  font-size: 15px;
}

/* Optional helper line in a page's markup: not shown in this layout */
.doc-btn__hint {
  display: none;
}

/* ==== Document page below desktop ====
   One details card, the year (where there is one), then the actions:
   View and Email on a row, Download below. doc-page.js sets --doc-nav-h. */
@media (max-width: 1023.98px) {
  .doc-page .page-layout-container {
    max-width: none; /* renewalRcpt.html has an older inline cap */
  }

  /* The brand header stays in view while the page scrolls */
  .doc-page .mobile-hero-header {
    position: sticky;
    top: 0;
    z-index: 90;
  }

  .doc-page .product-chip-bar {
    border-bottom: 0;
    background: none;
  }

  .doc-page .page-body {
    padding: 8px 0 0;
  }

  .doc-page .cis-inner {
    max-width: 672px;
    padding: 0 16px;
  }

  .cis-doc {
    display: flex;
    flex-direction: column;
    overflow: visible;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .cis-doc__cover {
    display: none;
  }

  /* Head and facts form one card, so they share a border, not a shadow */
  .cis-doc__head,
  .cis-doc__facts,
  .cis-doc__year {
    border: 1px solid #e4e8f0;
    background: #fff;
  }

  .cis-doc__head {
    padding: 16px 16px 12px;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
  }

  .cis-doc__title {
    color: black;
    font-size: 14px;
    font-weight: 400;
  }

  .cis-doc__name {
    margin-top: 2px;
    color: #66668a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .cis-doc__facts {
    align-self: auto;
    padding: 0 16px 4px;
    border-top: 0;
    border-radius: 0 0 14px 14px;
  }

  .cis-doc__facts div {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid #e4e8f0;
  }

  .cis-doc__facts dt,
  .cis-doc__year label {
    color: black;
  }

  .cis-doc__facts dd {
    color: #66668a;
    text-align: right;
  }

  .cis-doc__year {
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 14px;
  }

  .doc-page .cis-doc__year .policy-year-field {
    width: 100%;
  }

  /* 16px keeps iOS from zooming the page when the select is tapped */
  .cis-doc__year .policy-year-field .control {
    font-size: 16px;
  }

  .doc-actions--equal.cis-doc__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "view email"
      "download download";
    gap: 12px;
    margin-top: 16px;
    padding: 0;
  }

  .cis-doc__actions #viewBtn {
    grid-area: view;
  }

  .cis-doc__actions #mailBtn {
    grid-area: email;
  }

  .cis-doc__actions #downloadBtn {
    grid-area: download;
  }

  /* All three the same: icon beside the label, centred */
  .doc-actions--equal.cis-doc__actions .doc-btn {
    width: 100%;
    min-height: 52px;
    flex-direction: row;
    gap: 10px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 16px;
  }

  .doc-actions--equal.cis-doc__actions .doc-btn > i {
    font-size: 17px;
  }

  .doc-actions--equal.cis-doc__actions .doc-btn:active {
    background: #1a114d;
  }

  .page-body:has(.cis-doc) + .mobile-footer-links {
    margin-bottom: calc(var(--doc-nav-h, 68px) + 4px);
    padding-top: 14px;
  }
}

/* "Master Policy Number" and its value on one line down to 360px */
@media (max-width: 389.98px) {
  .cis-doc__facts div {
    gap: 8px;
    font-size: 14px;
  }
}

/* Tablet: the same column with more air */
@media (min-width: 720px) and (max-width: 1023.98px) {
  .doc-page .page-body {
    padding-top: 16px;
  }

  .cis-doc__head {
    padding: 24px 24px 16px;
  }

  .cis-doc__title {
    font-size: 16px;
  }

  .cis-doc__name {
    font-size: 22px;
  }

  .cis-doc__facts {
    padding: 0 24px 8px;
  }

  .cis-doc__facts div {
    padding: 15px 0;
    font-size: 17px;
  }

  .cis-doc__year {
    margin-top: 16px;
    padding: 14px 24px;
  }

  .cis-doc__year label {
    font-size: 17px;
  }

  .doc-actions--equal.cis-doc__actions {
    gap: 16px;
    margin-top: 20px;
  }

  .doc-actions--equal.cis-doc__actions .doc-btn {
    min-height: 56px;
    font-size: 17px;
  }
}

/* Short phone screens (Safari with its bars showing): tighter, so the
   actions stay above the bottom nav */
@media (max-width: 559.98px) and (max-height: 700px) {
  .doc-page .page-body {
    padding-top: 2px;
  }

  .cis-doc__head {
    padding: 11px 16px 8px;
  }

  .cis-doc__facts div {
    padding: 7px 0;
  }

  .cis-doc__year {
    margin-top: 8px;
    padding: 5px 16px;
  }

  .doc-actions--equal.cis-doc__actions {
    gap: 8px;
    margin-top: 10px;
  }

  .doc-actions--equal.cis-doc__actions .doc-btn {
    min-height: 48px;
  }
}
