/* Autopilot News subscription and contextual Léa entry point. */
.apng-brand,
.apng-dialog,
.apng-lea-card { box-sizing: border-box; }
.apng-brand *,
.apng-dialog *,
.apng-lea-card * { box-sizing: border-box; }

body.apng-has-subscribe #autopilot-header .apng-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  min-width: 0;
}
body.apng-has-subscribe #autopilot-header .apng-subscribe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 34px;
  margin: 0;
  border: 1px solid #A4D9FF;
  border-radius: 30px;
  padding: 6px 12px;
  background: #A4D9FF;
  box-shadow: none;
  color: #0B2032;
  font: 730 11.5px/1.35 Inter, system-ui, sans-serif;
  letter-spacing: -.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
body.apng-has-subscribe #autopilot-header .apng-subscribe:hover { background: #C5EAFF; border-color: #C5EAFF; }
body.apng-has-subscribe #autopilot-header .apng-subscribe:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.apng-icon { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; align-items: center; justify-content: center; }
.apng-icon svg { width: 100%; height: 100%; display: block; }
body.apng-has-subscribe #autopilot-header .apng-subscribe .apng-icon { width: 15px; height: 15px; flex-basis: 15px; }
.apng-subscribe-short { display: none; }

/* Keep the approved wordmark dimensions; the compact button sits below it when space is limited. */
@layer autopilot-public-brand {
  body.apng-has-subscribe #autopilot-header .apng-brand .aw-brand { flex: 0 0 auto !important; }
  @media (max-width: 600px) {
    body.apng-has-subscribe #autopilot-header .apng-brand .aw-brand { width: 100% !important; }
  }
}
@media (min-width: 1020px) and (max-width: 1449px), (min-width: 601px) and (max-width: 900px) {
  body.apng-has-subscribe #autopilot-header .apng-brand { flex-direction: column; align-items: flex-start; gap: 2px; }
  body.apng-has-subscribe #autopilot-header.aw-v2 .aw-inner { height: 76px; }
  body.apng-has-subscribe #autopilot-header .apng-subscribe { min-height: 28px; padding: 3px 10px; font-size: 11px; }
}
@media (max-width: 600px) {
  body.apng-has-subscribe #autopilot-header .apng-brand {
    flex: 0 1 clamp(113px, 34vw, 163px);
    flex-direction: column;
    align-items: flex-start;
    width: clamp(113px, 34vw, 163px);
    gap: 2px;
  }
  body.apng-has-subscribe #autopilot-header .apng-subscribe { min-height: 27px; padding: 3px 9px; font-size: 10.5px; }
  .apng-subscribe-label { display: none; }
  .apng-subscribe-short { display: inline; }
}

