/* ════════════════════════════════════════════════════════════
   Iansorin SEO Tools — UI
   Notion-inspired, matches iansorin.fr design tokens.
════════════════════════════════════════════════════════════ */

/* ───── Hide duplicate WP page title when our shortcodes are used ───── */
body.ist-has-listing .entry-title,
body.ist-has-listing .post-title,
body.ist-has-listing header.entry-header,
body.ist-has-listing .page-header,
body.ist-has-tool .entry-title,
body.ist-has-tool .post-title,
body.ist-has-tool header.entry-header,
body.ist-has-tool .page-header {
  display: none !important;
}
body.ist-has-listing .entry-content-wrap,
body.ist-has-tool .entry-content-wrap {
  padding-top: 0 !important;
}

.ist-tool, .ist-listing {
  --ist-purple: #9C89B8;
  --ist-purple-deep: #7a6a9e;
  --ist-purple-ink: #2d2540;
  --ist-pink: #F0A6CA;
  --ist-pink-deep: #d989b3;
  --ist-paper: #ffffff;
  --ist-soft: #EDF2F7;
  --ist-card: #f6f5fa;
  --ist-text: #1a1a1a;
  --ist-mute: #615d59;
  --ist-border: #e5e2ee;
  --ist-success: #16a34a;
  --ist-warn: #f59e0b;
  --ist-danger: #dc2626;
  --ist-shadow: 0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(45,37,64,.06);
  --ist-shadow-lg: 0 14px 48px rgba(45,37,64,.12);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ist-text);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.ist-tool *, .ist-listing * { box-sizing: border-box; }

/* ───── Tool wrapper ───── */
.ist-tool {
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 0 48px;
}

/* ───── Header ───── */
.ist-tool-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px 28px 24px;
  background: var(--ist-purple-ink);
  color: #fff;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--ist-shadow-lg);
}
.ist-tool-head::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(420px 320px at 85% 20%, rgba(240,166,202,0.55), transparent 60%),
    radial-gradient(440px 360px at 12% 90%, rgba(156,137,184,0.85), transparent 60%);
  filter: blur(38px);
  z-index: 0;
  pointer-events: none;
  animation: ist-head-glow 18s ease-in-out infinite;
}
@keyframes ist-head-glow {
  0%,100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}
.ist-tool-head > * { position: relative; z-index: 1; }
.ist-tool-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.18);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.ist-tool-head:hover .ist-tool-icon { transform: rotate(-6deg) scale(1.05); }
.ist-tool-titles { flex: 1; min-width: 0; }
.ist-tool .ist-tool-title,
h1.ist-tool-title, h2.ist-tool-title {
  font-size: 32px; line-height: 1.15; letter-spacing: -0.03em;
  font-weight: 600; margin: 0 0 8px;
  color: #ffffff !important;
}
.ist-tool .ist-tool-subtitle {
  font-size: 15px; line-height: 1.55; letter-spacing: -0.006em;
  color: rgba(255,255,255,0.88) !important; margin: 0; max-width: 720px;
}
@media (max-width: 600px) {
  .ist-tool-head { padding: 22px 18px; gap: 14px; }
  .ist-tool-title { font-size: 24px; }
  .ist-tool-icon { width: 44px; height: 44px; }
}

/* ───── Icons (inline SVG via mask) ───── */
.ist-tool-icon::after,
.ist-card-icon::after {
  content: "";
  width: 28px; height: 28px;
  background: #fff;
  mask-size: contain; -webkit-mask-size: contain;
  mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;
  mask-position: center; -webkit-mask-position: center;
}
.ist-card-icon::after { background: var(--ist-purple-deep); width: 24px; height: 24px; }

