/* The IV, Delta & Theta distribution panel (showcase/chapters/greeks/_dist.html, greek-dist.js), the
   "dist" tab of the Greeks & Gamma Exposure chapter on /how-it-works/.
   One product frame with the real page's header card and chart cards (intrinio_options/templates/
   intrinio/greeks.html): header card :30-42, price badge :86-97, strike filter :45-63, search :66-83,
   Info button :100-105, chart cards and their violet top bar :116-130, two-column rows :108-113 and
   one column under 768px :163-166. Colours inside the frame are the page's own (#6759d1 / #a78bfa /
   #c4b5fd violet, #38bdf8 price, #00d8ff tooltip title); the panel around it uses landing.css tokens.
   Everything is gkv-* and scoped under .gkv so it beats landing.css's element reset. JS state classes
   on .gkv: is-ready (charts drawn), is-nodata, is-auto (autoplay running), is-held (visitor input),
   is-paused (Pause pressed), is-still (reduced motion). On a card: is-dim (not the chosen Greek). On a
   chip: is-press (the autoplay "pressed" it). Only opacity and transform animate, and nothing does
   under reduced motion. */

.gkv {
  --gkv-p: #6759d1; --gkv-p2: #a78bfa; --gkv-p3: #c4b5fd; --gkv-sky: #38bdf8; --gkv-cyan: #00d8ff;
  --gkv-bg: #1b1a31; --gkv-text: #e0e0ff; --gkv-muted: rgba(224, 224, 255, .66);
  --gkv-line: rgba(103, 89, 209, .35);
  position: relative; min-width: 0;
}
.gkv [hidden] { display: none !important; }
/* Without JS, before the data is drawn, or if it fails: the posters show and the controls stay hidden. */
.gkv:not(.is-ready) .gkv-js { display: none !important; }
.gkv.is-ready .gkv-poster { display: none; }

/* ---- panel head ---- */
.gkv-head { max-width: 72ch; margin: 0 auto var(--lp-sp-5); text-align: center; }
.gkv .gkv-title { margin: 0; color: var(--lp-text); font: 700 var(--lp-fs-lg)/1.25 var(--lp-font-title); letter-spacing: -.01em; }
.gkv .gkv-lead { margin: var(--lp-sp-2) 0 0; color: var(--lp-muted); font-size: var(--lp-fs-base); line-height: 1.6; }

