html[data-site-theme="light"] {
  color-scheme: light;
  --site-bg: #fff8df;
  --site-panel-bg: rgba(255, 253, 240, 0.98);
  --site-panel-bg-solid: #fffdf0;
  --site-card-bg: rgba(255, 253, 240, 0.72);
  --site-text: #17243a;
  --site-text-muted: #4d5868;
  --site-accent: #984b00;
  --site-tricolor-saffron: #ff9933;
  --site-tricolor-white: #ffffff;
  --site-tricolor-green: #138808;
  --site-card-hover-bg: rgba(8, 124, 240, 0.07);
  --site-card-hover-border: rgba(8, 124, 240, 0.34);
  --site-card-hover-shadow: 0 8px 18px rgba(27, 53, 88, 0.14);
  --theme-primary: #075fbd;
  --theme-primary-deep: #064b96;
  --theme-border: #e7dfc9;
  --theme-switch-light: #fff8df;
  --theme-switch-dark: #5a5a5a;
}

html[data-site-theme="light"],
html[data-site-theme="light"] body {
  background-color: var(--site-bg) !important;
  color: var(--site-text);
}

html[data-site-theme="light"] body {
  background-image: none !important;
}

html[data-site-theme="light"] body :is(
  h1, h2, h3, h4, h5, h6, p, li, dt, dd, label, blockquote, figcaption, caption,
  a, button,
  input, textarea, select, output, time, summary, strong, em, small, code,
  pre, th, td, legend, .site-page-title, .page-subtitle, .page-subtitle-text, .section-title,
  .privacy-lead, .blog-excerpt, .buildlog-entry, .buildlog-content,
  .proverb-text, .proverb-translation, .proverb-meaning, .history-caption,
  .bharat-copy, .empire-description, .nenu-summary-text
) {
  color: var(--site-text) !important;
  text-shadow: none;
}