.ist-icon-speed::after    { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 14l4-4'/><path d='M12 2a10 10 0 1 0 10 10'/><circle cx='12' cy='14' r='1.5' fill='black'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 14l4-4'/><path d='M12 2a10 10 0 1 0 10 10'/><circle cx='12' cy='14' r='1.5' fill='black'/></svg>"); }
.ist-icon-schema::after   { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='16 18 22 12 16 6'/><polyline points='8 6 2 12 8 18'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='16 18 22 12 16 6'/><polyline points='8 6 2 12 8 18'/></svg>"); }
.ist-icon-audit::after    { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 11l3 3 8-8'/><path d='M21 12a9 9 0 1 1-6.2-8.55'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 11l3 3 8-8'/><path d='M21 12a9 9 0 1 1-6.2-8.55'/></svg>"); }
.ist-icon-google::after   { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>"); }
.ist-icon-youtube::after  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='5' width='20' height='14' rx='3'/><polygon points='10 9 16 12 10 15' fill='black'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='5' width='20' height='14' rx='3'/><polygon points='10 9 16 12 10 15' fill='black'/></svg>"); }
.ist-icon-shopping::after { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='21' r='1'/><circle cx='20' cy='21' r='1'/><path d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='21' r='1'/><circle cx='20' cy='21' r='1'/><path d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/></svg>"); }
.ist-icon-news::after     { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 22h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2'/><path d='M18 14h-8M15 18h-5M10 6h8v4h-8z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 22h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2'/><path d='M18 14h-8M15 18h-5M10 6h8v4h-8z'/></svg>"); }
.ist-icon-kg::after       { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3'/><circle cx='5' cy='5' r='2'/><circle cx='19' cy='5' r='2'/><circle cx='5' cy='19' r='2'/><circle cx='19' cy='19' r='2'/><line x1='9.8' y1='9.8' x2='6.4' y2='6.4'/><line x1='14.2' y1='9.8' x2='17.6' y2='6.4'/><line x1='9.8' y1='14.2' x2='6.4' y2='17.6'/><line x1='14.2' y1='14.2' x2='17.6' y2='17.6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3'/><circle cx='5' cy='5' r='2'/><circle cx='19' cy='5' r='2'/><circle cx='5' cy='19' r='2'/><circle cx='19' cy='19' r='2'/><line x1='9.8' y1='9.8' x2='6.4' y2='6.4'/><line x1='14.2' y1='9.8' x2='17.6' y2='6.4'/><line x1='9.8' y1='14.2' x2='6.4' y2='17.6'/><line x1='14.2' y1='14.2' x2='17.6' y2='17.6'/></svg>"); }
.ist-icon-compare::after  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 3v18M16 3v18M3 8h5M3 16h5M16 8h5M16 16h5'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 3v18M16 3v18M3 8h5M3 16h5M16 8h5M16 16h5'/></svg>"); }
.ist-icon-trust::after    { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2L4 6v6c0 5 3.5 9 8 10 4.5-1 8-5 8-10V6l-8-4z'/><path d='M9 12l2 2 4-4'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2L4 6v6c0 5 3.5 9 8 10 4.5-1 8-5 8-10V6l-8-4z'/><path d='M9 12l2 2 4-4'/></svg>"); }
.ist-icon-map::after      { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='1 6 8 3 16 6 23 3 23 18 16 21 8 18 1 21 1 6'/><line x1='8' y1='3' x2='8' y2='18'/><line x1='16' y1='6' x2='16' y2='21'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='1 6 8 3 16 6 23 3 23 18 16 21 8 18 1 21 1 6'/><line x1='8' y1='3' x2='8' y2='18'/><line x1='16' y1='6' x2='16' y2='21'/></svg>"); }
.ist-icon-entities::after { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='5' cy='6' r='3'/><circle cx='19' cy='6' r='3'/><circle cx='12' cy='18' r='3'/><path d='M7.5 7.5L10.5 16M16.5 7.5L13.5 16M8 6h8'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='5' cy='6' r='3'/><circle cx='19' cy='6' r='3'/><circle cx='12' cy='18' r='3'/><path d='M7.5 7.5L10.5 16M16.5 7.5L13.5 16M8 6h8'/></svg>"); }
.ist-icon-battle::after   { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.5 17.5L3 6V3h3l11.5 11.5'/><path d='M13 19l6-6'/><path d='M16 16l4 4'/><path d='M19 21l2-2'/><path d='M9.5 6.5L21 18v3h-3L6.5 9.5'/><path d='M5 14l-2 2'/><path d='M8 17l-4 4'/><path d='M3 19l2 2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.5 17.5L3 6V3h3l11.5 11.5'/><path d='M13 19l6-6'/><path d='M16 16l4 4'/><path d='M19 21l2-2'/><path d='M9.5 6.5L21 18v3h-3L6.5 9.5'/><path d='M5 14l-2 2'/><path d='M8 17l-4 4'/><path d='M3 19l2 2'/></svg>"); }
.ist-icon-localserp::after{ -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>"); }

/* ───── Form ───── */
.ist-tool-body { padding: 0; }
.ist-form {
  background: var(--ist-paper);
  border: 1px solid var(--ist-border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--ist-shadow);
  margin-bottom: 24px;
}
.ist-form-twin {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 18px;
}
@media (max-width: 600px) { .ist-form-twin { grid-template-columns: 1fr; } }

.ist-label {
  display: block;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.01em; text-transform: uppercase;
  color: var(--ist-purple-deep);
  margin-bottom: 8px;
}
.ist-label-mini {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ist-mute); margin-bottom: 6px;
}
.ist-hint {
  color: var(--ist-mute); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12px; margin-left: 6px;
}

.ist-input, .ist-textarea, .ist-select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ist-text);
  background: var(--ist-paper);
  border: 1px solid var(--ist-border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  outline: none;
}
.ist-input:focus, .ist-textarea:focus, .ist-select:focus {
  border-color: var(--ist-purple);
  box-shadow: 0 0 0 4px rgba(156,137,184,0.16);
}
.ist-textarea { resize: vertical; min-height: 110px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; line-height: 1.6; }
.ist-input-small { font-size: 14px; padding: 10px 12px; }

.ist-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 14px; }
.ist-row-input { flex-wrap: nowrap; }
.ist-row-input .ist-input { flex: 1; }
.ist-row-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  align-items: end;
}
.ist-row-controls .ist-btn { align-self: end; min-height: 46px; }
.ist-control { display: flex; flex-direction: column; min-width: 0; }

.ist-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.ist-toggle input { display: none; }
.ist-toggle span {
  padding: 8px 14px; border-radius: 999px;
  background: var(--ist-soft);
  border: 1px solid transparent;
  font-size: 13px; font-weight: 500;
  color: var(--ist-mute);
  transition: all .15s ease;
}
.ist-toggle input:checked + span {
  background: var(--ist-purple-ink); color: #fff;
}

/* ───── Buttons ───── */
.ist-btn,
.entry-content a.ist-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 500; font-size: 15px; letter-spacing: -0.006em;
  padding: 12px 22px;
  border-radius: 10px;
  border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s, color .2s;
  white-space: nowrap;
  text-decoration: none !important;
}
.ist-btn-primary,
.entry-content a.ist-btn-primary,
.ist-listing .ist-btn-primary,
.ist-tool .ist-btn-primary {
  background: var(--ist-purple-ink) !important;
  color: #ffffff !important;
}
.ist-btn-primary:hover,
.entry-content a.ist-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(45,37,64,0.32);
  background: #1f1830 !important;
  color: #ffffff !important;
}
.ist-btn-primary:active { transform: translateY(0); }
.ist-btn-ghost,
.entry-content a.ist-btn-ghost {
  background: var(--ist-paper) !important;
  color: var(--ist-purple-deep) !important;
  border: 1px solid var(--ist-border) !important;
}
.ist-btn-ghost:hover,
.entry-content a.ist-btn-ghost:hover {
  background: var(--ist-card) !important;
  border-color: var(--ist-purple) !important;
  color: var(--ist-purple-deep) !important;
}
.ist-btn-spin {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%;
  animation: ist-spin 0.7s linear infinite;
}
.ist-btn.is-loading .ist-btn-label { opacity: 0.7; }
.ist-btn.is-loading .ist-btn-spin { display: inline-block; }
.ist-btn.is-loading { pointer-events: none; }
@keyframes ist-spin { to { transform: rotate(360deg); } }

/* ───── Output ───── */
.ist-output { min-height: 0; }
.ist-output:empty { display: none; }

.ist-empty {
  text-align: center;
  padding: 64px 24px;
  border: 2px dashed var(--ist-border);
  border-radius: 14px;
  color: var(--ist-mute);
  background: var(--ist-card);
}
.ist-empty-icon { font-size: 32px; margin-bottom: 8px; opacity: 0.6; }

.ist-error {
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
  padding: 14px 18px; border-radius: 10px;
  display: flex; gap: 10px; align-items: flex-start;
}
.ist-error::before { content: "⚠"; font-size: 18px; }

.ist-loading-pulse {
  text-align: center; padding: 56px 24px; color: var(--ist-mute);
}
.ist-loading-pulse .ist-dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--ist-purple); border-radius: 50%;
  margin: 0 3px; animation: ist-pulse 1.2s ease-in-out infinite;
}
.ist-loading-pulse .ist-dot:nth-child(2) { animation-delay: .15s; }
.ist-loading-pulse .ist-dot:nth-child(3) { animation-delay: .3s; }
@keyframes ist-pulse { 0%,80%,100% { opacity: 0.3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.2); } }

/* Step-by-step tracker (Audit + Battle) */
.ist-steps {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px;
  background: var(--ist-card);
  border: 1px solid var(--ist-border);
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: var(--ist-shadow);
  animation: ist-fade-up .3s ease both;
}
.ist-step {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: -0.006em;
  transition: background .25s, color .25s;
}
.ist-step-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ist-soft);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  font-size: 12px; font-weight: 700; color: #fff;
  transition: background .25s, transform .25s;
}
.ist-step-label { flex: 1; min-width: 0; color: var(--ist-text); }
.ist-step-status {
  font-size: 12px; color: var(--ist-mute);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.ist-step[data-status="pending"] { color: var(--ist-mute); }
.ist-step[data-status="pending"] .ist-step-icon { background: var(--ist-soft); }
.ist-step[data-status="pending"] .ist-step-icon::after { content: ""; }
.ist-step[data-status="pending"] .ist-step-status::after { content: "Queued"; }
.ist-step[data-status="running"] { background: rgba(156,137,184,.10); }
.ist-step[data-status="running"] .ist-step-icon {
  background: var(--ist-purple);
  animation: ist-step-pulse 1.1s ease-in-out infinite;
}
.ist-step[data-status="running"] .ist-step-icon::after {
  content: ""; width: 8px; height: 8px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  border-radius: 50%;
  animation: ist-spin 0.7s linear infinite;
}
.ist-step[data-status="running"] .ist-step-status { color: var(--ist-purple-deep); }
@keyframes ist-step-pulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(156,137,184,.45); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(156,137,184,0); }
}
.ist-step[data-status="done"] { color: var(--ist-text); }
.ist-step[data-status="done"] .ist-step-icon {
  background: var(--ist-success);
  animation: ist-pop-in .35s cubic-bezier(.34,1.56,.64,1);
}
.ist-step[data-status="done"] .ist-step-icon::after { content: "✓"; }
.ist-step[data-status="done"] .ist-step-status { color: var(--ist-success); font-weight: 600; }
@keyframes ist-pop-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ist-step[data-status="failed"] { color: var(--ist-danger); }
.ist-step[data-status="failed"] .ist-step-icon { background: var(--ist-danger); }
.ist-step[data-status="failed"] .ist-step-icon::after { content: "✕"; font-size: 11px; }
.ist-step[data-status="failed"] .ist-step-status { color: var(--ist-danger); font-weight: 600; }

