/* ==========================================================================
   CrapCleaner website
   Palette taken from the application's default "Dark" theme
   (crapcleaner/gui/theme.py), so the site and the app read as one product.
   Border radius is capped at 4px everywhere.
   ========================================================================== */

:root {
  --window:    #0d0e12;
  --panel:     #14151a;
  --surface:   #1b1d24;
  --surface-2: #24262f;
  --elevated:  #2d303b;
  --border:    #24262f;
  --border-2:  #363a47;

  --text:  #f8fafc;
  --muted: #cbd5e1;
  --faint: #94a3b8;

  --accent:         #3b82f6;
  --accent-hover:   #60a5fa;
  --accent-pressed: #2563eb;
  --accent-soft:    rgba(59, 130, 246, 0.15);

  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --review:  #f97316;
  --info:    #06b6d4;

  --radius: 4px;
  --maxw: 1140px;
  --gap: 24px;

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Inter, Helvetica, Arial, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "SF Mono", Menlo, monospace;

  color-scheme: dark;
}

/* The application ships a Light theme too. This mirrors it for visitors whose
   system asks for light, and for the header toggle. */
[data-theme="light"] {
  --window:    #ffffff;
  --panel:     #f8fafc;
  --surface:   #f1f5f9;
  --surface-2: #e2e8f0;
  --elevated:  #ffffff;
  --border:    #e2e8f0;
  --border-2:  #cbd5e1;

  --text:  #0f172a;
  --muted: #475569;
  --faint: #64748b;

  --accent:         #2563eb;
  --accent-hover:   #1d4ed8;
  --accent-pressed: #1e40af;
  --accent-soft:    rgba(37, 99, 235, 0.10);

  --success: #059669;
  --warning: #d97706;
  --danger:  #dc2626;
  --review:  #ea580c;
  --info:    #0891b2;

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--window);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0 0 16px; padding-left: 20px; }
li { margin-bottom: 6px; }
li:last-child { margin-bottom: 0; }

img, svg { max-width: 100%; height: auto; display: block; }

code, kbd, pre { font-family: var(--mono); font-size: 0.875em; }

code {
  /* Inline code names are short and must not break mid-token across lines. */
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1px 5px;
  color: var(--muted);
}

kbd {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: var(--radius);
  padding: 1px 6px;
  font-size: 0.8125rem;
  color: var(--text);
}

:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 72px 0; border-top: 1px solid var(--border); }
.section--first { border-top: 0; }

/* A hero already carries generous padding, so the section directly under it
   does not need a second full stack of space. */
.hero + .section--first { padding-top: 28px; }
.section--tight { padding: 48px 0; }

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 10px;
}

.lede { color: var(--muted); font-size: 1.0625rem; max-width: 68ch; }

.section-head { margin-bottom: 32px; }

/* --------------------------------------------------------------------------
   Header and navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--window);
  border-bottom: 1px solid var(--border);
}

.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: 62px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; }
.brand__ver {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--faint);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 0 4px;
}

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }

.site-nav a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}
.site-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--faint); }
.icon-btn svg { width: 17px; height: 17px; }

.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--faint); text-decoration: none; }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-pressed); border-color: var(--accent-pressed); }

.btn--lg { padding: 13px 22px; font-size: 1rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row--spaced { margin-top: 26px; }

/* A quiet aside under a block of content. */
.note { margin-top: 18px; color: var(--faint); font-size: 0.875rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { padding: 72px 0 56px; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 48px;
  align-items: start;
}

.hero h1 { margin-bottom: 18px; }
.hero__lede { font-size: 1.125rem; color: var(--muted); max-width: 58ch; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  font-size: 0.875rem;
  color: var(--faint);
}
.hero__meta strong { color: var(--muted); font-weight: 600; }

.hero__panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.hero__panel h2 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.hero__panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  font-size: 0.875rem;
}
.hero__panel dt { color: var(--faint); }
.hero__panel dd { margin: 0; color: var(--text); text-align: right; font-weight: 600; }

/* --------------------------------------------------------------------------
   Screenshot frame
   -------------------------------------------------------------------------- */

.shot {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.75rem;
  color: var(--faint);
  font-family: var(--mono);
}

.shot img { width: 100%; aspect-ratio: 1440 / 900; }

.shot__caption {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--faint);
}

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }

.tabs button {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}
.tabs button:hover { background: var(--surface); color: var(--text); }
.tabs button[aria-selected="true"] {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--text);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Cards and grids
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.9375rem; }

.card__num { font-family: var(--mono); font-size: 0.75rem; color: var(--accent-hover); margin-bottom: 10px; }

/* Numbered principles, rendered as rows rather than another box grid. */
.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.rules li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.rules__n { font-family: var(--mono); font-size: 0.8125rem; color: var(--faint); padding-top: 2px; }
.rules h3 { font-size: 1rem; margin-bottom: 4px; }
.rules p { color: var(--muted); font-size: 0.9375rem; margin: 0; }

.feature-group { margin-bottom: 40px; }
.feature-group:last-child { margin-bottom: 0; }
.feature-group > h3 {
  padding-bottom: 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feature-list li { margin: 0; max-width: 88ch; font-size: 0.9375rem; color: var(--muted); }
.feature-list strong { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }

th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }

thead th {
  background: var(--surface);
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td strong { font-weight: 600; }

/* --------------------------------------------------------------------------
   Tags
   -------------------------------------------------------------------------- */

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}
.tag--safe    { color: var(--success); border-color: var(--success); background: rgba(16, 185, 129, 0.10); }
.tag--low     { color: var(--info);    border-color: var(--info);    background: rgba(6, 182, 212, 0.10); }
.tag--review  { color: var(--review);  border-color: var(--review);  background: rgba(249, 115, 22, 0.10); }
.tag--danger  { color: var(--danger);  border-color: var(--danger);  background: rgba(239, 68, 68, 0.10); }
.tag--neutral { color: var(--faint);   border-color: var(--border-2); }

/* --------------------------------------------------------------------------
   Code blocks
   -------------------------------------------------------------------------- */

.code {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 16px;
}
.code pre { margin: 0; padding: 16px 66px 16px 16px; overflow-x: auto; color: var(--muted); line-height: 1.7; }
.code .cmt { color: var(--faint); }
.code .copy {
  position: absolute;
  top: 8px; right: 8px;
  padding: 4px 9px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--faint);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.code .copy:hover { color: var(--text); border-color: var(--faint); }

/* --------------------------------------------------------------------------
   Download page
   -------------------------------------------------------------------------- */

.dl-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.dl-card--suggested { border-color: var(--accent); }
.dl-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.dl-card__head svg { width: 20px; height: 20px; color: var(--faint); flex: none; }
.dl-card h3 { margin: 0; }
.dl-card p { color: var(--muted); font-size: 0.9375rem; flex: 1 1 auto; }
.dl-card .btn { margin-top: 16px; align-self: flex-start; }
.dl-card__note { font-size: 0.8125rem; color: var(--faint); margin-top: 10px; }

.suggested-flag {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  position: relative;
  padding: 18px 32px 18px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 16px;
  font-family: var(--mono);
  font-size: 1.25rem;
  color: var(--faint);
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--accent-hover); }
.faq__body { padding: 0 32px 20px 0; color: var(--muted); font-size: 0.9375rem; }

/* --------------------------------------------------------------------------
   Call to action
   -------------------------------------------------------------------------- */

.cta {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
}
.cta p { color: var(--muted); max-width: 60ch; margin-left: auto; margin-right: auto; }
.cta .btn-row { justify-content: center; margin-top: 22px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); padding: 44px 0 36px; font-size: 0.875rem; color: var(--faint); }

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.site-footer__about { margin-top: 12px; max-width: 34ch; }
.site-footer h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--faint); }
.site-footer a:hover { color: var(--text); }
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Analytics & Telemetry Dashboard
   -------------------------------------------------------------------------- */

.analytics-page {
  padding: 48px 24px 80px;
}

.analytics-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.analytics-header__info {
  max-width: 680px;
}

.analytics-title {
  margin: 12px 0 8px;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}

.analytics-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.analytics-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.cache-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--faint);
}

/* Google Material Icons (Inline SVG) */
.icon-mat {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-mat--sm {
  width: 14px;
  height: 14px;
}

.icon-mat--lg {
  width: 24px;
  height: 24px;
}

.text-warning { color: var(--warning); }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.kpi-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.kpi-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-card__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-card__icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.kpi-card__value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.kpi-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag--win {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.tag--linux {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag--safe {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag--accent {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  font-family: var(--mono);
}

/* Charts Grid */
.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.chart-card--wide {
  margin-bottom: 24px;
}

.chart-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.chart-card__header h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

/* Platform SVG Bar */
.platform-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.platform-svg {
  width: 100%;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  display: block;
}

.platform-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.9rem;
}

.platform-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-dot--win { background: #3b82f6; }
.legend-dot--linux { background: #f59e0b; }

/* Vitals Matrix */
.vitals-matrix {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vitals-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Release Distribution Bars */
.release-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.release-bar-row {
  display: grid;
  grid-template-columns: 85px 1fr 40px 95px;
  align-items: center;
  gap: 14px;
}

.release-bar-row__track {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  height: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.release-bar-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.release-bar-row__empty {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.15;
}

.release-bar-row__num {
  text-align: right;
  font-size: 0.88rem;
}

.svg-defs-hidden {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Table Search Input */
.table-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  min-width: 220px;
}

.table-search-box:focus-within {
  border-color: var(--accent);
}

.search-input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  width: 100%;
}

.search-input::placeholder {
  color: var(--faint);
}

/* Table */
.table-scroll {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.analytics-table th,
.analytics-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.analytics-table th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.analytics-table tr:hover td {
  background: var(--surface);
}

.release-name-cell {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-accent { color: var(--accent); }
.font-mono { font-family: var(--mono); }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.85rem; }

.link-external {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.link-external:hover {
  text-decoration: underline;
}

/* Languages */
.languages-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.languages-svg {
  width: 100%;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  display: block;
}

.languages-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.88rem;
}

.languages-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Contributors */
.contributors-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contributor-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.contributor-item:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}

.contributor-avatar {
  border-radius: 50%;
  border: 1px solid var(--border-2);
  flex-shrink: 0;
}

.contributor-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contributor-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.contributor-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.contributor-commits {
  font-size: 0.82rem;
}

/* Commits Feed */
.commits-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.commit-item {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.commit-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.commit-msg {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 960px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-charts-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .release-bar-row { grid-template-columns: 75px 1fr 35px; }
  .release-bar-row__date { display: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .section { padding: 52px 0; }
  .hero { padding: 44px 0 36px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 11px 12px; }

  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .rules li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cta { padding: 26px 20px; }
  .btn { width: 100%; justify-content: center; }
  .btn-row { flex-direction: column; }
  .dl-card .btn { align-self: stretch; }
}

@media (max-width: 480px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .brand__ver { display: none; }
}
