/* ============ Insurance Comprehension hub (/insurance-tools) ============
   Scoped styles: .icx (page) + .icard (tool cards) + the lens panel.
   Cards deliberately reuse the hero quick-link LOOK (border, gradient,
   Bebas title, arrow) but hold still — no float, no breathing glow, no
   embers. 45 animated cards would be noise; the hero keeps the fire,
   the library stays calm. Hovering a card reveals its description and
   mirrors a fuller definition into the sticky lens panel on the right
   (desktop); on mobile the lens hides and descriptions stay inline. */

@media (prefers-reduced-motion: no-preference) {
  html:has(.icx) { scroll-behavior: smooth; }
}

/* The shared sheet sets `overflow-x:hidden` on html/body, which makes body a
   scroll container and silently breaks position:sticky (the mortgage-deck
   gotcha, decisions log 2026-06-09). `clip` prevents the same horizontal
   scroll WITHOUT creating a scroll container, so the pill bar and the lens
   can actually pin to the viewport. Scoped: hub.css only loads on this page. */
html, body { overflow-x: clip; }

/* Neon "hollow" scrollbars — outlined thumb, transparent fill, soft glow.
   Page scrollbar + the pill-band scrollbars. Firefox gets the thin blue
   fallback via scrollbar-color (it can't hollow the thumb). */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(74,184,255,0.55) transparent;
}
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: transparent;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(74,184,255,0.55), inset 0 0 6px rgba(74,184,255,0.28);
}
::-webkit-scrollbar-thumb:hover { background: rgba(74,184,255,0.18); }
::-webkit-scrollbar-corner { background: transparent; }

.icx__inner {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.icx__head { max-width: 860px; }
.icx__head .page__lede b { color: var(--blue); font-weight: 700; }

/* ---- sticky category pills (jump nav) ----
   Two labeled bands: Life on one row, A&S on the other; each band is a
   2-high pill grid that scrolls horizontally if it ever overflows. */
.icx__toc {
  position: sticky;
  top: var(--bar-h);
  z-index: 8;
  display: grid;
  gap: 7px;
  padding: 10px 2px 11px;
  margin-bottom: 38px;
  background: linear-gradient(180deg, rgba(0,0,0,0.94), rgba(0,0,0,0.88));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.icx__toc-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 10px;
}
.icx__toc-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  padding: 0 2px;
  transition: color .2s ease;
}
.icx__toc-label:hover { color: var(--blue); }
.icx__toc-pills {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: max-content;
  gap: 5px 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.icx__pill {
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.icx__pill:hover,
.icx__pill.is-active { color: var(--blue); border-color: var(--blue); }

/* ---- layout: catalog left, lens right ---- */
.icx__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 44px;
  align-items: start;
}

/* ---- modules (Life / A&S) ---- */
.icx__module {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--bar-h) + 150px); /* clear the two-band sticky toc */
}
.icx__module-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: 0.02em;
  color: var(--ink);
  padding-bottom: 12px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--rule-2);
}
.icx__module-title span {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-left: 14px;
  vertical-align: 0.5em;
}

/* ---- category columns ---- */
.icx__groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 30px 22px;
  align-items: start;
}
.icx__group {
  display: grid;
  gap: 12px;
  align-content: start;
  scroll-margin-top: calc(var(--bar-h) + 150px); /* clear the two-band sticky toc */
}
.icx__group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 2px;
}
.icx__group-title::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--blue);
}
.icx__group-title span { color: var(--ink-faint); letter-spacing: 0.1em; }

/* ---- tool cards ---- */
.icard {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 14px 16px 15px;
  text-decoration: none;
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(22,22,22,0.78), rgba(8,8,8,0.82));
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
  transition: border-color .25s ease, box-shadow .25s ease, translate .25s ease;
}
.icard:hover,
.icard:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 0 24px rgba(74,184,255,0.18);
  translate: 0 -2px;
  outline: none;
}
/* flagship tools carry the amber ring (matches the Pricing "preferred" cue) */
.icard--flag { border-color: rgba(232,166,52,0.45); }
.icard--flag:hover,
.icard--flag:focus-visible {
  border-color: var(--amber);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 0 24px rgba(232,166,52,0.2);
}
.icard__eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.icard__star { color: var(--amber); }
.icard__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 21px;
  line-height: 1.06;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.icard__desc {
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-dim);
}
.icard__arrow {
  color: var(--blue);
  font-size: 13px;
  transition: transform .25s ease;
}
.icard--flag .icard__arrow { color: var(--amber); }
.icard:hover .icard__arrow,
.icard:focus-visible .icard__arrow { transform: translateX(4px); }

/* Desktop with a real cursor: descriptions tuck away and read on hover
   (the ask); the lens carries the fuller definition. Mobile/touch keeps
   descriptions inline — there is no hover to reveal them. */
@media (min-width: 1081px) and (hover: hover) {
  .icard__desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    transition: max-height .3s ease, opacity .3s ease;
  }
  .icard:hover .icard__desc,
  .icard:focus-visible .icard__desc { max-height: 72px; opacity: 1; }
}

/* ---- the lens (sticky definition display) ---- */
.icx__lens {
  position: sticky;
  top: calc(var(--bar-h) + 150px); /* sit below the two-band sticky toc */
}
.icx__lens-panel {
  border: 1px solid var(--rule-2);
  border-radius: 12px;
  padding: 22px 22px 24px;
  background: linear-gradient(180deg, rgba(16,16,16,0.9), rgba(6,6,6,0.92));
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  min-height: 250px;
  transition: border-color .3s ease;
}
.icx__lens-panel.is-live { border-color: rgba(74,184,255,0.5); }
.icx__lens-panel.is-fresh .icx__lens-eyebrow,
.icx__lens-panel.is-fresh .icx__lens-title,
.icx__lens-panel.is-fresh .icx__lens-desc { animation: lensIn .28s ease; }
@keyframes lensIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.icx__lens-eyebrow {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.icx__lens-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  line-height: 1.04;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 10px;
}
.icx__lens-desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-dim);
  margin-bottom: 18px;
}
.icx__lens-open {
  display: inline-block;
  color: var(--blue);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(74,184,255,0.4);
  border-radius: 999px;
  padding: 8px 16px;
  transition: background .25s ease, border-color .25s ease;
}
.icx__lens-open:hover { background: rgba(74,184,255,0.12); border-color: var(--blue); }
.icx__lens-count {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---- responsive ---- */
@media (max-width: 1080px) {
  .icx__layout { grid-template-columns: 1fr; gap: 0; }
  .icx__lens { display: none; }
}
@media (max-width: 680px) {
  .icx__groups { grid-template-columns: 1fr; }
  /* phones: single-high scrolling pill rows so the sticky bar stays lean */
  .icx__toc-pills { grid-template-rows: auto; }
  .icx__module,
  .icx__group { scroll-margin-top: calc(var(--bar-h) + 112px); }
}
@media (prefers-reduced-motion: reduce) {
  .icard, .icard__arrow, .icx__lens-panel { transition: none; }
  .icx__lens-panel.is-fresh .icx__lens-eyebrow,
  .icx__lens-panel.is-fresh .icx__lens-title,
  .icx__lens-panel.is-fresh .icx__lens-desc { animation: none; }
}