.ist-progress { font-size: 13px; color: var(--ist-mute); margin-top: 10px; }
.ist-progress-bar {
  height: 4px; background: var(--ist-soft); border-radius: 999px; overflow: hidden;
  margin-top: 8px;
}
.ist-progress-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--ist-purple), var(--ist-pink));
  transition: width .3s ease;
}

/* ───── Result cards ───── */
.ist-result-card {
  background: #fff; border: 1px solid var(--ist-border);
  border-radius: 14px; padding: 22px; margin-bottom: 18px;
  box-shadow: var(--ist-shadow);
  animation: ist-fade-up .35s ease both;
}
@keyframes ist-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ist-result-card-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--ist-border);
}
.ist-result-card-h h3 {
  font-size: 17px; font-weight: 600; margin: 0;
  letter-spacing: -0.011em; color: var(--ist-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 70%;
}

/* ───── Score gauge ───── */
.ist-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 600px) { .ist-scores { grid-template-columns: repeat(2, 1fr); } }
.ist-score {
  position: relative;
  text-align: center;
  padding: 16px 8px;
  border-radius: 12px;
  background: var(--ist-card);
}
.ist-gauge {
  position: relative;
  width: 84px; height: 84px;
  margin: 0 auto 8px;
}
.ist-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ist-gauge circle { fill: none; stroke-width: 8; }
.ist-gauge .ist-gauge-bg { stroke: var(--ist-soft); }
.ist-gauge .ist-gauge-fg {
  stroke: var(--ist-purple); stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(.34,1.56,.64,1);
}
.ist-gauge[data-grade="good"] .ist-gauge-fg { stroke: var(--ist-success); }
.ist-gauge[data-grade="warn"] .ist-gauge-fg { stroke: var(--ist-warn); }
.ist-gauge[data-grade="bad"]  .ist-gauge-fg { stroke: var(--ist-danger); }
.ist-gauge-val {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ist-text);
}
.ist-score-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ist-mute);
}

/* ───── Metric chips ───── */
.ist-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ist-metric {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 6px 12px; border-radius: 999px;
  background: var(--ist-soft); font-size: 13px;
}
.ist-metric strong { font-weight: 600; color: var(--ist-text); }
.ist-metric span { color: var(--ist-mute); }

