/* Electron21 — Smart21Brain's electronics, computing, data and engineering hub.
   Built on the shared Smart21Brain design system (css/style.css): the same brand
   colours, Poppins / Nunito type, pill buttons, rounded cards and soft shadows,
   and it follows the site's light / dark theme toggle like every other page.
   Only the instrument screens (scope, charts, consoles) stay dark on purpose,
   like real lab equipment. Everything is scoped under .e21. */

.e21 {
  /* ---- surfaces & text: all come from the site tokens, so light/dark just works ---- */
  --e-bg: var(--s21-bg);
  --e-bg2: var(--s21-white);
  --e-panel: color-mix(in srgb, var(--s21-text) 3.5%, transparent);
  --e-panel2: color-mix(in srgb, var(--s21-text) 8%, transparent);
  --e-line: color-mix(in srgb, var(--s21-primary) 10%, var(--s21-border));
  --e-text: var(--s21-text);
  --e-soft: var(--s21-text-soft);
  --e-inset: color-mix(in srgb, var(--s21-primary) 4%, var(--s21-white));

  /* ---- accents: brand + subject colours (legacy names kept: the lab scripts use them) ---- */
  --e-cyan: var(--subj-math);          /* electronics   */
  --e-violet: var(--subj-computer);    /* computer eng. */
  --e-lime: var(--s21-primary);        /* data / "on"   */
  --e-amber: var(--s21-secondary-dark);/* engineering   */
  --e-pink: var(--s21-accent);
  --e-red: var(--s21-accent);

  /* readable text-sized versions of the accents */
  --e-blue-ink: color-mix(in srgb, var(--subj-math) 78%, #000);
  --e-green-ink: var(--s21-primary);
  --e-amber-ink: #A66300;
  --e-pink-ink: var(--s21-accent-dark);

  --e-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --e-head: var(--font-display);
  --e-shadow: var(--card-shadow);
  --e-shadow-hover: var(--card-shadow-hover);

  background: transparent;
  color: var(--e-text);
  font-family: var(--font-body);
  overflow-x: clip;
}
[data-theme="dark"] .e21 {
  --e-bg2: var(--s21-white);
  --e-lime: color-mix(in srgb, var(--subj-science) 70%, #fff);
  --e-amber: var(--s21-secondary);
  --e-pink: #FF7A98;
  --e-red: #FF7A98;
  --e-cyan: color-mix(in srgb, var(--subj-math) 75%, #fff);
  --e-violet: color-mix(in srgb, var(--subj-computer) 70%, #fff);
  --e-blue-ink: var(--e-cyan);
  --e-green-ink: var(--e-lime);
  --e-amber-ink: var(--s21-secondary);
  --e-pink-ink: #FF8FA8;
  --e-inset: color-mix(in srgb, #fff 4%, var(--s21-white));
}
.e21 *, .e21 *::before, .e21 *::after { box-sizing: border-box; }
.e21 h1, .e21 h2, .e21 h3, .e21 h4 { font-family: var(--e-head); color: var(--e-text); letter-spacing: -.01em; font-weight: 600; }
.e21 p { color: var(--e-soft); }
.e21 a { color: var(--e-green-ink); }
.e21 a:hover { color: var(--s21-accent); }
.e21 code, .e21 .mono { font-family: var(--e-mono); }
.e21 code { color: var(--s21-primary-dark); background: var(--s21-primary-light); padding: .08rem .38rem; border-radius: 6px; font-size: .85em; }
[data-theme="dark"] .e21 code { color: var(--e-lime); }
.e21 :focus-visible { outline: 3px solid color-mix(in srgb, var(--s21-primary) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

.e21-wrap { width: min(1320px, 100% - 2rem); margin-inline: auto; }
.e21-section { padding: 5rem 0; position: relative; }

/* same pill as the site's .eyebrow */
.e21-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-body); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--e-green-ink); background: var(--s21-primary-light); padding: .4rem .9rem; border-radius: var(--radius-pill); }
.e21-h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 700; margin: 1rem 0 .8rem; line-height: 1.2; }
.e21-lead { font-size: 1.05rem; max-width: 62ch; }
.e21-grad { color: var(--e-green-ink); }

/* ---------- Hero: identical recipe to the site's .hero ---------- */
.e21-hero { position: relative; overflow: hidden; min-height: 640px; display: flex; align-items: center; isolation: isolate; color: #fff;
  background: radial-gradient(120% 100% at 15% 0%, #0E8060 0%, var(--s21-primary) 45%, var(--s21-primary-dark) 100%); }
.e21-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .12) 1.5px, transparent 1.5px); background-size: 26px 26px; opacity: .5; z-index: -1; pointer-events: none; }
#e21-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .75; }
.e21-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: 7rem 0 4.5rem; }
.e21-badge { display: inline-flex; align-items: center; gap: .55rem; padding: .5rem 1rem; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); border-radius: var(--radius-pill); font-family: var(--font-body); font-weight: 700; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: #fff; backdrop-filter: blur(6px); }
.e21-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s21-secondary); box-shadow: 0 0 10px var(--s21-secondary); animation: e21pulse 1.8s infinite; }
@keyframes e21pulse { 50% { opacity: .35; transform: scale(.8); } }
.e21-title { font-family: var(--font-display); font-size: clamp(2.7rem, 6vw, 4.4rem); line-height: 1.05; font-weight: 700; margin: 1.1rem 0 1rem; display: flex; align-items: baseline; flex-wrap: nowrap; gap: .02em; white-space: nowrap; color: #fff; }
.e21-title .e21-grad { color: #fff; }
.e21-title .n { color: var(--s21-secondary); }
.e21-title .bolt { width: .8em; height: .8em; align-self: center; margin-right: .22em; border-radius: 22%; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.e21-hero p, .e21-hero .e21-sub { color: rgba(255, 255, 255, .9); }
.e21-sub { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 40ch; color: #fff !important; }
.e21-type { font-family: var(--e-mono); color: var(--s21-secondary); min-height: 1.6em; margin: .4rem 0 1.6rem; font-size: 1rem; }
.e21-type::after { content: '▌'; margin-left: 2px; animation: e21blink 1s steps(2) infinite; }
@keyframes e21blink { 50% { opacity: 0; } }
.e21-cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* buttons: pill, same weight / motion as .btn-s21 */
.e21-btn { --c: var(--s21-primary); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.4rem; border-radius: var(--radius-pill); border: 2px solid var(--s21-border); background: transparent; color: var(--e-text) !important; font-family: var(--font-body); font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: none !important; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease); }
.e21-btn:hover { transform: translateY(-2px); border-color: var(--c); color: var(--e-text) !important; }
.e21-btn:active { transform: translateY(1px); }
.e21-btn.solid { background: var(--s21-primary); border-color: var(--s21-primary); color: #fff !important; box-shadow: 0 8px 20px color-mix(in srgb, var(--s21-primary) 28%, transparent); }
.e21-btn.solid:hover { background: var(--s21-primary-dark); border-color: var(--s21-primary-dark); box-shadow: 0 12px 26px color-mix(in srgb, var(--s21-primary) 34%, transparent); }
.e21-btn.sm { padding: .4rem .85rem; font-size: .8rem; border-width: 1.5px; }
.e21-btn.ghost { --c: var(--e-soft); }
.e21-btn.lime { --c: var(--s21-primary); }
.e21-btn.amber { --c: var(--s21-secondary-dark); }
.e21-btn.red { --c: var(--s21-accent); }
/* inside green blocks: yellow primary + glass secondary (the site's hero buttons) */
.e21-hero .e21-btn, .e21-cta-band .e21-btn { background: rgba(255, 255, 255, .16); border: 1.5px solid rgba(255, 255, 255, .5); color: #fff !important; backdrop-filter: blur(6px); }
.e21-hero .e21-btn:hover, .e21-cta-band .e21-btn:hover { background: rgba(255, 255, 255, .28); border-color: #fff; color: #fff !important; }
.e21-hero .e21-btn.solid, .e21-cta-band .e21-btn.solid { background: var(--s21-secondary); border-color: var(--s21-secondary); color: #3D2B00 !important; box-shadow: 0 8px 20px color-mix(in srgb, var(--s21-secondary) 35%, transparent); backdrop-filter: none; }
.e21-hero .e21-btn.solid:hover, .e21-cta-band .e21-btn.solid:hover { background: var(--s21-secondary-dark); border-color: var(--s21-secondary-dark); color: #3D2B00 !important; }

.e21-stats { display: flex; flex-wrap: wrap; gap: 2.2rem; margin-top: 2.6rem; }
.e21-stat b { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: #fff; }
.e21-stat span { font-size: .82rem; color: rgba(255, 255, 255, .75); }

/* hero scope device (instrument: stays dark) */
.e21-device { position: relative; border-radius: var(--radius-lg); padding: 14px; background: linear-gradient(160deg, #123428, #0a1f17); border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 30px 70px rgba(0, 0, 0, .4); transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); transition: transform .5s var(--ease); }
.e21-device:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.e21-screen { border-radius: 14px; background: #02060d; border: 1px solid rgba(255, 255, 255, .14); overflow: hidden; position: relative; }
#e21-hero-scope { display: block; width: 100%; height: auto; aspect-ratio: 16/10; }
.e21-device-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-family: var(--e-mono); font-size: .7rem; color: rgba(255, 255, 255, .7); }
.e21-knobs { display: flex; gap: 10px; }
.e21-knob { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #5a7a6c, #1b3329); border: 1px solid rgba(255, 255, 255, .2); position: relative; }
.e21-knob::after { content: ''; position: absolute; left: 50%; top: 3px; width: 2px; height: 7px; background: var(--s21-secondary); transform: translateX(-50%); border-radius: 2px; }

/* ---------- Ticker ---------- */
.e21-ticker { border-block: 1px solid var(--e-line); background: var(--s21-primary-light); overflow: hidden; padding: .85rem 0; }
.e21-ticker-track { display: flex; gap: 3rem; width: max-content; animation: e21tick 38s linear infinite; font-family: var(--font-body); font-weight: 700; font-size: .85rem; color: var(--e-soft); }
.e21-ticker-track span b { color: var(--e-green-ink); font-weight: 800; }
@keyframes e21tick { to { transform: translateX(-50%); } }

/* ---------- Domains: .s21-card look ---------- */
.e21-domains { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2.2rem; }
.e21-domain { --c: var(--e-cyan); position: relative; padding: 1.6rem; border-radius: var(--radius-md); background: var(--e-bg2); border: 1px solid var(--e-line); box-shadow: var(--e-shadow); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); text-align: left; cursor: pointer; color: inherit; font: inherit; }
.e21-domain::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.e21-domain:hover { transform: translateY(-6px); box-shadow: var(--e-shadow-hover); }
.e21-domain .ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-size: 1.4rem; margin-bottom: 1rem; }
.e21-domain h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
.e21-domain p { font-size: .9rem; margin: 0 0 1rem; }
.e21-domain ul { list-style: none; padding: 0; margin: 0; font-size: .84rem; font-weight: 600; color: var(--e-soft); }
.e21-domain li::before { content: '›'; color: var(--c); font-weight: 800; margin-right: .5rem; }

/* ---------- Workbench ---------- */
.e21-bench { margin-top: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--e-line); background: var(--e-bg2); box-shadow: var(--e-shadow-hover); overflow: hidden; }
.e21-bench-head { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; border-bottom: 1px solid var(--e-line); background: var(--e-inset); }
.e21-dots { display: flex; gap: 7px; }
.e21-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--s21-accent); }
.e21-dots i:nth-child(2) { background: var(--s21-secondary); } .e21-dots i:nth-child(3) { background: var(--s21-primary); }
.e21-bench-title { font-family: var(--e-mono); font-size: .78rem; color: var(--e-soft); flex: 1; }
.e21-bench-title b { color: var(--e-green-ink); font-weight: 600; }
.e21-tabs { display: flex; gap: .4rem; padding: .7rem .8rem; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--e-line); background: var(--e-bg2); }
.e21-tab { --c: var(--e-cyan); flex: none; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.05rem; border: 1px solid var(--e-line); border-radius: var(--radius-pill); background: transparent; color: var(--e-soft); font: 700 .84rem/1 var(--font-body); cursor: pointer; transition: color .2s, background .2s, border-color .2s, transform .2s var(--ease); white-space: nowrap; }
.e21-tab:hover { color: var(--e-text); border-color: var(--c); transform: translateY(-1px); }
.e21-tab[aria-selected="true"] { color: var(--e-text); background: color-mix(in srgb, var(--c) 16%, transparent); border-color: var(--c); }
.e21-tab i { color: var(--c); }
.e21-panel { padding: clamp(1rem, 2.5vw, 1.8rem); background: var(--e-bg2); min-height: 420px; }
.e21-panel[hidden] { display: none; }
.e21-lab-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.2rem; }
.e21-lab-head h3 { font-size: 1.35rem; margin: 0 0 .25rem; }
.e21-lab-head p { margin: 0; font-size: .92rem; max-width: 60ch; }
.e21-two { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.4rem; }
.e21-card { border: 1px solid var(--e-line); border-radius: var(--radius-md); background: var(--e-inset); padding: 1.1rem 1.2rem; }
.e21-card h4 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--e-soft); margin: 0 0 .8rem; font-weight: 800; }
.e21-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--radius-pill); border: 1px solid var(--e-line); background: var(--e-bg2); }
.e21-seg button { padding: .42rem .9rem; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--e-soft); font: 700 .78rem/1 var(--font-body); cursor: pointer; transition: background .15s, color .15s; }
.e21-seg button:hover { color: var(--e-text); }
.e21-seg button[aria-pressed="true"] { background: var(--s21-primary); color: #fff; }
.e21-field { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: var(--e-soft); }
.e21-field label { font-family: var(--font-body); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.e21-in, .e21-sel, .e21-ta { width: 100%; padding: .55rem .8rem; border-radius: var(--radius-sm); border: 1.5px solid var(--s21-border); background: var(--e-bg2); color: var(--e-text); font: 500 .9rem var(--e-mono); }
.e21-in:focus, .e21-sel:focus, .e21-ta:focus { border-color: var(--s21-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--s21-primary) 18%, transparent); }
.e21-sel option { background: var(--s21-white); color: var(--e-text); }
.e21-ta { min-height: 150px; resize: vertical; line-height: 1.5; }
.e21-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.e21-row > * { flex: 1 1 120px; }
.e21-range { width: 100%; accent-color: var(--s21-primary); }
.e21-out { font-family: var(--e-mono); font-size: 1.15rem; font-weight: 700; color: var(--e-green-ink); }
.e21-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .7rem; }
.e21-kv div { padding: .65rem .8rem; border-radius: 12px; background: var(--e-bg2); border: 1px solid var(--e-line); }
.e21-kv small { display: block; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--e-soft); font-family: var(--font-body); font-weight: 800; }
.e21-kv b { font-family: var(--e-mono); font-size: 1.05rem; color: var(--e-text); font-weight: 600; word-break: break-all; }
.e21-note { font-size: .82rem; color: var(--e-soft); border-left: 3px solid var(--s21-secondary); padding-left: .8rem; margin: .8rem 0 0; }
.e21-table { width: 100%; border-collapse: collapse; font-family: var(--e-mono); font-size: .8rem; }
.e21-table th, .e21-table td { padding: .42rem .6rem; border-bottom: 1px solid var(--e-line); text-align: center; color: var(--e-soft); background: transparent; }
.e21-table th { color: var(--e-text); font-weight: 700; background: var(--s21-primary-light); }
.e21-table tr.on td { color: #fff; background: var(--s21-primary); font-weight: 700; }
.e21-table.left td, .e21-table.left th { text-align: left; }

/* logic lab */
.e21-logic-stage { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; }
.e21-switches { display: flex; flex-direction: column; gap: 1.1rem; }
.e21-sw { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-family: var(--e-mono); font-size: .8rem; color: var(--e-soft); background: none; border: 0; padding: 0; }
.e21-sw .t { width: 46px; height: 24px; border-radius: 99px; background: color-mix(in srgb, var(--s21-text) 14%, var(--s21-white)); border: 1px solid var(--e-line); position: relative; transition: background .2s; }
.e21-sw .t::after { content: ''; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s var(--ease), background .2s; }
.e21-sw[aria-checked="true"] .t { background: var(--s21-primary); border-color: var(--s21-primary); }
.e21-sw[aria-checked="true"] .t::after { transform: translateX(22px); }
.e21-gate-svg { width: 100%; max-width: 340px; height: auto; }
.e21-gate-svg .w { stroke: color-mix(in srgb, var(--s21-text) 35%, transparent); stroke-width: 3; fill: none; transition: stroke .2s; }
.e21-gate-svg .w.hi { stroke: var(--s21-primary); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--s21-primary) 60%, transparent)); }
.e21-gate-svg .body { fill: color-mix(in srgb, var(--e-cyan) 12%, transparent); stroke: var(--e-cyan); stroke-width: 3; }
.e21-gate-svg text { fill: var(--e-text); font: 700 14px var(--e-mono); }
.e21-led { width: 54px; height: 54px; border-radius: 50%; background: color-mix(in srgb, var(--s21-text) 12%, var(--s21-white)); border: 2px solid var(--s21-border); display: grid; place-items: center; font-family: var(--e-mono); font-weight: 700; color: var(--e-soft); transition: all .2s; }
.e21-led.on { background: radial-gradient(circle at 35% 30%, #fff3c4, var(--s21-secondary)); border-color: var(--s21-secondary-dark); color: #3D2B00; box-shadow: 0 0 28px 6px color-mix(in srgb, var(--s21-secondary) 60%, transparent); }
.e21-bits { display: flex; gap: .45rem; flex-wrap: wrap; }
.e21-bit { width: 42px; padding: .5rem 0 .4rem; text-align: center; border-radius: 12px; border: 1.5px solid var(--s21-border); background: var(--e-bg2); color: var(--e-soft); font: 700 1.05rem var(--e-mono); cursor: pointer; transition: all .15s; }
.e21-bit small { display: block; font-size: .56rem; color: var(--e-soft); opacity: .8; font-weight: 500; margin-top: .15rem; }
.e21-bit:hover { border-color: var(--s21-primary); }
.e21-bit.on { color: #fff; background: var(--s21-primary); border-color: var(--s21-primary); box-shadow: 0 6px 14px color-mix(in srgb, var(--s21-primary) 30%, transparent); }
.e21-bit.on small { color: #fff; opacity: .8; }
.e21-bit.out.on { color: #3D2B00; background: var(--s21-secondary); border-color: var(--s21-secondary-dark); box-shadow: 0 6px 14px color-mix(in srgb, var(--s21-secondary) 40%, transparent); }
.e21-bit.out.on small { color: #3D2B00; }
.e21-bit.out { cursor: default; }

/* circuit lab */
.e21-resistor { width: 100%; max-width: 420px; height: auto; }
.e21-chart { width: 100%; height: auto; display: block; border-radius: 12px; background: #0a1a14; border: 1px solid var(--e-line); }

/* CPU lab */
.e21-cpu { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.2rem; }
.e21-code { font-family: var(--e-mono); font-size: .85rem; line-height: 1.55; min-height: 280px; tab-size: 4; white-space: pre; }
.e21-listing { max-height: 250px; overflow: auto; font-family: var(--e-mono); font-size: .78rem; border: 1px solid var(--e-line); border-radius: var(--radius-sm); background: var(--e-bg2); }
.e21-listing div { display: grid; grid-template-columns: 38px 92px 1fr; padding: .15rem .6rem; color: var(--e-soft); }
.e21-listing div.pc { background: color-mix(in srgb, var(--s21-secondary) 35%, transparent); color: var(--e-text); font-weight: 700; }
.e21-regs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.e21-reg { text-align: center; padding: .6rem .3rem; border-radius: 12px; background: var(--e-bg2); border: 1px solid var(--e-line); transition: border-color .2s, box-shadow .2s; }
.e21-reg.ch { border-color: var(--s21-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s21-primary) 18%, transparent); }
.e21-reg small { display: block; font: 800 .66rem var(--font-body); color: var(--e-soft); letter-spacing: .08em; }
.e21-reg b { font: 700 1.2rem var(--e-mono); color: var(--e-blue-ink); }
.e21-reg i { display: block; font: normal .6rem var(--e-mono); color: var(--e-soft); font-style: normal; }
.e21-flags { display: flex; gap: .5rem; margin-top: .7rem; }
.e21-flag { flex: 1; text-align: center; padding: .4rem; border-radius: 10px; border: 1px solid var(--e-line); font: 700 .74rem var(--e-mono); color: var(--e-soft); }
.e21-flag.on { color: #3D2B00; background: var(--s21-secondary); border-color: var(--s21-secondary-dark); }
.e21-mem { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; font: .62rem var(--e-mono); }
.e21-mem span { text-align: center; padding: .22rem 0; border-radius: 4px; background: var(--e-bg2); color: var(--e-soft); }
.e21-mem span.nz { color: var(--e-text); background: color-mix(in srgb, var(--e-cyan) 18%, transparent); }
.e21-mem span.cd { color: var(--e-text); background: color-mix(in srgb, var(--e-violet) 18%, transparent); }
.e21-mem span.pcb { background: var(--s21-secondary); color: #3D2B00; font-weight: 700; }
.e21-mem span.stk { color: var(--e-text); background: color-mix(in srgb, var(--s21-accent) 28%, transparent); }
.e21-mem span.wr { background: var(--s21-primary); color: #fff; }
.e21-console { font: .8rem/1.5 var(--e-mono); min-height: 70px; max-height: 120px; overflow: auto; background: #0a1a14; border: 1px solid var(--e-line); border-radius: var(--radius-sm); padding: .6rem .8rem; color: #86efac; white-space: pre-wrap; }
.e21-console .err { color: #ff8fa8; }
.e21-ledrow { display: flex; gap: 8px; margin-top: .7rem; }
.e21-ledrow i { width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--s21-text) 12%, var(--s21-white)); border: 1px solid var(--s21-border); transition: all .1s; }
.e21-ledrow i.on { background: var(--s21-accent); box-shadow: 0 0 12px var(--s21-accent); border-color: var(--s21-accent-tint); }

/* cpu: machine-code listing, cycle trace, memory legend */
.e21-listing div span:nth-child(2) { color: var(--e-blue-ink); font-weight: 700; }
.e21-trace { display: grid; gap: .55rem; font-size: .86rem; }
.e21-trace > div { display: grid; grid-template-columns: 78px 1fr; gap: .7rem; align-items: baseline; }
.e21-trace b { font: 800 .68rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: .25rem .4rem; border-radius: var(--radius-pill); color: var(--e-text); }
.e21-trace .f b { background: color-mix(in srgb, var(--e-cyan) 22%, transparent); }
.e21-trace .d b { background: color-mix(in srgb, var(--e-violet) 22%, transparent); }
.e21-trace .x b { background: color-mix(in srgb, var(--s21-primary) 22%, transparent); }
.e21-trace span { font-family: var(--e-mono); color: var(--e-text); font-size: .8rem; }
.e21-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .7rem; font-size: .74rem; font-weight: 700; color: var(--e-soft); }
.e21-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: .35rem; vertical-align: -2px; background: var(--e-panel2); }
.e21-legend i.cd { background: color-mix(in srgb, var(--e-violet) 35%, transparent); }
.e21-legend i.pcb { background: var(--s21-secondary); }
.e21-legend i.wr { background: var(--s21-primary); }
.e21-legend i.stk { background: color-mix(in srgb, var(--s21-accent) 45%, transparent); }
.e21-legend i.nz { background: color-mix(in srgb, var(--e-cyan) 35%, transparent); }

/* data lab */
.e21-dtable-wrap { max-height: 220px; overflow: auto; border: 1px solid var(--e-line); border-radius: var(--radius-sm); }
.e21-dtable-wrap table { margin: 0; }
.e21-drop { border: 2px dashed var(--s21-border); border-radius: var(--radius-sm); padding: .9rem; text-align: center; font-size: .84rem; font-weight: 600; color: var(--e-soft); cursor: pointer; transition: border-color .2s, background .2s; }
.e21-drop.over, .e21-drop:hover { border-color: var(--s21-primary); background: var(--s21-primary-light); }

/* ---------- Projects ---------- */
.e21-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.6rem 0 1.6rem; }
.e21-chipbtn { --c: var(--s21-primary); padding: .5rem 1.1rem; border-radius: var(--radius-pill); border: 1.5px solid var(--s21-border); background: var(--e-bg2); color: var(--e-soft); font: 700 .84rem var(--font-body); cursor: pointer; transition: all .25s var(--ease); display: inline-flex; gap: .45rem; align-items: center; }
.e21-chipbtn:hover { color: var(--e-text); border-color: var(--c); transform: translateY(-1px); }
.e21-chipbtn[aria-pressed="true"] { color: #fff; background: var(--s21-primary); border-color: var(--s21-primary); }
.e21-chipbtn[aria-pressed="true"] i { color: inherit; }
.e21-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.e21-proj { --c: var(--e-cyan); display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: var(--radius-md); border: 1px solid var(--e-line); background: var(--e-bg2); box-shadow: var(--e-shadow); overflow: hidden; cursor: pointer; color: inherit; font: inherit; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.e21-proj:hover { transform: translateY(-6px); box-shadow: var(--e-shadow-hover); }
.e21-proj-art { height: 120px; display: grid; place-items: center; font-size: 2.6rem; color: var(--c); position: relative; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, var(--e-bg2)), color-mix(in srgb, var(--c) 8%, var(--e-bg2))); border-bottom: 1px solid var(--e-line); }
.e21-proj-art::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--c) 40%, transparent) 1.5px, transparent 1.5px); background-size: 22px 22px; opacity: .5; mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); }
.e21-proj-art i { position: relative; z-index: 1; }
.e21-proj-body { padding: 1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.e21-proj-body h3 { font-size: 1.05rem; margin: 0; }
.e21-proj-body p { font-size: .86rem; margin: 0; flex: 1; }
.e21-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.e21-tag { font: 700 .7rem var(--font-body); padding: .22rem .65rem; border-radius: var(--radius-pill); background: var(--e-panel2); color: var(--e-soft); }
.e21-tag.lvl { color: var(--e-text); background: color-mix(in srgb, var(--c) 20%, transparent); }

dialog.e21-dialog { width: min(760px, 94vw); max-height: 90vh; padding: 0; border: 1px solid var(--e-line); border-radius: var(--radius-lg); background: var(--s21-white); color: var(--e-text); box-shadow: 0 40px 100px rgba(0, 0, 0, .45); overflow: hidden; }
dialog.e21-dialog::backdrop { background: rgba(6, 20, 15, .7); backdrop-filter: blur(6px); }
.e21-dlg-in { max-height: 90vh; overflow: auto; }
.e21-dlg-head { padding: 1.4rem 1.6rem 1rem; border-bottom: 1px solid var(--e-line); position: sticky; top: 0; background: var(--s21-white); z-index: 2; display: flex; justify-content: space-between; gap: 1rem; }
.e21-dlg-head h3 { margin: 0 0 .5rem; font-size: 1.4rem; }
.e21-x { background: var(--e-panel2); border: 1px solid var(--e-line); color: var(--e-text); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex: none; transition: background .2s, color .2s; }
.e21-x:hover { background: var(--s21-primary); color: #fff; }
.e21-dlg-body { padding: 1.2rem 1.6rem 1.6rem; display: grid; gap: 1.2rem; }
.e21-dlg-body h4 { font: 800 .76rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--e-green-ink); margin: 0 0 .5rem; }
.e21-dlg-body ul, .e21-dlg-body ol { margin: 0; padding-left: 1.2rem; color: var(--e-soft); font-size: .94rem; line-height: 1.65; }
.e21-dlg-body li::marker { color: var(--s21-primary); }
.e21-safe { border: 1px solid color-mix(in srgb, var(--s21-secondary-dark) 55%, transparent); background: var(--s21-secondary-tint); border-radius: 14px; padding: .75rem 1rem; font-size: .86rem; color: var(--e-text); }

/* ---------- Reference ---------- */
.e21-ref { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 2rem; align-items: start; }
.e21-ref details { border: 1px solid var(--e-line); border-radius: var(--radius-md); background: var(--e-bg2); box-shadow: var(--e-shadow); padding: 0; overflow: hidden; }
.e21-ref summary { cursor: pointer; list-style: none; padding: 1rem 1.2rem; font: 600 1rem var(--font-display); display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.e21-ref summary::-webkit-details-marker { display: none; }
.e21-ref summary::after { content: '+'; font-family: var(--font-display); font-weight: 600; color: var(--e-green-ink); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.e21-ref details[open] summary::after { transform: rotate(45deg); }
.e21-ref summary i { color: var(--e-green-ink); margin-right: .6rem; }
.e21-ref .in { padding: 0 1.2rem 1.2rem; font-size: .9rem; color: var(--e-soft); overflow-x: auto; }

/* ---------- Paths + CTA ---------- */
.e21-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.e21-path { --c: var(--e-cyan); display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem; border-radius: var(--radius-md); background: var(--e-bg2); border: 1px solid var(--e-line); border-top: 4px solid var(--c); box-shadow: var(--e-shadow); text-decoration: none !important; color: inherit !important; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.e21-path:hover { transform: translateY(-6px); box-shadow: var(--e-shadow-hover); }
.e21-path i.big { color: var(--c); font-size: 1.6rem; }
.e21-path h3 { margin: .2rem 0; font-size: 1.1rem; }
.e21-path p { margin: 0; font-size: .88rem; flex: 1; }
.e21-path .go { font: 700 .84rem var(--font-body); color: var(--e-green-ink); }
.e21-cta-band { position: relative; overflow: hidden; margin-top: 3rem; border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.4rem); text-align: center; color: #fff; isolation: isolate;
  background: radial-gradient(120% 100% at 15% 0%, #0E8060 0%, var(--s21-primary) 45%, var(--s21-primary-dark) 100%); }
.e21-cta-band::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .12) 1.5px, transparent 1.5px); background-size: 26px 26px; opacity: .5; z-index: -1; pointer-events: none; }
.e21-cta-band h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 .6rem; color: #fff; }
.e21-cta-band .e21-grad { color: var(--s21-secondary); }
.e21-cta-band p { max-width: 52ch; margin: 0 auto 1.4rem; color: rgba(255, 255, 255, .88); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .e21-hero-grid { grid-template-columns: 1fr; padding: 6rem 0 3.5rem; }
  .e21-device { transform: none; max-width: 520px; }
  .e21-domains { grid-template-columns: repeat(2, 1fr); }
  .e21-two, .e21-cpu, .e21-ref { grid-template-columns: 1fr; }
  .e21-section { padding: 3.5rem 0; }
}
@media (max-width: 575px) {
  .e21-domains { grid-template-columns: 1fr; }
  .e21-logic-stage { grid-template-columns: 1fr; justify-items: center; }
  .e21-switches { flex-direction: row; }
    .e21-regs { grid-template-columns: repeat(2, 1fr); }
  .e21-bit { width: 36px; }
  .e21-title { font-size: 2.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .e21 *, .e21 *::before, .e21 *::after { animation: none !important; transition: none !important; }
  .e21-ticker-track { transform: none; flex-wrap: wrap; width: auto; }
}

.e21-bench:fullscreen { overflow: auto; background: var(--s21-bg); border-radius: 0; }
.e21-bench:fullscreen .e21-panel { min-height: calc(100vh - 110px); }
.e21 summary { color: var(--e-text); }
.e21 .d-none { display: none !important; }

.e21 section[id], .e21 [id="labs"] { scroll-margin-top: 80px; }

/* =====================================================================
   Responsive polish: tablets, phones, landscape phones, touch devices
   ===================================================================== */
.e21-wrap { padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right)); }
.e21-lab-head > div:last-child { max-width: 100%; }
.e21-ref .in, .e21-dtable-wrap, .e21-listing { -webkit-overflow-scrolling: touch; }
.e21 img, .e21 svg, .e21 canvas { max-width: 100%; }

@media (max-width: 991px) {
  .e21-device { margin-inline: auto; width: 100%; max-width: 560px; }
      .e21-hero { min-height: 0; }
  .e21-stats { gap: 1.2rem 2.2rem; }
  .e21-lab-head > .e21-field, .e21-lab-head > div:last-child:not(:first-child) { min-width: 0; }
}

@media (max-width: 767px) {
  .e21-bench { border-radius: var(--radius-md); }
  .e21-bench-head { padding: .55rem .8rem; }
  .e21-bench-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* tabs: swipeable, snap, with a soft fade that hints there is more */
  .e21-tabs { scroll-snap-type: x proximity; padding: .6rem .6rem; gap: .35rem; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); scrollbar-width: none; }
  .e21-tabs::-webkit-scrollbar { display: none; }
  .e21-tab { scroll-snap-align: start; }
  .e21-panel { padding: 1rem .85rem 1.2rem; min-height: 0; }
  .e21-card { padding: .9rem .9rem; }
  .e21-lab-head { flex-direction: column; align-items: stretch; gap: .8rem; margin-bottom: 1rem; }
  .e21-lab-head > * { width: 100%; }
  .e21-lab-head .e21-field { min-width: 0 !important; }
  .e21-seg { width: 100%; justify-content: stretch; }
  .e21-seg button { flex: 1 1 auto; text-align: center; }
  .e21-two, .e21-cpu { gap: 1rem; }
  .e21-section { padding: 3rem 0; }
  .e21-ref { gap: .9rem; }
  .e21-paths { grid-template-columns: repeat(2, 1fr); }
  .e21-cta-band { margin-top: 2rem; }
}

@media (max-width: 575px) {
  .e21-wrap { width: min(1320px, 100% - 1.5rem); }
  .e21-hero-grid { padding: 5.5rem 0 2.5rem; gap: 2rem; }
  .e21-title { font-size: clamp(2.3rem, 12vw, 2.9rem); }
  .e21-sub { font-size: 1.02rem; }
  .e21-badge { font-size: .68rem; letter-spacing: .05em; padding: .42rem .8rem; }
  .e21-cta { gap: .6rem; }
  .e21-cta .e21-btn { flex: 1 1 calc(50% - .3rem); padding: .75rem .9rem; }
  .e21-cta .e21-btn.solid { flex-basis: 100%; }
  .e21-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1rem; margin-top: 1.8rem; padding-right: 56px; }
  .e21-stat b { font-size: 1.6rem; }
  .e21-device { padding: 10px; border-radius: 20px; }
  .e21-device-bar { font-size: .62rem; }
  /* domain cards: compact, icon beside the title */
  .e21-domains { gap: .9rem; margin-top: 1.5rem; }
  .e21-domain { padding: 1.1rem 1.1rem 1.2rem; display: grid; grid-template-columns: 48px 1fr; column-gap: .9rem; align-items: center; }
  .e21-domain .ic { width: 48px; height: 48px; margin: 0; grid-row: 1; font-size: 1.25rem; }
  .e21-domain h3 { margin: 0; grid-column: 2; font-size: 1.1rem; }
  .e21-domain p, .e21-domain ul { grid-column: 1 / -1; }
  .e21-domain p { margin: .8rem 0 .7rem; }
  .e21-tab { padding: .55rem .9rem; font-size: .8rem; }
  .e21-lab-head h3 { font-size: 1.2rem; }
  .e21-logic-stage { grid-template-columns: 1fr; justify-items: center; gap: .8rem; }
  .e21-switches { flex-direction: row; gap: 1.2rem; }
  .e21-gate-svg { max-width: 100%; }
  .e21-regs { grid-template-columns: repeat(2, 1fr); }
  .e21-reg i { font-size: .56rem; }
  .e21-kv { grid-template-columns: repeat(2, 1fr); }
  .e21-trace > div { grid-template-columns: 1fr; gap: .25rem; }
  .e21-trace b { justify-self: start; padding: .2rem .7rem; }
  .e21-code { font-size: .78rem; min-height: 220px; }
  .e21-listing { max-height: 220px; font-size: .72rem; }
  .e21-listing div { grid-template-columns: 30px 74px 1fr; padding-inline: .45rem; }
  .e21-mem { gap: 1px; font-size: .56rem; }
  .e21-bit { width: 38px; }
  .e21-bits { gap: .35rem; }
  .e21-proj-grid { grid-template-columns: 1fr; }
  .e21-proj-art { height: 96px; }
  .e21-filters { gap: .4rem; }
  .e21-chipbtn { padding: .45rem .85rem; font-size: .8rem; }
  .e21-paths { grid-template-columns: 1fr; }
  .e21-cta-band { border-radius: var(--radius-md); padding: 2rem 1.2rem; }
  .e21-cta-band .e21-cta { justify-content: center; }
  /* iOS zooms into inputs smaller than 16px: keep them at 16px */
  .e21-in, .e21-sel, .e21-ta { font-size: 16px; }
  .e21-code { font-size: 16px; }
  .e21-ticker-track { font-size: .78rem; gap: 2rem; }
  /* project dialog becomes a full-screen sheet */
  dialog.e21-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .e21-dlg-in { max-height: 100dvh; }
  .e21-dlg-head { padding: 1rem 1rem .8rem; padding-top: max(1rem, env(safe-area-inset-top)); }
  .e21-dlg-body { padding: 1rem 1rem calc(1.4rem + env(safe-area-inset-bottom)); }
}

