/* MTM Mechatronik — site styles */
:root {
  --g50:#f0fdf4; --g100:#dcfce7; --g200:#bbf7d0; --g400:#4ade80; --g500:#22c55e;
  --g600:#16a34a; --g700:#15803d; --g900:#0b3d24;
  --dark:#0f1712; --dark2:#16211a; --dark3:#1f2d24;
  --ink:#0f1712; --ink2:#334139; --muted:#64706a;
  --bg:#f5f7f5; --card:#ffffff; --card2:#fafcfa; --line:#e2e8e3;
  --sym-bg:#ffffff; --accent:#15803d; --tint:#dcfce7; --tint-ink:#0b3d24; --soft:#f0fdf4; --soft-line:#bbf7d0;
  --warn-bg:#fff7ed; --warn-ink:#7a4100; --warn-line:#f59e0b; --err-bg:#fef3f2; --err-ink:#b42318;
  --radius:18px; --radius-sm:12px;
  --shadow:0 1px 2px rgba(15,23,18,.06), 0 8px 24px rgba(15,23,18,.06);
  --font:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-ar:'Cairo', 'Noto Sans Arabic', Tahoma, sans-serif;
}
/* Dark theme: follows the device setting; data-theme on <html> can force either one */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sym-bg:#131c16; --bg:#0b110d; --card:#131c16; --card2:#18231c; --line:#26342b;
    --ink:#e8efe9; --ink2:#c2cdc5; --muted:#8f9c94;
    --accent:#4ade80; --tint:rgba(34,197,94,.16); --tint-ink:#bbf7d0; --soft:rgba(34,197,94,.08); --soft-line:rgba(74,222,128,.25);
    --warn-bg:rgba(245,158,11,.14); --warn-ink:#fcd34d; --warn-line:#f59e0b; --err-bg:rgba(244,63,94,.15); --err-ink:#fda4af;
    --shadow:0 1px 2px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.35);
    color-scheme:dark;
  }
}
:root[data-theme="dark"] {
    --sym-bg:#131c16; --bg:#0b110d; --card:#131c16; --card2:#18231c; --line:#26342b;
    --ink:#e8efe9; --ink2:#c2cdc5; --muted:#8f9c94;
    --accent:#4ade80; --tint:rgba(34,197,94,.16); --tint-ink:#bbf7d0; --soft:rgba(34,197,94,.08); --soft-line:rgba(74,222,128,.25);
    --warn-bg:rgba(245,158,11,.14); --warn-ink:#fcd34d; --warn-line:#f59e0b; --err-bg:rgba(244,63,94,.15); --err-ink:#fda4af;
    --shadow:0 1px 2px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.35);
    color-scheme:dark;
}

* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:var(--font); font-size:16.5px; line-height:1.65; -webkit-font-smoothing:antialiased; }
html[lang="ar"] body { font-family:var(--font-ar); font-size:17px; }
img, svg { display:block; max-width:100%; }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }
h1, h2, h3 { line-height:1.25; margin:0 0 .5em; letter-spacing:-.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing:0; line-height:1.45; }
p { margin:0 0 1em; }
.container { width:100%; max-width:1160px; margin:0 auto; padding:0 16px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* ---------- Header ---------- */
.site-header { position:sticky; top:0; z-index:50; background:rgba(15,23,18,.96); backdrop-filter:blur(8px); border-bottom:1px solid rgba(255,255,255,.06); }
.nav { display:flex; align-items:center; gap:20px; height:68px; }
.brand { display:flex; align-items:center; gap:12px; color:#fff; flex:none; direction:ltr; }
.brand:hover { text-decoration:none; }
.brand .mark { width:48px; height:48px; }
.brand-text { display:flex; flex-direction:column; align-items:center; gap:3px; line-height:1; }
.brand-name { font-family:var(--font-ar); font-weight:700; font-size:11px; color:var(--g400); letter-spacing:.02em; line-height:1; }
.brand-word { font-family:var(--font-ar); font-weight:800; font-size:21px; color:#fff; line-height:1; padding-top:2px; }
.menu { display:flex; gap:4px; margin-inline-start:auto; }
.menu a { color:#cfd8d2; padding:8px 12px; border-radius:999px; font-weight:600; font-size:15px; }
.menu a:hover { color:#fff; background:rgba(255,255,255,.07); text-decoration:none; }
.menu a.active { color:var(--dark); background:var(--g400); }
.lang { display:flex; background:rgba(255,255,255,.07); border-radius:999px; padding:3px; flex:none; }
.lang button { border:0; background:none; color:#cfd8d2; font:inherit; font-size:13.5px; font-weight:700; padding:5px 11px; border-radius:999px; cursor:pointer; }
.lang button[aria-pressed="true"] { background:#ffffff; color:var(--dark); }
.lang button[data-lang="ar"] { font-family:var(--font-ar); }
.menu-btn { display:none; border:0; background:rgba(255,255,255,.08); color:#fff; width:42px; height:42px; border-radius:50%; cursor:pointer; place-items:center; }
@media (max-width: 1100px) {
  .nav { gap:10px; }
  .menu-btn { display:grid; }
  .lang { margin-inline-start:auto; }
  .menu { display:none; position:absolute; inset-inline:0; top:68px; flex-direction:column; background:var(--dark); padding:10px 16px 18px; border-bottom:1px solid rgba(255,255,255,.08); }
  .menu.open { display:flex; }
  .menu a { padding:12px 14px; font-size:16px; }
  .brand .mark { width:42px; height:42px; }
  .brand-word { font-size:18px; }
}
@media (max-width: 520px) { .brand-text { display:none; } .nav { gap:8px; } .lang button { padding:5px 9px; } .theme-btn, .menu-btn { width:38px; height:38px; } }

/* ---------- Buttons & chips ---------- */
.btn { display:inline-flex; align-items:center; gap:8px; padding:12px 20px; border-radius:999px; font-weight:700; border:2px solid transparent; cursor:pointer; font:inherit; font-weight:700; }
.btn:hover { text-decoration:none; }
.btn-primary { background:var(--g500); color:var(--dark); }
.btn-primary:hover { background:var(--g400); }
.btn-ghost { border-color:rgba(255,255,255,.25); color:#fff; }
.btn-ghost:hover { border-color:#fff; }
.btn-outline { border-color:var(--line); color:var(--ink); background:var(--card); }
.chip { display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:999px; font-size:13px; font-weight:700; background:var(--tint); color:var(--tint-ink); }
.chip.dark { background:rgba(255,255,255,.08); color:#d7e3db; }
.ico { width:20px; height:20px; flex:none; }

/* ---------- Hero ---------- */
.hero { background:radial-gradient(1000px 500px at 85% -10%, rgba(34,197,94,.22), transparent 60%), var(--dark); color:#fff; padding:64px 0 72px; overflow:hidden; }
.hero-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:48px; align-items:center; }
.kicker { color:var(--g400); font-weight:800; text-transform:uppercase; letter-spacing:.08em; font-size:13px; margin-bottom:12px; }
html[lang="ar"] .kicker { letter-spacing:0; font-size:15px; }
.hero h1 { font-size:clamp(34px, 5vw, 54px); font-weight:900; }
.hero h1 em { font-style:normal; color:var(--g400); }
.hero p.lead { color:#c3cfc7; font-size:18.5px; max-width:560px; }
.hero .actions { display:flex; gap:12px; flex-wrap:wrap; margin:26px 0 22px; }
.hero .badges { display:flex; gap:8px; flex-wrap:wrap; }
.hero-card { background:linear-gradient(160deg, var(--dark3), var(--dark2)); border:1px solid rgba(255,255,255,.08); border-radius:28px; padding:34px 28px; position:relative; }
.hero-card .big-mark { width:100%; max-width:260px; height:auto; margin:0 auto 26px; filter:drop-shadow(0 12px 30px rgba(34,197,94,.18)); }
.hero-card .pillars { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.pillar { display:flex; align-items:center; gap:10px; padding:12px; border-radius:14px; background:rgba(255,255,255,.05); color:#e3ece6; font-weight:700; font-size:14.5px; }
.pillar .ico { color:var(--g400); }
@media (max-width: 900px) { .hero { padding:44px 0 52px; } .hero-grid { grid-template-columns:1fr; gap:32px; } }

/* ---------- Sections ---------- */
section.block { padding:64px 0; }
section.block.alt { background:var(--card); border-block:1px solid var(--line); }
.section-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:26px; flex-wrap:wrap; }
.section-head h2 { font-size:clamp(26px, 3.2vw, 34px); font-weight:900; margin:0; }
.section-head p { color:var(--muted); margin:6px 0 0; }
.more { font-weight:700; white-space:nowrap; }

/* Category cards */
.cats { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }
.cat { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:22px; color:var(--ink); transition:transform .15s, box-shadow .15s, border-color .15s; display:flex; flex-direction:column; }
.cat:hover { transform:translateY(-3px); box-shadow:var(--shadow); border-color:var(--g400); text-decoration:none; }
.cat .ic { width:48px; height:48px; border-radius:50%; background:var(--tint); color:var(--accent); display:grid; place-items:center; margin-bottom:14px; }
.cat .ic .ico { width:24px; height:24px; }
.cat h3 { font-size:19px; margin-bottom:6px; }
.cat p { color:var(--muted); font-size:15px; margin:0 0 14px; }
.cat .go { margin-top:auto; color:var(--accent); font-weight:700; font-size:14.5px; }
@media (max-width: 960px) { .cats { grid-template-columns:repeat(2, 1fr); } }
@media (max-width: 520px) { .cats { grid-template-columns:1fr; } }

/* Video reels */
.reels { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }
.reel { position:relative; aspect-ratio:9/14; border-radius:var(--radius); overflow:hidden; color:#fff; display:flex; flex-direction:column; justify-content:flex-end; padding:16px; background:linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.78)), var(--bgc, #1f2d24); box-shadow:var(--shadow); }
.reel:hover { text-decoration:none; transform:translateY(-3px); }
.reel { transition:transform .15s; }
.reel .art { position:absolute; inset:0; display:grid; place-items:center; color:rgba(255,255,255,.14); }
.reel .art .ico { width:42%; height:auto; }
.reel .play { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:58px; height:58px; border-radius:50%; background:rgba(255,255,255,.92); display:grid; place-items:center; color:var(--dark); }
.reel .platform { position:absolute; top:12px; inset-inline-start:12px; font-size:12px; font-weight:800; padding:4px 10px; border-radius:999px; background:rgba(0,0,0,.45); display:flex; align-items:center; gap:6px; }
.reel .platform i { width:9px; height:9px; border-radius:50%; background:var(--pc, #fff); display:inline-block; }
.reel .len { position:absolute; top:12px; inset-inline-end:12px; font-size:12px; font-weight:700; padding:3px 8px; border-radius:6px; background:rgba(0,0,0,.45); }
.reel h3 { font-size:16.5px; margin:0 0 6px; position:relative; }
.reel .tag { font-size:12.5px; color:var(--g200); font-weight:700; position:relative; }
@media (max-width: 960px) { .reels { grid-template-columns:repeat(2, 1fr); } }

/* Lesson cards */
.lessons { display:grid; grid-template-columns:repeat(3, 1fr); gap:18px; }
.lesson-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; color:var(--ink); display:flex; flex-direction:column; transition:box-shadow .15s, transform .15s; }
.lesson-card:hover { box-shadow:var(--shadow); transform:translateY(-3px); text-decoration:none; }
.lesson-card .thumb { aspect-ratio:16/8; background:linear-gradient(135deg, var(--g900), #123524); display:grid; place-items:center; color:var(--g400); }
.lesson-card .thumb .ico { width:56px; height:56px; }
.lesson-card .body { padding:18px 20px 20px; display:flex; flex-direction:column; flex:1; }
.lesson-card h3 { font-size:18.5px; margin:10px 0 8px; }
.lesson-card p { color:var(--muted); font-size:15px; }
.meta { display:flex; gap:12px; flex-wrap:wrap; font-size:13.5px; color:var(--muted); font-weight:600; margin-top:auto; }
.meta span { display:inline-flex; align-items:center; gap:5px; }
.meta .ico { width:15px; height:15px; }
@media (max-width: 960px) { .lessons { grid-template-columns:1fr 1fr; } }
@media (max-width: 620px) { .lessons { grid-template-columns:1fr; } }

/* Dictionary teaser + table */
.dict-teaser { display:grid; grid-template-columns:.9fr 1.1fr; gap:36px; align-items:center; }
.dict-teaser h2 { font-size:clamp(26px, 3.2vw, 34px); font-weight:900; }
.dict-teaser p { color:var(--muted); }
@media (max-width: 900px) { .dict-teaser { grid-template-columns:1fr; } }
.table-wrap { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:auto; }
table.dict { width:100%; border-collapse:collapse; min-width:520px; }
table.dict th, table.dict td { padding:12px 16px; text-align:start; border-bottom:1px solid var(--line); vertical-align:middle; }
table.dict th { font-size:13px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); background:var(--card2); position:sticky; top:0; }
table.dict tr:last-child td { border-bottom:0; }
table.dict td.ar { font-family:var(--font-ar); font-weight:700; direction:rtl; font-size:16.5px; }
table.dict td.de { font-weight:700; color:var(--accent); }
table.dict td .cat-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-inline-end:8px; background:var(--g500); }
.dict-tools { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:18px; }
.search { flex:1 1 280px; display:flex; align-items:center; gap:10px; background:var(--card); border:2px solid var(--line); border-radius:999px; padding:0 16px; }
.search:focus-within { border-color:var(--g500); }
.search input { color:var(--ink); border:0; outline:0; font:inherit; padding:12px 0; flex:1; background:none; min-width:0; }
.filters { display:flex; gap:8px; flex-wrap:wrap; }
.filters button { border:1px solid var(--line); background:var(--card); border-radius:999px; padding:8px 14px; font:inherit; font-size:14px; font-weight:700; cursor:pointer; color:var(--ink2); }
.filters button[aria-pressed="true"] { background:var(--ink); color:var(--card); border-color:var(--ink); }
.empty { padding:28px; text-align:center; color:var(--muted); }

/* Newsletter */
.newsletter { background:linear-gradient(120deg, var(--g900), #0e4a2c 60%, #14532d); color:#fff; border-radius:28px; padding:40px; display:grid; grid-template-columns:1fr 1fr; gap:28px; align-items:center; }
.newsletter h2 { font-size:clamp(24px, 3vw, 32px); font-weight:900; }
.newsletter p { color:#c6e5d0; margin:0; }
.nl-form { display:flex; gap:10px; flex-wrap:wrap; }
.nl-form input { flex:1 1 220px; border:0; background:var(--card); color:var(--ink); border-radius:999px; padding:14px 20px; font:inherit; min-width:0; }
.nl-form .note { flex-basis:100%; font-size:13.5px; color:#a7d3b6; margin-top:4px; }
.nl-ok { display:none; background:rgba(255,255,255,.1); border-radius:14px; padding:14px 18px; font-weight:700; }
.nl-done .nl-form { display:none; } .nl-done .nl-ok { display:block; }
@media (max-width: 800px) { .newsletter { grid-template-columns:1fr; padding:28px 22px; } }

/* ---------- Article (lesson) ---------- */
.page-head { background:var(--dark); color:#fff; padding:42px 0 46px; }
.page-head h1 { font-size:clamp(28px, 4.2vw, 44px); font-weight:900; max-width:820px; }
.page-head p { color:#c3cfc7; max-width:720px; font-size:18px; margin:0; }
.crumb { color:var(--g400); font-weight:700; font-size:14.5px; display:inline-block; margin-bottom:14px; }
.article-grid { display:grid; grid-template-columns:minmax(0, 1fr) 320px; gap:36px; padding:40px 0 64px; align-items:start; }
@media (max-width: 960px) { .article-grid { grid-template-columns:1fr; } }
.prose { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:32px; }
@media (max-width: 600px) { .prose { padding:22px 18px; } }
.prose h2 { font-size:24px; margin-top:1.4em; }
.prose h2:first-child { margin-top:0; }
.video-box { display:grid; grid-template-columns:240px 1fr; gap:22px; align-items:center; background:var(--soft); border:1px solid var(--soft-line); border-radius:var(--radius); padding:18px; margin-bottom:28px; }
.video-box .reel { aspect-ratio:9/16; }
.video-box .watch { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
@media (max-width: 600px) { .video-box { grid-template-columns:1fr; } .video-box .reel { max-width:260px; margin:0 auto; } }
.steps { list-style:none; padding:0; margin:0; counter-reset:step; }
.steps li { position:relative; padding-inline-start:58px; margin-bottom:22px; counter-increment:step; }
.steps li::before { content:counter(step); position:absolute; inset-inline-start:0; top:0; width:40px; height:40px; border-radius:50%; background:var(--dark); color:var(--g400); display:grid; place-items:center; font-weight:900; }
.steps h3 { font-size:18.5px; margin:6px 0 4px; }
.steps p { color:var(--ink2); margin:0; }
.tip { display:flex; gap:14px; background:var(--soft); border-inline-start:5px solid var(--g500); border-radius:var(--radius-sm); padding:16px 18px; margin:26px 0; }
.tip .ico { color:var(--accent); width:26px; height:26px; margin-top:2px; }
.tip b { display:block; margin-bottom:2px; }
.warn { background:var(--warn-bg); border-color:var(--warn-line); }
.warn .ico { color:var(--warn-line); }
.side { display:flex; flex-direction:column; gap:18px; position:sticky; top:88px; }
@media (max-width: 960px) { .side { position:static; } }
.side-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:20px; }
.side-card h3 { font-size:16px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin-bottom:12px; }
html[lang="ar"] .side-card h3 { letter-spacing:0; }
.facts { list-style:none; margin:0; padding:0; }
.facts li { display:flex; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px dashed var(--line); font-size:15px; }
.facts li:last-child { border-bottom:0; }
.facts b { text-align:end; }
.mini-dict { list-style:none; margin:0; padding:0; font-size:14.5px; }
.mini-dict li { padding:9px 0; border-bottom:1px dashed var(--line); }
.mini-dict li:last-child { border-bottom:0; }
.mini-dict .ar { font-family:var(--font-ar); font-weight:700; }
.mini-dict .de { color:var(--accent); font-weight:700; }

/* Comments */
.comments { margin-top:28px; }
.comments h2 { display:flex; align-items:center; gap:10px; }
.count { background:var(--tint); color:var(--tint-ink); border-radius:999px; font-size:14px; padding:2px 10px; }
.c-form { position:relative; background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); padding:18px; display:grid; gap:10px; margin-bottom:22px; }
.c-form input, .c-form textarea { color:var(--ink); width:100%; border:2px solid var(--line); border-radius:12px; padding:12px 14px; font:inherit; background:var(--card); resize:vertical; }
.c-form input:focus, .c-form textarea:focus { outline:0; border-color:var(--g500); }
.c-form .row { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.c-form small { color:var(--muted); }
.c-list { list-style:none; margin:0; padding:0; }
.c-item { display:flex; gap:12px; padding:16px 0; border-top:1px solid var(--line); }
.avatar { width:40px; height:40px; border-radius:50%; background:var(--dark); color:var(--g400); display:grid; place-items:center; font-weight:900; flex:none; }
.c-item .who { font-weight:800; font-size:15px; }
.c-item .when { color:var(--muted); font-size:13px; font-weight:600; margin-inline-start:8px; }
.c-item p { unicode-bidi:plaintext; text-align:start; margin:4px 0 0; color:var(--ink2); white-space:pre-wrap; overflow-wrap:anywhere; }

/* About / contact */
.about-grid { display:grid; grid-template-columns:320px 1fr; gap:40px; align-items:start; padding:48px 0 64px; }
@media (max-width: 860px) { .about-grid { grid-template-columns:1fr; } }
.photo { aspect-ratio:1; border-radius:50%; background:linear-gradient(135deg, var(--g900), var(--dark)); display:grid; place-items:center; color:var(--g400); text-align:center; font-weight:700; padding:30px; max-width:320px; border:6px solid var(--card); box-shadow:var(--shadow); }
.values { display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; margin:26px 0; }
.value { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; }
.value .ico { color:var(--accent); width:26px; height:26px; margin-bottom:8px; }
.value b { display:block; margin-bottom:4px; }
.value span { color:var(--muted); font-size:14.5px; }
@media (max-width: 700px) { .values { grid-template-columns:1fr; } }
.socials { display:grid; grid-template-columns:repeat(2, 1fr); gap:14px; }
@media (max-width: 560px) { .socials { grid-template-columns:1fr; } }
.social { display:flex; align-items:center; gap:14px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; color:var(--ink); transition:border-color .15s, box-shadow .15s; }
.social:hover { border-color:var(--sc); box-shadow:var(--shadow); text-decoration:none; }
.social .badge { width:50px; height:50px; border-radius:50%; background:var(--sc); color:#fff; display:grid; place-items:center; font-weight:900; font-size:15px; flex:none; }
.social b { display:block; font-size:17px; }
.social span { color:var(--muted); font-size:14.5px; }
.contact-wrap { padding:48px 0 64px; display:grid; gap:28px; max-width:860px; }
.mail-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:22px; display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.mail-card .ico { width:30px; height:30px; color:var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background:var(--dark); color:#aab8af; padding:52px 0 26px; margin-top:0; }
.f-grid { display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:30px; }
@media (max-width: 860px) { .f-grid { grid-template-columns:1fr 1fr; } }
@media (max-width: 520px) { .f-grid { grid-template-columns:1fr; } }
.site-footer h4 { color:#fff; margin:0 0 12px; font-size:15px; }
.site-footer ul { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.site-footer a { color:#aab8af; }
.site-footer a:hover { color:#fff; }
.f-about p { margin:14px 0 0; font-size:15px; max-width:340px; }
.f-bottom { border-top:1px solid rgba(255,255,255,.08); margin-top:36px; padding-top:20px; font-size:14px; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }

/* OBD codes in the dictionary */
table.dict td.obd { direction:ltr; text-align:start; }
html[dir="rtl"] table.dict td.obd { text-align:right; }
.code { border:1px solid rgba(74,222,128,.25); display:inline-block; font-family:ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size:13px; font-weight:700; background:var(--dark); color:var(--g400); border-radius:8px; padding:3px 8px; margin:2px; white-space:nowrap; }
.code.none { background:none; color:var(--muted); }
.obd-note { color:var(--muted); font-size:14.5px; margin:14px 4px 0; max-width:820px; }

/* Fault code lookup */
.lookup-grid { display:grid; grid-template-columns:minmax(0, 420px) minmax(0, 1fr); gap:28px; align-items:start; }
@media (max-width: 900px) { .lookup-grid { grid-template-columns:1fr; } }
.lookup { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:22px; display:grid; gap:14px; }
.field { display:grid; gap:6px; min-width:0; }
.field label { font-weight:800; font-size:14.5px; }
.field small { color:var(--muted); font-size:13px; line-height:1.5; }
.field input, .field select { color:var(--ink); width:100%; border:2px solid var(--line); border-radius:12px; padding:11px 14px; font:inherit; background:var(--card); color:var(--ink); min-width:0; }
.field input:focus, .field select:focus { outline:0; border-color:var(--g500); }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width: 460px) { .field-row { grid-template-columns:1fr; } }
.mono { font-family:ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; letter-spacing:.06em; direction:ltr; text-align:left; text-transform:uppercase; }
.mono.big { font-size:22px; font-weight:800; }
.form-error { margin:0; color:var(--err-ink); background:var(--err-bg); border-radius:10px; padding:10px 12px; font-weight:700; font-size:14.5px; }
.example-note { margin:0; color:var(--muted); font-size:13px; }
.lookup .btn { justify-content:center; }
.code-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:24px; display:grid; gap:16px; box-shadow:var(--shadow); min-width:0; }
.code-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.code.xl { font-size:26px; padding:8px 16px; border-radius:12px; }
.pill { font-size:13px; font-weight:800; border-radius:999px; padding:4px 12px; }
.pill.ok { background:var(--tint); color:var(--tint-ink); }
.pill.warn { background:var(--warn-bg); color:var(--warn-ink); }
.code-mean { font-size:23px; margin:0; }
.code-note { margin:0; background:var(--warn-bg); border-radius:12px; padding:12px 14px; color:var(--warn-ink); font-size:15px; }
.code-sub { margin:-6px 0 0; color:var(--muted); font-size:14.5px; }
.car-box, .ask-box { background:var(--bg); border-radius:14px; padding:16px; display:grid; gap:8px; }
.car-box h3, .ask-box h3 { margin:0; font-size:17px; }
.ask-box p { margin:0; color:var(--muted); font-size:14.5px; }
.ask-text { color:var(--ink); width:100%; border:2px solid var(--line); border-radius:12px; padding:10px 12px; font:inherit; resize:none; background:var(--card); }
.ask-btns { display:flex; gap:8px; flex-wrap:wrap; }
.ask-btns .btn { padding:9px 16px; }
button.code.link { border:0; cursor:pointer; }
button.code.link:hover { background:var(--g700); color:#fff; }
.codes-table td:nth-child(2) { min-width:260px; }

.field select { height:50px; padding-block:0; line-height:1.4; }

/* Dark / light toggle */
.theme-btn { border:0; background:rgba(255,255,255,.08); color:#fff; width:40px; height:40px; border-radius:50%; cursor:pointer; display:grid; place-items:center; flex:none; }
.theme-btn:hover { background:rgba(255,255,255,.16); }
.theme-btn:focus-visible, .menu-btn:focus-visible, .lang button:focus-visible { outline:2px solid var(--g400); outline-offset:2px; }
@media (max-width: 1100px) { .lang { margin-inline-start:auto; } }


/* ================= Menu: "More" dropdown + search ================= */
.menu { align-items:center; }
.menu .menu-home { display:none; }
.more { position:relative; }
.more-btn { border:0; background:none; color:#cfd8d2; font:inherit; font-weight:600; font-size:15px; padding:8px 12px; border-radius:999px; cursor:pointer; }
.more-btn:hover, .more.open .more-btn { color:#fff; background:rgba(255,255,255,.07); }
.more-panel { display:none; position:absolute; top:calc(100% + 8px); inset-inline-end:0; min-width:220px; background:var(--dark2); border:1px solid rgba(255,255,255,.1); border-radius:16px; padding:8px; box-shadow:0 18px 40px rgba(0,0,0,.4); z-index:60; flex-direction:column; }
.more.open .more-panel { display:flex; }
.more-panel a { border-radius:10px; }
.search-btn { width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,.08); color:#fff; display:grid; place-items:center; flex:none; }
.search-btn:hover { background:rgba(255,255,255,.16); text-decoration:none; }
@media (max-width: 1100px) {
  .menu .menu-home { display:block; }
  .more { display:contents; }
  .more-btn { display:none; }
  .more-panel { display:flex; position:static; background:none; border:0; box-shadow:none; padding:0; min-width:0; }
  .menu.open { max-height:calc(100vh - 68px); overflow-y:auto; }
}
@media (max-width: 520px) { .search-btn { width:38px; height:38px; } .nav .lang button { padding:5px 7px; } }

/* ================= Home: tools hub ================= */
.hub { display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
.hub-card { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:14px; row-gap:2px; align-items:center; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; color:var(--ink); transition:border-color .15s, transform .15s; }
.hub-card:hover { border-color:var(--g400); transform:translateY(-2px); text-decoration:none; }
.hub-card .ic { grid-row:1 / span 2; width:46px; height:46px; border-radius:50%; background:var(--tint); color:var(--accent); display:grid; place-items:center; }
.hub-card b { font-size:17px; }
.hub-card > span:last-child { color:var(--muted); font-size:14.5px; line-height:1.5; }
@media (max-width: 900px) { .hub { grid-template-columns:1fr 1fr; } }
@media (max-width: 560px) { .hub { grid-template-columns:1fr; gap:10px; } .hub-card { padding:14px 16px; } }

/* ================= Warning lights ================= */
.light-filters { margin-bottom:18px; }
.light-filters .lf-red[aria-pressed="true"] { background:#ef4444; border-color:#ef4444; color:#fff; }
.light-filters .lf-amber[aria-pressed="true"] { background:#f59e0b; border-color:#f59e0b; color:#1f1300; }
.light-filters .lf-info[aria-pressed="true"] { background:var(--g500); border-color:var(--g500); color:#0b1a10; }
.lights { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:14px; }
.light-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; display:flex; flex-direction:column; gap:8px; border-top:4px solid var(--edge, var(--line)); scroll-margin-top:90px; }
.light-card.c-red { --edge:#ef4444; } .light-card.c-amber { --edge:#f59e0b; } .light-card.c-info { --edge:#22c55e; }
.light-card:target { box-shadow:0 0 0 3px var(--g400); }
.light-head { display:flex; align-items:center; gap:14px; }
.light-head h3 { margin:0; font-size:18px; }
.li-ico { width:58px; height:58px; border-radius:14px; background:#0f1712; color:var(--lc); display:grid; place-items:center; flex:none; box-shadow:0 0 18px -4px var(--lc) inset; }
.li-ico svg { width:40px; height:40px; filter:drop-shadow(0 0 4px var(--lc)); }
.light-card p { margin:0; color:var(--ink2); font-size:15px; }
.light-card p b { color:var(--ink); }
.light-act { background:var(--card2); border-radius:10px; padding:10px 12px; }
.light-link { font-weight:700; font-size:14.5px; }

/* ================= Learning path ================= */
.learn { display:grid; gap:34px; }
.year-title { display:flex; align-items:center; gap:12px; font-size:24px; }
.year-num { width:40px; height:40px; border-radius:50%; background:var(--dark); color:var(--g400); display:grid; place-items:center; font-size:18px; font-weight:900; }
.lf-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:14px; }
.lf-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; display:flex; flex-direction:column; gap:6px; }
.lf-top { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.lf-num { font-family:ui-monospace, Menlo, Consolas, monospace; font-weight:800; font-size:13px; background:var(--dark); color:var(--g400); border-radius:8px; padding:3px 9px; direction:ltr; }
.lf-de { font-size:16.5px; margin:4px 0 0; direction:ltr; text-align:start; }
html[dir="rtl"] .lf-de { text-align:right; unicode-bidi:plaintext; }
.lf-tr { color:var(--muted); margin:0; font-size:15px; }
.lf-lessons { list-style:none; margin:8px 0 0; padding:10px 0 0; border-top:1px dashed var(--line); display:grid; gap:6px; font-size:14.5px; }
.lf-lessons li.ready a { font-weight:700; }
.lf-lessons li.ready::before { content:"▶ "; color:var(--accent); }
.lf-lessons li.soon { color:var(--muted); }

/* ================= Quiz ================= */
.quiz { margin-top:28px; display:grid; gap:14px; }
.quiz h2 { margin:0; }
.quiz-sub { margin:-8px 0 4px; color:var(--muted); }
.q { border:1px solid var(--line); border-radius:14px; padding:14px 16px; margin:0; display:grid; gap:8px; }
.q legend { font-weight:800; padding:0 6px; }
.opt { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; border:1px solid var(--line); cursor:pointer; }
.opt:hover { border-color:var(--g400); }
.opt input { accent-color:var(--g600); width:18px; height:18px; flex:none; }
.opt.right { background:var(--tint); border-color:var(--g500); }
.opt.wrong { background:var(--err-bg); border-color:var(--err-ink); }
.q-fb { margin:0; font-weight:700; font-size:14.5px; }
.q-fb.ok { color:var(--accent); } .q-fb.no { color:var(--err-ink); }
.quiz-res { background:var(--soft); border:1px solid var(--soft-line); border-radius:12px; padding:14px 16px; }
.quiz .btn { justify-self:start; }

/* ================= Calculators ================= */
.calc-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; align-items:start; }
@media (max-width: 1000px) { .calc-grid { grid-template-columns:1fr 1fr; } }
@media (max-width: 680px) { .calc-grid { grid-template-columns:1fr; } }
.calc { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:20px; display:grid; gap:12px; min-width:0; }
.calc h2 { font-size:20px; margin:0; }
.calc-sub { font-size:16px; margin:6px 0 0; }
.calc-d { margin:-6px 0 0; color:var(--muted); font-size:14px; }
.calc input { direction:ltr; text-align:left; font-variant-numeric:tabular-nums; }
.calc-out { display:grid; grid-template-columns:repeat(auto-fit, minmax(110px, 1fr)); gap:8px; }
.calc-out .muted, .muted { color:var(--muted); font-size:14px; }
.res-item { background:var(--card2); border:1px solid var(--line); border-radius:12px; padding:10px 12px; display:grid; gap:2px; }
.res-item small { color:var(--muted); font-weight:700; font-size:12.5px; }
.res-item b { font-size:19px; font-variant-numeric:tabular-nums; direction:ltr; text-align:start; }
html[dir="rtl"] .res-item b { text-align:right; }
.res-item em { font-style:normal; font-size:13px; color:var(--muted); }
.res-item.good { border-color:var(--g500); background:var(--tint); }
.res-item.bad { border-color:var(--warn-line); background:var(--warn-bg); }
.calc-warn { grid-column:1 / -1; }

/* ================= Tools ================= */
.tool-group { margin-top:26px; }
.tool-group h2 { font-size:22px; }
.tool-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:14px; }
.tool-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; display:flex; flex-direction:column; gap:6px; }
.tool-card h3 { margin:0; font-size:17px; }
.tool-card p { margin:0 0 8px; color:var(--muted); font-size:15px; }
.tool-card .btn { margin-top:auto; align-self:flex-start; padding:9px 16px; }

/* ================= Workshop ================= */
.cases { display:grid; gap:20px; margin-top:18px; }
.case-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:22px; display:grid; gap:14px; }
.case-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.case-car { font-weight:800; color:var(--muted); }
.case-card h2 { margin:0; font-size:22px; }
.case-step { display:grid; grid-template-columns:auto 1fr; gap:14px; }
.case-n { width:34px; height:34px; border-radius:50%; background:var(--dark); color:var(--g400); display:grid; place-items:center; font-weight:900; }
.case-step h3 { margin:4px 0 2px; font-size:16.5px; }
.case-step p { margin:0; color:var(--ink2); }
.case-card .tip { margin:0; }

/* ================= Downloads ================= */
.dl-wrap { display:grid; gap:20px; max-width:900px; }
.dl-list { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width: 640px) { .dl-list { grid-template-columns:1fr; } }
.dl-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; display:flex; gap:14px; align-items:flex-start; }
.dl-card h2 { font-size:18px; margin:0 0 4px; }
.dl-card p { margin:0; color:var(--muted); font-size:15px; }
.dl-ico { flex:none; width:52px; height:62px; border-radius:8px; background:#ef4444; color:#fff; font-weight:900; font-size:13px; display:grid; place-items:end center; padding-bottom:10px; }
.dl-box { display:block; }
.dl-box p { color:#d6efdd; margin:0 0 12px; }
.dl-links { display:flex; gap:10px; flex-wrap:wrap; }

/* ================= Search ================= */
.se-wrap { max-width:860px; display:grid; gap:16px; }
.big-search { padding:4px 18px; }
.big-search input { font-size:18px; padding:14px 0; }
.se-count { color:var(--muted); margin:0; font-weight:700; }
.se-list { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.se-item { display:flex; align-items:center; gap:12px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px 14px; color:var(--ink); }
.se-item:hover { border-color:var(--g400); text-decoration:none; }
.se-type { flex:none; font-size:12px; font-weight:800; border-radius:999px; padding:3px 10px; background:var(--tint); color:var(--tint-ink); min-width:76px; text-align:center; }
.se-type.t-code { background:var(--dark); color:var(--g400); }
.se-type.t-light { background:var(--warn-bg); color:var(--warn-ink); }
.se-text { display:grid; min-width:0; }
.se-text b { overflow-wrap:anywhere; }
.se-text small { color:var(--muted); overflow-wrap:anywhere; }

/* ================= Support ================= */
.support-box { max-width:760px; text-align:center; display:grid; gap:6px; justify-items:center; }
.support-btns { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-top:8px; }
.support-btn { color:#fff; }
.support-btn:hover { filter:brightness(1.1); }


/* ================= Electricity page ================= */
.elec { display:grid; gap:44px; padding-block:30px 60px; }
.toc { display:flex; gap:8px; flex-wrap:wrap; }
.toc a { border:1px solid var(--line); background:var(--card); border-radius:999px; padding:7px 14px; font-weight:700; font-size:14px; color:var(--ink2); }
.toc a:hover { border-color:var(--g400); text-decoration:none; }
.el-sec { scroll-margin-top:90px; }
.el-sec > h2, .el-sec h2 { font-size:clamp(24px, 3vw, 30px); }
.el-sec.two { display:grid; grid-template-columns:1fr 360px; gap:28px; align-items:start; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:26px; }
@media (max-width: 900px) { .el-sec.two { grid-template-columns:1fr; padding:20px 16px; } }
.basics { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; }
@media (max-width: 900px) { .basics { grid-template-columns:1fr 1fr; } }
@media (max-width: 520px) { .basics { grid-template-columns:1fr; } }
.basic { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px; display:grid; gap:4px; }
.basic b { font-size:28px; font-family:Inter, sans-serif; color:var(--accent); line-height:1; }
.basic p { margin:0; color:var(--ink2); font-size:15px; }
.rules { list-style:none; margin:14px 0; padding:0; display:grid; gap:8px; }
.rules li { display:flex; align-items:center; gap:12px; flex-wrap:wrap; background:var(--card2); border-radius:12px; padding:10px 12px; }
.rules .f { font-family:ui-monospace, Menlo, Consolas, monospace; font-weight:800; background:var(--dark); color:var(--g400); border-radius:8px; padding:4px 10px; direction:ltr; white-space:nowrap; }
.ex-box { background:var(--soft); border:1px solid var(--soft-line); border-radius:12px; padding:12px 14px; margin-bottom:12px; }
.ex-box p { margin:4px 0 0; }
.car { color:var(--muted); }
.diagram, .sym { direction:ltr; }
.dia { margin:0; background:var(--card2); border-radius:14px; padding:10px; color:var(--ink); }
.diagram { width:100%; height:auto; display:block; }
.sym-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:12px; margin-top:16px; }
.sym-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; display:flex; flex-direction:column; gap:4px; }
.sym-pics { display:flex; gap:10px; justify-content:center; background:var(--card2); border-radius:12px; padding:6px 4px; color:var(--ink); }
.sym-pics figure { margin:0; display:grid; justify-items:center; }
.sym-pics figcaption { font-size:11px; font-weight:800; color:var(--muted); letter-spacing:.04em; }
.sym-pics .us { opacity:.65; }
.sym { display:block; }
.sym-card h3 { margin:8px 0 0; font-size:16.5px; }
.sym-de { color:var(--accent); font-weight:700; font-size:13.5px; }
.sym-card p { margin:2px 0 0; color:var(--muted); font-size:14.5px; }
.bulb-t, td.kl { font-family:ui-monospace, Menlo, Consolas, monospace; font-weight:800; white-space:nowrap; direction:ltr; }
table.klemmen td.kl { color:var(--accent); font-size:16px; width:110px; }
.el-cta { display:flex; justify-content:space-between; align-items:center; gap:18px; flex-wrap:wrap; background:linear-gradient(120deg, var(--g900), #14532d); color:#fff; border-radius:24px; padding:28px; }
.el-cta h2 { margin:0 0 4px; } .el-cta p { margin:0; color:#cfe9d7; }

/* ================= Circuit builder ================= */
.cb { display:grid; gap:14px; padding-block:26px 56px; }
.cb-how { margin:0; color:var(--ink2); }
.cb-top { display:flex; gap:10px; flex-wrap:wrap; }
.cb-select { flex:1 1 240px; border:2px solid var(--line); border-radius:12px; padding:10px 12px; font:inherit; background:var(--card); color:var(--ink); height:48px; }
.cb-tools { display:flex; flex-wrap:wrap; gap:8px; padding-bottom:4px; }
.cb-tool { flex:none; display:grid; justify-items:center; gap:2px; min-width:76px; padding:6px 8px 8px; border:1px solid var(--line); border-radius:12px; background:var(--card); color:var(--ink); font:inherit; font-size:12.5px; font-weight:700; cursor:pointer; }
.cb-tool svg { display:block; }
.cb-tool[aria-pressed="true"] { border-color:var(--g500); background:var(--tint); color:var(--tint-ink); box-shadow:0 0 0 2px var(--g500) inset; }
.cb-warn { background:var(--err-bg); color:var(--err-ink); border-radius:12px; padding:10px 14px; font-weight:700; }
.cb-main { display:grid; grid-template-columns:minmax(0, 1fr) 280px; gap:14px; align-items:start; }
@media (max-width: 900px) { .cb-main { grid-template-columns:1fr; } }
.cb-canvas { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; color:var(--ink); touch-action:manipulation; }
#cb-svg { direction:ltr; display:block; width:100%; height:auto; cursor:crosshair; user-select:none; -webkit-user-select:none; }
#cb-svg .dots { fill:var(--muted); opacity:.55; }
#cb-svg .part { cursor:pointer; }
#cb-svg .part .hit { stroke:transparent; stroke-width:26; }
#cb-svg .part.sel { color:var(--accent); }
#cb-svg .part.sel .hit { stroke:var(--tint); }
#cb-svg .part.burnt { color:#ef4444; }
#cb-svg .glow { filter:blur(6px); pointer-events:none; }
#cb-svg .lab { fill:var(--muted); stroke:none; font:700 13px Inter, sans-serif; pointer-events:none; }
#cb-svg .lab.meter { fill:var(--accent); font-size:15px; font-weight:900; }
#cb-svg .ghost { stroke:var(--g500); stroke-width:8; stroke-linecap:round; opacity:.35; pointer-events:none; }
#cb-svg .ghost.erase { stroke:#ef4444; }
#cb-svg .running .spin { transform-box:fill-box; transform-origin:center; animation:cbspin 1s linear infinite; }
@keyframes cbspin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #cb-svg .running .spin { animation:none; } }
.cb-panel { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px; display:grid; gap:10px; }
.cb-panel h3 { margin:0; }
.cb-actions { display:flex; gap:8px; flex-wrap:wrap; }
.cb-actions .btn { padding:9px 14px; font-size:14.5px; }
.btn.danger { color:var(--err-ink); }
.cb-tip { margin:0; color:var(--muted); font-size:14px; background:var(--card2); border-radius:10px; padding:10px 12px; }

/* ================= Phone layout ================= */
@media (max-width: 640px) {
  body { font-size:16px; }
  section.block { padding:44px 0; }
  .section-head { margin-bottom:18px; }
  .page-head { padding:30px 0 34px; }
  .page-head p { font-size:16.5px; }

  /* Hero: smaller badge, tighter card */
  .hero { padding:32px 0 40px; }
  .hero p.lead { font-size:17px; }
  .hero .actions { margin:20px 0 16px; }
  .hero .actions .btn { flex:1 1 auto; justify-content:center; }
  .hero-card { padding:22px 16px; border-radius:22px; }
  .hero-card .big-mark { max-width:170px; margin-bottom:18px; }
  .pillar { padding:10px; font-size:13.5px; }

  /* Categories: two compact columns */
  .cats { grid-template-columns:1fr 1fr; gap:10px; }
  .cat { padding:16px 14px; }
  .cat .ic { width:40px; height:40px; margin-bottom:10px; }
  .cat h3 { font-size:16px; }
  .cat p { font-size:13.5px; margin-bottom:0; }
  .cat .go { display:none; }

  /* Videos: swipeable row */
  .reels { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:12px; margin-inline:-16px; padding:4px 16px 12px; scrollbar-width:none; }
  .reels::-webkit-scrollbar { display:none; }
  .reels .reel { flex:0 0 64%; scroll-snap-align:start; aspect-ratio:9/15; }
  .reel .play { top:42%; width:52px; height:52px; }

  /* Lessons */
  .lesson-card .thumb { aspect-ratio:16/6; }
  .lesson-card .thumb .ico { width:44px; height:44px; }

  /* Tables become cards */
  .table-wrap { overflow:visible; border-radius:16px; }
  table.dict { min-width:0; }
  table.dict thead { display:none; }
  table.dict, table.dict tbody, table.dict tr { display:block; width:100%; }
  table.dict tr { padding:12px 16px; border-bottom:1px solid var(--line); }
  table.dict tr:last-child { border-bottom:0; }
  table.dict td { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:4px 0; border:0; text-align:end; direction:inherit; }
  table.dict td::before { content:attr(data-label); color:var(--muted); font-family:var(--font); font-size:12.5px; font-weight:700; text-align:start; flex:none; }
  html[lang="ar"] table.dict td::before { font-family:var(--font-ar); }
  table.dict td.ar { font-size:18px; }
  table.dict td.obd { flex-wrap:wrap; direction:inherit; text-align:end; }
  table.dict td.obd .code { margin:2px 0 2px 4px; }
  .codes-table td:nth-child(2) { min-width:0; }
  .codes-table td:nth-child(2) { display:block; text-align:start; padding:6px 0; }
  .codes-table td:nth-child(2)::before { display:none; }

  /* Filter chips: one swipeable line */
  .filters { flex-wrap:nowrap; overflow-x:auto; margin-inline:-16px; padding:2px 16px 6px; scrollbar-width:none; }
  .filters::-webkit-scrollbar { display:none; }
  .filters button { flex:none; }

  /* Lesson page */
  .article-grid { padding:24px 0 44px; gap:20px; }
  .steps li { padding-inline-start:52px; }
  .steps li::before { width:36px; height:36px; }

  /* Code lookup */
  .lookup, .code-card { padding:18px 16px; }
  .code.xl { font-size:22px; }
  .code-mean { font-size:20px; }
  .facts li { font-size:14.5px; }

  /* Newsletter */
  .nl-form .btn { flex:1 1 100%; justify-content:center; }

  /* Footer */
  .site-footer { padding:40px 0 22px; }
}

/* circuit builder: drawing area always left-to-right, no sideways scrolling */
.cb-canvas { direction:ltr; overflow:hidden; }
#cb-svg { touch-action:none; -webkit-tap-highlight-color:transparent; }
#cb-svg.narrow .lab { font-size:19px; }
#cb-svg.narrow .lab.meter { font-size:21px; }
#cb-svg.narrow .part .hit { stroke-width:40; }
.cb-status { margin:0; font-weight:700; color:var(--accent); background:var(--tint); border-radius:12px; padding:10px 14px; font-size:14.5px; }
.cb-ph { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.cb-x { display:none; border:0; background:var(--card2); color:var(--ink); width:36px; height:36px; border-radius:50%; font-size:16px; cursor:pointer; }
#cb-undo:disabled { opacity:.45; cursor:default; }
@media (max-width: 900px) {
  .cb-tools { display:grid; grid-template-columns:repeat(4, 1fr); overflow:visible; }
  .cb-tool { min-width:0; padding:6px 2px 8px; font-size:12px; }
  .cb-tool svg { width:100%; max-width:56px; height:auto; }
  .cb-top .cb-select { flex-basis:100%; }
  .cb-top .btn { flex:1 1 0; justify-content:center; }
  /* part details slide up from the bottom */
  .cb-panel { position:fixed; left:0; right:0; bottom:0; z-index:70; border-radius:20px 20px 0 0; max-height:55vh; overflow:auto;
    padding:16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    box-shadow:0 -12px 32px rgba(0,0,0,.3); transform:translateY(110%); transition:transform .2s ease; }
  .cb-panel.open { transform:none; }
  .cb-x { display:grid; place-items:center; }
}
@media (prefers-reduced-motion: reduce) { .cb-panel { transition:none; } }

/* ================= In pictures ================= */
.ph-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:14px; margin-top:16px; }
.ph-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; display:flex; flex-direction:column; }
.ph { margin:0; background:#fff; position:relative; }
.ph img { display:block; width:100%; height:200px; object-fit:contain; background:#fff; }
.ph .credit { font-size:11px; color:#5b6660; background:#f3f6f4; padding:4px 8px; line-height:1.35; overflow-wrap:anywhere; }
.ph .credit a { color:#15803d; }
.ph-missing { height:200px; display:grid; place-items:center; color:var(--muted); background:var(--card2); }
.ph-body { padding:12px 14px 14px; }
.ph-body h3 { margin:0 0 4px; font-size:18px; color:var(--accent); }
.ph-body p { margin:0; color:var(--ink2); font-size:14.5px; }
.h4h7-box { display:grid; gap:14px; margin-top:12px; }
.h4h7-pics, .fuse-pics { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.h4h7-pics .ph, .fuse-pics .ph { border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.h4h7-pics .ph img, .fuse-pics .ph img { height:260px; }
@media (max-width: 560px) { .h4h7-pics .ph img, .fuse-pics .ph img { height:170px; } }
table.h4h7 th:nth-child(2), table.h4h7 th:nth-child(3) { font-family:ui-monospace, Menlo, monospace; font-size:15px; }
.fuses-box { display:grid; gap:16px; margin-top:12px; }
.fuse-colors { display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:10px; }
.fc { display:grid; justify-items:center; gap:4px; font-size:13.5px; color:var(--ink2); }
.fc-chip { width:62px; height:44px; border-radius:8px 8px 4px 4px; display:grid; place-items:center; border:1px solid rgba(0,0,0,.25); box-shadow:inset 0 -8px 0 rgba(0,0,0,.12); color:#111; position:relative; }
.fc-chip::after { content:""; position:absolute; bottom:-12px; left:14px; right:14px; height:12px; border-left:6px solid #c0c4c8; border-right:6px solid #c0c4c8; }
.fc-chip.light-text { color:#fff; }
.fc-chip b { font-size:13px; }
.fc { padding-bottom:10px; }
.fuse-types { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:10px; }
.fuse-types h3 { margin:0; font-size:16px; }
.faults { display:grid; gap:14px; margin-top:12px; }
.fault-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; display:grid; grid-template-columns:260px 1fr; }
.fault-card:not(:has(figure)) { grid-template-columns:1fr; }
.fault-card .ph img { height:100%; min-height:190px; }
.fault-body { padding:16px 18px; display:grid; gap:8px; align-content:start; }
.fault-body h3 { margin:0; }
.fault-body p { margin:0; color:var(--ink2); }
@media (max-width: 640px) { .fault-card { grid-template-columns:1fr; } .fault-card .ph img { height:200px; min-height:0; } }
.credits ul { font-size:13px; color:var(--muted); padding-inline-start:18px; display:grid; gap:4px; }
.fuse-pics.three { grid-template-columns:repeat(3, 1fr); }
@media (max-width: 760px) { .fuse-pics.three { grid-template-columns:1fr 1fr; } }
.sources { margin:0; font-size:13.5px; color:var(--muted); border-top:1px solid var(--line); padding-top:14px; }
.sources a { color:var(--muted); text-decoration:underline; }

/* About: logo instead of a personal photo */
.photo.logo-photo { padding:14px; background:radial-gradient(circle at 50% 40%, rgba(34,197,94,.25), transparent 65%), var(--dark); }
.photo.logo-photo .about-mark { width:100%; height:auto; filter:drop-shadow(0 10px 24px rgba(34,197,94,.25)); }

/* ================= Multimeter ================= */
.mm-wrap { display:grid; gap:18px; grid-template-columns:minmax(0, 1fr); }
.mm-wrap > *, .mm-grid > *, .mm-learn > * { min-width:0; }
.mm-learn { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width: 800px) { .mm-learn { grid-template-columns:1fr; } }
.mm-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; }
.mm-card h3 { margin:0 0 10px; }
.mm-list { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.mm-list li { display:flex; gap:12px; align-items:flex-start; color:var(--ink2); font-size:15px; }
.mm-sym { flex:none; min-width:58px; text-align:center; font-family:ui-monospace, Menlo, monospace; background:var(--dark); color:var(--g400); border-radius:8px; padding:4px 8px; direction:ltr; }
.mm-sym.red { background:#b91c1c; color:#fff; } .mm-sym.black { background:#111; color:#fff; }
.mm-rules { margin:0; padding-inline-start:20px; display:grid; gap:6px; color:var(--ink2); font-size:15px; }
.mm-h { margin:10px 0 0; font-size:clamp(22px, 3vw, 28px); } .mm-d { margin:-8px 0 0; color:var(--muted); }
.mm-tabs { display:flex; gap:8px; overflow-x:auto; padding-bottom:6px; scrollbar-width:none; }
.mm-tabs::-webkit-scrollbar { display:none; }
.mm-tab { flex:none; border:1px solid var(--line); background:var(--card); color:var(--ink2); border-radius:999px; padding:8px 14px; font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.mm-tab.on { background:var(--ink); color:var(--card); border-color:var(--ink); }
.mm-grid { display:grid; grid-template-columns:320px 1fr; gap:16px; align-items:start; margin-top:10px; }
@media (max-width: 820px) { .mm-grid { grid-template-columns:1fr; } }
/* the device — professional handheld look */
.mm-dev { direction:ltr; position:relative; background:linear-gradient(180deg, #2b3138, #1b1f24); border-radius:30px; padding:14px 16px 20px; display:grid; gap:12px; max-width:350px; margin-inline:auto; width:100%;
  box-shadow:0 0 0 7px #f2b705, 0 0 0 9px #1a1a1a, 0 18px 40px rgba(0,0,0,.35); margin-block:9px; }
.mm-dev.danger { animation:mmshake .4s 2; }
@keyframes mmshake { 25% { transform:translateX(-4px); } 75% { transform:translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .mm-dev.danger { animation:none; } }
.mm-brand { display:flex; justify-content:space-between; align-items:baseline; color:#e5e7eb; font:800 13px Inter, Arial, sans-serif; letter-spacing:.06em; }
.mm-brand b { color:#f2b705; font-size:16px; } .mm-brand span { font-size:9.5px; color:#9ca3af; }
.mm-lcd { background:linear-gradient(180deg, #b9c9a6, #a9bb95); border:4px solid #0d0f12; border-radius:10px; padding:6px 10px 8px; color:#14170f; font-family:'Share Tech Mono', ui-monospace, 'Courier New', monospace; box-shadow:inset 0 4px 10px rgba(0,0,0,.35); min-height:104px; display:grid; gap:2px; transition:background .2s; }
.mm-lcd.lit { background:linear-gradient(180deg, #c8f0a8, #9fe07a); box-shadow:inset 0 4px 10px rgba(0,0,0,.2), 0 0 22px rgba(160,230,120,.45); }
.mm-lcd.off { background:linear-gradient(180deg, #8f9a86, #808b77); }
.mm-ann { display:flex; gap:7px; font:700 9.5px Inter, Arial, sans-serif; letter-spacing:.03em; }
.mm-ann span { opacity:.12; } .mm-ann span.on { opacity:1; }
.mm-digits { position:relative; display:flex; align-items:baseline; justify-content:flex-end; gap:6px; height:52px; }
.mm-digits .ghost { position:absolute; right:52px; top:0; font-size:46px; opacity:.07; letter-spacing:2px; }
.mm-val { font-size:46px; letter-spacing:2px; line-height:1; position:relative; }
.mm-unit { font:800 17px Inter, Arial, sans-serif; min-width:44px; text-align:left; }
.mm-bar { display:grid; grid-template-columns:repeat(30, 1fr); gap:2px; height:8px; }
.mm-bar i { background:rgba(0,0,0,.08); border-radius:1px; } .mm-bar i.f { background:#14170f; }
.mm-keys { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; }
.mm-key { border:0; border-radius:10px; padding:9px 0; background:linear-gradient(180deg, #4b5563, #374151); color:#f3f4f6; font:800 12px Inter, Arial, sans-serif; cursor:pointer; box-shadow:0 3px 0 #111827; }
.mm-key:active { transform:translateY(2px); box-shadow:0 1px 0 #111827; }
.mm-key.on { background:linear-gradient(180deg, #f2b705, #d19e00); color:#111; }
.mm-dial { position:relative; width:262px; height:262px; margin:0 auto; border-radius:50%; background:radial-gradient(circle, #23282e 58%, #15181c 60%); }
.mm-pos { position:absolute; left:50%; top:50%; width:52px; height:30px; margin:-15px 0 0 -26px; transform:rotate(var(--a)) translateY(-108px) rotate(calc(-1 * var(--a))); border:0; background:none; color:#e5e7eb; font:800 12.5px Inter, Arial, sans-serif; cursor:pointer; border-radius:8px; white-space:nowrap; }
.mm-pos.amp { color:#fca5a5; } .mm-pos.offp { color:#9ca3af; }
.mm-pos.on { color:#111; background:#f2b705; }
.mm-pos:focus-visible { outline:2px solid #f2b705; }
.mm-knob { position:absolute; left:50%; top:50%; width:150px; height:150px; margin:-75px 0 0 -75px; border-radius:50%; transition:transform .3s cubic-bezier(.3,1.4,.6,1); pointer-events:none;
  background:radial-gradient(circle at 50% 50%, #3a4048 0 34%, transparent 35%), conic-gradient(from 0deg, #2a2f36, #4a515b, #2a2f36, #4a515b, #2a2f36); box-shadow:0 8px 18px rgba(0,0,0,.6), inset 0 0 0 3px #111; }
.mm-knob i { position:absolute; left:50%; top:4px; width:10px; height:62px; margin-left:-5px; border-radius:5px; background:linear-gradient(#ffd23f, #f2b705); box-shadow:0 0 6px rgba(242,183,5,.6); }
@media (prefers-reduced-motion: reduce) { .mm-knob { transition:none; } }
.mm-jacks { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; flex-wrap:wrap; padding:0 6px; }
.mm-jacklabel { flex-basis:100%; text-align:center; font:700 12px Inter, Arial, sans-serif; color:#d1d5db; }
.mm-jack { width:74px; display:grid; justify-items:center; gap:3px; border:0; background:none; color:#e5e7eb; font:800 12px Inter, Arial, sans-serif; cursor:pointer; padding:0; }
.mm-jack::before { content:""; width:54px; height:54px; border-radius:50%; background:radial-gradient(circle, #050505 0 30%, #2b2b2b 32% 58%, #111 60%); box-shadow:0 0 0 4px #374151; }
.mm-jack.red::before { box-shadow:0 0 0 4px #7f1d1d; }
.mm-jack.red.on::before { background:radial-gradient(circle, #dc2626 0 46%, #7f1d1d 48% 58%, #111 60%); box-shadow:0 0 0 4px #ef4444, 0 0 14px rgba(239,68,68,.6); }
.mm-jack.com::before { background:radial-gradient(circle, #111 0 46%, #000 48% 58%, #111 60%); box-shadow:0 0 0 4px #6b7280; }
.mm-jack small { font-size:9px; color:#9ca3af; font-weight:700; }
.mm-jack.com { cursor:default; }
.phet small { color:var(--muted); }
/* the task side */
.mm-task { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; display:grid; gap:12px; min-width:0; }
.mm-task h3 { margin:0; } .mm-task > p { margin:0; color:var(--ink2); }
.mm-probes { display:flex; gap:8px; align-items:center; flex-wrap:wrap; font-weight:700; font-size:14px; }
.mm-probe { border:2px solid var(--line); background:var(--card); color:var(--ink); border-radius:999px; padding:8px 14px; font:inherit; font-weight:800; cursor:pointer; }
.mm-probe.red.on { border-color:#dc2626; background:#dc2626; color:#fff; }
.mm-probe.black.on { border-color:#111; background:#111; color:#fff; }
.mm-obj { width:100%; max-width:440px; height:auto; margin:0 auto; display:block; color:var(--ink); direction:ltr; background:var(--card2); border-radius:14px; }
.mm-pt { cursor:pointer; }
.mm-pt .ring { fill:rgba(34,197,94,.15); stroke:var(--g500); stroke-width:2; stroke-dasharray:4 3; }
.mm-pt .core { fill:var(--g500); }
.mm-pt .lbl { fill:currentColor; font:700 12px Inter, Arial, sans-serif; paint-order:stroke; stroke:var(--card2); stroke-width:4px; }
.mm-pt.has.red .ring { fill:rgba(220,38,38,.25); stroke:#dc2626; stroke-dasharray:none; stroke-width:4; }
.mm-pt.has.red .core { fill:#dc2626; }
.mm-pt.has.black .ring { fill:rgba(0,0,0,.25); stroke:#111; stroke-dasharray:none; stroke-width:4; }
.mm-pt.has.black .core { fill:#111; }
.mm-pt:focus-visible .ring { stroke-width:4; }
.mm-fb { border-radius:12px; padding:12px 14px; background:var(--card2); color:var(--ink2); font-size:15px; }
.mm-fb.good { background:var(--tint); color:var(--tint-ink); }
.mm-fb.bad { background:var(--err-bg); color:var(--err-ink); font-weight:700; }
.mm-btns { display:flex; gap:8px; flex-wrap:wrap; }
.mm-small { padding:8px 14px; font-size:14px; }
.mm-temp { display:flex; gap:8px; align-items:center; flex-wrap:wrap; font-weight:700; font-size:14px; }
.mm-chip { border:1px solid var(--line); background:var(--card); color:var(--ink); border-radius:999px; padding:6px 12px; font:inherit; cursor:pointer; }
.mm-chip.on { background:var(--ink); color:var(--card); }
.mm-table { margin:0; font-size:14px; color:var(--muted); }

/* DC vs AC */
.acdc { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:12px 0 14px; }
@media (max-width: 760px) { .acdc { grid-template-columns:1fr; } }
.acdc-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; border-top:4px solid var(--edge); display:grid; gap:8px; min-width:0; }
.acdc-card.dc { --edge:#22c55e; } .acdc-card.ac { --edge:#3b82f6; }
.acdc-card h3 { margin:0; display:flex; align-items:center; gap:10px; }
.acdc-sym { width:40px; height:40px; border-radius:10px; background:var(--dark); color:var(--edge); display:grid; place-items:center; font-size:24px; font-weight:900; flex:none; }
.acdc-card p { margin:0; color:var(--ink2); }
.acdc-w { font-size:14.5px; }
.acdc-g { width:100%; height:auto; direction:ltr; color:var(--ink); background:var(--card2); border-radius:12px; }
.acdc-g .gl { fill:var(--muted); font:600 11px Inter, Cairo, sans-serif; }
.acdc-g .gv { fill:currentColor; font:800 13px Inter, sans-serif; }
.acdc-car .rules li { display:block; }

/* Arabic-only bits (hidden when the site is in German or English) */
html:not([lang="ar"]) .ar-only { display:none !important; }

/* Social logos (Simple Icons, CC0) */
.si { display:block; }
.social .badge { color:#fff; }
.social .badge .si { width:26px; height:26px; }
.si-badge-instagram { background:radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important; }
.si-badge-tiktok { background:#000 !important; box-shadow:inset 0 0 0 2px rgba(255,255,255,.15); }
.si-badge-youtube { background:#FF0000 !important; }
.si-badge-facebook { background:#0866FF !important; }
.si-btn { gap:8px; }
.si-btn [data-si="instagram"] { color:#E1306C; } .si-btn [data-si="youtube"] { color:#FF0000; } .si-btn [data-si="facebook"] { color:#0866FF; } .si-btn [data-si="tiktok"] { color:var(--ink); }
.reel .platform { gap:6px; }
.reel .platform .si { width:14px; height:14px; }
.f-si { display:inline-flex; align-items:center; gap:8px; }
.f-si .si { width:16px; height:16px; }

/* ================= Accounts ================= */
.acct-btn { flex:none; display:inline-flex; align-items:center; justify-content:center; height:40px; padding:0 14px; border-radius:999px; background:var(--g500); color:#06150b; font-weight:800; font-size:14px; white-space:nowrap; }
.acct-btn:hover { text-decoration:none; background:var(--g400); }
.acct-btn.in { width:40px; padding:0; overflow:hidden; background:#fff; color:var(--dark); }
.acct-btn img { width:100%; height:100%; object-fit:cover; }
.acct-ini { font-weight:900; }
@media (max-width: 520px) { .acct-btn { height:38px; padding:0 10px; font-size:13px; } .acct-btn.in { width:38px; } }
.ac-card { max-width:460px; margin:0 auto; background:var(--card); border:1px solid var(--line); border-radius:22px; padding:26px; display:grid; gap:12px; box-shadow:var(--shadow); }
.ac-card.wide { max-width:720px; }
.ac-provider { justify-content:center; gap:10px; width:100%; }
.ac-provider.google { background:#fff; color:#1f1f1f; border:1px solid #dadce0; }
.ac-provider.facebook { background:#0866FF; color:#fff; }
.ac-provider.disabled { opacity:.5; pointer-events:none; }
.ac-or { text-align:center; color:var(--muted); font-size:14px; display:flex; align-items:center; gap:10px; }
.ac-or::before, .ac-or::after { content:""; flex:1; height:1px; background:var(--line); }
.ac-form { display:grid; gap:8px; }
.ac-form label { font-weight:800; font-size:14.5px; }
.ac-form input { width:100%; border:2px solid var(--line); border-radius:12px; padding:12px 14px; font:inherit; background:var(--card); color:var(--ink); }
.ac-form input:focus { outline:0; border-color:var(--g500); }
#ac-code { font-size:24px; letter-spacing:.4em; text-align:center; direction:ltr; }
.ac-sent { margin:0; color:var(--ink2); }
.ac-link { border:0; background:none; color:var(--accent); font:inherit; font-weight:700; cursor:pointer; justify-self:start; padding:0; }
.ac-terms { margin:4px 0 0; color:var(--muted); font-size:12.5px; }
.ac-head { display:flex; align-items:center; gap:14px; }
.ac-head h2 { margin:0; } .ac-head p { margin:0; }
.ac-avatar { width:64px; height:64px; border-radius:50%; object-fit:cover; flex:none; }
.ac-avatar.ini { display:grid; place-items:center; background:var(--dark); color:var(--g400); font-size:26px; font-weight:900; }
.ac-row { display:flex; gap:8px; } .ac-row input { flex:1; }
.ac-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; border-top:1px solid var(--line); padding-top:14px; }
.ac-confirm { display:flex; gap:8px; flex-wrap:wrap; align-items:center; background:var(--err-bg); border-radius:12px; padding:10px 12px; }
.ac-confirm p { margin:0; color:var(--err-ink); font-weight:700; flex-basis:100%; }
.danger-fill { background:#dc2626; color:#fff; }
.c-as { color:var(--accent); font-weight:700; }
.hp, .c-form input.hp, form input.hp { position:absolute !important; width:1px !important; height:1px !important; inset-inline-start:0; top:0; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); border:0; opacity:0; pointer-events:none; }
.c-reply { margin-top:8px; background:var(--soft); border-inline-start:3px solid var(--g500); border-radius:8px; padding:8px 10px; }
.c-reply b { color:var(--accent); font-size:13px; } .c-reply p { margin:2px 0 0; }
.avatar img { width:100%; height:100%; border-radius:50%; object-fit:cover; }
.lesson-done { margin-top:12px; } .lesson-done .btn { width:100%; justify-content:center; }
.case-img { width:100%; max-height:360px; object-fit:cover; border-radius:14px; }

/* Falstad lab + professional simulator links */
.fal { display:grid; gap:10px; }
.fal p { margin:0; color:var(--ink2); }
.fs-ex { display:flex; gap:8px; flex-wrap:wrap; }
.fs-frame { border:1px solid var(--line); border-radius:14px; overflow:hidden; background:#fff; direction:ltr; }
.fs-frame iframe { display:block; width:100%; height:560px; border:0; }
@media (max-width: 640px) { .fs-frame iframe { height:460px; } }
.fs-bar { display:flex; gap:12px; align-items:center; flex-wrap:wrap; } .fs-bar small { color:var(--muted); }
.fs-tips { margin:0; padding-inline-start:20px; color:var(--ink2); font-size:14.5px; display:grid; gap:4px; }
.pro-sims { display:grid; gap:10px; } .pro-sims h3 { margin:0; }
.pro-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width: 640px) { .pro-grid { grid-template-columns:1fr; } }
.pro-card { display:grid; gap:6px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px; color:var(--ink); }
.pro-card:hover { border-color:var(--g400); text-decoration:none; }
.pro-card b { font-size:18px; } .pro-card span { color:var(--ink2); font-size:14.5px; } .pro-card em { font-style:normal; color:var(--accent); font-weight:800; }

/* ---------- Daily challenge ---------- */
.dc { display:grid; gap:16px; max-width:760px; margin:0 auto; }
.dc-stats { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; }
.dc-stat { background:var(--card); border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 10px; text-align:center; display:grid; gap:2px; }
.dc-stat-ic { font-size:20px; line-height:1; }
.dc-stat b { font-size:24px; font-weight:900; color:var(--accent); }
.dc-stat small { color:var(--muted); font-size:13px; }
.dc-try { margin:0; color:var(--muted); text-align:center; }
.dc-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow); display:grid; gap:14px; min-width:0; }
.dc-head { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; }
.dc-lf { background:var(--soft); border:1px solid var(--soft-line); }
.dc-dots { display:flex; gap:6px; }
.dc-dot { flex:1; height:8px; border-radius:99px; background:var(--line); }
.dc-dot.s1 { background:var(--g500); } .dc-dot.s2 { background:#ef4444; } .dc-dot.s3 { background:#f59e0b; }
.dc-dot.cur { outline:2px solid var(--accent); outline-offset:2px; }
.dc-count { margin:0; color:var(--muted); font-size:14px; font-weight:700; }
.dc-repeat { margin:0; background:var(--warn-bg); color:var(--warn-ink); border:1px solid var(--warn-line); border-radius:var(--radius-sm); padding:10px 12px; font-weight:700; }
.dc-q { margin:0; font-size:clamp(19px, 2.6vw, 24px); line-height:1.45; }
.dc-de { margin:0; color:var(--muted); font-size:14px; text-align:start; unicode-bidi:plaintext; }
.dc-card > .dc-de { margin-top:-8px; font-style:italic; }
.dc-opts { display:grid; gap:10px; }
.dc-opt { display:flex; align-items:center; gap:12px; width:100%; text-align:start; font:inherit; color:var(--ink); background:var(--card2); border:2px solid var(--line); border-radius:var(--radius-sm); padding:12px 14px; cursor:pointer; transition:border-color .15s, background .15s; min-width:0; }
.dc-opt:hover:not(:disabled) { border-color:var(--g400); }
.dc-opt:disabled { cursor:default; }
.dc-letter { flex:none; width:32px; height:32px; border-radius:50%; display:grid; place-items:center; font-weight:900; background:var(--tint); color:var(--tint-ink); }
.dc-otext { display:grid; gap:2px; min-width:0; overflow-wrap:anywhere; }
.dc-opt.ok { border-color:var(--g500); background:var(--soft); }
.dc-opt.ok .dc-letter { background:var(--g600); color:#fff; }
.dc-opt.bad { border-color:#ef4444; background:var(--err-bg); }
.dc-opt.bad .dc-letter { background:#ef4444; color:#fff; }
.dc-fb { border-radius:var(--radius-sm); padding:12px 14px; display:grid; gap:4px; }
.dc-fb p { margin:0; }
.dc-fb.ok { background:var(--soft); border:1px solid var(--soft-line); color:var(--tint-ink); }
.dc-fb.bad { background:var(--err-bg); border:1px solid #fca5a5; color:var(--err-ink); }
.dc-fb .muted { color:var(--muted); font-size:14px; }
.dc-next { justify-self:start; }
.dc-lock, .dc-done { text-align:center; justify-items:center; }
.dc-lock h2, .dc-done h2 { margin:0; }
.dc-lock p, .dc-done p { margin:0; max-width:520px; }
.dc-big { font-size:22px; font-weight:800; }
.dc-pts { font-size:30px; font-weight:900; color:var(--accent); }
.dc-perfect { background:var(--soft); border:1px solid var(--soft-line); border-radius:999px; padding:6px 14px; font-weight:800; color:var(--tint-ink); }
.dc-how { background:var(--card); border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 16px; }
.dc-how summary { cursor:pointer; font-weight:800; }
.dc-how p { margin:8px 0 0; color:var(--ink2); }
@media (max-width:560px) { .dc-card { padding:16px; } .dc-stat b { font-size:20px; } .dc-opt { padding:10px 12px; } }

/* ---------- Gesellenprüfung Teil 1 page ---------- */
.gp-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; background:var(--card); border:1px solid var(--line); border-radius:999px; padding:5px; }
.gp-tab { font:inherit; font-weight:800; border:0; border-radius:999px; padding:10px 12px; background:transparent; color:var(--ink2); cursor:pointer; }
.gp-tab.on { background:var(--accent); color:#fff; }
.gp-topics { display:flex; flex-wrap:wrap; gap:8px; }
.gp-topic { font:inherit; font-size:14px; font-weight:700; border:1px solid var(--line); background:var(--card); color:var(--ink2); border-radius:999px; padding:6px 12px; cursor:pointer; }
.gp-topic.on { background:var(--tint); color:var(--tint-ink); border-color:var(--soft-line); }
.dc-card > .chip { justify-self:start; }
.gp-why { margin:6px 0 0; color:var(--ink2); }
.gp-nav { display:flex; flex-wrap:wrap; gap:10px; }
.gp-bar { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.gp-time { font-weight:700; color:var(--muted); } .gp-time b { color:var(--accent); font-size:18px; font-variant-numeric:tabular-nums; }
.gp-dots { flex-wrap:wrap; } .gp-dots .dc-dot { flex:0 0 calc((100% - 54px) / 10); border:0; padding:0; cursor:pointer; height:10px; }
.dc-opt.sel { border-color:var(--accent); background:var(--soft); }
.dc-opt.sel .dc-letter { background:var(--accent); color:#fff; }
.gp-review { display:grid; gap:12px; } .gp-review h3 { margin:0; }
.gp-rev { gap:8px; padding:16px; box-shadow:none; } .gp-yours { margin:0; color:var(--err-ink); }

/* ---------- Profile form (account page) ---------- */
.pf { border-top:1px solid var(--line); padding-top:16px; gap:12px; }
.pf h3 { margin:0; }
.pf-photo { display:flex; align-items:center; gap:14px; }
.pf-photo .ac-avatar { width:84px; height:84px; }
.pf-photo-btns { display:grid; gap:6px; }
.pf-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.pf-row .btn { cursor:pointer; }
.pf-field { display:grid; gap:6px; min-width:0; }
.pf-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.pf select, .pf textarea { width:100%; border:2px solid var(--line); border-radius:12px; padding:11px 12px; font:inherit; background:var(--card); color:var(--ink); }
.pf select:focus, .pf textarea:focus { outline:0; border-color:var(--g500); }
.pf textarea { resize:vertical; }
.pf-check { display:flex; gap:10px; align-items:flex-start; font-weight:600 !important; font-size:14.5px; cursor:pointer; }
.pf-check input { width:20px; height:20px; flex:none; margin-top:2px; accent-color:var(--accent); }
.pf .btn-primary { justify-self:start; }
.pf-msg.ok { color:var(--accent); font-weight:700; } .pf-msg.bad { color:var(--err-ink); font-weight:700; }
.pf-done { text-align:center; }
.c-gate { background:var(--soft); border:1px solid var(--soft-line); border-radius:var(--radius-sm); padding:14px 16px; display:grid; gap:10px; justify-items:start; }
.c-gate p { margin:0; }
.c-form .c-anon { margin:2px 0; }
@media (max-width:560px) { .pf-grid { grid-template-columns:1fr; } }
.c-form[hidden], .c-gate[hidden] { display:none !important; }