/* ───── Table ───── */
.ist-table-wrap {
  border: 1px solid var(--ist-border); border-radius: 12px; overflow: auto;
  background: #fff; box-shadow: var(--ist-shadow); margin-bottom: 18px;
}
.ist-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.ist-table th, .ist-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--ist-border); }
.ist-table th { background: var(--ist-card); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ist-mute); position: sticky; top: 0; }
.ist-table tr:last-child td { border-bottom: 0; }
.ist-table tr:hover td { background: rgba(156,137,184,0.04); }
.ist-table td.ist-num { font-variant-numeric: tabular-nums; font-weight: 600; text-align: center; }
.ist-table .ist-cell-url { color: var(--ist-purple-deep); text-decoration: none; word-break: break-all; }
.ist-table .ist-cell-url:hover { text-decoration: underline; }
.ist-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
}
.ist-pill-good { background: #dcfce7; color: #166534; }
.ist-pill-warn { background: #fef3c7; color: #92400e; }
.ist-pill-bad  { background: #fee2e2; color: #991b1b; }
.ist-pill-info { background: rgba(156,137,184,.15); color: var(--ist-purple-deep); }

/* Toolbar */
.ist-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin: 18px 0 8px;
}
.ist-toolbar-stat {
  font-size: 13px; color: var(--ist-mute);
}
.ist-toolbar-stat strong { color: var(--ist-text); font-weight: 600; }

/* ───── Suggest results ───── */
.ist-sug-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.ist-sug-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 10px 14px; border-radius: 10px;
  background: #fff; border: 1px solid var(--ist-border);
  font-size: 14px;
  transition: border-color .15s, transform .15s;
}
.ist-sug-item:hover { border-color: var(--ist-purple); transform: translateX(2px); cursor: pointer; }
.ist-sug-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ist-sug-score {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  white-space: nowrap;
  cursor: help;
  font-variant-numeric: tabular-nums;
}
.ist-sug-score.is-trending { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.ist-sug-score.is-vhot     { background: rgba(220,38,38,.12); color: #991b1b; }
.ist-sug-score.is-hot      { background: rgba(240,166,202,.20); color: var(--ist-pink-deep); }
.ist-sug-score.is-warm     { background: rgba(156,137,184,.16); color: var(--ist-purple-deep); }
.ist-sug-score.is-cool     { background: var(--ist-soft); color: var(--ist-mute); }

.ist-sug-group { margin-bottom: 24px; }
.ist-sug-group h4 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ist-mute); margin: 0 0 10px; font-weight: 600;
}

/* ───── KG entity cards ───── */
.ist-kg-grid { display: grid; gap: 14px; }
.ist-kg-card {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 18px;
  padding: 18px; background: #fff; border: 1px solid var(--ist-border); border-radius: 12px;
  transition: border-color .15s, transform .15s;
  align-items: start;
}
.ist-kg-card:hover { border-color: var(--ist-purple); transform: translateY(-1px); }
@media (max-width: 600px) { .ist-kg-card { grid-template-columns: 60px 1fr; } .ist-kg-score-wrap { grid-column: 1 / -1; } }
.ist-kg-img {
  width: 100px; height: 100px; border-radius: 12px;
  background: var(--ist-card) center/cover no-repeat;
  border: 1px solid var(--ist-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ist-mute); font-size: 28px; font-weight: 600;
}
.ist-kg-info { min-width: 0; }
.ist-kg-name { font-size: 18px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.011em; }
.ist-kg-mid {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px;
  color: var(--ist-mute); margin: 0 0 8px;
  user-select: all; cursor: copy;
}
.ist-kg-types { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 5px; }
.ist-kg-desc { font-size: 14px; line-height: 1.55; color: var(--ist-mute); margin: 8px 0 0; }
.ist-kg-desc strong { color: var(--ist-text); }
.ist-kg-link { font-size: 13px; color: var(--ist-purple-deep); text-decoration: none; margin-top: 8px; display: inline-block; }
.ist-kg-link:hover { text-decoration: underline; }
.ist-kg-score-wrap { text-align: center; min-width: 90px; }
.ist-kg-score-num {
  font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ist-purple-deep); font-variant-numeric: tabular-nums; line-height: 1;
}
.ist-kg-score-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ist-mute); font-weight: 600; margin-top: 4px; }
.ist-kg-score-ctx {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px;
}
.ist-kg-score-ctx.is-weak     { background: #fee2e2; color: #991b1b; }
.ist-kg-score-ctx.is-mod      { background: #fef3c7; color: #92400e; }
.ist-kg-score-ctx.is-strong   { background: #dcfce7; color: #166534; }
.ist-kg-score-ctx.is-vstrong  { background: var(--ist-purple-ink); color: #fff; }

/* KG action buttons */
.ist-kg-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
}
.ist-kg-action,
.entry-content a.ist-kg-action {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: 8px;
  text-decoration: none !important;
  background: var(--ist-card); color: var(--ist-text) !important;
  border: 1px solid var(--ist-border);
  transition: background .15s, border-color .15s, transform .15s;
}
.ist-kg-action:hover,
.entry-content a.ist-kg-action:hover {
  background: var(--ist-soft); border-color: var(--ist-purple);
  transform: translateY(-1px);
}
.ist-kg-action-primary,
.entry-content a.ist-kg-action-primary {
  background: var(--ist-purple-ink) !important;
  color: #fff !important;
  border-color: var(--ist-purple-ink);
}
.ist-kg-action-primary:hover,
.entry-content a.ist-kg-action-primary:hover {
  background: #1f1830 !important;
  border-color: #1f1830;
  color: #fff !important;
}
.ist-kg-action svg { width: 14px; height: 14px; }

/* KG compare */
.ist-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: var(--ist-paper); border: 1px solid var(--ist-border); border-radius: 14px;
  padding: 22px; box-shadow: var(--ist-shadow);
}
@media (max-width: 700px) { .ist-compare { grid-template-columns: 1fr; } }
.ist-compare-col { padding: 14px; background: var(--ist-card); border-radius: 12px; }
.ist-compare-name { font-size: 22px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.02em; }
.ist-compare-score {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--ist-purple-ink); color: #fff; font-weight: 600; font-size: 13px;
  margin: 8px 0 10px;
}

/* ───── Trust verdict ───── */
.ist-trust {
  display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center;
  background: #fff; border: 1px solid var(--ist-border); border-radius: 14px;
  padding: 26px; box-shadow: var(--ist-shadow);
}
@media (max-width: 600px) { .ist-trust { grid-template-columns: 1fr; text-align: center; } }
.ist-trust-gauge { width: 200px; height: 200px; margin: 0 auto; position: relative; }
.ist-trust-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ist-trust-gauge circle { fill: none; stroke-width: 14; }
.ist-trust-gauge .bg { stroke: var(--ist-soft); }
.ist-trust-gauge[data-verdict="safe"] .fg { stroke: var(--ist-success); }
.ist-trust-gauge[data-verdict="caution"] .fg { stroke: var(--ist-warn); }
.ist-trust-gauge[data-verdict="unsafe"] .fg { stroke: var(--ist-danger); }
.ist-trust-gauge .fg { stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.34,1.56,.64,1); }
.ist-trust-gauge-val {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ist-trust-gauge-val .ist-trust-score {
  font-size: 48px; font-weight: 600; letter-spacing: -0.03em; line-height: 1;
}
.ist-trust-gauge-val .ist-trust-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ist-mute); margin-top: 4px;
}
.ist-trust-meta { font-size: 15px; }
.ist-trust-meta h3 { font-size: 22px; margin: 0 0 8px; }
.ist-trust-meta ul { margin: 12px 0 0; padding: 0; list-style: none; }
.ist-trust-meta li { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.ist-trust-meta li::before {
  content: "";
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ist-success);
  flex-shrink: 0;
  position: relative;
}
.ist-trust-meta li.is-fail::before { background: var(--ist-danger); }
.ist-trust-meta li.is-warn::before { background: var(--ist-warn); }

