/* Metaphor Explorer — Academic theme */

/* Design tokens */
:root {
  /* WH guideline font: Roboto */
  --font-sans: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  --font-serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  /* WH brand colors from Kolorystyka */
  --color-primary: #2A3755; /* navy */
  --color-primary-contrast: #ffffff;
  --color-accent: #E95229;  /* orange */

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);

  /* Override Bootswatch defaults for cards */
  --bs-card-cap-bg: var(--color-primary);
  --bs-card-cap-color: var(--color-primary-contrast);
}

/* Base */
html, body {
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--color-text);
}
h2 {
  margin: var(--space-4) 0 var(--space-3);
  padding-bottom: var(--space-1);
  position: relative;
  border-bottom: 1px solid #e2e8f0;
}
h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 999px;
}

p, li { color: var(--color-text); }
small, .muted { color: var(--color-muted); }

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-5);
  margin-bottom: var(--space-4);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--space-4);
  align-items: center;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 30px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}
.brand-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.app-brand span {
  display: inline-block;
  padding-bottom: 6px;
}
.app-brand span::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 999px;
  margin-top: 6px;
}
.app-brand small {
  font-size: 13px;
  color: var(--color-muted);
  letter-spacing: 0.5px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.header-actions .form-group {
  margin-bottom: 0;
}
.header-actions label {
  display: none;
}
.header-actions input.form-control {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  box-shadow: none;
}
.header-actions .btn {
  background: var(--color-accent);
  border: none;
  color: var(--color-primary-contrast);
  font-weight: 600;
}
.header-actions .btn:hover {
  background: #cf421c;
}
.app-logos {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.app-logos img { height: 34px; }

.overview-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(120deg, #2A3755, #1c2540);
  color: #fff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: var(--space-5);
}
.hero-content {
  max-width: 720px;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  margin-bottom: var(--space-2);
}
.hero-content h1 {
  margin: 0 0 var(--space-3);
  color: #fff;
  font-size: 34px;
}
.hero-content p {
  font-size: 17px;
  color: #f0f4ff;
  margin-bottom: var(--space-3);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.overview-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.stat-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.stat-card span {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.stat-card strong {
  display: block;
  font-size: 30px;
  margin: var(--space-2) 0;
  color: #0f172a;
  font-weight: 700;
}
.stat-card small {
  color: var(--color-muted);
  font-size: 12px;
}
.overview-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.feature-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.feature-card img {
  width: 108px;
  height: 108px;
  flex: 0 0 108px;
  object-fit: contain;
}
.feature-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.feature-card h3 {
  margin: 0;
  font-size: 18px;
  color: var(--color-primary);
}
.feature-card p {
  margin: 0;
  color: var(--color-text);
  line-height: 1.5;
}
.feature-card footer {
  margin-top: var(--space-3);
}
.feature-card footer .btn {
  margin-right: var(--space-2);
}
@media (max-width: 768px) {
  .feature-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .feature-card img {
    width: 84px;
    height: 84px;
  }
}
.overview-cta-band {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
}
.overview-cta-band h4 {
  margin: 0 0 var(--space-1);
  color: #fff;
}
.overview-cta-band p {
  margin: 0;
  color: rgba(255,255,255,0.85);
}
.overview-cta-band .btn {
  border: 1px solid #fff;
  color: var(--color-primary);
  background: #fff;
}
.compact-divider {
  margin: 0 var(--space-1);
  color: var(--color-muted);
}
.btn-card {
  margin-top: auto;
}
.overview-timeline {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.overview-timeline ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}
.overview-timeline li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid #e2e8f0;
}
.overview-timeline li:last-child {
  border-bottom: none;
}
.overview-timeline strong {
  display: block;
  color: var(--color-primary);
  margin-bottom: 2px;
}
.works-intro {
  margin-bottom: var(--space-4);
}
.fragments-card .selectize-control {
  margin-bottom: var(--space-3);
}
.work-metrics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.work-meta-info {
  font-size: 13px;
  color: var(--color-muted);
}
.work-fragment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow: auto;
  border-top: 1px solid var(--color-border);
}
.work-fragment-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.work-fragment-list li span:first-child {
  font-weight: 500;
}
.fragment-count-pill {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--color-text);
}

/* Grid columns — used with existing Shiny columns */
.app-grid { align-items: flex-start; }
.sidebar { padding-right: var(--space-3); }
.content { padding: 0 var(--space-3); }
.inspector { padding-left: var(--space-3); }

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}
.card h3 {
  margin-top: 0;
  margin-bottom: var(--space-3);
  font-size: 20px;
}
.card-header {
  background: #f8fafc;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: var(--space-3) var(--space-4);
}
.card-header h3 {
  margin-bottom: 0;
  color: var(--color-text);
}
.card-header .nav-tabs {
  border-bottom: none;
}
.card-header .nav-tabs .nav-link {
  color: var(--color-text);
}
.card-header .nav-tabs .nav-link.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Sticky sidebar and inspector */
.sidebar .card, .inspector .card {
  position: sticky;
  top: calc(56px + var(--space-4)); /* header height + gap */
}

