/* Law Infographic pages */

.sk-infographic-page {
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

.sk-infographic-page .sk-page-title {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  line-height: 1.25;
}

.sk-infographic-plot-title {
  font-size: clamp(1.25rem, 2.2vw, 1.625rem) !important;
}

.sk-infographic-breadcrumb {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
}

.sk-infographic-breadcrumb a {
  color: #64748b;
  text-decoration: none;
}

.sk-infographic-breadcrumb a:hover {
  color: #4f46e5;
}

/* Hero */
.sk-infographic-hero {
  text-align: center;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1rem;
}

.sk-infographic-hero--compact {
  padding: 1.25rem 1.25rem;
}

.sk-infographic-hero__badge {
  display: inline-block;
  margin-bottom: 0.625rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sk-infographic-hero__desc {
  margin: 0.75rem auto 0;
  max-width: 42rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #64748b;
}

/* Dimension toggle (search hero) */
.sk-infographic-toggle {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.625rem 1rem;
}

.sk-infographic-toggle__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
}

.sk-infographic-toggle__group {
  display: inline-flex;
  padding: 3px;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.sk-infographic-toggle__option {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  margin: 0;
}

.sk-infographic-toggle__option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.sk-infographic-toggle__option span {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.sk-infographic-toggle__option.is-active span,
.sk-infographic-toggle__option input:checked + span {
  background: #fff;
  color: #4f46e5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Stats row */
.sk-infographic-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .sk-infographic-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sk-infographic-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.125rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.sk-infographic-stat--highlight {
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #fafafe 0%, #eef2ff 100%);
}

.sk-infographic-stat__value {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.sk-infographic-stat__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
}

/* Grid layout */
.sk-infographic-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1024px) {
  .sk-infographic-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.25rem;
  }

  .sk-infographic-grid--plot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.sk-infographic-panel {
  padding: 1.125rem 1.25rem;
  margin: 0;
}

.sk-infographic-panel__title {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

.sk-infographic-panel__hint {
  margin: 0 0 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}

/* Charts */
.sk-infographic-chart {
  min-height: 12rem;
  width: 100%;
  overflow-x: auto;
}

.sk-infographic-chart--vertical {
  min-height: 18rem;
}

.sk-infographic-svg {
  display: block;
  min-width: 100%;
}

.sk-infographic-bar-label {
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  fill: #334155;
  pointer-events: none;
}

.sk-infographic-bar-count {
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  fill: #64748b;
  pointer-events: none;
}

.sk-infographic-bar {
  transition: opacity 0.15s ease;
}

.sk-infographic-bar-row:hover .sk-infographic-bar {
  opacity: 0.82;
}

.sk-infographic-bar-row.is-active .sk-infographic-bar-label,
.sk-infographic-bar-row:hover .sk-infographic-bar-label {
  fill: #4f46e5;
  font-weight: 600;
}

.sk-infographic-col {
  transition: opacity 0.15s ease;
}

.sk-infographic-col-row:hover .sk-infographic-col {
  opacity: 0.82;
}

.sk-infographic-col-label {
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  fill: #64748b;
}

.sk-infographic-col-value {
  font-family: Inter, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  fill: #fff;
  pointer-events: none;
}

/* Data table */
.sk-infographic-table-wrap {
  max-height: 28rem;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}

.sk-infographic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.sk-infographic-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}

.sk-infographic-table th {
  padding: 0.625rem 0.75rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  user-select: none;
}

.sk-infographic-table th[data-sort]:hover {
  color: #4f46e5;
  background: #f1f5f9;
}

.sk-infographic-table th.is-sorted-asc::after {
  content: ' ↑';
  color: #4f46e5;
}

.sk-infographic-table th.is-sorted-desc::after {
  content: ' ↓';
  color: #4f46e5;
}

.sk-infographic-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.sk-infographic-table tbody tr:hover {
  background: #fafafe;
}

.sk-infographic-table td:nth-child(2),
.sk-infographic-table td:nth-child(3),
.sk-infographic-table th:nth-child(2),
.sk-infographic-table th:nth-child(3) {
  text-align: right;
}

.sk-infographic-table__link {
  color: #334155;
  font-weight: 500;
  text-decoration: none;
}

.sk-infographic-table__link:hover {
  color: #4f46e5;
  text-decoration: underline;
}

/* CTA / examples */
.sk-infographic-cta {
  margin-top: 1rem;
  text-align: center;
  padding: 1.25rem 1.5rem;
}

.sk-infographic-cta__title {
  margin: 0 0 0.375rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.sk-infographic-cta__desc {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #64748b;
}

.sk-infographic-cta__examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.sk-infographic-cta__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
}

.sk-infographic-chip {
  display: inline-flex;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.sk-infographic-chip:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
}

.sk-infographic-footnote {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #94a3b8;
}

.sk-infographic-error {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border-color: #fecaca;
  background: #fef2f2;
  text-align: center;
}

.sk-infographic-error__title {
  margin: 0 0 0.375rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #b91c1c;
}

.sk-infographic-error__desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #991b1b;
}

.sk-infographic-error__desc a {
  color: #4f46e5;
  font-weight: 600;
}

/* Legacy chart wrap (kept for wordbubble/wordrow pages) */
.sk-infographic-page .sk-chart-wrap {
  min-height: 0;
  max-width: 640px;
  margin: 0 auto;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sk-infographic-total {
  margin-top: 0.75rem;
  margin-bottom: 0;
  text-align: center;
}

/* Word-row visualization */
.sk-wordrow-page {
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

.sk-wordrow-hero {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.sk-wordrow-hero .sk-page-title {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.25;
}

.sk-wordrow-hero .sk-page-meta {
  margin-bottom: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.sk-wordrow-hero__desc {
  margin: 0.75rem auto 0;
  max-width: 42rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #64748b;
}

.sk-wordrow-hero__actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.sk-wordrow-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .sk-wordrow-grid {
    grid-template-columns: minmax(340px, 26rem) minmax(0, 1fr);
    gap: 1.25rem;
  }
}

.sk-wordrow-panel {
  display: flex;
  flex-direction: column;
  min-height: 18rem;
  padding: 1rem 1.125rem;
  margin: 0;
}

.sk-wordrow-panel__title {
  margin: 0 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.sk-wordrow-chart__hint {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}

.sk-wordrow-chart__canvas {
  flex: 1 1 auto;
  min-height: 16rem;
  max-height: 70vh;
  overflow: auto;
}

.sk-wordrow-svg {
  display: block;
  min-width: 100%;
}

.sk-wordrow-bar-label {
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  fill: #334155 !important;
  pointer-events: none;
}

.sk-wordrow-bar-count {
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  fill: #64748b !important;
  pointer-events: none;
}

.sk-wordrow-row.is-active .sk-wordrow-bar-label {
  fill: #4f46e5 !important;
  font-weight: 700;
}

.sk-wordrow-row.is-active .sk-wordrow-row__hit {
  fill: rgba(79, 70, 229, 0.06) !important;
}

.sk-wordrow-bar {
  transition: opacity 0.15s ease;
}

.sk-wordrow-row:hover .sk-wordrow-bar {
  opacity: 0.78;
}

.sk-wordrow-selection {
  margin: 0 0 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #64748b;
}

.sk-wordrow-text__body mark.sk-wordrow-highlight,
.sk-wordrow-text mark.sk-wordrow-highlight {
  background-color: #fde68a !important;
  color: #0f172a !important;
  padding: 0 0.12em;
  border-radius: 2px;
}

.sk-wordrow-chart .bars {
  transition: opacity 0.15s ease;
}

.sk-wordrow-chart .bars:hover {
  opacity: 0.65;
}

.sk-wordrow-text {
  flex: 1 1 auto;
  min-height: 0;
}

.sk-wordrow-text__body {
  flex: 1 1 auto;
  max-height: 70vh;
  overflow-y: auto;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #334155;
}

.sk-wordrow-text .highlight {
  background-color: #fde68a;
  color: #0f172a;
  padding: 0 0.1em;
  border-radius: 2px;
}

.sk-wordrow-empty {
  padding: 1.5rem 0.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9375rem;
}

/* Word-bubble visualization */
.sk-wordbubble-page {
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

.sk-wordbubble-panel {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.125rem;
  margin: 0;
}

.sk-wordbubble-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20rem;
  width: 100%;
  overflow: hidden;
}

.sk-wordbubble-svg {
  display: block;
  width: 100%;
  max-width: 820px;
  height: auto;
  margin: 0 auto;
}

.sk-wordbubble-circle {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.sk-wordbubble-circle:hover {
  opacity: 0.72;
}