/* ───── JSON viewer ───── */
.ist-json {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; line-height: 1.55;
  background: #0f1115; color: #d6e1ff;
  padding: 16px; border-radius: 10px;
  overflow-x: auto; max-height: 380px; overflow-y: auto;
}
.ist-json .k { color: #f0a6ca; }
.ist-json .s { color: #aef2c8; }
.ist-json .n { color: #ffcc80; }
.ist-json .b { color: #b6a7ff; }

/* ───── Schema results ───── */
.ist-schema-block {
  margin-top: 12px; border: 1px solid var(--ist-border); border-radius: 10px; overflow: hidden;
}
.ist-schema-block-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--ist-card);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; width: 100%; text-align: left; color: var(--ist-text);
}
.ist-schema-block-head:hover { background: var(--ist-soft); }
.ist-schema-block-body { display: none; padding: 14px; }
.ist-schema-block.is-open .ist-schema-block-body { display: block; }
.ist-schema-block-head::after {
  content: "▾"; transition: transform .2s; color: var(--ist-mute);
}
.ist-schema-block.is-open .ist-schema-block-head::after { transform: rotate(180deg); }

/* ───── Listing page ───── */
.ist-listing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 64px;
}

/* Hero (dark, matches the homepage / archive hero) */
.ist-listing-hero {
  position: relative;
  overflow: hidden;
  background: var(--ist-purple-ink);
  color: #fff;
  border-radius: 18px;
  margin: 0 0 48px;
  isolation: isolate;
  box-shadow: var(--ist-shadow-lg);
}
.ist-listing-hero::before {
  content: "";
  position: absolute; inset: -20%;
  background:
    radial-gradient(700px 460px at 82% 22%, rgba(240,166,202,0.55), transparent 60%),
    radial-gradient(700px 460px at 12% 88%, rgba(156,137,184,0.85), transparent 60%),
    radial-gradient(620px 420px at 50% 60%, rgba(217,137,179,0.45), transparent 65%);
  filter: blur(48px);
  z-index: 0;
  animation: ist-listing-glow 22s ease-in-out infinite;
}
@keyframes ist-listing-glow {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  33% { transform: translate3d(-4%, 2%, 0) scale(1.06); }
  66% { transform: translate3d(3%, -3%, 0) scale(1.1); }
}
.ist-listing-hero-inner {
  position: relative; z-index: 1;
  padding: 84px 32px 56px;
  text-align: center;
  max-width: 780px; margin: 0 auto;
}
@media (max-width: 600px) { .ist-listing-hero-inner { padding: 60px 22px 38px; } }
.ist-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ist-pink);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(240,166,202,0.14);
  border: 1px solid rgba(240,166,202,0.28);
  margin-bottom: 22px;
}
.ist-eyebrow-purple {
  background: rgba(156,137,184,0.12);
  border: 1px solid rgba(156,137,184,0.28);
  color: var(--ist-purple-deep);
  margin-bottom: 12px;
}
.ist-listing .ist-listing-title,
h1.ist-listing-title {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05; letter-spacing: -0.038em; font-weight: 600;
  margin: 0 0 18px;
  color: #ffffff !important;
}
.ist-listing .ist-listing-sub {
  font-size: 17px; line-height: 1.6;
  color: rgba(255,255,255,0.88) !important;
  margin: 0 auto;
  max-width: 660px;
}

