/* Ad focus (adfocus.js): the ad grown over a dark backdrop with its action bar. Sizes and colours from the
 * handoff (docs/design_handoff_embed_ad_focus); motion 380 ms, the reader's own controls fade in 230 ms. */
.nv-af {
  position: fixed; inset: 0; z-index: 2000; pointer-events: none;
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif; color: #17171a; -webkit-font-smoothing: antialiased;
  --af-ease: cubic-bezier(.2, .7, .2, 1);
}
.nv-af:focus { outline: none; }
.nv-af.is-on { pointer-events: auto; }
.nv-af :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; }
.nv-af :where(a) { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nv-af :focus-visible { outline: 2px solid #0d4a3c; outline-offset: 2px; }
.nv-af svg { flex: none; display: block; }

.nv-af-dim { position: absolute; inset: 0; background: rgba(17, 17, 19, .93); opacity: 0; transition: opacity 380ms var(--af-ease); }
.nv-af.is-compact .nv-af-dim { background: #111113; }
.nv-af.is-on .nv-af-dim { opacity: 1; }

.nv-af-ad {
  position: absolute; overflow: hidden; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 12px 28px rgba(0, 0, 0, .18);
  transition: left 380ms var(--af-ease), top 380ms var(--af-ease), width 380ms var(--af-ease), height 380ms var(--af-ease), opacity 230ms ease;
}
.nv-af-ad img { position: absolute; display: block; max-width: none; user-select: none; -webkit-user-select: none; pointer-events: none; }
.nv-af.is-fade .nv-af-ad { opacity: 0; }

.nv-af-bar {
  position: absolute; background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(24px);
  transition: opacity 380ms var(--af-ease), transform 380ms var(--af-ease), height 380ms var(--af-ease), top 380ms var(--af-ease), left 380ms var(--af-ease), width 380ms var(--af-ease);
}
.nv-af.is-on .nv-af-bar { opacity: 1; transform: none; }
.nv-af.is-compact .nv-af-bar { box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }
.nv-af.is-compact.is-full .nv-af-bar { border-radius: 22px; }

/* Reduced motion: a cross-fade, nothing moves */
.nv-af.is-still .nv-af-ad { opacity: 0; transition: opacity 380ms ease; }
.nv-af.is-still.is-on .nv-af-ad { opacity: 1; }
.nv-af.is-still .nv-af-bar { transform: none; transition: opacity 380ms ease; }
.nv-af.is-instant, .nv-af.is-instant * { transition: none !important; }

.nv-af-row { height: 72px; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 20px; }
.nv-af.is-compact .nv-af-row { height: 76px; gap: 4px; padding: 0 8px 0 14px; }
.nv-af-name { flex: 1; min-width: 120px; min-height: 44px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; text-align: left; }
.nv-af.is-compact .nv-af-name { min-width: 0; }
.nv-af-name b { max-width: 100%; font-size: 16px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-af.is-compact .nv-af-name b { font-size: 15.5px; }
.nv-af-sub { max-width: 100%; font-size: 13px; color: #6b6b72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-af-det-l { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: #0d4a3c; white-space: nowrap; }
.nv-af-det-l svg { transition: transform .25s; }
.nv-af-name[aria-expanded="true"] .nv-af-det-l svg { transform: rotate(180deg); }

.nv-af-pill { flex: none; height: 42px; padding: 0 16px 0 13px; border-radius: 999px; background: #f1efea; color: #17171a; display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.nv-af-pill:hover { background: #e8e5de; }
.nv-af-save { background: #17171a; color: #fff; }
.nv-af-save:hover { background: #2a2a2e; }
.nv-af-save.is-saved, .nv-af-save.is-saved:hover { background: #e6f5ef; color: #0d4a3c; }
.nv-af.is-compact .nv-af-pill, .nv-af.is-icons .nv-af-pill { width: 44px; height: 44px; padding: 0; justify-content: center; }
.nv-af.is-compact .nv-af-pill svg, .nv-af.is-icons .nv-af-pill svg { width: 19px; height: 19px; }
.nv-af.is-compact .nv-af-pill span, .nv-af.is-icons .nv-af-pill span { display: none; }
.nv-af.is-compact.has-det .nv-af-pill[data-af="website"] { display: none; }
.nv-af.is-icons .nv-af-pill.is-shown { width: auto; padding: 0 16px 0 13px; }
.nv-af.is-icons .nv-af-pill.is-shown span { display: inline; }
.nv-af-x { flex: none; width: 44px; height: 44px; border-radius: 999px; background: #f1efea; display: grid; place-items: center; }
.nv-af-x:hover { background: #e8e5de; }

.nv-af-det { margin: 0 14px 0 20px; padding: 12px 0 10px; border-top: 1px solid #eceae5; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px 24px; overflow-y: auto; scrollbar-width: none; }
.nv-af.is-compact .nv-af-det { margin: 0 8px 0 14px; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.nv-af-visit, .nv-af-offers { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nv-af-offers { gap: 0; }
.nv-af-k { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6b6b72; }
.nv-af-offers .nv-af-k { padding-bottom: 4px; }
.nv-af-v { font-size: 14.5px; line-height: 1.4; }
.nv-af-link { align-self: flex-start; min-height: 32px; display: flex; align-items: center; font-size: 14.5px; font-weight: 500; color: #0d4a3c !important; }
.nv-af-offer { min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 1px; border-bottom: 1px solid #f1efea; }
.nv-af-offer b { font-size: 14.5px; font-weight: 500; }
.nv-af-offer span { font-size: 12.5px; color: #6b6b72; }

.nv-af-toast {
  position: absolute; left: 50%; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px;
  background: #17171a; color: #fff; font-size: 13.5px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 24px rgba(0, 0, 0, .25); opacity: 0; transition: opacity .2s; pointer-events: none;
}
.nv-af-toast.is-on { opacity: 1; }

/* The reader's own controls step aside while an ad is open */
html.nv-af-on .nv-arrow, html.nv-af-on .nv-popen, html.nv-af-on .nv-edge { opacity: 0 !important; pointer-events: none !important; transition: opacity 230ms ease; }
html.nv-af-on .nv-top { transform: translateY(-100%); transition: transform 380ms cubic-bezier(.2, .7, .2, 1); }
.nv-app.is-adfocus .nv-area[data-ad] { cursor: zoom-in; }
