/* Light theme overrides for GitGooder */
html[data-theme="light"] {
  --gg-text: rgba(30, 36, 58, 0.96);
  --gg-text-soft: rgba(53, 63, 92, 0.84);
  --gg-muted: rgba(84, 96, 128, 0.76);

  --gg-border: rgba(110, 127, 189, 0.16);
  --gg-border-strong: rgba(124, 58, 237, 0.34);

  --gg-card-top: rgba(255, 255, 255, 0.98);
  --gg-card-bottom: rgba(245, 248, 255, 0.92);
  --gg-card-base-1: rgba(255, 255, 255, 0.96);
  --gg-card-base-2: rgba(241, 245, 255, 0.96);

  --gg-shadow-soft: 0 10px 26px rgba(103, 121, 172, 0.12);
  --gg-shadow-card: 0 18px 42px rgba(93, 108, 156, 0.14);
  --gg-shadow-card-hover: 0 18px 42px rgba(124, 58, 237, 0.16);
}

html[data-theme="light"] {
  scrollbar-color: var(--gg-scroll-accent) rgba(99, 114, 170, 0.12);
}

html[data-theme="light"] body {
  color: var(--gg-text);
  background:
    radial-gradient(
      circle at top left,
      rgba(32, 220, 255, 0.08),
      transparent 26%
    ),
    radial-gradient(
      circle at top right,
      rgba(255, 53, 212, 0.07),
      transparent 30%
    ),
    linear-gradient(180deg, #f7f9ff 0%, #eef3ff 48%, #e8eefb 100%);
}

html[data-theme="light"] ::-webkit-scrollbar-track {
  background: linear-gradient(
    180deg,
    rgba(246, 248, 255, 0.98) 0%,
    rgba(237, 242, 255, 0.98) 52%,
    rgba(230, 236, 251, 0.98) 100%
  );
  border-left: 1px solid rgba(120, 137, 184, 0.1);
  box-shadow:
    inset 12px 0 30px rgba(32, 220, 255, 0.04),
    inset 0 -28px 42px rgba(255, 53, 212, 0.05);
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
  border-color: rgba(241, 244, 255, 0.98);
}

html[data-theme="light"] .gg-bg {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #f9fbff 0%, #f3f6ff 38%, #eaf0fd 100%);
}

html[data-theme="light"] .gg-grid {
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.06) 1px, transparent 1px);
  opacity: 0.46;
}

html[data-theme="light"] .gg-noise {
  opacity: 0.018;
}

html[data-theme="light"] .gg-grid-riders {
  opacity: 0.5;
}

html[data-theme="light"] .gg-mouse-glow {
  background:
    radial-gradient(
      circle 240px at var(--mx) var(--my),
      rgba(32, 220, 255, 0.11),
      transparent 60%
    ),
    radial-gradient(
      circle 320px at calc(var(--mx) + 120px) calc(var(--my) + 30px),
      rgba(255, 53, 212, 0.08),
      transparent 68%
    );
}

html[data-theme="light"] .site-header {
  background: rgba(248, 250, 255, 0.84);
  border-bottom: 1px solid rgba(118, 132, 182, 0.12);
}

html[data-theme="light"] .site-nav a {
  color: rgba(49, 57, 84, 0.82);
}

html[data-theme="light"] .site-nav a:hover,
html[data-theme="light"] .section-link,
html[data-theme="light"] .card-link,
html[data-theme="light"] .link-card a:hover {
  color: var(--gg-violet);
}

html[data-theme="light"] .gg-btn-secondary {
  color: var(--gg-text);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92),
    rgba(244, 247, 255, 0.88)
  );
  border: 1px solid rgba(110, 127, 189, 0.18);
}