/* Search bar in hero */
.ist-search-wrap {
  position: relative;
  display: flex; align-items: center;
  max-width: 560px;
  margin: 30px auto 0;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  transition: background .2s, border-color .2s, box-shadow .25s;
}
.ist-search-wrap:focus-within {
  background: rgba(255,255,255,0.18);
  border-color: rgba(240,166,202,0.55);
  box-shadow: 0 0 0 4px rgba(240,166,202,0.18);
}
.ist-search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.7); pointer-events: none;
}
.ist-search-wrap .ist-search,
.entry-content input.ist-search,
.entry-content .ist-search-wrap input.ist-search {
  flex: 1;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 15px !important;
  font-family: inherit !important;
  padding: 14px 44px 14px 48px !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 14px !important;
  height: auto !important;
  line-height: 1.4 !important;
  width: 100% !important;
}
.ist-search-wrap .ist-search::placeholder,
.entry-content input.ist-search::placeholder {
  color: rgba(255,255,255,0.7) !important;
  opacity: 1 !important;
}
.ist-search-wrap .ist-search::-webkit-input-placeholder { color: rgba(255,255,255,0.7) !important; }
.ist-search-wrap .ist-search::-moz-placeholder { color: rgba(255,255,255,0.7) !important; opacity: 1 !important; }
.ist-search-hint {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.62);
  margin-top: 10px;
  letter-spacing: -0.006em;
}
.ist-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.9);
  border: 0; cursor: pointer;
  font-size: 20px; line-height: 1;
  display: none; align-items: center; justify-content: center;
  transition: background .15s;
}
.ist-search-clear:hover { background: rgba(255,255,255,0.32); }
.ist-search-wrap.is-filled .ist-search-clear { display: inline-flex; }

/* Filter pills */
.ist-filter-pills {
  display: inline-flex; flex-wrap: wrap; gap: 6px;
  margin-top: 34px;
  padding: 6px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
}
.ist-filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  padding: 8px 16px; border: none; cursor: pointer;
  background: transparent; color: rgba(255,255,255,0.78);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.ist-filter-pill:hover { color: #fff; background: rgba(255,255,255,0.08); }
.ist-filter-pill.is-active {
  background: #fff; color: var(--ist-purple-ink);
}
.ist-filter-pill.is-active .ist-filter-count {
  background: var(--ist-purple-ink); color: #fff;
}
.ist-filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 6px;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9);
  border-radius: 999px;
  transition: background .2s, color .2s;
}

/* Categories */
.ist-listing-body { padding: 0 4px; }
.ist-cat {
  margin-bottom: 56px;
  scroll-margin-top: 80px;
  animation: ist-fade-up .35s ease both;
}
.ist-cat.is-hidden { display: none; }
.ist-cat-head {
  margin: 0 0 22px;
  max-width: 720px;
}
.ist-cat-title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2; letter-spacing: -0.028em;
  font-weight: 600;
  margin: 0 0 8px; color: var(--ist-text);
}
.ist-cat-desc {
  font-size: 15px; line-height: 1.6;
  color: var(--ist-mute);
  margin: 0;
}
.ist-listing-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

/* Card */
.ist-card,
.entry-content a.ist-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 22px 18px;
  background: #fff;
  border: 1px solid var(--ist-border); border-radius: 14px;
  text-decoration: none !important;
  color: var(--ist-text) !important;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
  min-height: 220px;
}
.entry-content a.ist-card:hover {
  color: var(--ist-text) !important;
}
.ist-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--ist-purple), var(--ist-pink));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.ist-card::after {
  content: "";
  position: absolute; top: -50%; right: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(156,137,184,0.08), transparent 50%);
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.ist-card:hover {
  border-color: var(--ist-purple);
  transform: translateY(-4px);
  box-shadow: var(--ist-shadow-lg);
}
.ist-card:hover::before { transform: scaleX(1); }
.ist-card:hover::after { opacity: 1; }
.ist-card-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 6px;
}
.ist-card-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, rgba(156,137,184,0.16), rgba(240,166,202,0.16));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.ist-card:hover .ist-card-icon { transform: rotate(-5deg) scale(1.08); }
.ist-card-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  background: var(--ist-soft); color: var(--ist-purple-deep);
  white-space: nowrap;
}
.ist-card-title {
  font-size: 18px; font-weight: 600; margin: 0;
  letter-spacing: -0.014em; color: var(--ist-text);
  line-height: 1.25;
}
.ist-card-desc {
  font-size: 14px; line-height: 1.55; color: var(--ist-mute); margin: 0;
  flex: 1;
}
.ist-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid var(--ist-border);
}
.ist-card-time {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ist-mute);
}
.ist-card-arrow {
  font-size: 13px; font-weight: 500; color: var(--ist-purple-deep);
  display: inline-flex; gap: 4px; align-items: center;
  transition: transform .15s;
}
.ist-card:hover .ist-card-arrow { transform: translateX(4px); }

/* Listing footer (closing CTA) */
.ist-listing-footer {
  margin-top: 48px;
}
.ist-listing-footer-inner {
  text-align: center;
  background: var(--ist-card);
  border: 1px solid var(--ist-border);
  border-radius: 16px;
  padding: 48px 24px;
  box-shadow: var(--ist-shadow);
}
.ist-listing-footer-inner h2 {
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2; letter-spacing: -0.025em; font-weight: 600;
  margin: 0 0 10px;
  color: var(--ist-text);
}
.ist-listing-footer-inner p {
  font-size: 16px; line-height: 1.55;
  color: var(--ist-mute);
  max-width: 480px; margin: 0 auto 22px;
}

/* ───── External (legacy) cards: emoji icon + ext badge ───── */
.ist-card-icon-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(240,166,202,0.18), rgba(156,137,184,0.14));
  font-size: 26px; line-height: 1;
  filter: drop-shadow(0 2px 5px rgba(45,37,64,0.08));
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.ist-card-external:hover .ist-card-icon-emoji { transform: rotate(-6deg) scale(1.1); }
.ist-card-badge-ext {
  background: rgba(240,166,202,0.16) !important;
  color: var(--ist-pink-deep) !important;
}

