@font-face{font-family:Madar Arabic;src:url(type/arabic-regular.woff) format("woff");font-weight:400 550;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Madar Arabic;src:url(type/arabic-bold.woff) format("woff");font-weight:600 950;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
:root{--paper:#f8f7f1;--ink:#12362e;--muted:#53655d;--line:#d9dfd1;--dark:#0b302b;--lime:#ceee94;--card:#fffefa;font-family:"Madar Arabic",Inter,Arial,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none;color-scheme:light}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:16px}body{margin:0;font-size:16px;line-height:1.55}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select{touch-action:manipulation}button,a{ -webkit-tap-highlight-color:transparent }button{cursor:pointer}a{color:inherit}canvas{display:block}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #278d75;outline-offset:4px}#main:focus{outline:none}.skip{position:absolute;inset-inline-start:8px;top:-100px;background:white;padding:12px;z-index:20}.skip:focus{top:8px}
.frame,.workspace{width:min(1240px,calc(100% - 96px));margin-inline:auto}
.madar-header{display:flex;align-items:center;gap:44px;min-height:80px}.brand,.foot-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;flex-shrink:0}.brand img,.foot-brand img{width:39px;height:39px}.brand-name{display:flex;align-items:center;gap:15px}.brand-name strong,.foot-brand strong{font-size:28px;line-height:1.5;letter-spacing:-1.6px}.brand-name small{border-inline-start:1px solid #c9d0c2;padding-inline-start:14px;font-size:14px;color:var(--muted)}.headnav{display:flex;align-items:stretch;justify-content:center;gap:28px;min-height:80px;margin-inline-start:auto}.headnav a{display:flex;align-items:center;position:relative;text-decoration:none;color:#57675d;font-weight:600;font-size:14px;white-space:nowrap}.headnav a:hover,.headnav a[aria-current=page]{color:var(--ink)}.headnav a[aria-current=page]::after{content:"";height:3px;position:absolute;bottom:15px;inset-inline:2px;background:#50764d;border-radius:4px}.lang-button,.gallery-reset{display:inline-flex;align-items:center;gap:7px;background:transparent;padding:6px 11px;border:1px solid #c9d2c3;border-radius:8px;font-size:14px;font-weight:600}.lang-button{min-height:39px}.lang-button:hover,.gallery-reset:hover{background:#e9eddf}.ico{width:20px;height:20px;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;fill:none;flex:none}.lang-button .ico{width:17px;height:17px}
.hero{isolation:isolate;position:relative;display:grid;align-items:center;min-height:382px;overflow:hidden;border-radius:22px;background:#092d28;color:#f5f7ec}.hero-photo{z-index:-2;position:absolute;inset:0;background-position:90% 56%;background-size:65% auto;background-repeat:no-repeat;background-image:url(pendulum.webp);opacity:.99}.hero:before{content:"";z-index:-1;position:absolute;inset:0;background:linear-gradient(90deg,#0b302b 2%,#0b302b 32%,rgba(11,48,43,.90) 43%,rgba(8,42,36,0) 64%)}[dir=rtl] .hero-photo,[dir=rtl] .hero:before{transform:scaleX(-1)}.hero-copy{width:54%;padding:48px clamp(34px,4.4vw,73px) 48px}.hero h1{font-size:clamp(42px,4.25vw,70px);letter-spacing:-.06em;line-height:1.08;margin:0;font-weight:730}.hero h1 span{display:block;color:var(--lime)}[lang=ar] .hero h1{letter-spacing:-.05em;line-height:1.27}.hero-copy p{max-width:440px;color:#d8e4d6;margin:17px 0 22px;font-size:16px;line-height:1.65}.hero-actions{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.button-primary,.button-quiet{display:inline-flex;align-items:center;gap:8px;min-height:43px;text-decoration:none;font-weight:650;font-size:14px}.button-primary{padding:9px 17px;border-radius:8px;background:var(--lime);color:#15382c}.button-primary:hover{background:#e1ffac}.button-quiet{color:#f0f5e9}.button-quiet:hover{text-decoration:underline}.hero-actions .ico{width:17px;height:17px}
.catalog{padding-top:42px;padding-bottom:52px;scroll-margin-top:18px}.cat-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:19px}.cat-title{margin:0;font-size:clamp(27px,3vw,39px);letter-spacing:-.045em;font-weight:700;line-height:1.35}.cat-summary{color:var(--muted);font-size:14px;display:flex;gap:7px;align-items:center}.cat-summary .ico{width:16px}.cat-tools{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.subject-tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.subject-tabs button{color:var(--muted);border:1px solid var(--line);border-radius:999px;background:transparent;font-size:14px;min-height:37px;line-height:1.5;padding:6px 16px;white-space:nowrap}.subject-tabs button:hover,.subject-tabs button[aria-pressed=true]{border-color:#b7c8b2;background:#e9eddf;color:var(--ink)}.subject-tabs button[aria-pressed=true]{background:#183d33;color:white;border-color:#183d33}.searchbox{display:flex;align-items:center;background:#fffefa;border:1px solid #d6dccf;border-radius:9px;color:#62726a;gap:8px;padding-inline:11px;min-height:40px}.searchbox .ico{width:17px;height:17px}.searchbox input{border:0;background:transparent;max-width:150px;min-width:0;font-size:14px;padding:6px 0;outline:none}.searchbox:focus-within{outline:2px solid #48907d;outline-offset:2px}.searchbox input:focus-visible{outline:0}
.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.lab-card{display:flex;flex-direction:column;overflow:hidden;text-decoration:none;background:var(--card);border:1px solid var(--line);border-radius:15px;transition:box-shadow .18s,transform .18s}.lab-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px #17382a12}.art-panel{height:clamp(152px,13vw,190px);margin:6px 6px 0;position:relative;overflow:hidden;border-radius:10px}.art-panel canvas{width:100%;height:100%;direction:ltr}.card-body{padding:15px 19px 18px;flex:1;display:flex;flex-direction:column;gap:4px}.card-meta{display:flex;align-items:center;gap:8px;font-size:13px;color:#53675d}.card-meta .ico{width:14px;height:14px}.card-body h4{margin:4px 0 0;font-size:22px;letter-spacing:-.035em;line-height:1.4}.card-body p{margin:0;color:#52645a;font-size:15px;line-height:1.65}.no-results{border:1px dashed #becab8;background:#fffdf7;text-align:center;border-radius:12px;padding:38px;grid-column:1/-1}.no-results p{margin:0 0 14px}.workspace{padding-top:14px;padding-bottom:48px}.backline{display:flex;align-items:center;gap:7px;margin:2px 0 14px;font-size:14px;color:#466455;text-decoration:none}.backline:hover{text-decoration:underline}.backline .ico{width:15px;height:15px}
.resources{border:1px solid var(--line);border-radius:16px;background:#f0f2e7;padding:clamp(22px,3vw,42px);margin-bottom:55px;display:grid;grid-template-columns:1fr 1.35fr;gap:40px;align-items:start}.resources h2{font-size:clamp(24px,2.7vw,34px);line-height:1.35;margin:0;letter-spacing:-.035em}.resources p{margin:8px 0 0;color:var(--muted);font-size:15px}.download-list{display:grid;gap:8px}.download-link{display:flex;gap:11px;align-items:center;text-decoration:none;background:#fffefa;border:1px solid var(--line);border-radius:10px;padding:11px 14px;font-size:15px;font-weight:630}.download-link small{margin-inline-start:auto;font:12px ui-monospace,monospace;direction:ltr;color:#5c6e61}.download-link:hover{border-color:#899d82}.site-foot{border-top:1px solid var(--line);padding:22px 0 30px;background:#f2f3ea}.foot-row{display:flex;align-items:center;justify-content:space-between;gap:15px}.foot-brand strong{font-size:18px;letter-spacing:-.6px}.foot-brand img{width:26px;height:26px;border-radius:7px}.footlinks{display:flex;gap:22px;align-items:center;font-size:14px;color:var(--muted)}.footlinks a{text-underline-offset:4px}
@media(max-width:1000px){.frame,.workspace{width:calc(100% - 52px)}.madar-header{gap:20px}.headnav{gap:18px}.brand-name small{display:none}.hero-copy{width:59%}.cards{gap:14px}.art-panel{height:148px}}
@media(max-width:750px){.frame,.workspace{width:calc(100% - 32px)}.madar-header{min-height:64px;gap:16px}.headnav{min-height:64px;gap:14px}.headnav a{font-size:13px}.headnav a[aria-current=page]::after{bottom:8px}.brand-name strong{font-size:23px}.brand img{width:32px;height:32px}.lang-button{padding:5px 8px;min-height:35px}.hero{min-height:330px}.hero-copy{padding:32px 24px;width:62%}.hero-copy p{font-size:15px}.hero-photo{background-size:auto 100%;background-position:100% 50%}.hero:before{background:linear-gradient(90deg,#0b302b 20%,#0b302bed 39%,#0b302bc9 53%,transparent 85%)}.hero-actions{gap:12px}.catalog{padding-top:29px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.cat-tools{align-items:flex-start;flex-direction:column;gap:12px}.searchbox{width:100%}.searchbox input{max-width:none;width:100%}.resources{grid-template-columns:1fr;gap:18px}.footlinks{gap:10px;flex-wrap:wrap}}
@media(max-width:535px){.frame,.workspace{width:calc(100% - 24px)}.madar-header{gap:9px;flex-wrap:wrap;padding-block:9px 4px;min-height:0;row-gap:1px}.brand{gap:6px}.brand-name small{display:block;font-size:12px;padding-inline-start:9px}.brand-name{gap:9px}.lang-button{margin-inline-start:auto;order:1}.headnav{min-height:42px;order:2;width:100%;margin:0;justify-content:flex-start;gap:22px}.headnav a[aria-current=page]::after{bottom:0}.hero{display:block;border-radius:15px;min-height:350px;margin-top:7px}.hero-photo{background-size:auto 76%;background-position:100% 0;opacity:.92}.hero:before{background:linear-gradient(90deg,#0b302b 3%,#0b302bdf 32%,#0b302b77 54%,transparent 86%),linear-gradient(0deg,#0b302b 8%,#0b302be8 28%,transparent 62%)}.hero-copy{padding:37px 22px 24px;width:100%}.hero h1{font-size:46px;max-width:74%}.hero-copy p{max-width:82%;margin:19px 0 19px}.hero-actions{gap:16px}.cards{grid-template-columns:1fr}.art-panel{height:175px}.card-body{padding:13px 17px 16px}.subject-tabs{gap:5px}.subject-tabs button{font-size:13px;min-height:33px;padding:5px 10px}.cat-top{margin-bottom:14px}.cat-summary{font-size:12px}.cat-summary .ico{display:none}.catalog{padding-bottom:30px}.cat-tools{margin-bottom:15px}.resources{margin-bottom:30px}.foot-row{align-items:flex-start;flex-direction:column}.footlinks{font-size:13px}.workspace{padding-top:11px}.backline{margin:1px 0 11px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important}}
@media print{.madar-header,.site-foot,.skip,.backline{display:none}.workspace{width:100%}}

.cat-tools{flex-wrap:wrap;align-items:flex-start}
.catalog-groups{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(2rem,4vw,3.5rem)}
.subject-heading{display:flex;align-items:center;gap:.65rem;margin:0 0 1rem;padding-top:.85rem;border-top:1px solid var(--line);font-size:clamp(1.35rem,2.3vw,1.75rem);line-height:1.4;letter-spacing:-.025em}
.subject-heading span{min-width:0;overflow-wrap:anywhere}
.subject-heading .ico{width:1.55rem;height:1.55rem;color:#426b56}
.cat-summary{text-align:end}
.searchbox input{max-width:13rem}
.lab-tile{position:relative}
.catalog-save{position:absolute;inset-block-start:.55rem;inset-inline-end:.55rem;display:grid;place-items:center;width:2.75rem;height:2.75rem;padding:0;border:1px solid #c3d0c5;border-radius:50%;background:#fffef7;color:#315743;cursor:pointer}
.catalog-save .ico{width:1.2rem;height:1.2rem}
.catalog-save[aria-pressed=true]{background:#edf4de;border-color:#6b8959;color:#416c30}
.catalog-save[aria-pressed=true] .ico path{fill:currentColor}
.catalog-save:focus-visible,.catalog-options summary:focus-visible,#catalog-clear:focus-visible,.catalog-share:focus-visible{outline:2px solid #165f45;outline-offset:2px}
#catalog-clear{display:grid;place-items:center;min-width:2.5rem;min-height:2.5rem;padding:0;border:0;border-radius:.5rem;background:transparent;color:var(--muted);cursor:pointer}
#catalog-clear .ico{width:.95rem;height:.95rem}
#catalog-clear[hidden],#catalog-share-url[hidden]{display:none}
#catalog-search::-webkit-search-cancel-button{-webkit-appearance:none}
.catalog-options{margin-block:-.5rem 1.25rem}
.catalog-options summary{width:fit-content;padding:.45rem .25rem;color:#345748;cursor:pointer;font-weight:600}
.catalog-options-body{display:flex;align-items:flex-end;flex-wrap:wrap;gap:.65rem 1rem;margin-top:.35rem;padding:1rem;border:1px solid var(--line);border-radius:.8rem;background:var(--card)}
.catalog-options-body label{display:grid;gap:.3rem;min-width:0}
.catalog-options-body label span{font-size:.84rem;font-weight:600;color:var(--muted)}
.catalog-options-body select,.catalog-share,#catalog-share-url{min-width:0;min-height:2.65rem;max-width:100%;padding:.38rem .72rem;border:1px solid #b7c6b9;border-radius:.5rem;color:var(--ink);background:var(--card);font:inherit}
.catalog-share{font-weight:600;cursor:pointer}
#catalog-share-status{align-self:center;color:var(--muted);font-size:.84rem}
#catalog-share-url{flex:1 1 16rem}
@media(max-width:550px){.catalog-options-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;padding:.7rem;gap:.55rem}.catalog-options-body .catalog-share,.catalog-options-body select{width:100%}#catalog-share-status,#catalog-share-url{grid-column:1/-1}.catalog-options-body label span{font-size:.78rem}}
@media(max-width:750px){.searchbox input{max-width:none}}

@media(max-width:650px){.headnav{overflow-x:auto;min-width:0;max-width:100%;gap:clamp(.6rem,3vw,1.3rem)}.headnav a{flex:none}}

.wb-sample-link{display:inline-flex;align-items:center;gap:.45rem;margin-top:.7rem;color:#175b46;font-weight:650;font-size:1rem;text-underline-offset:.2rem}
.wb-sample-link .ico{width:1.1rem;height:1.1rem}
.resource-more > summary{cursor:pointer;padding:9px 4px;color:var(--muted);font-size:14px;font-weight:600}
.resource-more > summary:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.resource-files{display:grid;gap:8px;padding-block:3px 10px}

@media screen and (prefers-reduced-motion:no-preference){
  :where(.headnav a,.lang-button,.subject-tabs button,.wb-primary,.wb-outline,.wb-motion,.mc-button,.play-menu-link){
    transition:background-color 120ms ease-out,border-color 120ms ease-out,color 120ms ease-out;
  }
}

/* The outer shell uses forest green. Controls and working surfaces retain their own palettes. */
@media screen {
  :root {
    --shell: #162b26;
    --shell-text: #edf4ea;
    --shell-muted: #bccfc2;
    --shell-border: #748f80;
    background: var(--shell);
  }
  .madar-header,.catalog .cat-title,.catalog .subject-heading { color: var(--shell-text); }
  .madar-header .brand-name small,.madar-header .headnav a,.catalog .cat-summary,
  .catalog-options > summary,.workspace > .backline { color: var(--shell-muted); }
  .madar-header .headnav a:hover,.madar-header .headnav a[aria-current=page] { color: var(--shell-text); }
  .madar-header .headnav a[aria-current=page]::after { background: var(--lime); }
  .madar-header .lang-button,.catalog .subject-tabs button {
    color: var(--shell-text);
    border-color: var(--shell-border);
  }
  .madar-header .lang-button:hover,.catalog .subject-tabs button:hover {
    background: #29453a;
    color: var(--shell-text);
  }
  .catalog .subject-tabs button[aria-pressed=true] {
    color: var(--ink);
    background: var(--lime);
    border-color: var(--lime);
  }
  .catalog .subject-heading { border-color: #415c50; }
  .catalog .subject-heading .ico,.catalog .play-circuit-link { color: #cae3bc; }
  .workspace > #active-lab {
    padding: clamp(.55rem, 1.4vw, 1.25rem);
    border-radius: 1rem;
    background: #e7ece3;
  }
  .workspace > #active-lab:has(> .play-hub) { background: transparent; padding: 0; }
  #active-lab > .play-hub > h1 { color: var(--shell-text); }
  .site-foot { background: #10221d; border-color: #415c50; color: var(--shell-text); }
  .site-foot .footlinks { color: var(--shell-muted); }
  :is(.madar-header,.site-foot,.subject-tabs) :focus-visible,
  .catalog-options > summary:focus-visible,.workspace > .backline:focus-visible,
  .catalog .play-circuit-link:focus-visible { outline-color: var(--lime); }
}

.starter-questions {
  margin-block: clamp(1.25rem, 3vw, 2.5rem) 1.5rem;
  color: var(--shell-text, var(--ink));
}
.starter-questions h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.4;
}
.starter-questions > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--shell-border, var(--line));
}
.starter-link {
  display: grid;
  align-content: start;
  gap: .5rem;
  padding: 1rem clamp(.75rem, 1.8vw, 1.5rem);
  text-decoration: none;
  color: inherit;
}
.starter-link + .starter-link { border-inline-start: 1px solid var(--shell-border, var(--line)); }
.starter-link span {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .875rem;
  font-weight: 600;
}
.starter-link .ico { width: 1.1rem; height: 1.1rem; }
.starter-link[data-subject="optics"] span { color: #ead0a8; }
.starter-link[data-subject="waves"] span { color: #ace0ee; }
.starter-link[data-subject="mechanics"] span { color: #c4e4a3; }
.starter-link strong { font-size: 1.05rem; font-weight: 590; line-height: 1.5; }
.starter-link:hover strong, .starter-link:focus-visible strong {
  text-decoration: underline;
  text-underline-offset: .21em;
}
.starter-link:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -2px;
}
@media (max-width: 675px) {
  .starter-questions > div { grid-template-columns: minmax(0, 1fr); }
  .starter-link { gap: .15rem; padding: .75rem .4rem; }
  .starter-link + .starter-link {
    border-inline-start: 0;
    border-block-start: 1px solid var(--shell-border, var(--line));
  }
}
@media print {
  .starter-link[data-subject] span { color: inherit; }
}

.cat-summary{flex-wrap:wrap;justify-content:flex-end}
#catalog-reset[hidden]{display:none}
#catalog-reset{color:inherit;min-height:2.25rem;line-height:1.3}
#catalog-reset:hover{background:var(--card);color:var(--ink)}
.catalog h2[tabindex]:focus-visible,.resources h2[tabindex]:focus-visible{outline:2px solid currentColor;outline-offset:4px}
@media(max-width:550px){.cat-top:has(#catalog-reset:not([hidden])){align-items:flex-start;flex-direction:column;gap:.4rem}.cat-summary{justify-content:flex-start}}
@media(max-width:535px){.headnav{justify-content:space-between;gap:8px}.headnav a{min-height:44px}.footlinks{flex-wrap:wrap}}
@media(min-width:536px) and (max-width:920px){.madar-header .headnav{min-width:0;overflow-x:auto;max-width:100%;gap:.9rem}.madar-header .headnav a{flex:none}.madar-header .brand,.madar-header .lang-button{flex-shrink:0}}

.card-lang{margin-inline-start:auto;font-size:.78rem;line-height:1.5;padding:1px 9px;border:1px solid currentColor;border-radius:999px;white-space:nowrap}
.about-page{max-width:46rem;margin:8px 0 56px;background:var(--card,#fffefa);border:1px solid var(--line,#d9e2d8);border-radius:16px;padding:clamp(22px,4vw,44px)}
.about-page h1{font-size:clamp(28px,4vw,40px);line-height:1.3;margin:0 0 12px;letter-spacing:-.02em}
.about-page h2{font-size:1.25rem;line-height:1.4;margin:28px 0 6px}
.about-page p,.about-page li{font-size:1.02rem;line-height:1.75;margin:0 0 8px}
.about-page ul{margin:0;padding-inline-start:1.3em}
.about-lead{font-size:1.12rem}
.about-links{display:flex;flex-wrap:wrap;gap:10px 22px;margin-top:12px}
.about-links a{display:inline-flex;align-items:center;min-height:44px;font-weight:630}
html[lang=ar] .about-page h1{letter-spacing:0}