html[data-theme="light"] .gg-kicker,
html[data-theme="light"] .card-chip,
html[data-theme="light"] .mini-chip {
  color: rgba(44, 52, 78, 0.94);
  border-color: rgba(110, 127, 189, 0.14);
  background: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .gg-title .line-1 {
  background: linear-gradient(90deg, #20263f 0%, #475278 34%, #6a54cf 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

html[data-theme="light"] .section-title {
  background: linear-gradient(
    90deg,
    #20263f 0%,
    #475278 28%,
    #7357ea 58%,
    #c54ac8 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
}

html[data-theme="light"] .gg-card-secondary {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(243, 246, 255, 0.92)
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96),
      rgba(238, 243, 255, 0.94)
    );
}

html[data-theme="light"] .hero-highlight-box,
html[data-theme="light"] .hero-intro-point,
html[data-theme="light"] .result-card,
html[data-theme="light"] .summary-card,
html[data-theme="light"] .chart-card,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .table-card,
html[data-theme="light"] .results-hint-card,
html[data-theme="light"] .insight-card,
html[data-theme="light"] .output-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .table-shell,
html[data-theme="light"] .chart-shell {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(243, 246, 255, 0.9)
  );
  border-color: rgba(110, 127, 189, 0.14);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] option,
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .input-addon,
html[data-theme="light"] .input-prefix,
html[data-theme="light"] .input-suffix,
html[data-theme="light"] .select-wrap,
html[data-theme="light"] .calc-table th,
html[data-theme="light"] .calc-table td {
  background-color: rgba(255, 255, 255, 0.94) !important;
  color: var(--gg-text) !important;
  border-color: rgba(110, 127, 189, 0.18) !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: rgba(98, 109, 140, 0.72);
}

html[data-theme="light"] .site-footer {
  border-top: 1px solid rgba(118, 132, 182, 0.12);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(232, 238, 251, 0.82)
  );
}

html[data-theme="light"] .footer-meta {
  color: rgba(76, 88, 121, 0.78);
}

html[data-theme="light"] .gg-card h3,
html[data-theme="light"] .gg-panel-title {
  color: rgba(24, 30, 48, 0.96);
}

.theme-toggle {
  min-height: 48px;
  padding: 0 12px;
  gap: 10px;
}

.theme-toggle-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(32, 220, 255, 0.22),
    rgba(124, 58, 237, 0.24)
  );
  border: 1px solid rgba(174, 141, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7fbff, #b8ccff);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.22s ease,
    background 0.22s ease;
}

.theme-toggle-label {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

html[data-theme="light"] .theme-toggle-track {
  background: linear-gradient(
    135deg,
    rgba(106, 200, 255, 0.32),
    rgba(32, 220, 255, 0.18)
  );
  border-color: rgba(110, 127, 189, 0.18);
}

html[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(20px);
  background: linear-gradient(135deg, #ffffff, #976aff);
}

@media (max-width: 760px) {
  .theme-toggle {
    width: 60px;
    min-width: 60px;
    min-height: 44px;
    padding: 0;
    gap: 0;
    border-radius: 18px;
  }

  .theme-toggle-track {
    width: 42px;
    height: 24px;
  }

  .theme-toggle-thumb {
    width: 18px;
    height: 18px;
  }

  html[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(18px);
  }

  .theme-toggle-label {
    display: none;
  }
}

html[data-theme="light"] .group-head h4,
html[data-theme="light"] .field label,
html[data-theme="light"] .results-title,
html[data-theme="light"] .chart-title-large,
html[data-theme="light"] .result-value,
html[data-theme="light"] .loan-stat-value,
html[data-theme="light"] .legend-item,
html[data-theme="light"] .chart-range-label {
  color: rgba(31, 39, 63, 0.96);
}

html[data-theme="light"] .result-label,
html[data-theme="light"] .summary-label,
html[data-theme="light"] .loan-stat-label,
html[data-theme="light"] .warning-label,
html[data-theme="light"] .chart-preview-label,
html[data-theme="light"] .chart-note,
html[data-theme="light"] .chart-axis-label,
html[data-theme="light"] .chart-year-label {
  color: rgba(91, 103, 138, 0.92);
  fill: rgba(91, 103, 138, 0.92);
}

html[data-theme="light"] .chart-grid-line {
  stroke: rgba(128, 141, 183, 0.22);
}

html[data-theme="light"] .input-group,
html[data-theme="light"] .summary-panel,
html[data-theme="light"] .warning-panel,
html[data-theme="light"] .full-chart-card,
html[data-theme="light"] .chart-preview-card,
html[data-theme="light"] .result-box,
html[data-theme="light"] .mini-info {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(242, 246, 255, 0.92)
  );
  border-color: rgba(110, 127, 189, 0.16);
}

html[data-theme="light"] .chart-shell {
  background:
    radial-gradient(
      circle at top left,
      rgba(32, 220, 255, 0.09),
      transparent 36%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(157, 137, 255, 0.11),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(243, 246, 255, 0.93)
    );
  border-color: rgba(110, 127, 189, 0.16);
}

html[data-theme="light"] .mode-btn,
html[data-theme="light"] .ghost-action-btn {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(243, 246, 255, 0.92)
  );
  border-color: rgba(110, 127, 189, 0.18);
  color: rgba(31, 39, 63, 0.96);
}