/* ───── Search filtering ───── */
.ist-card.is-hidden-search { display: none !important; }
.ist-cat.is-hidden-empty { display: none !important; }
.ist-no-results {
  text-align: center;
  padding: 80px 24px;
  background: var(--ist-card);
  border: 1px dashed var(--ist-border);
  border-radius: 16px;
  margin-top: 32px;
}
.ist-no-results-icon { font-size: 44px; margin-bottom: 12px; }
.ist-no-results h3 {
  font-size: 22px; font-weight: 600; margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.ist-no-results p { color: var(--ist-mute); margin: 0; font-size: 15px; }

/* Highlight matched text */
.ist-card mark.ist-hl {
  background: rgba(240,166,202,0.45);
  color: inherit;
  padding: 0 2px; border-radius: 3px;
}

/* ════════════════════════════════════════════════════════════
   PageSpeed Battle — split inputs + animated scoreboard
════════════════════════════════════════════════════════════ */
.ist-battle-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
}
@media (max-width: 600px) {
  .ist-battle-inputs { grid-template-columns: 1fr; }
  .ist-battle-vs { justify-self: center; }
}
.ist-battle-side .ist-label {
  display: flex; align-items: center; gap: 8px;
}
.ist-side-a .ist-label::before,
.ist-side-b .ist-label::before {
  content: "";
  width: 10px; height: 10px; border-radius: 50%;
}
.ist-side-a .ist-label::before { background: #4f46e5; }
.ist-side-b .ist-label::before { background: var(--ist-pink-deep); }
.ist-battle-vs {
  font-size: 24px; font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ist-purple-deep);
  background: linear-gradient(135deg, rgba(156,137,184,.16), rgba(240,166,202,.16));
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ist-border);
}

/* Battle scoreboard */
.ist-battle-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--ist-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--ist-shadow);
  position: relative;
}
.ist-battle-col {
  padding: 28px 24px;
  position: relative;
  text-align: center;
  transition: background .4s ease;
}
.ist-battle-col.is-A { border-right: 1px solid var(--ist-border); }
.ist-battle-col.is-winner {
  background: linear-gradient(180deg, rgba(22,163,74,0.05) 0%, rgba(22,163,74,0.0) 80%);
}
.ist-battle-col.is-winner::before {
  content: "👑";
  position: absolute; top: 10px; right: 50%; transform: translateX(50%);
  font-size: 24px;
  animation: ist-crown-pop .8s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes ist-crown-pop {
  from { opacity: 0; transform: translateX(50%) translateY(-20px) scale(.6) rotate(-20deg); }
  to   { opacity: 1; transform: translateX(50%) translateY(0) scale(1) rotate(0); }
}
.ist-battle-favicon {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--ist-card) center/contain no-repeat;
  border: 1px solid var(--ist-border);
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; color: var(--ist-mute);
}
.ist-battle-host {
  font-size: 14px; font-weight: 600;
  color: var(--ist-text);
  margin-bottom: 16px;
  word-break: break-all;
  letter-spacing: -0.01em;
}
.ist-battle-scores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ist-battle-metric {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 8px;
  background: var(--ist-card);
  border-radius: 10px;
  position: relative;
  transition: background .25s, transform .25s;
}
.ist-battle-metric.is-win {
  background: rgba(22,163,74,0.10);
}
.ist-battle-metric.is-win::after {
  content: "✓";
  position: absolute; top: 4px; right: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--ist-success);
}
.ist-battle-metric-num {
  font-size: 26px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ist-text);
  line-height: 1.1;
}
.ist-battle-metric-lbl {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ist-mute); margin-top: 4px;
}
.ist-battle-summary {
  background: var(--ist-purple-ink);
  color: #fff;
  padding: 22px 24px;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
}
.ist-battle-verdict {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
}
.ist-battle-tally {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
}
.ist-battle-tally strong { color: #fff; }
.ist-battle-replay {
  margin-top: 20px;
  display: flex; justify-content: center; gap: 10px;
}

/* ════════════════════════════════════════════════════════════
   Topic Map Builder — sections tree + related + pageviews
════════════════════════════════════════════════════════════ */
.ist-topic-header {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--ist-border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--ist-shadow);
  margin-bottom: 18px;
}
@media (max-width: 600px) { .ist-topic-header { grid-template-columns: 60px 1fr; } .ist-topic-stats { grid-column: 1 / -1; } }
.ist-topic-img {
  width: 88px; height: 88px; border-radius: 12px;
  background: var(--ist-card) center/cover no-repeat;
  border: 1px solid var(--ist-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ist-mute); font-size: 28px; font-weight: 600;
}
.ist-topic-title {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.ist-topic-desc {
  font-size: 14px;
  color: var(--ist-mute);
  margin: 0;
}
.ist-topic-abstract {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ist-text);
  margin: 8px 0 0;
  max-width: 60ch;
}
.ist-topic-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.ist-topic-stat-num {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ist-purple-deep);
  font-variant-numeric: tabular-nums;
}
.ist-topic-stat-lbl {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ist-mute);
  font-weight: 600;
}

/* Sections tree */
.ist-section-tree {
  background: #fff; border: 1px solid var(--ist-border); border-radius: 14px;
  padding: 18px 22px; box-shadow: var(--ist-shadow);
  margin-bottom: 18px;
}
.ist-section-tree h3 {
  font-size: 17px; margin: 0 0 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.ist-section-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--ist-border);
}
.ist-section-row:last-child { border-bottom: 0; }
.ist-section-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ist-mute);
  min-width: 50px;
  font-variant-numeric: tabular-nums;
}
.ist-section-title {
  font-size: 14px;
  color: var(--ist-text);
  flex: 1;
}
.ist-section-level-2 .ist-section-title { font-weight: 600; }
.ist-section-level-3 { padding-left: 20px; }
.ist-section-level-3 .ist-section-title { color: var(--ist-text); }
.ist-section-level-4 { padding-left: 40px; }
.ist-section-level-4 .ist-section-title { color: var(--ist-mute); }
.ist-section-level-5 { padding-left: 60px; }
.ist-section-level-5 .ist-section-title { color: var(--ist-mute); font-size: 13px; }
.ist-section-level-6 { padding-left: 80px; }
.ist-section-level-6 .ist-section-title { color: var(--ist-mute); font-size: 13px; }
.ist-section-anchor {
  font-size: 11px; color: var(--ist-purple-deep);
  text-decoration: none;
  opacity: 0; transition: opacity .15s;
}
.ist-section-row:hover .ist-section-anchor { opacity: 1; }

