/* Instagram feed ([nt_instagram_feed]). Our own markup; nothing from Instagram loads until a visitor clicks a post.
   Brand: ink #000014, deep #07495F, teal #00677F, wash #F0F0EE, rule #D9D9D6. Dark mode follows html[data-nt-theme="dark"]. */
.nt-ig { --ig-ink: #000014; --ig-muted: #3d3d46; --ig-card: #FFFFFF; --ig-rule: #D9D9D6; --ig-link: #07495F; --ig-gap: 16px;
  position: relative; font-family: Inter, sans-serif; color: var(--ig-ink); }
html[data-nt-theme="dark"] .nt-ig { --ig-ink: #E6ECEE; --ig-muted: #A7B4B9; --ig-card: #1A2226; --ig-rule: #3A464B; --ig-link: #7CC7D9; }
.nt-ig__sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; }
.nt-ig-note { padding: 12px 16px; border: 1px dashed #5B8794; border-radius: 5px; }

/* ---- profile header ---- */
.nt-ig__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin: 0 0 24px; }
.nt-ig .nt-ig__avatar { width: 56px !important; height: 56px !important; max-width: none !important; flex: none; border-radius: 50% !important;
  display: block; margin: 0 -12px 0 0 !important; }
.nt-ig .nt-ig__title { display: flex; flex-direction: column; margin: 0 !important; padding: 0 !important; font-family: Inter, sans-serif;
  font-size: 1rem !important; line-height: 1.3 !important; letter-spacing: 0; color: var(--ig-ink) !important; }
.nt-ig__user { font-weight: 700; }
.nt-ig__name { font-weight: 400; font-size: .9375rem; color: var(--ig-muted); }
.nt-ig .nt-ig__stats { display: flex; gap: 24px; list-style: none !important; margin: 0 !important; padding: 0 !important; }
.nt-ig .nt-ig__stats li { display: flex; flex-direction: column; align-items: center; list-style: none !important; margin: 0 !important;
  padding: 0 !important; font-size: .8125rem; line-height: 1.3; color: var(--ig-muted); }
.nt-ig__stats strong { font-size: 1rem; color: var(--ig-ink); }
.nt-ig__follow { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 6px; background: #00677F;
  color: #FFFFFF !important; font-weight: 600; font-size: 1rem; line-height: 1.25; text-decoration: none !important; }
.nt-ig__follow:hover { background: #07495F; text-decoration: underline !important; }

/* ---- the row of posts: scrolls sideways, snaps to cards ---- */
.nt-ig .nt-ig__list { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--ig-gap)) / 4); gap: var(--ig-gap);
  list-style: none !important; margin: 0 !important; padding: 4px !important; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 4px; scrollbar-width: thin; }
.nt-ig .nt-ig__card { position: relative; display: flex; flex-direction: column; min-width: 0; list-style: none !important; margin: 0 !important;
  padding: 0 !important; background: var(--ig-card); border: 1px solid var(--ig-rule); border-radius: 5px; overflow: hidden;
  scroll-snap-align: start; }
.nt-ig__meta { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.nt-ig .nt-ig__mini { width: 36px !important; height: 36px !important; max-width: none !important; border-radius: 50% !important; flex: none;
  margin: 0 !important; }
.nt-ig__by { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: .875rem; line-height: 1.3; }
.nt-ig__by strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-ig__by time { font-size: .8125rem; color: var(--ig-muted); white-space: nowrap; }
.nt-ig__glyph { flex: none; }
.nt-ig__media { position: relative; aspect-ratio: 4 / 5; background: #E4E7E8; }
.nt-ig__media img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover;
  display: block; margin: 0 !important; border-radius: 0 !important; }
/* a video post gets a play mark on its still picture */
.nt-ig__media.is-video::after { content: ""; position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0, 0, 20, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%23fff'/%3E%3C/svg%3E") center / 18px no-repeat; }
.nt-ig .nt-ig__counts { display: flex; gap: 16px; margin: 0 !important; padding: 12px 14px 0 !important; font-size: .875rem; line-height: 1.2;
  font-weight: 600; }
.nt-ig__counts > span { display: inline-flex; align-items: center; gap: 6px; }
.nt-ig .nt-ig__caption { margin: 0 !important; padding: 8px 14px 0 !important; font-size: .875rem; line-height: 1.45; color: var(--ig-ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
/* One real link per card, stretched over the card: one target, one tab stop. */
.nt-ig__link { display: block; margin-top: auto; padding: 10px 14px 14px; font-size: .875rem; font-weight: 600; color: var(--ig-link) !important;
  text-decoration: none !important; }
.nt-ig__link::after { content: ""; position: absolute; inset: 0; border-radius: 5px; }
@media (hover: hover) {
  .nt-ig__card:hover { border-color: var(--ig-link); }
  .nt-ig__card:hover .nt-ig__link { text-decoration: underline !important; }
}
.nt-ig__follow:focus-visible, .nt-ig__list:focus-visible, .nt-ig__nav:focus-visible { outline: 3px solid var(--ig-ink) !important;
  outline-offset: 2px !important; box-shadow: none !important; }
.nt-ig__link:focus-visible { outline: none !important; box-shadow: none !important; }
.nt-ig__link:focus-visible::after { outline: 3px solid var(--ig-ink); outline-offset: -3px; }

/* ---- previous / next buttons (added by the script; without it the row still scrolls) ---- */
.nt-ig .nt-ig__nav { position: absolute; top: calc(50% + 40px); z-index: 2; width: 44px; height: 44px; min-width: 0; margin: 0; padding: 0 !important;
  border: 1px solid var(--ig-rule); border-radius: 50% !important; background: var(--ig-card); color: var(--ig-ink); cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 20, .16); }
.nt-ig__nav::before { content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; border-right: 2px solid currentColor;
  border-top: 2px solid currentColor; transform: translate(-70%, -50%) rotate(45deg); }
.nt-ig__nav--prev { left: -14px; }
.nt-ig__nav--prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.nt-ig__nav--next { right: -14px; }
.nt-ig__nav[hidden] { display: none; }
.nt-ig__nav:hover { background: #FFE2A1; color: #000014; }

@media (max-width: 999px) {
  .nt-ig .nt-ig__list { grid-auto-columns: calc((100% - 2 * var(--ig-gap)) / 2.3); }
  .nt-ig__nav--prev { left: 2px; } .nt-ig__nav--next { right: 2px; }
}
@media (max-width: 599px) {
  .nt-ig { --ig-gap: 12px; }
  .nt-ig .nt-ig__list { grid-auto-columns: 78%; }
  .nt-ig__head { gap: 10px 18px; }
  .nt-ig .nt-ig__stats { gap: 16px; }
}
@media (forced-colors: active) {
  .nt-ig__follow, .nt-ig__nav { border: 1px solid ButtonText; }
}
@media (prefers-reduced-motion: reduce) {
  .nt-ig .nt-ig__list { scroll-behavior: auto !important; }
}