/* very small phones */
@media (max-width: 360px) {
  .e21-title { font-size: 2.2rem; }
  .e21-tab i { display: none; }
  .e21-regs { gap: .4rem; }
  .e21-btn.sm { padding: .5rem .7rem; }
}

/* landscape phones: don't waste the short screen */
@media (max-height: 500px) and (orientation: landscape) {
  .e21-hero-grid { padding: 4.5rem 0 2rem; }
  .e21-section { padding: 2.5rem 0; }
  dialog.e21-dialog { height: 100dvh; max-height: 100dvh; }
}

/* touch devices: comfortable 44px targets, bigger slider thumbs */
@media (pointer: coarse) {
  .e21-btn, .e21-btn.sm, .e21-seg button, .e21-chipbtn, .e21-tab, .e21-x { min-height: 44px; }
  .e21-x { min-width: 44px; }
  .e21-sw { min-height: 44px; }
  .e21-sw .t { width: 52px; height: 28px; }
  .e21-sw .t::after { width: 22px; height: 22px; }
  .e21-sw[aria-checked="true"] .t::after { transform: translateX(24px); }
  .e21-bit { padding: .65rem 0 .5rem; }
  .e21-range { height: 32px; }
  .e21-range::-webkit-slider-thumb { width: 24px; height: 24px; }
  .e21-range::-moz-range-thumb { width: 24px; height: 24px; }
  .e21-domain:hover, .e21-proj:hover, .e21-path:hover, .e21-btn:hover { transform: none; }
  .e21-device { transform: none; }
}

