/* Theme controls */
.nav-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-cycle-btn {
  display: none !important; /* hidden for now — remove to re-enable theme toggle */
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 0;
  flex-shrink: 0;
}

.theme-cycle-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.theme-cycle-btn:hover {
  color: #fff;
  border-color: rgba(100, 190, 255, 0.25);
  background: rgba(100, 190, 255, 0.08);
}

.theme-cycle-btn:focus-visible {
  outline: 2px solid rgba(100, 190, 255, 0.45);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .nav-controls { gap: 8px; }
  .theme-cycle-btn { width: 30px; height: 30px; }
  .theme-cycle-btn svg { width: 14px; height: 14px; }
}

/* Light theme — additive overrides only; dark mode rules stay unchanged */
html[data-theme="light"] body {
  background: #eef3f9;
  color: #334155;
}

html[data-theme="light"] nav {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .logo-link {
  color: #0f172a;
}

html[data-theme="light"] .logo-link img {
  filter: none;
}

html[data-theme="light"] .nav-links a {
  color: rgba(15, 23, 42, 0.55);
}

html[data-theme="light"] .nav-links a:hover {
  color: #0f172a;
}

html[data-theme="light"] .nav-links a.nav-current {
  color: #1a6dd4;
}

html[data-theme="light"] .nav-toggle {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.03);
}

html[data-theme="light"] .nav-toggle span {
  background: rgba(15, 23, 42, 0.65);
}

html[data-theme="light"] .nav-backdrop {
  background: rgba(15, 23, 42, 0.25);
}

html[data-theme="light"] .theme-cycle-btn {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.03);
  color: rgba(15, 23, 42, 0.55);
}

html[data-theme="light"] .theme-cycle-btn:hover {
  color: #1a6dd4;
  border-color: rgba(26, 109, 212, 0.25);
  background: rgba(26, 109, 212, 0.08);
}

html[data-theme="light"] .lang-switch {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .lang-btn {
  color: rgba(15, 23, 42, 0.45);
}

html[data-theme="light"] .lang-btn:hover {
  color: rgba(15, 23, 42, 0.75);
}

html[data-theme="light"] .lang-btn.active {
  background: rgba(26, 109, 212, 0.12);
  color: #1a6dd4;
  box-shadow: 0 0 0 1px rgba(26, 109, 212, 0.18);
}

html[data-theme="light"] .nav-links .btn-blue,
html[data-theme="light"] .nav-links .btn-blue:hover {
  color: #fff;
}

html[data-theme="light"] .btn-outline {
  color: rgba(15, 23, 42, 0.72);
  border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .btn-outline:hover {
  border-color: rgba(26, 109, 212, 0.35);
  color: #1a6dd4;
}

html[data-theme="light"] footer {
  border-top-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] footer .logo-link img {
  filter: none;
  opacity: 0.55;
}

html[data-theme="light"] footer p {
  color: rgba(15, 23, 42, 0.45);
}

html[data-theme="light"] footer a {
  color: #1a6dd4;
}

@media (max-width: 768px) {
  html[data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.96);
    border-bottom-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
  }

  html[data-theme="light"] .nav-links a:not(.btn) {
    color: rgba(15, 23, 42, 0.72);
  }

  html[data-theme="light"] .nav-links a:not(.btn):hover {
    background: rgba(26, 109, 212, 0.08);
    color: #1a6dd4;
  }
}

/* index.html light overrides */
html[data-theme="light"] .hero-intro-visual {
  background-image: url('hero-intro-visual.png');
  aspect-ratio: 1272 / 889;
}

html[data-theme="light"] .hero h1,
html[data-theme="light"] .hero-intro h1 {
  color: #0f172a;
}

html[data-theme="light"] .hero-sub {
  color: rgba(15, 23, 42, 0.62);
}

html[data-theme="light"] .hero-tag {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(15, 23, 42, 0.92);
  color: #fff;
}

html[data-theme="light"] .hero-tag::before {
  background: #64beff;
  box-shadow: 0 0 8px #64beff;
}

html[data-theme="light"] .hero-canvas .stars {
  opacity: 0.25;
}

html[data-theme="light"] .acard {
  border-color: rgba(26, 109, 212, 0.16);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.92));
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .agent-card .prompt {
  color: #0f172a;
}

html[data-theme="light"] .flow-step {
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.82);
}

html[data-theme="light"] .fare-route,
html[data-theme="light"] .json-line {
  color: rgba(15, 23, 42, 0.55);
}

html[data-theme="light"] .features-heading h2,
html[data-theme="light"] .skill-copy h2,
html[data-theme="light"] .dev-copy h2,
html[data-theme="light"] .cta-block h2 {
  color: #0f172a;
}

html[data-theme="light"] .features-heading .tag,
html[data-theme="light"] .skill-copy .tag,
html[data-theme="light"] .dev-copy .tag {
  color: #1a6dd4;
}

html[data-theme="light"] .bento-card,
html[data-theme="light"] .method-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .bento-card:hover,
html[data-theme="light"] .method-card:hover {
  background: #fff;
  border-color: rgba(26, 109, 212, 0.18);
}

