/* Monthly Grok catalogue and purchase links */
.grok-catalogue-panel {
  --grok-icon-cutout: #f7f7f7;
  --grok-card-face: linear-gradient(155deg, #fff 0%, #f8f8f8 58%, #f2f2f2 100%);
  --grok-card-shadow: 0 2px 4px rgb(0 0 0 / .035), 0 12px 20px -14px rgb(0 0 0 / .2);
  --grok-card-lift: 0 4px 8px -4px rgb(0 0 0 / .1), 0 18px 28px -16px rgb(0 0 0 / .25);
  --grok-card-glow: rgb(0 0 0 / .035);
  padding: 32px 24px 22px; border: 1px solid var(--card-edge); border-radius: 26px;
  background: var(--card-face);
  box-shadow: inset 0 1px 0 var(--card-highlight), inset 0 -1px 0 var(--card-base), var(--card-shadow);
}
.grok-panel-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 2px 16px 36px; }
.grok-panel-heading h2 { font-size: 28px; font-weight: 500; line-height: 1.4; letter-spacing: -.7px; margin: 0; }
.grok-product-marks { display: flex; align-items: center; gap: 7px; color: var(--text); }
.grok-product-marks span { display: inline-flex; }
.grok-product-marks svg { width: 23px; height: 23px; }
.grok-plan-scroll:focus-visible, .grok-catalogue-note a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.grok-plan-scroll { border-radius: 24px; padding: 10px 12px 24px; margin: -10px -12px -24px; }
.grok-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.grok-plan {
  position: relative; isolation: isolate; overflow: hidden;
  min-width: 0; min-height: 686px; padding: 24px; border: 1px solid var(--card-edge); border-radius: 22px;
  background: var(--grok-card-face);
  box-shadow: inset 0 1px 0 var(--card-highlight), inset 0 -1px 0 var(--card-base), var(--grok-card-shadow);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.grok-plan::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px circle at var(--pointer-x,50%) var(--pointer-y,0%),var(--grok-card-glow),transparent 72%);
  opacity: 0; transition: opacity 180ms ease;
}
.grok-plan > * { position: relative; }
.grok-plan:focus-within { border-color: var(--border-strong); }
.grok-plan-heading { display: flex; align-items: center; justify-content: space-between; min-height: 24px; gap: 8px; }
.grok-plan-heading h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 24px; }
.grok-plan-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: #ebebeb; color: #333; font-size: 12px; line-height: 18px; border-radius: 999px; white-space: nowrap; }
.grok-plan-badge[hidden] { display: none; }
.grok-plan-badge svg { width: 13px; height: 13px; }
.grok-plan-price { display: flex; align-items: baseline; gap: 0; white-space: nowrap; margin-top: 15px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.grok-price-currency, .grok-plan-price strong { font-size: clamp(36px,3.1vw,44px); font-weight: 400; letter-spacing: -1.2px; }
.grok-price-period { margin-left: 2px; font-size: 13px; color: var(--text-muted); }
.grok-price-note { min-height: 42px; margin: 10px 0 8px; font-size: 13px; line-height: 21px; font-weight: 600; color: var(--text); }
.grok-coming-soon { display: block; width: 100%; height: 40px; border: 0; padding: 8px 12px; border-radius: 999px; background: #ebebeb; color: #111; font: inherit; font-size: 14px; line-height: 24px; font-weight: 500; cursor: not-allowed; opacity: 1; box-shadow: none; }
.grok-plan[data-plan="premium"] .grok-coming-soon { background: #111; color: #fff; }
.grok-quota { padding: 23px 0 24px; }
.grok-includes { margin: 0 0 12px; font-size: 13px; line-height: 20px; color: var(--text-muted); }
.grok-quota strong { display: block; font-size: 27px; line-height: 30px; font-weight: 400; }
.grok-plan[data-plan="plus"] .grok-quota strong { font-weight: 600; }
.grok-quota > p:last-child { margin: 0; font-size: 13px; line-height: 20px; }
.grok-benefits h3 { margin: 0 0 10px; padding-bottom: 11px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 400; line-height: 20px; color: var(--text-muted); }
.grok-benefits ul { display: grid; gap: 7px; list-style: none; margin: 0 0 22px; padding: 0; }
.grok-benefits ul:last-child { margin-bottom: 0; }
.grok-benefits li { display: flex; align-items: flex-start; gap: 5px; font-size: 13px; line-height: 21px; }
.grok-benefits li > span:first-child { display: inline-flex; flex: 0 0 15px; padding-top: 3px; }
.grok-benefits svg { width: 15px; height: 15px; }
.grok-catalogue-note { margin: 16px 0 0; font-size: 11px; line-height: 1.8; color: var(--text-subtle); }
.grok-catalogue-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; margin-left: 5px; }
.grok-swipe-hint { display: none; }
html.dark .grok-catalogue-panel {
  --grok-icon-cutout: #252525;
  --grok-card-face: linear-gradient(155deg, #2c2c2c 0%, #252525 58%, #202020 100%);
  --grok-card-shadow: 0 2px 4px rgb(0 0 0 / .16), 0 12px 20px -14px rgb(0 0 0 / .65);
  --grok-card-lift: 0 4px 8px -4px rgb(0 0 0 / .3), 0 18px 28px -16px rgb(0 0 0 / .8);
  --grok-card-glow: rgb(255 255 255 / .055);
}
html.dark .grok-coming-soon { background: #353535; color: #f5f5f5; }
html.dark .grok-plan[data-plan="premium"] .grok-coming-soon { background: #f5f5f5; color: #111; }
html.dark .grok-plan-badge { background: #393939; color: #ededed; }
@media (hover: hover) and (pointer: fine) {
  .grok-plan:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: inset 0 1px 0 var(--card-highlight), inset 0 -1px 0 var(--card-base), var(--grok-card-lift); }
  .grok-plan:hover::before { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .grok-plan:hover { transform: none; }
  .grok-plan::before { display: none; }
}
@media (max-width: 1250px) {
  .grok-catalogue-panel { padding-inline: 20px; }
  .grok-plan { padding: 22px 18px; }
  .grok-price-currency, .grok-plan-price strong { font-size: 36px; }
}
@media (max-width: 1050px) {
  .grok-panel-heading { padding-inline: 2px; }
  .grok-panel-heading h2 { font-size: 24px; }
  .grok-plan-scroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
  .grok-plan-grid { grid-template-columns: repeat(4,minmax(272px,1fr)); }
  .grok-plan { scroll-snap-align: start; }
  .grok-swipe-hint { display: flex; justify-content: space-between; margin: 10px 0 0; color: var(--text-subtle); font-size: 11px; }
}
@media (max-width: 720px) {
  .grok-catalogue-panel { padding: 20px 14px 16px; border-radius: 20px; }
  .grok-panel-heading { grid-template-columns: 1fr auto; gap: 18px; padding-bottom: 24px; }
  .grok-panel-heading h2 { grid-row: 2; grid-column: 1 / -1; text-align: center; font-size: 23px; }
  .grok-product-marks svg { width: 20px; height: 20px; }
  .grok-plan-grid { grid-template-columns: repeat(4,max(250px,calc(100vw - 94px))); }
  .grok-plan { padding: 22px 20px; min-height: 686px; }
  .grok-catalogue-note { font-size: 10px; }
}
.grok-plan[hidden], [data-grok-empty][hidden]{display:none}

.grok-empty{text-align:center;padding:36px 16px;color:var(--text-muted);font-size:14px}

.product-grok .catalogue-stage.active .catalogue-step-index{color:var(--surface)}

.grok-panel-heading::after{content:""}
.grok-purchase{display:flex;align-items:center;justify-content:center;width:100%;height:40px;border-radius:999px;background:#111;color:#fff;font-size:14px;font-weight:500;text-decoration:none;transition:background 140ms ease,color 140ms ease}
.grok-purchase:hover{background:#222}.grok-purchase:focus-visible{outline:2px solid var(--text);outline-offset:3px}
html.dark .grok-purchase{background:#f5f5f5;color:#111}
html.dark .grok-purchase:hover{background:#e5e5e5}
