@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --page: #f4f5f1;
  --paper: #fff;
  --ink: #20241f;
  --muted: #737970;
  --line: #e5e8e1;
  --accent: #427a48;
  --accent-dark: #315f37;
  --accent-soft: #edf4eb;
  --editor: #202821;
  --editor-ink: #e8eee6;
  --terminal: #f8faf7;
  --danger: #c6584e;
  --shadow: 0 12px 40px rgba(31, 45, 31, .055);
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); min-height: 100vh; }
button, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #94bb8c; outline-offset: 3px; }
.topbar { height: 66px; padding: 0 max(24px, calc((100vw - 1220px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9ebe6; background: rgba(250, 251, 248, .85); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { width: 35px; height: 35px; display: grid; place-content: center; border-radius: 11px; background: #355f3c; color: #fff; font: 700 19px/1 'Manrope', sans-serif; letter-spacing: -2px; }
.brand-mark span { color: #b8d990; }
.brand-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font: 700 14px/1 'Manrope', sans-serif; letter-spacing: -.4px; }
.brand-name { display: flex; align-items: baseline; gap: 5px; }
.brand-copy small { color: #92988e; font-size: 11px; font-weight: 600; letter-spacing: .2px; }
.brand-author { color: #62715e; font: 700 8px/1 'DM Sans', sans-serif; letter-spacing: 1px; }
.topbar-note { display: flex; align-items: center; gap: 8px; color: #7a8177; font-size: 12px; }
.live-dot, .terminal-light { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #76a96b; box-shadow: 0 0 0 3px #e5f0e1; }
.device-chip { padding: 7px 10px; border: 1px solid #e5e9e1; border-radius: 20px; color: #626b60; font-size: 11px; }
.page-shell { width: min(1220px, calc(100% - 56px)); margin: 0 auto; }
.intro { min-height: 234px; display: flex; justify-content: space-between; align-items: center; padding: 35px 10px 31px; }
.intro-copy { max-width: 680px; }
.eyebrow { margin: 0 0 13px; display: flex; align-items: center; gap: 10px; color: #747d70; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
.eyebrow > span:first-child { color: var(--accent); }
.eyebrow-line { width: 22px; height: 1px; background: #b8c2b3; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font: 700 clamp(31px, 4vw, 46px)/1.12 'Manrope', 'Segoe UI', sans-serif; letter-spacing: -2px; }
h1 em { color: var(--accent); font-style: normal; }
.intro-text { max-width: 565px; margin-bottom: 0; color: #70776d; font-size: 14px; line-height: 1.65; }
.intro-aside { position: relative; width: 205px; min-height: 113px; margin: 0 22px 0 26px; padding: 14px 17px; border-left: 1px solid #d8dfd3; }
.aside-kicker { color: #8b9387; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.intro-aside p { margin: 11px 0 7px; font: 600 16px/1.35 'Manrope', sans-serif; letter-spacing: -.3px; }
.aside-signature { color: #80877c; font-size: 11px; }

.workspace { overflow: hidden; border: 1px solid #e2e6df; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.workspace-bar { min-height: 72px; padding: 13px 16px 13px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.workspace-heading { display: flex; align-items: center; gap: 11px; min-width: 200px; }
.workspace-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font: 500 12px 'DM Mono', monospace; }
.workspace-heading h2 { margin: 0 0 3px; font: 700 13px 'Manrope', sans-serif; letter-spacing: -.2px; }
.workspace-heading p { margin: 0; color: #8a9087; font-size: 11px; }
.toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.sample-picker { height: 35px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #e2e6df; border-radius: 8px; color: var(--accent); background: #fff; }
.sample-picker select { max-width: 178px; padding: 0 20px 0 0; border: 0; outline: 0; appearance: none; color: #495046; background: transparent; font-size: 11px; cursor: pointer; }
.button { min-height: 35px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #e3e6df; border-radius: 8px; background: white; font-size: 11px; font-weight: 600; cursor: pointer; transition: .16s ease; }
.button:hover { border-color: #bccbbb; background: #f8faf7; }
.button-quiet { color: #5e665b; }
.button-run { padding: 0 12px; border-color: #427a48; background: #427a48; color: #fff; box-shadow: 0 2px 5px #427a4825; }
.button-run:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.button-run:disabled { cursor: wait; opacity: .7; }
kbd { border: 1px solid #ffffff47; border-radius: 4px; padding: 1px 4px; font: 10px 'DM Mono', monospace; white-space: nowrap; }

.workbench { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); min-height: 405px; }
.panel { min-width: 0; display: flex; flex-direction: column; }
.editor-panel { border-right: 1px solid var(--line); }
.panel-head { height: 47px; min-height: 47px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-bottom: 1px solid var(--line); }
.panel-label { min-width: 0; display: flex; align-items: center; gap: 8px; }
.panel-label h3 { margin: 0; font-size: 11px; font-weight: 700; white-space: nowrap; }
.file-icon, .output-icon { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; background: #edf4eb; color: var(--accent); font: 600 11px 'DM Mono', monospace; }
.output-icon { background: #eef1ed; color: #6a7567; font-size: 14px; }
.file-name { margin-left: 2px; color: #838a80; font: 10px 'DM Mono', monospace; }
.editor-meta { display: flex; align-items: center; gap: 6px; color: #899087; font-size: 10px; white-space: nowrap; }
.meta-separator { color: #c3c8c0; }
#editor { width: 100%; min-height: 310px; flex: 1; display: block; padding: 18px 20px 19px; resize: vertical; border: 0; border-radius: 0; outline: none; background: var(--editor); color: var(--editor-ink); caret-color: #b9df8c; font: 13px/1.75 'DM Mono', 'Consolas', monospace; tab-size: 4; white-space: pre; overflow: auto; }
#editor::selection { background: #557d555e; }
.panel-foot { min-height: 37px; padding: 7px 14px; display: flex; justify-content: space-between; align-items: center; gap: 9px; background: #fafbf9; color: #899087; font-size: 10px; }
.panel-foot kbd { color: #6d756b; border-color: #dfe4db; font-size: 9px; }
.text-button { padding: 3px 0; border: 0; background: transparent; color: #6d7967; font-size: 10px; cursor: pointer; }
.text-button:hover { color: var(--accent-dark); text-decoration: underline; }
.output-panel { background: var(--terminal); }
.output-head { background: #fbfcfa; }
.output-actions { display: flex; align-items: center; gap: 9px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 20px; background: #f0f2ee; color: #6f776d; font-size: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #a0a69d; }
.status-badge[data-state="running"] { background: #fff4de; color: #976d24; }
.status-badge[data-state="running"] .status-dot { background: #d59a38; animation: pulse 1s infinite; }
.status-badge[data-state="success"] { background: #eaf4e8; color: #46734a; }
.status-badge[data-state="success"] .status-dot { background: #65a15e; }
.status-badge[data-state="error"] { background: #f9eae8; color: #aa4d44; }
.status-badge[data-state="error"] .status-dot { background: #c6584e; }
@keyframes pulse { 50% { opacity: .35; } }
.icon-button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: #8e958b; font-size: 16px; cursor: pointer; }
.icon-button:hover { background: #ecefea; color: #4e584b; }
.console { flex: 1; min-height: 310px; overflow: auto; padding: 18px 20px; color: #354136; font: 12px/1.8 'DM Mono', 'Consolas', monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.console-placeholder { color: #97a093; font: 12px/1.75 'DM Sans', sans-serif; }
.console-placeholder strong { display: block; margin-bottom: 4px; color: #687366; font-weight: 600; }
.console-line { min-height: 22px; }
.console-line::before { content: '›'; display: inline-block; width: 17px; color: #87a27e; }
.console-music { color: #895a84; }
.console-error { color: var(--danger); }
.console-system { margin-top: 9px; color: #96a092; font: italic 11px 'DM Sans', sans-serif; }
.console-system::before { content: ''; width: 0; }
.output-foot { height: 37px; min-height: 37px; padding: 0 15px; display: flex; align-items: center; gap: 8px; border-top: 1px solid #e8ebe5; color: #8a9287; font-size: 10px; }
.terminal-light { width: 6px; height: 6px; box-shadow: none; }
.run-time { margin-left: auto; }
.workspace-caption { min-height: 33px; padding: 0 17px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #edf0eb; background: #fcfdfb; color: #939a90; font-size: 9px; }
.workspace-caption strong { color: #697365; font-weight: 600; }

.learning-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; padding: 43px 8px 38px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 17px; }
.section-heading .eyebrow { margin-bottom: 7px; font-size: 9px; }
.section-heading h2 { margin: 0; font: 700 21px 'Manrope', sans-serif; letter-spacing: -.8px; }
.section-index { color: #9ba196; font: 10px 'DM Mono', monospace; }
.example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.example-card { min-height: 106px; padding: 13px 14px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid #e4e8e1; border-radius: 10px; background: rgba(255,255,255,.72); text-align: left; cursor: pointer; transition: .16s ease; }
.example-card:hover { transform: translateY(-2px); border-color: #bacbb6; background: #fff; box-shadow: 0 5px 16px #273b2710; }
.example-card-top { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.example-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: #edf4eb; color: #527b4d; font-size: 12px; }
.example-arrow { color: #a2aa9d; font-size: 14px; transition: transform .16s ease; }
.example-card:hover .example-arrow { transform: translateX(3px); color: var(--accent); }
.example-card strong { margin-bottom: 4px; font: 600 12px 'Manrope', sans-serif; }
.example-card small { color: #80877d; font-size: 10px; line-height: 1.45; }
.guide-intro { margin: -5px 0 15px; color: #7e867b; font-size: 12px; line-height: 1.6; }
.syntax-list { overflow: hidden; border: 1px solid #e4e8e1; border-radius: 10px; background: rgba(255,255,255,.72); }
.syntax-row { width: 100%; min-height: 42px; padding: 8px 11px; display: grid; grid-template-columns: minmax(115px, .8fr) minmax(0, 1.35fr) 13px; align-items: center; gap: 7px; border: 0; border-bottom: 1px solid #edf0eb; background: transparent; text-align: left; cursor: pointer; }
.syntax-row:last-child { border-bottom: 0; }
.syntax-row:hover { background: #f9fbf8; }
.syntax-row code, .guide-note code { color: #4a7547; font: 11px 'DM Mono', monospace; }
.syntax-row span { color: #81887e; font-size: 10px; }
.syntax-row b { color: #a2aa9d; font-size: 15px; font-weight: 400; }
.syntax-row:hover b { color: var(--accent); }
.guide-note { margin: 11px 2px 0; color: #838a80; font-size: 10px; line-height: 1.5; }
.guide-note > span { padding-right: 4px; color: var(--accent); }
.guide-note code { font-size: 10px; }
.page-footer { min-height: 53px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e3e7df; color: #8b9288; font-size: 10px; }
.footer-dot { padding: 0 5px; color: #b1b8ab; }
.toast { position: fixed; z-index: 10; right: 24px; bottom: 23px; max-width: min(360px, calc(100vw - 32px)); padding: 11px 15px; transform: translateY(12px); opacity: 0; pointer-events: none; border: 1px solid #dce5d8; border-radius: 9px; background: #fff; color: #455443; box-shadow: 0 7px 25px #18281822; font-size: 12px; transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.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; }

@media (max-width: 920px) {
  .topbar { padding: 0 24px; }
  .page-shell { width: min(100% - 40px, 780px); }
  .workspace-bar { align-items: flex-start; flex-direction: column; }
  .toolbar { width: 100%; justify-content: flex-start; }
  .sample-picker { flex: 1; }
  .sample-picker select { max-width: none; width: 100%; }
  .workbench { min-height: 0; }
  .learning-grid { gap: 26px; }
}
@media (max-width: 680px) {
  .topbar { height: 57px; padding: 0 16px; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .brand-copy { gap: 2px; }
  .brand-author { font-size: 7px; letter-spacing: .75px; }
  .topbar-note { display: none; }
  .device-chip { padding: 6px 8px; font-size: 10px; }
  .page-shell { width: calc(100% - 28px); }
  .intro { min-height: 0; padding: 32px 2px 24px; }
  .intro-copy { max-width: none; }
  .eyebrow { margin-bottom: 10px; font-size: 9px; letter-spacing: 1.2px; }
  h1 { margin-bottom: 10px; font-size: clamp(30px, 9vw, 39px); letter-spacing: -1.7px; }
  .intro-text { font-size: 12px; line-height: 1.6; }
  .intro-aside { display: none; }
  .workspace { border-radius: 11px; }
  .workspace-bar { padding: 12px; gap: 12px; }
  .workspace-heading { min-width: 0; }
  .workspace-heading h2 { font-size: 12px; }
  .workspace-heading p { font-size: 10px; }
  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .sample-picker { grid-column: 1 / -1; min-width: 0; }
  .sample-picker select { font-size: 11px; }
  .button { min-height: 34px; padding: 0 9px; font-size: 10px; }
  .button-run { grid-column: 3; grid-row: 2; }
  .button-run kbd { display: none; }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .editor-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel-head { height: 43px; min-height: 43px; padding: 0 11px; }
  .panel-label { gap: 7px; }
  .panel-label h3 { font-size: 10px; }
  .file-name { font-size: 9px; }
  .editor-meta { font-size: 9px; }
  #editor { min-height: 240px; height: 38vh; max-height: 420px; padding: 14px; font-size: 12px; line-height: 1.7; }
  .panel-foot { min-height: 34px; padding: 6px 10px; font-size: 9px; }
  .text-button { font-size: 9px; }
  .console { min-height: 175px; max-height: 290px; padding: 14px; font-size: 11px; }
  .output-foot { height: 33px; min-height: 33px; padding: 0 11px; }
  .workspace-caption { padding: 0 10px; font-size: 8px; }
  .learning-grid { grid-template-columns: 1fr; gap: 31px; padding: 33px 2px 28px; }
  .section-heading { margin-bottom: 13px; }
  .section-heading h2 { font-size: 19px; }
  .example-grid { gap: 8px; }
  .example-card { min-height: 100px; padding: 11px; }
  .example-card strong { font-size: 11px; }
  .example-card small { font-size: 9px; }
  .syntax-row { grid-template-columns: minmax(105px, .75fr) minmax(0, 1.35fr) 12px; gap: 4px; padding: 8px; }
  .syntax-row code { font-size: 10px; }
  .syntax-row span { font-size: 9px; }
  .page-footer { min-height: 58px; gap: 10px; font-size: 9px; }
  .page-footer span:last-child { text-align: right; }
  .toast { right: 14px; bottom: 14px; }
}
@media (max-width: 370px) {
  .page-shell { width: calc(100% - 22px); }
  .button-quiet { padding: 0 7px; }
  .toolbar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .syntax-row { grid-template-columns: 98px minmax(0, 1fr) 10px; }
  .syntax-row code { font-size: 9px; }
  .editor-meta { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}



/* Điều khiển giao diện sáng/tối */
.theme-toggle { min-height: 34px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #e3e7df; border-radius: 999px; background: #fff; color: #566052; font-size: 10px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: .18s ease; }
.theme-toggle:hover { border-color: #bccbbb; background: #f8faf7; }
.theme-toggle-icon { color: #72876a; font-size: 15px; line-height: 1; }
.toggle-track { width: 27px; height: 16px; position: relative; border-radius: 20px; background: #dce4d8; transition: background .18s ease; }
.toggle-thumb { width: 12px; height: 12px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #0002; transition: transform .18s ease; }
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
html[data-theme="dark"] { color-scheme: dark; --page: #111611; --paper: #1b221b; --ink: #e8eee5; --muted: #a4aea1; --line: #303a30; --accent: #8fbd81; --accent-dark: #6f9f68; --accent-soft: #273829; --editor: #121a14; --editor-ink: #e3ece2; --terminal: #151c16; --danger: #ee8b80; --shadow: 0 12px 40px rgba(0, 0, 0, .22); }
html[data-theme="dark"] body { background: var(--page); color: var(--ink); }
html[data-theme="dark"] .topbar { border-bottom-color: #2d352d; background: rgba(19, 25, 20, .94); }
html[data-theme="dark"] .topbar-note, html[data-theme="dark"] .intro-text, html[data-theme="dark"] .brand-copy small, html[data-theme="dark"] .workspace-heading p, html[data-theme="dark"] .editor-meta, html[data-theme="dark"] .panel-foot, html[data-theme="dark"] .output-foot, html[data-theme="dark"] .workspace-caption, html[data-theme="dark"] .section-index, html[data-theme="dark"] .example-card small, html[data-theme="dark"] .guide-intro, html[data-theme="dark"] .syntax-row span, html[data-theme="dark"] .guide-note, html[data-theme="dark"] .page-footer, html[data-theme="dark"] .aside-signature { color: #a2ada0; }
html[data-theme="dark"] .brand-author { color: #b4c9ac; }
html[data-theme="dark"] .device-chip { border-color: #354034; color: #b1bcae; }
html[data-theme="dark"] .intro-aside { border-left-color: #394439; }
html[data-theme="dark"] .aside-kicker, html[data-theme="dark"] .eyebrow { color: #a4aea1; }
html[data-theme="dark"] .eyebrow > span:first-child { color: var(--accent); }
html[data-theme="dark"] .eyebrow-line { background: #596555; }
html[data-theme="dark"] .workspace { border-color: #303a30; background: var(--paper); }
html[data-theme="dark"] .workspace-bar, html[data-theme="dark"] .panel-head { border-color: var(--line); background: #1b221b; }
html[data-theme="dark"] .workspace-icon, html[data-theme="dark"] .file-icon, html[data-theme="dark"] .example-icon { background: #293a2a; color: #a8d394; }
html[data-theme="dark"] .output-icon { background: #2a332a; color: #b2bdb0; }
html[data-theme="dark"] .sample-picker, html[data-theme="dark"] .button, html[data-theme="dark"] .example-card, html[data-theme="dark"] .syntax-list { border-color: #354034; background: #1d251e; color: #dce5d8; }
html[data-theme="dark"] .sample-picker select { color: #dce5d8; }
html[data-theme="dark"] .button-quiet { color: #c0c9bd; }
html[data-theme="dark"] .button:hover, html[data-theme="dark"] .sample-picker:hover { border-color: #53634f; background: #263027; }
html[data-theme="dark"] .button-run { border-color: #477d4a; background: #477d4a; color: #fff; }
html[data-theme="dark"] .button-run:hover { border-color: #659361; background: #659361; }
html[data-theme="dark"] .editor-panel { border-right-color: var(--line); }
html[data-theme="dark"] .panel-foot { background: #182019; }
html[data-theme="dark"] .panel-foot kbd { border-color: #394439; color: #c2cbbf; }
html[data-theme="dark"] .text-button { color: #a6c79e; }
html[data-theme="dark"] .output-panel { background: var(--terminal); }
html[data-theme="dark"] .status-badge[data-state="ready"] { background: #293129; color: #b1bcae; }
html[data-theme="dark"] .status-badge[data-state="running"] { background: #40351f; color: #e0bc75; }
html[data-theme="dark"] .status-badge[data-state="success"] { background: #263b28; color: #a9d09e; }
html[data-theme="dark"] .status-badge[data-state="error"] { background: #472a29; color: #efa29a; }
html[data-theme="dark"] .icon-button { color: #a5afa2; }
html[data-theme="dark"] .icon-button:hover { background: #2c362c; color: #ecf2e9; }
html[data-theme="dark"] .console { color: #d7e2d4; }
html[data-theme="dark"] .console-placeholder { color: #9ba896; }
html[data-theme="dark"] .console-placeholder strong { color: #c3cfbd; }
html[data-theme="dark"] .console-line::before { color: #91bd82; }
html[data-theme="dark"] .console-system { color: #9aa697; }
html[data-theme="dark"] .output-foot { border-top-color: #303a30; }
html[data-theme="dark"] .workspace-caption { border-top-color: #303a30; background: #181f19; }
html[data-theme="dark"] .workspace-caption strong { color: #c2cdbd; }
html[data-theme="dark"] .section-heading h2 { color: #e8eee5; }
html[data-theme="dark"] .example-card:hover { border-color: #536b50; background: #242e25; }
html[data-theme="dark"] .example-arrow { color: #a1ad9b; }
html[data-theme="dark"] .syntax-list { background: #1b221b; }
html[data-theme="dark"] .syntax-row { border-bottom-color: #303a30; }
html[data-theme="dark"] .syntax-row:hover { background: #242e25; }
html[data-theme="dark"] .syntax-row code, html[data-theme="dark"] .guide-note code { color: #a7d296; }
html[data-theme="dark"] .page-footer { border-top-color: #303a30; }
html[data-theme="dark"] .toast { border-color: #3a4838; background: #202a21; color: #e2ebdf; }
html[data-theme="dark"] .theme-toggle { border-color: #3b473a; background: #202920; color: #d8e3d4; }
html[data-theme="dark"] .theme-toggle:hover { border-color: #61735b; background: #29352a; }
html[data-theme="dark"] .theme-toggle-icon { color: #f1d283; }
html[data-theme="dark"] .toggle-track { background: #5a8752; }
html[data-theme="dark"] .toggle-thumb { transform: translateX(11px); }
@media (max-width: 680px) {
  .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .button-run { grid-column: auto; grid-row: auto; }
  .theme-toggle { width: 34px; min-width: 34px; height: 34px; padding: 0; }
  .theme-toggle-label, .toggle-track { display: none; }
}
@media (max-width: 400px) { .device-chip { display: none; } }
