/*
 * Bluegrass Cloud Insights reading experience.
 *
 * Loaded only on individual posts so page templates, archives, navigation,
 * forms, and the homepage retain their established presentation.
 */

.bc-insight-main {
  --bc-insight-ink: #102f4d;
  --bc-insight-copy: #31485d;
  --bc-insight-soft: #edf6fa;
  --bc-insight-paper: #fbfdff;
  --bc-insight-line: rgba(17, 55, 84, 0.15);
  background: var(--bc-insight-soft);
  overflow: clip;
}

.bc-reading-progress {
  background: rgba(255, 255, 255, 0.14);
  height: 0.25rem;
  inset: 0 0 auto;
  pointer-events: none;
  position: fixed;
  z-index: 100001;
}

.bc-reading-progress span {
  background: linear-gradient(90deg, #0aa6ff, #4dd9b4);
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  width: 100%;
}

.admin-bar .bc-reading-progress {
  top: 32px;
}

.entry-header.bc-insight-hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(10, 166, 255, 0.3), transparent 25rem),
    radial-gradient(circle at 68% 92%, rgba(77, 217, 180, 0.12), transparent 22rem),
    linear-gradient(125deg, #07172b, #0a3151);
  padding-block: clamp(2.75rem, 5vw, 4.75rem);
}

.bc-insight-hero__grid {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  position: relative;
}

.bc-insight-hero__copy {
  min-width: 0;
}

