/* English site theme: light / dark, with soft transitions */
.theme-toggle{
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;padding:0;border-radius:9px;
  border:1px solid #e2e8f0;background:#fff;color:#475569;
  font-size:15px;line-height:1;cursor:pointer;flex:none;
  transition:background-color .25s,color .25s,border-color .25s,transform .35s;
}
.theme-toggle:hover{border-color:#bfdbfe;color:#1d4ed8;background:#eff6ff}
.theme-toggle:active{transform:scale(.92)}

body,.en-nav,.en-nav-in,.en-links a,.en-hero,.en-card,.en-table th,.en-table td,
.en-code,.en-note,.en-foot,.en-shot,.il-hero,.il-card,.il-table th,.il-table td,
.il-nav,.il-nav a,.il-badge,.tool-card,.tool-field input,.tool-field textarea,
.tool-table th,.tool-table td,.tool-note,.ed-card,.ed-code,.es-card,.es-field input{
  transition:background-color .35s ease,color .35s ease,border-color .35s ease,box-shadow .35s ease;
}

html[data-theme="dark"] body{background:#0b1220;color:#e5e7eb}
html[data-theme="dark"] .theme-toggle{background:#111827!important;border-color:#334155!important;color:#cbd5e1!important}
html[data-theme="dark"] .en-nav{background:#0f172a;border-bottom-color:#1e293b}
html[data-theme="dark"] .en-brand{color:#f8fafc}
html[data-theme="dark"] .en-links a{color:#cbd5e1}
html[data-theme="dark"] .en-links a:hover{color:#93c5fd}
html[data-theme="dark"] .en-links .lang-menu summary{background:#1e1b4b;border-color:#4c1d95;color:#c4b5fd}
html[data-theme="dark"] .en-links .lang-list{background:#111827;border-color:#1f2937}
html[data-theme="dark"] .en-links .lang-list a{color:#cbd5e1}
html[data-theme="dark"] .en-links .lang-list a:hover{background:#1e293b}
html[data-theme="dark"] .en h1,html[data-theme="dark"] .en-sec h2{color:#f8fafc}
html[data-theme="dark"] .en-hero p,html[data-theme="dark"] .en-sec .sub,
html[data-theme="dark"] .en-card p,html[data-theme="dark"] .en-note,html[data-theme="dark"] .en-foot{color:#94a3b8}
html[data-theme="dark"] .en-badge{background:#172554;border-color:#1e40af;color:#93c5fd}
html[data-theme="dark"] .en-card,html[data-theme="dark"] .en-shot{background:#111827;border-color:#1f2937}
html[data-theme="dark"] .en-card h3{color:#e5e7eb}
html[data-theme="dark"] .en-table{background:#111827}
html[data-theme="dark"] .en-table th{background:#1e293b;color:#cbd5e1;border-color:#334155}
html[data-theme="dark"] .en-table td{border-color:#334155;color:#e5e7eb}
html[data-theme="dark"] .en-btn.ghost{background:#111827;color:#93c5fd;border-color:#1e40af}
html[data-theme="dark"] .en-code{background:#020617;border:1px solid #1e293b}
html[data-theme="dark"] .en-foot{border-top-color:#1e293b}

html[data-theme="dark"] .il-nav a{color:#cbd5e1}
html[data-theme="dark"] .il-nav a.on{color:#93c5fd}
html[data-theme="dark"] .il-nav .lang-menu summary{background:#1e1b4b;border-color:#4c1d95;color:#c4b5fd}
html[data-theme="dark"] .il-nav .lang-list{background:#111827;border-color:#1f2937}
html[data-theme="dark"] .il-nav .lang-list a{color:#cbd5e1}
html[data-theme="dark"] .il-nav .lang-list a:hover{background:#1e293b}
html[data-theme="dark"] .il-hero{background:#111827;border-color:#1f2937}
html[data-theme="dark"] .il-hero h1{color:#f8fafc}
html[data-theme="dark"] .il-hero p,html[data-theme="dark"] .il-card span,
html[data-theme="dark"] .il-note,html[data-theme="dark"] #contact{color:#94a3b8}
html[data-theme="dark"] .il-card{background:#111827;border-color:#1f2937}
html[data-theme="dark"] .il-card b{color:#e5e7eb}
html[data-theme="dark"] .il-table{background:#111827}
html[data-theme="dark"] .il-table th{background:#1e293b;color:#cbd5e1;border-color:#334155}
html[data-theme="dark"] .il-table td{border-color:#334155;color:#e5e7eb}
html[data-theme="dark"] #contact{background:#111827!important;border-color:#1f2937!important}

html[data-theme="dark"] .tool-card,html[data-theme="dark"] .ed-card,html[data-theme="dark"] .es-card{background:#111827;border-color:#1f2937}
html[data-theme="dark"] .tool-card h1,html[data-theme="dark"] .ed-card h2,html[data-theme="dark"] .es-card h1{color:#f8fafc}
html[data-theme="dark"] .tool-card p,html[data-theme="dark"] .tool-note,
html[data-theme="dark"] .ed-card p,html[data-theme="dark"] .ed-card li,html[data-theme="dark"] .ed-note,
html[data-theme="dark"] .es-card p{color:#94a3b8}
html[data-theme="dark"] .tool-field label,html[data-theme="dark"] .es-field label{color:#cbd5e1}
html[data-theme="dark"] .tool-field input,html[data-theme="dark"] .tool-field textarea,
html[data-theme="dark"] .es-field input{background:#0f172a;border-color:#334155;color:#e5e7eb}
html[data-theme="dark"] .tool-table th{background:#1e293b;color:#cbd5e1;border-color:#334155}
html[data-theme="dark"] .tool-table td{border-color:#334155;color:#e5e7eb}

@media (prefers-reduced-motion: reduce){
  .theme-toggle,body,.en-nav,.en-card,.en-table th,.en-table td,.en-hero,
  .il-card,.il-table th,.il-table td,.tool-card,.ed-card,.es-card{transition:none!important}
}