html[data-theme="light"] .bento-card h3,
html[data-theme="light"] .method-info .method-label {
  color: #0f172a;
}

html[data-theme="light"] .bento-card p,
html[data-theme="light"] .skill-copy p,
html[data-theme="light"] .dev-copy p,
html[data-theme="light"] .cta-block p {
  color: rgba(15, 23, 42, 0.62);
}

html[data-theme="light"] .stat .val {
  color: #0f172a;
}

html[data-theme="light"] .stat .lab {
  color: rgba(15, 23, 42, 0.45);
}

html[data-theme="light"] .stats-bar {
  border-top-color: rgba(15, 23, 42, 0.08);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .skill-section::before {
  background: linear-gradient(90deg, transparent, rgba(26, 109, 212, 0.12), transparent);
}

html[data-theme="light"] .method-num {
  background: rgba(26, 109, 212, 0.08);
  border-color: rgba(26, 109, 212, 0.12);
  color: #1a6dd4;
}

html[data-theme="light"] .method-info .method-code-wrap code,
html[data-theme="light"] .copy-btn {
  background: rgba(26, 109, 212, 0.06);
  border-color: rgba(26, 109, 212, 0.1);
  color: #1a6dd4;
}

html[data-theme="light"] .chip {
  color: rgba(26, 109, 212, 0.75);
  background: rgba(26, 109, 212, 0.06);
  border-color: rgba(26, 109, 212, 0.1);
}

html[data-theme="light"] .dev-section .dev-copy .tag,
html[data-theme="light"] .dev-section .dev-copy h2,
html[data-theme="light"] .dev-section .dev-copy p {
  background: transparent;
}

html[data-theme="light"] .dev-section .chip {
  background: transparent;
  border-color: rgba(26, 109, 212, 0.18);
  color: rgba(26, 109, 212, 0.82);
}

html[data-theme="light"] .code-block {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .code-block .demo-bar {
  background: #eef3f9;
}

html[data-theme="light"] .code-block .demo-bar strong {
  color: rgba(15, 23, 42, 0.45);
}

html[data-theme="light"] .code-block pre {
  color: rgba(15, 23, 42, 0.72);
}

/* mcp.html light overrides */
html[data-theme="light"] .mcp-hero h1,
html[data-theme="light"] .section h2,
html[data-theme="light"] .section h3,
html[data-theme="light"] .step-body h4,
html[data-theme="light"] .contact-card .contact-value {
  color: #0f172a;
}

html[data-theme="light"] .mcp-hero .subtitle,
html[data-theme="light"] .section p,
html[data-theme="light"] .tool-desc,
html[data-theme="light"] .step-tip,
html[data-theme="light"] .notice-list li,
html[data-theme="light"] .contact-steps li,
html[data-theme="light"] td {
  color: rgba(15, 23, 42, 0.68);
}

html[data-theme="light"] .mcp-badge {
  background: rgba(26, 109, 212, 0.08);
  border-color: rgba(26, 109, 212, 0.18);
  color: #1a6dd4;
}

html[data-theme="light"] .toc,
html[data-theme="light"] .section,
html[data-theme="light"] .contact-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .toc h3,
html[data-theme="light"] .param-group-title,
html[data-theme="light"] .contact-card .contact-label,
html[data-theme="light"] th {
  color: rgba(15, 23, 42, 0.45);
}

html[data-theme="light"] .toc a {
  color: rgba(15, 23, 42, 0.62);
}

html[data-theme="light"] .toc a:hover,
html[data-theme="light"] .toc a.active {
  background: rgba(26, 109, 212, 0.08);
  color: #1a6dd4;
}

html[data-theme="light"] .section h2 {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .flow {
  background: rgba(26, 109, 212, 0.06);
  border-color: rgba(26, 109, 212, 0.14);
}

html[data-theme="light"] .tool-badge {
  background: rgba(26, 109, 212, 0.08);
  border-color: rgba(26, 109, 212, 0.16);
  color: #1a6dd4;
}

html[data-theme="light"] th {
  background: rgba(15, 23, 42, 0.03);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] td {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] tr:hover td {
  background: rgba(26, 109, 212, 0.04);
}

html[data-theme="light"] code {
  border-color: rgba(26, 109, 212, 0.12);
  color: #1a6dd4;
}

html[data-theme="light"] .code-block {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .code-block .code-header {
  background: #eef3f9;
  color: rgba(15, 23, 42, 0.45);
}

html[data-theme="light"] .code-block pre {
  color: rgba(15, 23, 42, 0.72);
}

html[data-theme="light"] .alert-warning {
  background: rgba(255, 200, 80, 0.12);
  border-color: rgba(180, 120, 0, 0.2);
  color: #92400e;
}

html[data-theme="light"] .alert-info {
  background: rgba(26, 109, 212, 0.08);
  border-color: rgba(26, 109, 212, 0.16);
  color: #1e40af;
}

html[data-theme="light"] .alert a,
html[data-theme="light"] .alert-link,
html[data-theme="light"] .contact-card .contact-value a {
  color: #1a6dd4;
}

html[data-theme="light"] .notice-list li {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .notice-list .notice-num {
  background: rgba(26, 109, 212, 0.1);
  color: #1a6dd4;
}