html[data-site-theme="light"] body :is(
  .section h2, .project-card h3,
  .buildlog-entry h2, .page-heading, .blog-title, .proverb-title
) {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body h1.site-page-title,
html[data-site-theme="light"] body h1.nenu {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body a {
  color: var(--theme-primary) !important;
}

html[data-site-theme="light"] body .binary-string {
  opacity: 0.76 !important;
}

html[data-site-theme="light"] body .binary-string[data-tone="0"] {
  color: rgba(0, 112, 190, 0.82) !important;
}

html[data-site-theme="light"] body .binary-string[data-tone="1"] {
  color: rgba(28, 137, 78, 0.78) !important;
}

html[data-site-theme="light"] body .binary-string[data-tone="2"] {
  color: rgba(214, 108, 18, 0.8) !important;
}

html[data-site-theme="light"] body :is(
  .site-card, .section, .project-card, .proverb-section, .proverb-detail,
  .fingerprint-section, .buildlog-entry, .blog-card, .blog-article,
  .blog-item, .blog-detail, .bharat-card, .empire-panel,
  .privacy-policy, .history-panel, .proverbs-panel, .literature-panel,
  .teluguwords-panel, .telugu-chakra-panel, .telugu-feature-panel,
  .tc-builder, .chakra-help-window
) {
  position: relative;
  z-index: calc(var(--z-binary-background) + 1);
  background: var(--site-card-bg) !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 2px 12px rgba(36, 48, 64, 0.07);
}

html[data-site-theme="light"] body .project-card a {
  color: var(--theme-primary) !important;
}

html[data-site-theme="light"] body .buildlog-timeline-arrow {
  color: rgba(255, 153, 51, 0.42) !important;
}

html[data-site-theme="light"] body :is(
  input:not([type="checkbox"]):not([type="radio"]), textarea, select
) {
  color: var(--site-text) !important;
  background-color: #fffdf7 !important;
  border-color: var(--theme-border) !important;
}

html[data-site-theme="light"] body input[type="range"].telugu-history-selector {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

html[data-site-theme="light"] body :is(
  button, .button, input[type="submit"], .proverb-filter button,
  .bharat-tab, .history-fold-button
) {
  color: var(--site-text) !important;
}

html[data-site-theme="light"] body :is(
  .circle.central, .site-menu-toggle.central, .circle.corner,
  .site-menu-toggle.corner, .material-symbols-rounded.corner,
  .site-menu-icon
) {
  background-color: var(--theme-primary) !important;
}

html[data-site-theme="light"] body :is(a, button):focus-visible,
html[data-site-theme="light"] body input:focus-visible,
html[data-site-theme="light"] body textarea:focus-visible {
  outline-color: var(--theme-primary) !important;
}

html[data-site-theme="light"] body .theme-switch {
  color: var(--site-text);
}

html[data-site-theme="light"] body :is(.blog-header, .blog-detail h2, .blog-detail h3, .blog-detail h4, .blog-detail caption) {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body .blog-detail-date,
html[data-site-theme="light"] body .blog-detail figcaption {
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body .fingerprint-item strong {
  color: var(--site-text) !important;
}

html[data-site-theme="light"] body .fingerprint-item span {
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body .status-badge {
  background: transparent !important;
  border: 1px solid rgba(23, 36, 58, 0.16);
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body .chakra-help-window {
  background: var(--site-panel-bg-solid) !important;
  border-color: var(--theme-border) !important;
  color: var(--site-text) !important;
}

html[data-site-theme="light"] body .chakra-help-window h4 {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body :is(#help, #subscribe-btn, #last-updated) {
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body #help-window #help-list li {
  color: #eeeeee !important;
}

html[data-site-theme="light"] body #help-window #help-list .help-about {
  color: #cfcfcf !important;
}

html[data-site-theme="light"] body .bharat-panel {
  color: var(--site-text) !important;
}

html[data-site-theme="light"] body .proverbs-more-link {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body.error .error-brand {
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body.error .error-code,
html[data-site-theme="light"] body.error .error-message h1 {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body.error .error-message h1 {
  text-transform: none !important;
}

html[data-site-theme="light"] body .telugu-content,
html[data-site-theme="light"] body .proverbs-scroll,
html[data-site-theme="light"] body .proverbs-scroll span,
html[data-site-theme="light"] body .yaasa-ticker-word,
html[data-site-theme="light"] body .literature-slide,
html[data-site-theme="light"] body .lit-lyrics,
html[data-site-theme="light"] body .word-item,
html[data-site-theme="light"] body .word-item .pure,
html[data-site-theme="light"] body .word-item .sep {
  color: var(--site-text) !important;
}

html[data-site-theme="light"] body .proverb-item {
  color: var(--site-text) !important;
}

html[data-site-theme="light"] body :is(.proverb-meta, .proverb-detail-value) {
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body :is(.proverbs-empty, .proverb-detail-empty) {
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body .proverb-detail-label {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body .proverb-tag {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body .yaasa-ticker-loading {
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body :is(.lit-title, .lit-author, .word-item .infl) {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body .lit-arrows span {
  background: #e6f1fc !important;
  color: var(--theme-primary-deep) !important;
}

html[data-site-theme="light"] body .telugu-calculator-display-wrap {
  background: #f2f5f8 !important;
  border-color: #d7e0e9 !important;
}

html[data-site-theme="light"] body :is(
  .telugu-calculator-expression, .telugu-calculator-words,
  .denomination-breakdown, .denomination-breakdown strong
) {
  color: var(--site-text) !important;
}

html[data-site-theme="light"] body :is(.telugu-calculator-display, .telugu-calculator-keypad .is-operator,
  .telugu-calculator-keypad .is-equals, .telugu-calculator-help-trigger,
  .telugu-feature-panel h3, .teluguwords-panel h3, .proverbs-panel h3) {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body .telugu-calculator-english,
html[data-site-theme="light"] body .telugu-calculator-keypad button small {
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body .telugu-calculator-keypad button {
  background: #ffffff !important;
  border-color: #d7e0e9 !important;
  color: var(--site-text) !important;
}

html[data-site-theme="light"] body .telugu-calculator-keypad .is-equals {
  background: #fce8c9 !important;
  border-color: #d7a04a !important;
}

html[data-site-theme="light"] body .telugu-calculator-denominations {
  background: #f2f5f8 !important;
  border-color: #d7e0e9 !important;
}

html[data-site-theme="light"] body .denomination-chip {
  background: #fffdf6;
  border-color: #d7e0e9;
  color: var(--site-text-muted) !important;
}

html[data-site-theme="light"] body .denomination-chip.is-active {
  background: #fce8c9 !important;
  border-color: #d7a04a;
  color: #603600 !important;
}

html[data-site-theme="light"] body .telugu-calculator-help {
  background: var(--site-panel-bg-solid) !important;
  border-color: var(--theme-border) !important;
  color: var(--site-text) !important;
}

html[data-site-theme="light"] body .telugu-calculator-help strong {
  color: var(--site-accent) !important;
}

html[data-site-theme="light"] body.nenu .page-heading-icon--nenu {
  background: var(--nenu-icon-bg) !important;
  color: var(--nenu-icon-color) !important;
}

html[data-site-theme="light"] body.nenu {
  --nenu-section-bg: var(--site-panel-bg);
  --nenu-section-border: var(--theme-border);
  --nenu-section-heading-border: rgba(23, 36, 58, 0.14);
  --nenu-copy-color: var(--site-text);
  --nenu-timeline-heading: var(--site-accent);
  --nenu-timeline-copy: var(--site-text);
  --nenu-skill-bg: #e6f1fc;
  --nenu-skill-border: #b8d1eb;
  --nenu-skill-text: #17324d;
  --nenu-toggle-track: var(--site-accent);
  --nenu-toggle-checked: var(--site-accent);
  --nenu-toggle-focus: var(--site-accent);
  --nenu-tooltip-bg: var(--site-panel-bg-solid);
  --nenu-tooltip-text: var(--site-text);
  --nenu-tooltip-border: var(--theme-border);
}

html[data-site-theme="light"] body.nenu .section ul li {
  background: var(--nenu-skill-bg) !important;
  border-color: var(--nenu-skill-border) !important;
  color: var(--nenu-skill-text) !important;
}

.theme-switch {
  position: fixed;
  z-index: var(--z-chrome);
  top: 18px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--site-text);
  font: 600 12px/1 var(--font-en-body);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.theme-switch-track {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex: none;
  border: 1px solid rgba(23, 36, 58, 0.28);
  border-radius: 999px;
  background: var(--theme-switch-light, #fff8df);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.theme-switch-track::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--theme-switch-dark, #5a5a5a);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  content: "";
  transition: transform 180ms ease;
}

.theme-switch input:checked + .theme-switch-track {
  border-color: rgba(255, 255, 255, 0.42);
  background: var(--theme-switch-dark, #5a5a5a);
}

.theme-switch input:checked + .theme-switch-track::after {
  background: var(--theme-switch-light, #fff8df);
  transform: translateX(22px);
}

.theme-switch input:focus-visible + .theme-switch-track {
  outline: 2px solid var(--site-accent);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .theme-switch {
    top: 12px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-switch-track,
  .theme-switch-track::after {
    transition: none;
  }
}