/* ---- the frame ---- */
.gkv-frame {
  position: relative; overflow: hidden; min-width: 0;
  border: 1px solid var(--lp-border-strong); border-radius: 16px;
  background: radial-gradient(900px 420px at 92% -10%, rgba(103, 89, 209, .14), transparent 60%), var(--gkv-bg);
  box-shadow: var(--lp-shadow), 0 0 80px color-mix(in srgb, var(--lp-primary) 10%, transparent);
  color: var(--gkv-text); font: 400 13px/1.45 var(--lp-font);
}
.gkv .gkv-frame p { margin: 0; }
.gkv-pghead {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 18px;
  background: linear-gradient(90deg, #5aae8c, #6dbf9d); color: #fff;
}
.gkv .gkv-pgname { margin-right: auto; color: #fff; font: 700 17px/1.25 var(--lp-font-title); letter-spacing: -.01em; }
.gkv-pghead .lp-tier { --lp-tier-c: #fff3d6; background: rgba(12, 5, 32, .35); border-color: rgba(255, 255, 255, .45); }
.gkv-pghead .lp-sample { color: #fff6e0; border-color: rgba(255, 246, 224, .7); background: rgba(12, 5, 32, .25); }
.gkv-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px 16px 16px; }

/* ---- header card (greeks.html :30-105) ---- */
.gkv-hcard {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
  padding: 14px 18px; border: 1px solid var(--gkv-p); border-radius: 14px;
  background: linear-gradient(135deg, #252540 0%, #2e2e50 100%); box-shadow: 0 0 24px rgba(103, 89, 209, .2);
}
.gkv .gkv-eyebrow { margin-bottom: 4px; color: var(--gkv-p3); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; }
.gkv .gkv-ticker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gkv-sym { color: #fff; font: 700 21px/1.2 var(--lp-font-title); letter-spacing: .5px; }
.gkv-price {
  padding: 2px 12px; border: 1px solid rgba(56, 189, 248, .35); border-radius: 10px;
  background: rgba(56, 189, 248, .1); box-shadow: 0 0 14px rgba(56, 189, 248, .12);
  color: var(--gkv-sky); font: 800 19px/1.25 var(--lp-font); letter-spacing: -.5px; font-variant-numeric: tabular-nums;
}
.gkv .gkv-sub { margin-top: 4px; color: var(--gkv-p3); font-size: 12px; }
.gkv-hcard-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.gkv .gkv-strikes {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 8px;
  border: 1px solid rgba(103, 89, 209, .5); background: rgba(103, 89, 209, .15);
}
.gkv-strikes-l { color: var(--gkv-p3); font-size: 10.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; }
.gkv-strikes-v {
  min-width: 44px; padding-bottom: 1px; border-bottom: 1px solid rgba(103, 89, 209, .6);
  color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.gkv-strikes-sep { color: rgba(196, 181, 253, .55); font-size: 11px; }
.gkv-search {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 5px 4px 12px; border-radius: 8px;
  border: 1px solid rgba(103, 89, 209, .6); background: rgba(103, 89, 209, .2); color: rgba(196, 181, 253, .55);
}
.gkv-search-ph { min-width: 92px; color: rgba(196, 181, 253, .55); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.gkv-go { padding: 3px 11px; border-radius: 6px; background: var(--gkv-p); color: #fff; font-size: 11.5px; font-weight: 700; }
.gkv .gkv-info-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--gkv-p2); background: rgba(103, 89, 209, .35); color: #fff; font: 600 12px/1.3 var(--lp-font);
  transition: background-color .2s, border-color .2s;
}
.gkv .gkv-info-btn:hover, .gkv .gkv-info-btn[aria-expanded="true"] { background: var(--gkv-p); border-color: var(--gkv-p); }
.gkv .gkv-info-btn:focus-visible, .gkv .gkv-chip:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }

/* ---- Info (the modal's content, inline) ---- */
.gkv-info {
  padding: 14px 16px; border: 1px solid var(--gkv-line); border-radius: 12px;
  background: linear-gradient(160deg, #252540 0%, #1c1c35 100%);
}
.gkv .gkv-info-t { margin-bottom: 4px; color: var(--gkv-p3); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.gkv .gkv-info-p { margin-bottom: 10px; color: #d4d4f8; }
.gkv .gkv-info-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .gkv .gkv-info-list { grid-template-columns: 1fr 1fr; gap: 8px 18px; } }
.gkv-info-list li { display: flex; align-items: flex-start; gap: 10px; color: #e0e0ff; line-height: 1.5; }
.gkv-info-list b { color: var(--gkv-p3); }
.gkv-info-b {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px;
  border: 1px solid var(--gkv-p2); border-radius: 6px; background: rgba(167, 139, 250, .3); color: var(--gkv-p3); font-size: 11px; font-weight: 700;
}

/* ---- the Greek switcher ---- */
.gkv-switch { min-width: 0; margin: -3px -2px; padding: 3px 2px; overflow-x: auto; scrollbar-width: none; }
.gkv-switch::-webkit-scrollbar { display: none; }
.gkv-chips { display: flex; gap: 6px; width: max-content; }
.gkv .gkv-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(103, 89, 209, .45); background: rgba(103, 89, 209, .1); color: var(--gkv-p3);
  font: 600 12.5px/1.2 var(--lp-font); white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .18s var(--lp-ease);
}
.gkv .gkv-chip:hover { border-color: var(--gkv-p2); color: #fff; }
.gkv .gkv-chip[aria-pressed="true"] {
  border-color: var(--gkv-p2); color: #fff;
  background: linear-gradient(135deg, rgba(103, 89, 209, .55), rgba(167, 139, 250, .3));
  box-shadow: 0 0 14px rgba(103, 89, 209, .35);
}
.gkv .gkv-chip.is-press { transform: scale(.94); }
.gkv-chip-g { font-size: 14px; font-weight: 700; line-height: 1; opacity: .9; }
.gkv .gkv-explain { min-height: 2.9em; color: #d4d4f8; font-size: 13px; line-height: 1.45; }
.gkv-explain b { color: #fff; }

/* ---- chart cards (greeks.html :108-130) ---- */
.gkv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 768px) { .gkv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gkv-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow: hidden;
  padding: 16px 14px 10px; border: 1px solid rgba(103, 89, 209, .7); border-radius: 14px;
  background: linear-gradient(145deg, #1e1e38 0%, #252545 100%); box-shadow: 0 0 20px rgba(103, 89, 209, .15);
  transition: opacity .35s var(--lp-ease);
}
.gkv-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #6759d1, #c4b5fd, #6759d1);
}
.gkv-card.is-dim { opacity: .58; }
.gkv-card.is-dim::before { opacity: .45; }
.gkv-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.gkv .gkv-card-title { color: var(--gkv-p3); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.gkv-card-tag { color: var(--gkv-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.gkv .gkv-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 12px; margin: 0; padding: 0; list-style: none; }
.gkv-lg { display: inline-flex; align-items: center; gap: 6px; color: rgba(224, 224, 255, .75); font-size: 11px; white-space: nowrap; }
.gkv-lg i { width: 18px; height: 3px; border-radius: 2px; }
.gkv-lg-v { display: inline-block; min-width: 5.2ch; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.gkv-stage { position: relative; min-width: 0; }
.gkv-canvas { display: block; width: 100%; height: 200px; touch-action: pan-y; cursor: crosshair; }
.gkv-canvas:focus { outline: none; }
.gkv-canvas:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 767px) { .gkv-canvas { height: 180px; } }
.gkv .gkv-note { color: var(--gkv-muted); font-size: 11.5px; }

/* ---- posters (no JS, or no data) ---- */
.gkv-poster { display: block; width: 100%; height: auto; overflow: visible; font: 500 11px var(--lp-font); }
.gkv-poster text { fill: rgba(224, 224, 255, .6); }
.gkv-poster .gkv-poster-wm { fill: rgba(211, 211, 211, .09); font-size: 15px; }
.gkv-poster .gkv-poster-spotl { fill: var(--gkv-sky); font-weight: 600; }
.gkv-poster-grid { stroke: rgba(255, 255, 255, .06); }
.gkv-poster-spot { stroke: var(--gkv-sky); stroke-dasharray: 4 4; stroke-opacity: .7; }

/* ---- controls under the frame ---- */
.gkv-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--lp-sp-2) var(--lp-sp-3); margin-top: var(--lp-sp-4); }
.gkv-auto { display: inline-flex; align-items: center; gap: 8px; color: var(--lp-muted); font-size: var(--lp-fs-xs); }
.gkv-auto-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lp-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-green) 22%, transparent); }
.gkv-auto-bar { position: relative; width: 72px; height: 3px; overflow: hidden; border-radius: 2px; background: color-mix(in srgb, var(--lp-accent) 18%, transparent); }
.gkv-auto-bar i { position: absolute; inset: 0; background: var(--lp-accent); transform: scaleX(0); transform-origin: 0 50%; }
.gkv-auto.is-idle .gkv-auto-dot { background: var(--lp-amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-amber) 22%, transparent); }
.gkv-auto.is-stopped .gkv-auto-dot { background: var(--lp-faint); box-shadow: none; }
.gkv.is-still .gkv-auto { display: none; }
.gkv-ico-play { display: none; }
.gkv.is-paused .gkv-ico-play { display: inline; }
.gkv.is-paused .gkv-ico-pause { display: none; }
.gkv.is-still [data-gkv-pause] { display: none; }

/* ---- phones ---- */
@media (max-width: 560px) {
  .gkv-body { padding: 12px 10px 14px; }
  .gkv-hcard { padding: 12px 14px; }
  .gkv-hcard-tools { width: 100%; }
  .gkv-search-ph { min-width: 0; }
  .gkv-card { padding: 14px 10px 8px; }
  .gkv .gkv-legend { gap: 3px 9px; }
  .gkv .gkv-explain { min-height: 4.4em; }
}

@media (prefers-reduced-motion: reduce) {
  .gkv .gkv-chip, .gkv .gkv-info-btn, .gkv-card { transition: none; }
  .gkv .gkv-chip.is-press { transform: none; }
}