html[data-theme="light"] .mode-btn.active {
  border-color: rgba(110, 127, 189, 0.26);
  box-shadow: 0 10px 22px rgba(106, 123, 173, 0.14);
  background: linear-gradient(
    135deg,
    rgba(32, 220, 255, 0.18),
    rgba(157, 137, 255, 0.24)
  );
}

html[data-theme="light"] .summary-text,
html[data-theme="light"] .warning-text,
html[data-theme="light"] .helper-copy,
html[data-theme="light"] .chart-sub,
html[data-theme="light"] .chart-preview-text,
html[data-theme="light"] .mini-info p {
  color: rgba(84, 96, 128, 0.88);
}

/* Light-theme readability pass: table and schedule text */
html[data-theme="light"] .schedule-label,
html[data-theme="light"] .table-label,
html[data-theme="light"] .rows-label,
html[data-theme="light"] .toolbar-label,
html[data-theme="light"] .legend-label,
html[data-theme="light"] .table-title,
html[data-theme="light"] .table-subtitle {
  color: rgba(54, 66, 98, 0.9) !important;
}

html[data-theme="light"] .table-wrap table,
html[data-theme="light"] .table-shell table,
html[data-theme="light"] .amortization-table,
html[data-theme="light"] .calc-table,
html[data-theme="light"] table {
  color: rgba(31, 39, 63, 0.96);
}

html[data-theme="light"] .table-wrap th,
html[data-theme="light"] .table-shell th,
html[data-theme="light"] .amortization-table th,
html[data-theme="light"] .calc-table th,
html[data-theme="light"] table th {
  color: rgba(93, 104, 136, 0.96) !important;
  background: rgba(246, 249, 255, 0.92) !important;
  border-bottom-color: rgba(110, 127, 189, 0.14) !important;
}

html[data-theme="light"] .table-wrap td,
html[data-theme="light"] .table-shell td,
html[data-theme="light"] .amortization-table td,
html[data-theme="light"] .calc-table td,
html[data-theme="light"] table td,
html[data-theme="light"] tbody td {
  color: rgba(31, 39, 63, 0.96) !important;
  border-bottom-color: rgba(110, 127, 189, 0.12) !important;
}

html[data-theme="light"] .table-wrap tbody tr:nth-child(even) td,
html[data-theme="light"] .table-shell tbody tr:nth-child(even) td,
html[data-theme="light"] .amortization-table tbody tr:nth-child(even) td,
html[data-theme="light"] .calc-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 255, 0.72) !important;
}

html[data-theme="light"] .table-wrap tbody tr:hover td,
html[data-theme="light"] .table-shell tbody tr:hover td,
html[data-theme="light"] .amortization-table tbody tr:hover td,
html[data-theme="light"] .calc-table tbody tr:hover td {
  background: rgba(236, 242, 255, 0.9) !important;
}