body.apng-dialog-open { overflow: hidden; }
dialog.apng-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  margin: auto;
  padding: 32px;
  border: 1px solid #42617A;
  border-radius: 22px;
  background: linear-gradient(145deg, #13273D 0%, #0B1020 74%);
  color: #EEF6FD;
  box-shadow: 0 24px 90px #02071180;
  font: 400 15px/1.5 Inter, system-ui, sans-serif;
  color-scheme: dark;
  text-align: left;
}
dialog.apng-dialog:not([open]) { display: none !important; }
dialog.apng-dialog::backdrop { background: #04101EC4; backdrop-filter: blur(5px); }
dialog.apng-dialog.apng-dialog-fallback { box-shadow: 0 0 0 100vmax #04101EC4, 0 24px 90px #02071180; }
.apng-dialog [hidden] { display: none !important; }
.apng-dialog .apng-dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #D7ECFC;
  font: 400 29px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.apng-dialog .apng-dialog-close:hover { background: #A4D9FF17; color: #FFFFFF; }
.apng-dialog .apng-eyebrow { margin: 0 34px 12px 0; color: #A4D9FF; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.apng-dialog .apng-dialog-title { margin: 0 20px 12px 0; color: #FFFFFF; font: 760 28px/1.16 Inter, system-ui, sans-serif; letter-spacing: -.035em; text-wrap: balance; }
.apng-dialog .apng-dialog-intro { margin: 0 0 22px; color: #BECEE0; font-size: 14px; line-height: 1.65; }
.apng-dialog .apng-fields { display: grid; gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0; }
.apng-dialog .apng-field-label { display: block; margin: 5px 0 0; color: #E8F4FD; font-size: 13px; font-weight: 650; }
.apng-dialog .apng-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  margin: 0 0 5px;
  border: 1px solid #7796AE;
  border-radius: 10px;
  padding: 10px 12px;
  background: #F7FBFF;
  color: #102A45;
  box-shadow: none;
  font: 500 16px/1.4 Inter, system-ui, sans-serif;
  color-scheme: light;
}
.apng-dialog select.apng-input { appearance: auto; }
.apng-dialog .apng-input::placeholder { color: #657E93; opacity: 1; }
.apng-dialog .apng-consent { display: grid; grid-template-columns: 19px minmax(0, 1fr); align-items: start; gap: 10px; margin: 5px 0; color: #D8E6F3; font-size: 12px; line-height: 1.55; cursor: pointer; }
.apng-dialog .apng-consent input { appearance: auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #A4D9FF; cursor: pointer; }
.apng-dialog .apng-consent input:checked { accent-color: #A4D9FF; }
.apng-dialog .apng-honeypot { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.apng-dialog .apng-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin: 9px 0 0;
  padding: 11px 18px;
  border: 1px solid #A4D9FF;
  border-radius: 25px;
  background: #A4D9FF;
  color: #0B2032;
  font: 740 14px/1.4 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.apng-dialog .apng-submit:hover { background: #C5EAFF; border-color: #C5EAFF; }
.apng-dialog .apng-fields:disabled .apng-submit { opacity: .7; cursor: wait; }
.apng-dialog :is(button,input,select,a):focus-visible { outline: 2px solid #A4D9FF; outline-offset: 3px; }
.apng-dialog .apng-form-status { margin: 12px 0 0; color: #CBE8FC; font-size: 13px; line-height: 1.55; }
.apng-dialog .apng-form-status:empty { display: none; }
.apng-dialog .apng-form-error { color: #FFE2DF; border-left: 2px solid #FFB4AA; padding-left: 10px; }
.apng-dialog .apng-form-note { margin: 13px 0 7px; color: #B5C9DB; font-size: 11px; line-height: 1.55; text-align: center; }
.apng-dialog .apng-privacy { display: block; width: fit-content; margin: 0 auto; color: #C8E9FF; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.apng-dialog .apng-success { text-align: center; padding-top: 10px; outline: none; }
.apng-dialog .apng-success-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 8px auto 16px; border: 1px solid #A4D9FF66; border-radius: 50%; background: #A4D9FF19; color: #A4D9FF; font-size: 24px; }
.apng-dialog .apng-success-message { margin: 0 0 18px; color: #D0E1EF; font-size: 15px; line-height: 1.65; }

body.apn-document .apn-mag[data-feed="no"] .apng-sidebar-stack {
  --apng-sticky-top: 140px;
  position: sticky;
  top: var(--apng-sticky-top);
  display: grid;
  gap: 16px;
  max-height: calc(100dvh - var(--apng-sticky-top) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #63849C transparent;
  padding: 0 1px 2px;
}
body.apn-document .apn-mag[data-feed="no"] .apng-sidebar-stack .toc { position: static; top: auto; margin: 0; }
.apng-lea-mobile-slot { display: none; }
/* A visible, idle handset; the existing call dialog owns the live conversation. */
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0 2px 6px;
  border: 0;
  background: transparent;
  color: #0B1020;
  box-shadow: none;
  font-family: Inter, system-ui, sans-serif;
  text-align: center;
}
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-lea-title {
  width: 100%;
  margin: 0;
  color: #18334F;
  font: 660 14px/1.4 Inter, system-ui, sans-serif;
  letter-spacing: -.015em;
  text-wrap: balance;
}
body.apn-document .apn-mag[data-feed="no"] .apng-lea-phone {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  flex: 0 0 auto;
  width: min(210px, 100%);
  min-height: 302px;
  padding: 30px 14px 14px;
  overflow: hidden;
  border: 4px solid transparent;
  border-radius: 30px;
  background: linear-gradient(#FFFFFF, #FFFFFF) padding-box, linear-gradient(135deg, #71869D 0%, #F8FCFF 17%, #92A9BF 38%, #D9E5EF 60%, #839CB3 81%, #F2F9FF 100%) border-box;
  color: #0B1020;
  color-scheme: light;
  box-shadow: inset 0 0 0 1px #DCE5ED, 0 9px 22px -12px #16334F55;
}
body.apn-document .apn-mag[data-feed="no"] .apng-lea-phone::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 43px;
  height: 3px;
  border-radius: 4px;
  background: #CDD7E1;
  transform: translateX(-50%);
  pointer-events: none;
}
body.apn-document .apn-mag[data-feed="no"] .apng-lea-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 47px;
  height: 7px;
  border-radius: 10px;
  background: linear-gradient(175deg, #26394F, #091323 70%);
  transform: translateX(-50%);
  pointer-events: none;
}
body.apn-document .apn-mag[data-feed="no"] .apng-lea-portrait-wrap {
  width: 90px;
  height: 90px;
  flex: 0 0 auto;
  margin: 0;
  border: 2px solid #D7ECFA;
  border-radius: 50%;
  background: #F0F7FC;
  box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 4px #A4D9FF99;
}
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-lea-portrait {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: 50% 30%;
  border: 0;
  border-radius: 50%;
}
body.apn-document .apn-mag[data-feed="no"] .apng-lea-identity { display: grid; gap: 3px; margin-top: 8px; }
body.apn-document .apn-mag[data-feed="no"] .apng-lea-identity strong { color: #0B1020; font-size: 25px; font-weight: 750; line-height: 1.1; letter-spacing: -.035em; }
body.apn-document .apn-mag[data-feed="no"] .apng-lea-identity span { color: #566579; font-size: 11.5px; line-height: 1.35; }
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-call {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  flex-direction: column;
  width: auto;
  min-width: 100px;
  min-height: 76px;
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #18334F;
  box-shadow: none;
  font: 680 13px/1.3 Inter, system-ui, sans-serif;
  text-align: center;
  text-transform: none;
  text-decoration: none;
  letter-spacing: normal;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-call .apng-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  padding: 16px;
  border: 1px solid #167B44;
  border-radius: 50%;
  background: linear-gradient(145deg, #25A65C, #168044 80%);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 #FFFFFF40, 0 4px 11px -5px #16804480;
}
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-call .apng-icon svg { width: 22px; height: 22px; flex: 0 0 22px; }
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-call-label { color: inherit; font: inherit; }
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-call:hover { background: transparent; color: #0B1020; text-decoration: none; }
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-call:hover .apng-icon { background: #167B44; box-shadow: inset 0 1px 0 #FFFFFF40, 0 5px 13px -4px #16804480; }
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-call:focus-visible { outline: 2px solid #1476A3; outline-offset: 4px; }
body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-lea-hint { margin: 7px 0 0; color: #566579; font: 450 9.5px/1.35 Inter, system-ui, sans-serif; text-align: center; }

/* Keep written chat available without covering the sidebar handset or its call action. */
body.apng-has-lea-phone .aia-chat { right: 12px !important; }
body.apng-has-lea-phone .aia-chat .aia-chat-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}
body.apng-has-lea-phone .aia-chat .aia-chat-toggle > img,
body.apng-has-lea-phone .aia-chat .aia-chat-toggle .aia-lea-label { display: none !important; }
body.apng-has-lea-phone .aia-chat .aia-chat-toggle .aia-lea-symbol { display: grid !important; margin: 0 !important; }

/* Keep the green call action visible below the existing TOC on shorter desktop screens. */
@media (min-width: 901px) and (max-height: 800px) {
  body.apn-document .apn-mag[data-feed="no"] .apng-sidebar-stack { gap: 12px; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-card { gap: 8px; padding-bottom: 4px; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-lea-title { font-size: 13px; line-height: 1.35; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-phone { width: min(176px, 100%); min-height: 252px; padding: 26px 11px 11px; border-radius: 27px; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-notch { top: 9px; width: 43px; height: 6px; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-portrait-wrap { width: 64px; height: 64px; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-identity { gap: 1px; margin-top: 7px; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-identity strong { font-size: 22px; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-identity span { font-size: 10.5px; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-call { gap: 4px; margin-top: 6px; min-height: 74px; font-size: 12px; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-card .apng-lea-hint { margin-top: 4px; line-height: 1.3; }
}
@media (max-width: 900px) {
  .apng-lea-mobile-slot { display: block; margin: 25px 0 30px; }
  .apng-lea-mobile-slot:empty { display: none; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-card[data-placement="inline"] { gap: 14px; padding: 0; }
  body.apn-document .apn-mag[data-feed="no"] .apng-lea-card[data-placement="inline"] .apng-lea-title { max-width: 360px; font-size: 16px; }
}
@media (max-width: 520px) {
  dialog.apng-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 27px 22px 24px; border-radius: 18px; }
  .apng-dialog .apng-dialog-title { font-size: 25px; }
  .apng-dialog .apng-dialog-intro { margin-bottom: 16px; font-size: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .apng-subscribe, .apng-submit, .apng-call { transition: background-color .15s ease, border-color .15s ease; }
}
@media print {
  .apng-subscribe, .apng-dialog, .apng-lea-card, .apng-lea-mobile-slot { display: none !important; }
  body.apn-document .apn-mag[data-feed="no"] .apng-sidebar-stack { position: static; max-height: none; overflow: visible; }
}