/* Inputs styling (Selectize, buttons) */
.selectize-control.single .selectize-input,
.selectize-control.multi .selectize-input {
  border: 1px solid #94a3b8;
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.selectize-control.single .selectize-input.input-active,
.selectize-control.multi .selectize-input.input-active,
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(42, 55, 85, 0.15);
}
.form-control {
  border: 1px solid #94a3b8;
  border-radius: var(--radius-sm);
  box-shadow: none;
}
input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  border: 2px solid #94a3b8;
  border-radius: 3px;
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.btn,
.btn-primary,
.btn-secondary,
.btn-default {
  border-radius: 999px !important;
  padding: 0.4rem 1.4rem !important;
  font-weight: 600;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn,
.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary-contrast);
}
.btn:hover,
.btn-primary:hover {
  background: #d1431f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.8) !important;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.btn-secondary,
.btn-default {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}
.btn-secondary:hover,
.btn-default:hover {
  background: #1f2a40;
  transform: translateY(-1px);
}
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.detail-actions {
  margin-left: auto;
}
.detail-actions .btn {
  padding: 0.3rem 0.9rem !important;
}

/* Plot containers */
.plot-card .js-plotly-plot {
  border-radius: var(--radius-sm);
}

/* Tables (qgrid) */
.qgrid-container, .qgrid-container * {
  font-size: 13px;
}
.qgrid-container .slick-header-columns {
  background: var(--color-bg);
}

/* Excerpt formatting */
.inspector-card .excerpt {
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.75;
  hyphens: auto;
}

/* Highlight classes for semantic coloring */
.hl-target { color: var(--color-accent); font-weight: 700; }
.hl-source { color: var(--color-primary); font-weight: 700; }

/* Links and accents */
a { color: var(--color-accent); }
a:hover { text-decoration: underline; }

/* Footer (placeholder) */
.app-footer {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: #f1f5f9;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  font-size: 14px;
  color: var(--color-text);
}
.app-footer .footer-column p {
  margin: 0 0 var(--space-2);
}
.app-footer .logos {
  align-items: center;
  text-align: center;
}
.app-footer .logos img {
  height: 44px;
  margin: 0 var(--space-1);
}
/* Top nav tabs */
.primary-nav-card {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}
.primary-nav-card .card-header {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: var(--space-2);
}
.primary-nav-card ul.nav,
.primary-nav-card .nav-tabs,
.primary-nav-card .nav.nav-tabs {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1);
  gap: var(--space-1);
  box-shadow: var(--shadow-sm);
}
.primary-nav-card .nav-tabs .nav-link {
  color: var(--color-text);
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-weight: 500;
}
.primary-nav-card .nav-tabs .nav-link:hover {
  background: #f8fafc;
  color: var(--color-primary);
}
.primary-nav-card .nav-tabs .nav-link.active {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  box-shadow: none;
}