/* Related topics chips */
.ist-related-wrap {
  background: #fff; border: 1px solid var(--ist-border); border-radius: 14px;
  padding: 18px 22px; box-shadow: var(--ist-shadow);
  margin-bottom: 18px;
}
.ist-related-wrap h3 {
  font-size: 17px; margin: 0 0 14px; font-weight: 600;
}
.ist-related-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ist-related-chip,
.entry-content a.ist-related-chip {
  display: inline-flex; padding: 6px 12px;
  border-radius: 999px;
  background: var(--ist-card);
  border: 1px solid var(--ist-border);
  color: var(--ist-text) !important;
  font-size: 13px; font-weight: 500;
  text-decoration: none !important;
  transition: all .15s;
}
.ist-related-chip:hover,
.entry-content a.ist-related-chip:hover {
  background: rgba(156,137,184,.14);
  border-color: var(--ist-purple);
  color: var(--ist-purple-deep) !important;
  transform: translateY(-1px);
}

/* Pageviews mini chart */
.ist-pv-wrap {
  background: #fff; border: 1px solid var(--ist-border); border-radius: 14px;
  padding: 18px 22px; box-shadow: var(--ist-shadow);
}
.ist-pv-wrap h3 {
  font-size: 17px; margin: 0 0 14px; font-weight: 600;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.ist-pv-total {
  font-size: 14px; font-weight: 500;
  color: var(--ist-purple-deep);
  font-variant-numeric: tabular-nums;
}
.ist-pv-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 100px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ist-border);
}
.ist-pv-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--ist-purple), var(--ist-pink-deep));
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  position: relative;
  transition: height .8s cubic-bezier(.34,1.56,.64,1);
}
.ist-pv-bar:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--ist-purple-ink); color: #fff;
  font-size: 11px; padding: 4px 8px; border-radius: 6px;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════
   Entity Finder by Keyword — compact grid
════════════════════════════════════════════════════════════ */
.ist-ent-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.ist-ent-card,
.entry-content a.ist-ent-card {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  background: #fff; border: 1px solid var(--ist-border); border-radius: 12px;
  text-decoration: none !important;
  color: var(--ist-text) !important;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ist-ent-card:hover,
.entry-content a.ist-ent-card:hover {
  border-color: var(--ist-purple);
  transform: translateY(-2px);
  box-shadow: var(--ist-shadow);
}
.ist-ent-img {
  width: 60px; height: 60px;
  border-radius: 10px;
  background: var(--ist-card) center/cover no-repeat;
  border: 1px solid var(--ist-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ist-mute); font-size: 22px; font-weight: 600;
}
.ist-ent-info { min-width: 0; }
.ist-ent-name {
  font-size: 15px; font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: -0.011em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ist-ent-desc {
  font-size: 12px;
  color: var(--ist-purple-deep);
  margin: 0 0 6px;
  font-weight: 500;
}
.ist-ent-abstract {
  font-size: 13px; line-height: 1.5;
  color: var(--ist-mute);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════
   Local SERP Simulator — live URL builder
════════════════════════════════════════════════════════════ */
.ist-checks { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.ist-check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ist-text);
  cursor: pointer; user-select: none;
}
.ist-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--ist-border); border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  margin: 0 !important; padding: 0 !important;
  flex-shrink: 0;
  position: relative;
}
.ist-check input[type="checkbox"]:checked {
  background: var(--ist-purple-ink);
  border-color: var(--ist-purple-ink);
}
.ist-check input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}

.ist-serp-preview {
  background: #fff;
  border: 1px solid var(--ist-border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--ist-shadow);
  margin-bottom: 18px;
  position: sticky; top: 16px;
  animation: ist-fade-up .35s ease both;
}
.ist-serp-preview-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.ist-serp-preview-h h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ist-mute);
  margin: 0;
}
.ist-serp-url {
  display: block;
  background: var(--ist-card);
  border: 1px solid var(--ist-border);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ist-text);
  word-break: break-all;
  max-height: 140px;
  overflow-y: auto;
  margin-bottom: 14px;
}
.ist-serp-url .ist-url-key { color: var(--ist-purple-deep); font-weight: 600; }
.ist-serp-url .ist-url-val { color: var(--ist-text); }
.ist-serp-url .ist-url-sep { color: var(--ist-mute); }
.ist-serp-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.ist-serp-params {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ist-border);
}
.ist-serp-param {
  display: flex; flex-direction: column;
  padding: 8px 12px;
  background: var(--ist-card);
  border-radius: 8px;
  font-size: 12px;
}
.ist-serp-param-key {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ist-purple-deep);
  font-weight: 600;
  margin-bottom: 2px;
}
.ist-serp-param-val {
  color: var(--ist-text);
  word-break: break-all;
  font-weight: 500;
}
.ist-serp-param-meaning {
  color: var(--ist-mute);
  font-size: 11px;
  margin-top: 2px;
  font-style: italic;
}
.ist-serp-iframe-note {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(240,166,202,0.10);
  border: 1px solid rgba(240,166,202,0.30);
  border-radius: 10px;
  font-size: 12px;
  color: var(--ist-purple-deep);
  line-height: 1.55;
}

/* ───── Disclaimer / footer note ───── */
.ist-note {
  font-size: 13px; color: var(--ist-mute);
  background: var(--ist-card); border-left: 3px solid var(--ist-purple);
  padding: 12px 16px; border-radius: 8px;
  margin-top: 18px;
}

/* ───── Sticky breadcrumb back ───── */
.ist-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ist-mute);
  text-decoration: none !important;
  padding: 6px 12px; border-radius: 8px; background: var(--ist-card);
  margin-bottom: 16px;
  transition: background .15s;
}
.ist-back:hover { background: var(--ist-soft); color: var(--ist-purple-deep); }
