/* Cognexaa Insights and reading pages. Loaded after css/cognexaa.css, on /insights/ and /resources/ pages only. */

.cx-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(150deg, var(--cx-ink), var(--cx-navy-2)); }
.cx-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cx-lattice svg { display: block; width: 100%; max-width: 480px; height: auto; margin-inline: auto; }

.cat { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .85rem; font-weight: 700; color: var(--cx-indigo); margin-bottom: .55rem; }
.cat span { font-weight: 600; color: var(--cx-muted); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; font-size: .85rem; color: var(--cx-muted); margin-bottom: .75rem; }
.go a, a.go { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.go a:hover, a.go:hover { text-decoration: underline; text-underline-offset: 3px; }
.go { margin: 0; }
.go .ic, a.go .ic { width: 1.05em; height: 1.05em; }

/* Featured: one lead story beside two compact ones */
.nb { white-space: normal; }
@media (min-width: 400px) { .nb { white-space: nowrap; } }

.cx-feat-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; gap: 1.5rem; }
.cx-feat { display: grid; border-radius: 1.1rem; overflow: hidden; }
.cx-feat h3 { line-height: 1.25; }
.cx-feat h3 a { color: inherit; text-decoration: none; }
.cx-feat h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cx-feat .ex { color: var(--cx-muted); font-size: .97rem; }
.cx-feat.lead { grid-row: span 2; background: var(--cx-navy); color: #fff; grid-template-rows: auto 1fr; }
.cx-feat.lead .body { padding: 2rem; display: flex; flex-direction: column; }
.cx-feat.lead h3 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); margin-bottom: .75rem; }
.cx-feat.lead .ex { color: rgba(255,255,255,.78); font-size: 1.04rem; flex: 1; }
.cx-feat.lead .cat { color: var(--cx-violet-light); }
.cx-feat.lead .cat span, .cx-feat.lead .meta { color: rgba(255,255,255,.72); }
.cx-feat.lead .go a { color: #fff; }
.cx-feat.side { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); border: 1px solid var(--cx-line); background: #fff; }
.cx-feat.side .cx-cover { aspect-ratio: auto; height: 100%; min-height: 12rem; }
.cx-feat.side .body { padding: 1.4rem; display: flex; flex-direction: column; }
.cx-feat.side h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.cx-feat.side .ex { flex: 1; font-size: .93rem; }

/* Topics */
.cx-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.cx-topic { display: flex; flex-direction: column; padding: 1.6rem; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: #fff; color: var(--cx-text); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.cx-topic:hover, .cx-topic:focus { border-color: #cfd3f5; box-shadow: var(--cx-shadow); color: var(--cx-text); }
.cx-topic .cx-icon { align-self: flex-start; }
.cx-topic .name { font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: .5rem; }
.cx-topic .list { font-size: .9rem; color: var(--cx-muted); margin-bottom: 1rem; }
.cx-topic .n { margin-top: auto; display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 700; color: var(--cx-indigo); }

/* Search and filters */
.cx-filters { margin: 2rem 0; padding: 1.5rem; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: var(--cx-bg-soft); }
.cx-filter-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.1rem; }
.cx-field { display: flex; flex-direction: column; gap: .35rem; min-width: 12rem; }
.cx-field.grow { flex: 1 1 18rem; }
.cx-field label { font-size: .88rem; font-weight: 700; }
.cx-field label span { font-weight: 500; color: var(--cx-muted); }
.cx-field input, .cx-field select { width: 100%; min-height: 2.75rem; padding: .5rem .75rem; border: 1px solid #aab1c6; border-radius: .55rem; background: #fff; color: var(--cx-text); font: inherit; }
.cx-search { position: relative; }
.cx-search .ic { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--cx-muted); }
.cx-search input { padding-left: 2.5rem; }
.cx-chipset { display: flex; flex-wrap: wrap; gap: .5rem; }
.cx-chipset button { min-height: 2.5rem; padding: .35rem .9rem; border: 1px solid #aab1c6; border-radius: 99px; background: #fff; color: var(--cx-text); font-size: .88rem; font-weight: 600; }
.cx-chipset button:hover { border-color: var(--cx-indigo); }
.cx-chipset button[aria-pressed="true"] { background: var(--cx-indigo); border-color: var(--cx-indigo); color: #fff; }
.cx-status-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-top: 1rem; min-height: 1.75rem; }
.cx-status-row p { margin: 0; font-size: .9rem; font-weight: 600; color: var(--cx-muted); }
.cx-clear { border: 0; background: none; padding: 0; font-size: .9rem; font-weight: 700; color: var(--cx-indigo); text-decoration: underline; text-underline-offset: 3px; }

/* Library entries */
.cx-entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.cx-entry { display: flex; flex-direction: column; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); overflow: hidden; background: #fff; }
.cx-entry[hidden] { display: none; }
.cx-entry .body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem; }
.cx-entry h3 { font-size: 1.1rem; line-height: 1.32; margin-bottom: .55rem; }
.cx-entry h3 a { color: inherit; text-decoration: none; }
.cx-entry h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cx-entry .ex { flex: 1; font-size: .93rem; color: var(--cx-muted); }
.cx-empty { margin: 2rem 0 0; padding: 1.5rem; text-align: center; color: var(--cx-muted); background: var(--cx-bg-soft); border-radius: var(--cx-radius); }
.cx-more { margin-top: 2rem; text-align: center; }

/* Resources: reference list */
.cx-res-list { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.cx-res-list li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: start; padding-block: 1.6rem; border-top: 1px solid #d9ddea; }
.cx-res-list li:last-child { border-bottom: 1px solid #d9ddea; }
.cx-res-list .kind span { display: block; font-size: .88rem; font-weight: 700; color: var(--cx-indigo); }
.cx-res-list .kind small { font-size: .82rem; color: var(--cx-muted); }
.cx-res-list h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.cx-res-list h3 a { color: inherit; text-decoration: none; }
.cx-res-list h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cx-res-list p { margin: 0 0 .4rem; font-size: .96rem; color: var(--cx-muted); }
.cx-res-list .covers { margin: 0; font-size: .85rem; }

/* Frameworks */
.cx-fw-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.cx-fw { display: flex; flex-direction: column; padding: 1.4rem; border: 1px solid rgba(255,255,255,.16); border-radius: var(--cx-radius); background: rgba(255,255,255,.04); }
.cx-fw .kind { font-size: .82rem; font-weight: 700; color: var(--cx-azure-light); margin-bottom: .4rem; }
.cx-fw h3 { font-size: 1.08rem; line-height: 1.3; margin-bottom: .55rem; }
.cx-fw p { font-size: .9rem; color: rgba(255,255,255,.76); }
.cx-fw .why { flex: 1; }
.cx-fw .why strong { color: #fff; }
.cx-fw .links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; }
.cx-fw .links a { color: #fff; font-weight: 700; text-underline-offset: 3px; }

/* Industries */
.cx-ind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem; margin-top: 2.5rem; }
.cx-ind-grid article { display: flex; flex-direction: column; border-top: 2px solid var(--cx-text); padding-top: 1.1rem; }
.cx-ind-grid h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.cx-ind-grid p { flex: 1; font-size: .95rem; color: var(--cx-muted); }
.cx-ind-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.cx-ind-grid li { font-size: .9rem; line-height: 1.4; }
.cx-ind-grid a { font-weight: 600; text-underline-offset: 3px; }

/* Product collections */
.cx-coll-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.cx-coll-panel { display: flex; flex-direction: column; padding: 2rem; border-radius: 1.25rem; color: #fff; background: var(--cx-navy); }
.cx-coll-panel img { display: block; height: 40px; width: auto; align-self: flex-start; margin-bottom: 1.25rem; }
.cx-coll-panel h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.cx-coll-panel .focus { font-size: .93rem; color: rgba(255,255,255,.76); }
.cx-coll { list-style: none; margin: 0 0 1.5rem; padding: 0; flex: 1; }
.cx-coll li { padding-block: .65rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .95rem; line-height: 1.4; }
.cx-coll a { color: #fff; font-weight: 600; text-underline-offset: 3px; }
.cx-coll .planned { color: rgba(255,255,255,.72); }
.cx-coll .planned span { display: inline-block; margin-left: .35rem; font-size: .78rem; font-weight: 700; color: #ffe7a6; }
.cx-coll-panel .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
.cx-coll-panel .btn-light { color: var(--cx-navy); }

/* Subscribe */
.cx-sub-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem 4rem; padding: 2.5rem; border: 1px solid var(--cx-line); border-radius: 1.25rem; background: var(--cx-bg-soft); }
.cx-sub-panel form { display: grid; gap: 1rem; }
.cx-sub-panel .btn { justify-self: start; }
.cx-consent { display: flex; align-items: flex-start; gap: .6rem; }
.cx-consent input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .2rem; }
.cx-consent label { font-size: .88rem; color: var(--cx-muted); }
.cx-form-status { margin: 0; font-size: .9rem; font-weight: 600; }
.cx-form-status:empty { display: none; }

/* Reading pages */
.cx-read-hero { padding-block: 3.5rem 4rem; }
.cx-read-hero h1 { font-size: clamp(1.95rem, 1.35rem + 2vw, 3rem); line-height: 1.14; letter-spacing: -.025em; margin-bottom: 1rem; }
.cx-read-hero .cx-cover { border-radius: 1rem; border: 1px solid rgba(255,255,255,.14); }
.cx-read-intro { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: rgba(255,255,255,.86); margin-bottom: 1.25rem; max-width: 46rem; }
.cx-byline { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; font-size: .9rem; color: rgba(255,255,255,.72); }
.cx-reader { display: grid; grid-template-columns: minmax(0, 46rem) minmax(0, 16rem); justify-content: space-between; gap: 4rem; padding-block: 4rem 5rem; }
.cx-prose { min-width: 0; font-size: 1.06rem; line-height: 1.72; }
.cx-prose h2 { font-size: clamp(1.4rem, 1.25rem + .6vw, 1.7rem); line-height: 1.25; margin: 2.75rem 0 .85rem; scroll-margin-top: 84px; }
.cx-prose h3 { font-size: 1.14rem; margin: 1.75rem 0 .5rem; }
.cx-prose p, .cx-prose ul, .cx-prose ol { margin-bottom: 1.1rem; }
.cx-prose li { margin-bottom: .45rem; }
.cx-prose a { text-underline-offset: 3px; }
.cx-table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.cx-table-wrap table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.cx-table-wrap th { text-align: left; font-weight: 700; padding: .65rem .85rem; border-bottom: 2px solid var(--cx-text); }
.cx-table-wrap td { vertical-align: top; padding: .7rem .85rem; border-bottom: 1px solid var(--cx-line); }
.cx-table-wrap td:first-child { font-weight: 600; }
@media (min-width: 768px) { .cx-table-wrap td:first-child { white-space: nowrap; } }
.cx-note-box { padding: 1rem 1.2rem; border: 1px solid #e6dcae; border-radius: .7rem; background: #fffbea; color: #443800; font-size: .95rem; line-height: 1.55; }
.cx-checks { list-style: none; padding: 0; }
.cx-checks li { position: relative; padding-left: 2rem; }
.cx-checks li::before { content: ""; position: absolute; left: 0; top: .32em; width: 1.05rem; height: 1.05rem; border: 2px solid var(--cx-indigo); border-radius: .25rem; }
.cx-sources { font-size: .93rem; line-height: 1.5; }
.cx-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; }
.cx-tags span { padding: .22rem .7rem; border: 1px solid var(--cx-line); border-radius: 99px; font-size: .82rem; font-weight: 600; color: var(--cx-muted); }
.cx-rail { min-width: 0; }
.cx-toc { position: sticky; top: 92px; font-size: .9rem; line-height: 1.4; }
.cx-box-title { font-size: .88rem; font-weight: 800; margin-bottom: .75rem; }
.cx-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--cx-line); }
.cx-toc li { margin: 0; }
.cx-toc a { display: block; padding: .35rem 0 .35rem .85rem; color: var(--cx-muted); text-decoration: none; }
.cx-toc a:hover, .cx-toc a:focus { color: var(--cx-indigo); }
.cx-toc-mobile { display: none; margin-bottom: 1.5rem; padding: .85rem 1.1rem; border: 1px solid var(--cx-line); border-radius: .7rem; font-size: .95rem; }
.cx-toc-mobile summary { font-weight: 700; cursor: pointer; }
.cx-toc-mobile ol { margin: .75rem 0 0; padding-left: 1.2rem; }
.cx-related { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem; align-items: start; }
.cx-related-list { list-style: none; margin: 0; padding: 0; }
.cx-related-list li { padding-block: .95rem; border-top: 1px solid #d9ddea; }
.cx-related-list span { display: block; font-size: .82rem; font-weight: 700; color: var(--cx-indigo); margin-bottom: .15rem; }
.cx-related-list a { font-weight: 700; color: var(--cx-text); text-decoration: none; }
.cx-related-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cx-box { padding: 1.5rem; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); background: #fff; font-size: .95rem; }
.cx-box p { color: var(--cx-muted); }
.cx-box strong, .cx-box .cx-box-title { color: var(--cx-text); }
.cx-box-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; }
.cx-box-links a { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; text-decoration: none; }
.cx-box-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cx-box-links .ic { width: 1em; height: 1em; }

@media (max-width: 1199.98px) { .cx-fw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991.98px) {
  .cx-feat-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-feat.lead { grid-row: auto; }
  .cx-topic-grid, .cx-entry-grid, .cx-ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-sub-panel, .cx-related { grid-template-columns: minmax(0, 1fr); }
  .cx-reader { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 2.5rem 3.5rem; }
  .cx-rail { display: none; }
  .cx-toc-mobile { display: block; }
}
@media (max-width: 767.98px) {
  .cx-res-list li { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .cx-coll-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
  .cx-feat.side { grid-template-columns: minmax(0, 1fr); }
  .cx-feat.side .cx-cover { aspect-ratio: 16 / 9; height: auto; min-height: 0; }
  .cx-feat.lead .body { padding: 1.5rem; }
  .cx-topic-grid, .cx-entry-grid, .cx-ind-grid, .cx-fw-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-sub-panel { padding: 1.5rem; }
  .cx-sub-panel .btn { justify-self: stretch; }
  .cx-filters { padding: 1.1rem; }
  .cx-field { min-width: 100%; }
  .cx-prose { font-size: 1.02rem; }
  .cx-table-wrap table { font-size: .9rem; }
  .cx-table-wrap th, .cx-table-wrap td { padding-inline: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .cx-topic { transition: none; } }