/* ---------- course link: hint bar under the lab tabs + "learn it, try it" section ---------- */
.e21-lesson-hint { display: flex; align-items: center; gap: .7rem; padding: .65rem 1.1rem; border-bottom: 1px solid var(--e-line); background: var(--s21-primary-light); font-size: .86rem; color: var(--e-soft); }
.e21-lesson-hint[hidden] { display: none; }
.e21-lesson-hint i { color: var(--e-green-ink); flex: none; }
.e21-lesson-hint a { color: var(--e-green-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.e21-lesson-hint a:hover { color: var(--s21-accent); }
.e21-course { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding: clamp(1.5rem, 4vw, 2.6rem); border-radius: var(--radius-lg); border: 1px solid var(--e-line); background: var(--e-bg2); box-shadow: var(--e-shadow-hover); position: relative; overflow: hidden; }
.e21-course::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; background: linear-gradient(180deg, var(--s21-primary), var(--s21-secondary)); }
.e21-course .e21-cta { margin-top: 1.4rem; }
.e21-course .e21-btn.solid { color: #fff !important; }
.e21-course-map { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.e21-course-map li { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: center; padding: .85rem 1rem; border-radius: var(--radius-md); background: var(--e-inset); border: 1px solid var(--e-line); }
.e21-course-map .m small { display: block; font: 800 .66rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--e-soft); }
.e21-course-map .m a { font: 600 .95rem var(--font-display); color: var(--e-text); text-decoration: none; }
.e21-course-map .m a:hover { color: var(--e-green-ink); }
.e21-course-map .l { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.e21-course-map .l a { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: var(--radius-pill); font: 700 .76rem var(--font-body); color: var(--e-text); background: var(--e-bg2); border: 1px solid var(--e-line); text-decoration: none; transition: border-color .2s, transform .2s var(--ease), background .2s; white-space: nowrap; }
.e21-course-map .l a i { color: var(--e-green-ink); }
.e21-course-map .l a:hover { border-color: var(--s21-primary); background: var(--s21-primary-light); transform: translateY(-1px); color: var(--e-text); }
@media (max-width: 991px) { .e21-course { grid-template-columns: 1fr; } }
@media (max-width: 575px) {
  .e21-course-map li { grid-template-columns: 1fr; gap: .55rem; }
  .e21-course-map .l { justify-content: flex-start; }
  .e21-lesson-hint { padding: .6rem .85rem; font-size: .82rem; align-items: flex-start; }
  .e21-lesson-hint i { margin-top: .15rem; }
}
@media (pointer: coarse) { .e21-course-map .l a { min-height: 40px; } }

/* ---------- standalone workbench page + "own page" links ---------- */
.e21-wb-cta { margin: .2rem 0 1.4rem; }
.e21-wb-label { display: none; }
@media (min-width: 576px) { .e21-wb-label { display: inline; } }
.e21-hero-sm { min-height: 0; display: block; padding: 7rem 0 3rem; }
.e21-hero-sm .e21-title { margin: .6rem 0 .6rem; }
.e21-hero-sm .e21-sub { max-width: 52ch; margin-bottom: 1.4rem; }
.e21-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; color: rgba(255, 255, 255, .85); }
.e21-crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.e21-crumbs a:hover { color: var(--s21-secondary); }
.e21-crumbs i { font-size: .6rem; opacity: .7; }
.e21-crumbs span { color: #fff; }
.e21-wb .e21-panel { min-height: 520px; }
.e21-wb-tips { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-size: .84rem; color: var(--e-soft); }
.e21-wb-tips i { color: var(--e-green-ink); margin-right: .4rem; }
@media (max-width: 767px) { .e21-hero-sm { padding: 5.5rem 0 2rem; } .e21-wb .e21-panel { min-height: 0; } }
.e21-hero-sm .e21-title { flex-wrap: wrap; white-space: normal; align-items: center; font-size: clamp(2.1rem, 7vw, 3.6rem); }
.e21-hero-sm .e21-title .wb { color: #fff; font-weight: 600; opacity: .92; }

/* ---------- The electron: fact cards, drift model, timeline ---------- */
.e21-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin: 2rem 0 1.4rem; }
.e21-fact { --c: var(--e-cyan); position: relative; display: grid; gap: .25rem; padding: 1.2rem 1.3rem 1.2rem 1.4rem; border-radius: var(--radius-md); background: var(--e-bg2); border: 1px solid var(--e-line); box-shadow: var(--e-shadow); overflow: hidden; }
.e21-fact::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); }
.e21-fact > i { color: var(--c); font-size: 1.15rem; margin-bottom: .2rem; }
.e21-fact small { font: 800 .68rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--e-soft); }
.e21-fact b { font: 700 1.25rem/1.25 var(--font-display); color: var(--e-text); }
.e21-fact b sup { font-size: .6em; line-height: 0; }
.e21-fact span { font-size: .86rem; color: var(--e-soft); line-height: 1.5; }
.e21-el-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.2rem; align-items: start; }
#el-canvas { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--e-line); background: #0a1a14; }
.e21-el-list { margin: 0; padding-left: 1.15rem; font-size: .9rem; color: var(--e-soft); line-height: 1.6; display: grid; gap: .45rem; }
.e21-el-list li::marker { color: var(--s21-primary); }
.e21-el-list b { color: var(--e-text); }
.e21 .e21-h3 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin: 3rem 0 1.4rem; font-weight: 700; }
.e21-timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.1rem; }
.e21-timeline::before { content: ''; position: absolute; left: 5.2rem; top: .4rem; bottom: .4rem; width: 2px; background: linear-gradient(180deg, var(--s21-primary), var(--s21-secondary)); border-radius: 2px; }
.e21-timeline li { position: relative; display: grid; grid-template-columns: 4.4rem 1fr; column-gap: 2rem; row-gap: .15rem; align-items: baseline; }
.e21-timeline li::before { content: ''; position: absolute; left: calc(5.2rem - 5px); top: .5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--e-bg2); border: 3px solid var(--s21-primary); }
.e21-timeline time { font: 800 1rem var(--font-display); color: var(--e-green-ink); text-align: right; }
.e21-timeline b { font: 600 1.02rem var(--font-display); color: var(--e-text); grid-column: 2; }
.e21-timeline span { grid-column: 2; font-size: .9rem; color: var(--e-soft); max-width: 62ch; }
.e21-el-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin: 2rem 0 0; }
@media (max-width: 991px) { .e21-facts { grid-template-columns: repeat(2, 1fr); } .e21-el-grid { grid-template-columns: 1fr; } }
@media (max-width: 575px) {
  .e21-facts { grid-template-columns: 1fr; gap: .8rem; }
  .e21-timeline::before { left: 5px; }
  .e21-timeline li { grid-template-columns: 1fr; padding-left: 1.7rem; }
  .e21-timeline li::before { left: 0; }
  .e21-timeline time { text-align: left; }
  .e21-timeline b, .e21-timeline span { grid-column: 1; }
  .e21-el-cta .e21-btn { flex: 1 1 100%; }
}
.e21-fact code { white-space: nowrap; }
@media (max-width: 575px) { .e21-drift .e21-kv { grid-template-columns: 1fr; } .e21-drift .e21-kv b { white-space: nowrap; } }