.nav-tabs {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.nav-tabs .nav-link {
  color: var(--color-text);
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.nav-tabs .nav-link.active {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  background: transparent;
}

/* Nested navs inside cards */
.card .nav-tabs,
.card-header .nav-tabs {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.card .nav-tabs .nav-link,
.card-header .nav-tabs .nav-link {
  color: var(--color-text);
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.card .nav-tabs .nav-link.active,
.card-header .nav-tabs .nav-link.active {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  background: transparent;
  box-shadow: none;
}
.filters-card h3 {
  margin-top: 0;
}
.filters-card h4 {
  margin-top: var(--space-4);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
}
.filter-actions {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.filter-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.filter-chip {
  background: #fef3ec;
  border: 1px solid #f9d5c4;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
}
.filter-chip strong {
  color: var(--color-primary);
}
.filter-help {
  margin-bottom: var(--space-2);
}
.filter-help summary {
  cursor: pointer;
  color: var(--color-accent);
  font-weight: 600;
}
.inline-button-group {
  display: inline-flex;
  gap: var(--space-2);
  margin: var(--space-2) 0;
}
.inline-button-group .btn {
  flex: 0 0 auto;
}
.fragment-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.fragment-controls .form-group {
  flex: 1;
  margin-bottom: 0;
}
.fragment-controls .btn {
  height: fit-content;
  margin-top: -8px;
}

/* Inspector detail styling */
.fragment-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: #fff;
  margin-bottom: var(--space-4);
}
.fragment-detail.variant-even {
  background: #ffffff;
}
.fragment-detail.variant-odd {
  background: #e6ecf3;
}
.fragment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.summary-chip {
  display: inline-flex;
  flex-direction: column;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  min-width: 110px;
}
.summary-chip small {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}
.summary-chip strong {
  font-size: 16px;
  color: var(--color-primary);
}
.fragment-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  padding: var(--space-3);
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.fragment-meta-item span:first-child {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 4px;
}
.fragment-meta-item strong {
  font-size: 16px;
}
.excerpt-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}
.excerpt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.excerpt-body {
  padding: var(--space-3);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.8;
}
.annotation-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: var(--space-3);
}
.annotation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}
.annotation-count {
  font-size: 13px;
  color: var(--color-muted);
}
.annotation-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.annotation-table th,
.annotation-table td {
  padding: var(--space-2);
  border-top: 1px solid var(--color-border);
  vertical-align: top;
}
.annotation-table th {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  color: var(--color-muted);
  background: #f8fafc;
}
.highlight-legend {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.legend-source {
  background: var(--color-primary);
}
.legend-target {
  background: var(--color-accent);
}
.paraphrase-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-primary-contrast);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  position: relative;
}
.paraphrase-badge::after {
  content: attr(data-info);
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  min-width: 160px;
  max-width: 220px;
  white-space: pre-wrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 6;
}
.paraphrase-badge:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.lu-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-2);
}
.lu-table th, .lu-table td {
  border: 1px solid var(--color-border);
  padding: var(--space-2);
  font-size: 14px;
}
.lu-table th {
  background: #f8fafc;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}
.annotation-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  margin-top: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.annotation-card h5 {
  margin: 0;
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}
.annotation-table {
  width: 100%;
  border-collapse: collapse;
}
.annotation-table th,
.annotation-table td {
  border: 1px solid var(--color-border);
  padding: var(--space-2);
  font-size: 14px;
  vertical-align: top;
}
.annotation-table th {
  background: #f8fafc;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}
.annotation-table td code {
  background: #f1f5f9;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.coders-list .coder-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(42, 55, 85, 0.1);
  margin-right: var(--space-2);
  margin-bottom: var(--space-1);
  font-size: 13px;
}
.detail-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.fragment-compact-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: #fff;
}
.fragment-compact-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  cursor: pointer;
  font-weight: 600;
}
.compact-summary {
  display: flex;
  flex-direction: column;
}
.compact-divider {
  margin: 0 var(--space-1);
}
.fragment-compact-card .compact-summary-text span {
  color: var(--color-muted);
  font-size: 13px;
}
.compact-hint {
  font-size: 13px;
  color: var(--color-accent);
  font-weight: 600;
}
.fragment-compact-card[open] .compact-hint {
  color: var(--color-primary);
}
.fragment-compact-body {
  margin-top: var(--space-2);
  font-family: var(--font-sans);
}
.compact-preview {
  font-style: italic;
  color: var(--color-muted);
}
.compact-hint {
  font-size: 12px;
  color: var(--color-muted);
}
.inspector-empty {
  padding: var(--space-4);
  text-align: center;
  color: var(--color-muted);
  font-style: italic;
}
.about-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  background: linear-gradient(120deg, rgba(42,55,85,0.9), rgba(42,55,85,0.7));
  color: #f8fafc;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.about-intro {
  flex: 2;
  min-width: 260px;
}
.about-intro h2 {
  font-size: 32px;
  margin-bottom: var(--space-2);
  color: #fefefe;
}
.about-cta span {
  display: inline-block;
  margin-right: var(--space-3);
  font-weight: 600;
  color: #fefefe;
}
.about-intro p {
  color: #f8fafc;
}
.about-stats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.about-stats .stat-card {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
  color: #f8fafc;
}
.about-stats .stat-card strong {
  display: block;
  font-size: 28px;
  color: #fefefe;
}
.about-stats .stat-card small {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fefefe;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.about-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.about-card h3 {
  margin-top: 0;
}
.hl-target,
.hl-source {
  position: relative;
  cursor: help;
}
.hl-target::after,
.hl-source::after {
  content: attr(data-info);
  position: absolute;
  left: 0;
  bottom: 125%;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: pre-wrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 5;
  max-width: 220px;
}
.hl-target:hover::after,
.hl-source:hover::after {
  opacity: 1;
  transform: translateY(0);
}