.bc-insight-hero__labels {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.bc-insight-hero__labels .bc-eyebrow {
  margin: 0;
}

.bc-insight-category {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(156, 229, 255, 0.3);
  border-radius: 999px;
  color: #dff5ff;
  font-size: 0.78rem;
  font-weight: 740;
  letter-spacing: 0.035em;
  padding: 0.32rem 0.72rem;
  text-decoration: none;
}

.bc-insight-category:hover {
  background: rgba(10, 166, 255, 0.18);
  color: #fff;
}

.bc-insight-category:focus-visible,
.bc-insight-toc a:focus-visible,
.bc-insight-navigation__card:focus-visible {
  outline: 3px solid #72e2c3;
  outline-offset: 3px;
}

.bc-insight-toc summary:focus-visible {
  outline: 3px solid #72e2c3;
  outline-offset: -4px;
}

.entry-header.bc-insight-hero h1 {
  font-size: clamp(2.2rem, 1.64rem + 2.35vw, 4rem);
  line-height: 1.04;
  margin-bottom: 1.15rem;
  max-width: 19ch;
}

.bc-insight-deck {
  color: #c8dbea;
  font-size: clamp(1.02rem, 0.94rem + 0.32vw, 1.22rem);
  line-height: 1.65;
  margin: 0 0 1.4rem;
  max-width: 60ch;
}

.bc-insight-meta {
  align-items: center;
  color: #c8dbea;
  font-size: 0.86rem;
  gap: 0.55rem 0;
}

.bc-insight-meta > * {
  align-items: center;
  display: inline-flex;
}

.bc-insight-meta > * + *::before {
  color: #72e2c3;
  content: "•";
  margin-inline: 0.72rem;
}

.bc-insight-hero__media {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    #0b213e;
  border: 1px solid rgba(156, 229, 255, 0.28);
  border-radius: 1.35rem;
  box-shadow: 0 26px 70px rgba(3, 11, 22, 0.35);
  margin-left: auto;
  max-width: 30rem;
  overflow: hidden;
  padding: clamp(0.45rem, 1vw, 0.7rem);
  width: 100%;
}

.bc-insight-hero__media img {
  aspect-ratio: 16 / 9;
  border-radius: 0.9rem;
  height: auto;
  max-height: 18rem;
  object-fit: contain;
  width: 100%;
}

.bc-insight-surface {
  background:
    radial-gradient(circle at 5% 12%, rgba(10, 166, 255, 0.1), transparent 24rem),
    radial-gradient(circle at 96% 42%, rgba(77, 217, 180, 0.09), transparent 26rem),
    linear-gradient(180deg, #edf6fa 0%, #f4f9fb 48%, #eaf3f7 100%);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.bc-insight-layout {
  align-items: start;
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 3.25rem);
  grid-template-columns: minmax(13rem, 15rem) minmax(0, 50rem);
  justify-content: center;
}

.bc-insight-rail {
  display: grid;
  gap: 1rem;
  min-width: 0;
  position: sticky;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  top: 7.5rem;
}

@media (min-width: 64.01rem) {
  .bc-insight-rail {
    max-height: calc(100vh - 9rem);
    max-height: calc(100dvh - 9rem);
    overflow-y: auto;
    padding: 0.2rem 0.35rem 0.5rem 0.2rem;
  }

  .admin-bar .bc-insight-rail {
    max-height: calc(100vh - 11rem);
    max-height: calc(100dvh - 11rem);
  }
}

.admin-bar .bc-insight-rail {
  top: calc(7.5rem + 32px);
}

.bc-insight-toc,
.bc-insight-rail-card {
  border-radius: 1.1rem;
  box-shadow: 0 14px 38px rgba(7, 23, 43, 0.1);
  overflow: hidden;
}

.bc-insight-toc {
  background: linear-gradient(150deg, #0b2947, #07172b);
  border: 1px solid rgba(103, 220, 255, 0.22);
  color: #d7e7f1;
}

.bc-insight-toc summary {
  color: #fff;
  cursor: pointer;
  font-family: var(--bc-display);
  font-size: 1rem;
  font-weight: 720;
  list-style-position: inside;
  padding: 1rem 1.1rem;
}

.bc-insight-toc summary::marker {
  color: #72e2c3;
}

.bc-insight-toc ol {
  border-top: 1px solid rgba(103, 220, 255, 0.16);
  counter-reset: insight-section;
  list-style: none;
  margin: 0;
  padding: 0.65rem 0.65rem 0.85rem;
}

.bc-insight-toc li {
  counter-increment: insight-section;
  margin: 0;
}

.bc-insight-toc a {
  align-items: start;
  border-radius: 0.7rem;
  color: #bfd2df;
  display: grid;
  font-size: 0.79rem;
  gap: 0.65rem;
  grid-template-columns: 1.35rem 1fr;
  line-height: 1.42;
  padding: 0.57rem 0.62rem;
  text-decoration: none;
}

.bc-insight-toc a::before {
  color: #72e2c3;
  content: counter(insight-section, decimal-leading-zero);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding-top: 0.12rem;
}

.bc-insight-toc a:hover,
.bc-insight-toc a[aria-current="true"] {
  background: rgba(10, 166, 255, 0.13);
  color: #fff;
}

.bc-insight-rail-card {
  background:
    radial-gradient(circle at 100% 0, rgba(10, 166, 255, 0.13), transparent 13rem),
    linear-gradient(145deg, #f9fdff, #edf7fb);
  border: 1px solid var(--bc-insight-line);
  color: var(--bc-insight-copy);
  padding: 1.15rem;
}

.bc-insight-rail-card p {
  font-size: 0.86rem;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.bc-insight-rail-card .bc-insight-rail-card__label {
  color: #005f9e;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.bc-insight-rail-card a {
  align-items: center;
  color: var(--bc-insight-ink);
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 760;
  gap: 0.42rem;
  text-decoration: none;
}

.bc-insight-rail-card a span {
  color: #0078d4;
  font-size: 1.1rem;
}

.bc-insight-rail-card a:focus-visible,
.bc-insight-tags a:focus-visible {
  outline: 3px solid #005f9e;
  outline-offset: 3px;
}

.entry-content.entry-content--insight {
  background:
    radial-gradient(circle at 100% 0, rgba(10, 166, 255, 0.045), transparent 23rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 254, 0.98));
  border: 1px solid var(--bc-insight-line);
  border-radius: 1.5rem;
  box-shadow: 0 24px 65px rgba(7, 23, 43, 0.11);
  color: var(--bc-insight-copy);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  line-height: 1.78;
  min-width: 0;
  padding: clamp(1.35rem, 4.5vw, 3.75rem);
}

.entry-content.entry-content--insight > * {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.entry-content--insight > section {
  margin: 0;
  max-width: none;
}

.entry-content--insight > section > * {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.entry-content--insight .insights-lede {
  background:
    linear-gradient(135deg, rgba(10, 166, 255, 0.1), rgba(77, 217, 180, 0.08)),
    #f5fbfe;
  border: 1px solid rgba(10, 166, 255, 0.2);
  border-left: 0.32rem solid #0aa6ff;
  border-radius: 0 1rem 1rem 0;
  color: var(--bc-insight-ink);
  font-family: var(--bc-display);
  font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.3rem);
  font-weight: 570;
  line-height: 1.6;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  padding: clamp(1.1rem, 3vw, 1.65rem);
}

.entry-content--insight > h2,
.entry-content--insight > section > h2 {
  border-top: 1px solid var(--bc-insight-line);
  font-size: clamp(1.65rem, 1.37rem + 1.15vw, 2.35rem);
  margin-top: clamp(2.8rem, 6vw, 4.25rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  position: relative;
  scroll-margin-top: 7rem;
}

.entry-content--insight > h2::before,
.entry-content--insight > section > h2::before {
  background: linear-gradient(90deg, #0aa6ff, #4dd9b4);
  border-radius: 999px;
  content: "";
  height: 0.24rem;
  left: 0;
  position: absolute;
  top: clamp(1.35rem, 3vw, 2.1rem);
  width: 2.8rem;
}

.entry-content--insight > h3,
.entry-content--insight > section > h3 {
  color: #174d78;
  font-size: clamp(1.2rem, 1.1rem + 0.42vw, 1.5rem);
  margin-top: 2.2rem;
  scroll-margin-top: 7rem;
}

.entry-content--insight > p,
.entry-content--insight > section > p {
  max-width: 47rem;
}

.entry-content--insight a {
  font-weight: 650;
  text-decoration-color: rgba(0, 114, 198, 0.36);
  text-decoration-thickness: 0.08em;
}

.entry-content--insight a:hover {
  text-decoration-color: currentColor;
}

.entry-content--insight > ul,
.entry-content--insight > ol,
.entry-content--insight > section > ul,
.entry-content--insight > section > ol {
  background:
    radial-gradient(circle at 100% 0, rgba(10, 166, 255, 0.055), transparent 15rem),
    #f4f9fc;
  border: 1px solid rgba(17, 55, 84, 0.13);
  border-radius: 1rem;
  margin-block: 1.5rem 2rem;
  padding: 1.25rem 1.35rem 1.25rem 3rem;
}

.entry-content--insight > ul li::marker,
.entry-content--insight > section > ul li::marker {
  color: #0a8ed9;
}

.entry-content--insight > ol li::marker,
.entry-content--insight > section > ol li::marker {
  color: #0078d4;
  font-weight: 800;
}

.entry-content--insight > blockquote,
.entry-content--insight > section > blockquote {
  background: linear-gradient(135deg, #eef8fd, #f7fcfa);
  border: 1px solid rgba(10, 166, 255, 0.19);
  border-left: 0.3rem solid #0aa6ff;
  border-radius: 0 1rem 1rem 0;
  padding: 1.2rem 1.35rem;
}

.entry-content--insight > aside,
.entry-content--insight > section > aside {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 180, 84, 0.16), transparent 15rem),
    #fff9ed;
  border: 1px solid rgba(173, 99, 12, 0.24);
  border-left: 0.32rem solid #d47a12;
  border-radius: 0 1rem 1rem 0;
  color: #553913;
  margin-block: 1.5rem 2rem;
  padding: 1.15rem 1.3rem;
}

.entry-content--insight > aside > :last-child,
.entry-content--insight > section > aside > :last-child {
  margin-bottom: 0;
}

.entry-content--insight pre {
  border: 1px solid rgba(103, 220, 255, 0.18);
  box-shadow: 0 16px 35px rgba(7, 23, 43, 0.16);
  line-height: 1.6;
}

.bc-table-scroll {
  background: #fff;
  border: 1px solid rgba(17, 55, 84, 0.16);
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(7, 23, 43, 0.08);
  margin-block: 1.2rem 2.25rem;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.bc-table-scroll:focus-visible {
  outline: 3px solid #0078d4;
  outline-offset: 3px;
}

.bc-table-scroll table {
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  min-width: 42rem;
  width: 100%;
}

.bc-table-scroll th,
.bc-table-scroll td {
  border-bottom: 1px solid rgba(17, 55, 84, 0.12);
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.9rem 1rem;
}

.bc-table-scroll thead th {
  background: #0b2947;
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.bc-table-scroll thead th:first-child {
  border-radius: 0.9rem 0 0;
}

.bc-table-scroll thead th:last-child {
  border-radius: 0 0.9rem 0 0;
}

.bc-table-scroll tbody th {
  background: #eff7fb;
  color: var(--bc-insight-ink);
  min-width: 12rem;
}

.bc-table-scroll tbody tr:nth-child(even) td {
  background: #f8fbfd;
}

.bc-table-scroll tr:last-child > * {
  border-bottom: 0;
}

.bc-table-scroll__hint {
  align-items: center;
  color: #116da9;
  display: flex;
  font-size: 0.75rem;
  font-weight: 780;
  justify-content: flex-end;
  letter-spacing: 0.04em;
  margin: 1rem 0 -0.7rem;
  text-transform: uppercase;
}

.bc-table-scroll__hint[hidden] {
  display: none;
}

.bc-insight-footer.entry-footer {
  background: linear-gradient(180deg, #eaf3f7, #e4eef3);
  border: 0;
  margin: 0;
  max-width: none;
  padding-block: 0 clamp(2.25rem, 4vw, 3.75rem);
}

.bc-insight-topics {
  align-items: center;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(17, 55, 84, 0.13);
  border-radius: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.25rem;
  max-width: min(calc(100% - 2rem), 68.25rem);
  padding: 1rem 1.2rem;
}

.bc-insight-topics > strong {
  color: var(--bc-insight-ink);
  font-family: var(--bc-display);
  font-size: 0.9rem;
}

.bc-insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bc-insight-tags a {
  background: #fff;
  border: 1px solid rgba(0, 120, 212, 0.22);
  border-radius: 999px;
  color: #075f9d;
  font-size: 0.75rem;
  font-weight: 720;
  padding: 0.35rem 0.7rem;
  text-decoration: none;
}

.bc-insight-tags a:hover {
  background: #e6f5ff;
  border-color: rgba(0, 120, 212, 0.42);
}

.bc-insight-next {
  background:
    radial-gradient(circle at 85% 0, rgba(10, 166, 255, 0.18), transparent 25rem),
    linear-gradient(145deg, #07172b, #0b2947);
  color: #d7e7f1;
  padding-block: clamp(2.75rem, 5vw, 4.5rem);
}

.bc-insight-next .bc-eyebrow {
  color: #72e2c3;
  margin-bottom: 0.6rem;
}

.bc-insight-next h2 {
  color: #fff;
  font-size: clamp(1.65rem, 1.38rem + 1.1vw, 2.35rem);
  margin-bottom: 1.5rem;
}

.bc-insight-navigation {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.bc-insight-navigation__card {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(156, 229, 255, 0.2);
  border-radius: 1.1rem;
  color: #fff;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr;
  min-height: 7.25rem;
  padding: 1.15rem;
  text-decoration: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.bc-insight-navigation__card--next {
  grid-template-columns: 1fr auto;
  text-align: right;
}

.bc-insight-navigation__card:hover {
  background: rgba(10, 166, 255, 0.14);
  border-color: rgba(156, 229, 255, 0.46);
  color: #fff;
  transform: translateY(-0.15rem);
}

.bc-insight-navigation__card small,
.bc-insight-navigation__card strong {
  display: block;
}

.bc-insight-navigation__card small {
  color: #9ce5ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.bc-insight-navigation__card strong {
  color: #fff;
  font-family: var(--bc-display);
  font-size: clamp(1rem, 0.93rem + 0.3vw, 1.2rem);
  line-height: 1.35;
}

.bc-insight-navigation__arrow {
  align-items: center;
  background: linear-gradient(135deg, #0aa6ff, #0078d4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 120, 212, 0.24);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.3rem;
  height: 2.75rem;
  justify-content: center;
  width: 2.75rem;
}

@media (max-width: 64rem) {
  .bc-insight-layout {
    grid-template-columns: minmax(0, 50rem);
  }

  .bc-insight-rail,
  .admin-bar .bc-insight-rail {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(14rem, 0.7fr);
    max-height: none;
    overflow: visible;
    padding: 0;
    position: static;
  }

  .bc-insight-toc,
  .bc-insight-rail-card {
    align-self: start;
  }
}

@media (max-width: 56rem) {
  .bc-insight-hero__grid {
    gap: 1.8rem;
    grid-template-columns: 1fr;
  }

  .bc-insight-hero__copy {
    max-width: 52rem;
  }

  .bc-insight-hero__media {
    margin-left: 0;
    max-width: 36rem;
  }

  .bc-insight-hero__media img {
    max-height: 17rem;
  }
}

@media (max-width: 48rem) {
  .bc-insight-rail,
  .admin-bar .bc-insight-rail {
    grid-template-columns: 1fr;
  }

  .bc-insight-rail-card {
    display: none;
  }

  .entry-header.bc-insight-hero {
    padding-block: 2.5rem;
  }

  .entry-header.bc-insight-hero h1 {
    font-size: clamp(2rem, 10.5vw, 3rem);
  }

  .bc-insight-deck {
    font-size: 1rem;
  }

  .bc-insight-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .bc-insight-meta > * + *::before {
    content: none;
  }

  .bc-insight-hero__media {
    border-radius: 1rem;
  }

  .bc-insight-surface {
    padding-block: 1.25rem 2.5rem;
  }

  .entry-content.entry-content--insight {
    border-radius: 1rem;
    box-shadow: 0 14px 38px rgba(7, 23, 43, 0.09);
    padding: 1.2rem;
  }

  .entry-content--insight .insights-lede {
    border-radius: 0 0.8rem 0.8rem 0;
    padding: 1rem;
  }

  .entry-content--insight > h2,
  .entry-content--insight > section > h2 {
    margin-top: 2.6rem;
    padding-top: 1.9rem;
  }

  .entry-content--insight > h2::before,
  .entry-content--insight > section > h2::before {
    top: 1.25rem;
  }

  .entry-content--insight > ul,
  .entry-content--insight > ol,
  .entry-content--insight > section > ul,
  .entry-content--insight > section > ol {
    padding: 1rem 1rem 1rem 2.35rem;
  }

  .bc-table-scroll__hint {
    display: flex;
  }

  .bc-insight-topics {
    align-items: flex-start;
    flex-direction: column;
  }

  .bc-insight-navigation__card,
  .bc-insight-navigation__card--next {
    min-height: 0;
    text-align: left;
  }

  .bc-insight-navigation__card--next {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 782px) {
  .admin-bar .bc-reading-progress {
    top: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bc-insight-navigation__card {
    transition: none;
  }

  .bc-insight-navigation__card:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  .bc-insight-hero__media,
  .bc-insight-toc,
  .bc-insight-rail-card,
  .entry-content.entry-content--insight,
  .bc-table-scroll,
  .bc-insight-navigation__card {
    border: 1px solid CanvasText;
  }
}

@media print {
  .bc-reading-progress,
  .bc-insight-rail,
  .bc-insight-next {
    display: none;
  }

  .bc-insight-surface,
  .bc-insight-footer.entry-footer {
    background: #fff;
  }

  .entry-header.bc-insight-hero {
    background: #fff !important;
    border-bottom: 2px solid #222;
    color: #111;
    padding-block: 1.5rem;
  }

  .entry-header.bc-insight-hero::before {
    display: none;
  }

  .entry-header.bc-insight-hero h1,
  .entry-header.bc-insight-hero .bc-insight-deck,
  .entry-header.bc-insight-hero .bc-insight-meta,
  .entry-header.bc-insight-hero .bc-eyebrow,
  .entry-header.bc-insight-hero .bc-insight-category {
    color: #111;
  }

  .entry-header.bc-insight-hero .bc-insight-category,
  .bc-insight-hero__media {
    background: #fff;
    border-color: #777;
    box-shadow: none;
  }

  .bc-insight-hero__media {
    max-width: 24rem;
  }

  .bc-insight-layout {
    display: block;
  }

  .entry-content.entry-content--insight {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .entry-content--insight pre,
  .entry-content--insight pre code {
    background: #fff !important;
    color: #111 !important;
  }

  .entry-content--insight pre {
    border: 1px solid #777;
    box-shadow: none;
    overflow: visible;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .bc-table-scroll {
    border-color: #777;
    box-shadow: none;
    overflow: visible;
  }

  .bc-table-scroll table {
    min-width: 0;
  }

  .bc-table-scroll thead th,
  .bc-table-scroll tbody th,
  .bc-table-scroll tbody tr:nth-child(even) td {
    background: #fff !important;
    color: #111 !important;
  }
}