/* code blocks inside project steps */
.e21-dlg-body pre { margin: .7rem 0 .2rem; padding: .8rem 1rem; border-radius: 12px; background: #0a1a14; border: 1px solid var(--e-line); color: #86efac; font: .78rem/1.55 var(--e-mono); overflow-x: auto; white-space: pre; -webkit-overflow-scrolling: touch; }
.e21-dlg-body li code { font-size: .82em; }

/* ---------- Hero search ---------- */
.e21-search { position: relative; display: flex; align-items: center; gap: .7rem; max-width: 600px; margin: 0 0 .9rem; padding: .35rem .5rem .35rem 1.15rem; background: #fff; border: 2px solid transparent; border-radius: var(--radius-pill); box-shadow: 0 14px 34px rgba(0, 0, 0, .25); z-index: 20; }
.e21-search:focus-within { border-color: var(--s21-secondary); box-shadow: 0 0 0 4px rgba(255, 209, 102, .4), 0 14px 34px rgba(0, 0, 0, .25); }
.e21-search-ic { color: #6B7280; flex: none; }
.e21-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: .65rem 0; font: 600 1rem var(--font-body); color: #111 !important; -webkit-text-fill-color: #111; caret-color: var(--s21-primary); }
.e21-search input::placeholder { color: #6B7280; opacity: 1; -webkit-text-fill-color: #6B7280; font-weight: 500; }
.e21-search input::-webkit-search-cancel-button { display: none; }
.e21-search kbd { flex: none; font: 700 .72rem var(--e-mono); color: #5B6470; background: #F1F3F5; border: 1px solid #E1E4E8; border-radius: 6px; padding: .15rem .5rem; }
.e21-q-clear { display: none; flex: none; appearance: none; border: 0; background: #F1F3F5; color: #111; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.e21-go { flex: none; appearance: none; border: 0; cursor: pointer; background: var(--s21-accent); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1rem; transition: transform .15s, filter .15s; }
.e21-go:hover { transform: scale(1.06); filter: brightness(1.08); }
.e21-go:focus-visible { outline: 3px solid rgba(239, 71, 111, .45); outline-offset: 2px; }
.e21-q-clear:hover { background: var(--s21-primary); color: #fff; }
.e21-search.has-text .e21-q-clear { display: inline-grid; place-items: center; }
.e21-search.has-text kbd { display: none; }
.e21-results { position: absolute; left: 0; right: 0; top: calc(100% + 10px); margin: 0; padding: .4rem; list-style: none; background: var(--s21-white); border: 1px solid var(--e-line); border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); max-height: min(60vh, 400px); overflow: auto; z-index: 30; -webkit-overflow-scrolling: touch; }
.e21-results[hidden] { display: none; }
.e21-results li[role="option"] { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .55rem .65rem; border-radius: 14px; cursor: pointer; color: var(--e-text); }
.e21-results li[aria-selected="true"] { background: var(--s21-primary-light); }
.e21-results .ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.e21-results .tx { min-width: 0; }
.e21-results .tx b { display: block; font: 600 .92rem/1.25 var(--font-display); color: var(--e-text); }
.e21-results .tx small { display: block; font: 500 .76rem/1.35 var(--font-body); color: var(--e-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e21-results .ty { font: 800 .62rem var(--font-body); letter-spacing: .07em; text-transform: uppercase; padding: .22rem .6rem; border-radius: var(--radius-pill); background: var(--e-panel2); color: var(--e-soft); white-space: nowrap; }
.e21-results .none { display: block; padding: 1rem 1.1rem; font-size: .88rem; color: var(--e-soft); }
.e21-results .none i { margin-right: .5rem; color: var(--e-amber-ink); }
.e21-results .none b { color: var(--e-text); }
.e21-search-hints { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0 0 1.5rem; font: 700 .78rem var(--font-body); color: rgba(255, 255, 255, .85); }
.e21-search-hints button { appearance: none; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); color: #fff; font: 700 .76rem var(--font-body); padding: .3rem .8rem; border-radius: var(--radius-pill); cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
.e21-search-hints button:hover { background: rgba(255, 255, 255, .26); border-color: #fff; }
@media (max-width: 575px) {
  .e21-search { padding-left: 1rem; }
  .e21-results li[role="option"] { grid-template-columns: 36px minmax(0, 1fr); }
  .e21-results .ty { display: none; }
  .e21-results .ic { width: 36px; height: 36px; }
}
@media (pointer: coarse) { .e21-search kbd { display: none; } .e21-search-hints button { min-height: 40px; } }
.e21 .e21-search input:focus-visible { outline: none; }
@media (max-width: 575px) { body:has(.e21-search.open) .fab { opacity: 0; pointer-events: none; transition: opacity .15s; } }

/* course cover image inside the "learn it, try it" panel */
.e21-course { --pad: clamp(1.5rem, 4vw, 2.6rem); padding: var(--pad); }
.e21-course-cover { grid-column: 1 / -1; position: relative; display: block; margin: calc(var(--pad) * -1) calc(var(--pad) * -1) .2rem; height: clamp(150px, 22vw, 230px); overflow: hidden; background: var(--s21-primary-light); }
.e21-course-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; transition: transform .6s var(--ease); }
.e21-course-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(6, 30, 22, .55)); pointer-events: none; }
.e21-course-cover:hover img { transform: scale(1.04); }
.e21-course-tag { position: absolute; left: var(--pad); bottom: 1rem; z-index: 1; display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .4); backdrop-filter: blur(6px); color: #fff; font: 700 .76rem var(--font-body); letter-spacing: .04em; }
.e21-course-tag i { color: var(--s21-secondary); }
@media (pointer: coarse) { .e21-course-cover:hover img { transform: none; } }
@media (prefers-reduced-motion: reduce) { .e21-course-cover img { transition: none; } }
